@cloudwerk/cli 0.15.9 → 0.15.11
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.js +9 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -375,10 +375,17 @@ async function build(pathArg, options) {
|
|
|
375
375
|
// Generate manifest.json for asset mapping
|
|
376
376
|
rollupOptions: {
|
|
377
377
|
input: "virtual:cloudwerk/client-entry",
|
|
378
|
+
// Externalize @cloudwerk/* packages from client bundle — they are server-only.
|
|
379
|
+
// stripServerExports removes loader/config, but residual imports (e.g., types)
|
|
380
|
+
// can pull in node:async_hooks via the runtime context chain.
|
|
381
|
+
external: [/^@cloudwerk\//],
|
|
378
382
|
onwarn(warning, defaultHandler) {
|
|
379
383
|
if (warning.code === "MODULE_LEVEL_DIRECTIVE" && warning.message.includes('"use client"')) {
|
|
380
384
|
return;
|
|
381
385
|
}
|
|
386
|
+
if (warning.code === "MISSING_EXPORT" && warning.message && /"(config|loader|default|generateStaticParams)" is not exported/.test(warning.message)) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
382
389
|
defaultHandler(warning);
|
|
383
390
|
},
|
|
384
391
|
output: {
|
|
@@ -409,9 +416,7 @@ async function build(pathArg, options) {
|
|
|
409
416
|
logger.debug(`Loaded asset manifest with ${Object.keys(assetManifest).length} entries`);
|
|
410
417
|
}
|
|
411
418
|
} catch (error) {
|
|
412
|
-
|
|
413
|
-
logger.debug(`Client build skipped or failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
414
|
-
}
|
|
419
|
+
logger.warn(`Client build failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
415
420
|
}
|
|
416
421
|
const renderer = cloudwerkConfig.ui?.renderer ?? "hono-jsx";
|
|
417
422
|
const serverEntryCode = generateServerEntry(manifest, scanResult, {
|
|
@@ -463,7 +468,7 @@ async function build(pathArg, options) {
|
|
|
463
468
|
if (warning.code === "MODULE_LEVEL_DIRECTIVE" && warning.message.includes('"use client"')) {
|
|
464
469
|
return;
|
|
465
470
|
}
|
|
466
|
-
if (warning.code === "MISSING_EXPORT" && warning.message && /
|
|
471
|
+
if (warning.code === "MISSING_EXPORT" && warning.message && /"(config|loader|default|generateStaticParams)" is not exported/.test(warning.message)) {
|
|
467
472
|
return;
|
|
468
473
|
}
|
|
469
474
|
defaultHandler(warning);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudwerk/cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.11",
|
|
4
4
|
"description": "Dev server, build, deploy commands for Cloudwerk",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"esbuild": "^0.25.0",
|
|
31
31
|
"picocolors": "^1.1.0",
|
|
32
32
|
"wrangler": "^4.0.0",
|
|
33
|
-
"vite": "^6.0.0",
|
|
34
|
-
"@cloudwerk/core": "^0.15.3",
|
|
33
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
35
34
|
"@cloudwerk/vite-plugin": "^0.8.0",
|
|
36
|
-
"@cloudwerk/ui": "^0.15.6"
|
|
35
|
+
"@cloudwerk/ui": "^0.15.6",
|
|
36
|
+
"@cloudwerk/core": "^0.15.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^20.0.0",
|