@iaforged/context-code 1.0.71 → 1.0.72
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/cli.js +8515 -0
- package/context-bootstrap.js +27 -27
- package/package.json +2 -2
package/context-bootstrap.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync } from 'fs'
|
|
3
|
-
import { homedir } from 'os'
|
|
4
|
-
import { dirname, join } from 'path'
|
|
5
|
-
import { fileURLToPath, pathToFileURL } from 'url'
|
|
6
|
-
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
-
|
|
9
|
-
if (!process.env.CLAUDE_CONFIG_DIR) {
|
|
10
|
-
process.env.CLAUDE_CONFIG_DIR = join(homedir(), '.context')
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Prefer the bundled CLI if it exists (production)
|
|
14
|
-
const bundledCli = join(__dirname, 'cli.js')
|
|
15
|
-
const distCli = join(__dirname, 'dist', 'src', 'entrypoints', 'cli.js')
|
|
16
|
-
|
|
17
|
-
if (existsSync(bundledCli)) {
|
|
18
|
-
await import(pathToFileURL(bundledCli).href)
|
|
19
|
-
} else if (existsSync(distCli)) {
|
|
20
|
-
await import(pathToFileURL(distCli).href)
|
|
21
|
-
} else {
|
|
22
|
-
// Ultimo recurso: intentar importacion relativa
|
|
23
|
-
try {
|
|
24
|
-
await import('./cli.js')
|
|
25
|
-
} catch (e) {
|
|
26
|
-
await import('./dist/src/entrypoints/cli.js')
|
|
27
|
-
}
|
|
28
|
-
}
|
|
2
|
+
import { existsSync } from 'fs'
|
|
3
|
+
import { homedir } from 'os'
|
|
4
|
+
import { dirname, join } from 'path'
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'url'
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
+
|
|
9
|
+
if (!process.env.CLAUDE_CONFIG_DIR) {
|
|
10
|
+
process.env.CLAUDE_CONFIG_DIR = join(homedir(), '.context')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Prefer the bundled CLI if it exists (production)
|
|
14
|
+
const bundledCli = join(__dirname, 'cli.js')
|
|
15
|
+
const distCli = join(__dirname, 'dist', 'src', 'entrypoints', 'cli.js')
|
|
16
|
+
|
|
17
|
+
if (existsSync(bundledCli)) {
|
|
18
|
+
await import(pathToFileURL(bundledCli).href)
|
|
19
|
+
} else if (existsSync(distCli)) {
|
|
20
|
+
await import(pathToFileURL(distCli).href)
|
|
21
|
+
} else {
|
|
22
|
+
// Ultimo recurso: intentar importacion relativa
|
|
23
|
+
try {
|
|
24
|
+
await import('./cli.js')
|
|
25
|
+
} catch (e) {
|
|
26
|
+
await import('./dist/src/entrypoints/cli.js')
|
|
27
|
+
}
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iaforged/context-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.72",
|
|
4
4
|
"description": "Context Code es un asistente de desarrollo para la terminal. Puede revisar tu proyecto, editar archivos, ejecutar comandos y apoyarte en tareas reales de programacion.",
|
|
5
5
|
"author": "Context AI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -137,6 +137,6 @@
|
|
|
137
137
|
"@whiskeysockets/baileys": "7.0.0-rc.9"
|
|
138
138
|
},
|
|
139
139
|
"scripts": {
|
|
140
|
-
"prepublishOnly": "node -
|
|
140
|
+
"prepublishOnly": "node ./scripts/preflight-check.mjs"
|
|
141
141
|
}
|
|
142
142
|
}
|