novahiz 0.11.4 → 0.11.6
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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/cli.js +16 -6
- package/install/install.mjs +30 -12
- package/package.json +1 -1
- package/src/cli.ts +15 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.11.6] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Installer spawnSync arguments** - `spawnSync(...cmd, opts)` spread the
|
|
13
|
+
command array into separate positional arguments, causing
|
|
14
|
+
`ERR_INVALID_ARG_TYPE` on the options object during the catalog sync step
|
|
15
|
+
of `novahiz setup`. All 5 call sites now use
|
|
16
|
+
`spawnSync(cmd[0], cmd.slice(1), opts)`.
|
|
17
|
+
|
|
18
|
+
## [0.11.5] - 2026-10-23
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **`novahiz setup` now completes on Linux with Node builds lacking TypeScript support** - `runSync()` and the installer spawned `home/src/cli.ts` directly, which fails with `ERR_UNKNOWN_FILE_EXTENSION` / `ERR_NO_TYPESCRIPT` on Node builds without TypeScript compiled in (e.g. Debian/Ubuntu Node 24.19.0). `runSync()` and all installer spawn sites now prefer `home/dist/cli.js` (JS compiled, present in the published package and copied into the home by the installer via `CORE_ITEMS`) and fall back to `src/cli.ts` with `--experimental-strip-types` only when `dist` is missing. `"dist"` was added to `CORE_ITEMS` so the file is copied into the home on every install.
|
|
23
|
+
|
|
8
24
|
## [0.11.4] - 2026-10-22
|
|
9
25
|
|
|
10
26
|
### Fixed
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
17 catégories, 94 skills, 13 gate rules, 8 MCP providers — tout déterministe, tout local, tout JSON.
|
|
6
6
|
|
|
7
|
-
> **Version 0.11.
|
|
7
|
+
> **Version 0.11.4** — `npm install -g novahiz` pose le CLI, et le premier `novahiz` lancé termine l'installation (core puis extras). `CHANGELOG.md` et `scripts/` sont dans le tarball.
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
┌──────────────────────────────────────────────────────────────────────────┐
|
package/dist/cli.js
CHANGED
|
@@ -33,12 +33,22 @@ function homeDir() {
|
|
|
33
33
|
}
|
|
34
34
|
function runSync() {
|
|
35
35
|
const home = homeDir();
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
spawnSync(process.execPath, [
|
|
36
|
+
const cliJs = join(home, "dist", "cli.js");
|
|
37
|
+
const cliTs = join(home, "src", "cli.ts");
|
|
38
|
+
if (existsSync(cliJs)) {
|
|
39
|
+
// dist/cli.js est du JS compilé : Node le lit nativement, sur tous les
|
|
40
|
+
// builds (y compris ceux sans support TypeScript compilé).
|
|
41
|
+
spawnSync(process.execPath, [cliJs, "sync"], {
|
|
42
|
+
encoding: "utf8",
|
|
43
|
+
stdio: "inherit",
|
|
44
|
+
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else if (existsSync(cliTs)) {
|
|
48
|
+
// Fallback pour un home qui ne contient que les sources (pas de build).
|
|
49
|
+
// --experimental-strip-types ne fonctionne que sur les builds Node avec
|
|
50
|
+
// support TypeScript compilé ; sinon l'utilisateur verra une erreur claire.
|
|
51
|
+
spawnSync(process.execPath, ["--experimental-strip-types", cliTs, "sync"], {
|
|
42
52
|
encoding: "utf8",
|
|
43
53
|
stdio: "inherit",
|
|
44
54
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
package/install/install.mjs
CHANGED
|
@@ -34,6 +34,22 @@ import {
|
|
|
34
34
|
import { createPrompt } from "./prompt.mjs";
|
|
35
35
|
import { createInstallerUI } from "./ui.mjs";
|
|
36
36
|
|
|
37
|
+
// Retourne les arguments complets pour spawnSync afin d'exécuter le CLI
|
|
38
|
+
// Novahiz depuis le home. Préfère dist/cli.js (JS compilé, fonctionne sur
|
|
39
|
+
// tous les builds Node, y compris ceux sans support TypeScript compilé) et
|
|
40
|
+
// tombe sur src/cli.ts avec --experimental-strip-types si dist manque.
|
|
41
|
+
function cliSpawnArgs(home, ...args) {
|
|
42
|
+
const cliJs = join(home, "dist", "cli.js");
|
|
43
|
+
const cliTs = join(home, "src", "cli.ts");
|
|
44
|
+
if (existsSync(cliJs)) {
|
|
45
|
+
return [process.execPath, cliJs, ...args];
|
|
46
|
+
}
|
|
47
|
+
if (existsSync(cliTs)) {
|
|
48
|
+
return [process.execPath, "--experimental-strip-types", cliTs, ...args];
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
37
53
|
// Etapes visibles par l'utilisateur, dans l'ordre reel d'execution. La barre
|
|
38
54
|
// de progression se base sur cette liste : toute section ajoutee ici doit
|
|
39
55
|
// appeler ui.step() une fois (les sauts conditionnels passent par
|
|
@@ -77,6 +93,7 @@ const CORE_ITEMS = [
|
|
|
77
93
|
"skills",
|
|
78
94
|
"docs",
|
|
79
95
|
"scripts",
|
|
96
|
+
"dist",
|
|
80
97
|
"package.json",
|
|
81
98
|
"tsconfig.json",
|
|
82
99
|
"LICENSE",
|
|
@@ -485,10 +502,10 @@ async function main() {
|
|
|
485
502
|
note("Catalog rebuild skipped (--extras): already built by the core pass.");
|
|
486
503
|
}
|
|
487
504
|
if (runCore && !dryRun) {
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
505
|
+
const cmd = cliSpawnArgs(home, "sync");
|
|
506
|
+
if (cmd) {
|
|
490
507
|
note("Building catalog (sync)");
|
|
491
|
-
const result = spawnSync(
|
|
508
|
+
const result = spawnSync(cmd[0], cmd.slice(1), {
|
|
492
509
|
encoding: "utf8",
|
|
493
510
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
494
511
|
});
|
|
@@ -503,7 +520,6 @@ async function main() {
|
|
|
503
520
|
ui.finishStep("skip", "extras deferred");
|
|
504
521
|
}
|
|
505
522
|
if (runExtras && !dryRun) {
|
|
506
|
-
const cli = join(home, "src", "cli.ts");
|
|
507
523
|
const config = readJson(join(home, "novahiz.config.json"), {});
|
|
508
524
|
// Installation automatique des dependances par defaut (2026-10-12):
|
|
509
525
|
// - providers.acceptes (ou config autoInstall, defaut true) -> tout part
|
|
@@ -518,7 +534,8 @@ async function main() {
|
|
|
518
534
|
? providersChoice
|
|
519
535
|
: Boolean(flags["install-providers"]) || config?.providers?.autoInstall !== false;
|
|
520
536
|
note("Checking dependencies");
|
|
521
|
-
const
|
|
537
|
+
const checkArgs = cliSpawnArgs(home, "deps");
|
|
538
|
+
const check = spawnSync(checkArgs[0], checkArgs.slice(1), {
|
|
522
539
|
encoding: "utf8",
|
|
523
540
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
524
541
|
});
|
|
@@ -532,7 +549,8 @@ async function main() {
|
|
|
532
549
|
note(autoInstall
|
|
533
550
|
? "Installing dependencies and providers (toolchain, MCP, skills, commands)"
|
|
534
551
|
: "Installing core system dependencies (toolchain: python, uv — npm health)");
|
|
535
|
-
const
|
|
552
|
+
const installArgs = cliSpawnArgs(home, ...args);
|
|
553
|
+
const result = spawnSync(installArgs[0], installArgs.slice(1), {
|
|
536
554
|
encoding: "utf8",
|
|
537
555
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
538
556
|
});
|
|
@@ -842,10 +860,10 @@ async function main() {
|
|
|
842
860
|
note("Skipped (--no-vault).");
|
|
843
861
|
ui.finishStep("skip");
|
|
844
862
|
} else {
|
|
845
|
-
const
|
|
846
|
-
if (
|
|
863
|
+
const vaultCmd = cliSpawnArgs(home, "second-memory", "init");
|
|
864
|
+
if (vaultCmd) {
|
|
847
865
|
note("Creating the second-memory vault (structure + Obsidian plugins, ~10 downloads)...");
|
|
848
|
-
const vault = spawnSync(
|
|
866
|
+
const vault = spawnSync(vaultCmd[0], vaultCmd.slice(1), {
|
|
849
867
|
encoding: "utf8",
|
|
850
868
|
timeout: 180000,
|
|
851
869
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
@@ -930,10 +948,10 @@ async function main() {
|
|
|
930
948
|
if (cleanup.removed.length > 0) {
|
|
931
949
|
// L'index tient encore la liste des skills supprimes : on le rejoue une
|
|
932
950
|
// fois, sinon le prochain routage classifiera vers un skill parti.
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
951
|
+
const cleanupCmd = cliSpawnArgs(home, "sync");
|
|
952
|
+
if (cleanupCmd) {
|
|
935
953
|
note("Rebuilding catalog after cleanup (sync)");
|
|
936
|
-
const rebuild = spawnSync(
|
|
954
|
+
const rebuild = spawnSync(cleanupCmd[0], cleanupCmd.slice(1), {
|
|
937
955
|
encoding: "utf8",
|
|
938
956
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
939
957
|
});
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -37,12 +37,21 @@ function homeDir(): string {
|
|
|
37
37
|
|
|
38
38
|
function runSync(): void {
|
|
39
39
|
const home = homeDir();
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
spawnSync(process.execPath, [
|
|
40
|
+
const cliJs = join(home, "dist", "cli.js");
|
|
41
|
+
const cliTs = join(home, "src", "cli.ts");
|
|
42
|
+
if (existsSync(cliJs)) {
|
|
43
|
+
// dist/cli.js est du JS compilé : Node le lit nativement, sur tous les
|
|
44
|
+
// builds (y compris ceux sans support TypeScript compilé).
|
|
45
|
+
spawnSync(process.execPath, [cliJs, "sync"], {
|
|
46
|
+
encoding: "utf8",
|
|
47
|
+
stdio: "inherit",
|
|
48
|
+
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
49
|
+
});
|
|
50
|
+
} else if (existsSync(cliTs)) {
|
|
51
|
+
// Fallback pour un home qui ne contient que les sources (pas de build).
|
|
52
|
+
// --experimental-strip-types ne fonctionne que sur les builds Node avec
|
|
53
|
+
// support TypeScript compilé ; sinon l'utilisateur verra une erreur claire.
|
|
54
|
+
spawnSync(process.execPath, ["--experimental-strip-types", cliTs, "sync"], {
|
|
46
55
|
encoding: "utf8",
|
|
47
56
|
stdio: "inherit",
|
|
48
57
|
env: { ...process.env, NOVAHIZ_HOME: home }
|