@tinycloud/node-sdk 3.3.0-beta.33 → 3.3.0-beta.34
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/dist/core.cjs +3 -10
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +3 -10
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +3 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18114,24 +18114,17 @@ function signedAuthorityFromCompactUcan(authorization) {
|
|
|
18114
18114
|
));
|
|
18115
18115
|
continue;
|
|
18116
18116
|
}
|
|
18117
|
-
const
|
|
18118
|
-
const policyMatch = /^tinycloud:\/\/([^/]+)\/(kv|sql|duckdb|hooks)\/(.*)$/.exec(resource);
|
|
18119
|
-
const match = nativeMatch ?? policyMatch;
|
|
18117
|
+
const match = /^(?:tinycloud:\/\/([^/]+)|(tinycloud:[^/]+))\/(kv|sql|duckdb|hooks)(?:\/|$)(.*)$/.exec(resource);
|
|
18120
18118
|
if (!match) {
|
|
18121
18119
|
throw new Error(
|
|
18122
18120
|
`Validated runtime delegation has an unsupported signed resource '${resource}'.`
|
|
18123
18121
|
);
|
|
18124
18122
|
}
|
|
18125
|
-
const [,
|
|
18123
|
+
const [, policySpace, nativeSpace, shortService, path] = match;
|
|
18126
18124
|
const service = SERVICE_BY_SHORT_NAME[shortService];
|
|
18127
|
-
if (service === void 0) {
|
|
18128
|
-
throw new Error(
|
|
18129
|
-
`Validated runtime delegation has an unsupported signed service '${shortService}'.`
|
|
18130
|
-
);
|
|
18131
|
-
}
|
|
18132
18125
|
permissions.push(...groupedSignedEntries(
|
|
18133
18126
|
service,
|
|
18134
|
-
|
|
18127
|
+
nativeSpace ?? policySpace,
|
|
18135
18128
|
path,
|
|
18136
18129
|
abilities
|
|
18137
18130
|
));
|