@tinycloud/node-sdk 3.8.0-beta.11 → 3.8.0-beta.13
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/{WasmKeyProvider-5Ee7fcAw.d.cts → WasmKeyProvider-BKCPRC-c.d.cts} +21 -1
- package/dist/{WasmKeyProvider-5Ee7fcAw.d.ts → WasmKeyProvider-BKCPRC-c.d.ts} +21 -1
- package/dist/core.cjs +14 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +13 -0
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17968,6 +17968,7 @@ __export(src_exports, {
|
|
|
17968
17968
|
hexDecode: () => import_sdk_core22.hexDecode,
|
|
17969
17969
|
hexEncode: () => import_sdk_core22.hexEncode,
|
|
17970
17970
|
installTinyCloudDebugGlobals: () => import_sdk_core16.installTinyCloudDebugGlobals,
|
|
17971
|
+
isAppKeyHostBound: () => isAppKeyHostBound,
|
|
17971
17972
|
isCapabilitySubset: () => import_sdk_core17.isCapabilitySubset,
|
|
17972
17973
|
isEvmAddress: () => import_sdk_core16.isEvmAddress,
|
|
17973
17974
|
isNetworkId: () => import_sdk_core22.isNetworkId,
|
|
@@ -18862,6 +18863,18 @@ function appKeyHostBinding(domain, appId) {
|
|
|
18862
18863
|
const reversed = labels.reverse().join(".");
|
|
18863
18864
|
return appId === reversed || appId.startsWith(`${reversed}.`);
|
|
18864
18865
|
}
|
|
18866
|
+
function isAppKeyHostBound(keysAppId, origin) {
|
|
18867
|
+
if (typeof origin === "string" && !origin.includes("://")) {
|
|
18868
|
+
return appKeyHostBinding(origin, keysAppId);
|
|
18869
|
+
}
|
|
18870
|
+
let url;
|
|
18871
|
+
try {
|
|
18872
|
+
url = typeof origin === "string" ? new URL(origin) : origin;
|
|
18873
|
+
} catch {
|
|
18874
|
+
return false;
|
|
18875
|
+
}
|
|
18876
|
+
return appKeyHostBinding(url.host, keysAppId);
|
|
18877
|
+
}
|
|
18865
18878
|
|
|
18866
18879
|
// src/authorization/NodeUserAuthorization.ts
|
|
18867
18880
|
init_authority_sign_in();
|
|
@@ -30904,6 +30917,7 @@ function sqliteReplicaStorage(options) {
|
|
|
30904
30917
|
hexDecode,
|
|
30905
30918
|
hexEncode,
|
|
30906
30919
|
installTinyCloudDebugGlobals,
|
|
30920
|
+
isAppKeyHostBound,
|
|
30907
30921
|
isCapabilitySubset,
|
|
30908
30922
|
isEvmAddress,
|
|
30909
30923
|
isNetworkId,
|