@cbnventures/nova 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/build/package.json +10 -8
  2. package/build/src/cli/generate/github/workflows-blueprint-validate.js +1 -1
  3. package/build/src/cli/generate/github/workflows-blueprint-validate.js.map +1 -1
  4. package/build/src/cli/generate/github/workflows-blueprint.d.ts +6 -3
  5. package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -1
  6. package/build/src/cli/generate/github/workflows-blueprint.js +122 -26
  7. package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -1
  8. package/build/src/cli/index.js +79 -28
  9. package/build/src/cli/index.js.map +1 -1
  10. package/build/src/cli/recipe/github/gh-commands.d.ts +3 -0
  11. package/build/src/cli/recipe/github/gh-commands.d.ts.map +1 -0
  12. package/build/src/cli/recipe/github/gh-commands.js +28 -0
  13. package/build/src/cli/recipe/github/gh-commands.js.map +1 -0
  14. package/build/src/cli/recipe/github/sync-actions.d.ts +5 -0
  15. package/build/src/cli/recipe/github/sync-actions.d.ts.map +1 -0
  16. package/build/src/cli/recipe/github/sync-actions.js +103 -0
  17. package/build/src/cli/recipe/github/sync-actions.js.map +1 -0
  18. package/build/src/cli/recipe/github/sync-features.d.ts.map +1 -1
  19. package/build/src/cli/recipe/github/sync-features.js +46 -11
  20. package/build/src/cli/recipe/github/sync-features.js.map +1 -1
  21. package/build/src/cli/recipe/github/sync-labels.d.ts +5 -0
  22. package/build/src/cli/recipe/github/sync-labels.d.ts.map +1 -0
  23. package/build/src/cli/recipe/github/sync-labels.js +40 -0
  24. package/build/src/cli/recipe/github/sync-labels.js.map +1 -0
  25. package/build/src/cli/recipe/github/sync-policies.d.ts.map +1 -1
  26. package/build/src/cli/recipe/github/sync-policies.js +89 -10
  27. package/build/src/cli/recipe/github/sync-policies.js.map +1 -1
  28. package/build/src/cli/recipe/github/sync-rulesets.d.ts +5 -0
  29. package/build/src/cli/recipe/github/sync-rulesets.d.ts.map +1 -0
  30. package/build/src/cli/recipe/github/sync-rulesets.js +137 -0
  31. package/build/src/cli/recipe/github/sync-rulesets.js.map +1 -0
  32. package/build/src/cli/recipe/github/sync-security.d.ts +5 -0
  33. package/build/src/cli/recipe/github/sync-security.d.ts.map +1 -0
  34. package/build/src/cli/recipe/github/sync-security.js +69 -0
  35. package/build/src/cli/recipe/github/sync-security.js.map +1 -0
  36. package/build/src/cli/recipe/index.d.ts.map +1 -1
  37. package/build/src/cli/recipe/index.js +20 -0
  38. package/build/src/cli/recipe/index.js.map +1 -1
  39. package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -1
  40. package/build/src/cli/recipe/package-json/sync-environment.js +16 -15
  41. package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -1
  42. package/build/src/cli/scaffold/docs/docusaurus.d.ts +2 -1
  43. package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -1
  44. package/build/src/cli/scaffold/docs/docusaurus.js +41 -1
  45. package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -1
  46. package/build/src/cli/scaffold/starter/base.d.ts.map +1 -1
  47. package/build/src/cli/scaffold/starter/base.js +57 -6
  48. package/build/src/cli/scaffold/starter/base.js.map +1 -1
  49. package/build/src/cli/utility/changelog.d.ts +1 -0
  50. package/build/src/cli/utility/changelog.d.ts.map +1 -1
  51. package/build/src/cli/utility/changelog.js +183 -67
  52. package/build/src/cli/utility/changelog.js.map +1 -1
  53. package/build/src/cli/utility/initialize.d.ts.map +1 -1
  54. package/build/src/cli/utility/initialize.js +133 -45
  55. package/build/src/cli/utility/initialize.js.map +1 -1
  56. package/build/src/cli/utility/run-scripts.d.ts +5 -5
  57. package/build/src/cli/utility/run-scripts.d.ts.map +1 -1
  58. package/build/src/cli/utility/run-scripts.js +28 -252
  59. package/build/src/cli/utility/run-scripts.js.map +1 -1
  60. package/build/src/cli/utility/transpile.d.ts.map +1 -1
  61. package/build/src/cli/utility/transpile.js +23 -5
  62. package/build/src/cli/utility/transpile.js.map +1 -1
  63. package/build/src/cli/utility/type-check.d.ts +2 -4
  64. package/build/src/cli/utility/type-check.d.ts.map +1 -1
  65. package/build/src/cli/utility/type-check.js +13 -54
  66. package/build/src/cli/utility/type-check.js.map +1 -1
  67. package/build/src/cli/utility/version.d.ts.map +1 -1
  68. package/build/src/cli/utility/version.js +0 -12
  69. package/build/src/cli/utility/version.js.map +1 -1
  70. package/build/src/lib/corepack.d.ts +5 -0
  71. package/build/src/lib/corepack.d.ts.map +1 -0
  72. package/build/src/lib/corepack.js +26 -0
  73. package/build/src/lib/corepack.js.map +1 -0
  74. package/build/src/lib/item.d.ts.map +1 -1
  75. package/build/src/lib/item.js +4 -1
  76. package/build/src/lib/item.js.map +1 -1
  77. package/build/src/lib/nova-config.d.ts +8 -0
  78. package/build/src/lib/nova-config.d.ts.map +1 -1
  79. package/build/src/lib/nova-config.js +329 -7
  80. package/build/src/lib/nova-config.js.map +1 -1
  81. package/build/src/lib/regex.d.ts +7 -0
  82. package/build/src/lib/regex.d.ts.map +1 -1
  83. package/build/src/lib/regex.js +8 -1
  84. package/build/src/lib/regex.js.map +1 -1
  85. package/build/src/lib/release-history.d.ts +5 -0
  86. package/build/src/lib/release-history.d.ts.map +1 -0
  87. package/build/src/lib/release-history.js +86 -0
  88. package/build/src/lib/release-history.js.map +1 -0
  89. package/build/src/lib/run-scripts.d.ts +10 -0
  90. package/build/src/lib/run-scripts.d.ts.map +1 -0
  91. package/build/src/lib/run-scripts.js +310 -0
  92. package/build/src/lib/run-scripts.js.map +1 -0
  93. package/build/src/lib/scaffold.d.ts +7 -2
  94. package/build/src/lib/scaffold.d.ts.map +1 -1
  95. package/build/src/lib/scaffold.js +398 -53
  96. package/build/src/lib/scaffold.js.map +1 -1
  97. package/build/src/lib/type-check.d.ts +3 -0
  98. package/build/src/lib/type-check.d.ts.map +1 -0
  99. package/build/src/lib/type-check.js +69 -0
  100. package/build/src/lib/type-check.js.map +1 -0
  101. package/build/src/presets/tsconfig/dx-strict.json +0 -1
  102. package/build/src/presets/tsconfig/fw-homebridge.json +11 -0
  103. package/build/src/rules/eslint/regex/no-regex-literals.d.ts +1 -0
  104. package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -1
  105. package/build/src/rules/eslint/regex/no-regex-literals.js +20 -1
  106. package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -1
  107. package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts +1 -0
  108. package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts.map +1 -1
  109. package/build/src/rules/eslint/typescript/no-shared-type-import.js +19 -1
  110. package/build/src/rules/eslint/typescript/no-shared-type-import.js.map +1 -1
  111. package/build/src/toolkit/index.d.ts +1 -0
  112. package/build/src/toolkit/index.d.ts.map +1 -1
  113. package/build/src/toolkit/index.js +1 -0
  114. package/build/src/toolkit/index.js.map +1 -1
  115. package/build/src/toolkit/vitest-setup.d.ts +6 -0
  116. package/build/src/toolkit/vitest-setup.d.ts.map +1 -0
  117. package/build/src/toolkit/vitest-setup.js +21 -0
  118. package/build/src/toolkit/vitest-setup.js.map +1 -0
  119. package/build/src/types/cli/generate/github/workflows-blueprint-validate.d.ts +4 -4
  120. package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +69 -3
  121. package/build/src/types/cli/recipe/github/gh-commands.d.ts +34 -0
  122. package/build/src/types/cli/recipe/github/sync-actions.d.ts +43 -0
  123. package/build/src/types/cli/recipe/github/sync-features.d.ts +16 -2
  124. package/build/src/types/cli/recipe/github/sync-labels.d.ts +36 -0
  125. package/build/src/types/cli/recipe/github/sync-policies.d.ts +14 -2
  126. package/build/src/types/cli/recipe/github/sync-rulesets.d.ts +71 -0
  127. package/build/src/types/cli/recipe/github/sync-security.d.ts +34 -0
  128. package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +3 -0
  129. package/build/src/types/cli/scaffold/app/expressjs.d.ts +3 -0
  130. package/build/src/types/cli/scaffold/app/nextjs.d.ts +3 -0
  131. package/build/src/types/cli/scaffold/app/vite.d.ts +3 -0
  132. package/build/src/types/cli/scaffold/app/workers.d.ts +3 -0
  133. package/build/src/types/cli/scaffold/docs/docusaurus.d.ts +15 -0
  134. package/build/src/types/cli/scaffold/starter/base.d.ts +11 -0
  135. package/build/src/types/cli/utility/changelog.d.ts +87 -26
  136. package/build/src/types/cli/utility/initialize.d.ts +39 -29
  137. package/build/src/types/cli/utility/run-scripts.d.ts +22 -174
  138. package/build/src/types/cli/utility/transpile.d.ts +9 -1
  139. package/build/src/types/cli/utility/type-check.d.ts +9 -71
  140. package/build/src/types/cli/utility/version.d.ts +1 -7
  141. package/build/src/types/lib/corepack.d.ts +19 -0
  142. package/build/src/types/lib/nova-config.d.ts +256 -23
  143. package/build/src/types/lib/regex.d.ts +42 -0
  144. package/build/src/types/lib/release-history.d.ts +57 -0
  145. package/build/src/types/lib/run-scripts.d.ts +264 -0
  146. package/build/src/types/lib/scaffold.d.ts +187 -10
  147. package/build/src/types/lib/type-check.d.ts +102 -0
  148. package/build/src/types/rules/eslint/regex/no-regex-literals.d.ts +21 -0
  149. package/build/src/types/rules/eslint/typescript/no-shared-type-import.d.ts +21 -0
  150. package/build/src/types/shared.d.ts +264 -22
  151. package/build/src/types/tests/cli/generate/github/workflows-blueprint.test.d.ts +4 -0
  152. package/build/src/types/tests/cli/index.test.d.ts +258 -0
  153. package/build/src/types/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +27 -0
  154. package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +4 -0
  155. package/build/src/types/tests/cli/scaffold/app/nextjs.test.d.ts +4 -0
  156. package/build/src/types/tests/cli/scaffold/app/vite.test.d.ts +48 -0
  157. package/build/src/types/tests/cli/scaffold/app/workers.test.d.ts +4 -0
  158. package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +10 -2
  159. package/build/src/types/tests/cli/utility/changelog.test.d.ts +99 -0
  160. package/build/src/types/tests/cli/utility/initialize.test.d.ts +43 -0
  161. package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +29 -0
  162. package/build/src/types/tests/cli/utility/transpile.test.d.ts +28 -0
  163. package/build/src/types/tests/cli/utility/type-check.test.d.ts +33 -0
  164. package/build/src/types/tests/lib/nova-config.test.d.ts +19 -19
  165. package/build/src/types/tests/lib/regex.test.d.ts +7 -0
  166. package/build/src/types/tests/lib/release-history.test.d.ts +94 -0
  167. package/build/src/types/tests/lib/scaffold.test.d.ts +88 -0
  168. package/build/src/types/tests/rules/eslint/regex/no-regex-literals.test.d.ts +46 -0
  169. package/build/src/types/tests/rules/eslint/typescript/no-shared-type-import.test.d.ts +46 -0
  170. package/build/src/types/tests/scaffold-output-contract.test.d.ts +104 -0
  171. package/build/src/types/tests/scaffold-template-source.test.d.ts +42 -0
  172. package/build/src/types/tests/toolkit/vitest-setup.test.d.ts +36 -0
  173. package/build/src/types/tests/tsconfig-presets.test.d.ts +81 -0
  174. package/build/src/types/toolkit/vitest-setup.d.ts +24 -0
  175. package/build/templates/generators/github/workflows/publish/base.yml +1 -1
  176. package/build/templates/generators/github/workflows/publish/targets/cloudflare-workers.yml +1 -1
  177. package/build/templates/generators/must-haves/agent-conventions/PROJECT_RULES.md +11 -11
  178. package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +4 -4
  179. package/build/templates/scaffold/app/express/package.json +2 -2
  180. package/build/templates/scaffold/app/express/tsconfig.json +1 -0
  181. package/build/templates/scaffold/app/nextjs/package.json +9 -10
  182. package/build/templates/scaffold/app/nextjs/tsconfig.json +3 -2
  183. package/build/templates/scaffold/app/vite/package.json +3 -3
  184. package/build/templates/scaffold/app/workers/package.json +4 -4
  185. package/build/templates/scaffold/app/workers/wrangler.toml +1 -1
  186. package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +14 -12
  187. package/build/templates/scaffold/docs/docusaurus/package.json +13 -9
  188. package/build/templates/scaffold/docs/docusaurus/src/pages/index.mdx +8 -0
  189. package/build/templates/scaffold/docs/docusaurus/tsconfig.json +11 -5
  190. package/build/templates/scaffold/docs/docusaurus/{vitest.config.ts → vitest.config.mts} +11 -0
  191. package/build/templates/scaffold/docs/docusaurus/vitest.setup.ts +5 -14
  192. package/package.json +10 -8
  193. /package/build/templates/scaffold/docs/docusaurus/docs/{intro.md → intro.mdx} +0 -0
