@eldrforge/kodrdriv 1.2.13 → 1.2.14
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/arguments.js +13 -4
- package/dist/arguments.js.map +1 -1
- package/dist/commands/development.js +133 -3
- package/dist/commands/development.js.map +1 -1
- package/dist/commands/publish.js +42 -42
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/release.js +12 -10
- package/dist/commands/release.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/util/git.js +58 -30
- package/dist/util/git.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/publish.js
CHANGED
|
@@ -446,7 +446,7 @@ const execute = async (runConfig)=>{
|
|
|
446
446
|
if (pr) {
|
|
447
447
|
logger.info(`Found existing pull request for branch: ${pr.html_url}`);
|
|
448
448
|
} else {
|
|
449
|
-
var _runConfig_publish4, _runConfig_publish5, _runConfig_publish6, _runConfig_publish7, _runConfig_publish8;
|
|
449
|
+
var _runConfig_publish4, _runConfig_publish5, _runConfig_publish6, _runConfig_publish7, _runConfig_publish8, _runConfig_publish9, _runConfig_publish10, _runConfig_publish11;
|
|
450
450
|
logger.info('No open pull request found, starting new release publishing process...');
|
|
451
451
|
// STEP 1: Prepare for release (update dependencies and run prepublish checks) with NO version bump yet
|
|
452
452
|
logger.verbose('Preparing for release: switching from workspace to remote dependencies.');
|
|
@@ -587,7 +587,7 @@ const execute = async (runConfig)=>{
|
|
|
587
587
|
logger.info('Would determine target version and update package.json');
|
|
588
588
|
newVersion = '1.0.0'; // Mock version for dry run
|
|
589
589
|
} else {
|
|
590
|
-
var
|
|
590
|
+
var _runConfig_publish12;
|
|
591
591
|
const packageJsonContents = await storage.readFile('package.json', 'utf-8');
|
|
592
592
|
const parsed = safeJsonParse(packageJsonContents, 'package.json');
|
|
593
593
|
const packageJson = validatePackageJson(parsed, 'package.json');
|
|
@@ -604,9 +604,9 @@ const execute = async (runConfig)=>{
|
|
|
604
604
|
// Update targetBranch for the rest of the function
|
|
605
605
|
targetBranch = finalTargetBranch;
|
|
606
606
|
} else {
|
|
607
|
-
var
|
|
607
|
+
var _runConfig_publish13;
|
|
608
608
|
// Use existing logic for backward compatibility
|
|
609
|
-
const targetVersionInput = ((
|
|
609
|
+
const targetVersionInput = ((_runConfig_publish13 = runConfig.publish) === null || _runConfig_publish13 === void 0 ? void 0 : _runConfig_publish13.targetVersion) || 'patch';
|
|
610
610
|
proposedVersion = calculateTargetVersion(currentVersion, targetVersionInput);
|
|
611
611
|
}
|
|
612
612
|
const targetTagName = `v${proposedVersion}`;
|
|
@@ -614,9 +614,9 @@ const execute = async (runConfig)=>{
|
|
|
614
614
|
if (tagExists) {
|
|
615
615
|
throw new Error(`Tag ${targetTagName} already exists. Please choose a different version or delete the existing tag.`);
|
|
616
616
|
}
|
|
617
|
-
if ((
|
|
618
|
-
var
|
|
619
|
-
newVersion = await confirmVersionInteractively(currentVersion, proposedVersion, (
|
|
617
|
+
if ((_runConfig_publish12 = runConfig.publish) === null || _runConfig_publish12 === void 0 ? void 0 : _runConfig_publish12.interactive) {
|
|
618
|
+
var _runConfig_publish14;
|
|
619
|
+
newVersion = await confirmVersionInteractively(currentVersion, proposedVersion, (_runConfig_publish14 = runConfig.publish) === null || _runConfig_publish14 === void 0 ? void 0 : _runConfig_publish14.targetVersion);
|
|
620
620
|
const confirmedTagName = `v${newVersion}`;
|
|
621
621
|
const confirmedTagExists = await checkIfTagExists(confirmedTagName);
|
|
622
622
|
if (confirmedTagExists) {
|
|
@@ -644,33 +644,33 @@ const execute = async (runConfig)=>{
|
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
logger.info('Generating release notes...');
|
|
647
|
+
// Use the existing currentBranch variable for tag detection
|
|
648
|
+
logger.debug(`Current branch for release notes: ${currentBranch}`);
|
|
647
649
|
// Create a modified config for release notes generation that includes the publish --from, --interactive, and --from-main options
|
|
648
650
|
const releaseConfig = {
|
|
649
651
|
...runConfig
|
|
650
652
|
};
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
fromMain: runConfig.publish.fromMain
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
if (runConfig.publish.from) {
|
|
666
|
-
logger.verbose(`Using custom 'from' reference for release notes: ${runConfig.publish.from}`);
|
|
667
|
-
}
|
|
668
|
-
if (runConfig.publish.interactive) {
|
|
669
|
-
logger.verbose('Interactive mode enabled for release notes generation');
|
|
670
|
-
}
|
|
671
|
-
if (runConfig.publish.fromMain) {
|
|
672
|
-
logger.verbose('Forcing comparison against main branch for release notes');
|
|
653
|
+
releaseConfig.release = {
|
|
654
|
+
...runConfig.release,
|
|
655
|
+
currentBranch: currentBranch,
|
|
656
|
+
...((_runConfig_publish6 = runConfig.publish) === null || _runConfig_publish6 === void 0 ? void 0 : _runConfig_publish6.from) && {
|
|
657
|
+
from: runConfig.publish.from
|
|
658
|
+
},
|
|
659
|
+
...((_runConfig_publish7 = runConfig.publish) === null || _runConfig_publish7 === void 0 ? void 0 : _runConfig_publish7.interactive) && {
|
|
660
|
+
interactive: runConfig.publish.interactive
|
|
661
|
+
},
|
|
662
|
+
...((_runConfig_publish8 = runConfig.publish) === null || _runConfig_publish8 === void 0 ? void 0 : _runConfig_publish8.fromMain) && {
|
|
663
|
+
fromMain: runConfig.publish.fromMain
|
|
673
664
|
}
|
|
665
|
+
};
|
|
666
|
+
if ((_runConfig_publish9 = runConfig.publish) === null || _runConfig_publish9 === void 0 ? void 0 : _runConfig_publish9.from) {
|
|
667
|
+
logger.verbose(`Using custom 'from' reference for release notes: ${runConfig.publish.from}`);
|
|
668
|
+
}
|
|
669
|
+
if ((_runConfig_publish10 = runConfig.publish) === null || _runConfig_publish10 === void 0 ? void 0 : _runConfig_publish10.interactive) {
|
|
670
|
+
logger.verbose('Interactive mode enabled for release notes generation');
|
|
671
|
+
}
|
|
672
|
+
if ((_runConfig_publish11 = runConfig.publish) === null || _runConfig_publish11 === void 0 ? void 0 : _runConfig_publish11.fromMain) {
|
|
673
|
+
logger.verbose('Forcing comparison against main branch for release notes');
|
|
674
674
|
}
|
|
675
675
|
const releaseSummary = await execute$2(releaseConfig);
|
|
676
676
|
if (isDryRun) {
|
|
@@ -707,12 +707,12 @@ const execute = async (runConfig)=>{
|
|
|
707
707
|
}
|
|
708
708
|
logger.info(`Waiting for PR #${pr.number} checks to complete...`);
|
|
709
709
|
if (!isDryRun) {
|
|
710
|
-
var
|
|
710
|
+
var _runConfig_publish15, _runConfig_publish16, _runConfig_publish17;
|
|
711
711
|
// Configure timeout and user confirmation behavior
|
|
712
|
-
const timeout = ((
|
|
713
|
-
const senditMode = ((
|
|
712
|
+
const timeout = ((_runConfig_publish15 = runConfig.publish) === null || _runConfig_publish15 === void 0 ? void 0 : _runConfig_publish15.checksTimeout) || KODRDRIV_DEFAULTS.publish.checksTimeout;
|
|
713
|
+
const senditMode = ((_runConfig_publish16 = runConfig.publish) === null || _runConfig_publish16 === void 0 ? void 0 : _runConfig_publish16.sendit) || false;
|
|
714
714
|
// sendit flag overrides skipUserConfirmation - if sendit is true, skip confirmation
|
|
715
|
-
const skipUserConfirmation = senditMode || ((
|
|
715
|
+
const skipUserConfirmation = senditMode || ((_runConfig_publish17 = runConfig.publish) === null || _runConfig_publish17 === void 0 ? void 0 : _runConfig_publish17.skipUserConfirmation) || false;
|
|
716
716
|
await waitForPullRequestChecks(pr.number, {
|
|
717
717
|
timeout,
|
|
718
718
|
skipUserConfirmation
|
|
@@ -913,9 +913,9 @@ const execute = async (runConfig)=>{
|
|
|
913
913
|
}
|
|
914
914
|
logger.info('Creating GitHub release...');
|
|
915
915
|
if (isDryRun) {
|
|
916
|
-
var
|
|
916
|
+
var _runConfig_publish18;
|
|
917
917
|
logger.info('Would read package.json version and create GitHub release with retry logic');
|
|
918
|
-
const milestonesEnabled = !((
|
|
918
|
+
const milestonesEnabled = !((_runConfig_publish18 = runConfig.publish) === null || _runConfig_publish18 === void 0 ? void 0 : _runConfig_publish18.noMilestones);
|
|
919
919
|
if (milestonesEnabled) {
|
|
920
920
|
logger.info('Would close milestone for released version');
|
|
921
921
|
} else {
|
|
@@ -931,11 +931,11 @@ const execute = async (runConfig)=>{
|
|
|
931
931
|
let retries = 3;
|
|
932
932
|
while(retries > 0){
|
|
933
933
|
try {
|
|
934
|
-
var
|
|
934
|
+
var _runConfig_publish19;
|
|
935
935
|
await createRelease(tagName, releaseTitle, releaseNotesContent);
|
|
936
936
|
logger.info(`GitHub release created successfully for tag: ${tagName}`);
|
|
937
937
|
// Close milestone for this version if enabled
|
|
938
|
-
const milestonesEnabled = !((
|
|
938
|
+
const milestonesEnabled = !((_runConfig_publish19 = runConfig.publish) === null || _runConfig_publish19 === void 0 ? void 0 : _runConfig_publish19.noMilestones);
|
|
939
939
|
if (milestonesEnabled) {
|
|
940
940
|
logger.info('🏁 Closing milestone for released version...');
|
|
941
941
|
const version = tagName.replace(/^v/, ''); // Remove 'v' prefix if present
|
|
@@ -968,12 +968,12 @@ const execute = async (runConfig)=>{
|
|
|
968
968
|
if (isDryRun) {
|
|
969
969
|
logger.info('Would monitor GitHub Actions workflows triggered by release');
|
|
970
970
|
} else {
|
|
971
|
-
var
|
|
972
|
-
const workflowTimeout = ((
|
|
973
|
-
const senditMode = ((
|
|
974
|
-
const skipUserConfirmation = senditMode || ((
|
|
971
|
+
var _runConfig_publish20, _runConfig_publish21, _runConfig_publish22, _runConfig_publish23;
|
|
972
|
+
const workflowTimeout = ((_runConfig_publish20 = runConfig.publish) === null || _runConfig_publish20 === void 0 ? void 0 : _runConfig_publish20.releaseWorkflowsTimeout) || KODRDRIV_DEFAULTS.publish.releaseWorkflowsTimeout;
|
|
973
|
+
const senditMode = ((_runConfig_publish21 = runConfig.publish) === null || _runConfig_publish21 === void 0 ? void 0 : _runConfig_publish21.sendit) || false;
|
|
974
|
+
const skipUserConfirmation = senditMode || ((_runConfig_publish22 = runConfig.publish) === null || _runConfig_publish22 === void 0 ? void 0 : _runConfig_publish22.skipUserConfirmation) || false;
|
|
975
975
|
// Get workflow names - either from config or auto-detect
|
|
976
|
-
let workflowNames = (
|
|
976
|
+
let workflowNames = (_runConfig_publish23 = runConfig.publish) === null || _runConfig_publish23 === void 0 ? void 0 : _runConfig_publish23.releaseWorkflowNames;
|
|
977
977
|
if (!workflowNames || workflowNames.length === 0) {
|
|
978
978
|
logger.info('No specific workflow names configured, auto-detecting workflows triggered by release events...');
|
|
979
979
|
try {
|