@delfini/cli 0.1.0 → 0.1.2

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.
@@ -264,8 +264,17 @@ var CLAUDE_MD_FILENAME = "CLAUDE.md";
264
264
  var SUPPORTED_TOOL = "CLAUDE";
265
265
  var TEMPLATES_DIR = resolveTemplatesDir();
266
266
  function resolveTemplatesDir() {
267
- const here = dirname(fileURLToPath(import.meta.url));
268
- return resolve(here, "..", "..", "templates");
267
+ let dir = dirname(fileURLToPath(import.meta.url));
268
+ for (let i = 0; i < 5; i++) {
269
+ const candidate = resolve(dir, "templates");
270
+ if (existsSync2(join2(candidate, "SKILL.md"))) {
271
+ return candidate;
272
+ }
273
+ const parent = dirname(dir);
274
+ if (parent === dir) break;
275
+ dir = parent;
276
+ }
277
+ throw new Error("templates/ directory not found relative to the CLI module");
269
278
  }
270
279
  async function runInstall(targetPath, options) {
271
280
  const tool = options?.tool ?? SUPPORTED_TOOL;
package/dist/cli.cjs CHANGED
@@ -2041,8 +2041,17 @@ var CLAUDE_MD_FILENAME = "CLAUDE.md";
2041
2041
  var SUPPORTED_TOOL = "CLAUDE";
2042
2042
  var TEMPLATES_DIR = resolveTemplatesDir();
2043
2043
  function resolveTemplatesDir() {
2044
- const here = (0, import_node_path2.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
2045
- return (0, import_node_path2.resolve)(here, "..", "..", "templates");
2044
+ let dir = (0, import_node_path2.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
2045
+ for (let i = 0; i < 5; i++) {
2046
+ const candidate = (0, import_node_path2.resolve)(dir, "templates");
2047
+ if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(candidate, "SKILL.md"))) {
2048
+ return candidate;
2049
+ }
2050
+ const parent = (0, import_node_path2.dirname)(dir);
2051
+ if (parent === dir) break;
2052
+ dir = parent;
2053
+ }
2054
+ throw new Error("templates/ directory not found relative to the CLI module");
2046
2055
  }
2047
2056
  async function runInstall(targetPath, options) {
2048
2057
  const tool = options?.tool ?? SUPPORTED_TOOL;
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  main
3
- } from "./chunk-PMVL53TT.js";
3
+ } from "./chunk-IDYMVTTU.js";
4
4
  import "./chunk-MUW24ZC4.js";
5
5
  export {
6
6
  main
package/dist/index.cjs CHANGED
@@ -7381,8 +7381,17 @@ var CLAUDE_MD_FILENAME = "CLAUDE.md";
7381
7381
  var SUPPORTED_TOOL = "CLAUDE";
7382
7382
  var TEMPLATES_DIR = resolveTemplatesDir();
7383
7383
  function resolveTemplatesDir() {
7384
- const here = (0, import_node_path3.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
7385
- return (0, import_node_path3.resolve)(here, "..", "..", "templates");
7384
+ let dir = (0, import_node_path3.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
7385
+ for (let i = 0; i < 5; i++) {
7386
+ const candidate = (0, import_node_path3.resolve)(dir, "templates");
7387
+ if ((0, import_node_fs3.existsSync)((0, import_node_path3.join)(candidate, "SKILL.md"))) {
7388
+ return candidate;
7389
+ }
7390
+ const parent = (0, import_node_path3.dirname)(dir);
7391
+ if (parent === dir) break;
7392
+ dir = parent;
7393
+ }
7394
+ throw new Error("templates/ directory not found relative to the CLI module");
7386
7395
  }
7387
7396
  async function runInstall(targetPath, options) {
7388
7397
  const tool = options?.tool ?? SUPPORTED_TOOL;
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  writeDocScope,
23
23
  writeRetryAttemptFile,
24
24
  writeTraceFile
25
- } from "./chunk-PMVL53TT.js";
25
+ } from "./chunk-IDYMVTTU.js";
26
26
  import {
27
27
  init_esm_shims
28
28
  } from "./chunk-MUW24ZC4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delfini/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,7 @@
26
26
  "simple-git": "^3.27.0",
27
27
  "tinyglobby": "^0.2.16",
28
28
  "zod": "^3.24.0",
29
- "@delfini/drift-engine": "0.1.0"
29
+ "@delfini/drift-engine": "0.2.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.10.2",