@@ -10,6 +10,7 @@ import { libEnvStatus } from '../../lib/env-status.js';
10
10
  import { libItemAllowedAgents, libItemAllowedPoliciesByRole, libItemAllowedRecipes, libItemSyncRoles, libItemValidEntityRoles, } from '../../lib/item.js';
11
11
  import { Runner as LibNovaConfig } from '../../lib/nova-config.js';
12
12
  import { LIB_REGEX_LINEBREAK_CRLF_OR_LF, LIB_REGEX_PATTERN_EMAIL_SIMPLE, LIB_REGEX_PATTERN_ENV_VAR_KEY, LIB_REGEX_PATTERN_SLUG_SCOPED, LIB_REGEX_PATTERN_SLUG_SIMPLE, LIB_REGEX_PATTERN_YML_EXTENSION, } from '../../lib/regex.js';
13
+ import { Runner as LibReleaseHistory } from '../../lib/release-history.js';
13
14
  import { discoverPathsWithFile, pathExists, resolveTemplatePath } from '../../lib/utility.js';
14
15
  import { libWorkflowTemplatesMetadata } from '../../lib/workflow-templates.js';
15
16
  import { Logger } from '../../toolkit/index.js';
@@ -38,6 +39,17 @@ export class Runner {
38
39
  }
