arcanea 3.0.2 → 3.1.0
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/dist/cli/index.js +26 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -14
- package/dist/install.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2206,7 +2206,21 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
2206
2206
|
import { cpSync, existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
2207
2207
|
import { join, dirname } from "path";
|
|
2208
2208
|
import { fileURLToPath } from "url";
|
|
2209
|
-
|
|
2209
|
+
function findPackageRoot() {
|
|
2210
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
2211
|
+
for (let i = 0;i < 5; i++) {
|
|
2212
|
+
const pkgPath = join(dir, "package.json");
|
|
2213
|
+
if (existsSync(pkgPath)) {
|
|
2214
|
+
try {
|
|
2215
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
2216
|
+
if (pkg.name === "arcanea")
|
|
2217
|
+
return dir;
|
|
2218
|
+
} catch {}
|
|
2219
|
+
}
|
|
2220
|
+
dir = dirname(dir);
|
|
2221
|
+
}
|
|
2222
|
+
return dirname(dirname(fileURLToPath(import.meta.url)));
|
|
2223
|
+
}
|
|
2210
2224
|
function detectPlatforms() {
|
|
2211
2225
|
const detected = [];
|
|
2212
2226
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
@@ -2255,7 +2269,7 @@ async function install(targetDir, options = {}) {
|
|
|
2255
2269
|
`));
|
|
2256
2270
|
console.log(import_picocolors.default.dim(`Detected platforms: ${platforms.join(", ")}
|
|
2257
2271
|
`));
|
|
2258
|
-
const packageRoot =
|
|
2272
|
+
const packageRoot = findPackageRoot();
|
|
2259
2273
|
for (const platform of platforms) {
|
|
2260
2274
|
await installForPlatform(targetDir, packageRoot, platform, force);
|
|
2261
2275
|
}
|
|
@@ -2288,11 +2302,17 @@ async function installForPlatform(targetDir, packageRoot, platform, force) {
|
|
|
2288
2302
|
console.log(import_picocolors.default.green(` ✓ Installed ${dir}`));
|
|
2289
2303
|
}
|
|
2290
2304
|
}
|
|
2305
|
+
const claudeMdSource = join(packageRoot, "CLAUDE.md");
|
|
2306
|
+
if (existsSync(claudeMdSource)) {
|
|
2307
|
+
const claudeMdTarget = join(platformPath, "CLAUDE.md");
|
|
2308
|
+
if (!existsSync(claudeMdTarget) || force) {
|
|
2309
|
+
cpSync(claudeMdSource, claudeMdTarget);
|
|
2310
|
+
console.log(import_picocolors.default.green(` ✓ Installed CLAUDE.md (Arcanea identity)`));
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2291
2313
|
if (platform === "claude-code") {
|
|
2292
2314
|
await installClaudeCodeSettings(platformPath, force);
|
|
2293
|
-
} else if (platform === "opencode") {
|
|
2294
|
-
await installOpenCodeSettings(platformPath, packageRoot, force);
|
|
2295
|
-
}
|
|
2315
|
+
} else if (platform === "opencode") {}
|
|
2296
2316
|
}
|
|
2297
2317
|
async function installClaudeCodeSettings(platformPath, force) {
|
|
2298
2318
|
const settingsPath = join(platformPath, "settings.json");
|
|
@@ -2319,14 +2339,6 @@ async function installClaudeCodeSettings(platformPath, force) {
|
|
|
2319
2339
|
console.log(import_picocolors.default.green(" ✓ Created Claude Code settings with magic word hooks"));
|
|
2320
2340
|
}
|
|
2321
2341
|
}
|
|
2322
|
-
async function installOpenCodeSettings(platformPath, packageRoot, force) {
|
|
2323
|
-
const claudeMdPath = join(platformPath, "CLAUDE.md");
|
|
2324
|
-
const sourcePath = join(packageRoot, "CLAUDE.md");
|
|
2325
|
-
if (existsSync(sourcePath) && (!existsSync(claudeMdPath) || force)) {
|
|
2326
|
-
cpSync(sourcePath, claudeMdPath);
|
|
2327
|
-
console.log(import_picocolors.default.green(" ✓ Installed OpenCode CLAUDE.md"));
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
2342
|
async function installMcpConfig(targetDir, force) {
|
|
2331
2343
|
const mcpPath = join(targetDir, ".mcp.json");
|
|
2332
2344
|
console.log(import_picocolors.default.blue(`
|
|
@@ -2398,7 +2410,7 @@ function printSuccessMessage(platforms) {
|
|
|
2398
2410
|
}
|
|
2399
2411
|
|
|
2400
2412
|
// src/index.ts
|
|
2401
|
-
var VERSION = "3.0
|
|
2413
|
+
var VERSION = "3.1.0";
|
|
2402
2414
|
var NAME = "arcanea";
|
|
2403
2415
|
var ORCHESTRATOR = "Arcanea";
|
|
2404
2416
|
var defaultConfig = {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -91,7 +91,21 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
91
91
|
import { cpSync, existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
92
92
|
import { join, dirname } from "path";
|
|
93
93
|
import { fileURLToPath } from "url";
|
|
94
|
-
|
|
94
|
+
function findPackageRoot() {
|
|
95
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
96
|
+
for (let i = 0;i < 5; i++) {
|
|
97
|
+
const pkgPath = join(dir, "package.json");
|
|
98
|
+
if (existsSync(pkgPath)) {
|
|
99
|
+
try {
|
|
100
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
101
|
+
if (pkg.name === "arcanea")
|
|
102
|
+
return dir;
|
|
103
|
+
} catch {}
|
|
104
|
+
}
|
|
105
|
+
dir = dirname(dir);
|
|
106
|
+
}
|
|
107
|
+
return dirname(dirname(fileURLToPath(import.meta.url)));
|
|
108
|
+
}
|
|
95
109
|
function detectPlatforms() {
|
|
96
110
|
const detected = [];
|
|
97
111
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
@@ -140,7 +154,7 @@ async function install(targetDir, options = {}) {
|
|
|
140
154
|
`));
|
|
141
155
|
console.log(import_picocolors.default.dim(`Detected platforms: ${platforms.join(", ")}
|
|
142
156
|
`));
|
|
143
|
-
const packageRoot =
|
|
157
|
+
const packageRoot = findPackageRoot();
|
|
144
158
|
for (const platform of platforms) {
|
|
145
159
|
await installForPlatform(targetDir, packageRoot, platform, force);
|
|
146
160
|
}
|
|
@@ -173,11 +187,17 @@ async function installForPlatform(targetDir, packageRoot, platform, force) {
|
|
|
173
187
|
console.log(import_picocolors.default.green(` ✓ Installed ${dir}`));
|
|
174
188
|
}
|
|
175
189
|
}
|
|
190
|
+
const claudeMdSource = join(packageRoot, "CLAUDE.md");
|
|
191
|
+
if (existsSync(claudeMdSource)) {
|
|
192
|
+
const claudeMdTarget = join(platformPath, "CLAUDE.md");
|
|
193
|
+
if (!existsSync(claudeMdTarget) || force) {
|
|
194
|
+
cpSync(claudeMdSource, claudeMdTarget);
|
|
195
|
+
console.log(import_picocolors.default.green(` ✓ Installed CLAUDE.md (Arcanea identity)`));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
176
198
|
if (platform === "claude-code") {
|
|
177
199
|
await installClaudeCodeSettings(platformPath, force);
|
|
178
|
-
} else if (platform === "opencode") {
|
|
179
|
-
await installOpenCodeSettings(platformPath, packageRoot, force);
|
|
180
|
-
}
|
|
200
|
+
} else if (platform === "opencode") {}
|
|
181
201
|
}
|
|
182
202
|
async function installClaudeCodeSettings(platformPath, force) {
|
|
183
203
|
const settingsPath = join(platformPath, "settings.json");
|
|
@@ -204,14 +224,6 @@ async function installClaudeCodeSettings(platformPath, force) {
|
|
|
204
224
|
console.log(import_picocolors.default.green(" ✓ Created Claude Code settings with magic word hooks"));
|
|
205
225
|
}
|
|
206
226
|
}
|
|
207
|
-
async function installOpenCodeSettings(platformPath, packageRoot, force) {
|
|
208
|
-
const claudeMdPath = join(platformPath, "CLAUDE.md");
|
|
209
|
-
const sourcePath = join(packageRoot, "CLAUDE.md");
|
|
210
|
-
if (existsSync(sourcePath) && (!existsSync(claudeMdPath) || force)) {
|
|
211
|
-
cpSync(sourcePath, claudeMdPath);
|
|
212
|
-
console.log(import_picocolors.default.green(" ✓ Installed OpenCode CLAUDE.md"));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
227
|
async function installMcpConfig(targetDir, force) {
|
|
216
228
|
const mcpPath = join(targetDir, ".mcp.json");
|
|
217
229
|
console.log(import_picocolors.default.blue(`
|
|
@@ -283,7 +295,7 @@ function printSuccessMessage(platforms) {
|
|
|
283
295
|
}
|
|
284
296
|
|
|
285
297
|
// src/index.ts
|
|
286
|
-
var VERSION = "3.0
|
|
298
|
+
var VERSION = "3.1.0";
|
|
287
299
|
var NAME = "arcanea";
|
|
288
300
|
var ORCHESTRATOR = "Arcanea";
|
|
289
301
|
var defaultConfig = {
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwC,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwC,QAAQ,EAAE,MAAM,YAAY,CAAC;AAwB5E,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,QAAQ,EAAE,CAoC5C;AAsBD,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B5F"}
|