@onexapis/cli 1.1.49 → 1.1.50
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/cli.js +34 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +34 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -1
- package/dist/index.mjs.map +1 -1
- package/dist/preview/preview-app.tsx +6 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -740,6 +740,7 @@ async function compileStandaloneTheme(themePath, themeName) {
|
|
|
740
740
|
},
|
|
741
741
|
plugins: [
|
|
742
742
|
reactGlobalPlugin,
|
|
743
|
+
reactQueryGlobalPlugin,
|
|
743
744
|
createCoreGlobalPlugin(themePath),
|
|
744
745
|
createThemeDepsStubPlugin(themePath)
|
|
745
746
|
],
|
|
@@ -835,6 +836,7 @@ async function compileStandaloneThemeDev(themePath, themeName) {
|
|
|
835
836
|
},
|
|
836
837
|
plugins: [
|
|
837
838
|
reactGlobalPlugin,
|
|
839
|
+
reactQueryGlobalPlugin,
|
|
838
840
|
createCoreGlobalPlugin(themePath),
|
|
839
841
|
createThemeDepsStubPlugin(themePath)
|
|
840
842
|
],
|
|
@@ -1215,7 +1217,7 @@ export function headers() { return new Headers(); }
|
|
|
1215
1217
|
}
|
|
1216
1218
|
return outputPath;
|
|
1217
1219
|
}
|
|
1218
|
-
var PROCESS_SHIM, reactGlobalPlugin;
|
|
1220
|
+
var PROCESS_SHIM, reactGlobalPlugin, reactQueryGlobalPlugin;
|
|
1219
1221
|
var init_compile_theme = __esm({
|
|
1220
1222
|
"src/utils/compile-theme.ts"() {
|
|
1221
1223
|
init_logger();
|
|
@@ -1333,6 +1335,37 @@ export const Fragment = _jsxRuntime.Fragment;
|
|
|
1333
1335
|
});
|
|
1334
1336
|
}
|
|
1335
1337
|
};
|
|
1338
|
+
reactQueryGlobalPlugin = {
|
|
1339
|
+
name: "react-query-global",
|
|
1340
|
+
setup(build2) {
|
|
1341
|
+
build2.onResolve({ filter: /^@tanstack\/react-query$/ }, () => ({
|
|
1342
|
+
path: "react-query-external",
|
|
1343
|
+
namespace: "react-query-global"
|
|
1344
|
+
}));
|
|
1345
|
+
build2.onLoad({ filter: /.*/, namespace: "react-query-global" }, () => ({
|
|
1346
|
+
contents: `
|
|
1347
|
+
if (!globalThis.__REACT_QUERY__) {
|
|
1348
|
+
throw new Error('[Theme Bundle] @tanstack/react-query not initialized. Ensure globalThis.__REACT_QUERY__ is set before loading theme.');
|
|
1349
|
+
}
|
|
1350
|
+
const _rq = globalThis.__REACT_QUERY__;
|
|
1351
|
+
export default _rq;
|
|
1352
|
+
export const {
|
|
1353
|
+
useQuery,
|
|
1354
|
+
useMutation,
|
|
1355
|
+
useQueryClient,
|
|
1356
|
+
useInfiniteQuery,
|
|
1357
|
+
QueryClient,
|
|
1358
|
+
QueryClientProvider,
|
|
1359
|
+
useIsFetching,
|
|
1360
|
+
useIsMutating,
|
|
1361
|
+
usePrefetchQuery,
|
|
1362
|
+
usePrefetchInfiniteQuery,
|
|
1363
|
+
} = _rq;
|
|
1364
|
+
`.trim(),
|
|
1365
|
+
loader: "js"
|
|
1366
|
+
}));
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1336
1369
|
}
|
|
1337
1370
|
});
|
|
1338
1371
|
|