@tinycloud/cli 1.0.0-beta.23 → 1.0.1-beta.0
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/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/legacy-entry.js +3 -2
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -12900,11 +12900,15 @@ var contentMetadataSchema = external_exports.object({
|
|
|
12900
12900
|
/** Encrypted presentation discriminator. The fixed entry point is index.html. */
|
|
12901
12901
|
artifact: external_exports.literal("html").optional()
|
|
12902
12902
|
}).strict();
|
|
12903
|
+
var deliveryEmailSchema = external_exports.string().email();
|
|
12904
|
+
function isEnvelopeDeliveryEmail(value) {
|
|
12905
|
+
return deliveryEmailSchema.safeParse(value).success;
|
|
12906
|
+
}
|
|
12903
12907
|
var unsignedShareEnvelopeV2BaseSchema = external_exports.object({
|
|
12904
12908
|
version: external_exports.literal(2),
|
|
12905
12909
|
shareId: external_exports.string().min(1),
|
|
12906
12910
|
recipientMatcher: recipientMatcherSchema,
|
|
12907
|
-
deliveryEmail:
|
|
12911
|
+
deliveryEmail: deliveryEmailSchema.optional(),
|
|
12908
12912
|
actions: external_exports.array(shareActionSchema).min(1).max(3),
|
|
12909
12913
|
resource: resourceSelectorSchema,
|
|
12910
12914
|
target: v2TargetSchema,
|
|
@@ -13044,7 +13048,7 @@ var unsignedShareEnvelopeV3BaseSchema = external_exports.object({
|
|
|
13044
13048
|
version: external_exports.literal(3),
|
|
13045
13049
|
shareId: external_exports.string().min(1),
|
|
13046
13050
|
recipientMatcher: recipientMatcherSchema,
|
|
13047
|
-
deliveryEmail:
|
|
13051
|
+
deliveryEmail: deliveryEmailSchema.optional(),
|
|
13048
13052
|
actions: external_exports.array(shareActionSchema).min(1).max(3),
|
|
13049
13053
|
resource: resourceSelectorSchema,
|
|
13050
13054
|
target: v3TargetSchema,
|
|
@@ -14147,6 +14151,7 @@ function prepareAddressedShare(request) {
|
|
|
14147
14151
|
}
|
|
14148
14152
|
if (request.actions.length === 0 || request.policyActions.length === 0) throw new TypeError("addressed share actions are empty");
|
|
14149
14153
|
if (request.policyActions.some((action) => !OWNER_SHARE_ACTIONS.has(action))) throw new TypeError("addressed share action is not supported");
|
|
14154
|
+
if (request.deliveryEmail !== void 0 && !isEnvelopeDeliveryEmail(request.deliveryEmail)) throw new TypeError("delivery email is not a valid envelope address");
|
|
14150
14155
|
const target = normalizeShareTarget(request.target);
|
|
14151
14156
|
if (target.kind === "bearer") throw new TypeError("addressed target is required");
|
|
14152
14157
|
if (target.kind === "recipientDid") return { target };
|
|
@@ -16704,11 +16709,15 @@ var contentMetadataSchema2 = external_exports2.object({
|
|
|
16704
16709
|
/** Encrypted presentation discriminator. The fixed entry point is index.html. */
|
|
16705
16710
|
artifact: external_exports2.literal("html").optional()
|
|
16706
16711
|
}).strict();
|
|
16712
|
+
var deliveryEmailSchema2 = external_exports2.string().email();
|
|
16713
|
+
function isEnvelopeDeliveryEmail2(value) {
|
|
16714
|
+
return deliveryEmailSchema2.safeParse(value).success;
|
|
16715
|
+
}
|
|
16707
16716
|
var unsignedShareEnvelopeV2BaseSchema2 = external_exports2.object({
|
|
16708
16717
|
version: external_exports2.literal(2),
|
|
16709
16718
|
shareId: external_exports2.string().min(1),
|
|
16710
16719
|
recipientMatcher: recipientMatcherSchema2,
|
|
16711
|
-
deliveryEmail:
|
|
16720
|
+
deliveryEmail: deliveryEmailSchema2.optional(),
|
|
16712
16721
|
actions: external_exports2.array(shareActionSchema2).min(1).max(3),
|
|
16713
16722
|
resource: resourceSelectorSchema2,
|
|
16714
16723
|
target: v2TargetSchema2,
|
|
@@ -16848,7 +16857,7 @@ var unsignedShareEnvelopeV3BaseSchema2 = external_exports2.object({
|
|
|
16848
16857
|
version: external_exports2.literal(3),
|
|
16849
16858
|
shareId: external_exports2.string().min(1),
|
|
16850
16859
|
recipientMatcher: recipientMatcherSchema2,
|
|
16851
|
-
deliveryEmail:
|
|
16860
|
+
deliveryEmail: deliveryEmailSchema2.optional(),
|
|
16852
16861
|
actions: external_exports2.array(shareActionSchema2).min(1).max(3),
|
|
16853
16862
|
resource: resourceSelectorSchema2,
|
|
16854
16863
|
target: v3TargetSchema2,
|
|
@@ -17354,6 +17363,12 @@ function createShareAuthorityAdapters(input = {}) {
|
|
|
17354
17363
|
policyActions,
|
|
17355
17364
|
contentSource,
|
|
17356
17365
|
...prepared.credentialRequirement === void 0 ? {} : { credentialRequirement: prepared.credentialRequirement },
|
|
17366
|
+
// tinycloud-node 1.17.2 signs a delivery receipt only for the envelope's
|
|
17367
|
+
// own signed delivery address (1.17.3 accepts it and no longer requires
|
|
17368
|
+
// it), so an exact-email share pins its canonical mailbox for `--notify`
|
|
17369
|
+
// and `tc share notify`. A mailbox the envelope's `deliveryEmail` rule
|
|
17370
|
+
// rejects (deployed viewers validate with it) is published unpinned.
|
|
17371
|
+
...prepared.target.kind === "email" && isEnvelopeDeliveryEmail2(prepared.target.address) ? { deliveryEmail: prepared.target.address } : {},
|
|
17357
17372
|
filename: targetInput.filename,
|
|
17358
17373
|
mediaType,
|
|
17359
17374
|
byteLength,
|