@aprovan/patchwork-compiler 0.1.2-dev.c00a8ae → 0.1.2-dev.c680591
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -49,8 +49,8 @@ __export(index_exports, {
|
|
|
49
49
|
cdnTransformPlugin: () => cdnTransformPlugin,
|
|
50
50
|
createCompiler: () => createCompiler,
|
|
51
51
|
createFieldAccessProxy: () => createFieldAccessProxy,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
createHttpProxy: () => createHttpProxy,
|
|
53
|
+
createIframeProxy: () => createIframeProxy,
|
|
54
54
|
createImageRegistry: () => createImageRegistry,
|
|
55
55
|
createProjectFromFiles: () => createProjectFromFiles,
|
|
56
56
|
createSingleFileProject: () => createSingleFileProject,
|
|
@@ -81,7 +81,7 @@ __export(index_exports, {
|
|
|
81
81
|
});
|
|
82
82
|
module.exports = __toCommonJS(index_exports);
|
|
83
83
|
|
|
84
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.
|
|
84
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
|
|
85
85
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
86
86
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
87
87
|
|
|
@@ -794,7 +794,7 @@ function vfsPlugin(project, options = {}) {
|
|
|
794
794
|
function generateMessageId() {
|
|
795
795
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function createHttpProxy(proxyUrl) {
|
|
798
798
|
return {
|
|
799
799
|
async call(namespace, procedure, args) {
|
|
800
800
|
const url = `${proxyUrl}/${namespace}/${procedure}`;
|
|
@@ -938,7 +938,7 @@ var ParentBridge = class {
|
|
|
938
938
|
this.pendingCalls.clear();
|
|
939
939
|
}
|
|
940
940
|
};
|
|
941
|
-
function
|
|
941
|
+
function createIframeProxy() {
|
|
942
942
|
const pendingCalls = /* @__PURE__ */ new Map();
|
|
943
943
|
if (typeof window !== "undefined") {
|
|
944
944
|
window.addEventListener("message", (event) => {
|
|
@@ -1607,7 +1607,7 @@ async function createCompiler(options) {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
const registry = getImageRegistry();
|
|
1609
1609
|
await registry.preload(imageSpec);
|
|
1610
|
-
const proxy =
|
|
1610
|
+
const proxy = createHttpProxy(proxyUrl);
|
|
1611
1611
|
return new PatchworkCompiler(proxy, registry);
|
|
1612
1612
|
}
|
|
1613
1613
|
var PatchworkCompiler = class {
|
|
@@ -2805,8 +2805,8 @@ var VFSStore = class {
|
|
|
2805
2805
|
cdnTransformPlugin,
|
|
2806
2806
|
createCompiler,
|
|
2807
2807
|
createFieldAccessProxy,
|
|
2808
|
-
|
|
2809
|
-
|
|
2808
|
+
createHttpProxy,
|
|
2809
|
+
createIframeProxy,
|
|
2810
2810
|
createImageRegistry,
|
|
2811
2811
|
createProjectFromFiles,
|
|
2812
2812
|
createSingleFileProject,
|