@zpress/cli 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/dist/145.mjs +10 -3
  2. package/package.json +2 -2
package/dist/145.mjs CHANGED
@@ -587,9 +587,11 @@ const diffCommand = command({
587
587
  }
588
588
  });
589
589
  function collectWatchPaths(config) {
590
- const dirs = flattenIncludePaths(config.sections);
590
+ const dirs = flattenIncludePaths(config.sections).map(toDirectory);
591
+ const roots = dirs.map(toTopLevelRoot).filter((r)=>r.length > 0);
591
592
  return uniq([
592
- ...dirs.map(toDirectory),
593
+ ...dirs,
594
+ ...roots,
593
595
  ...CONFIG_GLOBS
594
596
  ]);
595
597
  }
@@ -615,6 +617,11 @@ function toDirectory(from) {
615
617
  }
616
618
  return from;
617
619
  }
620
+ function toTopLevelRoot(dir) {
621
+ const idx = dir.indexOf('/');
622
+ if (-1 === idx) return '';
623
+ return dir.slice(0, idx + 1);
624
+ }
618
625
  const RENAME_SEPARATOR = ' -> ';
619
626
  function gitChangedFiles(params) {
620
627
  const [err, output] = execSilent({
@@ -1012,7 +1019,7 @@ const syncCommand = command({
1012
1019
  });
1013
1020
  await cli({
1014
1021
  name: 'zpress',
1015
- version: "0.4.0",
1022
+ version: "0.4.1",
1016
1023
  description: 'CLI for building and serving documentation',
1017
1024
  commands: {
1018
1025
  sync: syncCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zpress/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI for building and serving zpress documentation sites",
5
5
  "keywords": [
6
6
  "cli",
@@ -42,7 +42,7 @@
42
42
  "zod": "^4.3.6",
43
43
  "@zpress/core": "0.7.1",
44
44
  "@zpress/templates": "0.1.1",
45
- "@zpress/ui": "0.8.0"
45
+ "@zpress/ui": "0.8.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@rslib/core": "^0.20.0",