@blossm/permissions-lookup 0.0.155 → 0.0.157
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/index.js +10 -10
- package/package.json +9 -8
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import yaml from "yaml";
|
|
2
|
+
import { readFile, readdir, unlink } from "fs";
|
|
3
|
+
import { promisify } from "util";
|
|
4
|
+
import fact from "@blossm/fact-rpc";
|
|
5
|
+
import rolePermissions from "@blossm/role-permissions";
|
|
6
|
+
import uuid from "@blossm/uuid";
|
|
7
|
+
import redis from "@blossm/redis";
|
|
8
|
+
import { forbidden } from "@blossm/errors";
|
|
9
|
+
import nodeExternalToken from "@blossm/node-external-token";
|
|
10
10
|
|
|
11
11
|
const readFileAsync = promisify(readFile);
|
|
12
12
|
const readDirAsync = promisify(readdir);
|
|
@@ -15,7 +15,7 @@ const unlinkAsync = promisify(unlink);
|
|
|
15
15
|
const cacheKeyPrefix = "_permissions";
|
|
16
16
|
const FIVE_MINUTES_IN_SECONDS = 60 * 5;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
export default ({ downloadFileFn }) => async ({
|
|
19
19
|
internalTokenFn,
|
|
20
20
|
externalTokenFn,
|
|
21
21
|
principal,
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blossm/permissions-lookup",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.157",
|
|
4
4
|
"description": "Looks up permissions for a role.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"author": "blossm.network",
|
|
7
8
|
"engines": {
|
|
8
9
|
"node": ">= 20.19.0"
|
|
@@ -14,15 +15,15 @@
|
|
|
14
15
|
"test": "echo \"Error: no test specified\" && exit 0"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@blossm/errors": "^0.0.
|
|
18
|
-
"@blossm/fact-rpc": "^0.0.
|
|
19
|
-
"@blossm/redis": "^0.0.
|
|
20
|
-
"@blossm/role-permissions": "^0.0.
|
|
21
|
-
"@blossm/uuid": "^0.0.
|
|
18
|
+
"@blossm/errors": "^0.0.40",
|
|
19
|
+
"@blossm/fact-rpc": "^0.0.195",
|
|
20
|
+
"@blossm/redis": "^0.0.11",
|
|
21
|
+
"@blossm/role-permissions": "^0.0.28",
|
|
22
|
+
"@blossm/uuid": "^0.0.9",
|
|
22
23
|
"yaml": "^2.8.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"mocha": "^7.
|
|
26
|
+
"mocha": "^11.7.0"
|
|
26
27
|
},
|
|
27
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "5a8a38b510725d2aaadcbe9d9e69acd50ddf531b"
|
|
28
29
|
}
|