buckyos 0.7.155 → 0.7.157
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/cli/dist/cli.mjs +3 -12
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/obj.ts +4 -10
- package/cli/version.ts +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +2 -2
- package/dist/{executor_client-022a19b9.js → executor_client-250bc4d8.js} +2 -2
- package/dist/executor_client-250bc4d8.js.map +1 -0
- package/dist/{executor_client-78ad0749.mjs → executor_client-ef98b975.mjs} +12 -1
- package/dist/executor_client-ef98b975.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +2 -2
- package/dist/object_url.d.ts +6 -0
- package/dist/object_url.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/executor_client-022a19b9.js.map +0 -1
- package/dist/executor_client-78ad0749.mjs.map +0 -1
|
@@ -474,6 +474,16 @@ function formatObjectUrl(url) {
|
|
|
474
474
|
return url.url;
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
+
function objectEndpoint(url, origin, currentZone) {
|
|
478
|
+
const base = origin.replace(/\/+$/, "");
|
|
479
|
+
if (url.kind === "obj")
|
|
480
|
+
return `${base}/kapi/${url.host.name}/obj${formatObjectUrl(url).slice(`obj://${url.host.name}`.length)}`;
|
|
481
|
+
if (url.kind === "cyfs_path" && (url.zone === null || url.zone === currentZone))
|
|
482
|
+
return `${base}/kapi/dfs/obj${url.path.replace(/\/+$/, "")}`;
|
|
483
|
+
if (url.kind === "web")
|
|
484
|
+
return url.url;
|
|
485
|
+
return null;
|
|
486
|
+
}
|
|
477
487
|
function normalizeObjectUrl(input) {
|
|
478
488
|
return formatObjectUrl(parseObjectUrl(input));
|
|
479
489
|
}
|
|
@@ -691,6 +701,7 @@ const object_url = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
691
701
|
objEventPattern,
|
|
692
702
|
objServiceUrl,
|
|
693
703
|
objectDid,
|
|
704
|
+
objectEndpoint,
|
|
694
705
|
objectEventKey,
|
|
695
706
|
objectEventPattern,
|
|
696
707
|
objectSegments,
|
|
@@ -30627,4 +30638,4 @@ export {
|
|
|
30627
30638
|
NOTIFY_SESSION_PREFIX as y,
|
|
30628
30639
|
NOTIFY_CHOICE_CONTROL_ID as z
|
|
30629
30640
|
};
|
|
30630
|
-
//# sourceMappingURL=executor_client-
|
|
30641
|
+
//# sourceMappingURL=executor_client-ef98b975.mjs.map
|