@tinycloud/share-sdk 1.5.0-beta.4 → 1.5.0-beta.5
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/share-index.cjs.map +1 -1
- package/dist/share-index.js.map +1 -1
- package/dist/share-root.cjs.map +1 -1
- package/dist/share-root.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9518,7 +9518,7 @@ function canonicalViewerUrl(viewerOrigin) {
|
|
|
9518
9518
|
}
|
|
9519
9519
|
async function createNativeShare(sharing, input) {
|
|
9520
9520
|
if (!input.path || input.path.startsWith("/") || input.path.endsWith("/") || input.path.includes("..") || input.path.includes("//")) throw new TypeError("native share path must be one canonical TinyCloud KV key");
|
|
9521
|
-
const generated = await sharing.generate({ path: input.path, actions: ["tinycloud.kv/get"], expiry: input.expiresAt });
|
|
9521
|
+
const generated = await sharing.generate({ path: input.path, actions: ["tinycloud.kv/get"], expiry: input.expiresAt, ...input.includePlacement === void 0 ? {} : { includePlacement: input.includePlacement } });
|
|
9522
9522
|
if (generated.ok !== true) {
|
|
9523
9523
|
const error = new Error(typeof generated.error?.message === "string" ? generated.error.message : "TinyCloud sharing service rejected delegation generation");
|
|
9524
9524
|
if (typeof generated.error?.code === "string") Object.assign(error, { code: generated.error.code });
|