gaia-framework 1.53.0 → 1.53.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.
- package/README.md +2 -2
- package/bin/gaia-framework.js +32 -35
- package/gaia-install.sh +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GAIA — Generative Agile Intelligence Architecture
|
|
2
2
|
|
|
3
|
-
[]()
|
|
4
4
|
[]()
|
|
5
5
|
[]()
|
|
6
6
|
[]()
|
|
@@ -460,7 +460,7 @@ The single source of truth is `_gaia/_config/global.yaml`:
|
|
|
460
460
|
|
|
461
461
|
```yaml
|
|
462
462
|
framework_name: "GAIA"
|
|
463
|
-
framework_version: "1.
|
|
463
|
+
framework_version: "1.49.0"
|
|
464
464
|
user_name: "your-name"
|
|
465
465
|
project_name: "your-project"
|
|
466
466
|
```
|
package/bin/gaia-framework.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// Clones the GAIA repo, delegates to gaia-install.sh, and cleans up.
|
|
6
6
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
const { execSync, execFileSync } = require("child_process");
|
|
9
|
+
const { mkdtempSync, rmSync, existsSync } = require("fs");
|
|
10
|
+
const { join } = require("path");
|
|
11
|
+
const { tmpdir } = require("os");
|
|
12
12
|
|
|
13
13
|
const REPO_URL = "https://github.com/jlouage/Gaia-framework.git";
|
|
14
14
|
const SCRIPT_NAME = "gaia-install.sh";
|
|
@@ -18,24 +18,30 @@ let tempDir = null;
|
|
|
18
18
|
|
|
19
19
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
20
20
|
|
|
21
|
+
function toPosixPath(p) {
|
|
22
|
+
if (!IS_WINDOWS) return p;
|
|
23
|
+
// Convert C:\foo\bar to /c/foo/bar for Git Bash
|
|
24
|
+
return p.replace(/\\/g, "/").replace(/^([A-Za-z]):/, (_, letter) => "/" + letter.toLowerCase());
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
function findBash() {
|
|
22
28
|
if (!IS_WINDOWS) return "bash";
|
|
23
29
|
|
|
24
30
|
// Try bash in PATH first (WSL, Git Bash in PATH, etc.)
|
|
25
31
|
try {
|
|
26
|
-
|
|
32
|
+
execSync("bash --version", { stdio: "ignore" });
|
|
27
33
|
return "bash";
|
|
28
34
|
} catch {}
|
|
29
35
|
|
|
30
36
|
// Try Git for Windows default locations
|
|
31
37
|
const gitBashPaths = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
join(process.env.ProgramFiles || "C:\\Program Files", "Git", "bin", "bash.exe"),
|
|
39
|
+
join(process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)", "Git", "bin", "bash.exe"),
|
|
40
|
+
join(process.env.LOCALAPPDATA || "", "Programs", "Git", "bin", "bash.exe"),
|
|
35
41
|
];
|
|
36
42
|
|
|
37
43
|
for (const p of gitBashPaths) {
|
|
38
|
-
if (
|
|
44
|
+
if (existsSync(p)) return p;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
return null;
|
|
@@ -51,9 +57,9 @@ function info(message) {
|
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
function cleanup() {
|
|
54
|
-
if (tempDir &&
|
|
60
|
+
if (tempDir && existsSync(tempDir)) {
|
|
55
61
|
try {
|
|
56
|
-
|
|
62
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
57
63
|
} catch {
|
|
58
64
|
// Best-effort cleanup
|
|
59
65
|
}
|
|
@@ -62,7 +68,7 @@ function cleanup() {
|
|
|
62
68
|
|
|
63
69
|
function ensureGit() {
|
|
64
70
|
try {
|
|
65
|
-
|
|
71
|
+
execSync("git --version", { stdio: "ignore" });
|
|
66
72
|
} catch {
|
|
67
73
|
fail(
|
|
68
74
|
"git is required but was not found.\n" +
|
|
@@ -72,7 +78,8 @@ function ensureGit() {
|
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
function readPackageVersion(pkgPath) {
|
|
75
|
-
const
|
|
81
|
+
const { readFileSync } = require("fs");
|
|
82
|
+
const raw = readFileSync(pkgPath, "utf8");
|
|
76
83
|
const pkg = JSON.parse(raw);
|
|
77
84
|
if (!pkg.version) {
|
|
78
85
|
throw new Error(`No version field found in ${pkgPath}`);
|
|
@@ -110,15 +117,7 @@ Examples:
|
|
|
110
117
|
|
|
111
118
|
// ─── Main ───────────────────────────────────────────────────────────────────
|
|
112
119
|
|
|
113
|
-
function main(
|
|
114
|
-
// Dependency injection for testability — defaults to real modules
|
|
115
|
-
const _exec = deps && deps.execSync || childProcess.execSync;
|
|
116
|
-
const _execFile = deps && deps.execFileSync || childProcess.execFileSync;
|
|
117
|
-
const _mkdtemp = deps && deps.mkdtempSync || fs.mkdtempSync;
|
|
118
|
-
const _exists = deps && deps.existsSync || fs.existsSync;
|
|
119
|
-
const _join = deps && deps.join || path.join;
|
|
120
|
-
const _tmpdir = deps && deps.tmpdir || os.tmpdir;
|
|
121
|
-
|
|
120
|
+
function main() {
|
|
122
121
|
const args = process.argv.slice(2);
|
|
123
122
|
|
|
124
123
|
// Handle help / no args
|
|
@@ -144,7 +143,7 @@ function main(deps) {
|
|
|
144
143
|
ensureGit();
|
|
145
144
|
|
|
146
145
|
// Clone the repo to a temp directory
|
|
147
|
-
tempDir =
|
|
146
|
+
tempDir = mkdtempSync(join(tmpdir(), "gaia-framework-"));
|
|
148
147
|
|
|
149
148
|
// Register cleanup for all exit scenarios
|
|
150
149
|
process.on("exit", cleanup);
|
|
@@ -154,7 +153,7 @@ function main(deps) {
|
|
|
154
153
|
info("Cloning GAIA framework from GitHub...");
|
|
155
154
|
|
|
156
155
|
try {
|
|
157
|
-
|
|
156
|
+
execSync(`git clone --depth 1 ${REPO_URL} "${tempDir}"`, {
|
|
158
157
|
stdio: ["ignore", "ignore", "pipe"],
|
|
159
158
|
});
|
|
160
159
|
} catch (err) {
|
|
@@ -165,16 +164,16 @@ function main(deps) {
|
|
|
165
164
|
}
|
|
166
165
|
|
|
167
166
|
// Locate the installer script
|
|
168
|
-
const scriptPath =
|
|
169
|
-
if (!
|
|
167
|
+
const scriptPath = join(tempDir, SCRIPT_NAME);
|
|
168
|
+
if (!existsSync(scriptPath)) {
|
|
170
169
|
fail(`Installer script not found in cloned repo: ${SCRIPT_NAME}`);
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
// Build the shell command: inject --source pointing to the temp clone
|
|
174
173
|
// so the shell script doesn't need to clone again
|
|
175
174
|
const passthrough = args.slice(0);
|
|
176
|
-
// Insert --source right after the command
|
|
177
|
-
passthrough.splice(1, 0, "--source", tempDir);
|
|
175
|
+
// Insert --source right after the command (convert to POSIX for bash on Windows)
|
|
176
|
+
passthrough.splice(1, 0, "--source", toPosixPath(tempDir));
|
|
178
177
|
|
|
179
178
|
// Locate bash (critical for Windows support)
|
|
180
179
|
const bashPath = findBash();
|
|
@@ -189,17 +188,15 @@ function main(deps) {
|
|
|
189
188
|
info("Running installer...\n");
|
|
190
189
|
|
|
191
190
|
try {
|
|
192
|
-
|
|
191
|
+
// Convert all passthrough args that look like paths (contain backslash or drive letter)
|
|
192
|
+
const posixArgs = passthrough.map(a => IS_WINDOWS && /[\\:]/.test(a) && !a.startsWith("--") ? toPosixPath(a) : a);
|
|
193
|
+
execFileSync(bashPath, [toPosixPath(scriptPath), ...posixArgs], {
|
|
193
194
|
stdio: "inherit",
|
|
194
|
-
env: { ...process.env, GAIA_SOURCE: tempDir },
|
|
195
|
+
env: { ...process.env, GAIA_SOURCE: toPosixPath(tempDir) },
|
|
195
196
|
});
|
|
196
197
|
} catch (err) {
|
|
197
198
|
process.exit(err.status || 1);
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
201
|
|
|
201
|
-
|
|
202
|
-
main();
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
module.exports = { findBash, ensureGit, showUsage, fail, info, cleanup, readPackageVersion, main };
|
|
202
|
+
main();
|
package/gaia-install.sh
CHANGED
|
@@ -6,7 +6,7 @@ set -euo pipefail
|
|
|
6
6
|
# Installs, updates, validates, and reports on GAIA installations.
|
|
7
7
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
8
8
|
|
|
9
|
-
readonly VERSION="1.53.
|
|
9
|
+
readonly VERSION="1.53.1"
|
|
10
10
|
readonly GITHUB_REPO="https://github.com/jlouage/Gaia-framework.git"
|
|
11
11
|
readonly MANIFEST_REL="_gaia/_config/manifest.yaml"
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaia-framework",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.1",
|
|
4
4
|
"description": "GAIA — Generative Agile Intelligence Architecture installer",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gaia-framework": "./bin/gaia-framework.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "vitest run
|
|
9
|
+
"test": "vitest run",
|
|
10
10
|
"test:watch": "vitest",
|
|
11
11
|
"test:coverage": "vitest run --coverage",
|
|
12
12
|
"test:unit": "vitest run test/unit",
|