39
40
  const novaConfig = new LibNovaConfig();
40
41
  const workingFile = await novaConfig.load();
42
+ try {
43
+ await LibReleaseHistory.validateStrategy(workingFile, currentDirectory);
44
+ }
45
+ catch (error) {
46
+ Logger.customize({
47
+ name: 'Runner.run',
48
+ purpose: 'versionStrategy',
49
+ }).error((error instanceof Error) ? error.message : 'Unable to validate the configured version strategy.');
50
+ process.exitCode = 1;
51
+ return;
52
+ }
41
53
  if (options['status'] === true) {
42
54
  await Runner.promptEnvironmentReconcile(workingFile, false);
43
55
  return;
@@ -918,15 +930,19 @@ export class Runner {
918
930
  const repoOutputResult = repoOutput['result'];
919
931
  const githubRepoInput = repoOutputResult.githubRepo.trim();
920
932
  const existingRecipes = (config['recipes'] !== undefined) ? config['recipes']['github'] : undefined;
921
- const syncIdentityInitial = (existingRecipes !== undefined && existingRecipes['sync-identity'] !== undefined) ? existingRecipes['sync-identity']['enabled'] : true;
933
+ const syncActionsInitial = (existingRecipes !== undefined && existingRecipes['sync-actions'] !== undefined) ? existingRecipes['sync-actions']['enabled'] : false;
922
934
  const syncFeaturesInitial = (existingRecipes !== undefined && existingRecipes['sync-features'] !== undefined) ? existingRecipes['sync-features']['enabled'] : false;
935
+ const syncIdentityInitial = (existingRecipes !== undefined && existingRecipes['sync-identity'] !== undefined) ? existingRecipes['sync-identity']['enabled'] : true;
936
+ const syncLabelsInitial = (existingRecipes !== undefined && existingRecipes['sync-labels'] !== undefined) ? existingRecipes['sync-labels']['enabled'] : false;
923
937
  const syncPoliciesInitial = (existingRecipes !== undefined && existingRecipes['sync-policies'] !== undefined) ? existingRecipes['sync-policies']['enabled'] : false;
938
+ const syncRulesetsInitial = (existingRecipes !== undefined && existingRecipes['sync-rulesets'] !== undefined) ? existingRecipes['sync-rulesets']['enabled'] : false;
939
+ const syncSecurityInitial = (existingRecipes !== undefined && existingRecipes['sync-security'] !== undefined) ? existingRecipes['sync-security']['enabled'] : false;
924
940
  const recipesOutput = await Runner.promptWithCancel([
925
941
  {
926
942
  type: 'confirm',
927
- name: 'githubRecipeSyncIdentity',
928
- message: 'Enable sync-identity recipe?',
929
- initial: syncIdentityInitial,
943
+ name: 'githubRecipeSyncActions',
944
+ message: 'Enable sync-actions recipe?',
945
+ initial: syncActionsInitial,
930
946
  },
931
947
  {
932
948
  type: 'confirm',
@@ -934,27 +950,63 @@ export class Runner {
934
950
  message: 'Enable sync-features recipe?',
935
951
  initial: syncFeaturesInitial,
936
952
  },
953
+ {
954
+ type: 'confirm',
955
+ name: 'githubRecipeSyncIdentity',
956
+ message: 'Enable sync-identity recipe?',
957
+ initial: syncIdentityInitial,
958
+ },
959
+ {
960
+ type: 'confirm',
961
+ name: 'githubRecipeSyncLabels',
962
+ message: 'Enable sync-labels recipe?',
963
+ initial: syncLabelsInitial,
964
+ },
937
965
  {
938
966
  type: 'confirm',
939
967
  name: 'githubRecipeSyncPolicies',
940
968
  message: 'Enable sync-policies recipe?',
941
969
  initial: syncPoliciesInitial,
942
970
  },
971
+ {
972
+ type: 'confirm',
973
+ name: 'githubRecipeSyncRulesets',
974
+ message: 'Enable sync-rulesets recipe?',
975
+ initial: syncRulesetsInitial,
976
+ },
977
+ {
978
+ type: 'confirm',
979
+ name: 'githubRecipeSyncSecurity',
980
+ message: 'Enable sync-security recipe?',
981
+ initial: syncSecurityInitial,
982
+ },
943
983
  ]);
944
984
  if (recipesOutput['cancelled'] === true) {
945
985
  return 'back';
946
986
  }
947
987
  const recipesOutputResult = recipesOutput['result'];
948
988
  const githubRecipesInput = {
949
- 'sync-identity': {
950
- enabled: recipesOutputResult.githubRecipeSyncIdentity,
989
+ 'sync-actions': {
990
+ enabled: recipesOutputResult.githubRecipeSyncActions,
951
991
  },
952
992
  'sync-features': {
953
993
  enabled: recipesOutputResult.githubRecipeSyncFeatures,
954
994
  },
995
+ 'sync-identity': {
996
+ enabled: recipesOutputResult.githubRecipeSyncIdentity,
997
+ },
998
+ 'sync-labels': {
999
+ enabled: recipesOutputResult.githubRecipeSyncLabels,
1000
+ },
955
1001
  'sync-policies': {
956
1002
  enabled: recipesOutputResult.githubRecipeSyncPolicies,
957
1003
  },
1004
+ 'sync-rulesets': {
1005
+ enabled: recipesOutputResult.githubRecipeSyncRulesets,
1006
+ },
1007
+ 'sync-security': {
1008
+ enabled: recipesOutputResult.githubRecipeSyncSecurity,
1009
+ },
958
1010
  };
959
1011
  const existingTopics = github['topics'];
960
1012
  const topicsHasExisting = (existingTopics !== undefined) && existingTopics.length > 0;
@@ -1020,6 +1072,10 @@ export class Runner {
1020
1072
  if (existingFeatures !== undefined && existingFeatures['discussions'] !== undefined) {
1021
1073
  featuresDiscussionsInitial = (existingFeatures['discussions'] === true) ? 1 : 2;
1022
1074
  }
1075
+ let featuresSponsorshipsInitial = 0;
1076
+ if (existingFeatures !== undefined && existingFeatures['sponsorships'] !== undefined) {
1077
+ featuresSponsorshipsInitial = (existingFeatures['sponsorships'] === true) ? 1 : 2;
1078
+ }
1023
1079
  const featuresOutput = await Runner.promptWithCancel([
1024
1080
  {
1025
1081
  type: 'select',
@@ -1101,6 +1157,26 @@ export class Runner {
1101
1157
  ],
1102
1158
  initial: featuresDiscussionsInitial,
1103
1159
  },
1160
+ {
1161
+ type: 'select',
1162
+ name: 'githubFeaturesSponsorships',
1163
+ message: 'GitHub features.sponsorships (sync this field?)',
1164
+ choices: [
1165
+ {
1166
+ title: 'Skip (don\'t sync this field)',
1167
+ value: 'skip',
1168
+ },
1169
+ {
1170
+ title: 'Enable',
1171
+ value: true,
1172
+ },
1173
+ {
1174
+ title: 'Disable',
1175
+ value: false,
1176
+ },
1177
+ ],
1178
+ initial: featuresSponsorshipsInitial,
1179
+ },
1104
1180
  ]);
1105
1181
  if (featuresOutput['cancelled'] === true) {
1106
1182
  return 'back';
@@ -1111,15 +1187,18 @@ export class Runner {
1111
1187
  const featuresWikiValue = featuresOutputResult.githubFeaturesWiki;
1112
1188
  const featuresProjectsValue = featuresOutputResult.githubFeaturesProjects;
1113
1189
  const featuresDiscussionsValue = featuresOutputResult.githubFeaturesDiscussions;
1190
+ const featuresSponsorshipsValue = featuresOutputResult.githubFeaturesSponsorships;
1114
1191
  if (featuresIssuesValue !== 'skip'
1115
1192
  || featuresWikiValue !== 'skip'
1116
1193
  || featuresProjectsValue !== 'skip'
1117
- || featuresDiscussionsValue !== 'skip') {
1194
+ || featuresDiscussionsValue !== 'skip'
1195
+ || featuresSponsorshipsValue !== 'skip') {
1118
1196
  githubFeaturesInput = {
1119
1197
  ...((featuresIssuesValue !== 'skip') ? { issues: featuresIssuesValue } : {}),
1120
1198
  ...((featuresWikiValue !== 'skip') ? { wiki: featuresWikiValue } : {}),
1121
1199
  ...((featuresProjectsValue !== 'skip') ? { projects: featuresProjectsValue } : {}),
1122
1200
  ...((featuresDiscussionsValue !== 'skip') ? { discussions: featuresDiscussionsValue } : {}),
1201
+ ...((featuresSponsorshipsValue !== 'skip') ? { sponsorships: featuresSponsorshipsValue } : {}),
1123
1202
  };
1124
1203
  }
1125
1204
  const existingPolicies = github['policies'];
@@ -1321,16 +1400,19 @@ export class Runner {
1321
1400
  const autoDeleteOutputResult = autoDeleteOutput['result'];
1322
1401
  const githubPoliciesAutoDeleteValue = autoDeleteOutputResult.githubPoliciesAutoDeleteHeadBranch;
1323
1402
  let githubPoliciesInput = undefined;
1324
- if (githubPoliciesVisibilityValue !== 'skip'
1325
- || githubPoliciesDefaultBranchValue !== 'skip'
1326
- || githubPoliciesMergeMethodsInput !== undefined
1327
- || githubPoliciesAutoDeleteValue !== 'skip') {
1328
- githubPoliciesInput = {
1329
- ...((githubPoliciesVisibilityValue !== 'skip') ? { visibility: githubPoliciesVisibilityValue } : {}),
1330
- ...((githubPoliciesDefaultBranchValue !== 'skip') ? { defaultBranch: githubPoliciesDefaultBranchValue } : {}),
1331
- ...((githubPoliciesMergeMethodsInput !== undefined) ? { mergeMethods: githubPoliciesMergeMethodsInput } : {}),
1332
- ...((githubPoliciesAutoDeleteValue !== 'skip') ? { autoDeleteHeadBranch: githubPoliciesAutoDeleteValue } : {}),
1333
- };
1403
+ githubPoliciesInput = {
1404
+ ...((githubPoliciesVisibilityValue !== 'skip') ? { visibility: githubPoliciesVisibilityValue } : {}),
1405
+ ...((githubPoliciesDefaultBranchValue !== 'skip') ? { defaultBranch: githubPoliciesDefaultBranchValue } : {}),
1406
+ ...((githubPoliciesMergeMethodsInput !== undefined) ? { mergeMethods: githubPoliciesMergeMethodsInput } : {}),
1407
+ ...((existingPolicies !== undefined && existingPolicies['mergeCommit'] !== undefined) ? { mergeCommit: existingPolicies['mergeCommit'] } : {}),
1408
+ ...((existingPolicies !== undefined && existingPolicies['squashMerge'] !== undefined) ? { squashMerge: existingPolicies['squashMerge'] } : {}),
1409
+ ...((githubPoliciesAutoDeleteValue !== 'skip') ? { autoDeleteHeadBranch: githubPoliciesAutoDeleteValue } : {}),
1410
+ ...((existingPolicies !== undefined && existingPolicies['autoMerge'] !== undefined) ? { autoMerge: existingPolicies['autoMerge'] } : {}),
1411
+ ...((existingPolicies !== undefined && existingPolicies['allowUpdateBranch'] !== undefined) ? { allowUpdateBranch: existingPolicies['allowUpdateBranch'] } : {}),
1412
+ ...((existingPolicies !== undefined && existingPolicies['webCommitSignoffRequired'] !== undefined) ? { webCommitSignoffRequired: existingPolicies['webCommitSignoffRequired'] } : {}),
1413
+ };
1414
+ if (Object.keys(githubPoliciesInput).length === 0) {
1415
+ githubPoliciesInput = undefined;
1334
1416
  }
1335
1417
  const existingGithubForIssueTemplate = (config['github'] !== undefined) ? config['github']['issueTemplate'] : undefined;
1336
1418
  const existingBugReportFields = (existingGithubForIssueTemplate !== undefined) ? (existingGithubForIssueTemplate['bugReportFields'] ?? []) : [];
@@ -1413,6 +1495,10 @@ export class Runner {
1413
1495
  ...((githubTopicsInput !== undefined) ? { topics: githubTopicsInput } : {}),
1414
1496
  ...((githubFeaturesInput !== undefined) ? { features: githubFeaturesInput } : {}),
1415
1497
  ...((githubPoliciesInput !== undefined) ? { policies: githubPoliciesInput } : {}),
1498
+ ...((github['security'] !== undefined) ? { security: github['security'] } : {}),
1499
+ ...((github['rulesets'] !== undefined) ? { rulesets: github['rulesets'] } : {}),
1500
+ ...((github['actions'] !== undefined) ? { actions: github['actions'] } : {}),
1501
+ ...((github['labels'] !== undefined) ? { labels: github['labels'] } : {}),
1416
1502
  ...((issueTemplateInput !== undefined) ? { issueTemplate: issueTemplateInput } : {}),
1417
1503
  };
1418
1504
  Object.assign(config, { github: githubConfig });
@@ -1828,12 +1914,12 @@ export class Runner {
1828
1914
  const existingSuffix = (workflow !== undefined && typeof workflow['name'] === 'string') ? workflow['name'] : '';
1829
1915
  const existingTriggers = (workflow !== undefined && Array.isArray(workflow['triggers']) === true) ? workflow['triggers'] : [];
1830
1916
  const existingTriggerNames = existingTriggers.map((trigger) => (typeof trigger === 'string') ? trigger : trigger['name']);
1831
- const existingDependsOn = [];
1917
+ const existingUpstreamWorkflows = [];
1832
1918
  for (const trigger of existingTriggers) {
1833
1919
  if (typeof trigger !== 'string' && Array.isArray(trigger['workflows']) === true) {
1834
1920
  for (const upstream of trigger['workflows']) {
1835
- if (existingDependsOn.includes(upstream) === false) {
1836
- existingDependsOn.push(upstream);
1921
+ if (existingUpstreamWorkflows.includes(upstream) === false) {
1922
+ existingUpstreamWorkflows.push(upstream);
1837
1923
  }
1838
1924
  }
1839
1925
  }
@@ -1937,34 +2023,34 @@ export class Runner {
1937
2023
  };
1938
2024
  }
1939
2025
  }
1940
- let selectedDependsOn = undefined;
2026
+ let selectedUpstreamWorkflows = undefined;
1941
2027
  if (selectedTriggers.some((trigger) => trigger.startsWith('workflow-run')) === true) {
1942
- const dependsOnChoices = workflows
2028
+ const upstreamWorkflowChoices = workflows
1943
2029
  .filter((w) => w !== workflow
1944
2030
  && typeof w['template'] === 'string'
1945
2031
  && w['template'].trim() !== '')
1946
2032
  .map((w) => {
1947
- const dependsOnKey = (typeof w['name'] === 'string' && w['name'].trim() !== '') ? `${w['template']}-${w['name']}` : w['template'];
2033
+ const upstreamWorkflowKey = (typeof w['name'] === 'string' && w['name'].trim() !== '') ? `${w['template']}-${w['name']}` : w['template'];
1948
2034
  return {
1949
- title: dependsOnKey,
1950
- value: dependsOnKey,
1951
- selected: existingDependsOn.includes(dependsOnKey),
2035
+ title: upstreamWorkflowKey,
2036
+ value: upstreamWorkflowKey,
2037
+ selected: existingUpstreamWorkflows.includes(upstreamWorkflowKey),
1952
2038
  };
1953
2039
  });
1954
- if (dependsOnChoices.length > 0) {
1955
- const dependsOnOutput = await Runner.promptWithCancel({
2040
+ if (upstreamWorkflowChoices.length > 0) {
2041
+ const upstreamWorkflowsOutput = await Runner.promptWithCancel({
1956
2042
  type: 'multiselect',
1957
- name: 'dependsOn',
1958
- message: 'Select the workflows this depends on.',
1959
- choices: dependsOnChoices,
2043
+ name: 'upstreamWorkflows',
2044
+ message: 'Select upstream workflows that can start this workflow.',
2045
+ choices: upstreamWorkflowChoices,
1960
2046
  });
1961
- if (dependsOnOutput['cancelled'] === true) {
2047
+ if (upstreamWorkflowsOutput['cancelled'] === true) {
1962
2048
  return {
1963
2049
  action: 'back',
1964
2050
  };
1965
2051
  }
1966
- const dependsOnOutputResultValue = dependsOnOutput['result'];
1967
- selectedDependsOn = (Array.isArray(dependsOnOutputResultValue.dependsOn) === true && dependsOnOutputResultValue.dependsOn.length > 0) ? dependsOnOutputResultValue.dependsOn : undefined;
2052
+ const upstreamWorkflowsOutputResultValue = upstreamWorkflowsOutput['result'];
2053
+ selectedUpstreamWorkflows = (Array.isArray(upstreamWorkflowsOutputResultValue.upstreamWorkflows) === true && upstreamWorkflowsOutputResultValue.upstreamWorkflows.length > 0) ? upstreamWorkflowsOutputResultValue.upstreamWorkflows : undefined;
1968
2054
  }
1969
2055
  }
1970
2056
  const matchedMetadata = libWorkflowTemplatesMetadata.find((entry) => entry['name'] === selectedTemplate);
@@ -2244,10 +2330,10 @@ export class Runner {
2244
2330
  }
2245
2331
  }
2246
2332
  const resolvedTriggers = selectedTriggers.map((trigger) => {
2247
- if (trigger.startsWith('workflow-run') === true && selectedDependsOn !== undefined) {
2333
+ if (trigger.startsWith('workflow-run') === true && selectedUpstreamWorkflows !== undefined) {
2248
2334
  return {
2249
2335
  name: trigger,
2250
- workflows: selectedDependsOn,
2336
+ workflows: selectedUpstreamWorkflows,
2251
2337
  };
2252
2338
  }
2253
2339
  return trigger;
@@ -2997,7 +3083,7 @@ export class Runner {
2997
3083
  value: 'local',
2998
3084
  },
2999
3085
  {
3000
- title: 'managed (GitHub only, delivered nowhere)',
3086
+ title: 'managed (GitHub + local .env, not delivered by CI)',
3001
3087
  value: 'managed',
3002
3088
  },
3003
3089
  {
@@ -3067,20 +3153,22 @@ export class Runner {
3067
3153
  const settings = (config['settings'] !== undefined) ? { ...config['settings'] } : {};
3068
3154
  const currentStrategy = settings['versionStrategy'] ?? 'semver';
3069
3155
  const currentDirectory = process.cwd();
3070
- let isLocked = false;
3156
+ let lockedStrategy = undefined;
3071
3157
  try {
3072
- const changelogPath = join(currentDirectory, 'CHANGELOG.md');
3073
- const changelogContent = await fs.readFile(changelogPath, 'utf-8');
3074
- const hasRelease = changelogContent.split('\n').some((line) => line.startsWith('## '));
3075
- isLocked = hasRelease;
3158
+ lockedStrategy = await LibReleaseHistory.validateStrategy(config, currentDirectory);
3076
3159
  }
3077
- catch {
3160
+ catch (error) {
3161
+ Logger.customize({
3162
+ name: 'Runner.promptSettings',
3163
+ purpose: 'versionStrategy',
3164
+ }).error((error instanceof Error) ? error.message : 'Unable to validate the configured version strategy.');
3165
+ return 'back';
3078
3166
  }
3079
- if (isLocked === true) {
3167
+ if (lockedStrategy !== undefined) {
3080
3168
  Logger.customize({
3081
3169
  name: 'Runner.promptSettings',
3082
3170
  purpose: 'locked',
3083
- }).info(`Version strategy cannot be changed — this repo has an existing "${currentStrategy}" release.`);
3171
+ }).info(`Version strategy cannot be changed — this repo has existing "${lockedStrategy}" release history.`);
3084
3172
  return 'back';
3085
3173
  }
3086
3174
  const strategyChoices = [