@onexapis/cli 1.1.48 → 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 +47 -4
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +47 -4
- 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 +16 -8
- package/package.json +2 -2
- package/templates/default/pages/forgot-password.ts +4 -2
- package/templates/default/pages/login.ts +4 -2
- package/templates/default/pages/register.ts +4 -2
- package/templates/default/pages/verify-code.ts +4 -2
package/dist/cli.js
CHANGED
|
@@ -751,6 +751,7 @@ async function compileStandaloneTheme(themePath, themeName) {
|
|
|
751
751
|
},
|
|
752
752
|
plugins: [
|
|
753
753
|
reactGlobalPlugin,
|
|
754
|
+
reactQueryGlobalPlugin,
|
|
754
755
|
createCoreGlobalPlugin(themePath),
|
|
755
756
|
createThemeDepsStubPlugin(themePath)
|
|
756
757
|
],
|
|
@@ -846,6 +847,7 @@ async function compileStandaloneThemeDev(themePath, themeName) {
|
|
|
846
847
|
},
|
|
847
848
|
plugins: [
|
|
848
849
|
reactGlobalPlugin,
|
|
850
|
+
reactQueryGlobalPlugin,
|
|
849
851
|
createCoreGlobalPlugin(themePath),
|
|
850
852
|
createThemeDepsStubPlugin(themePath)
|
|
851
853
|
],
|
|
@@ -1226,7 +1228,7 @@ export function headers() { return new Headers(); }
|
|
|
1226
1228
|
}
|
|
1227
1229
|
return outputPath;
|
|
1228
1230
|
}
|
|
1229
|
-
var PROCESS_SHIM, reactGlobalPlugin;
|
|
1231
|
+
var PROCESS_SHIM, reactGlobalPlugin, reactQueryGlobalPlugin;
|
|
1230
1232
|
var init_compile_theme = __esm({
|
|
1231
1233
|
"src/utils/compile-theme.ts"() {
|
|
1232
1234
|
init_logger();
|
|
@@ -1344,6 +1346,37 @@ export const Fragment = _jsxRuntime.Fragment;
|
|
|
1344
1346
|
});
|
|
1345
1347
|
}
|
|
1346
1348
|
};
|
|
1349
|
+
reactQueryGlobalPlugin = {
|
|
1350
|
+
name: "react-query-global",
|
|
1351
|
+
setup(build2) {
|
|
1352
|
+
build2.onResolve({ filter: /^@tanstack\/react-query$/ }, () => ({
|
|
1353
|
+
path: "react-query-external",
|
|
1354
|
+
namespace: "react-query-global"
|
|
1355
|
+
}));
|
|
1356
|
+
build2.onLoad({ filter: /.*/, namespace: "react-query-global" }, () => ({
|
|
1357
|
+
contents: `
|
|
1358
|
+
if (!globalThis.__REACT_QUERY__) {
|
|
1359
|
+
throw new Error('[Theme Bundle] @tanstack/react-query not initialized. Ensure globalThis.__REACT_QUERY__ is set before loading theme.');
|
|
1360
|
+
}
|
|
1361
|
+
const _rq = globalThis.__REACT_QUERY__;
|
|
1362
|
+
export default _rq;
|
|
1363
|
+
export const {
|
|
1364
|
+
useQuery,
|
|
1365
|
+
useMutation,
|
|
1366
|
+
useQueryClient,
|
|
1367
|
+
useInfiniteQuery,
|
|
1368
|
+
QueryClient,
|
|
1369
|
+
QueryClientProvider,
|
|
1370
|
+
useIsFetching,
|
|
1371
|
+
useIsMutating,
|
|
1372
|
+
usePrefetchQuery,
|
|
1373
|
+
usePrefetchInfiniteQuery,
|
|
1374
|
+
} = _rq;
|
|
1375
|
+
`.trim(),
|
|
1376
|
+
loader: "js"
|
|
1377
|
+
}));
|
|
1378
|
+
}
|
|
1379
|
+
};
|
|
1347
1380
|
}
|
|
1348
1381
|
});
|
|
1349
1382
|
|
|
@@ -4872,6 +4905,8 @@ Or use the --bump flag:
|
|
|
4872
4905
|
if (!pubResponse.ok || !pubBody.bundleUploadUrl) {
|
|
4873
4906
|
logger.stopSpinner(false, "Failed to get upload URLs");
|
|
4874
4907
|
logger.error(pubBody.error || "Server error");
|
|
4908
|
+
logger.error(`Status: ${pubResponse.status} ${pubResponse.statusText}`);
|
|
4909
|
+
logger.error(`Response: ${JSON.stringify(pubBody).slice(0, 500)}`);
|
|
4875
4910
|
process.exit(1);
|
|
4876
4911
|
}
|
|
4877
4912
|
bundleUploadUrl = pubBody.bundleUploadUrl;
|
|
@@ -5005,13 +5040,21 @@ Or use the --bump flag:
|
|
|
5005
5040
|
const confirmBody = confirmData.statusCode ? confirmData.body : confirmData;
|
|
5006
5041
|
if (!confirmResponse.ok || !confirmBody.success) {
|
|
5007
5042
|
logger.stopSpinner(false, "Publishing failed");
|
|
5008
|
-
|
|
5043
|
+
const violations = confirmBody.violations || confirmData.violations;
|
|
5044
|
+
if (violations && violations.length > 0) {
|
|
5009
5045
|
logger.error("Theme rejected \u2014 security violations found:");
|
|
5010
|
-
for (const v of
|
|
5011
|
-
logger.log(
|
|
5046
|
+
for (const v of violations) {
|
|
5047
|
+
logger.log(
|
|
5048
|
+
` \u274C ${v.file || v.path || "?"}: ${v.violation || v.message || JSON.stringify(v)}`
|
|
5049
|
+
);
|
|
5012
5050
|
}
|
|
5013
5051
|
} else {
|
|
5014
5052
|
logger.error(confirmBody.error || "Unknown error");
|
|
5053
|
+
logger.error(confirmBody.message || "");
|
|
5054
|
+
logger.error(
|
|
5055
|
+
`Status: ${confirmResponse.status} ${confirmResponse.statusText}`
|
|
5056
|
+
);
|
|
5057
|
+
logger.error(`Response: ${JSON.stringify(confirmBody).slice(0, 2e3)}`);
|
|
5015
5058
|
}
|
|
5016
5059
|
if (confirmBody.warnings?.length) {
|
|
5017
5060
|
logger.newLine();
|