@base44-preview/vite-plugin 1.0.41-pr.125.53b40d6 → 1.0.42-pr.126.300b9ef
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAiFnC,wBAAgB,mBAAmB,IAAI,MAAM,CA6B5C"}
|
|
@@ -24,6 +24,11 @@ const SPECIFIER = "base44:runtime";
|
|
|
24
24
|
// Rollup convention: a resolved virtual id starts with NUL so no other plugin
|
|
25
25
|
// (and no filesystem lookup) tries to claim it.
|
|
26
26
|
const RESOLVED = "\0base44:runtime";
|
|
27
|
+
// Provided by workerd at runtime. Nitro's cloudflare preset leaves it external in
|
|
28
|
+
// its own server build, but a framework environment that bundles the runtime body
|
|
29
|
+
// first (TanStack Start's `ssr` build) knows nothing about it and would fail the
|
|
30
|
+
// build as an unresolved import.
|
|
31
|
+
const CLOUDFLARE_WORKERS = "cloudflare:workers";
|
|
27
32
|
// Reserved so a route importing it fails with an explanation instead of a bare
|
|
28
33
|
// "failed to resolve import". Actors are never imported — they live in the app's
|
|
29
34
|
// actors directory, in server routes exactly as in backend functions.
|
|
@@ -78,6 +83,9 @@ export function base44RuntimePlugin() {
|
|
|
78
83
|
if (reason) {
|
|
79
84
|
this.error(`"${id}" is not available in server routes. ${reason}`);
|
|
80
85
|
}
|
|
86
|
+
if (id === CLOUDFLARE_WORKERS) {
|
|
87
|
+
return this.environment?.name === "client" ? null : { id, external: true };
|
|
88
|
+
}
|
|
81
89
|
if (id !== SPECIFIER)
|
|
82
90
|
return null;
|
|
83
91
|
// `cloudflare:workers` has no browser equivalent, so a client-side import
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base44-runtime-plugin.js","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,8EAA8E;AAC9E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"base44-runtime-plugin.js","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,8EAA8E;AAC9E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AACpC,kFAAkF;AAClF,kFAAkF;AAClF,iFAAiF;AACjF,iCAAiC;AACjC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEhD,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,MAAM,aAAa,GACjB,8EAA8E,CAAC;AAEjF,SAAS,iBAAiB,CAAC,EAAU;IACnC,IAAI,EAAE,KAAK,uBAAuB;QAAE,OAAO,aAAa,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;CActB,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,0EAA0E;QAC1E,+BAA+B;QAC/B,OAAO,EAAE,KAAK;QAEd,SAAS,CAAC,EAAE;YACV,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,wCAAwC,MAAM,EAAE,CAAC,CAAC;YACrE,CAAC;YACD,IAAI,EAAE,KAAK,kBAAkB,EAAE,CAAC;gBAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC7E,CAAC;YACD,IAAI,EAAE,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC;YAElC,0EAA0E;YAC1E,uEAAuE;YACvE,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACxC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,yDAAyD,CAAC,CAAC;YACrF,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,EAAE;YACL,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;QACjD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -27,6 +27,11 @@ const SPECIFIER = "base44:runtime";
|
|
|
27
27
|
// Rollup convention: a resolved virtual id starts with NUL so no other plugin
|
|
28
28
|
// (and no filesystem lookup) tries to claim it.
|
|
29
29
|
const RESOLVED = "\0base44:runtime";
|
|
30
|
+
// Provided by workerd at runtime. Nitro's cloudflare preset leaves it external in
|
|
31
|
+
// its own server build, but a framework environment that bundles the runtime body
|
|
32
|
+
// first (TanStack Start's `ssr` build) knows nothing about it and would fail the
|
|
33
|
+
// build as an unresolved import.
|
|
34
|
+
const CLOUDFLARE_WORKERS = "cloudflare:workers";
|
|
30
35
|
|
|
31
36
|
// Reserved so a route importing it fails with an explanation instead of a bare
|
|
32
37
|
// "failed to resolve import". Actors are never imported — they live in the app's
|
|
@@ -86,6 +91,9 @@ export function base44RuntimePlugin(): Plugin {
|
|
|
86
91
|
if (reason) {
|
|
87
92
|
this.error(`"${id}" is not available in server routes. ${reason}`);
|
|
88
93
|
}
|
|
94
|
+
if (id === CLOUDFLARE_WORKERS) {
|
|
95
|
+
return this.environment?.name === "client" ? null : { id, external: true };
|
|
96
|
+
}
|
|
89
97
|
if (id !== SPECIFIER) return null;
|
|
90
98
|
|
|
91
99
|
// `cloudflare:workers` has no browser equivalent, so a client-side import
|