opcrew 0.1.7 → 0.1.8
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.js +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,10 @@ import process from "process";
|
|
|
6
6
|
|
|
7
7
|
// src/cli/install.ts
|
|
8
8
|
import { mkdir, writeFile, cp, rm, stat } from "fs/promises";
|
|
9
|
+
import { existsSync } from "fs";
|
|
9
10
|
import path2 from "path";
|
|
11
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
12
|
+
import { dirname } from "path";
|
|
10
13
|
// src/core/tools/translations.ts
|
|
11
14
|
var CLAUDE_TOOLS = {
|
|
12
15
|
read: "Read",
|
|
@@ -340,7 +343,10 @@ var OPENCODE_SKILLS_DIR = path2.join(".opencode", "skills");
|
|
|
340
343
|
var CODEX_FILE = path2.join(".codex", "instructions.md");
|
|
341
344
|
var OPCREW_DIR = ".opcrew";
|
|
342
345
|
var KNOWLEDGE_DIR = path2.join("docs", "knowledge");
|
|
343
|
-
var
|
|
346
|
+
var __dirname3 = dirname(fileURLToPath2(import.meta.url));
|
|
347
|
+
var builtTemplateDir = path2.join(__dirname3, "templates");
|
|
348
|
+
var sourceTemplateDir = path2.join(__dirname3, "..", "templates");
|
|
349
|
+
var TEMPLATE_DIR = existsSync(builtTemplateDir) ? builtTemplateDir : sourceTemplateDir;
|
|
344
350
|
async function ensureDir(targetDir) {
|
|
345
351
|
await mkdir(targetDir, { recursive: true });
|
|
346
352
|
}
|