@balena/pinejs 19.1.0-build-compile-auth-88acad2dfe2227d559d3f5bb69a9b76b0e070f48-3 → 19.1.0-build-compile-auth-f615d178643e42fe5cd03afca19cef8d2867887d-2
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.
@@ -1,6 +1,6 @@
|
|
1
1
|
- commits:
|
2
2
|
- subject: Add getAuthCompiler for building permissions
|
3
|
-
hash:
|
3
|
+
hash: f615d178643e42fe5cd03afca19cef8d2867887d
|
4
4
|
body: ""
|
5
5
|
footer:
|
6
6
|
Change-type: minor
|
@@ -9,7 +9,7 @@
|
|
9
9
|
nested: []
|
10
10
|
version: 19.1.0
|
11
11
|
title: ""
|
12
|
-
date: 2024-09-
|
12
|
+
date: 2024-09-30T23:35:37.818Z
|
13
13
|
- commits:
|
14
14
|
- subject: Update dependency grunt-webpack to v7
|
15
15
|
hash: 178c06f03da15786e2447190ed7b2df36d5eb0d2
|
@@ -18,8 +18,8 @@ const getAuthCompiler = ({ pinejsClient, modelName, }) => {
|
|
18
18
|
if (resource == null) {
|
19
19
|
throw new Error('The resource must be specified.');
|
20
20
|
}
|
21
|
-
if (
|
22
|
-
throw new Error(`The access property must be
|
21
|
+
if (typeof access !== 'string') {
|
22
|
+
throw new Error(`The access property must be a string.`);
|
23
23
|
}
|
24
24
|
const filter = options != null
|
25
25
|
? `?${asPermission(decodeURIComponent(pinejsClient.compile({ resource, options })))}`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"compile-auth.js","sourceRoot":"","sources":["../../src/sbvr-api/compile-auth.ts"],"names":[],"mappings":";;;AAEA,MAAM,YAAY,GAAG,CAAC,cAAsB,EAAU,EAAE;IACvD,OAAO,cAAc;SACnB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SACpB,OAAO,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAClD,CAAC,CAAC;AAEK,MAAM,eAAe,GAAG,CAA2C,EAC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K,QAAQ,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC1D,CAAC;YAED,MAAM,MAAM,GACX,OAAO,IAAI,IAAI;gBACd,CAAC,CAAC,IAAI,YAAY,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;gBACrF,CAAC,CAAC,EAAE,CAAC;YACP,OAAO,GAAG,SAAS,IAAI,QAAQ,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC;QACtD,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AA1CW,QAAA,eAAe,mBA0C1B"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/pinejs",
|
3
|
-
"version": "19.1.0-build-compile-auth-
|
3
|
+
"version": "19.1.0-build-compile-auth-f615d178643e42fe5cd03afca19cef8d2867887d-2",
|
4
4
|
"main": "out/server-glue/module",
|
5
5
|
"type": "commonjs",
|
6
6
|
"repository": "git@github.com:balena-io/pinejs.git",
|
@@ -147,6 +147,6 @@
|
|
147
147
|
"recursive": true
|
148
148
|
},
|
149
149
|
"versionist": {
|
150
|
-
"publishedAt": "2024-09-
|
150
|
+
"publishedAt": "2024-09-30T23:35:38.566Z"
|
151
151
|
}
|
152
152
|
}
|
@@ -37,10 +37,8 @@ export const getAuthCompiler = <M extends { [key in keyof M]: Resource }>({
|
|
37
37
|
throw new Error('The resource must be specified.');
|
38
38
|
}
|
39
39
|
|
40
|
-
if (
|
41
|
-
throw new Error(
|
42
|
-
`The access property must be one of 'read', 'create', 'update', or 'delete'.`,
|
43
|
-
);
|
40
|
+
if (typeof access !== 'string') {
|
41
|
+
throw new Error(`The access property must be a string.`);
|
44
42
|
}
|
45
43
|
|
46
44
|
const filter =
|