@onexapis/cli 1.1.49 → 1.1.51
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.mjs
CHANGED
|
@@ -704,6 +704,7 @@ async function compileStandaloneTheme(themePath, themeName) {
|
|
|
704
704
|
},
|
|
705
705
|
plugins: [
|
|
706
706
|
reactGlobalPlugin,
|
|
707
|
+
reactQueryGlobalPlugin,
|
|
707
708
|
createCoreGlobalPlugin(themePath),
|
|
708
709
|
createThemeDepsStubPlugin(themePath)
|
|
709
710
|
],
|
|
@@ -799,6 +800,7 @@ async function compileStandaloneThemeDev(themePath, themeName) {
|
|
|
799
800
|
},
|
|
800
801
|
plugins: [
|
|
801
802
|
reactGlobalPlugin,
|
|
803
|
+
reactQueryGlobalPlugin,
|
|
802
804
|
createCoreGlobalPlugin(themePath),
|
|
803
805
|
createThemeDepsStubPlugin(themePath)
|
|
804
806
|
],
|
|
@@ -1179,7 +1181,7 @@ export function headers() { return new Headers(); }
|
|
|
1179
1181
|
}
|
|
1180
1182
|
return outputPath;
|
|
1181
1183
|
}
|
|
1182
|
-
var PROCESS_SHIM, reactGlobalPlugin;
|
|
1184
|
+
var PROCESS_SHIM, reactGlobalPlugin, reactQueryGlobalPlugin;
|
|
1183
1185
|
var init_compile_theme = __esm({
|
|
1184
1186
|
"src/utils/compile-theme.ts"() {
|
|
1185
1187
|
init_logger();
|
|
@@ -1297,6 +1299,37 @@ export const Fragment = _jsxRuntime.Fragment;
|
|
|
1297
1299
|
});
|
|
1298
1300
|
}
|
|
1299
1301
|
};
|
|
1302
|
+
reactQueryGlobalPlugin = {
|
|
1303
|
+
name: "react-query-global",
|
|
1304
|
+
setup(build2) {
|
|
1305
|
+
build2.onResolve({ filter: /^@tanstack\/react-query$/ }, () => ({
|
|
1306
|
+
path: "react-query-external",
|
|
1307
|
+
namespace: "react-query-global"
|
|
1308
|
+
}));
|
|
1309
|
+
build2.onLoad({ filter: /.*/, namespace: "react-query-global" }, () => ({
|
|
1310
|
+
contents: `
|
|
1311
|
+
if (!globalThis.__REACT_QUERY__) {
|
|
1312
|
+
throw new Error('[Theme Bundle] @tanstack/react-query not initialized. Ensure globalThis.__REACT_QUERY__ is set before loading theme.');
|
|
1313
|
+
}
|
|
1314
|
+
const _rq = globalThis.__REACT_QUERY__;
|
|
1315
|
+
export default _rq;
|
|
1316
|
+
export const {
|
|
1317
|
+
useQuery,
|
|
1318
|
+
useMutation,
|
|
1319
|
+
useQueryClient,
|
|
1320
|
+
useInfiniteQuery,
|
|
1321
|
+
QueryClient,
|
|
1322
|
+
QueryClientProvider,
|
|
1323
|
+
useIsFetching,
|
|
1324
|
+
useIsMutating,
|
|
1325
|
+
usePrefetchQuery,
|
|
1326
|
+
usePrefetchInfiniteQuery,
|
|
1327
|
+
} = _rq;
|
|
1328
|
+
`.trim(),
|
|
1329
|
+
loader: "js"
|
|
1330
|
+
}));
|
|
1331
|
+
}
|
|
1332
|
+
};
|
|
1300
1333
|
}
|
|
1301
1334
|
});
|
|
1302
1335
|
|