novahiz 0.11.4 → 0.11.5
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 +6 -0
- package/README.md +1 -1
- package/dist/cli.js +16 -6
- package/install/install.mjs +28 -12
- package/package.json +1 -1
- package/src/cli.ts +15 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.5] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`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.
|
|
13
|
+
|
|
8
14
|
## [0.11.4] - 2026-10-22
|
|
9
15
|
|
|
10
16
|
### 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, {
|
|
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,7 @@ async function main() {
|
|
|
518
534
|
? providersChoice
|
|
519
535
|
: Boolean(flags["install-providers"]) || config?.providers?.autoInstall !== false;
|
|
520
536
|
note("Checking dependencies");
|
|
521
|
-
const check = spawnSync(
|
|
537
|
+
const check = spawnSync(...cliSpawnArgs(home, "deps"), {
|
|
522
538
|
encoding: "utf8",
|
|
523
539
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
524
540
|
});
|
|
@@ -532,7 +548,7 @@ async function main() {
|
|
|
532
548
|
note(autoInstall
|
|
533
549
|
? "Installing dependencies and providers (toolchain, MCP, skills, commands)"
|
|
534
550
|
: "Installing core system dependencies (toolchain: python, uv — npm health)");
|
|
535
|
-
const result = spawnSync(
|
|
551
|
+
const result = spawnSync(...cliSpawnArgs(home, ...args), {
|
|
536
552
|
encoding: "utf8",
|
|
537
553
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
538
554
|
});
|
|
@@ -842,10 +858,10 @@ async function main() {
|
|
|
842
858
|
note("Skipped (--no-vault).");
|
|
843
859
|
ui.finishStep("skip");
|
|
844
860
|
} else {
|
|
845
|
-
const
|
|
846
|
-
if (
|
|
861
|
+
const vaultCmd = cliSpawnArgs(home, "second-memory", "init");
|
|
862
|
+
if (vaultCmd) {
|
|
847
863
|
note("Creating the second-memory vault (structure + Obsidian plugins, ~10 downloads)...");
|
|
848
|
-
const vault = spawnSync(
|
|
864
|
+
const vault = spawnSync(...vaultCmd, {
|
|
849
865
|
encoding: "utf8",
|
|
850
866
|
timeout: 180000,
|
|
851
867
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
@@ -930,10 +946,10 @@ async function main() {
|
|
|
930
946
|
if (cleanup.removed.length > 0) {
|
|
931
947
|
// L'index tient encore la liste des skills supprimes : on le rejoue une
|
|
932
948
|
// fois, sinon le prochain routage classifiera vers un skill parti.
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
949
|
+
const cleanupCmd = cliSpawnArgs(home, "sync");
|
|
950
|
+
if (cleanupCmd) {
|
|
935
951
|
note("Rebuilding catalog after cleanup (sync)");
|
|
936
|
-
const rebuild = spawnSync(
|
|
952
|
+
const rebuild = spawnSync(...cleanupCmd, {
|
|
937
953
|
encoding: "utf8",
|
|
938
954
|
env: { ...process.env, NOVAHIZ_HOME: home }
|
|
939
955
|
});
|
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 }
|