@tinycloud/sdk-core 2.11.0-beta.7 → 2.11.0-beta.9
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/bootstrap/index.cjs +0 -4
- package/dist/{capability-BjzXwtNw.d.cts → capability-BA49Uboq.d.cts} +1 -1
- package/dist/{capability-BjzXwtNw.d.ts → capability-BA49Uboq.d.ts} +1 -1
- package/dist/delegations/index.cjs +11 -120
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.js +15 -39
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +250 -367
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +247 -48
- package/dist/index.js.map +1 -1
- package/dist/policy/index.cjs +10 -74
- package/dist/policy/index.cjs.map +1 -1
- package/dist/policy/index.d.cts +4 -4
- package/dist/policy/index.d.ts +4 -4
- package/dist/policy/index.js +10 -8
- package/dist/policy/index.js.map +1 -1
- package/dist/requester/index.cjs +10 -38
- package/dist/requester/index.cjs.map +1 -1
- package/dist/requester/index.d.cts +1 -1
- package/dist/requester/index.d.ts +1 -1
- package/dist/requester/index.js +10 -8
- package/dist/requester/index.js.map +1 -1
- package/dist/{signed-object-C6mWbTbB.d.ts → signed-object-B3dMzh8O.d.ts} +1 -1
- package/dist/{signed-object-IMAm5a32.d.cts → signed-object-DwPZl6kV.d.cts} +1 -1
- package/package.json +4 -3
package/dist/bootstrap/index.cjs
CHANGED
|
@@ -18,8 +18,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var bootstrap_exports = {};
|
|
19
19
|
module.exports = __toCommonJS(bootstrap_exports);
|
|
20
20
|
__reExport(bootstrap_exports, require("@tinycloud/bootstrap"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("@tinycloud/bootstrap")
|
|
24
|
-
});
|
|
25
21
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -44,4 +44,4 @@ declare function canonicalizePolicyCapability(input: unknown): PolicyCapability;
|
|
|
44
44
|
declare function policyCapabilityDigestHex(input: unknown): string;
|
|
45
45
|
declare function policyCapabilityContains(authority: unknown, request: unknown): boolean;
|
|
46
46
|
|
|
47
|
-
export { type JsonObject as J,
|
|
47
|
+
export { type JsonObject as J, type PolicyCapability as P, PolicyCapabilityError as a, type JsonValue as b, type PolicyCapabilityErrorCode as c, canonicalizePolicyCapability as d, normalizePolicyCapability as e, policyCapabilityDigestHex as f, jcsCanonicalize as j, normalizeJson as n, policyCapabilityContains as p, serialize as s };
|
|
@@ -44,4 +44,4 @@ declare function canonicalizePolicyCapability(input: unknown): PolicyCapability;
|
|
|
44
44
|
declare function policyCapabilityDigestHex(input: unknown): string;
|
|
45
45
|
declare function policyCapabilityContains(authority: unknown, request: unknown): boolean;
|
|
46
46
|
|
|
47
|
-
export { type JsonObject as J,
|
|
47
|
+
export { type JsonObject as J, type PolicyCapability as P, PolicyCapabilityError as a, type JsonValue as b, type PolicyCapabilityErrorCode as c, canonicalizePolicyCapability as d, normalizePolicyCapability as e, policyCapabilityDigestHex as f, jcsCanonicalize as j, normalizeJson as n, policyCapabilityContains as p, serialize as s };
|
|
@@ -2264,13 +2264,12 @@ function digest(input, options) {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
var identity2 = { code: code2, name, encode: encode4, digest };
|
|
2266
2266
|
|
|
2267
|
-
// ../../node_modules/multiformats/dist/src/hashes/sha2.js
|
|
2268
|
-
var
|
|
2269
|
-
__export(
|
|
2267
|
+
// ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
|
|
2268
|
+
var sha2_browser_exports = {};
|
|
2269
|
+
__export(sha2_browser_exports, {
|
|
2270
2270
|
sha256: () => sha256,
|
|
2271
2271
|
sha512: () => sha512
|
|
2272
2272
|
});
|
|
2273
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
2274
2273
|
|
|
2275
2274
|
// ../../node_modules/multiformats/dist/src/hashes/hasher.js
|
|
2276
2275
|
var DEFAULT_MIN_DIGEST_LENGTH = 20;
|
|
@@ -2320,16 +2319,19 @@ function createDigest(digest4, code3, truncate) {
|
|
|
2320
2319
|
return create(code3, digest4);
|
|
2321
2320
|
}
|
|
2322
2321
|
|
|
2323
|
-
// ../../node_modules/multiformats/dist/src/hashes/sha2.js
|
|
2322
|
+
// ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
|
|
2323
|
+
function sha(name2) {
|
|
2324
|
+
return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
|
|
2325
|
+
}
|
|
2324
2326
|
var sha256 = from2({
|
|
2325
2327
|
name: "sha2-256",
|
|
2326
2328
|
code: 18,
|
|
2327
|
-
encode: (
|
|
2329
|
+
encode: sha("SHA-256")
|
|
2328
2330
|
});
|
|
2329
2331
|
var sha512 = from2({
|
|
2330
2332
|
name: "sha2-512",
|
|
2331
2333
|
code: 19,
|
|
2332
|
-
encode: (
|
|
2334
|
+
encode: sha("SHA-512")
|
|
2333
2335
|
});
|
|
2334
2336
|
|
|
2335
2337
|
// ../../node_modules/multiformats/dist/src/cid.js
|
|
@@ -2671,7 +2673,7 @@ var cidSymbol = /* @__PURE__ */ Symbol.for("@ipld/js-cid/CID");
|
|
|
2671
2673
|
|
|
2672
2674
|
// ../../node_modules/multiformats/dist/src/basics.js
|
|
2673
2675
|
var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
|
|
2674
|
-
var hashes = { ...
|
|
2676
|
+
var hashes = { ...sha2_browser_exports, ...identity_exports2 };
|
|
2675
2677
|
|
|
2676
2678
|
// src/delegations/SharingService.ts
|
|
2677
2679
|
var import_ed255193 = require("@noble/curves/ed25519");
|
|
@@ -5859,10 +5861,6 @@ var import_sha2564 = require("@noble/hashes/sha256");
|
|
|
5859
5861
|
|
|
5860
5862
|
// src/policy/signed-object.ts
|
|
5861
5863
|
var import_ed255194 = require("@noble/curves/ed25519");
|
|
5862
|
-
var import_viem3 = require("viem");
|
|
5863
|
-
|
|
5864
|
-
// src/policy/capability.ts
|
|
5865
|
-
var import_bootstrap = require("@tinycloud/bootstrap");
|
|
5866
5864
|
var import_viem2 = require("viem");
|
|
5867
5865
|
|
|
5868
5866
|
// src/policy/errors.ts
|
|
@@ -6061,33 +6059,11 @@ function assertUnicodeScalarString(value, path) {
|
|
|
6061
6059
|
}
|
|
6062
6060
|
}
|
|
6063
6061
|
|
|
6064
|
-
// src/policy/
|
|
6062
|
+
// src/policy/signed-object.ts
|
|
6065
6063
|
var textEncoder2 = new TextEncoder();
|
|
6066
6064
|
var objectHasOwn2 = Object.hasOwn ?? Object.prototype.hasOwnProperty.call.bind(
|
|
6067
6065
|
Object.prototype.hasOwnProperty
|
|
6068
6066
|
);
|
|
6069
|
-
var CEILING_SERVICES = /* @__PURE__ */ new Set(["tinycloud.kv", "tinycloud.sql", "tinycloud.vfs"]);
|
|
6070
|
-
var GRANTABLE_ACTIONS = /* @__PURE__ */ new Map();
|
|
6071
|
-
for (const entry of import_bootstrap.CAPABILITY_REGISTRY) {
|
|
6072
|
-
if (!CEILING_SERVICES.has(entry.service)) {
|
|
6073
|
-
continue;
|
|
6074
|
-
}
|
|
6075
|
-
if (entry.aliasOf !== void 0 || entry.implies !== void 0 || entry.urn.endsWith("/*")) {
|
|
6076
|
-
continue;
|
|
6077
|
-
}
|
|
6078
|
-
const existing = GRANTABLE_ACTIONS.get(entry.service);
|
|
6079
|
-
if (existing === void 0) {
|
|
6080
|
-
GRANTABLE_ACTIONS.set(entry.service, /* @__PURE__ */ new Set([entry.urn]));
|
|
6081
|
-
continue;
|
|
6082
|
-
}
|
|
6083
|
-
existing.add(entry.urn);
|
|
6084
|
-
}
|
|
6085
|
-
|
|
6086
|
-
// src/policy/signed-object.ts
|
|
6087
|
-
var textEncoder3 = new TextEncoder();
|
|
6088
|
-
var objectHasOwn3 = Object.hasOwn ?? Object.prototype.hasOwnProperty.call.bind(
|
|
6089
|
-
Object.prototype.hasOwnProperty
|
|
6090
|
-
);
|
|
6091
6067
|
function canonicalizeSignedObjectUnsigned(input) {
|
|
6092
6068
|
return jcsCanonicalize(input);
|
|
6093
6069
|
}
|
|
@@ -6532,89 +6508,4 @@ var SenderShareStore = class {
|
|
|
6532
6508
|
// src/delegations/index.ts
|
|
6533
6509
|
var import_share_sdk = require("@tinycloud/share-sdk");
|
|
6534
6510
|
var import_share_sdk2 = require("@tinycloud/share-sdk");
|
|
6535
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
6536
|
-
0 && (module.exports = {
|
|
6537
|
-
DelegationErrorCodes,
|
|
6538
|
-
DelegationManager,
|
|
6539
|
-
EncodedShareDataSchema,
|
|
6540
|
-
EncryptedSenderShareHistory,
|
|
6541
|
-
MAX_CONTENT_BYTES,
|
|
6542
|
-
MAX_SEALED_SHARE_CONTENT_BYTES,
|
|
6543
|
-
MAX_SHARE_ARTIFACT_BYTES,
|
|
6544
|
-
MAX_SHARE_CONTENT_BYTES,
|
|
6545
|
-
MemoryEncryptedShareHistoryStorage,
|
|
6546
|
-
MemorySenderShareKeyStorage,
|
|
6547
|
-
MemorySenderShareRecordStorage,
|
|
6548
|
-
MemoryShareCache,
|
|
6549
|
-
ReceiveOptionsSchema,
|
|
6550
|
-
SHARE_DELIVERY_AUTHORIZATION_DOMAIN,
|
|
6551
|
-
SenderShareStore,
|
|
6552
|
-
ShareAccessError,
|
|
6553
|
-
ShareActionSchema,
|
|
6554
|
-
ShareAddressedDelegationEnvelopeV2Schema,
|
|
6555
|
-
ShareAddressedDelegationRequestV2Schema,
|
|
6556
|
-
ShareAddressedDelegationResponseV2Schema,
|
|
6557
|
-
ShareConflict,
|
|
6558
|
-
ShareEnvelopeError,
|
|
6559
|
-
ShareNativeResponseSchema,
|
|
6560
|
-
ShareReceiveError,
|
|
6561
|
-
ShareRecipientClient,
|
|
6562
|
-
ShareRecipientClientOptionsSchema,
|
|
6563
|
-
ShareRecipientPolicySchema,
|
|
6564
|
-
ShareRecipientTargetSchema,
|
|
6565
|
-
ShareResourceSchema,
|
|
6566
|
-
SharingService,
|
|
6567
|
-
SharingServiceConfigSchema,
|
|
6568
|
-
authorizationMethodForTarget,
|
|
6569
|
-
authorizeShare,
|
|
6570
|
-
canonicalOwnerSharePolicy,
|
|
6571
|
-
claimShare,
|
|
6572
|
-
computeOwnerShareRegistrationCid,
|
|
6573
|
-
computeShareCid,
|
|
6574
|
-
createDelegatedShareKey,
|
|
6575
|
-
createPolicyEnforcementDelegation,
|
|
6576
|
-
createShareArtifact,
|
|
6577
|
-
createShareArtifactAsync,
|
|
6578
|
-
createSharePolicy,
|
|
6579
|
-
createSharingService,
|
|
6580
|
-
decryptShareBytesAsync,
|
|
6581
|
-
encodeInlineShareUrl,
|
|
6582
|
-
encodeShareArtifact,
|
|
6583
|
-
encodeShareUrl,
|
|
6584
|
-
encryptShareBytes,
|
|
6585
|
-
encryptShareBytesAsync,
|
|
6586
|
-
inspectShare,
|
|
6587
|
-
intersectShareCapabilities,
|
|
6588
|
-
isLegacyShareLink,
|
|
6589
|
-
isV2ShareLink,
|
|
6590
|
-
listShares,
|
|
6591
|
-
migrateShare,
|
|
6592
|
-
normalizeShareActions,
|
|
6593
|
-
normalizeShareRecipientTarget,
|
|
6594
|
-
normalizeShareResource,
|
|
6595
|
-
notifyShare,
|
|
6596
|
-
parseShareArtifact,
|
|
6597
|
-
parseShareUrl,
|
|
6598
|
-
publishPolicyShare,
|
|
6599
|
-
publishTargetShare,
|
|
6600
|
-
receiveLegacyShare,
|
|
6601
|
-
receiveShare,
|
|
6602
|
-
restoreDelegatedShareKey,
|
|
6603
|
-
resumeShareAuthorization,
|
|
6604
|
-
revokeShare,
|
|
6605
|
-
shareCapabilityAllows,
|
|
6606
|
-
shareDeliveryTrustedKid,
|
|
6607
|
-
showShare,
|
|
6608
|
-
signShareEnvelope,
|
|
6609
|
-
toShareErrorInfo,
|
|
6610
|
-
validateEncodedShareData,
|
|
6611
|
-
validateOwnerSharePolicyRegistration,
|
|
6612
|
-
validateOwnerSharePolicyRegistrationBytes,
|
|
6613
|
-
validateReceiveOptions,
|
|
6614
|
-
validateShareDeliveryAuthorizationBytes,
|
|
6615
|
-
validateSharingServiceConfig,
|
|
6616
|
-
verifyBearerEnvelope,
|
|
6617
|
-
verifyShareCid,
|
|
6618
|
-
verifyShareEnvelope
|
|
6619
|
-
});
|
|
6620
6511
|
//# sourceMappingURL=index.cjs.map
|