@mimik/api-helper 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/securityHandlers.js +2 -0
- package/package.json +9 -9
package/lib/securityHandlers.js
CHANGED
|
@@ -211,6 +211,7 @@ export const securityLib = (config) => {
|
|
|
211
211
|
const scopeResult = checkScopes(token.scope, getScopes(con, ADMIN_SECURITY), con.api.definition);
|
|
212
212
|
|
|
213
213
|
setClientParams(req, con.request, token, scopeResult);
|
|
214
|
+
if (token.adm) setParam(req, con.request, TOKEN_PARAMS.adminId, token.adm);
|
|
214
215
|
return true;
|
|
215
216
|
},
|
|
216
217
|
mock: createMockHandler({
|
|
@@ -218,6 +219,7 @@ export const securityLib = (config) => {
|
|
|
218
219
|
[TOKEN_PARAMS.tokenType]: ADMIN,
|
|
219
220
|
[TOKEN_PARAMS.clientId]: 'dummyClientId',
|
|
220
221
|
[TOKEN_PARAMS.customer]: 'dummyCustomer',
|
|
222
|
+
[TOKEN_PARAMS.adminId]: 'dummyAdminId',
|
|
221
223
|
}),
|
|
222
224
|
};
|
|
223
225
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/api-helper",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "helper for openAPI backend and mimik service",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": "./index.js",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24.0.0"
|
|
10
|
+
},
|
|
8
11
|
"scripts": {
|
|
9
12
|
"lint": "eslint . --no-error-on-unmatched-pattern",
|
|
10
13
|
"docs": "jsdoc2md index.js > README.md",
|
|
11
|
-
"test": "mocha
|
|
12
|
-
"test-ci": "c8
|
|
14
|
+
"test": "mocha",
|
|
15
|
+
"test-ci": "c8 npm test",
|
|
13
16
|
"prepublishOnly": "npm run docs && npm run lint && npm run test-ci",
|
|
14
17
|
"commit-ready": "npm run docs && npm run lint && npm run test-ci"
|
|
15
18
|
},
|
|
@@ -20,9 +23,6 @@
|
|
|
20
23
|
],
|
|
21
24
|
"author": "mimik technology inc <support@mimik.com> (https://developer.mimik.com/)",
|
|
22
25
|
"license": "MIT",
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=24"
|
|
25
|
-
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://bitbucket.org/mimiktech/api-helper"
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"swagger-client": "3.37.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@eslint/js": "
|
|
43
|
+
"@eslint/js": "10.0.1",
|
|
44
44
|
"@mimik/eslint-plugin-document-env": "^2.0.9",
|
|
45
45
|
"@mimik/eslint-plugin-logger": "^1.0.3",
|
|
46
46
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
47
47
|
"c8": "11.0.0",
|
|
48
48
|
"chai": "6.2.2",
|
|
49
|
-
"eslint": "
|
|
50
|
-
"eslint-plugin-import": "
|
|
49
|
+
"eslint": "10.1.0",
|
|
50
|
+
"eslint-plugin-import-x": "4.16.2",
|
|
51
51
|
"esmock": "2.7.3",
|
|
52
52
|
"globals": "17.4.0",
|
|
53
53
|
"husky": "9.1.7",
|