@pipelab/shared 1.0.0-beta.18 → 1.0.0-beta.21
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/CHANGELOG.md +27 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/apis.ts +3 -8
- package/src/plugins/definitions.ts +1 -0
- package/src/utils.ts +3 -3
package/dist/index.mjs
CHANGED
|
@@ -44320,16 +44320,16 @@ const foo = "bar";
|
|
|
44320
44320
|
const transformUrl = (url) => {
|
|
44321
44321
|
if (url && typeof url === "string") {
|
|
44322
44322
|
const getHost = () => {
|
|
44323
|
-
if (typeof window !== "undefined") if (
|
|
44323
|
+
if (typeof window !== "undefined") if (process.env.NODE_ENV === "development") return `http://${window.location.hostname}:33753`;
|
|
44324
44324
|
else return `${window.location.protocol}//${window.location.host}`;
|
|
44325
44325
|
return "http://localhost:33753";
|
|
44326
44326
|
};
|
|
44327
44327
|
if (url.startsWith("file://")) {
|
|
44328
|
-
const filePath = url.substring(7);
|
|
44328
|
+
const filePath = decodeURIComponent(url.substring(7));
|
|
44329
44329
|
return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
|
|
44330
44330
|
}
|
|
44331
44331
|
if (url.startsWith("media://")) {
|
|
44332
|
-
const filePath = url.replace(/^media:\/\/+/, "/");
|
|
44332
|
+
const filePath = decodeURIComponent(url.replace(/^media:\/\/+/, "/"));
|
|
44333
44333
|
return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
|
|
44334
44334
|
}
|
|
44335
44335
|
}
|