timsquad 2.0.0
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/LICENSE +21 -0
- package/README.md +347 -0
- package/bin/tsq.js +6 -0
- package/dist/commands/feedback.d.ts +3 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +142 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/full.d.ts +3 -0
- package/dist/commands/full.d.ts.map +1 -0
- package/dist/commands/full.js +87 -0
- package/dist/commands/full.js.map +1 -0
- package/dist/commands/git/commit.d.ts +3 -0
- package/dist/commands/git/commit.d.ts.map +1 -0
- package/dist/commands/git/commit.js +88 -0
- package/dist/commands/git/commit.js.map +1 -0
- package/dist/commands/git/index.d.ts +5 -0
- package/dist/commands/git/index.d.ts.map +1 -0
- package/dist/commands/git/index.js +5 -0
- package/dist/commands/git/index.js.map +1 -0
- package/dist/commands/git/pr.d.ts +3 -0
- package/dist/commands/git/pr.d.ts.map +1 -0
- package/dist/commands/git/pr.js +138 -0
- package/dist/commands/git/pr.js.map +1 -0
- package/dist/commands/git/release.d.ts +3 -0
- package/dist/commands/git/release.d.ts.map +1 -0
- package/dist/commands/git/release.js +158 -0
- package/dist/commands/git/release.js.map +1 -0
- package/dist/commands/git/sync.d.ts +3 -0
- package/dist/commands/git/sync.d.ts.map +1 -0
- package/dist/commands/git/sync.js +132 -0
- package/dist/commands/git/sync.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +150 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/log.d.ts +3 -0
- package/dist/commands/log.d.ts.map +1 -0
- package/dist/commands/log.js +271 -0
- package/dist/commands/log.js.map +1 -0
- package/dist/commands/metrics.d.ts +3 -0
- package/dist/commands/metrics.d.ts.map +1 -0
- package/dist/commands/metrics.js +299 -0
- package/dist/commands/metrics.js.map +1 -0
- package/dist/commands/quick.d.ts +3 -0
- package/dist/commands/quick.d.ts.map +1 -0
- package/dist/commands/quick.js +136 -0
- package/dist/commands/quick.js.map +1 -0
- package/dist/commands/retro.d.ts +3 -0
- package/dist/commands/retro.d.ts.map +1 -0
- package/dist/commands/retro.js +280 -0
- package/dist/commands/retro.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +127 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/watch.d.ts +3 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +213 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +34 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +108 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/project.d.ts +47 -0
- package/dist/lib/project.d.ts.map +1 -0
- package/dist/lib/project.js +191 -0
- package/dist/lib/project.js.map +1 -0
- package/dist/lib/template.d.ts +33 -0
- package/dist/lib/template.d.ts.map +1 -0
- package/dist/lib/template.js +151 -0
- package/dist/lib/template.js.map +1 -0
- package/dist/types/config.d.ts +75 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +66 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/feedback.d.ts +59 -0
- package/dist/types/feedback.d.ts.map +1 -0
- package/dist/types/feedback.js +26 -0
- package/dist/types/feedback.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/project.d.ts +89 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +44 -0
- package/dist/types/project.js.map +1 -0
- package/dist/utils/colors.d.ts +30 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/colors.js +54 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/date.d.ts +25 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +65 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/fs.d.ts +49 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +84 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/prompts.d.ts +31 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +95 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/yaml.d.ts +21 -0
- package/dist/utils/yaml.d.ts.map +1 -0
- package/dist/utils/yaml.js +40 -0
- package/dist/utils/yaml.js.map +1 -0
- package/package.json +71 -0
- package/templates/common/CLAUDE.md.template +254 -0
- package/templates/common/claude/agents/tsq-dba.md +290 -0
- package/templates/common/claude/agents/tsq-designer.md +304 -0
- package/templates/common/claude/agents/tsq-developer.md +118 -0
- package/templates/common/claude/agents/tsq-planner.md +90 -0
- package/templates/common/claude/agents/tsq-prompter.md +336 -0
- package/templates/common/claude/agents/tsq-qa.md +134 -0
- package/templates/common/claude/agents/tsq-retro.md +168 -0
- package/templates/common/claude/agents/tsq-security.md +190 -0
- package/templates/common/claude/skills/architecture/SKILL.md +123 -0
- package/templates/common/claude/skills/backend/node/SKILL.md +1015 -0
- package/templates/common/claude/skills/coding/SKILL.md +171 -0
- package/templates/common/claude/skills/database/prisma/SKILL.md +357 -0
- package/templates/common/claude/skills/frontend/nextjs/SKILL.md +279 -0
- package/templates/common/claude/skills/frontend/react/SKILL.md +1729 -0
- package/templates/common/claude/skills/methodology/bdd/SKILL.md +234 -0
- package/templates/common/claude/skills/methodology/ddd/SKILL.md +311 -0
- package/templates/common/claude/skills/methodology/tdd/SKILL.md +512 -0
- package/templates/common/claude/skills/planning/SKILL.md +90 -0
- package/templates/common/claude/skills/security/SKILL.md +234 -0
- package/templates/common/claude/skills/testing/SKILL.md +146 -0
- package/templates/common/claude/skills/typescript/SKILL.md +435 -0
- package/templates/common/config.template.yaml +131 -0
- package/templates/common/timsquad/architectures/clean/ARCHITECTURE.md +49 -0
- package/templates/common/timsquad/architectures/clean/backend.xml +210 -0
- package/templates/common/timsquad/architectures/clean/frontend.xml +148 -0
- package/templates/common/timsquad/architectures/fsd/ARCHITECTURE.md +67 -0
- package/templates/common/timsquad/architectures/fsd/frontend.xml +288 -0
- package/templates/common/timsquad/architectures/hexagonal/ARCHITECTURE.md +60 -0
- package/templates/common/timsquad/architectures/hexagonal/backend.xml +300 -0
- package/templates/common/timsquad/constraints/competency-framework.xml +501 -0
- package/templates/common/timsquad/constraints/ssot-schema.xml +433 -0
- package/templates/common/timsquad/feedback/feedback-router.sh +341 -0
- package/templates/common/timsquad/feedback/routing-rules.yaml +352 -0
- package/templates/common/timsquad/generators/data-design.xml +290 -0
- package/templates/common/timsquad/generators/prd.xml +280 -0
- package/templates/common/timsquad/generators/requirements.xml +220 -0
- package/templates/common/timsquad/generators/service-spec.xml +266 -0
- package/templates/common/timsquad/logs/_example.md +81 -0
- package/templates/common/timsquad/logs/_template.md +46 -0
- package/templates/common/timsquad/patterns/cqrs.xml +127 -0
- package/templates/common/timsquad/patterns/event-sourcing.xml +85 -0
- package/templates/common/timsquad/patterns/repository.xml +64 -0
- package/templates/common/timsquad/process/state-machine.xml +343 -0
- package/templates/common/timsquad/process/validation-rules.xml +308 -0
- package/templates/common/timsquad/process/workflow-base.xml +202 -0
- package/templates/common/timsquad/retrospective/cycle-report.template.md +205 -0
- package/templates/common/timsquad/retrospective/metrics/metrics-schema.json +203 -0
- package/templates/common/timsquad/retrospective/patterns/failure-patterns.md +199 -0
- package/templates/common/timsquad/retrospective/patterns/success-patterns.md +262 -0
- package/templates/common/timsquad/retrospective/retrospective-config.xml +294 -0
- package/templates/common/timsquad/retrospective/retrospective-state.xml +210 -0
- package/templates/common/timsquad/ssot/adr/ADR-000-template.md +121 -0
- package/templates/common/timsquad/ssot/adr/ADR-001-example.md +115 -0
- package/templates/common/timsquad/ssot/data-design.template.md +132 -0
- package/templates/common/timsquad/ssot/deployment-spec.template.md +384 -0
- package/templates/common/timsquad/ssot/env-config.template.md +346 -0
- package/templates/common/timsquad/ssot/error-codes.template.md +114 -0
- package/templates/common/timsquad/ssot/functional-spec.template.md +185 -0
- package/templates/common/timsquad/ssot/glossary.template.md +148 -0
- package/templates/common/timsquad/ssot/integration-spec.template.md +391 -0
- package/templates/common/timsquad/ssot/planning.template.md +94 -0
- package/templates/common/timsquad/ssot/prd.template.md +102 -0
- package/templates/common/timsquad/ssot/requirements.template.md +117 -0
- package/templates/common/timsquad/ssot/security-spec.template.md +309 -0
- package/templates/common/timsquad/ssot/service-spec.template.md +194 -0
- package/templates/common/timsquad/ssot/test-spec.template.md +264 -0
- package/templates/common/timsquad/ssot/ui-ux-spec.template.md +262 -0
- package/templates/common/timsquad/state/workspace.xml +217 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export const colors = {
|
|
3
|
+
// Status colors
|
|
4
|
+
success: chalk.green,
|
|
5
|
+
error: chalk.red,
|
|
6
|
+
warning: chalk.yellow,
|
|
7
|
+
info: chalk.blue,
|
|
8
|
+
dim: chalk.gray,
|
|
9
|
+
// Highlights
|
|
10
|
+
primary: chalk.cyan,
|
|
11
|
+
secondary: chalk.magenta,
|
|
12
|
+
highlight: chalk.cyan.bold,
|
|
13
|
+
// Text styles
|
|
14
|
+
bold: chalk.bold,
|
|
15
|
+
italic: chalk.italic,
|
|
16
|
+
underline: chalk.underline,
|
|
17
|
+
// Custom combinations
|
|
18
|
+
header: chalk.cyan.bold,
|
|
19
|
+
subheader: chalk.white.bold,
|
|
20
|
+
label: chalk.gray,
|
|
21
|
+
value: chalk.white,
|
|
22
|
+
path: chalk.cyan,
|
|
23
|
+
command: chalk.yellow,
|
|
24
|
+
agent: chalk.magenta,
|
|
25
|
+
phase: chalk.blue,
|
|
26
|
+
};
|
|
27
|
+
export function printHeader(text) {
|
|
28
|
+
console.log(colors.header(`\n ${text}\n`));
|
|
29
|
+
}
|
|
30
|
+
export function printSuccess(text) {
|
|
31
|
+
console.log(colors.success(`✓ ${text}`));
|
|
32
|
+
}
|
|
33
|
+
export function printError(text) {
|
|
34
|
+
console.log(colors.error(`✗ ${text}`));
|
|
35
|
+
}
|
|
36
|
+
export function printWarning(text) {
|
|
37
|
+
console.log(colors.warning(`⚠ ${text}`));
|
|
38
|
+
}
|
|
39
|
+
export function printInfo(text) {
|
|
40
|
+
console.log(colors.info(`ℹ ${text}`));
|
|
41
|
+
}
|
|
42
|
+
export function printStep(step, total, text) {
|
|
43
|
+
console.log(colors.dim(`[${step}/${total}]`) + ` ${text}`);
|
|
44
|
+
}
|
|
45
|
+
export function printKeyValue(key, value) {
|
|
46
|
+
console.log(` ${colors.label(key + ':')} ${colors.value(value)}`);
|
|
47
|
+
}
|
|
48
|
+
export function printTable(rows) {
|
|
49
|
+
const maxKeyLen = Math.max(...rows.map(([k]) => k.length));
|
|
50
|
+
rows.forEach(([key, value]) => {
|
|
51
|
+
console.log(` ${colors.label(key.padEnd(maxKeyLen))} ${colors.value(value)}`);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,gBAAgB;IAChB,OAAO,EAAE,KAAK,CAAC,KAAK;IACpB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,OAAO,EAAE,KAAK,CAAC,MAAM;IACrB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,GAAG,EAAE,KAAK,CAAC,IAAI;IAEf,aAAa;IACb,OAAO,EAAE,KAAK,CAAC,IAAI;IACnB,SAAS,EAAE,KAAK,CAAC,OAAO;IAC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,EAAE,KAAa,EAAE,IAAY;IACjE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,KAAa;IACtD,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAA6B;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get current date in YYYY-MM-DD format
|
|
3
|
+
*/
|
|
4
|
+
export declare function getDateString(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Get current timestamp in ISO format
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTimestamp(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Get current time in HH:MM format
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTimeString(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Format date for display
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDate(date: Date | string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Format date and time for display
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDateTime(date: Date | string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get relative time string (e.g., "2 hours ago")
|
|
23
|
+
*/
|
|
24
|
+
export declare function getRelativeTime(date: Date | string): string;
|
|
25
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAOtD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAS1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAa3D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get current date in YYYY-MM-DD format
|
|
3
|
+
*/
|
|
4
|
+
export function getDateString() {
|
|
5
|
+
const now = new Date();
|
|
6
|
+
return now.toISOString().split('T')[0];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get current timestamp in ISO format
|
|
10
|
+
*/
|
|
11
|
+
export function getTimestamp() {
|
|
12
|
+
return new Date().toISOString();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get current time in HH:MM format
|
|
16
|
+
*/
|
|
17
|
+
export function getTimeString() {
|
|
18
|
+
const now = new Date();
|
|
19
|
+
return now.toTimeString().slice(0, 5);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format date for display
|
|
23
|
+
*/
|
|
24
|
+
export function formatDate(date) {
|
|
25
|
+
const d = typeof date === 'string' ? new Date(date) : date;
|
|
26
|
+
return d.toLocaleDateString('ko-KR', {
|
|
27
|
+
year: 'numeric',
|
|
28
|
+
month: '2-digit',
|
|
29
|
+
day: '2-digit',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Format date and time for display
|
|
34
|
+
*/
|
|
35
|
+
export function formatDateTime(date) {
|
|
36
|
+
const d = typeof date === 'string' ? new Date(date) : date;
|
|
37
|
+
return d.toLocaleString('ko-KR', {
|
|
38
|
+
year: 'numeric',
|
|
39
|
+
month: '2-digit',
|
|
40
|
+
day: '2-digit',
|
|
41
|
+
hour: '2-digit',
|
|
42
|
+
minute: '2-digit',
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get relative time string (e.g., "2 hours ago")
|
|
47
|
+
*/
|
|
48
|
+
export function getRelativeTime(date) {
|
|
49
|
+
const d = typeof date === 'string' ? new Date(date) : date;
|
|
50
|
+
const now = new Date();
|
|
51
|
+
const diffMs = now.getTime() - d.getTime();
|
|
52
|
+
const diffMins = Math.floor(diffMs / 60000);
|
|
53
|
+
const diffHours = Math.floor(diffMins / 60);
|
|
54
|
+
const diffDays = Math.floor(diffHours / 24);
|
|
55
|
+
if (diffMins < 1)
|
|
56
|
+
return '방금 전';
|
|
57
|
+
if (diffMins < 60)
|
|
58
|
+
return `${diffMins}분 전`;
|
|
59
|
+
if (diffHours < 24)
|
|
60
|
+
return `${diffHours}시간 전`;
|
|
61
|
+
if (diffDays < 7)
|
|
62
|
+
return `${diffDays}일 전`;
|
|
63
|
+
return formatDate(d);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAA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KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC;IAE5C,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IAChC,IAAI,QAAQ,GAAG,EAAE;QAAE,OAAO,GAAG,QAAQ,KAAK,CAAC;IAC3C,IAAI,SAAS,GAAG,EAAE;QAAE,OAAO,GAAG,SAAS,MAAM,CAAC;IAC9C,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,GAAG,QAAQ,KAAK,CAAC;IAC1C,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a path exists
|
|
3
|
+
*/
|
|
4
|
+
export declare function exists(filePath: string): Promise<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Read a file as string
|
|
7
|
+
*/
|
|
8
|
+
export declare function readFile(filePath: string): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Write content to a file (creates directories if needed)
|
|
11
|
+
*/
|
|
12
|
+
export declare function writeFile(filePath: string, content: string): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Copy a file or directory
|
|
15
|
+
*/
|
|
16
|
+
export declare function copy(src: string, dest: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Create a directory (recursive)
|
|
19
|
+
*/
|
|
20
|
+
export declare function mkdir(dirPath: string): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Remove a file or directory
|
|
23
|
+
*/
|
|
24
|
+
export declare function remove(filePath: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* List files matching a pattern
|
|
27
|
+
*/
|
|
28
|
+
export declare function listFiles(pattern: string, cwd?: string): Promise<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Get file size in bytes
|
|
31
|
+
*/
|
|
32
|
+
export declare function getFileSize(filePath: string): Promise<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if file is empty or just a template (< 500 bytes)
|
|
35
|
+
*/
|
|
36
|
+
export declare function isFileFilled(filePath: string, threshold?: number): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Count lines in a file
|
|
39
|
+
*/
|
|
40
|
+
export declare function countLines(filePath: string): Promise<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Get the templates directory path
|
|
43
|
+
*/
|
|
44
|
+
export declare function getTemplatesDir(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Resolve path from project root
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolvePath(projectRoot: string, ...segments: string[]): string;
|
|
49
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhE;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhF;AAED;;GAEG;AACH,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGnE;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAEhF;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGnE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAItF;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAGxC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE9E"}
|
package/dist/utils/fs.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { glob } from 'glob';
|
|
4
|
+
/**
|
|
5
|
+
* Check if a path exists
|
|
6
|
+
*/
|
|
7
|
+
export async function exists(filePath) {
|
|
8
|
+
return fs.pathExists(filePath);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Read a file as string
|
|
12
|
+
*/
|
|
13
|
+
export async function readFile(filePath) {
|
|
14
|
+
return fs.readFile(filePath, 'utf-8');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Write content to a file (creates directories if needed)
|
|
18
|
+
*/
|
|
19
|
+
export async function writeFile(filePath, content) {
|
|
20
|
+
await fs.ensureDir(path.dirname(filePath));
|
|
21
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Copy a file or directory
|
|
25
|
+
*/
|
|
26
|
+
export async function copy(src, dest) {
|
|
27
|
+
await fs.ensureDir(path.dirname(dest));
|
|
28
|
+
await fs.copy(src, dest);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a directory (recursive)
|
|
32
|
+
*/
|
|
33
|
+
export async function mkdir(dirPath) {
|
|
34
|
+
await fs.ensureDir(dirPath);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Remove a file or directory
|
|
38
|
+
*/
|
|
39
|
+
export async function remove(filePath) {
|
|
40
|
+
await fs.remove(filePath);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* List files matching a pattern
|
|
44
|
+
*/
|
|
45
|
+
export async function listFiles(pattern, cwd) {
|
|
46
|
+
return glob(pattern, { cwd: cwd || process.cwd() });
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get file size in bytes
|
|
50
|
+
*/
|
|
51
|
+
export async function getFileSize(filePath) {
|
|
52
|
+
const stat = await fs.stat(filePath);
|
|
53
|
+
return stat.size;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if file is empty or just a template (< 500 bytes)
|
|
57
|
+
*/
|
|
58
|
+
export async function isFileFilled(filePath, threshold = 500) {
|
|
59
|
+
if (!await exists(filePath))
|
|
60
|
+
return false;
|
|
61
|
+
const size = await getFileSize(filePath);
|
|
62
|
+
return size > threshold;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Count lines in a file
|
|
66
|
+
*/
|
|
67
|
+
export async function countLines(filePath) {
|
|
68
|
+
const content = await readFile(filePath);
|
|
69
|
+
return content.split('\n').length;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get the templates directory path
|
|
73
|
+
*/
|
|
74
|
+
export function getTemplatesDir() {
|
|
75
|
+
// When installed globally or via npx, templates are relative to the package
|
|
76
|
+
return path.resolve(__dirname, '..', '..', 'templates');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Resolve path from project root
|
|
80
|
+
*/
|
|
81
|
+
export function resolvePath(projectRoot, ...segments) {
|
|
82
|
+
return path.join(projectRoot, ...segments);
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAgB;IAC3C,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,QAAgB,EAAE,OAAe;IAC/D,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3C,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,GAAW,EAAE,IAAY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AAC,CAAC,MAAM,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,4EAA4E;IAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB,EAAE,GAAG,QAAkB;IACpE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface SelectOption<T = string> {
|
|
2
|
+
name: string;
|
|
3
|
+
value: T;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Prompt for text input
|
|
8
|
+
*/
|
|
9
|
+
export declare function promptText(message: string, defaultValue?: string): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Prompt for confirmation (yes/no)
|
|
12
|
+
*/
|
|
13
|
+
export declare function promptConfirm(message: string, defaultValue?: boolean): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Prompt for selection from list
|
|
16
|
+
*/
|
|
17
|
+
export declare function promptSelect<T = string>(message: string, choices: SelectOption<T>[]): Promise<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Prompt for multiple selection
|
|
20
|
+
*/
|
|
21
|
+
export declare function promptMultiSelect<T = string>(message: string, choices: SelectOption<T>[]): Promise<T[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Prompt for password (hidden input)
|
|
24
|
+
*/
|
|
25
|
+
export declare function promptPassword(message: string): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Prompt for editor (opens $EDITOR)
|
|
28
|
+
*/
|
|
29
|
+
export declare function promptEditor(message: string, defaultValue?: string): Promise<string>;
|
|
30
|
+
export declare const promptInput: typeof promptText;
|
|
31
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,MAAM;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAUjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,YAAY,UAAQ,GACnB,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,MAAM,EAC3C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GACzB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAChD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GACzB,OAAO,CAAC,CAAC,EAAE,CAAC,CAad;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUrE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAUjB;AAGD,eAAO,MAAM,WAAW,mBAAa,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import { colors } from './colors.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prompt for text input
|
|
5
|
+
*/
|
|
6
|
+
export async function promptText(message, defaultValue) {
|
|
7
|
+
const { value } = await inquirer.prompt([
|
|
8
|
+
{
|
|
9
|
+
type: 'input',
|
|
10
|
+
name: 'value',
|
|
11
|
+
message,
|
|
12
|
+
default: defaultValue,
|
|
13
|
+
},
|
|
14
|
+
]);
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Prompt for confirmation (yes/no)
|
|
19
|
+
*/
|
|
20
|
+
export async function promptConfirm(message, defaultValue = false) {
|
|
21
|
+
const { value } = await inquirer.prompt([
|
|
22
|
+
{
|
|
23
|
+
type: 'confirm',
|
|
24
|
+
name: 'value',
|
|
25
|
+
message,
|
|
26
|
+
default: defaultValue,
|
|
27
|
+
},
|
|
28
|
+
]);
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Prompt for selection from list
|
|
33
|
+
*/
|
|
34
|
+
export async function promptSelect(message, choices) {
|
|
35
|
+
const { value } = await inquirer.prompt([
|
|
36
|
+
{
|
|
37
|
+
type: 'list',
|
|
38
|
+
name: 'value',
|
|
39
|
+
message,
|
|
40
|
+
choices: choices.map((c) => ({
|
|
41
|
+
name: c.description ? `${c.name} ${colors.dim(`- ${c.description}`)}` : c.name,
|
|
42
|
+
value: c.value,
|
|
43
|
+
})),
|
|
44
|
+
},
|
|
45
|
+
]);
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Prompt for multiple selection
|
|
50
|
+
*/
|
|
51
|
+
export async function promptMultiSelect(message, choices) {
|
|
52
|
+
const { value } = await inquirer.prompt([
|
|
53
|
+
{
|
|
54
|
+
type: 'checkbox',
|
|
55
|
+
name: 'value',
|
|
56
|
+
message,
|
|
57
|
+
choices: choices.map((c) => ({
|
|
58
|
+
name: c.description ? `${c.name} ${colors.dim(`- ${c.description}`)}` : c.name,
|
|
59
|
+
value: c.value,
|
|
60
|
+
})),
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Prompt for password (hidden input)
|
|
67
|
+
*/
|
|
68
|
+
export async function promptPassword(message) {
|
|
69
|
+
const { value } = await inquirer.prompt([
|
|
70
|
+
{
|
|
71
|
+
type: 'password',
|
|
72
|
+
name: 'value',
|
|
73
|
+
message,
|
|
74
|
+
mask: '*',
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Prompt for editor (opens $EDITOR)
|
|
81
|
+
*/
|
|
82
|
+
export async function promptEditor(message, defaultValue) {
|
|
83
|
+
const { value } = await inquirer.prompt([
|
|
84
|
+
{
|
|
85
|
+
type: 'editor',
|
|
86
|
+
name: 'value',
|
|
87
|
+
message,
|
|
88
|
+
default: defaultValue,
|
|
89
|
+
},
|
|
90
|
+
]);
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
// Alias for promptText
|
|
94
|
+
export const promptInput = promptText;
|
|
95
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQrC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAe,EACf,YAAqB;IAErB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACtC;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,OAAO;YACP,OAAO,EAAE,YAAY;SACtB;KACF,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,YAAY,GAAG,KAAK;IAEpB,MAAM,EAAE,KAAK,E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AAI;gBAC9E,KAAK,EAAE,CAAC,CAAC,KAAK;aACf,CAAC,CAAC;SACJ;KACF,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAe;IAClD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACtC;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO;YACb,OAAO;YACP,IAAI,EAAE,GAAG;SACV;KACF,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,YAAqB;IAErB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACtC;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,OAAO;YACP,OAAO,EAAE,YAAY;SACtB;KACF,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED,uBAAuB;AACvB,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse YAML string to object
|
|
3
|
+
*/
|
|
4
|
+
export declare function parseYaml<T = unknown>(content: string): T;
|
|
5
|
+
/**
|
|
6
|
+
* Stringify object to YAML
|
|
7
|
+
*/
|
|
8
|
+
export declare function stringifyYaml(data: unknown): string;
|
|
9
|
+
/**
|
|
10
|
+
* Load YAML file
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadYaml<T = unknown>(filePath: string): Promise<T>;
|
|
13
|
+
/**
|
|
14
|
+
* Save object to YAML file
|
|
15
|
+
*/
|
|
16
|
+
export declare function saveYaml(filePath: string, data: unknown): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Update specific fields in a YAML file
|
|
19
|
+
*/
|
|
20
|
+
export declare function updateYaml<T extends Record<string, unknown>>(filePath: string, updates: Partial<T>): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=yaml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../src/utils/yaml.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAEzD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAKnD;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAGxE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7E;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import YAML from 'yaml';
|
|
2
|
+
import { readFile, writeFile } from './fs.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parse YAML string to object
|
|
5
|
+
*/
|
|
6
|
+
export function parseYaml(content) {
|
|
7
|
+
return YAML.parse(content);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Stringify object to YAML
|
|
11
|
+
*/
|
|
12
|
+
export function stringifyYaml(data) {
|
|
13
|
+
return YAML.stringify(data, {
|
|
14
|
+
indent: 2,
|
|
15
|
+
lineWidth: 0, // Disable line wrapping
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Load YAML file
|
|
20
|
+
*/
|
|
21
|
+
export async function loadYaml(filePath) {
|
|
22
|
+
const content = await readFile(filePath);
|
|
23
|
+
return parseYaml(content);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Save object to YAML file
|
|
27
|
+
*/
|
|
28
|
+
export async function saveYaml(filePath, data) {
|
|
29
|
+
const content = stringifyYaml(data);
|
|
30
|
+
await writeFile(filePath, content);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Update specific fields in a YAML file
|
|
34
|
+
*/
|
|
35
|
+
export async function updateYaml(filePath, updates) {
|
|
36
|
+
const existing = await loadYaml(filePath);
|
|
37
|
+
const updated = { ...existing, ...updates };
|
|
38
|
+
await saveYaml(filePath, updated);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=yaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.js","sourceRoot":"","sources":["../../src/utils/yaml.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,SAAS,CAAc,OAAe;IACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAM,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QAC1B,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC,EAAE,wBAAwB;KACvC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAc,QAAgB;IAC1D,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,OAAO,SAAS,CAAI,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB,EAAE,IAAa;IAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,QAAgB,EAChB,OAAmB;IAEnB,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAI,QAAQ,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IAC5C,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "timsquad",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "AI Agent Development Process Framework - SSOT 기반 문서 체계, 최적화된 에이전트 롤, 회고적 학습",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"tsq": "./bin/tsq.js",
|
|
10
|
+
"timsquad": "./bin/tsq.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"dev": "tsc -w",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"test": "vitest",
|
|
17
|
+
"test:coverage": "vitest --coverage",
|
|
18
|
+
"lint": "eslint src --ext .ts",
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"ai",
|
|
24
|
+
"agent",
|
|
25
|
+
"claude",
|
|
26
|
+
"development",
|
|
27
|
+
"framework",
|
|
28
|
+
"ssot",
|
|
29
|
+
"timsquad",
|
|
30
|
+
"cli"
|
|
31
|
+
],
|
|
32
|
+
"author": "Eric",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/sonature-lab/timsquad.git"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/sonature-lab/timsquad#readme",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/sonature-lab/timsquad/issues"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"bin",
|
|
47
|
+
"dist",
|
|
48
|
+
"templates/common"
|
|
49
|
+
],
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"chalk": "^5.3.0",
|
|
52
|
+
"chokidar": "^3.6.0",
|
|
53
|
+
"commander": "^12.1.0",
|
|
54
|
+
"fs-extra": "^11.2.0",
|
|
55
|
+
"glob": "^10.4.5",
|
|
56
|
+
"inquirer": "^9.3.7",
|
|
57
|
+
"ora": "^8.1.1",
|
|
58
|
+
"simple-git": "^3.27.0",
|
|
59
|
+
"yaml": "^2.6.1"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/fs-extra": "^11.0.4",
|
|
63
|
+
"@types/inquirer": "^9.0.7",
|
|
64
|
+
"@types/node": "^22.10.5",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
66
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
67
|
+
"eslint": "^9.17.0",
|
|
68
|
+
"typescript": "^5.7.2",
|
|
69
|
+
"vitest": "^2.1.8"
|
|
70
|
+
}
|
|
71
|
+
}
|