prizmkit 1.1.5 → 1.1.6
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/bundled/VERSION.json +3 -3
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/src/scaffold.js +24 -12
package/bundled/VERSION.json
CHANGED
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -414,7 +414,17 @@ export async function installSettings(platform, projectRoot, options, dryRun) {
|
|
|
414
414
|
'Bash(jq *)',
|
|
415
415
|
];
|
|
416
416
|
if (options.pipeline) {
|
|
417
|
-
|
|
417
|
+
// 动态扫描 pipeline 目录中的 .sh 入口脚本(run-*、launch-*),自动添加执行权限
|
|
418
|
+
const pipelineDir = getPipelineDir();
|
|
419
|
+
try {
|
|
420
|
+
const pipelineEntries = await fs.readdir(pipelineDir);
|
|
421
|
+
const entryScripts = pipelineEntries.filter(f => /^(run-|launch-|retry-|reset-).*\.sh$/.test(f));
|
|
422
|
+
for (const script of entryScripts) {
|
|
423
|
+
permissions.push(`Bash(./dev-pipeline/${script} *)`);
|
|
424
|
+
}
|
|
425
|
+
} catch {
|
|
426
|
+
// Fallback: if readdir fails, add no pipeline permissions
|
|
427
|
+
}
|
|
418
428
|
}
|
|
419
429
|
|
|
420
430
|
const settings = {
|
|
@@ -600,11 +610,15 @@ export function resolvePipelineFileList() {
|
|
|
600
610
|
const pipelineSource = getPipelineDir();
|
|
601
611
|
if (!pipelineSource || !fs.pathExistsSync(pipelineSource)) return [];
|
|
602
612
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
613
|
+
// 动态扫描,与 installPipeline() 保持一致的排除规则
|
|
614
|
+
const EXCLUDE = new Set(['tests', 'docs', '__pycache__', 'node_modules', '.DS_Store']);
|
|
615
|
+
let allEntries;
|
|
616
|
+
try {
|
|
617
|
+
allEntries = fs.readdirSync(pipelineSource);
|
|
618
|
+
} catch {
|
|
619
|
+
return [];
|
|
620
|
+
}
|
|
621
|
+
const items = allEntries.filter(name => !EXCLUDE.has(name) && !name.startsWith('.'));
|
|
608
622
|
|
|
609
623
|
const files = [];
|
|
610
624
|
for (const item of items) {
|
|
@@ -636,12 +650,10 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
|
|
|
636
650
|
await fs.ensureDir(path.join(pipelineTarget, 'state'));
|
|
637
651
|
await fs.ensureDir(path.join(pipelineTarget, 'bugfix-state'));
|
|
638
652
|
|
|
639
|
-
//
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
'lib', 'scripts', 'templates', 'assets', 'README.md', '.gitignore',
|
|
644
|
-
];
|
|
653
|
+
// 动态扫描 bundled dev-pipeline 目录,排除不应安装到用户项目的内容
|
|
654
|
+
const EXCLUDE = new Set(['tests', 'docs', '__pycache__', 'node_modules', '.DS_Store']);
|
|
655
|
+
const allEntries = await fs.readdir(pipelineSource);
|
|
656
|
+
const items = allEntries.filter(name => !EXCLUDE.has(name) && !name.startsWith('.'));
|
|
645
657
|
|
|
646
658
|
let installedCount = 0;
|
|
647
659
|
const installedFiles = [];
|