pdd-skills 3.1.6 → 3.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/lib/init.js +42 -25
- package/package.json +1 -1
package/lib/init.js
CHANGED
|
@@ -27,37 +27,25 @@ const BASE_DIRS = [
|
|
|
27
27
|
|
|
28
28
|
const AI_TEST_DIRS = [
|
|
29
29
|
'tests',
|
|
30
|
-
'tests/testcase-ai.py',
|
|
31
|
-
'tests/login_manager.py',
|
|
32
|
-
'tests/.env.test',
|
|
33
|
-
'tests/README.md',
|
|
34
30
|
'testcases',
|
|
35
31
|
'testcases/examples',
|
|
36
|
-
'testcases/examples/yaml-format-guide.md',
|
|
37
|
-
'testcases/README.md',
|
|
38
32
|
'test-result'
|
|
39
33
|
];
|
|
40
34
|
|
|
35
|
+
const AI_TEST_SOURCE_FILES = [
|
|
36
|
+
'tests/testcase-ai.py',
|
|
37
|
+
'tests/login_manager.py',
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const AI_TEST_EXAMPLE_FILES = [
|
|
41
|
+
'testcases/examples/asset-eval-apply.yaml',
|
|
42
|
+
'testcases/examples/asset-eval-apply.env',
|
|
43
|
+
'testcases/examples/login-flow.yaml',
|
|
44
|
+
'testcases/examples/login-flow.env',
|
|
45
|
+
'testcases/examples/yaml-format-guide.md',
|
|
46
|
+
];
|
|
47
|
+
|
|
41
48
|
const AI_TEST_FILES = [
|
|
42
|
-
{ path: 'tests/testcase-ai.py', content: `#!/usr/bin/env python3
|
|
43
|
-
# -*- coding: utf-8 -*-
|
|
44
|
-
"""
|
|
45
|
-
AI Test Framework v2.0 - Main Entry Point
|
|
46
|
-
YAML-driven test execution engine with MCP browser automation.
|
|
47
|
-
Usage: python tests/testcase-ai.py testcases/<your-test>.yaml
|
|
48
|
-
"""
|
|
49
|
-
# This is a placeholder - copy from pdd-skills-v3/tests/testcase-ai.py
|
|
50
|
-
print("[AI Test Framework] Please copy testcase-ai.py and login_manager.py from source")
|
|
51
|
-
` },
|
|
52
|
-
{ path: 'tests/login_manager.py', content: `#!/usr/bin/env python3
|
|
53
|
-
# -*- coding: utf-8 -*-
|
|
54
|
-
"""
|
|
55
|
-
Login State Manager - Intelligent login detection and auto-switching.
|
|
56
|
-
Supports: state detection, user verification, auto-logout via dropdown menu.
|
|
57
|
-
"""
|
|
58
|
-
# This is a placeholder - copy from pdd-skills-v3/tests/login_manager.py
|
|
59
|
-
print("[LoginManager] Please copy from source project")
|
|
60
|
-
` },
|
|
61
49
|
{ path: 'tests/.env.test', content: `# ============================================================
|
|
62
50
|
# AI Test Framework - Environment Configuration
|
|
63
51
|
# ============================================================
|
|
@@ -510,6 +498,35 @@ export async function initProject(targetPath = '.', options = {}) {
|
|
|
510
498
|
console.log(chalk.gray(` [OK] ${file.path}`));
|
|
511
499
|
}
|
|
512
500
|
|
|
501
|
+
// Copy AI Test Framework source files (testcase-ai.py, login_manager.py)
|
|
502
|
+
const srcRoot = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..');
|
|
503
|
+
console.log(chalk.blue('\n>> Copying AI Test source files...\n'));
|
|
504
|
+
for (const rel of AI_TEST_SOURCE_FILES) {
|
|
505
|
+
const srcPath = path.join(srcRoot, 'tests', path.basename(rel));
|
|
506
|
+
const dstPath = path.join(absolutePath, rel);
|
|
507
|
+
if (fs.existsSync(srcPath)) {
|
|
508
|
+
await fs.ensureDir(path.dirname(dstPath));
|
|
509
|
+
await fs.copyFile(srcPath, dstPath);
|
|
510
|
+
console.log(chalk.gray(` [OK] ${rel}`));
|
|
511
|
+
} else {
|
|
512
|
+
console.log(chalk.yellow(` [SKIP] ${rel} (source not found at ${srcPath})`));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// Copy example test cases and env files
|
|
517
|
+
console.log(chalk.blue('\n>> Copying example test cases...\n'));
|
|
518
|
+
for (const rel of AI_TEST_EXAMPLE_FILES) {
|
|
519
|
+
const srcPath = path.join(srcRoot, rel);
|
|
520
|
+
const dstPath = path.join(absolutePath, rel);
|
|
521
|
+
if (fs.existsSync(srcPath)) {
|
|
522
|
+
await fs.ensureDir(path.dirname(dstPath));
|
|
523
|
+
await fs.copyFile(srcPath, dstPath);
|
|
524
|
+
console.log(chalk.gray(` [OK] ${rel}`));
|
|
525
|
+
} else {
|
|
526
|
+
console.log(chalk.yellow(` [SKIP] ${rel} (source not found)`));
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
513
530
|
await copyOpenspecConfig(absolutePath);
|
|
514
531
|
await copyPrdTemplate(absolutePath);
|
|
515
532
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"pdd-skills","version":"3.1.
|
|
1
|
+
{"name":"pdd-skills","version":"3.1.8","type":"module","description":"PDD Skills - PRD驱动开发框架 | 41+技能: 核心(12)/专家(8)/熵减(4)/OpenSpec(10)/PR管理(7) | AI原生开发工作流 | Bug模式库(14) | PRD规则(30) | 4级门控引擎","main":"index.js","bin":{"pdd":"./bin/pdd.js","pdd-skills":"./bin/pdd.js"},"files":["bin/","lib/","skills/","templates/","scaffolds/","scripts/","config/","hooks/","docs/","index.js"],"scripts":{"start":"node bin/pdd.js","list":"node bin/pdd.js list","lint":"node bin/pdd.js linter --type code prd sql activiti","generate":"node bin/pdd.js generate","verify":"node bin/pdd.js verify","report":"node bin/pdd.js report","config":"node bin/pdd.js config --list","api":"node bin/pdd.js api","api:dev":"node bin/pdd.js api -p 3000 --cors","init":"node bin/pdd.js init","update":"node bin/pdd.js update","cso":"node bin/pdd.js cso","eval":"node bin/pdd.js eval","token":"node bin/pdd.js token","i18n":"node bin/pdd.js i18n"},"keywords":["pdd","prd-driven-development","ai","claude","skills","tdd","code-generation","linter","api-server","cli"],"author":"PDD Team","license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"chalk":"^5.3.0","commander":"^12.0.0","fs-extra":"^11.2.0","yaml":"^2.3.0"}}
|