create-takt-sdd 0.2.1 → 0.3.1
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/generated/takt-ref.js +1 -1
- package/dist/install.js +12 -5
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated by scripts/embed-takt-ref.js — do not edit
|
|
2
|
-
export const TAKT_REF_HASH = "
|
|
2
|
+
export const TAKT_REF_HASH = "a89099e819af7b6982c520e7729b17e08de8246a";
|
package/dist/install.js
CHANGED
|
@@ -37,9 +37,6 @@ const SKILL_SYMLINK_TARGETS = [
|
|
|
37
37
|
".claude/skills",
|
|
38
38
|
".codex/skills",
|
|
39
39
|
];
|
|
40
|
-
const SDD_DEV_DEPENDENCIES = {
|
|
41
|
-
"takt": "^0.20.0",
|
|
42
|
-
};
|
|
43
40
|
const SDD_SCRIPTS = {
|
|
44
41
|
"sdd": "takt --pipeline --skip-git --create-worktree no -w sdd -t",
|
|
45
42
|
"sdd:requirements": "takt --pipeline --skip-git --create-worktree no -w sdd-requirements -t",
|
|
@@ -323,6 +320,16 @@ export async function install(options) {
|
|
|
323
320
|
info(msg.taktRefsSkipped);
|
|
324
321
|
}
|
|
325
322
|
}
|
|
323
|
+
// アーカイブの package.json から devDependencies を取得
|
|
324
|
+
const sddPkgPath = join(extractedDir, "package.json");
|
|
325
|
+
const sddDevDependencies = {};
|
|
326
|
+
if (existsSync(sddPkgPath)) {
|
|
327
|
+
const sddPkg = JSON.parse(readFileSync(sddPkgPath, "utf-8"));
|
|
328
|
+
const deps = sddPkg.devDependencies ?? {};
|
|
329
|
+
for (const [key, value] of Object.entries(deps)) {
|
|
330
|
+
sddDevDependencies[key] = value;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
326
333
|
// package.json に npm scripts と devDependencies を追加
|
|
327
334
|
const pkgPath = join(options.cwd, "package.json");
|
|
328
335
|
if (existsSync(pkgPath)) {
|
|
@@ -342,7 +349,7 @@ export async function install(options) {
|
|
|
342
349
|
pkg.scripts = scripts;
|
|
343
350
|
const devDeps = pkg.devDependencies ?? {};
|
|
344
351
|
const depsAdded = [];
|
|
345
|
-
for (const [key, value] of Object.entries(
|
|
352
|
+
for (const [key, value] of Object.entries(sddDevDependencies)) {
|
|
346
353
|
if (devDeps[key] === undefined) {
|
|
347
354
|
devDeps[key] = value;
|
|
348
355
|
depsAdded.push(key);
|
|
@@ -364,7 +371,7 @@ export async function install(options) {
|
|
|
364
371
|
const pkg = {
|
|
365
372
|
private: true,
|
|
366
373
|
scripts: { ...SDD_SCRIPTS },
|
|
367
|
-
devDependencies: { ...
|
|
374
|
+
devDependencies: { ...sddDevDependencies },
|
|
368
375
|
};
|
|
369
376
|
writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
|
|
370
377
|
info(msg.scriptsCreated);
|