oxidejs 0.1.8 → 0.1.9
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.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useCtx, c as useRequest, i as action, n as unpluginFactory, o as useEnv, r as vite, s as useFetchCtx, t as oxidejs } from "./src-
|
|
1
|
+
import { a as useCtx, c as useRequest, i as action, n as unpluginFactory, o as useEnv, r as vite, s as useFetchCtx, t as oxidejs } from "./src-GLi2EcPa.mjs";
|
|
2
2
|
export { action, oxidejs as default, oxidejs, unpluginFactory, useCtx, useEnv, useFetchCtx, useRequest, vite };
|
package/dist/rsbuild.mjs
CHANGED
|
@@ -89,7 +89,7 @@ export const client = createClient(${JSON.stringify(opts)});
|
|
|
89
89
|
`;
|
|
90
90
|
}
|
|
91
91
|
function generateClientStub(mod) {
|
|
92
|
-
const lines = [`import { client } from ${JSON.stringify(VIRTUAL_CLIENT_ID)};`];
|
|
92
|
+
const lines = [`// oxidejs:client-stub`, `import { client } from ${JSON.stringify(VIRTUAL_CLIENT_ID)};`];
|
|
93
93
|
for (const name of mod.exports) lines.push(`export const ${name} = (...args) => {
|
|
94
94
|
const opts = args.at(-1);
|
|
95
95
|
// ponytail: peel last { signal } only. A lone payload { signal: AbortSignal } is treated as CallOptions.
|
|
@@ -746,7 +746,7 @@ const unpluginFactory = (options) => {
|
|
|
746
746
|
}
|
|
747
747
|
},
|
|
748
748
|
transform(code, id, extra) {
|
|
749
|
-
if (!isServerFileId(id) || !pluginShouldStub(this, extra)) return;
|
|
749
|
+
if (!isServerFileId(id) || !pluginShouldStub(this, extra) || code.startsWith("// oxidejs:client-stub\n")) return;
|
|
750
750
|
return generateClientStub({
|
|
751
751
|
key: moduleKey(id.split("?")[0] ?? id),
|
|
752
752
|
exports: parseExportedNames(code)
|
package/dist/vite.mjs
CHANGED