@zpress/cli 0.5.2 ā 0.5.4
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/145.mjs +18 -5
- package/package.json +4 -4
package/dist/145.mjs
CHANGED
|
@@ -30,7 +30,7 @@ async function startDevServer(options) {
|
|
|
30
30
|
port: portNumbers(preferred, preferred + DEV_PORT_RANGE)
|
|
31
31
|
});
|
|
32
32
|
let serverInstance = null;
|
|
33
|
-
async function startServer(config) {
|
|
33
|
+
async function startServer(config, internalOptions) {
|
|
34
34
|
const rspressConfig = createRspressConfig({
|
|
35
35
|
config,
|
|
36
36
|
paths,
|
|
@@ -48,7 +48,8 @@ async function startDevServer(options) {
|
|
|
48
48
|
server: {
|
|
49
49
|
port,
|
|
50
50
|
strictPort: true
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
...buildCacheOverride(internalOptions)
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
55
|
return true;
|
|
@@ -57,7 +58,9 @@ async function startDevServer(options) {
|
|
|
57
58
|
return false;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
const started = await startServer(options.config
|
|
61
|
+
const started = await startServer(options.config, {
|
|
62
|
+
skipBuildCache: false
|
|
63
|
+
});
|
|
61
64
|
if (!started) process.exit(1);
|
|
62
65
|
return async (newConfig)=>{
|
|
63
66
|
process.stdout.write('\nš Config changed ā restarting dev server...\n');
|
|
@@ -78,7 +81,9 @@ async function startDevServer(options) {
|
|
|
78
81
|
}
|
|
79
82
|
serverInstance = null;
|
|
80
83
|
}
|
|
81
|
-
const restarted = await startServer(newConfig
|
|
84
|
+
const restarted = await startServer(newConfig, {
|
|
85
|
+
skipBuildCache: true
|
|
86
|
+
});
|
|
82
87
|
if (restarted) process.stdout.write('ā
Dev server restarted\n\n');
|
|
83
88
|
else process.stderr.write('ā ļø Dev server failed to restart ā fix the config and save again\n\n');
|
|
84
89
|
};
|
|
@@ -154,6 +159,14 @@ function createCloseEvent(httpServer) {
|
|
|
154
159
|
if (!httpServer.listening) return null;
|
|
155
160
|
return once(httpServer, 'close');
|
|
156
161
|
}
|
|
162
|
+
function buildCacheOverride(options) {
|
|
163
|
+
if (options.skipBuildCache) return {
|
|
164
|
+
performance: {
|
|
165
|
+
buildCache: false
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
return {};
|
|
169
|
+
}
|
|
157
170
|
function getHttpServer(instance) {
|
|
158
171
|
const record = instance;
|
|
159
172
|
const value = record['httpServer'];
|
|
@@ -1069,7 +1082,7 @@ const syncCommand = command({
|
|
|
1069
1082
|
});
|
|
1070
1083
|
await cli({
|
|
1071
1084
|
name: 'zpress',
|
|
1072
|
-
version: "0.5.
|
|
1085
|
+
version: "0.5.4",
|
|
1073
1086
|
description: 'CLI for building and serving documentation',
|
|
1074
1087
|
commands: {
|
|
1075
1088
|
sync: syncCommand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zpress/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "CLI for building and serving zpress documentation sites",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"get-port": "^7.2.0",
|
|
41
41
|
"ts-pattern": "^5.9.0",
|
|
42
42
|
"zod": "^4.3.6",
|
|
43
|
-
"@zpress/core": "0.
|
|
44
|
-
"@zpress/
|
|
45
|
-
"@zpress/
|
|
43
|
+
"@zpress/core": "0.8.0",
|
|
44
|
+
"@zpress/ui": "0.8.7",
|
|
45
|
+
"@zpress/templates": "0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rslib/core": "^0.20.0",
|