gaia-framework 1.53.2 → 1.53.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/README.md +1 -1
- package/bin/gaia-framework.js +45 -12
- package/gaia-install.sh +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GAIA — Generative Agile Intelligence Architecture
|
|
2
2
|
|
|
3
|
-
[]()
|
|
4
4
|
[]()
|
|
5
5
|
[]()
|
|
6
6
|
[]()
|
package/bin/gaia-framework.js
CHANGED
|
@@ -15,25 +15,25 @@ const SCRIPT_NAME = "gaia-install.sh";
|
|
|
15
15
|
const IS_WINDOWS = process.platform === "win32";
|
|
16
16
|
|
|
17
17
|
let tempDir = null;
|
|
18
|
+
let bashType = "native"; // "native" (mac/linux), "gitbash", or "wsl"
|
|
18
19
|
|
|
19
20
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
20
21
|
|
|
21
22
|
function toPosixPath(p) {
|
|
22
23
|
if (!IS_WINDOWS) return p;
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
const forward = p.replace(/\\/g, "/");
|
|
25
|
+
if (bashType === "wsl") {
|
|
26
|
+
// WSL: C:\foo\bar → /mnt/c/foo/bar
|
|
27
|
+
return forward.replace(/^([A-Za-z]):/, (_, letter) => "/mnt/" + letter.toLowerCase());
|
|
28
|
+
}
|
|
29
|
+
// Git Bash: C:\foo\bar → /c/foo/bar
|
|
30
|
+
return forward.replace(/^([A-Za-z]):/, (_, letter) => "/" + letter.toLowerCase());
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
function findBash() {
|
|
28
34
|
if (!IS_WINDOWS) return "bash";
|
|
29
35
|
|
|
30
|
-
// Try
|
|
31
|
-
try {
|
|
32
|
-
execSync("bash --version", { stdio: "ignore" });
|
|
33
|
-
return "bash";
|
|
34
|
-
} catch {}
|
|
35
|
-
|
|
36
|
-
// Try Git for Windows default locations
|
|
36
|
+
// 1. Try Git for Windows FIRST (preferred — simpler path mapping)
|
|
37
37
|
const gitBashPaths = [
|
|
38
38
|
join(process.env.ProgramFiles || "C:\\Program Files", "Git", "bin", "bash.exe"),
|
|
39
39
|
join(process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)", "Git", "bin", "bash.exe"),
|
|
@@ -41,9 +41,35 @@ function findBash() {
|
|
|
41
41
|
];
|
|
42
42
|
|
|
43
43
|
for (const p of gitBashPaths) {
|
|
44
|
-
if (existsSync(p))
|
|
44
|
+
if (existsSync(p)) {
|
|
45
|
+
bashType = "gitbash";
|
|
46
|
+
return p;
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
|
|
50
|
+
// 2. Try bash in PATH — detect if it's WSL or Git Bash
|
|
51
|
+
try {
|
|
52
|
+
execSync("bash --version", { stdio: "ignore" });
|
|
53
|
+
// Detect WSL vs Git Bash by checking uname
|
|
54
|
+
try {
|
|
55
|
+
const uname = execSync('bash -c "uname -r"', { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
56
|
+
if (/microsoft|wsl/i.test(uname)) {
|
|
57
|
+
bashType = "wsl";
|
|
58
|
+
} else {
|
|
59
|
+
bashType = "gitbash";
|
|
60
|
+
}
|
|
61
|
+
} catch {
|
|
62
|
+
// Can't detect — try MSYSTEM env which Git Bash sets
|
|
63
|
+
try {
|
|
64
|
+
const msys = execSync('bash -c "echo $MSYSTEM"', { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
65
|
+
bashType = msys ? "gitbash" : "wsl";
|
|
66
|
+
} catch {
|
|
67
|
+
bashType = "wsl"; // Assume WSL if detection fails — safer path mapping
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return "bash";
|
|
71
|
+
} catch {}
|
|
72
|
+
|
|
47
73
|
return null;
|
|
48
74
|
}
|
|
49
75
|
|
|
@@ -145,8 +171,15 @@ function main() {
|
|
|
145
171
|
// Clone the repo to a temp directory
|
|
146
172
|
tempDir = mkdtempSync(join(tmpdir(), "gaia-framework-"));
|
|
147
173
|
// Resolve 8.3 short names to long paths on Windows (e.g., ELIASN~1 → Elias Nasser)
|
|
174
|
+
// Node's realpathSync doesn't expand 8.3 names, so use PowerShell
|
|
148
175
|
if (IS_WINDOWS) {
|
|
149
|
-
try {
|
|
176
|
+
try {
|
|
177
|
+
const longPath = execSync(
|
|
178
|
+
`powershell -NoProfile -Command "(Get-Item -LiteralPath '${tempDir}').FullName"`,
|
|
179
|
+
{ encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }
|
|
180
|
+
).trim();
|
|
181
|
+
if (longPath && existsSync(longPath)) tempDir = longPath;
|
|
182
|
+
} catch {}
|
|
150
183
|
}
|
|
151
184
|
|
|
152
185
|
// Register cleanup for all exit scenarios
|
|
@@ -198,7 +231,7 @@ function main() {
|
|
|
198
231
|
|
|
199
232
|
// Debug: on Windows, log the resolved paths if --verbose is passed
|
|
200
233
|
if (IS_WINDOWS && args.includes("--verbose")) {
|
|
201
|
-
info(`Bash: ${bashPath}`);
|
|
234
|
+
info(`Bash: ${bashPath} (${bashType})`);
|
|
202
235
|
info(`Script (Windows): ${scriptPath}`);
|
|
203
236
|
info(`Script (POSIX): ${posixScript}`);
|
|
204
237
|
info(`Temp dir: ${tempDir}`);
|
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.4"
|
|
10
10
|
readonly GITHUB_REPO="https://github.com/jlouage/Gaia-framework.git"
|
|
11
11
|
readonly MANIFEST_REL="_gaia/_config/manifest.yaml"
|
|
12
12
|
|