From eb6f3b183cbfbaa7ef706ca3b6cf7ed812529d3f Mon Sep 17 00:00:00 2001 From: Mohamed Achaq Date: Tue, 25 Jul 2023 21:42:19 +0100 Subject: [PATCH] Update the role.remove input type --- package-lock.json | 56 +++++++++++++++++++++++++++++++++++++++ packages/core/lib/role.ts | 4 +-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86d774a..b9f4434 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1140,6 +1140,10 @@ "resolved": "packages/express", "link": true }, + "node_modules/@iamjs/fetch": { + "resolved": "packages/fetch", + "link": true + }, "node_modules/@iamjs/koa": { "resolved": "packages/koa", "link": true @@ -5056,6 +5060,30 @@ "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "dev": true }, + "node_modules/@types/node-fetch": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.4.tgz", + "integrity": "sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "node_modules/@types/node-fetch/node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", @@ -16551,6 +16579,17 @@ "node": ">=6.4.0" } }, + "node_modules/supertest-fetch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/supertest-fetch/-/supertest-fetch-1.5.0.tgz", + "integrity": "sha512-B4hy3WLbRQiRqoJR1eKN9E1MdZZeeeHe/ARAjYhwpP6i1XcZJI7Yt9jTYJO6Tj6o2/SvZbxsI05c3XheuTfR6w==", + "dev": true, + "dependencies": { + "@types/express": "^4.17.7", + "@types/node-fetch": "^2.3.1", + "node-fetch": "^2.3.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -17963,6 +18002,23 @@ "vite-plugin-dts": "^2.2.0" } }, + "packages/fetch": { + "version": "1.0.5", + "license": "MIT", + "dependencies": { + "@iamjs/core": "^1.0.2" + }, + "devDependencies": { + "@types/jest": "^29.5.0", + "@types/supertest": "^2.0.12", + "jest": "^29.5.0", + "supertest": "^6.3.3", + "supertest-fetch": "^1.5.0", + "ts-jest": "^29.1.0", + "vite": "^4.2.1", + "vite-plugin-dts": "^2.2.0" + } + }, "packages/koa": { "name": "@iamjs/koa", "version": "1.0.5", diff --git a/packages/core/lib/role.ts b/packages/core/lib/role.ts index 7d17a2a..8ba6668 100644 --- a/packages/core/lib/role.ts +++ b/packages/core/lib/role.ts @@ -115,8 +115,8 @@ class Role implements IRole { ) }); } - - public remove(options: removeOptions) { + // eslint-disable-next-line @typescript-eslint/ban-types + public remove(options: removeOptions) { const { resource, mutate } = options; if (mutate) { delete this.config[resource];