@eldrforge/kodrdriv 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application.js +56 -15
- package/dist/application.js.map +1 -1
- package/dist/arguments.js +43 -5
- package/dist/arguments.js.map +1 -1
- package/dist/commands/tree.js +745 -0
- package/dist/commands/tree.js.map +1 -0
- package/dist/constants.js +12 -2
- package/dist/constants.js.map +1 -1
- package/dist/logging.js +5 -0
- package/dist/logging.js.map +1 -1
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/test-project/package-lock.json +21 -0
- package/test-project/package.json +1 -1
package/dist/application.js
CHANGED
|
@@ -2,18 +2,19 @@ import * as Cardigantime from '@theunwalked/cardigantime';
|
|
|
2
2
|
import 'dotenv/config';
|
|
3
3
|
import { configure } from './arguments.js';
|
|
4
4
|
import { execute as execute$1 } from './commands/audio-commit.js';
|
|
5
|
-
import { execute as execute$
|
|
6
|
-
import { execute as execute$
|
|
5
|
+
import { execute as execute$9 } from './commands/audio-review.js';
|
|
6
|
+
import { execute as execute$a } from './commands/clean.js';
|
|
7
7
|
import { execute } from './commands/commit.js';
|
|
8
|
-
import { execute as execute$
|
|
8
|
+
import { execute as execute$7 } from './commands/link.js';
|
|
9
9
|
import { execute as execute$3 } from './commands/publish.js';
|
|
10
10
|
import { execute as execute$4 } from './commands/publish-tree.js';
|
|
11
11
|
import { execute as execute$5 } from './commands/commit-tree.js';
|
|
12
|
+
import { execute as execute$6 } from './commands/tree.js';
|
|
12
13
|
import { execute as execute$2 } from './commands/release.js';
|
|
13
|
-
import { execute as execute$
|
|
14
|
-
import { execute as execute$
|
|
15
|
-
import { execute as execute$
|
|
16
|
-
import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_AUDIO_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_PUBLISH_TREE, COMMAND_COMMIT_TREE, COMMAND_LINK, COMMAND_UNLINK, COMMAND_AUDIO_REVIEW, COMMAND_CLEAN, COMMAND_REVIEW, COMMAND_SELECT_AUDIO } from './constants.js';
|
|
14
|
+
import { execute as execute$b } from './commands/review.js';
|
|
15
|
+
import { execute as execute$c } from './commands/select-audio.js';
|
|
16
|
+
import { execute as execute$8 } from './commands/unlink.js';
|
|
17
|
+
import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_AUDIO_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_PUBLISH_TREE, COMMAND_COMMIT_TREE, COMMAND_TREE, COMMAND_LINK, COMMAND_UNLINK, COMMAND_AUDIO_REVIEW, COMMAND_CLEAN, COMMAND_REVIEW, COMMAND_SELECT_AUDIO } from './constants.js';
|
|
17
18
|
import { getLogger, setLogLevel } from './logging.js';
|
|
18
19
|
import { ConfigSchema } from './types.js';
|
|
19
20
|
import { UserCancellationError } from './error/CommandErrors.js';
|
|
@@ -87,8 +88,23 @@ async function runApplication() {
|
|
|
87
88
|
// Get the command from Commander
|
|
88
89
|
const command = process.argv[2];
|
|
89
90
|
let commandName = commandConfig.commandName;
|
|
90
|
-
//
|
|
91
|
-
if (command === '
|
|
91
|
+
// Handle special case for tree command with built-in command argument
|
|
92
|
+
if (command === 'tree' && process.argv[3]) {
|
|
93
|
+
const treeBuiltInCommand = process.argv[3];
|
|
94
|
+
const supportedBuiltInCommands = [
|
|
95
|
+
'commit',
|
|
96
|
+
'publish',
|
|
97
|
+
'link',
|
|
98
|
+
'unlink'
|
|
99
|
+
];
|
|
100
|
+
if (supportedBuiltInCommands.includes(treeBuiltInCommand)) {
|
|
101
|
+
// This is a tree command with built-in command, keep commandName as 'tree'
|
|
102
|
+
commandName = 'tree';
|
|
103
|
+
} else {
|
|
104
|
+
// Unknown tree argument, let it fail naturally in tree.ts
|
|
105
|
+
commandName = 'tree';
|
|
106
|
+
}
|
|
107
|
+
} else if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'publish-tree' || command === 'commit-tree' || command === 'tree' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean' || command === 'review' || command === 'select-audio') {
|
|
92
108
|
commandName = command;
|
|
93
109
|
}
|
|
94
110
|
let summary = '';
|
|
@@ -104,6 +120,11 @@ async function runApplication() {
|
|
|
104
120
|
await execute$3(runConfig);
|
|
105
121
|
} else if (commandName === COMMAND_PUBLISH_TREE) {
|
|
106
122
|
var _runConfig_audioReview, _runConfig_publishTree, _runConfig_publishTree1;
|
|
123
|
+
// DEPRECATED: publish-tree is now handled by tree command
|
|
124
|
+
logger.warn('⚠️ DEPRECATION WARNING: publish-tree command is deprecated.');
|
|
125
|
+
logger.warn(' Please use: kodrdriv tree publish');
|
|
126
|
+
logger.warn(' This provides the same functionality with improved dependency analysis.');
|
|
127
|
+
logger.warn('');
|
|
107
128
|
// Handle publishTree directory mapping from command-specific arguments
|
|
108
129
|
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)) {
|
|
109
130
|
runConfig.publishTree = runConfig.publishTree || {};
|
|
@@ -117,6 +138,11 @@ async function runApplication() {
|
|
|
117
138
|
summary = await execute$4(runConfig);
|
|
118
139
|
} else if (commandName === COMMAND_COMMIT_TREE) {
|
|
119
140
|
var _runConfig_audioReview1, _runConfig_commitTree, _runConfig_commitTree1;
|
|
141
|
+
// DEPRECATED: commit-tree is now handled by tree command
|
|
142
|
+
logger.warn('⚠️ DEPRECATION WARNING: commit-tree command is deprecated.');
|
|
143
|
+
logger.warn(' Please use: kodrdriv tree commit');
|
|
144
|
+
logger.warn(' This provides the same functionality with improved dependency analysis.');
|
|
145
|
+
logger.warn('');
|
|
120
146
|
// Handle commitTree directory mapping from command-specific arguments
|
|
121
147
|
if (((_runConfig_audioReview1 = runConfig.audioReview) === null || _runConfig_audioReview1 === void 0 ? void 0 : _runConfig_audioReview1.directory) && !((_runConfig_commitTree = runConfig.commitTree) === null || _runConfig_commitTree === void 0 ? void 0 : _runConfig_commitTree.directory)) {
|
|
122
148
|
runConfig.commitTree = runConfig.commitTree || {};
|
|
@@ -128,19 +154,34 @@ async function runApplication() {
|
|
|
128
154
|
runConfig.commitTree.excludedPatterns = runConfig.excludedPatterns;
|
|
129
155
|
}
|
|
130
156
|
summary = await execute$5(runConfig);
|
|
131
|
-
} else if (commandName ===
|
|
157
|
+
} else if (commandName === COMMAND_TREE) {
|
|
158
|
+
var _runConfig_audioReview2, _runConfig_tree, _runConfig_tree1;
|
|
159
|
+
// Handle tree directories mapping from command-specific arguments
|
|
160
|
+
if (((_runConfig_audioReview2 = runConfig.audioReview) === null || _runConfig_audioReview2 === void 0 ? void 0 : _runConfig_audioReview2.directory) && !((_runConfig_tree = runConfig.tree) === null || _runConfig_tree === void 0 ? void 0 : _runConfig_tree.directories)) {
|
|
161
|
+
runConfig.tree = runConfig.tree || {};
|
|
162
|
+
runConfig.tree.directories = [
|
|
163
|
+
runConfig.audioReview.directory
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
// Handle tree exclusion patterns - use global excludedPatterns for tree
|
|
167
|
+
if (runConfig.excludedPatterns && !((_runConfig_tree1 = runConfig.tree) === null || _runConfig_tree1 === void 0 ? void 0 : _runConfig_tree1.excludedPatterns)) {
|
|
168
|
+
runConfig.tree = runConfig.tree || {};
|
|
169
|
+
runConfig.tree.excludedPatterns = runConfig.excludedPatterns;
|
|
170
|
+
}
|
|
132
171
|
summary = await execute$6(runConfig);
|
|
133
|
-
} else if (commandName ===
|
|
172
|
+
} else if (commandName === COMMAND_LINK) {
|
|
134
173
|
summary = await execute$7(runConfig);
|
|
135
|
-
} else if (commandName ===
|
|
174
|
+
} else if (commandName === COMMAND_UNLINK) {
|
|
136
175
|
summary = await execute$8(runConfig);
|
|
176
|
+
} else if (commandName === COMMAND_AUDIO_REVIEW) {
|
|
177
|
+
summary = await execute$9(runConfig);
|
|
137
178
|
} else if (commandName === COMMAND_CLEAN) {
|
|
138
|
-
await execute$
|
|
179
|
+
await execute$a(runConfig);
|
|
139
180
|
summary = 'Output directory cleaned successfully.';
|
|
140
181
|
} else if (commandName === COMMAND_REVIEW) {
|
|
141
|
-
summary = await execute$
|
|
182
|
+
summary = await execute$b(runConfig);
|
|
142
183
|
} else if (commandName === COMMAND_SELECT_AUDIO) {
|
|
143
|
-
await execute$
|
|
184
|
+
await execute$c(runConfig);
|
|
144
185
|
summary = 'Audio selection completed successfully.';
|
|
145
186
|
}
|
|
146
187
|
// eslint-disable-next-line no-console
|
package/dist/application.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sources":["../src/application.ts"],"sourcesContent":["import * 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 CommitTree from './commands/commit-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_COMMIT_TREE, 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';\nimport { UserCancellationError } from './error/CommandErrors';\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 */\nexport function 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 runApplication(): Promise<void> {\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 // 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 === 'commit-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 try {\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_COMMIT_TREE) {\n // Handle commitTree directory mapping from command-specific arguments\n if (runConfig.audioReview?.directory && !runConfig.commitTree?.directory) {\n runConfig.commitTree = runConfig.commitTree || {};\n runConfig.commitTree.directory = runConfig.audioReview.directory;\n }\n // Handle commitTree exclusion patterns - use global excludedPatterns for commit-tree\n if (runConfig.excludedPatterns && !runConfig.commitTree?.excludedPatterns) {\n runConfig.commitTree = runConfig.commitTree || {};\n runConfig.commitTree.excludedPatterns = runConfig.excludedPatterns;\n }\n summary = await CommitTree.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 } catch (error: any) {\n // Handle user cancellation gracefully\n if (error instanceof UserCancellationError) {\n logger.info(error.message);\n process.exit(0);\n }\n\n // Re-throw other errors to be handled by main.ts\n throw error;\n }\n}\n"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","runApplication","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_COMMIT_TREE","commitTree","CommitTree","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","COMMAND_AUDIO_REVIEW","AudioReview","COMMAND_CLEAN","Clean","COMMAND_REVIEW","Review","COMMAND_SELECT_AUDIO","SelectAudio","console","log","error","UserCancellationError","info","message","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA;;;;;;;AAOC,IACM,SAASA,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CAAA,MAAO,IAAIJ,gBAAgBiC,cAAAA,EAAgB;YACvC7B,OAAAA,GAAU,MAAM8B,SAAc,CAACzC,SAAAA,CAAAA;QACnC,CAAA,MAAO,IAAIO,gBAAgBmC,oBAAAA,EAAsB;YAC7C,MAAMC,SAAmB,CAAC3C,SAAAA,CAAAA;YAC1BW,OAAAA,GAAU,yCAAA;AACd,QAAA;;AAGAiC,QAAAA,OAAAA,CAAQC,GAAG,CAAC,CAAC,IAAI,EAAElC,OAAAA,CAAQ,IAAI,CAAC,CAAA;AACpC,IAAA,CAAA,CAAE,OAAOmC,KAAAA,EAAY;;AAEjB,QAAA,IAAIA,iBAAiBC,qBAAAA,EAAuB;YACxCjD,MAAAA,CAAOkD,IAAI,CAACF,KAAAA,CAAMG,OAAO,CAAA;AACzBvE,YAAAA,OAAAA,CAAQwE,IAAI,CAAC,CAAA,CAAA;AACjB,QAAA;;QAGA,MAAMJ,KAAAA;AACV,IAAA;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"application.js","sources":["../src/application.ts"],"sourcesContent":["import * 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 CommitTree from './commands/commit-tree';\nimport * as Tree from './commands/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_COMMIT_TREE, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_PUBLISH_TREE, COMMAND_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';\nimport { UserCancellationError } from './error/CommandErrors';\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 */\nexport function 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 runApplication(): Promise<void> {\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 // 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 // Handle special case for tree command with built-in command argument\n if (command === 'tree' && process.argv[3]) {\n const treeBuiltInCommand = process.argv[3];\n const supportedBuiltInCommands = ['commit', 'publish', 'link', 'unlink'];\n if (supportedBuiltInCommands.includes(treeBuiltInCommand)) {\n // This is a tree command with built-in command, keep commandName as 'tree'\n commandName = 'tree';\n } else {\n // Unknown tree argument, let it fail naturally in tree.ts\n commandName = 'tree';\n }\n }\n // If we have a specific command argument, use that\n else if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'publish-tree' || command === 'commit-tree' || command === '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 try {\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 // DEPRECATED: publish-tree is now handled by tree command\n logger.warn('⚠️ DEPRECATION WARNING: publish-tree command is deprecated.');\n logger.warn(' Please use: kodrdriv tree publish');\n logger.warn(' This provides the same functionality with improved dependency analysis.');\n logger.warn('');\n\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_COMMIT_TREE) {\n // DEPRECATED: commit-tree is now handled by tree command\n logger.warn('⚠️ DEPRECATION WARNING: commit-tree command is deprecated.');\n logger.warn(' Please use: kodrdriv tree commit');\n logger.warn(' This provides the same functionality with improved dependency analysis.');\n logger.warn('');\n\n // Handle commitTree directory mapping from command-specific arguments\n if (runConfig.audioReview?.directory && !runConfig.commitTree?.directory) {\n runConfig.commitTree = runConfig.commitTree || {};\n runConfig.commitTree.directory = runConfig.audioReview.directory;\n }\n // Handle commitTree exclusion patterns - use global excludedPatterns for commit-tree\n if (runConfig.excludedPatterns && !runConfig.commitTree?.excludedPatterns) {\n runConfig.commitTree = runConfig.commitTree || {};\n runConfig.commitTree.excludedPatterns = runConfig.excludedPatterns;\n }\n summary = await CommitTree.execute(runConfig);\n } else if (commandName === COMMAND_TREE) {\n // Handle tree directories mapping from command-specific arguments\n if (runConfig.audioReview?.directory && !runConfig.tree?.directories) {\n runConfig.tree = runConfig.tree || {};\n runConfig.tree.directories = [runConfig.audioReview.directory];\n }\n // Handle tree exclusion patterns - use global excludedPatterns for tree\n if (runConfig.excludedPatterns && !runConfig.tree?.excludedPatterns) {\n runConfig.tree = runConfig.tree || {};\n runConfig.tree.excludedPatterns = runConfig.excludedPatterns;\n }\n summary = await Tree.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 } catch (error: any) {\n // Handle user cancellation gracefully\n if (error instanceof UserCancellationError) {\n logger.info(error.message);\n process.exit(0);\n }\n\n // Re-throw other errors to be handled by main.ts\n throw error;\n }\n}\n"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","runApplication","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","treeBuiltInCommand","supportedBuiltInCommands","summary","COMMAND_COMMIT","Commit","COMMAND_AUDIO_COMMIT","AudioCommit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_PUBLISH_TREE","warn","audioReview","directory","publishTree","excludedPatterns","PublishTree","COMMAND_COMMIT_TREE","commitTree","CommitTree","COMMAND_TREE","tree","directories","Tree","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","COMMAND_AUDIO_REVIEW","AudioReview","COMMAND_CLEAN","Clean","COMMAND_REVIEW","Review","COMMAND_SELECT_AUDIO","SelectAudio","console","log","error","UserCancellationError","info","message","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;;AAOC,IACM,SAASA,qBAAAA,GAAAA;AACZ,IAAA,MAAMC,UAAAA,GAAaC,OAAAA,CAAQC,IAAI,CAACC,QAAQ,CAAC,WAAA,CAAA;AACzC,IAAA,MAAMC,QAAAA,GAAWH,OAAAA,CAAQC,IAAI,CAACC,QAAQ,CA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
|
githubIssuesLimit: z.number().optional(),
|
|
52
52
|
file: z.string().optional(),
|
|
53
53
|
directory: z.string().optional(),
|
|
54
|
+
directories: z.array(z.string()).optional(),
|
|
54
55
|
keepTemp: z.boolean().optional()
|
|
55
56
|
});
|
|
56
57
|
// Function to transform flat CLI args into nested Config structure
|
|
@@ -111,7 +112,7 @@ const transformCliArgs = (finalCliArgs, commandName)=>{
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
// Nested mappings for 'audio-review' options
|
|
114
|
-
if (finalCliArgs.includeCommitHistory !== undefined || finalCliArgs.includeRecentDiffs !== undefined || finalCliArgs.includeReleaseNotes !== undefined || finalCliArgs.includeGithubIssues !== undefined || finalCliArgs.commitHistoryLimit !== undefined || finalCliArgs.diffHistoryLimit !== undefined || finalCliArgs.releaseNotesLimit !== undefined || finalCliArgs.githubIssuesLimit !== undefined || finalCliArgs.file !== undefined || finalCliArgs.
|
|
115
|
+
if (finalCliArgs.includeCommitHistory !== undefined || finalCliArgs.includeRecentDiffs !== undefined || finalCliArgs.includeReleaseNotes !== undefined || finalCliArgs.includeGithubIssues !== undefined || finalCliArgs.commitHistoryLimit !== undefined || finalCliArgs.diffHistoryLimit !== undefined || finalCliArgs.releaseNotesLimit !== undefined || finalCliArgs.githubIssuesLimit !== undefined || finalCliArgs.file !== undefined || finalCliArgs.directories !== undefined || finalCliArgs.keepTemp !== undefined) {
|
|
115
116
|
transformedCliArgs.audioReview = {};
|
|
116
117
|
if (finalCliArgs.includeCommitHistory !== undefined) transformedCliArgs.audioReview.includeCommitHistory = finalCliArgs.includeCommitHistory;
|
|
117
118
|
if (finalCliArgs.includeRecentDiffs !== undefined) transformedCliArgs.audioReview.includeRecentDiffs = finalCliArgs.includeRecentDiffs;
|
|
@@ -146,9 +147,10 @@ const transformCliArgs = (finalCliArgs, commandName)=>{
|
|
|
146
147
|
// Nested mappings for 'publishTree' options (add when relevant args present, unless we're specifically doing commit-tree)
|
|
147
148
|
if (commandName !== 'commit-tree') {
|
|
148
149
|
const publishTreeExcludedPatterns = finalCliArgs.excludedPatterns || finalCliArgs.excludedPaths;
|
|
149
|
-
if (finalCliArgs.directory !== undefined || publishTreeExcludedPatterns !== undefined || finalCliArgs.startFrom !== undefined || finalCliArgs.script !== undefined || finalCliArgs.cmd !== undefined || finalCliArgs.publish !== undefined || finalCliArgs.parallel !== undefined) {
|
|
150
|
+
if (finalCliArgs.directory !== undefined || finalCliArgs.directories !== undefined || publishTreeExcludedPatterns !== undefined || finalCliArgs.startFrom !== undefined || finalCliArgs.script !== undefined || finalCliArgs.cmd !== undefined || finalCliArgs.publish !== undefined || finalCliArgs.parallel !== undefined) {
|
|
150
151
|
transformedCliArgs.publishTree = {};
|
|
151
152
|
if (finalCliArgs.directory !== undefined) transformedCliArgs.publishTree.directory = finalCliArgs.directory;
|
|
153
|
+
else if (finalCliArgs.directories !== undefined && finalCliArgs.directories.length > 0) transformedCliArgs.publishTree.directory = finalCliArgs.directories[0];
|
|
152
154
|
if (publishTreeExcludedPatterns !== undefined) transformedCliArgs.publishTree.excludedPatterns = publishTreeExcludedPatterns;
|
|
153
155
|
if (finalCliArgs.startFrom !== undefined) transformedCliArgs.publishTree.startFrom = finalCliArgs.startFrom;
|
|
154
156
|
if (finalCliArgs.script !== undefined) transformedCliArgs.publishTree.script = finalCliArgs.script;
|
|
@@ -160,14 +162,32 @@ const transformCliArgs = (finalCliArgs, commandName)=>{
|
|
|
160
162
|
// Nested mappings for 'commitTree' options (only when the command is actually commit-tree)
|
|
161
163
|
if (commandName === 'commit-tree') {
|
|
162
164
|
const commitTreeExcludedPatterns = finalCliArgs.excludedPatterns || finalCliArgs.excludedPaths;
|
|
163
|
-
if (finalCliArgs.directory !== undefined || commitTreeExcludedPatterns !== undefined || finalCliArgs.startFrom !== undefined || finalCliArgs.parallel !== undefined) {
|
|
165
|
+
if (finalCliArgs.directory !== undefined || finalCliArgs.directories !== undefined || commitTreeExcludedPatterns !== undefined || finalCliArgs.startFrom !== undefined || finalCliArgs.parallel !== undefined) {
|
|
164
166
|
transformedCliArgs.commitTree = {};
|
|
165
167
|
if (finalCliArgs.directory !== undefined) transformedCliArgs.commitTree.directory = finalCliArgs.directory;
|
|
168
|
+
else if (finalCliArgs.directories !== undefined && finalCliArgs.directories.length > 0) transformedCliArgs.commitTree.directory = finalCliArgs.directories[0];
|
|
166
169
|
if (commitTreeExcludedPatterns !== undefined) transformedCliArgs.commitTree.excludedPatterns = commitTreeExcludedPatterns;
|
|
167
170
|
if (finalCliArgs.startFrom !== undefined) transformedCliArgs.commitTree.startFrom = finalCliArgs.startFrom;
|
|
168
171
|
if (finalCliArgs.parallel !== undefined) transformedCliArgs.commitTree.parallel = finalCliArgs.parallel;
|
|
169
172
|
}
|
|
170
173
|
}
|
|
174
|
+
// Nested mappings for 'tree' options (only when the command is actually tree)
|
|
175
|
+
if (commandName === 'tree') {
|
|
176
|
+
const treeExcludedPatterns = finalCliArgs.excludedPatterns || finalCliArgs.excludedPaths;
|
|
177
|
+
const builtInCommand = finalCliArgs.builtInCommand;
|
|
178
|
+
if (finalCliArgs.directory !== undefined || finalCliArgs.directories !== undefined || treeExcludedPatterns !== undefined || finalCliArgs.startFrom !== undefined || finalCliArgs.cmd !== undefined || finalCliArgs.parallel !== undefined || builtInCommand !== undefined) {
|
|
179
|
+
transformedCliArgs.tree = {};
|
|
180
|
+
if (finalCliArgs.directories !== undefined) transformedCliArgs.tree.directories = finalCliArgs.directories;
|
|
181
|
+
else if (finalCliArgs.directory !== undefined) transformedCliArgs.tree.directories = [
|
|
182
|
+
finalCliArgs.directory
|
|
183
|
+
];
|
|
184
|
+
if (treeExcludedPatterns !== undefined) transformedCliArgs.tree.excludedPatterns = treeExcludedPatterns;
|
|
185
|
+
if (finalCliArgs.startFrom !== undefined) transformedCliArgs.tree.startFrom = finalCliArgs.startFrom;
|
|
186
|
+
if (finalCliArgs.cmd !== undefined) transformedCliArgs.tree.cmd = finalCliArgs.cmd;
|
|
187
|
+
if (finalCliArgs.parallel !== undefined) transformedCliArgs.tree.parallel = finalCliArgs.parallel;
|
|
188
|
+
if (builtInCommand !== undefined) transformedCliArgs.tree.builtInCommand = builtInCommand;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
171
191
|
// Handle excluded patterns (Commander.js converts --excluded-paths to excludedPaths)
|
|
172
192
|
const excludedPatterns = finalCliArgs.excludedPatterns || finalCliArgs.excludedPaths;
|
|
173
193
|
if (excludedPatterns !== undefined) transformedCliArgs.excludedPatterns = excludedPatterns;
|
|
@@ -369,6 +389,8 @@ async function getCliConfig(program) {
|
|
|
369
389
|
addSharedOptions(publishTreeCommand);
|
|
370
390
|
const commitTreeCommand = program.command('commit-tree').option('--directory <directory>', 'target directory containing multiple packages (defaults to current directory)').option('--start-from <startFrom>', 'resume commit order from this package directory name (useful for restarting failed commits)').option('--parallel', 'execute packages in parallel when dependencies allow (packages with no interdependencies run simultaneously)').option('--excluded-patterns [excludedPatterns...]', 'patterns to exclude packages from processing (e.g., "**/node_modules/**", "dist/*")').description('Analyze package dependencies in workspace and run commit operations (git add -A + kodrdriv commit) in dependency order');
|
|
371
391
|
addSharedOptions(commitTreeCommand);
|
|
392
|
+
const treeCommand = program.command('tree [command]').option('--directory <directory>', 'target directory containing multiple packages (defaults to current directory)').option('--directories [directories...]', 'target directories containing multiple packages (defaults to current directory)').option('--start-from <startFrom>', 'resume execution from this package directory name (useful for restarting failed builds)').option('--cmd <cmd>', 'shell command to execute in each package directory (e.g., "npm install", "git status")').option('--parallel', 'execute packages in parallel when dependencies allow (packages with no interdependencies run simultaneously)').option('--excluded-patterns [excludedPatterns...]', 'patterns to exclude packages from processing (e.g., "**/node_modules/**", "dist/*")').description('Analyze package dependencies in workspace and execute commands in dependency order. Supports built-in commands: commit, publish, link, unlink');
|
|
393
|
+
addSharedOptions(treeCommand);
|
|
372
394
|
const linkCommand = program.command('link').option('--scope-roots <scopeRoots>', 'JSON mapping of scopes to root directories (e.g., \'{"@company": "../"}\')').description('Create npm file: dependencies for local development');
|
|
373
395
|
addSharedOptions(linkCommand);
|
|
374
396
|
const unlinkCommand = program.command('unlink').option('--scope-roots <scopeRoots>', 'JSON mapping of scopes to root directories (e.g., \'{"@company": "../"}\')').description('Restore original dependencies and rebuild node_modules');
|
|
@@ -535,6 +557,14 @@ async function getCliConfig(program) {
|
|
|
535
557
|
commandOptions = publishTreeCommand.opts();
|
|
536
558
|
} else if (commandName === 'commit-tree' && commitTreeCommand.opts) {
|
|
537
559
|
commandOptions = commitTreeCommand.opts();
|
|
560
|
+
} else if (commandName === 'tree' && treeCommand.opts) {
|
|
561
|
+
commandOptions = treeCommand.opts();
|
|
562
|
+
// Handle positional argument for built-in command
|
|
563
|
+
const args = treeCommand.args;
|
|
564
|
+
if (args && args.length > 0 && args[0]) {
|
|
565
|
+
// Store the built-in command for later processing
|
|
566
|
+
commandOptions.builtInCommand = args[0];
|
|
567
|
+
}
|
|
538
568
|
} else if (commandName === 'link' && linkCommand.opts) {
|
|
539
569
|
commandOptions = linkCommand.opts();
|
|
540
570
|
} else if (commandName === 'unlink' && unlinkCommand.opts) {
|
|
@@ -588,10 +618,10 @@ async function validateAndProcessSecureOptions() {
|
|
|
588
618
|
}
|
|
589
619
|
// Renamed validation function to reflect its broader role
|
|
590
620
|
async function validateAndProcessOptions(options) {
|
|
591
|
-
var _options_commit, _options_commit1, _options_commit2, _options_commit3, _options_commit4, _options_commit5, _options_commit6, _options_audioCommit, _options_audioCommit1, _options_audioCommit2, _options_audioCommit3, _options_release, _options_release1, _options_release2, _options_release3, _options_audioReview, _options_audioReview1, _options_audioReview2, _options_audioReview3, _options_audioReview4, _options_audioReview5, _options_audioReview6, _options_audioReview7, _options_audioReview8, _options_audioReview9, _options_audioReview10, _options_audioReview11, _options_audioReview12, _options_audioReview13, _options_audioReview14, _options_review, _options_review1, _options_review2, _options_review3, _options_review4, _options_review5, _options_review6, _options_review7, _options_review8, _options_review9, _options_review10, _options_publish, _options_publish1, _options_publish2, _options_publish3, _options_publish4, _options_publish5, _options_link, _options_link1, _options_publishTree, _options_publishTree1, _options_publishTree2, _options_publishTree3, _options_publishTree4, _options_publishTree5, _options_publishTree6, _options_commitTree, _options_commitTree1, _options_commitTree2, _options_commitTree3;
|
|
621
|
+
var _options_commit, _options_commit1, _options_commit2, _options_commit3, _options_commit4, _options_commit5, _options_commit6, _options_audioCommit, _options_audioCommit1, _options_audioCommit2, _options_audioCommit3, _options_release, _options_release1, _options_release2, _options_release3, _options_audioReview, _options_audioReview1, _options_audioReview2, _options_audioReview3, _options_audioReview4, _options_audioReview5, _options_audioReview6, _options_audioReview7, _options_audioReview8, _options_audioReview9, _options_audioReview10, _options_audioReview11, _options_audioReview12, _options_audioReview13, _options_audioReview14, _options_review, _options_review1, _options_review2, _options_review3, _options_review4, _options_review5, _options_review6, _options_review7, _options_review8, _options_review9, _options_review10, _options_publish, _options_publish1, _options_publish2, _options_publish3, _options_publish4, _options_publish5, _options_link, _options_link1, _options_publishTree, _options_publishTree1, _options_publishTree2, _options_publishTree3, _options_publishTree4, _options_publishTree5, _options_publishTree6, _options_commitTree, _options_commitTree1, _options_commitTree2, _options_commitTree3, _options_tree, _options_tree1, _options_tree2, _options_tree3, _options_tree4, _options_tree5;
|
|
592
622
|
const contextDirectories = await validateContextDirectories(options.contextDirectories || KODRDRIV_DEFAULTS.contextDirectories);
|
|
593
623
|
const configDir = options.configDirectory || KODRDRIV_DEFAULTS.configDirectory;
|
|
594
|
-
var _options_dryRun, _options_verbose, _options_debug, _options_overrides, _options_model, _options_outputDirectory, _options_preferencesDirectory, _options_discoveredConfigDirs, _options_resolvedConfigDirs, _options_commit_add, _options_commit_cached, _options_commit_sendit, _options_commit_messageLimit, _options_commit_skipFileCheck, _options_audioCommit_maxRecordingTime, _options_audioCommit_audioDevice, _options_release_from, _options_release_to, _options_release_messageLimit, _options_audioReview_includeCommitHistory, _options_audioReview_includeRecentDiffs, _options_audioReview_includeReleaseNotes, _options_audioReview_includeGithubIssues, _options_audioReview_commitHistoryLimit, _options_audioReview_diffHistoryLimit, _options_audioReview_releaseNotesLimit, _options_audioReview_githubIssuesLimit, _options_audioReview_sendit, _options_audioReview_maxRecordingTime, _options_audioReview_audioDevice, _options_review_includeCommitHistory, _options_review_includeRecentDiffs, _options_review_includeReleaseNotes, _options_review_includeGithubIssues, _options_review_commitHistoryLimit, _options_review_diffHistoryLimit, _options_review_releaseNotesLimit, _options_review_githubIssuesLimit, _options_review_sendit, _options_publish_mergeMethod, _options_publish_requiredEnvVars, _options_publish_linkWorkspacePackages, _options_publish_unlinkWorkspacePackages, _options_publish_sendit, _options_link_scopeRoots, _options_link_dryRun, _options_publishTree_directory, _options_publishTree_excludedPatterns, _options_publishTree_startFrom, _options_publishTree_script, _options_publishTree_cmd, _options_publishTree_publish, _options_publishTree_parallel, _options_commitTree_directory, _options_commitTree_excludedPatterns, _options_commitTree_startFrom, _options_commitTree_parallel, _options_excludedPatterns;
|
|
624
|
+
var _options_dryRun, _options_verbose, _options_debug, _options_overrides, _options_model, _options_outputDirectory, _options_preferencesDirectory, _options_discoveredConfigDirs, _options_resolvedConfigDirs, _options_commit_add, _options_commit_cached, _options_commit_sendit, _options_commit_messageLimit, _options_commit_skipFileCheck, _options_audioCommit_maxRecordingTime, _options_audioCommit_audioDevice, _options_release_from, _options_release_to, _options_release_messageLimit, _options_audioReview_includeCommitHistory, _options_audioReview_includeRecentDiffs, _options_audioReview_includeReleaseNotes, _options_audioReview_includeGithubIssues, _options_audioReview_commitHistoryLimit, _options_audioReview_diffHistoryLimit, _options_audioReview_releaseNotesLimit, _options_audioReview_githubIssuesLimit, _options_audioReview_sendit, _options_audioReview_maxRecordingTime, _options_audioReview_audioDevice, _options_review_includeCommitHistory, _options_review_includeRecentDiffs, _options_review_includeReleaseNotes, _options_review_includeGithubIssues, _options_review_commitHistoryLimit, _options_review_diffHistoryLimit, _options_review_releaseNotesLimit, _options_review_githubIssuesLimit, _options_review_sendit, _options_publish_mergeMethod, _options_publish_requiredEnvVars, _options_publish_linkWorkspacePackages, _options_publish_unlinkWorkspacePackages, _options_publish_sendit, _options_link_scopeRoots, _options_link_dryRun, _options_publishTree_directory, _options_publishTree_excludedPatterns, _options_publishTree_startFrom, _options_publishTree_script, _options_publishTree_cmd, _options_publishTree_publish, _options_publishTree_parallel, _options_commitTree_directory, _options_commitTree_excludedPatterns, _options_commitTree_startFrom, _options_commitTree_parallel, _options_tree_directories, _options_tree_excludedPatterns, _options_tree_startFrom, _options_tree_cmd, _options_tree_parallel, _options_tree_builtInCommand, _options_excludedPatterns;
|
|
595
625
|
// Skip config directory validation since Cardigantime handles hierarchical lookup
|
|
596
626
|
// Ensure all required fields are present and have correct types after merging
|
|
597
627
|
const finalConfig = {
|
|
@@ -686,6 +716,14 @@ async function validateAndProcessOptions(options) {
|
|
|
686
716
|
startFrom: (_options_commitTree_startFrom = (_options_commitTree2 = options.commitTree) === null || _options_commitTree2 === void 0 ? void 0 : _options_commitTree2.startFrom) !== null && _options_commitTree_startFrom !== void 0 ? _options_commitTree_startFrom : KODRDRIV_DEFAULTS.commitTree.startFrom,
|
|
687
717
|
parallel: (_options_commitTree_parallel = (_options_commitTree3 = options.commitTree) === null || _options_commitTree3 === void 0 ? void 0 : _options_commitTree3.parallel) !== null && _options_commitTree_parallel !== void 0 ? _options_commitTree_parallel : KODRDRIV_DEFAULTS.commitTree.parallel
|
|
688
718
|
},
|
|
719
|
+
tree: {
|
|
720
|
+
directories: (_options_tree_directories = (_options_tree = options.tree) === null || _options_tree === void 0 ? void 0 : _options_tree.directories) !== null && _options_tree_directories !== void 0 ? _options_tree_directories : KODRDRIV_DEFAULTS.tree.directories,
|
|
721
|
+
excludedPatterns: (_options_tree_excludedPatterns = (_options_tree1 = options.tree) === null || _options_tree1 === void 0 ? void 0 : _options_tree1.excludedPatterns) !== null && _options_tree_excludedPatterns !== void 0 ? _options_tree_excludedPatterns : KODRDRIV_DEFAULTS.tree.excludedPatterns,
|
|
722
|
+
startFrom: (_options_tree_startFrom = (_options_tree2 = options.tree) === null || _options_tree2 === void 0 ? void 0 : _options_tree2.startFrom) !== null && _options_tree_startFrom !== void 0 ? _options_tree_startFrom : KODRDRIV_DEFAULTS.tree.startFrom,
|
|
723
|
+
cmd: (_options_tree_cmd = (_options_tree3 = options.tree) === null || _options_tree3 === void 0 ? void 0 : _options_tree3.cmd) !== null && _options_tree_cmd !== void 0 ? _options_tree_cmd : KODRDRIV_DEFAULTS.tree.cmd,
|
|
724
|
+
parallel: (_options_tree_parallel = (_options_tree4 = options.tree) === null || _options_tree4 === void 0 ? void 0 : _options_tree4.parallel) !== null && _options_tree_parallel !== void 0 ? _options_tree_parallel : KODRDRIV_DEFAULTS.tree.parallel,
|
|
725
|
+
builtInCommand: (_options_tree_builtInCommand = (_options_tree5 = options.tree) === null || _options_tree5 === void 0 ? void 0 : _options_tree5.builtInCommand) !== null && _options_tree_builtInCommand !== void 0 ? _options_tree_builtInCommand : KODRDRIV_DEFAULTS.tree.builtInCommand
|
|
726
|
+
},
|
|
689
727
|
excludedPatterns: (_options_excludedPatterns = options.excludedPatterns) !== null && _options_excludedPatterns !== void 0 ? _options_excludedPatterns : KODRDRIV_DEFAULTS.excludedPatterns
|
|
690
728
|
};
|
|
691
729
|
// Final validation against the MainConfig shape (optional, cardigantime might handle it)
|