@eldrforge/kodrdriv 0.0.33 → 0.0.37
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/README.md +46 -69
- package/dist/application.js +146 -0
- package/dist/application.js.map +1 -0
- package/dist/arguments.js +22 -21
- package/dist/arguments.js.map +1 -1
- package/dist/commands/audio-commit.js +43 -21
- package/dist/commands/audio-commit.js.map +1 -1
- package/dist/commands/audio-review.js +46 -38
- package/dist/commands/audio-review.js.map +1 -1
- package/dist/commands/clean.js +28 -12
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/commit.js +132 -39
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/link.js +177 -159
- package/dist/commands/link.js.map +1 -1
- package/dist/commands/publish-tree.js +19 -6
- package/dist/commands/publish-tree.js.map +1 -1
- package/dist/commands/publish.js +152 -82
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/release.js +21 -16
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/review.js +286 -60
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/select-audio.js +25 -8
- package/dist/commands/select-audio.js.map +1 -1
- package/dist/commands/unlink.js +349 -159
- package/dist/commands/unlink.js.map +1 -1
- package/dist/constants.js +14 -5
- package/dist/constants.js.map +1 -1
- package/dist/content/diff.js +7 -5
- package/dist/content/diff.js.map +1 -1
- package/dist/content/log.js +4 -1
- package/dist/content/log.js.map +1 -1
- package/dist/error/CancellationError.js +9 -0
- package/dist/error/CancellationError.js.map +1 -0
- package/dist/error/CommandErrors.js +120 -0
- package/dist/error/CommandErrors.js.map +1 -0
- package/dist/logging.js +55 -12
- package/dist/logging.js.map +1 -1
- package/dist/main.js +6 -131
- package/dist/main.js.map +1 -1
- package/dist/prompt/commit.js +4 -0
- package/dist/prompt/commit.js.map +1 -1
- package/dist/prompt/instructions/commit.md +33 -24
- package/dist/prompt/instructions/release.md +39 -5
- package/dist/prompt/release.js +41 -1
- package/dist/prompt/release.js.map +1 -1
- package/dist/types.js +9 -2
- package/dist/types.js.map +1 -1
- package/dist/util/github.js +71 -4
- package/dist/util/github.js.map +1 -1
- package/dist/util/npmOptimizations.js +174 -0
- package/dist/util/npmOptimizations.js.map +1 -0
- package/dist/util/openai.js +4 -2
- package/dist/util/openai.js.map +1 -1
- package/dist/util/performance.js +202 -0
- package/dist/util/performance.js.map +1 -0
- package/dist/util/safety.js +166 -0
- package/dist/util/safety.js.map +1 -0
- package/dist/util/storage.js +10 -0
- package/dist/util/storage.js.map +1 -1
- package/dist/util/validation.js +81 -0
- package/dist/util/validation.js.map +1 -0
- package/package.json +19 -18
- package/packages/components/package.json +4 -0
- package/packages/tools/package.json +4 -0
- package/packages/utils/package.json +4 -0
- package/scripts/pre-commit-hook.sh +52 -0
- package/test-project/package.json +1 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for all command-related errors
|
|
3
|
+
*/ function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) {
|
|
5
|
+
Object.defineProperty(obj, key, {
|
|
6
|
+
value: value,
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true
|
|
10
|
+
});
|
|
11
|
+
} else {
|
|
12
|
+
obj[key] = value;
|
|
13
|
+
}
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
16
|
+
class CommandError extends Error {
|
|
17
|
+
constructor(message, code, recoverable = false, cause){
|
|
18
|
+
super(message), _define_property(this, "code", void 0), _define_property(this, "recoverable", void 0), _define_property(this, "cause", void 0), this.code = code, this.recoverable = recoverable, this.cause = cause;
|
|
19
|
+
this.name = 'CommandError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Validation errors (invalid arguments, missing required data, etc.)
|
|
24
|
+
*/ class ValidationError extends CommandError {
|
|
25
|
+
constructor(message, cause){
|
|
26
|
+
super(message, 'VALIDATION_ERROR', false, cause);
|
|
27
|
+
this.name = 'ValidationError';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* User cancellation errors (user cancelled operation)
|
|
32
|
+
*/ class UserCancellationError extends CommandError {
|
|
33
|
+
constructor(message = 'Operation cancelled by user'){
|
|
34
|
+
super(message, 'USER_CANCELLED', true);
|
|
35
|
+
this.name = 'UserCancellationError';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* External dependency errors (Git, NPM, file system, etc.)
|
|
40
|
+
*/ class ExternalDependencyError extends CommandError {
|
|
41
|
+
constructor(message, dependency, cause){
|
|
42
|
+
super(`${dependency}: ${message}`, 'EXTERNAL_DEPENDENCY_ERROR', false, cause);
|
|
43
|
+
this.name = 'ExternalDependencyError';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* File operation errors (read, write, permissions, etc.)
|
|
48
|
+
*/ class FileOperationError extends CommandError {
|
|
49
|
+
constructor(message, filePath, cause){
|
|
50
|
+
super(`File operation failed on ${filePath}: ${message}`, 'FILE_OPERATION_ERROR', false, cause);
|
|
51
|
+
this.name = 'FileOperationError';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Pull request check failures with detailed information
|
|
56
|
+
*/ class PullRequestCheckError extends CommandError {
|
|
57
|
+
/**
|
|
58
|
+
* Get specific instructions based on the type of failures
|
|
59
|
+
*/ getRecoveryInstructions() {
|
|
60
|
+
const instructions = [];
|
|
61
|
+
const branchName = this.currentBranch || 'your current branch';
|
|
62
|
+
// Analyze failure types for specific guidance
|
|
63
|
+
const testFailures = this.failedChecks.filter((check)=>{
|
|
64
|
+
var _check_output_title, _check_output;
|
|
65
|
+
return check.name.toLowerCase().includes('test') || check.name.toLowerCase().includes('ci') || ((_check_output = check.output) === null || _check_output === void 0 ? void 0 : (_check_output_title = _check_output.title) === null || _check_output_title === void 0 ? void 0 : _check_output_title.toLowerCase().includes('test'));
|
|
66
|
+
});
|
|
67
|
+
const lintFailures = this.failedChecks.filter((check)=>{
|
|
68
|
+
var _check_output_title, _check_output;
|
|
69
|
+
return check.name.toLowerCase().includes('lint') || check.name.toLowerCase().includes('style') || ((_check_output = check.output) === null || _check_output === void 0 ? void 0 : (_check_output_title = _check_output.title) === null || _check_output_title === void 0 ? void 0 : _check_output_title.toLowerCase().includes('lint'));
|
|
70
|
+
});
|
|
71
|
+
const buildFailures = this.failedChecks.filter((check)=>{
|
|
72
|
+
var _check_output_title, _check_output;
|
|
73
|
+
return check.name.toLowerCase().includes('build') || check.name.toLowerCase().includes('compile') || ((_check_output = check.output) === null || _check_output === void 0 ? void 0 : (_check_output_title = _check_output.title) === null || _check_output_title === void 0 ? void 0 : _check_output_title.toLowerCase().includes('build'));
|
|
74
|
+
});
|
|
75
|
+
instructions.push('🔧 To fix these failures:');
|
|
76
|
+
instructions.push('');
|
|
77
|
+
// Specific instructions based on failure types
|
|
78
|
+
if (testFailures.length > 0) {
|
|
79
|
+
instructions.push('📋 Test Failures:');
|
|
80
|
+
instructions.push(' • Run tests locally: `npm test` or `yarn test`');
|
|
81
|
+
instructions.push(' • Fix failing tests or update test expectations');
|
|
82
|
+
instructions.push(' • Consider running specific test files if identified in the failure details');
|
|
83
|
+
instructions.push('');
|
|
84
|
+
}
|
|
85
|
+
if (lintFailures.length > 0) {
|
|
86
|
+
instructions.push('🎨 Linting/Style Failures:');
|
|
87
|
+
instructions.push(' • Run linter locally: `npm run lint` or `yarn lint`');
|
|
88
|
+
instructions.push(' • Auto-fix where possible: `npm run lint:fix` or `yarn lint:fix`');
|
|
89
|
+
instructions.push(' • Check code formatting: `npm run format` or `yarn format`');
|
|
90
|
+
instructions.push('');
|
|
91
|
+
}
|
|
92
|
+
if (buildFailures.length > 0) {
|
|
93
|
+
instructions.push('🏗️ Build Failures:');
|
|
94
|
+
instructions.push(' • Run build locally: `npm run build` or `yarn build`');
|
|
95
|
+
instructions.push(' • Check for TypeScript errors: `npx tsc --noEmit`');
|
|
96
|
+
instructions.push(' • Review dependency issues and import paths');
|
|
97
|
+
instructions.push('');
|
|
98
|
+
}
|
|
99
|
+
// General workflow instructions
|
|
100
|
+
instructions.push('📤 After fixing the issues:');
|
|
101
|
+
instructions.push(` 1. Stage your changes: \`git add .\``);
|
|
102
|
+
instructions.push(` 2. Commit your fixes: \`git commit -m "fix: resolve PR check failures"\``);
|
|
103
|
+
instructions.push(` 3. Push to ${branchName}: \`git push origin ${branchName}\``);
|
|
104
|
+
instructions.push(` 4. The PR checks will automatically re-run`);
|
|
105
|
+
instructions.push('');
|
|
106
|
+
instructions.push('🔄 Re-running this command:');
|
|
107
|
+
instructions.push(' • The kodrdriv publish command will automatically detect the existing PR');
|
|
108
|
+
instructions.push(' • Simply run the same command again after pushing your fixes');
|
|
109
|
+
instructions.push(' • You can also manually trigger checks by pushing an empty commit:');
|
|
110
|
+
instructions.push(` \`git commit --allow-empty -m "trigger checks" && git push origin ${branchName}\``);
|
|
111
|
+
return instructions;
|
|
112
|
+
}
|
|
113
|
+
constructor(message, prNumber, failedChecks, prUrl, currentBranch){
|
|
114
|
+
super(message, 'PR_CHECK_FAILED', true), _define_property(this, "prNumber", void 0), _define_property(this, "failedChecks", void 0), _define_property(this, "prUrl", void 0), _define_property(this, "currentBranch", void 0), this.prNumber = prNumber, this.failedChecks = failedChecks, this.prUrl = prUrl, this.currentBranch = currentBranch;
|
|
115
|
+
this.name = 'PullRequestCheckError';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { CommandError, ExternalDependencyError, FileOperationError, PullRequestCheckError, UserCancellationError, ValidationError };
|
|
120
|
+
//# sourceMappingURL=CommandErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandErrors.js","sources":["../../src/error/CommandErrors.ts"],"sourcesContent":["/**\n * Base class for all command-related errors\n */\nexport class CommandError extends Error {\n constructor(\n message: string,\n public readonly code: string,\n public readonly recoverable: boolean = false,\n public readonly cause?: Error\n ) {\n super(message);\n this.name = 'CommandError';\n }\n}\n\n/**\n * Configuration-related errors (missing config, invalid settings, etc.)\n */\nexport class ConfigurationError extends CommandError {\n constructor(message: string, cause?: Error) {\n super(message, 'CONFIG_ERROR', false, cause);\n this.name = 'ConfigurationError';\n }\n}\n\n/**\n * Validation errors (invalid arguments, missing required data, etc.)\n */\nexport class ValidationError extends CommandError {\n constructor(message: string, cause?: Error) {\n super(message, 'VALIDATION_ERROR', false, cause);\n this.name = 'ValidationError';\n }\n}\n\n/**\n * User cancellation errors (user cancelled operation)\n */\nexport class UserCancellationError extends CommandError {\n constructor(message: string = 'Operation cancelled by user') {\n super(message, 'USER_CANCELLED', true);\n this.name = 'UserCancellationError';\n }\n}\n\n/**\n * External dependency errors (Git, NPM, file system, etc.)\n */\nexport class ExternalDependencyError extends CommandError {\n constructor(message: string, dependency: string, cause?: Error) {\n super(`${dependency}: ${message}`, 'EXTERNAL_DEPENDENCY_ERROR', false, cause);\n this.name = 'ExternalDependencyError';\n }\n}\n\n/**\n * File operation errors (read, write, permissions, etc.)\n */\nexport class FileOperationError extends CommandError {\n constructor(message: string, filePath: string, cause?: Error) {\n super(`File operation failed on ${filePath}: ${message}`, 'FILE_OPERATION_ERROR', false, cause);\n this.name = 'FileOperationError';\n }\n}\n\n/**\n * Pull request check failures with detailed information\n */\nexport class PullRequestCheckError extends CommandError {\n constructor(\n message: string,\n public readonly prNumber: number,\n public readonly failedChecks: Array<{\n name: string;\n conclusion: string;\n detailsUrl?: string;\n summary?: string;\n output?: {\n title?: string;\n summary?: string;\n text?: string;\n };\n }>,\n public readonly prUrl: string,\n public readonly currentBranch?: string\n ) {\n super(message, 'PR_CHECK_FAILED', true);\n this.name = 'PullRequestCheckError';\n }\n\n /**\n * Get specific instructions based on the type of failures\n */\n getRecoveryInstructions(): string[] {\n const instructions: string[] = [];\n const branchName = this.currentBranch || 'your current branch';\n\n // Analyze failure types for specific guidance\n const testFailures = this.failedChecks.filter(check =>\n check.name.toLowerCase().includes('test') ||\n check.name.toLowerCase().includes('ci') ||\n check.output?.title?.toLowerCase().includes('test')\n );\n\n const lintFailures = this.failedChecks.filter(check =>\n check.name.toLowerCase().includes('lint') ||\n check.name.toLowerCase().includes('style') ||\n check.output?.title?.toLowerCase().includes('lint')\n );\n\n const buildFailures = this.failedChecks.filter(check =>\n check.name.toLowerCase().includes('build') ||\n check.name.toLowerCase().includes('compile') ||\n check.output?.title?.toLowerCase().includes('build')\n );\n\n instructions.push('🔧 To fix these failures:');\n instructions.push('');\n\n // Specific instructions based on failure types\n if (testFailures.length > 0) {\n instructions.push('📋 Test Failures:');\n instructions.push(' • Run tests locally: `npm test` or `yarn test`');\n instructions.push(' • Fix failing tests or update test expectations');\n instructions.push(' • Consider running specific test files if identified in the failure details');\n instructions.push('');\n }\n\n if (lintFailures.length > 0) {\n instructions.push('🎨 Linting/Style Failures:');\n instructions.push(' • Run linter locally: `npm run lint` or `yarn lint`');\n instructions.push(' • Auto-fix where possible: `npm run lint:fix` or `yarn lint:fix`');\n instructions.push(' • Check code formatting: `npm run format` or `yarn format`');\n instructions.push('');\n }\n\n if (buildFailures.length > 0) {\n instructions.push('🏗️ Build Failures:');\n instructions.push(' • Run build locally: `npm run build` or `yarn build`');\n instructions.push(' • Check for TypeScript errors: `npx tsc --noEmit`');\n instructions.push(' • Review dependency issues and import paths');\n instructions.push('');\n }\n\n // General workflow instructions\n instructions.push('📤 After fixing the issues:');\n instructions.push(` 1. Stage your changes: \\`git add .\\``);\n instructions.push(` 2. Commit your fixes: \\`git commit -m \"fix: resolve PR check failures\"\\``);\n instructions.push(` 3. Push to ${branchName}: \\`git push origin ${branchName}\\``);\n instructions.push(` 4. The PR checks will automatically re-run`);\n instructions.push('');\n\n instructions.push('🔄 Re-running this command:');\n instructions.push(' • The kodrdriv publish command will automatically detect the existing PR');\n instructions.push(' • Simply run the same command again after pushing your fixes');\n instructions.push(' • You can also manually trigger checks by pushing an empty commit:');\n instructions.push(` \\`git commit --allow-empty -m \"trigger checks\" && git push origin ${branchName}\\``);\n\n return instructions;\n }\n}\n"],"names":["CommandError","Error","message","code","recoverable","cause","name","ValidationError","UserCancellationError","ExternalDependencyError","dependency","FileOperationError","filePath","PullRequestCheckError","getRecoveryInstructions","instructions","branchName","currentBranch","testFailures","failedChecks","filter","check","toLowerCase","includes","output","title","lintFailures","buildFailures","push","length","prNumber","prUrl"],"mappings":"AAAA;;AAEC,IAAA,SAAA,gBAAA,CAAA,GAAA,EAAA,GAAA,EAAA,KAAA,EAAA;;;;;;;;;;;;;AACM,MAAMA,YAAAA,SAAqBC,KAAAA,CAAAA;IAC9B,WAAA,CACIC,OAAe,EACCC,IAAY,EAC5B,WAAgBC,GAAuB,KAAK,EAC5C,KAA6B,CAC/B;AACE,QAAA,KAAK,CAACF,OAAAA,CAAAA,EAAAA,gBAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EAAAA,gBAAAA,CAAAA,IAAAA,EAAAA,aAAAA,EAAAA,MAAAA,CAAAA,EAAAA,gBAAAA,CAAAA,IAAAA,EAAAA,OAAAA,EAAAA,MAAAA,CAAAA,EAAAA,IAAAA,CAJUC,IAAAA,GAAAA,IAAAA,EAAAA,IAAAA,CACAC,WAAAA,GAAAA,kBACAC,KAAAA,GAAAA,KAAAA;QAGhB,IAAI,CAACC,IAAI,GAAG,cAAA;AAChB,IAAA;AACJ;AAYA;;IAGO,MAAMC,eAAAA,SAAwBP,YAAAA,CAAAA;IACjC,WAAA,CAAYE,OAAe,EAAEG,KAAa,CAAE;QACxC,KAAK,CAACH,OAAAA,EAAS,kBAAA,EAAoB,KAAA,EAAOG,KAAAA,CAAAA;QAC1C,IAAI,CAACC,IAAI,GAAG,iBAAA;AAChB,IAAA;AACJ;AAEA;;IAGO,MAAME,qBAAAA,SAA8BR,YAAAA,CAAAA;IACvC,WAAA,CAAYE,OAAAA,GAAkB,6BAA6B,CAAE;QACzD,KAAK,CAACA,SAAS,gBAAA,EAAkB,IAAA,CAAA;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AAAA,IAAAA,CACAd,aAAAA,GAAAA,aAAAA;QAGhB,IAAI,CAACX,IAAI,GAAG,uBAAA;AAChB,IAAA;AAwEJ;;;;"}
|
package/dist/logging.js
CHANGED
|
@@ -28,21 +28,24 @@ const createTransports = (level)=>{
|
|
|
28
28
|
// Always add console transport for info level and above
|
|
29
29
|
if (level === 'info') {
|
|
30
30
|
transports.push(new winston.transports.Console({
|
|
31
|
-
format: winston.format.combine(winston.format.colorize(), winston.format.printf(({ level, message })=>{
|
|
32
|
-
|
|
31
|
+
format: winston.format.combine(winston.format.colorize(), winston.format.printf(({ level, message, dryRun })=>{
|
|
32
|
+
const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';
|
|
33
|
+
return `${level}: ${dryRunPrefix}${String(message)}`;
|
|
33
34
|
}))
|
|
34
35
|
}));
|
|
35
36
|
} else {
|
|
36
37
|
// For debug/verbose levels, add console transport that shows info and above
|
|
37
38
|
transports.push(new winston.transports.Console({
|
|
38
39
|
level: 'info',
|
|
39
|
-
format: winston.format.combine(winston.format.colorize(), winston.format.printf(({ timestamp, level, message, ...meta })=>{
|
|
40
|
+
format: winston.format.combine(winston.format.colorize(), winston.format.printf(({ timestamp, level, message, dryRun, ...meta })=>{
|
|
40
41
|
// For info level messages, use simpler format without timestamp
|
|
41
42
|
if (level.includes('info')) {
|
|
42
|
-
|
|
43
|
+
const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';
|
|
44
|
+
return `${dryRunPrefix}${String(message)}`;
|
|
43
45
|
}
|
|
44
46
|
const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';
|
|
45
|
-
|
|
47
|
+
const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';
|
|
48
|
+
return `${timestamp} ${level}: ${dryRunPrefix}${String(message)}${metaStr}`;
|
|
46
49
|
}))
|
|
47
50
|
}));
|
|
48
51
|
// Add file transport for debug levels (debug and silly)
|
|
@@ -66,16 +69,28 @@ const createTransports = (level)=>{
|
|
|
66
69
|
return transports;
|
|
67
70
|
};
|
|
68
71
|
const createFormat = (level)=>{
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
const baseFormats = [
|
|
73
|
+
winston.format.errors({
|
|
71
74
|
stack: true
|
|
72
|
-
}),
|
|
75
|
+
}),
|
|
76
|
+
winston.format.splat()
|
|
77
|
+
];
|
|
78
|
+
if (level === 'info') {
|
|
79
|
+
return winston.format.combine(...baseFormats, winston.format.printf(({ message, dryRun, ..._meta })=>{
|
|
80
|
+
// Auto-format dry-run messages
|
|
81
|
+
if (dryRun) {
|
|
82
|
+
return `🔍 DRY RUN: ${message}`;
|
|
83
|
+
}
|
|
84
|
+
return String(message);
|
|
85
|
+
}));
|
|
73
86
|
}
|
|
74
87
|
return winston.format.combine(winston.format.timestamp({
|
|
75
88
|
format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS
|
|
76
|
-
}), winston.format.
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
}), ...baseFormats, winston.format.printf(({ timestamp, level, message, dryRun, ...meta })=>{
|
|
90
|
+
const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';
|
|
91
|
+
const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';
|
|
92
|
+
return `${timestamp} ${level}: ${dryRunPrefix}${String(message)}${metaStr}`;
|
|
93
|
+
}));
|
|
79
94
|
};
|
|
80
95
|
// Create the logger instance once
|
|
81
96
|
const logger = winston.createLogger({
|
|
@@ -98,6 +113,34 @@ const setLogLevel = (level)=>{
|
|
|
98
113
|
});
|
|
99
114
|
};
|
|
100
115
|
const getLogger = ()=>logger;
|
|
116
|
+
/**
|
|
117
|
+
* Get a logger that automatically formats messages for dry-run mode
|
|
118
|
+
*/ const getDryRunLogger = (isDryRun)=>{
|
|
119
|
+
if (!isDryRun) {
|
|
120
|
+
return logger;
|
|
121
|
+
}
|
|
122
|
+
// Return a wrapper that adds dry-run context to all log calls
|
|
123
|
+
return {
|
|
124
|
+
info: (message, ...args)=>logger.info(message, {
|
|
125
|
+
dryRun: true
|
|
126
|
+
}, ...args),
|
|
127
|
+
warn: (message, ...args)=>logger.warn(message, {
|
|
128
|
+
dryRun: true
|
|
129
|
+
}, ...args),
|
|
130
|
+
error: (message, ...args)=>logger.error(message, {
|
|
131
|
+
dryRun: true
|
|
132
|
+
}, ...args),
|
|
133
|
+
debug: (message, ...args)=>logger.debug(message, {
|
|
134
|
+
dryRun: true
|
|
135
|
+
}, ...args),
|
|
136
|
+
verbose: (message, ...args)=>logger.verbose(message, {
|
|
137
|
+
dryRun: true
|
|
138
|
+
}, ...args),
|
|
139
|
+
silly: (message, ...args)=>logger.silly(message, {
|
|
140
|
+
dryRun: true
|
|
141
|
+
}, ...args)
|
|
142
|
+
};
|
|
143
|
+
};
|
|
101
144
|
|
|
102
|
-
export { getLogger, setLogLevel };
|
|
145
|
+
export { getDryRunLogger, getLogger, setLogLevel };
|
|
103
146
|
//# sourceMappingURL=logging.js.map
|
package/dist/logging.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.js","sources":["../src/logging.ts"],"sourcesContent":["import winston from 'winston';\n// eslint-disable-next-line no-restricted-imports\nimport * as fs from 'fs';\nimport path from 'path';\nimport { DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS, PROGRAM_NAME, DEFAULT_OUTPUT_DIRECTORY } from './constants';\n\nexport interface LogContext {\n [key: string]: any;\n}\n\n// Track if debug directory has been ensured for this session\nlet debugDirectoryEnsured = false;\n\nconst ensureDebugDirectory = () => {\n if (debugDirectoryEnsured) return;\n\n const debugDir = path.join(DEFAULT_OUTPUT_DIRECTORY, 'debug');\n\n try {\n fs.mkdirSync(debugDir, { recursive: true });\n debugDirectoryEnsured = true;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Failed to create debug directory ${debugDir}:`, error);\n }\n};\n\nconst generateDebugLogFilename = () => {\n const now = new Date();\n const timestamp = now.toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\./g, '')\n .replace('T', '-')\n .replace('Z', '');\n\n return `${timestamp}-debug.log`;\n};\n\nconst createTransports = (level: string) => {\n const transports: winston.transport[] = [];\n\n // Always add console transport for info level and above\n if (level === 'info') {\n transports.push(\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ level, message }) => {\n return `${level}: ${message}`;\n })\n )\n })\n );\n } else {\n // For debug/verbose levels, add console transport that shows info and above\n transports.push(\n new winston.transports.Console({\n level: 'info', // Show info, warn, and error on console\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level, message, ...meta }): string => {\n // For info level messages, use simpler format without timestamp\n if (level.includes('info')) {\n return String(message);\n }\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n return `${timestamp} ${level}: ${String(message)}${metaStr}`;\n })\n )\n })\n );\n\n // Add file transport for debug levels (debug and silly)\n if (level === 'debug' || level === 'silly') {\n ensureDebugDirectory();\n\n const debugLogPath = path.join(DEFAULT_OUTPUT_DIRECTORY, 'debug', generateDebugLogFilename());\n\n transports.push(\n new winston.transports.File({\n filename: debugLogPath,\n level: 'debug', // Capture debug and above in the file\n format: winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS }),\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n winston.format.printf(({ timestamp, level, message, ...meta }) => {\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n return `${timestamp} ${level}: ${message}${metaStr}`;\n })\n )\n })\n );\n }\n }\n\n return transports;\n};\n\nconst createFormat = (level: string) => {\n if (level === 'info') {\n return winston.format.combine(\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n );\n }\n\n return winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS }),\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n winston.format.json()\n );\n};\n\n// Create the logger instance once\nconst logger = winston.createLogger({\n level: 'info',\n format: createFormat('info'),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports('info'),\n});\n\nexport const setLogLevel = (level: string) => {\n // Reconfigure the existing logger instead of creating a new one\n logger.configure({\n level,\n format: createFormat(level),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports(level),\n });\n};\n\nexport const getLogger = () => logger; "],"names":["debugDirectoryEnsured","ensureDebugDirectory","debugDir","path","join","DEFAULT_OUTPUT_DIRECTORY","fs","mkdirSync","recursive","error","console","generateDebugLogFilename","now","Date","timestamp","toISOString","replace","createTransports","level","transports","push","winston","Console","format","combine","colorize","printf","message","meta","includes","String","metaStr","Object","keys","length","JSON","stringify","debugLogPath","File","filename","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS","errors","stack","splat","createFormat","json","logger","createLogger","defaultMeta","service","PROGRAM_NAME","setLogLevel","configure","getLogger"],"mappings":";;;;;AAUA;AACA,IAAIA,qBAAAA,GAAwB,KAAA;AAE5B,MAAMC,oBAAAA,GAAuB,IAAA;AACzB,IAAA,IAAID,qBAAAA,EAAuB;AAE3B,IAAA,MAAME,QAAAA,GAAWC,IAAAA,CAAKC,IAAI,CAACC,wBAAAA,EAA0B,OAAA,CAAA;IAErD,IAAI;QACAC,EAAAA,CAAGC,SAAS,CAACL,QAAAA,EAAU;YAAEM,SAAAA,EAAW;AAAK,SAAA,CAAA;QACzCR,qBAAAA,GAAwB,IAAA;AAC5B,IAAA,CAAA,CAAE,OAAOS,KAAAA,EAAO;;QAEZC,OAAAA,CAAQD,KAAK,CAAC,CAAC,iCAAiC,EAAEP,QAAAA,CAAS,CAAC,CAAC,EAAEO,KAAAA,CAAAA;AACnE,IAAA;AACJ,CAAA;AAEA,MAAME,wBAAAA,GAA2B,IAAA;AAC7B,IAAA,MAAMC,MAAM,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AAa;YAAEC,OAAAA,EAASC;AAAa,SAAA;AACrC/B,QAAAA,UAAAA,EAAYF,gBAAAA,CAAiBC,KAAAA;AACjC,KAAA,CAAA;AACJ;AAEO,MAAMmC,SAAAA,GAAY,IAAMP;;;;"}
|
|
1
|
+
{"version":3,"file":"logging.js","sources":["../src/logging.ts"],"sourcesContent":["import winston from 'winston';\n// eslint-disable-next-line no-restricted-imports\nimport * as fs from 'fs';\nimport path from 'path';\nimport { DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS, PROGRAM_NAME, DEFAULT_OUTPUT_DIRECTORY } from './constants';\n\nexport interface LogContext {\n [key: string]: any;\n}\n\n// Track if debug directory has been ensured for this session\nlet debugDirectoryEnsured = false;\n\nconst ensureDebugDirectory = () => {\n if (debugDirectoryEnsured) return;\n\n const debugDir = path.join(DEFAULT_OUTPUT_DIRECTORY, 'debug');\n\n try {\n fs.mkdirSync(debugDir, { recursive: true });\n debugDirectoryEnsured = true;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Failed to create debug directory ${debugDir}:`, error);\n }\n};\n\nconst generateDebugLogFilename = () => {\n const now = new Date();\n const timestamp = now.toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\./g, '')\n .replace('T', '-')\n .replace('Z', '');\n\n return `${timestamp}-debug.log`;\n};\n\nconst createTransports = (level: string) => {\n const transports: winston.transport[] = [];\n\n // Always add console transport for info level and above\n if (level === 'info') {\n transports.push(\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ level, message, dryRun }): string => {\n const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';\n return `${level}: ${dryRunPrefix}${String(message)}`;\n })\n )\n })\n );\n } else {\n // For debug/verbose levels, add console transport that shows info and above\n transports.push(\n new winston.transports.Console({\n level: 'info', // Show info, warn, and error on console\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level, message, dryRun, ...meta }): string => {\n // For info level messages, use simpler format without timestamp\n if (level.includes('info')) {\n const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';\n return `${dryRunPrefix}${String(message)}`;\n }\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';\n return `${timestamp} ${level}: ${dryRunPrefix}${String(message)}${metaStr}`;\n })\n )\n })\n );\n\n // Add file transport for debug levels (debug and silly)\n if (level === 'debug' || level === 'silly') {\n ensureDebugDirectory();\n\n const debugLogPath = path.join(DEFAULT_OUTPUT_DIRECTORY, 'debug', generateDebugLogFilename());\n\n transports.push(\n new winston.transports.File({\n filename: debugLogPath,\n level: 'debug', // Capture debug and above in the file\n format: winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS }),\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n winston.format.printf(({ timestamp, level, message, ...meta }) => {\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n return `${timestamp} ${level}: ${message}${metaStr}`;\n })\n )\n })\n );\n }\n }\n\n return transports;\n};\n\nconst createFormat = (level: string) => {\n const baseFormats = [\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n ];\n\n if (level === 'info') {\n return winston.format.combine(\n ...baseFormats,\n winston.format.printf(({ message, dryRun, ..._meta }): string => {\n // Auto-format dry-run messages\n if (dryRun) {\n return `🔍 DRY RUN: ${message}`;\n }\n return String(message);\n })\n );\n }\n\n return winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS }),\n ...baseFormats,\n winston.format.printf(({ timestamp, level, message, dryRun, ...meta }): string => {\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n const dryRunPrefix = dryRun ? '🔍 DRY RUN: ' : '';\n return `${timestamp} ${level}: ${dryRunPrefix}${String(message)}${metaStr}`;\n })\n );\n};\n\n// Create the logger instance once\nconst logger = winston.createLogger({\n level: 'info',\n format: createFormat('info'),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports('info'),\n});\n\nexport const setLogLevel = (level: string) => {\n // Reconfigure the existing logger instead of creating a new one\n logger.configure({\n level,\n format: createFormat(level),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports(level),\n });\n};\n\nexport const getLogger = () => logger;\n\n/**\n * Get a logger that automatically formats messages for dry-run mode\n */\nexport const getDryRunLogger = (isDryRun: boolean) => {\n if (!isDryRun) {\n return logger;\n }\n\n // Return a wrapper that adds dry-run context to all log calls\n return {\n info: (message: string, ...args: any[]) => logger.info(message, { dryRun: true }, ...args),\n warn: (message: string, ...args: any[]) => logger.warn(message, { dryRun: true }, ...args),\n error: (message: string, ...args: any[]) => logger.error(message, { dryRun: true }, ...args),\n debug: (message: string, ...args: any[]) => logger.debug(message, { dryRun: true }, ...args),\n verbose: (message: string, ...args: any[]) => logger.verbose(message, { dryRun: true }, ...args),\n silly: (message: string, ...args: any[]) => logger.silly(message, { dryRun: true }, ...args),\n };\n};\n"],"names":["debugDirectoryEnsured","ensureDebugDirectory","debugDir","path","join","DEFAULT_OUTPUT_DIRECTORY","fs","mkdirSync","recursive","error","console","generateDebugLogFilename","now","Date","timestamp","toISOString","replace","createTransports","level","transports","push","winston","Console","format","combine","colorize","printf","message","dryRun","dryRunPrefix","String","meta","includes","metaStr","Object","keys","length","JSON","stringify","debugLogPath","File","filename","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS","errors","stack","splat","createFormat","baseFormats","_meta","logger","createLogger","defaultMeta","service","PROGRAM_NAME","setLogLevel","configure","getLogger","getDryRunLogger","isDryRun","info","args","warn","debug","verbose","silly"],"mappings":";;;;;AAUA;AACA,IAAIA,qBAAAA,GAAwB,KAAA;AAE5B,MAAMC,oBAAAA,GAAuB,IAAA;AACzB,IAAA,IAAID,qBAAAA,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AAA,EAAiB,GAAGiC,OAAgBX,MAAAA,CAAOc,OAAO,CAACpC,OAAAA,EAAS;gBAAEC,MAAAA,EAAQ;aAAK,EAAA,GAAMgC,IAAAA,CAAAA;AAC3FI,QAAAA,KAAAA,EAAO,CAACrC,OAAAA,EAAiB,GAAGiC,OAAgBX,MAAAA,CAAOe,KAAK,CAACrC,OAAAA,EAAS;gBAAEC,MAAAA,EAAQ;aAAK,EAAA,GAAMgC,IAAAA;AAC3F,KAAA;AACJ;;;;"}
|
package/dist/main.js
CHANGED
|
@@ -1,137 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import '
|
|
4
|
-
import { configure } from './arguments.js';
|
|
5
|
-
import { execute as execute$1 } from './commands/audio-commit.js';
|
|
6
|
-
import { execute as execute$7 } from './commands/audio-review.js';
|
|
7
|
-
import { execute as execute$8 } from './commands/clean.js';
|
|
8
|
-
import { execute } from './commands/commit.js';
|
|
9
|
-
import { execute as execute$5 } from './commands/link.js';
|
|
10
|
-
import { execute as execute$3 } from './commands/publish.js';
|
|
11
|
-
import { execute as execute$4 } from './commands/publish-tree.js';
|
|
12
|
-
import { execute as execute$2 } from './commands/release.js';
|
|
13
|
-
import { execute as execute$9 } from './commands/review.js';
|
|
14
|
-
import { execute as execute$a } from './commands/select-audio.js';
|
|
15
|
-
import { execute as execute$6 } from './commands/unlink.js';
|
|
16
|
-
import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_AUDIO_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_PUBLISH_TREE, COMMAND_LINK, COMMAND_UNLINK, COMMAND_AUDIO_REVIEW, COMMAND_CLEAN, COMMAND_REVIEW, COMMAND_SELECT_AUDIO } from './constants.js';
|
|
17
|
-
import { getLogger, setLogLevel } from './logging.js';
|
|
18
|
-
import { ConfigSchema } from './types.js';
|
|
2
|
+
import { runApplication } from './application.js';
|
|
3
|
+
import { getLogger } from './logging.js';
|
|
19
4
|
|
|
20
5
|
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
* Hey we need this because we need to be able to debug CardiganTime.
|
|
24
|
-
* This method checks for --verbose and --debug flags early in the process
|
|
25
|
-
* before CardiganTime is configured, allowing us to capture debug output
|
|
26
|
-
* from the CardiganTime initialization itself.
|
|
27
|
-
*/ function configureEarlyLogging() {
|
|
28
|
-
const hasVerbose = process.argv.includes('--verbose');
|
|
29
|
-
const hasDebug = process.argv.includes('--debug');
|
|
30
|
-
// Set log level based on early flag detection
|
|
31
|
-
if (hasDebug) {
|
|
32
|
-
setLogLevel('debug');
|
|
33
|
-
} else if (hasVerbose) {
|
|
34
|
-
setLogLevel('verbose');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
async function main() {
|
|
38
|
-
// Configure logging early, before CardiganTime initialization
|
|
39
|
-
configureEarlyLogging();
|
|
40
|
-
// Cast create to `any` to avoid excessive type instantiation issues in TS compiler
|
|
41
|
-
const createCardigantime = Cardigantime.create;
|
|
42
|
-
const cardigantime = createCardigantime({
|
|
43
|
-
defaults: {
|
|
44
|
-
configDirectory: DEFAULT_CONFIG_DIR,
|
|
45
|
-
// Move pathResolution INSIDE defaults
|
|
46
|
-
pathResolution: {
|
|
47
|
-
resolvePathArray: [
|
|
48
|
-
'contextDirectories'
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
// Use fieldOverlaps instead of mergeStrategy, INSIDE defaults
|
|
52
|
-
fieldOverlaps: {
|
|
53
|
-
'contextDirectories': 'prepend'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
features: [
|
|
57
|
-
'config',
|
|
58
|
-
'hierarchical'
|
|
59
|
-
],
|
|
60
|
-
configShape: ConfigSchema.shape,
|
|
61
|
-
logger: getLogger()
|
|
62
|
-
}); // No need for 'as any' at the end
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
64
|
-
const [runConfig, secureConfig, commandConfig] = await configure(cardigantime); // Pass cardigantime instance
|
|
65
|
-
// Set log level based on verbose flag
|
|
66
|
-
if (runConfig.verbose) {
|
|
67
|
-
setLogLevel('verbose');
|
|
68
|
-
}
|
|
69
|
-
if (runConfig.debug) {
|
|
70
|
-
setLogLevel('debug');
|
|
71
|
-
}
|
|
72
|
-
const logger = getLogger();
|
|
73
|
-
cardigantime.setLogger(logger);
|
|
6
|
+
* Main entry point - minimal wrapper around the application logic
|
|
7
|
+
*/ async function main() {
|
|
74
8
|
try {
|
|
75
|
-
|
|
76
|
-
if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {
|
|
77
|
-
// CardiganTime's checkConfig has already been called in Arguments.configure()
|
|
78
|
-
// No additional processing needed here
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
// Handle init-config command
|
|
82
|
-
if (commandConfig.commandName === COMMAND_INIT_CONFIG) {
|
|
83
|
-
// CardiganTime's initConfig has already been called in Arguments.configure()
|
|
84
|
-
// No additional processing needed here
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
// Get the command from Commander
|
|
88
|
-
const command = process.argv[2];
|
|
89
|
-
let commandName = commandConfig.commandName;
|
|
90
|
-
// If we have a specific command argument, use that
|
|
91
|
-
if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'publish-tree' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean' || command === 'review' || command === 'select-audio') {
|
|
92
|
-
commandName = command;
|
|
93
|
-
}
|
|
94
|
-
let summary = '';
|
|
95
|
-
if (commandName === COMMAND_COMMIT) {
|
|
96
|
-
summary = await execute(runConfig);
|
|
97
|
-
} else if (commandName === COMMAND_AUDIO_COMMIT) {
|
|
98
|
-
summary = await execute$1(runConfig);
|
|
99
|
-
} else if (commandName === COMMAND_RELEASE) {
|
|
100
|
-
const releaseSummary = await execute$2(runConfig);
|
|
101
|
-
summary = `${releaseSummary.title}\n\n${releaseSummary.body}`;
|
|
102
|
-
} else if (commandName === COMMAND_PUBLISH) {
|
|
103
|
-
await execute$3(runConfig);
|
|
104
|
-
} else if (commandName === COMMAND_PUBLISH_TREE) {
|
|
105
|
-
var _runConfig_audioReview, _runConfig_publishTree, _runConfig_publishTree1;
|
|
106
|
-
// Handle publishTree directory mapping from command-specific arguments
|
|
107
|
-
if (((_runConfig_audioReview = runConfig.audioReview) === null || _runConfig_audioReview === void 0 ? void 0 : _runConfig_audioReview.directory) && !((_runConfig_publishTree = runConfig.publishTree) === null || _runConfig_publishTree === void 0 ? void 0 : _runConfig_publishTree.directory)) {
|
|
108
|
-
runConfig.publishTree = runConfig.publishTree || {};
|
|
109
|
-
runConfig.publishTree.directory = runConfig.audioReview.directory;
|
|
110
|
-
}
|
|
111
|
-
// Handle publishTree exclusion patterns - use global excludedPatterns for publish-tree
|
|
112
|
-
if (runConfig.excludedPatterns && !((_runConfig_publishTree1 = runConfig.publishTree) === null || _runConfig_publishTree1 === void 0 ? void 0 : _runConfig_publishTree1.excludedPatterns)) {
|
|
113
|
-
runConfig.publishTree = runConfig.publishTree || {};
|
|
114
|
-
runConfig.publishTree.excludedPatterns = runConfig.excludedPatterns;
|
|
115
|
-
}
|
|
116
|
-
summary = await execute$4(runConfig);
|
|
117
|
-
} else if (commandName === COMMAND_LINK) {
|
|
118
|
-
summary = await execute$5(runConfig);
|
|
119
|
-
} else if (commandName === COMMAND_UNLINK) {
|
|
120
|
-
summary = await execute$6(runConfig);
|
|
121
|
-
} else if (commandName === COMMAND_AUDIO_REVIEW) {
|
|
122
|
-
summary = await execute$7(runConfig);
|
|
123
|
-
} else if (commandName === COMMAND_CLEAN) {
|
|
124
|
-
await execute$8(runConfig);
|
|
125
|
-
summary = 'Output directory cleaned successfully.';
|
|
126
|
-
} else if (commandName === COMMAND_REVIEW) {
|
|
127
|
-
summary = await execute$9(runConfig);
|
|
128
|
-
} else if (commandName === COMMAND_SELECT_AUDIO) {
|
|
129
|
-
await execute$a(runConfig);
|
|
130
|
-
summary = 'Audio selection completed successfully.';
|
|
131
|
-
}
|
|
132
|
-
// eslint-disable-next-line no-console
|
|
133
|
-
console.log(`\n\n${summary}\n\n`);
|
|
9
|
+
await runApplication();
|
|
134
10
|
} catch (error) {
|
|
11
|
+
const logger = getLogger();
|
|
135
12
|
logger.error('Exiting due to Error: %s, %s', error.message, error.stack);
|
|
136
13
|
process.exit(1);
|
|
137
14
|
}
|
|
@@ -144,6 +21,4 @@ main().then(()=>{
|
|
|
144
21
|
logger.error('Unhandled error in main: %s', error.message || error);
|
|
145
22
|
process.exit(1);
|
|
146
23
|
});
|
|
147
|
-
|
|
148
|
-
export { main };
|
|
149
24
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport * as Cardigantime from '@theunwalked/cardigantime';\nimport 'dotenv/config';\nimport { CommandConfig } from 'types';\nimport * as Arguments from './arguments';\nimport * as AudioCommit from './commands/audio-commit';\nimport * as AudioReview from './commands/audio-review';\nimport * as Clean from './commands/clean';\nimport * as Commit from './commands/commit';\nimport * as Link from './commands/link';\nimport * as Publish from './commands/publish';\nimport * as PublishTree from './commands/publish-tree';\nimport * as Release from './commands/release';\nimport * as Review from './commands/review';\nimport * as SelectAudio from './commands/select-audio';\nimport * as Unlink from './commands/unlink';\nimport { COMMAND_AUDIO_COMMIT, COMMAND_AUDIO_REVIEW, COMMAND_CHECK_CONFIG, COMMAND_CLEAN, COMMAND_COMMIT, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_PUBLISH_TREE, COMMAND_RELEASE, COMMAND_REVIEW, COMMAND_SELECT_AUDIO, COMMAND_UNLINK, DEFAULT_CONFIG_DIR } from './constants';\nimport { getLogger, setLogLevel } from './logging';\nimport { Config, ConfigSchema, SecureConfig } from './types';\n\n/**\n * Configure early logging based on command line flags.\n *\n * Hey we need this because we need to be able to debug CardiganTime.\n * This method checks for --verbose and --debug flags early in the process\n * before CardiganTime is configured, allowing us to capture debug output\n * from the CardiganTime initialization itself.\n */\nfunction configureEarlyLogging(): void {\n const hasVerbose = process.argv.includes('--verbose');\n const hasDebug = process.argv.includes('--debug');\n\n // Set log level based on early flag detection\n if (hasDebug) {\n setLogLevel('debug');\n } else if (hasVerbose) {\n setLogLevel('verbose');\n }\n}\n\nexport async function main() {\n // Configure logging early, before CardiganTime initialization\n configureEarlyLogging();\n\n // Cast create to `any` to avoid excessive type instantiation issues in TS compiler\n const createCardigantime: any = (Cardigantime as unknown as { create: unknown }).create as any;\n\n const cardigantime = createCardigantime({\n defaults: {\n configDirectory: DEFAULT_CONFIG_DIR,\n // Move pathResolution INSIDE defaults\n pathResolution: {\n resolvePathArray: ['contextDirectories'], // Resolve contextDirectories array elements as paths\n },\n // Use fieldOverlaps instead of mergeStrategy, INSIDE defaults\n fieldOverlaps: {\n 'contextDirectories': 'prepend', // Use prepend strategy for contextDirectories array\n // Add other field overlap configurations as needed\n },\n },\n features: ['config', 'hierarchical'],\n configShape: ConfigSchema.shape, // No need for 'as any' now\n logger: getLogger(),\n }); // No need for 'as any' at the end\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [runConfig, secureConfig, commandConfig]: [Config, SecureConfig, CommandConfig] = await Arguments.configure(cardigantime); // Pass cardigantime instance\n\n // Set log level based on verbose flag\n if (runConfig.verbose) {\n setLogLevel('verbose');\n }\n if (runConfig.debug) {\n setLogLevel('debug');\n }\n\n const logger = getLogger();\n cardigantime.setLogger(logger);\n\n try {\n // Handle check-config command first\n if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {\n // CardiganTime's checkConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Handle init-config command\n if (commandConfig.commandName === COMMAND_INIT_CONFIG) {\n // CardiganTime's initConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Get the command from Commander\n const command = process.argv[2];\n let commandName = commandConfig.commandName;\n\n // If we have a specific command argument, use that\n if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'publish-tree' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean' || command === 'review' || command === 'select-audio') {\n commandName = command;\n }\n\n let summary: string = '';\n\n if (commandName === COMMAND_COMMIT) {\n summary = await Commit.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_COMMIT) {\n summary = await AudioCommit.execute(runConfig);\n } else if (commandName === COMMAND_RELEASE) {\n const releaseSummary = await Release.execute(runConfig);\n summary = `${releaseSummary.title}\\n\\n${releaseSummary.body}`;\n } else if (commandName === COMMAND_PUBLISH) {\n await Publish.execute(runConfig);\n } else if (commandName === COMMAND_PUBLISH_TREE) {\n // Handle publishTree directory mapping from command-specific arguments\n if (runConfig.audioReview?.directory && !runConfig.publishTree?.directory) {\n runConfig.publishTree = runConfig.publishTree || {};\n runConfig.publishTree.directory = runConfig.audioReview.directory;\n }\n // Handle publishTree exclusion patterns - use global excludedPatterns for publish-tree\n if (runConfig.excludedPatterns && !runConfig.publishTree?.excludedPatterns) {\n runConfig.publishTree = runConfig.publishTree || {};\n runConfig.publishTree.excludedPatterns = runConfig.excludedPatterns;\n }\n summary = await PublishTree.execute(runConfig);\n } else if (commandName === COMMAND_LINK) {\n summary = await Link.execute(runConfig);\n } else if (commandName === COMMAND_UNLINK) {\n summary = await Unlink.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_REVIEW) {\n summary = await AudioReview.execute(runConfig);\n } else if (commandName === COMMAND_CLEAN) {\n await Clean.execute(runConfig);\n summary = 'Output directory cleaned successfully.';\n } else if (commandName === COMMAND_REVIEW) {\n summary = await Review.execute(runConfig);\n } else if (commandName === COMMAND_SELECT_AUDIO) {\n await SelectAudio.execute(runConfig);\n summary = 'Audio selection completed successfully.';\n }\n\n // eslint-disable-next-line no-console\n console.log(`\\n\\n${summary}\\n\\n`);\n\n } catch (error: any) {\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\n// Properly handle the main function with error handling and explicit process exit\nmain().then(() => {\n process.exit(0);\n}).catch((error) => {\n const logger = getLogger();\n logger.error('Unhandled error in main: %s', error.message || error);\n process.exit(1);\n});\n"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","main","createCardigantime","Cardigantime","create","cardigantime","defaults","configDirectory","DEFAULT_CONFIG_DIR","pathResolution","resolvePathArray","fieldOverlaps","features","configShape","ConfigSchema","shape","logger","getLogger","runConfig","secureConfig","commandConfig","Arguments","verbose","debug","setLogger","commandName","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","command","summary","COMMAND_COMMIT","Commit","COMMAND_AUDIO_COMMIT","AudioCommit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_PUBLISH_TREE","audioReview","directory","publishTree","excludedPatterns","PublishTree","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","COMMAND_AUDIO_REVIEW","AudioReview","COMMAND_CLEAN","Clean","COMMAND_REVIEW","Review","COMMAND_SELECT_AUDIO","SelectAudio","console","log","error","message","stack","exit","then","catch"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,CAAA,CAAA,CAAA;;;;;;;AAOC,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASA,qBAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,IAAI,CAACC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAAC,CAAA,CAAA,CAAA,CAAA,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AA,CAAAA,CAAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAID,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAC7DjE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQoE,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAA,CAAA,CAAA;AACjB,CAAA,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runApplication } from './application';\nimport { getLogger } from './logging';\n\n/**\n * Main entry point - minimal wrapper around the application logic\n */\nasync function main(): Promise<void> {\n try {\n await runApplication();\n } catch (error: any) {\n const logger = getLogger();\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\n// Properly handle the main function with error handling and explicit process exit\nmain().then(() => {\n process.exit(0);\n}).catch((error) => {\n const logger = getLogger();\n logger.error('Unhandled error in main: %s', error.message || error);\n process.exit(1);\n});\n"],"names":["main","runApplication","error","logger","getLogger","message","stack","process","exit","then","catch"],"mappings":";;;;AAIA,CAAA,CAAA,CAAA;;AAEC,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAeA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;IACX,CAAA,CAAA,CAAA,CAAI,CAAA;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,cAAAA,CAAAA,CAAAA,CAAAA;AACV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAOC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAY,CAAA;AACjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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AAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAC7DK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAA,CAAA,CAAA;AACjB,CAAA,CAAA"}
|
package/dist/prompt/commit.js
CHANGED
|
@@ -7,6 +7,10 @@ const __dirname = path.dirname(__filename);
|
|
|
7
7
|
/**
|
|
8
8
|
* Build a commit prompt using RiotPrompt Recipes.
|
|
9
9
|
*
|
|
10
|
+
* This prompt is configured to generate multiline commit messages by default,
|
|
11
|
+
* with separate lines/bullet points for different groups of changes rather
|
|
12
|
+
* than squeezing everything into single lines.
|
|
13
|
+
*
|
|
10
14
|
* @param runConfig The runtime configuration provided by the CLI
|
|
11
15
|
* @param content Mandatory content inputs (e.g. diff)
|
|
12
16
|
* @param ctx Optional contextual inputs configured by the user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit.js","sources":["../../src/prompt/commit.ts"],"sourcesContent":["import { Prompt, recipe } from '@riotprompt/riotprompt';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// Types for the commit prompt\nexport type Content = {\n diffContent: string;\n userDirection?: string;\n};\n\nexport type Context = {\n logContext?: string;\n context?: string;\n directories?: string[];\n};\n\nexport type Config = {\n overridePaths?: string[];\n overrides?: boolean;\n}\n\n/**\n * Build a commit prompt using RiotPrompt Recipes.\n *\n * @param runConfig The runtime configuration provided by the CLI\n * @param content Mandatory content inputs (e.g. diff)\n * @param ctx Optional contextual inputs configured by the user\n */\nexport const createPrompt = async (\n { overridePaths: _overridePaths, overrides: _overrides }: Config,\n { diffContent, userDirection }: Content,\n { logContext, context, directories }: Context = {}\n): Promise<Prompt> => {\n const basePath = __dirname;\n\n // Build content items for the prompt\n const contentItems = [];\n const contextItems = [];\n\n if (userDirection) {\n contentItems.push({ content: userDirection, title: 'User Direction' });\n }\n if (diffContent) {\n contentItems.push({ content: diffContent, title: 'Diff' });\n }\n\n if (logContext) {\n contextItems.push({ content: logContext, title: 'Log Context' });\n }\n if (context) {\n contextItems.push({ content: context, title: 'User Context' });\n }\n if (directories && directories.length > 0) {\n contextItems.push({ directories, title: 'Directories' });\n }\n\n return recipe(basePath)\n .persona({ path: 'personas/you.md' })\n .instructions({ path: 'instructions/commit.md' })\n .overridePaths(_overridePaths ?? [])\n .overrides(_overrides ?? true)\n .content(...contentItems)\n .context(...contextItems)\n .cook();\n}
|
|
1
|
+
{"version":3,"file":"commit.js","sources":["../../src/prompt/commit.ts"],"sourcesContent":["import { Prompt, recipe } from '@riotprompt/riotprompt';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// Types for the commit prompt\nexport type Content = {\n diffContent: string;\n userDirection?: string;\n};\n\nexport type Context = {\n logContext?: string;\n context?: string;\n directories?: string[];\n};\n\nexport type Config = {\n overridePaths?: string[];\n overrides?: boolean;\n}\n\n/**\n * Build a commit prompt using RiotPrompt Recipes.\n *\n * This prompt is configured to generate multiline commit messages by default,\n * with separate lines/bullet points for different groups of changes rather\n * than squeezing everything into single lines.\n *\n * @param runConfig The runtime configuration provided by the CLI\n * @param content Mandatory content inputs (e.g. diff)\n * @param ctx Optional contextual inputs configured by the user\n */\nexport const createPrompt = async (\n { overridePaths: _overridePaths, overrides: _overrides }: Config,\n { diffContent, userDirection }: Content,\n { logContext, context, directories }: Context = {}\n): Promise<Prompt> => {\n const basePath = __dirname;\n\n // Build content items for the prompt\n const contentItems = [];\n const contextItems = [];\n\n if (userDirection) {\n contentItems.push({ content: userDirection, title: 'User Direction' });\n }\n if (diffContent) {\n contentItems.push({ content: diffContent, title: 'Diff' });\n }\n\n if (logContext) {\n contextItems.push({ content: logContext, title: 'Log Context' });\n }\n if (context) {\n contextItems.push({ content: context, title: 'User Context' });\n }\n if (directories && directories.length > 0) {\n contextItems.push({ directories, title: 'Directories' });\n }\n\n return recipe(basePath)\n .persona({ path: 'personas/you.md' })\n .instructions({ path: 'instructions/commit.md' })\n .overridePaths(_overridePaths ?? [])\n .overrides(_overrides ?? true)\n .content(...contentItems)\n .context(...contextItems)\n .cook();\n};\n"],"names":["__filename","fileURLToPath","url","__dirname","path","dirname","createPrompt","overridePaths","_overridePaths","overrides","_overrides","diffContent","userDirection","logContext","context","directories","basePath","contentItems","contextItems","push","content","title","length","recipe","persona","instructions","cook"],"mappings":";;;;AAIA,MAAMA,UAAAA,GAAaC,aAAAA,CAAc,MAAA,CAAA,IAAA,CAAYC,GAAG,CAAA;AAChD,MAAMC,SAAAA,GAAYC,IAAAA,CAAKC,OAAO,CAACL,UAAAA,CAAAA;AAmB/B;;;;;;;;;;IAWO,MAAMM,YAAAA,GAAe,OACxB,EAAEC,aAAAA,EAAeC,cAAc,EAAEC,SAAAA,EAAWC,UAAU,EAAU,EAChE,EAAEC,WAAW,EAAEC,aAAa,EAAW,EACvC,EAAEC,UAAU,EAAEC,OAAO,EAAEC,WAAW,EAAW,GAAG,EAAE,GAAA;AAElD,IAAA,MAAMC,QAAAA,GAAWb,SAAAA;;AAGjB,IAAA,MAAMc,eAAe,EAAE;AACvB,IAAA,MAAMC,eAAe,EAAE;AAEvB,IAAA,IAAIN,aAAAA,EAAe;AACfK,QAAAA,YAAAA,CAAaE,IAAI,CAAC;YAAEC,OAAAA,EAASR,aAAAA;YAAeS,KAAAA,EAAO;AAAiB,SAAA,CAAA;AACxE,IAAA;AACA,IAAA,IAAIV,WAAAA,EAAa;AACbM,QAAAA,YAAAA,CAAaE,IAAI,CAAC;YAAEC,OAAAA,EAAST,WAAAA;YAAaU,KAAAA,EAAO;AAAO,SAAA,CAAA;AAC5D,IAAA;AAEA,IAAA,IAAIR,UAAAA,EAAY;AACZK,QAAAA,YAAAA,CAAaC,IAAI,CAAC;YAAEC,OAAAA,EAASP,UAAA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