@halospv3/hce.shared-config 3.5.3-develop.1 → 3.6.0-develop.1

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 (136) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -10
  3. package/dotnet/.github/workflows/_unit_test.yml +2 -2
  4. package/dotnet/.github/workflows/dotnet-release.yml +1 -1
  5. package/dotnet/.github/workflows/sample-dotnet-build.yml +1 -1
  6. package/dotnet/CleanupWpfTmp.targets +15 -0
  7. package/dotnet/HCE.Shared.targets +3 -0
  8. package/mjs/CaseInsensitiveMap.mjs.map +1 -1
  9. package/mjs/commitlintConfig.mjs.map +1 -1
  10. package/mjs/debug.mjs.map +1 -1
  11. package/mjs/dotnet/GithubNugetRegistryInfo.d.mts +5 -5
  12. package/mjs/dotnet/GithubNugetRegistryInfo.d.mts.map +1 -1
  13. package/mjs/dotnet/GithubNugetRegistryInfo.mjs +7 -7
  14. package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -1
  15. package/mjs/dotnet/GitlabNugetRegistryInfo.d.mts +6 -6
  16. package/mjs/dotnet/GitlabNugetRegistryInfo.d.mts.map +1 -1
  17. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +14 -14
  18. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -1
  19. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +5 -5
  20. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -1
  21. package/mjs/dotnet/MSBuildProject.d.mts +28 -28
  22. package/mjs/dotnet/MSBuildProject.d.mts.map +1 -1
  23. package/mjs/dotnet/MSBuildProject.mjs +88 -66
  24. package/mjs/dotnet/MSBuildProject.mjs.map +1 -1
  25. package/mjs/dotnet/MSBuildProjectProperties.d.mts.map +1 -1
  26. package/mjs/dotnet/MSBuildProjectProperties.mjs +1 -1
  27. package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -1
  28. package/mjs/dotnet/NugetProjectProperties.d.mts +3 -3
  29. package/mjs/dotnet/NugetProjectProperties.d.mts.map +1 -1
  30. package/mjs/dotnet/NugetProjectProperties.mjs +7 -9
  31. package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -1
  32. package/mjs/dotnet/NugetRegistryInfo.d.mts +40 -40
  33. package/mjs/dotnet/NugetRegistryInfo.d.mts.map +1 -1
  34. package/mjs/dotnet/NugetRegistryInfo.mjs +170 -148
  35. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -1
  36. package/mjs/dotnet/helpers.d.mts.map +1 -1
  37. package/mjs/dotnet/helpers.mjs +33 -34
  38. package/mjs/dotnet/helpers.mjs.map +1 -1
  39. package/mjs/eslintConfig.mjs.map +1 -1
  40. package/mjs/insertPlugins.mjs +2 -2
  41. package/mjs/insertPlugins.mjs.map +1 -1
  42. package/mjs/semantic-release__commit-analyzer.d.mts.map +1 -1
  43. package/mjs/semantic-release__exec.d.mts.map +1 -1
  44. package/mjs/semantic-release__git.d.mts.map +1 -1
  45. package/mjs/semantic-release__github.d.mts +1 -0
  46. package/mjs/semantic-release__github.d.mts.map +1 -1
  47. package/mjs/semanticReleaseConfig.d.mts.map +1 -1
  48. package/mjs/semanticReleaseConfig.mjs.map +1 -1
  49. package/mjs/semanticReleaseConfigDotnet.d.mts.map +1 -1
  50. package/mjs/semanticReleaseConfigDotnet.mjs +23 -16
  51. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -1
  52. package/mjs/setupGitPluginSpec.d.mts.map +1 -1
  53. package/mjs/setupGitPluginSpec.default.mjs.map +1 -1
  54. package/mjs/setupGitPluginSpec.mjs +19 -19
  55. package/mjs/setupGitPluginSpec.mjs.map +1 -1
  56. package/mjs/utils/Exact.d.mts.map +1 -1
  57. package/mjs/utils/GracefulRecursion.d.mts.map +1 -1
  58. package/mjs/utils/env.d.mts.map +1 -1
  59. package/mjs/utils/env.mjs.map +1 -1
  60. package/mjs/utils/execAsync.d.mts +3 -3
  61. package/mjs/utils/execAsync.d.mts.map +1 -1
  62. package/mjs/utils/execAsync.mjs +14 -12
  63. package/mjs/utils/execAsync.mjs.map +1 -1
  64. package/mjs/utils/isError.mjs.map +1 -1
  65. package/mjs/utils/miscTypes.d.mts.map +1 -1
  66. package/mjs/utils/miscTypes.mjs.map +1 -1
  67. package/mjs/utils/reflection/FunctionLike.d.mts +1 -0
  68. package/mjs/utils/reflection/FunctionLike.d.mts.map +1 -1
  69. package/mjs/utils/reflection/GetterDescriptor.d.mts.map +1 -1
  70. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mts.map +1 -1
  71. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mts +1 -1
  72. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mts.map +1 -1
  73. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mts +1 -1
  74. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mts.map +1 -1
  75. package/mjs/utils/reflection/OwnKeyOf.d.mts +1 -1
  76. package/mjs/utils/reflection/OwnKeyOf.d.mts.map +1 -1
  77. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mts.map +1 -1
  78. package/mjs/utils/reflection/PropertyDescriptorMap.d.mts +1 -1
  79. package/mjs/utils/reflection/PropertyDescriptorMap.d.mts.map +1 -1
  80. package/mjs/utils/reflection/filterForGetters.d.mts.map +1 -1
  81. package/mjs/utils/reflection/filterForGetters.mjs.map +1 -1
  82. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.mts.map +1 -1
  83. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -1
  84. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.mts.map +1 -1
  85. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +3 -3
  86. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -1
  87. package/mjs/utils/reflection/getPrototypeChainOf.d.mts +2 -2
  88. package/mjs/utils/reflection/getPrototypeChainOf.d.mts.map +1 -1
  89. package/mjs/utils/reflection/getPrototypeChainOf.mjs +1 -2
  90. package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -1
  91. package/mjs/utils/reflection/getPrototypeOf.d.mts.map +1 -1
  92. package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -1
  93. package/mjs/utils/reflection/inheritance.d.mts +4 -4
  94. package/mjs/utils/reflection/inheritance.d.mts.map +1 -1
  95. package/mjs/utils/reflection/inheritance.mjs.map +1 -1
  96. package/mjs/utils/reflection/isConstructor.d.mts +3 -3
  97. package/mjs/utils/reflection/isConstructor.d.mts.map +1 -1
  98. package/mjs/utils/reflection/isConstructor.mjs +7 -7
  99. package/mjs/utils/reflection/isConstructor.mjs.map +1 -1
  100. package/mjs/utils/reflection/isGetterDescriptor.d.mts.map +1 -1
  101. package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -1
  102. package/mjs/utils/reflection/listOwnGetters.d.mts.map +1 -1
  103. package/mjs/utils/reflection/listOwnGetters.mjs +4 -2
  104. package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -1
  105. package/mjs/utils/reflection.d.mts +1 -1
  106. package/package.json +26 -25
  107. package/src/dotnet/GithubNugetRegistryInfo.ts +18 -15
  108. package/src/dotnet/GitlabNugetRegistryInfo.ts +28 -26
  109. package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +6 -6
  110. package/src/dotnet/MSBuildProject.ts +103 -106
  111. package/src/dotnet/MSBuildProjectProperties.ts +1 -1
  112. package/src/dotnet/NugetProjectProperties.ts +13 -18
  113. package/src/dotnet/NugetRegistryInfo.ts +287 -243
  114. package/src/dotnet/helpers.ts +58 -58
  115. package/src/insertPlugins.ts +3 -3
  116. package/src/semantic-release__github.d.ts +1 -0
  117. package/src/semanticReleaseConfigDotnet.ts +52 -54
  118. package/src/setupGitPluginSpec.ts +25 -26
  119. package/src/utils/env.ts +1 -0
  120. package/src/utils/execAsync.ts +16 -13
  121. package/src/utils/reflection/FunctionLike.d.ts +1 -0
  122. package/src/utils/reflection/InstancePropertyDescriptorMap.d.ts +4 -4
  123. package/src/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.ts +6 -6
  124. package/src/utils/reflection/OwnGetterDescriptorMap.d.ts +2 -2
  125. package/src/utils/reflection/OwnKeyOf.d.ts +3 -3
  126. package/src/utils/reflection/OwnPropertyDescriptorMap.d.ts +3 -3
  127. package/src/utils/reflection/PropertyDescriptorMap.d.ts +3 -3
  128. package/src/utils/reflection/filterForGetters.ts +10 -10
  129. package/src/utils/reflection/getOwnPropertyDescriptors.ts +2 -2
  130. package/src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts +13 -13
  131. package/src/utils/reflection/getPrototypeChainOf.ts +17 -17
  132. package/src/utils/reflection/getPrototypeOf.ts +2 -2
  133. package/src/utils/reflection/inheritance.ts +5 -4
  134. package/src/utils/reflection/isConstructor.ts +7 -7
  135. package/src/utils/reflection/listOwnGetters.ts +8 -8
  136. package/tsconfig.base.json +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"insertPlugins.mjs","names":[],"sources":["../src/insertPlugins.ts"],"sourcesContent":["import type {\n PluginSpec,\n Options as SemanticReleaseOptions,\n} from 'semantic-release';\n\n/**\n * @since 3.0.0\n * @deprecated EXPERIMENTAL\n */\ninterface PluginInsertRuleSet {\n Id: string;\n BeforeIds: string[];\n AfterIds: string[];\n}\n\n/**\n * [W.I.P. STUB]\n *\n * Given an array of {@link PluginInsertRuleSet}s, insert plugins into a\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/structuredClone structured clone}\n * (i.e. deep-copy) of the {@link plugins} array, sort the plugin entries, and\n * return the modified array copy.\n * @todo implement\n * @param plugins Your {@link SemanticReleaseOptions.plugins} array.\n * @param inserts An array of {@link PluginInsertRuleSet}s.\n *\n * If a plugin is already in the plugins array, inserting is skipped. The\n * existing entry is sorted according to its ruleset.\n *\n * If any rulesets conflict, an error will be thrown.\n * - error: A must precede B; B must precede A.\n * - pass: C must precede D and E; D must precede E and follow B. Add ruleset\n * interface: {Id:string, BeforeIds:string[], AfterIds:string[] }\n * @returns A deep-cloned, modified copy of {@link plugins} with plugins\n * inserted and sorted where needed.\n * @since 3.0.0\n * @deprecated EXPERIMENTAL\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare function insertAndSortPlugins(\n plugins: Exclude<SemanticReleaseOptions['plugins'], undefined>,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n inserts: PluginInsertRuleSet[],\n): PluginSpec[];\n\n/**\n * @param plugins {@link SemanticReleaseOptions.plugins}\n * @param afterPluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must follow.\n * @param insertPluginIDs The `string` IDs of plugins to insert into a copy of the {@link plugins} array.\n * @param beforePluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must precede.\n * @returns\n * A modified copy of {@link plugins} with the given plugins inserted\n * before {@link beforePluginsIDs} and after {@link afterPluginsIDs}.\n *\n * Inserted plugins will be a `[string, {}]` tuple.\n * @throws {ReferenceError} This should never occur. One or more of the\n * {@link afterPluginsIDs} had been found in {@link plugins}, but a `.find` call\n * to get the highest index of the found plugins had returned `undefined`\n * @throws {AggregateError} One or more error occurred when inserting plugins: `insertPlugin was instructed to insert one or more plugins after [${afterPluginsIDs.map(v => '\"' + v + '\"').join(', ')}] and before [${beforePluginsIDs.map(v => `\"${v}\"`).join(', ')}], but ${JSON.stringify(pluginIDs[indexOfLastAfter])} comes after ${JSON.stringify(pluginIDs[index])}!`\n */\nexport function insertPlugin(\n plugins: Exclude<PluginSpec, string>[],\n afterPluginsIDs: string[],\n insertPluginIDs: string[],\n beforePluginsIDs: string[],\n): Exclude<PluginSpec, string>[] {\n const pluginIDs = plugins.map(v =>\n typeof v === 'string' ? v : v[0],\n );\n\n // if any beforePluginIDs are ordered before the last afterPlugin, throw. Impossible to sort.\n\n const indexOfLastAfter = afterPluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort()\n .find((_v, i, obj) => i === obj.length - 1);\n if (undefined === indexOfLastAfter)\n throw new ReferenceError(\n 'An attempt to get the last element of an array returned undefined.',\n );\n\n const indicesOfBefore = beforePluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort();\n\n // This for-of collects *all* sorting errors. The resulting AggregateError\n // notifies the API user of *all* errors in the order rather than just the\n // first error encountered.\n const errors: Error[] = [];\n for (const index of indicesOfBefore) {\n if (index <= indexOfLastAfter) {\n errors.push(\n new Error(\n `insertPlugin was instructed to insert one or more plugins after [${afterPluginsIDs.map(v => '\"' + v + '\"').join(', ')}] and before [${beforePluginsIDs.map(v => `\"${v}\"`).join(', ')}], but ${JSON.stringify(pluginIDs[indexOfLastAfter])} comes after ${JSON.stringify(pluginIDs[index])}!`,\n ),\n );\n }\n }\n if (errors.length > 0)\n throw new AggregateError(errors, 'One or more errors occurred while inserting plugin configs into the Semantic Release config!');\n\n // insert plugin(s)\n\n const beforeInsert = plugins.slice(0, indexOfLastAfter + 1);\n const afterInsert = plugins.slice(indexOfLastAfter + 1, plugins.length + 1);\n\n return [\n ...beforeInsert,\n ...insertPluginIDs.map(id =>\n [id, {}] as [string, unknown],\n ),\n ...afterInsert,\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA4DA,SAAgB,aACd,SACA,iBACA,iBACA,kBAC+B;CAC/B,MAAM,YAAY,QAAQ,KAAI,MAC5B,OAAO,MAAM,WAAW,IAAI,EAAE,GAC/B;CAID,MAAM,mBAAmB,gBACtB,QAAO,MAAK,UAAU,SAAS,EAAE,CAAC,CAClC,KAAI,MAAK,UAAU,QAAQ,EAAE,CAAC,CAC9B,MAAM,CACN,MAAM,IAAI,GAAG,QAAQ,MAAM,IAAI,SAAS,EAAE;CAC7C,IAAI,KAAA,MAAc,kBAChB,MAAM,IAAI,eACR,qEACD;CAEH,MAAM,kBAAkB,iBACrB,QAAO,MAAK,UAAU,SAAS,EAAE,CAAC,CAClC,KAAI,MAAK,UAAU,QAAQ,EAAE,CAAC,CAC9B,MAAM;CAKT,MAAM,SAAkB,EAAE;CAC1B,KAAK,MAAM,SAAS,iBAClB,IAAI,SAAS,kBACX,OAAO,qBACL,IAAI,MACF,oEAAoE,gBAAgB,KAAI,MAAK,OAAM,IAAI,KAAI,CAAC,KAAK,KAAK,CAAC,gBAAgB,iBAAiB,KAAI,MAAK,IAAI,EAAE,GAAG,CAAC,KAAK,KAAK,CAAC,SAAS,KAAK,UAAU,UAAU,kBAAkB,CAAC,eAAe,KAAK,UAAU,UAAU,OAAO,CAAC,GAC5R,CACF;CAGL,IAAI,OAAO,SAAS,GAClB,MAAM,IAAI,eAAe,QAAQ,+FAA+F;CAIlI,MAAM,eAAe,QAAQ,MAAM,GAAG,mBAAmB,EAAE;CAC3D,MAAM,cAAc,QAAQ,MAAM,mBAAmB,GAAG,QAAQ,SAAS,EAAE;CAE3E,OAAO;EACL,GAAG;EACH,GAAG,gBAAgB,KAAI,OACrB,CAAC,IAAI,EAAE,CAAC,CACT;EACD,GAAG;EACJ"}
1
+ {"version":3,"file":"insertPlugins.mjs","names":[],"sources":["../src/insertPlugins.ts"],"sourcesContent":["import type {\n PluginSpec,\n Options as SemanticReleaseOptions,\n} from 'semantic-release';\n\n/**\n * @since 3.0.0\n * @deprecated EXPERIMENTAL\n */\ninterface PluginInsertRuleSet {\n Id: string;\n BeforeIds: string[];\n AfterIds: string[];\n}\n\n/**\n * [W.I.P. STUB]\n *\n * Given an array of {@link PluginInsertRuleSet}s, insert plugins into a\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/structuredClone structured clone}\n * (i.e. deep-copy) of the {@link plugins} array, sort the plugin entries, and\n * return the modified array copy.\n * @todo implement\n * @param plugins Your {@link SemanticReleaseOptions.plugins} array.\n * @param inserts An array of {@link PluginInsertRuleSet}s.\n *\n * If a plugin is already in the plugins array, inserting is skipped. The\n * existing entry is sorted according to its ruleset.\n *\n * If any rulesets conflict, an error will be thrown.\n * - error: A must precede B; B must precede A.\n * - pass: C must precede D and E; D must precede E and follow B. Add ruleset\n * interface: {Id:string, BeforeIds:string[], AfterIds:string[] }\n * @returns A deep-cloned, modified copy of {@link plugins} with plugins\n * inserted and sorted where needed.\n * @since 3.0.0\n * @deprecated EXPERIMENTAL\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare function insertAndSortPlugins(\n plugins: Exclude<SemanticReleaseOptions['plugins'], undefined>,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n inserts: PluginInsertRuleSet[],\n): PluginSpec[];\n\n/**\n * @param plugins {@link SemanticReleaseOptions.plugins}\n * @param afterPluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must follow.\n * @param insertPluginIDs The `string` IDs of plugins to insert into a copy of the {@link plugins} array.\n * @param beforePluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must precede.\n * @returns\n * A modified copy of {@link plugins} with the given plugins inserted\n * before {@link beforePluginsIDs} and after {@link afterPluginsIDs}.\n *\n * Inserted plugins will be a `[string, {}]` tuple.\n * @throws {ReferenceError} This should never occur. One or more of the\n * {@link afterPluginsIDs} had been found in {@link plugins}, but a `.find` call\n * to get the highest index of the found plugins had returned `undefined`\n * @throws {AggregateError} One or more error occurred when inserting plugins: `insertPlugin was instructed to insert one or more plugins after [${afterPluginsIDs.map(v => '\"' + v + '\"').join(', ')}] and before [${beforePluginsIDs.map(v => `\"${v}\"`).join(', ')}], but ${JSON.stringify(pluginIDs[indexOfLastAfter])} comes after ${JSON.stringify(pluginIDs[index])}!`\n */\nexport function insertPlugin(\n plugins: Exclude<PluginSpec, string>[],\n afterPluginsIDs: string[],\n insertPluginIDs: string[],\n beforePluginsIDs: string[],\n): Exclude<PluginSpec, string>[] {\n const pluginIDs = plugins.map(v =>\n typeof v === 'string' ? v : v[0],\n );\n\n // if any beforePluginIDs are ordered before the last afterPlugin, throw. Impossible to sort.\n\n const indexOfLastAfter = afterPluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort((a, b) => a - b)\n .find((_v, index, object) => index === object.length - 1);\n if (undefined === indexOfLastAfter)\n throw new ReferenceError(\n 'An attempt to get the last element of an array returned undefined.',\n );\n\n const indicesOfBefore = beforePluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort((a, b) => a - b);\n\n // This for-of collects *all* sorting errors. The resulting AggregateError\n // notifies the API user of *all* errors in the order rather than just the\n // first error encountered.\n const errors: Error[] = [];\n for (const index of indicesOfBefore) {\n if (index <= indexOfLastAfter) {\n errors.push(\n new Error(\n `insertPlugin was instructed to insert one or more plugins after [${afterPluginsIDs.map(v => '\"' + v + '\"').join(', ')}] and before [${beforePluginsIDs.map(v => `\"${v}\"`).join(', ')}], but ${JSON.stringify(pluginIDs[indexOfLastAfter])} comes after ${JSON.stringify(pluginIDs[index])}!`,\n ),\n );\n }\n }\n if (errors.length > 0)\n throw new AggregateError(errors, 'One or more errors occurred while inserting plugin configs into the Semantic Release config!');\n\n // insert plugin(s)\n\n const beforeInsert = plugins.slice(0, indexOfLastAfter + 1);\n const afterInsert = plugins.slice(indexOfLastAfter + 1, plugins.length + 1);\n\n return [\n ...beforeInsert,\n ...insertPluginIDs.map(id =>\n [id, {}] as [string, unknown],\n ),\n ...afterInsert,\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA4DA,SAAgB,aACd,SACA,iBACA,iBACA,kBAC+B;CAC/B,MAAM,YAAY,QAAQ,KAAI,MAC5B,OAAO,MAAM,WAAW,IAAI,EAAE,EAChC;CAIA,MAAM,mBAAmB,gBACtB,QAAO,MAAK,UAAU,SAAS,CAAC,CAAC,CAAC,CAClC,KAAI,MAAK,UAAU,QAAQ,CAAC,CAAC,CAAC,CAC9B,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC,CACrB,MAAM,IAAI,OAAO,WAAW,UAAU,OAAO,SAAS,CAAC;CAC1D,IAAI,KAAA,MAAc,kBAChB,MAAM,IAAI,eACR,oEACF;CAEF,MAAM,kBAAkB,iBACrB,QAAO,MAAK,UAAU,SAAS,CAAC,CAAC,CAAC,CAClC,KAAI,MAAK,UAAU,QAAQ,CAAC,CAAC,CAAC,CAC9B,MAAM,GAAG,MAAM,IAAI,CAAC;CAKvB,MAAM,SAAkB,CAAC;CACzB,KAAK,MAAM,SAAS,iBAClB,IAAI,SAAS,kBACX,OAAO,qBACL,IAAI,MACF,oEAAoE,gBAAgB,KAAI,MAAK,OAAM,IAAI,IAAG,CAAC,CAAC,KAAK,IAAI,EAAE,gBAAgB,iBAAiB,KAAI,MAAK,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE,SAAS,KAAK,UAAU,UAAU,iBAAiB,EAAE,eAAe,KAAK,UAAU,UAAU,MAAM,EAAE,EAC7R,CACF;CAGJ,IAAI,OAAO,SAAS,GAClB,MAAM,IAAI,eAAe,QAAQ,8FAA8F;CAIjI,MAAM,eAAe,QAAQ,MAAM,GAAG,mBAAmB,CAAC;CAC1D,MAAM,cAAc,QAAQ,MAAM,mBAAmB,GAAG,QAAQ,SAAS,CAAC;CAE1E,OAAO;EACL,GAAG;EACH,GAAG,gBAAgB,KAAI,OACrB,CAAC,IAAI,CAAC,CAAC,CACT;EACA,GAAG;CACL;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-release__commit-analyzer.d.mts","names":["_Base","Angular","Base","Omit","Ember_Subtypes","None","BUGFIX","CLEANUP","DOC","FEATURE","SECURITY","RuleObjects","Atom","CodeMirror","ConventionalCommits","Ember","ESLint","Express","JQuery","JSHint","RegExp","PresetConfigs","Record","AnyRecord","RuleObject","CommitAnalyzerConfig","Promise","breaking","revert","release","type","scope","subject","emoji","shortDesc","language","message","tag","taggedAs","component","commitUrlFormat","compareUrlFormat","header","issuePrefixes","issueUrlFormat","preMajor","releaseCommitMessageFormat","types","section","hidden","userUrlFormat","ignoreCommits","bumpStrict","scopeOnly","PresetConfig","preset","config","parserOpts","releaseRules","presetConfig","Options","analyzeCommits","pluginConfig","commits","cwd","context","sideEffect","_0"],"sources":["../src/semantic-release__commit-analyzer.d.ts"],"mappings":";;;YAGYW,WAAAA;IAAAA,UACEX,KAAAA;MA8BaA;MA5BrB2B,QAAAA;MACAC,MAAAA;MAmEuB5B;MAjEvB6B,OAAAA;IAAAA;IAkG0B3B;;;IAAAA,UA5FlBD,OAAAA,SAAgBD,KAAAA;MACxB8B,IAAAA;MACAC,KAAAA;MACAC,OAAAA;IAAAA;IAoHI5B;;;;;;;;;;;;;IAAAA,UApGIQ,IAAAA,SAAaZ,KAAAA;MAiJnBW;;;;;;;;;;;;;;;;;;MA9HFsB,KAAAA;MACAC,SAAAA;IAAAA;IAvCwBlC;;;IAAAA,UA6ChBa,UAAAA,SAAmBb,KAAAA;MAC3BmC,QAAAA;MACAL,IAAAA;MACAM,OAAAA;IAAAA;IAH2BpC;;;IAAAA,UASnBc,mBAAAA,SAA4Bb,OAAAA;MACpC6B,IAAAA;IAAAA;IAAAA,UAGQ1B,cAAAA;MAAAA,UACEF,IAAAA,SAAaF,KAAAA;QAAAA;;;;QAKrBqC,GAAAA;QAyBAC;;;;;;;;;;QATAA,QAAAA;QAuBAD;QArBAD,OAAAA;MAAAA;MAAAA,KAGG/B,IAAAA,GAAOF,IAAAA,CAAKD,IAAAA;MAAAA,UAEPI,MAAAA,SAAeJ,IAAAA;QACvBmC,GAAAA;QACAC,QAAAA;MAAAA;MAAAA,UAGQ/B,OAAAA,SAAgBL,IAAAA;QACxBmC,GAAAA;QACAC,QAAAA;MAAAA;MAAAA,UAGQ9B,GAAAA,SAAYN,IAAAA;QACpBmC,GAAAA;QACAC,QAAAA;MAAAA;MAAAA,UAGQ7B,OAAAA,SAAgBP,IAAAA;QACxBmC,GAAAA;QACAC,QAAAA;MAAAA;MAAAA,UAGQ5B,QAAAA,SAAiBR,IAAAA;QACzBmC,GAAAA;QACAC,QAAAA;MAAAA;I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AAA,SAA4Bd,KAAAA;;;;MAIpCmD,aAAAA,YAAyB/B,MAAAA;;MAEzB2B,KAAAA,GAAQpC,WAAAA,CAAYG,mBAAAA;;MAEpBsC,UAAAA;;MAEArB,KAAAA;;;;;MAKAsB,SAAAA;IAAAA;EAAAA;EAAAA,KAICC,YAAAA,GACCjC,aAAAA,CAAcrB,KAAAA,GACdqB,aAAAA,CAAcP,mBAAAA;EAAAA,KAGfS,SAAAA,GAAYD,MAAAA;EAAAA,iBAEAG,oBAAAA;IACf8B,MAAAA;IACAC,MAAAA;IACAC,UAAAA,GAAalC,SAAAA;;;;;IAKbmC,YAAAA,YAAwBlC,UAAAA;;;;;IAKxBmC,YAAAA,GAAepC,SAAAA;EAAAA;EAAAA,YAGLqC,OAAAA,GAAUnC,oBAAAA;;;;;;;;;;;;;;kBAeNoC,cAAAA,CACdC,YAAAA;IACEP,MAAAA;IACAC,MAAAA;IACAE,YAAAA,WAAuBnC,SAAAA;IACvBkC,UAAAA;EAAAA,GAEFQ,OAAAA;IACEF,OAAAA;IACAC,GAAAA;EAAAA,IAEDtC,OAAAA;AAAAA"}
1
+ {"version":3,"file":"semantic-release__commit-analyzer.d.mts","names":["RuleObjects","_Base","breaking","revert","release","Angular","type","scope","subject","Atom","emoji","shortDesc","CodeMirror","language","message","ConventionalCommits","Ember_Subtypes","Base","tag","taggedAs","None","Omit","BUGFIX","CLEANUP","DOC","FEATURE","SECURITY","Ember","ESLint","Express","component","JQuery","JSHint","RuleObject","PresetConfigs","commitUrlFormat","compareUrlFormat","header","issuePrefixes","issueUrlFormat","preMajor","releaseCommitMessageFormat","types","section","hidden","userUrlFormat","ignoreCommits","RegExp","bumpStrict","scopeOnly","PresetConfig","AnyRecord","Record","CommitAnalyzerConfig","preset","config","parserOpts","releaseRules","presetConfig","Options","analyzeCommits","pluginConfig","commits","cwd","context","Promise"],"sources":["../src/semantic-release__commit-analyzer.d.ts"],"mappings":";;;YAGYA,WAAAA;IAAAA,UACEC,KAAAA;MA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ACAC,UAAAA,GAAa,SAAA;;;;;IAKbC,YAAAA,YAAwB,UAAA;;;;;IAKxBC,YAAAA,GAAe,SAAA;EAAA;EAAA,YAGLC,OAAAA,GAAU,oBAAA;;;;;;;;;;;;;;kBAeNC,cAAAA,CACdC,YAAAA;IACEP,MAAAA;IACAC,MAAAA;IACAE,YAAAA,WAAuB,SAAA;IACvBD,UAAAA;EAAAA,GAEFQ,OAAAA;IACEF,OAAAA;IACAC,GAAAA;EAAAA,IAED,OAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-release__exec.d.mts","names":["Options","verifyConditionsCmd","analyzeCommitsCmd","verifyReleaseCmd","generateNotesCmd","prepareCmd","addChannelCmd","publishCmd","successCmd","failCmd","shell","execCwd","sideEffect","_0"],"sources":["../src/semantic-release__exec.d.ts"],"mappings":";;mBACmBA,OAAAA;IACfC,mBAAAA;IACAC,iBAAAA;IACAC,gBAAAA;IACAC,gBAAAA;IACAC,UAAAA;IACAC,aAAAA;IACAC,UAAAA;IACAC,UAAAA;IACAC,OAAAA;IACAC,KAAAA;IACAC,OAAAA;EAAAA;AAAAA"}
1
+ {"version":3,"file":"semantic-release__exec.d.mts","names":["Options","verifyConditionsCmd","analyzeCommitsCmd","verifyReleaseCmd","generateNotesCmd","prepareCmd","addChannelCmd","publishCmd","successCmd","failCmd","shell","execCwd"],"sources":["../src/semantic-release__exec.d.ts"],"mappings":";;mBACmBA,OAAAA;IACfC,mBAAAA;IACAC,iBAAAA;IACAC,gBAAAA;IACAC,gBAAAA;IACAC,UAAAA;IACAC,aAAAA;IACAC,UAAAA;IACAC,UAAAA;IACAC,OAAAA;IACAC,KAAAA;IACAC,OAAAA;EAAAA;AAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-release__git.d.mts","names":["MicromatchGlob","AssetObject","AssetEntry","Options","VerifyConditionsContext","PrepareContext","GlobalConfig","Promise","prepare","verifyConditions","path","assets","message","pluginConfig","options","context","sideEffect","_0"],"sources":["../src/semantic-release__git.d.ts"],"mappings":";;;;;;gBAKgBM,YAAAA,EAAcD,cAAAA,EAAgBD,uBAAAA;EAAAA,YAChCJ,cAAAA;EAAAA,iBACKC,WAAAA;IACfS,IAAAA,EAAMV,cAAAA;EAAAA;EAAAA,YAEIE,UAAAA,GAAaD,WAAAA,GAAcD,cAAAA;EAAAA,iBACtBG,OAAAA;IAuENE;;;;;;;;;;;;;;;;;;;;;;;;;;IA5CTM,MAAAA,GAAST,UAAAA,GAAaA,UAAAA;IAmCtBW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJAD,OAAAA;EAAAA;EAAAA,SAGOH,gBAAAA,CACPI,YAAAA,EAAcV,OAAAA,EACdY,OAAAA,EAASX,uBAAAA;IACPU,OAAAA;MACEN,OAAAA;IAAAA;EAAAA;EAAAA,SAIGA,OAAAA,CACPK,YAAAA,EAAcV,OAAAA,EACdY,OAAAA,EAASV,cAAAA;IACPS,OAAAA,EAASR,YAAAA;EAAAA,IAEVC,OAAAA;EAAAA,SACMC,OAAAA,EAASC,gBAAAA;AAAAA"}
1
+ {"version":3,"file":"semantic-release__git.d.mts","names":["GlobalConfig","PrepareContext","VerifyConditionsContext","MicromatchGlob","AssetObject","path","AssetEntry","Options","assets","message","verifyConditions","pluginConfig","options","prepare","context","Promise"],"sources":["../src/semantic-release__git.d.ts"],"mappings":";;;;;;gBAKgBA,YAAAA,EAAcC,cAAAA,EAAgBC,uBAAAA;EAAAA,YAChCC,cAAAA;EAAAA,iBACKC,WAAAA;IACfC,IAAAA,EAAM,cAAA;EAAA;EAAA,YAEIC,UAAAA,GAAa,WAAA,GAAc,cAAA;EAAA,iBACtBC,OAAAA;IAuEN;;;;;;;;;;;;;;;;;;;;;;;;;;IA5CTC,MAAAA,GAAS,UAAA,GAAa,UAAA;IAmCtBG;;;;;;;;;;;;;;;;;;;AAagC;;;;;;;;;;;IAjBhCF,OAAAA;EAAAA;EAAAA,SAGOC,gBAAAA,CACPC,YAAAA,EAAc,OAAA,EACdG,OAAAA,EAAS,uBAAA;IACPF,OAAAA;MACEC,OAAAA;IAAAA;EAAAA;EAAAA,SAIGA,OAAAA,CACPF,YAAAA,EAAc,OAAA,EACdG,OAAAA,EAAS,cAAA;IACPF,OAAAA,EAAS,YAAA;EAAA,IAEV,OAAA;EAAA,SACM,OAAA,EAAS,gBAAA;AAAA"}
@@ -1,4 +1,5 @@
1
1
  //#region src/semantic-release__github.d.ts
2
+ /* eslint-disable unicorn/name-replacements */
2
3
  declare module '@semantic-release/github' {
3
4
  /**
4
5
  * @see https://github.com/semantic-release/github#configuration
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-release__github.d.mts","names":["NodeJS","ProcessEnv","Glob","Asset","Env","GITHUB_TOKEN","GH_TOKEN","GITHUB_URL","GH_URL","GITHUB_PREFIX","GH_PREFIX","GITHUB_API_URL","path","name","label","Options","githubUrl","githubApiPathPrefix","githubApiUrl","proxy","assets","successComment","failComment","failTitle","labels","assignees","releasedLabels","addReleases","draftRelease","releaseNameTemplate","releaseBodyTemplate","discussionCategoryName","sideEffect","_0"],"sources":["../src/semantic-release__github.d.ts"],"mappings":";;;;;mBAImBI,GAAAA,SAAYJ,MAAAA,CAAOC,UAAAA;IAsC5BC;;;IAlCNG,YAAAA;IAuE6B;;;IAnE7BC,QAAAA;IAJAD;;;IASAE,UAAAA;IASAE;;;IALAD,MAAAA;IAqBAI;;;IAhBAH,aAAAA;IA2BeM;IAzBfL,SAAAA;IAwCAQ;;;IAnCAP,cAAAA;EAAAA;EAqDAU;EAAAA,KAjDGnB,IAAAA;EAoEHsB;EAAAA,UAjEQrB,KAAAA;IA4ERuB;IA1EAd,IAAAA,EAAMV,IAAAA;IAoFN0B;;;;IA/EAf,IAAAA;IA+FsBmB;IA7FtBlB,KAAAA;EAAAA;;mBAIeC,OAAAA;;;;;IAKfC,SAAAA;;;;;IAKAC,mBAAAA;;;;;IAKAC,YAAAA;;;;;;IAMAC,KAAAA;;;;;IAKAC,MAAAA,GAASlB,IAAAA,IAAQC,KAAAA,GAAQD,IAAAA;;;;;;;IAOzBmB,cAAAA;;;;;;;IAOAC,WAAAA;;;;;;IAMAC,SAAAA;;;;;;IAMAC,MAAAA;;;;IAIAC,SAAAA;;;;;;;IAOAC,cAAAA;;;;;IAKAC,WAAAA;;;;;IAKAC,YAAAA;;;;;IAKAC,mBAAAA;;;;;IAKAC,mBAAAA;;;;;;IAMAC,sBAAAA;EAAAA;AAAAA"}
1
+ {"version":3,"file":"semantic-release__github.d.mts","names":["Env","NodeJS","ProcessEnv","GITHUB_TOKEN","GH_TOKEN","GITHUB_URL","GH_URL","GITHUB_PREFIX","GH_PREFIX","GITHUB_API_URL","Glob","Asset","path","name","label","Options","githubUrl","githubApiPathPrefix","githubApiUrl","proxy","assets","successComment","failComment","failTitle","labels","assignees","releasedLabels","addReleases","draftRelease","releaseNameTemplate","releaseBodyTemplate","discussionCategoryName"],"sources":["../src/semantic-release__github.d.ts"],"mappings":";;;;;;mBAKmBA,GAAAA,SAAY,MAAA,CAAO,UAAA;IA2EzB;;;IAvETG,YAAAA;IAuE6B;;;IAnE7BC,QAAAA;IAAAA;;;IAKAC,UAAAA;IAWAG;;;IAPAF,MAAAA;IAqBMI;;;IAhBNH,aAAAA;IAgCAS;IA9BAR,SAAAA;IA8CAW;;;IAzCAV,cAAAA;EAAAA;EA4DAa;EAAAA,KAxDGZ,IAAAA;EAwEHe;EAAAA,UArEQd,KAAAA;IAiFRgB;IA/EAf,IAAAA,EAAM,IAAA;IAyFNiB;;;;IApFAhB,IAAAA;IA+FsB;IA7FtBC,KAAAA;EAAAA;;mBAIeC,OAAAA;;;;;IAKfC,SAAAA;;;;;IAKAC,mBAAAA;;;;;IAKAC,YAAAA;;;;;;IAMAC,KAAAA;;;;;IAKAC,MAAAA,GAAS,IAAA,IAAQ,KAAA,GAAQ,IAAA;;;;;;;IAOzBC,cAAAA;;;;;;;IAOAC,WAAAA;;;;;;IAMAC,SAAAA;;;;;;IAMAC,MAAAA;;;;IAIA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SAAmB,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"semanticReleaseConfig.mjs","names":[],"sources":["../src/semanticReleaseConfig.ts"],"sourcesContent":["// @ts-types=\"./semantic-release__commit-analyzer.d.ts\"\nimport type { Options as SRCommitAnalyzerOptions } from '@semantic-release/commit-analyzer';\n// @ts-types=\"./semantic-release__exec.d.ts\"\nimport type { Options as SRExecOptions } from '@semantic-release/exec';\n// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { Options as SRGitOptions } from '@semantic-release/git';\n// @ts-types=\"./semantic-release__github.d.ts\"\nimport type { Options as SRGithubOptions } from '@semantic-release/github';\nimport type { Options, PluginSpec } from 'semantic-release';\nimport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\nexport interface SRReleaseNotesGeneratorOptions {\n /**\n * conventional-changelog preset.\n * @default 'angular'\n */\n preset?: 'angular' | 'atom' | 'codemirror' | 'ember' | 'eslint' | 'express' | 'jquery' | 'jscs' | 'jshint' | 'conventionalcommits' | (string & Record<never, never>) | undefined;\n /**\n * Requireable npm package with a custom conventional-changelog preset.\n */\n config?: string | undefined;\n /**\n * Additional `conventional-changelog-parser` options that will overwrite ones loaded by `preset` or `config`.\n */\n parserOpts: object;\n /**\n * Additional `conventional-changelog-writer` options that will overwrite ones loaded by `preset` or `config`.\n */\n writerOpts: object;\n}\n\n/**\n * A two-type PluginSpec to tie a plugin's name to its Options type. This is\n * intended for use by plugins to associate their Options type with their plugin\n * name.\n */\nexport type PluginSpecTuple<P extends string = string, T = unknown> = [P, T];\nexport type PluginSpecSRCommitAnalyzer<V extends SRCommitAnalyzerOptions = SRCommitAnalyzerOptions> = PluginSpecTuple<'@semantic-release/commit-analyzer', V>;\nexport type PluginSpecSRChangelog<V extends Record<'changelogFile' | 'changelogTitle', string>> = PluginSpecTuple<'@semantic-release/changelog', V>;\nexport type PluginSpecExportData<V extends Record<string, unknown> = Record<string, unknown>> = PluginSpecTuple<'semantic-release-export-data', V>;\nexport type PluginSpecSRReleaseNotesGen<V extends SRReleaseNotesGeneratorOptions = SRReleaseNotesGeneratorOptions> = PluginSpecTuple<'@semantic-release/release-notes-generator', V>;\nexport type PluginSpecSRExec<V extends SRExecOptions = SRExecOptions> = PluginSpecTuple<'@semantic-release/exec', V>;\nexport type PluginSpecSRGit<V extends SRGitOptions = SRGitOptions> = PluginSpecTuple<'@semantic-release/git', V>;\nexport type PluginSpecSRGithub<V extends SRGithubOptions = SRGithubOptions> = PluginSpecTuple<'@semantic-release/github', V>;\n\n/**\n * @satisfies { Readonly<PluginSpec[]> }\n */\nexport const defaultPlugins: readonly [\n '@semantic-release/commit-analyzer',\n '@semantic-release/release-notes-generator',\n '@semantic-release/npm',\n '@semantic-release/github',\n] = Object.freeze([\n '@semantic-release/commit-analyzer',\n '@semantic-release/release-notes-generator',\n '@semantic-release/npm',\n '@semantic-release/github',\n] as const) satisfies readonly PluginSpec[];\n\n// define as const for string literals in type, then...\n/**\n * @see baseConfig\n */\nconst _baseConfig = {\n /** @see https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugin-options-configuration */\n preset: 'conventionalcommits' as const,\n branches: [\n 'main',\n { name: 'develop', channel: 'develop', prerelease: true },\n ] as ['main', { name: 'develop'; channel: 'develop'; prerelease: true }],\n plugins: [\n ['@semantic-release/commit-analyzer', {}],\n ['semantic-release-export-data', {}],\n ['@semantic-release/release-notes-generator', {}],\n ['@semantic-release/changelog', {}],\n ['@semantic-release/git', DefaultOptions],\n ['@semantic-release/exec', {}],\n ['@semantic-release/github', { addReleases: 'bottom', assets: ['./publish/*', '!./publish/.gitkeep'] }],\n ] as [\n PluginSpecSRCommitAnalyzer,\n PluginSpecExportData,\n PluginSpecSRReleaseNotesGen,\n PluginSpecSRChangelog<Record<'changelogFile' | 'changelogTitle', string>>,\n PluginSpecSRGit<typeof DefaultOptions>,\n PluginSpecSRExec,\n PluginSpecSRGithub<{ addReleases: 'bottom'; assets: [{ path: './publish/*' }] }>,\n ] | Exclude<PluginSpec, string>[],\n};\n\n/**\n * The base configuration for various Semantic Release scenarios.\n * - Prefers preset \"conventionalcommits\"\n * (Conventional-Changelog-ConventionalCommits).\n * - Creates tags and release commits on \"main\" branch, pre-releases on\n * \"develop\" branch in \"develop\" channel.\n * - Creates GitHub Releases.\n * - Exports the following variables as GitHub Actions outputs:\n * - \"new-release-published\": \"true\" | \"false\"\n * - \"new-release-version\" : string\n * - \"new-release-git-tag\" : string\n * - includes default plugins (except `@semantic-release/npm`) and more\n * - `@semantic-release/commit-analyzer`\n * - semantic-release-export-data\n * - `@semantic-release/release-notes-generator`\n * - `@semantic-release/changelog`\n * - `@semantic-release/git`\n * - add modified CHANGELOG.md in release commit\n * - `@semantic-release/exec`\n * - does nothing by default. Included for convenience.\n * - `@semantic-release/github`\n * - uploads all files from `./publish/*`. This is non-recursive.\n * - adds a list of links to related release pages (e.g. the release's page on npmjs.com)\n *\n * (OPTIONAL) update static Version strings before Git plugin\n * - https://github.com/jpoehnelt/semantic-release-replace-plugin\n * - https://github.com/droidsolutions/semantic-release-update-file\n * @satisfies {Options}\n */\nexport const baseConfig: typeof _baseConfig = _baseConfig satisfies Options;\n"],"mappings":";;;;;AAgDA,MAAa,iBAKT,OAAO,OAAO;CAChB;CACA;CACA;CACA;CACD,CAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DX,MAAa,aAAiC;;CArD5C,QAAQ;CACR,UAAU,CACR,QACA;EAAE,MAAM;EAAW,SAAS;EAAW,YAAY;EAAM,CAC1D;CACD,SAAS;EACP,CAAC,qCAAqC,EAAE,CAAC;EACzC,CAAC,gCAAgC,EAAE,CAAC;EACpC,CAAC,6CAA6C,EAAE,CAAC;EACjD,CAAC,+BAA+B,EAAE,CAAC;EACnC,CAAC,yBAAyB,eAAe;EACzC,CAAC,0BAA0B,EAAE,CAAC;EAC9B,CAAC,4BAA4B;GAAE,aAAa;GAAU,QAAQ,CAAC,eAAe,sBAAsB;GAAE,CAAC;EACxG;CAwC2C"}
1
+ {"version":3,"file":"semanticReleaseConfig.mjs","names":[],"sources":["../src/semanticReleaseConfig.ts"],"sourcesContent":["// @ts-types=\"./semantic-release__commit-analyzer.d.ts\"\nimport type { Options as SRCommitAnalyzerOptions } from '@semantic-release/commit-analyzer';\n// @ts-types=\"./semantic-release__exec.d.ts\"\nimport type { Options as SRExecOptions } from '@semantic-release/exec';\n// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { Options as SRGitOptions } from '@semantic-release/git';\n// @ts-types=\"./semantic-release__github.d.ts\"\nimport type { Options as SRGithubOptions } from '@semantic-release/github';\nimport type { Options, PluginSpec } from 'semantic-release';\nimport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\nexport interface SRReleaseNotesGeneratorOptions {\n /**\n * conventional-changelog preset.\n * @default 'angular'\n */\n preset?: 'angular' | 'atom' | 'codemirror' | 'ember' | 'eslint' | 'express' | 'jquery' | 'jscs' | 'jshint' | 'conventionalcommits' | (string & Record<never, never>) | undefined;\n /**\n * Requireable npm package with a custom conventional-changelog preset.\n */\n config?: string | undefined;\n /**\n * Additional `conventional-changelog-parser` options that will overwrite ones loaded by `preset` or `config`.\n */\n parserOpts: object;\n /**\n * Additional `conventional-changelog-writer` options that will overwrite ones loaded by `preset` or `config`.\n */\n writerOpts: object;\n}\n\n/**\n * A two-type PluginSpec to tie a plugin's name to its Options type. This is\n * intended for use by plugins to associate their Options type with their plugin\n * name.\n */\nexport type PluginSpecTuple<P extends string = string, T = unknown> = [P, T];\nexport type PluginSpecSRCommitAnalyzer<V extends SRCommitAnalyzerOptions = SRCommitAnalyzerOptions> = PluginSpecTuple<'@semantic-release/commit-analyzer', V>;\nexport type PluginSpecSRChangelog<V extends Record<'changelogFile' | 'changelogTitle', string>> = PluginSpecTuple<'@semantic-release/changelog', V>;\nexport type PluginSpecExportData<V extends Record<string, unknown> = Record<string, unknown>> = PluginSpecTuple<'semantic-release-export-data', V>;\nexport type PluginSpecSRReleaseNotesGen<V extends SRReleaseNotesGeneratorOptions = SRReleaseNotesGeneratorOptions> = PluginSpecTuple<'@semantic-release/release-notes-generator', V>;\nexport type PluginSpecSRExec<V extends SRExecOptions = SRExecOptions> = PluginSpecTuple<'@semantic-release/exec', V>;\nexport type PluginSpecSRGit<V extends SRGitOptions = SRGitOptions> = PluginSpecTuple<'@semantic-release/git', V>;\nexport type PluginSpecSRGithub<V extends SRGithubOptions = SRGithubOptions> = PluginSpecTuple<'@semantic-release/github', V>;\n\n/**\n * @satisfies { Readonly<PluginSpec[]> }\n */\nexport const defaultPlugins: readonly [\n '@semantic-release/commit-analyzer',\n '@semantic-release/release-notes-generator',\n '@semantic-release/npm',\n '@semantic-release/github',\n] = Object.freeze([\n '@semantic-release/commit-analyzer',\n '@semantic-release/release-notes-generator',\n '@semantic-release/npm',\n '@semantic-release/github',\n] as const) satisfies readonly PluginSpec[];\n\n// define as const for string literals in type, then...\n/**\n * @see baseConfig\n */\nconst _baseConfig = {\n /** @see https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugin-options-configuration */\n preset: 'conventionalcommits' as const,\n branches: [\n 'main',\n { name: 'develop', channel: 'develop', prerelease: true },\n ] as ['main', { name: 'develop'; channel: 'develop'; prerelease: true }],\n plugins: [\n ['@semantic-release/commit-analyzer', {}],\n ['semantic-release-export-data', {}],\n ['@semantic-release/release-notes-generator', {}],\n ['@semantic-release/changelog', {}],\n ['@semantic-release/git', DefaultOptions],\n ['@semantic-release/exec', {}],\n ['@semantic-release/github', { addReleases: 'bottom', assets: ['./publish/*', '!./publish/.gitkeep'] }],\n ] as [\n PluginSpecSRCommitAnalyzer,\n PluginSpecExportData,\n PluginSpecSRReleaseNotesGen,\n PluginSpecSRChangelog<Record<'changelogFile' | 'changelogTitle', string>>,\n PluginSpecSRGit<typeof DefaultOptions>,\n PluginSpecSRExec,\n PluginSpecSRGithub<{ addReleases: 'bottom'; assets: [{ path: './publish/*' }] }>,\n ] | Exclude<PluginSpec, string>[],\n};\n\n/**\n * The base configuration for various Semantic Release scenarios.\n * - Prefers preset \"conventionalcommits\"\n * (Conventional-Changelog-ConventionalCommits).\n * - Creates tags and release commits on \"main\" branch, pre-releases on\n * \"develop\" branch in \"develop\" channel.\n * - Creates GitHub Releases.\n * - Exports the following variables as GitHub Actions outputs:\n * - \"new-release-published\": \"true\" | \"false\"\n * - \"new-release-version\" : string\n * - \"new-release-git-tag\" : string\n * - includes default plugins (except `@semantic-release/npm`) and more\n * - `@semantic-release/commit-analyzer`\n * - semantic-release-export-data\n * - `@semantic-release/release-notes-generator`\n * - `@semantic-release/changelog`\n * - `@semantic-release/git`\n * - add modified CHANGELOG.md in release commit\n * - `@semantic-release/exec`\n * - does nothing by default. Included for convenience.\n * - `@semantic-release/github`\n * - uploads all files from `./publish/*`. This is non-recursive.\n * - adds a list of links to related release pages (e.g. the release's page on npmjs.com)\n *\n * (OPTIONAL) update static Version strings before Git plugin\n * - https://github.com/jpoehnelt/semantic-release-replace-plugin\n * - https://github.com/droidsolutions/semantic-release-update-file\n * @satisfies {Options}\n */\nexport const baseConfig: typeof _baseConfig = _baseConfig satisfies Options;\n"],"mappings":";;;;;AAgDA,MAAa,iBAKT,OAAO,OAAO;CAChB;CACA;CACA;CACA;AACF,CAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DV,MAAa,aAAiC;;CArD5C,QAAQ;CACR,UAAU,CACR,QACA;EAAE,MAAM;EAAW,SAAS;EAAW,YAAY;CAAK,CAC1D;CACA,SAAS;EACP,CAAC,qCAAqC,CAAC,CAAC;EACxC,CAAC,gCAAgC,CAAC,CAAC;EACnC,CAAC,6CAA6C,CAAC,CAAC;EAChD,CAAC,+BAA+B,CAAC,CAAC;EAClC,CAAC,yBAAyB,cAAc;EACxC,CAAC,0BAA0B,CAAC,CAAC;EAC7B,CAAC,4BAA4B;GAAE,aAAa;GAAU,QAAQ,CAAC,eAAe,qBAAqB;EAAE,CAAC;CACxG;AAwC4C"}
@@ -1 +1 @@
1
- {"version":3,"file":"semanticReleaseConfigDotnet.d.mts","names":[],"sources":["../src/semanticReleaseConfigDotnet.ts"],"mappings":";;;;;cAoCa,2BAAA;EAAA,iBACM,OAAA;EAAA,iBACA,kBAAA;EAAA,QACT,sBAAA;EAAA,iBACS,kBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BjB,WAAA,CACE,iBAAA,aAA8B,cAAA,IAC9B,qBAAA,aAAkC,iBAAA;EAAA,IAwChC,iBAAA,CAAA,cAAgC,cAAA;EAAA,IAIhC,qBAAA,CAAA,cAAoC,iBAAA;EAAA,IAIpC,iBAAA,CAAA,GAAqB,cAAA;;EAMzB,YAAA,CACE,eAAA,YACA,eAAA,YACA,gBAAA;;;;;;;;;AA6OJ;EA/NE,mBAAA,CAAA,GAA6B,OAAA;;;;;;;;;EAmG7B,YAAA,CACE,oBAAA,YACA,eAAA,YACA,sBAAA;EAAA,UAoDc,uBAAA,CAAA,GAA2B,OAAA;EAqC3C,SAAA,CAAA,GAAa,OAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCO,SAAA,CACpB,iBAAA,aAA8B,cAAA,IAC9B,qBAAA,cAAmC,iBAAA,KAClC,OAAA,CAAQ,OAAA"}
1
+ {"version":3,"file":"semanticReleaseConfigDotnet.d.mts","names":[],"sources":["../src/semanticReleaseConfigDotnet.ts"],"mappings":";;;;;cAoCa,2BAAA;EAAA,iBACM,OAAA;EAAA,iBACA,kBAAA;EAAA,QACT,sBAAA;EAAA,iBACS,kBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BjB,WAAA,CACE,iBAAA,aAA8B,cAAA,IAC9B,qBAAA,aAAkC,iBAAA;EAAA,IAwChC,iBAAA,eAAgC,cAAA;EAAA,IAIhC,qBAAA,eAAoC,iBAAA;EAAA,IAIpC,iBAAA,IAAqB,cAAA;;EAMzB,YAAA,CACE,eAAA,YACA,eAAA,YACA,gBAAA;;;;;;;;AA6MW;AAgCf;EA/NE,mBAAA,IAA6B,OAAA;;;;;;;;;EAiG7B,YAAA,CACE,oBAAA,YACA,eAAA,YACA,sBAAA;EAAA,UAqDc,uBAAA,IAA2B,OAAA;EAsC3C,SAAA,IAAa,OAAA;AAAA;;;AAmCJ;;;;;;;;;;;;;;;;;;;;;;;;;iBAHW,SAAA,CACpB,iBAAA,aAA8B,cAAA,IAC9B,qBAAA,cAAmC,iBAAA,KAClC,OAAA,CAAQ,OAAA"}
@@ -102,26 +102,32 @@ var SemanticReleaseConfigDotnet = class {
102
102
  console.warn(`\
103
103
  Unable to find\`['@semantic-release/exec', unknown]\` in plugins array!
104
104
  Appending it to the end of the array...This may cause an unexpected order of operations!`);
105
- srExecIndex = this.options.plugins.push(["@semantic-release/exec", {}]) - 1;
105
+ this.options.plugins.push(["@semantic-release/exec", {}]);
106
+ srExecIndex = this.options.plugins.length - 1;
106
107
  }
107
108
  const execOptions = this.options.plugins[srExecIndex][1];
108
- this._projectsToPackAndPush = await Promise.all(this._projectsToPackAndPush.map(async (project) => {
109
+ const projectPromiseArrayArray = await Promise.all(this._projectsToPackAndPush.map(async (project) => {
109
110
  if (typeof project === "string") {
110
111
  const packableProjects = await Promise.all(await MSBuildProject.PackableProjectsToMSBuildProjects([project]));
111
112
  if (packableProjects.length === 0) throw new Error("No MSBuildProject instances were returned!");
112
113
  this._evaluatedProjects.push(...packableProjects);
113
114
  return packableProjects.map((project) => new NugetRegistryInfo({ project }));
114
- } else return [project];
115
- })).then((p) => p.flat());
116
- const verifyConditionsCmdAppendix = await Promise.all(this._projectsToPackAndPush.map(async (project) => await project.PackDummyPackage({}).then(() => project.GetPushDummyCommand({})))).then((cmds) => cmds.join(" && "));
117
- execOptions.verifyConditionsCmd = execOptions.verifyConditionsCmd && execOptions.verifyConditionsCmd.trim().length > 0 ? `${execOptions.verifyConditionsCmd} && ${verifyConditionsCmdAppendix}` : verifyConditionsCmdAppendix;
118
- const verifyReleaseCmdAppendix = this.ProjectsToPackAndPush.filter((project) => typeof project !== "string").map((project) => project.GetIsNextVersionAlreadyPublishedCommand()).join(" && ");
119
- execOptions.verifyReleaseCmd = execOptions.verifyReleaseCmd && execOptions.verifyReleaseCmd.trim().length > 0 ? `${execOptions.verifyReleaseCmd} && ${verifyReleaseCmdAppendix}` : verifyConditionsCmdAppendix;
120
- const prepareCmdAppendix = await configurePrepareCmd(this._projectsToPublish, this._projectsToPackAndPush);
121
- execOptions.prepareCmd = execOptions.prepareCmd && execOptions.prepareCmd.trim().length > 0 ? `${execOptions.prepareCmd} && ${prepareCmdAppendix}` : prepareCmdAppendix;
115
+ }
116
+ return [project];
117
+ }));
118
+ this._projectsToPackAndPush = projectPromiseArrayArray.flat();
119
+ const verifyConditionsCommandAppendix = (await Promise.all(this._projectsToPackAndPush.map(async (project) => {
120
+ await project.PackDummyPackage({});
121
+ return project.GetPushDummyCommand({});
122
+ }))).join(" && ");
123
+ execOptions.verifyConditionsCmd = execOptions.verifyConditionsCmd && execOptions.verifyConditionsCmd.trim().length > 0 ? `${execOptions.verifyConditionsCmd} && ${verifyConditionsCommandAppendix}` : verifyConditionsCommandAppendix;
124
+ const verifyReleaseCommandAppendix = this.ProjectsToPackAndPush.filter((project) => typeof project !== "string").map((project) => project.GetIsNextVersionAlreadyPublishedCommand()).join(" && ");
125
+ execOptions.verifyReleaseCmd = execOptions.verifyReleaseCmd && execOptions.verifyReleaseCmd.trim().length > 0 ? `${execOptions.verifyReleaseCmd} && ${verifyReleaseCommandAppendix}` : verifyConditionsCommandAppendix;
126
+ const prepareCommandAppendix = await configurePrepareCmd(this._projectsToPublish, this._projectsToPackAndPush);
127
+ execOptions.prepareCmd = execOptions.prepareCmd && execOptions.prepareCmd.trim().length > 0 ? `${execOptions.prepareCmd} && ${prepareCommandAppendix}` : prepareCommandAppendix;
122
128
  if (this._projectsToPackAndPush.length > 0) {
123
- const publishCmdAppendix = configureDotnetNugetPush(this._projectsToPackAndPush);
124
- execOptions.publishCmd = execOptions.publishCmd && execOptions.publishCmd.trim().length > 0 ? `${execOptions.publishCmd} && ${publishCmdAppendix}` : publishCmdAppendix;
129
+ const publishCommandAppendix = configureDotnetNugetPush(this._projectsToPackAndPush);
130
+ execOptions.publishCmd = execOptions.publishCmd && execOptions.publishCmd.trim().length > 0 ? `${execOptions.publishCmd} && ${publishCommandAppendix}` : publishCommandAppendix;
125
131
  }
126
132
  }
127
133
  /**
@@ -135,10 +141,11 @@ Appending it to the end of the array...This may cause an unexpected order of ope
135
141
  splicePlugin(insertAfterPluginIDs, insertPluginIDs, insertBeforePluginsIDs) {
136
142
  const errors = [];
137
143
  const pluginIDs = this.options.plugins.map((v) => typeof v === "string" ? v : v[0]);
138
- const indexOfLastPreceding = insertAfterPluginIDs.filter((v) => pluginIDs.includes(v)).map((v) => pluginIDs.indexOf(v)).sort().find((_v, i, obj) => i === obj.length - 1);
144
+ const indexOfLastPreceding = insertAfterPluginIDs.filter((v) => pluginIDs.includes(v)).map((v) => pluginIDs.indexOf(v)).sort((a, b) => a - b).find((_v, index, object) => index === object.length - 1);
139
145
  if (!indexOfLastPreceding) throw new ReferenceError("An attempt to get the last element of indexOfLastAfter returned undefined.");
140
- const indicesOfBefore = insertBeforePluginsIDs.filter((v) => pluginIDs.includes(v)).map((v) => pluginIDs.indexOf(v)).sort();
141
- for (const index of indicesOfBefore) if (index <= indexOfLastPreceding) {
146
+ const indicesOfBefore = insertBeforePluginsIDs.filter((v) => pluginIDs.includes(v)).map((v) => pluginIDs.indexOf(v)).sort((a, b) => a - b);
147
+ for (const index of indicesOfBefore) {
148
+ if (index > indexOfLastPreceding) continue;
142
149
  const formattedInsertIds = "[" + insertPluginIDs.map((v) => `"${v}"`).join(", ") + "]";
143
150
  const formattedAfterIds = "[" + insertAfterPluginIDs.map((v) => `"${v}"`).join(", ") + "]";
144
151
  const formattedBeforeIds = "[" + insertBeforePluginsIDs.map((v) => `"${v}"`).join(", ") + "]";
@@ -205,7 +212,7 @@ async function getConfig(projectsToPublish, projectsToPackAndPush) {
205
212
  if (_ === void 0) errors.push(/* @__PURE__ */ new Error("projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path."));
206
213
  else projectsToPackAndPush = _.split(";");
207
214
  }
208
- if (errors.length > 0) throw new Error(["getConfig cannot continue. One or more errors occurred.", ...errors.map((v) => v.stack)].join("\n"));
215
+ if (errors.length > 0) throw new AggregateError(errors, "getConfig cannot continue. One or more errors occurred.");
209
216
  const config = new SemanticReleaseConfigDotnet(projectsToPublish, projectsToPackAndPush ?? []);
210
217
  await config.setupDotnetCommands();
211
218
  const options = config.toOptions();
@@ -1 +1 @@
1
- {"version":3,"file":"semanticReleaseConfigDotnet.mjs","names":["debug"],"sources":["../src/semanticReleaseConfigDotnet.ts"],"sourcesContent":["/**\n * # Semantic-Release Config Factory (dotnet)\n * A functional Semantic-Release configuration for dotnet projects\n *\n * extends {@link baseConfig }\n *\n * <-- TABLE OF CONTENTS -->\n *\n * EASY: {@link getConfig}\n * Just provide the paths of the project file(s) and keep your API tokens ready.\n * ADVANCED: {@link SemanticReleaseConfigDotnet}\n * Allows for a hands-on customization if {@link getConfig} doesn't meet your needs.\n * Use a copy of {@link getConfig} as the starting point of a new function and make changes from there.\n * - {@link SemanticReleaseConfigDotnet#splicePlugin splicePlugin (insert/edit plugins)}\n * - {@link SemanticReleaseConfigDotnet#setupDotnetCommands setupDotnetCommands}\n * - {@link SemanticReleaseConfigDotnet#getTokenTestingCommands getTokenTestingCommands}\n */\n\nimport { inspect } from 'node:util';\nimport type { Options } from 'semantic-release';\n// @ts-types=\"./semantic-release__exec.d.ts\"\nimport type { Options as SRExecOptions } from '@semantic-release/exec';\nimport * as console from 'node:console';\nimport debug from './debug.ts';\nimport { configureDotnetNugetPush, configurePrepareCmd } from './dotnet/helpers.ts';\nimport { getEnvVarValue } from './utils/env.ts';\nimport { baseConfig } from './semanticReleaseConfig.ts';\nimport { NugetRegistryInfo } from './dotnet/NugetRegistryInfo.ts';\nimport { MSBuildProject } from './dotnet/MSBuildProject.ts';\nimport { insertPlugin } from './insertPlugins.ts';\n\ntype UnArray<T> = T extends (infer U)[] ? U : T;\ninterface SRConfigDotnetOptions extends Omit<typeof baseConfig, 'plugins'> {\n plugins: (UnArray<typeof baseConfig.plugins> | [string, unknown])[];\n}\n\nexport class SemanticReleaseConfigDotnet {\n private readonly options: SRConfigDotnetOptions;\n private readonly _projectsToPublish: string[] | MSBuildProject[];\n private _projectsToPackAndPush: string[] | NugetRegistryInfo[];\n private readonly _evaluatedProjects: MSBuildProject[];\n\n /**\n * Creates an instance of SemanticReleaseConfigDotnet.\n * Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet` publish, pack, and push.\n *\n * Note: To sign packages, create a Target in the corresponding project(s) e.g.\n * ```xml\n * <Target Name=\"SignNupkgs\" AfterTargets=\"Pack\">\n * <Exec Command=\"dotnet nuget sign $(PackageOutputPath) [remaining args]\" ConsoleToMsBuild=\"true\" />\n * </Target>\n * ```\n * Alternatively, splice your signing commands into the publishCmd string,\n * inserting them before `dotnet nuget push`.\n * If you sign different signatures depending on the NuGet registry,\n * splice your signing command (with \"overwrite signature\" enabled, if\n * desired) before the corresponding registry's `dotnet nuget push` command.\n * @param projectsToPublish An array of dotnet projects' relative paths. If\n * empty or unspecified, tries getting projects' semi-colon-separated relative\n * paths from the `PROJECTS_TO_PUBLISH` environment variable. If configured as\n * recommended, the projects' publish outputs will be zipped to '$PWD/publish'\n * for use in the `publish` semantic-release step (typically, GitHub release).\n * @param projectsToPackAndPush An array of dotnet projects' relative paths.\n * If empty or unspecified, tries getting projects' semi-colon-separated\n * relative paths from the `PROJECTS_TO_PACK_AND_PUSH` environment variable.\n * Otherwise, no packages will be packed and pushed.\n * If configured as recommended, `dotnet pack` will output the nupkg/snupkg\n * files to `$PWD/publish` where they will be globbed by `dotnet nuget push`.\n */\n constructor(\n projectsToPublish: string[] | MSBuildProject[],\n projectsToPackAndPush: string[] | NugetRegistryInfo[],\n ) {\n this.options = baseConfig;\n /* normalize PluginSpecs to tuples */\n this.options.plugins = this.options.plugins.map(pluginSpec => typeof pluginSpec === 'string'\n ? [pluginSpec, {}]\n : pluginSpec,\n );\n\n this._projectsToPublish = projectsToPublish;\n if (this._projectsToPublish.length === 0) {\n const p = getEnvVarValue('PROJECTS_TO_PUBLISH')?.split(';');\n if (p && p.length > 0) {\n this._projectsToPublish = p;\n }\n else if (debug.enabled) {\n debug(new Error('At least one project must be published. `projectsToPackAndPush` is empty and environment variable `PROJECTS_TO_PUBLISH` is undefined or empty.'));\n }\n }\n\n this._projectsToPackAndPush = projectsToPackAndPush;\n if (this._projectsToPackAndPush.length === 0) {\n const p = getEnvVarValue('PROJECTS_TO_PACK_AND_PUSH')?.split(';');\n if (p && p.length > 0) {\n this._projectsToPackAndPush = p;\n }\n else if (debug.enabled) {\n debug(new Error('projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path.'));\n }\n }\n\n // may be zero-length array\n this._evaluatedProjects = [\n ...this._projectsToPublish.filter(v => v instanceof MSBuildProject),\n ...this._projectsToPackAndPush\n .filter(v => v instanceof NugetRegistryInfo)\n .map(v => v.project),\n ];\n }\n\n get ProjectsToPublish(): string[] | MSBuildProject[] {\n return this._projectsToPublish;\n }\n\n get ProjectsToPackAndPush(): string[] | NugetRegistryInfo[] {\n return this._projectsToPackAndPush;\n }\n\n get EvaluatedProjects(): MSBuildProject[] {\n return this._evaluatedProjects;\n }\n\n // eslint-disable-next-line jsdoc/require-param\n /** @deprecated Superseded by {@link splicePlugin} */\n insertPlugin(\n afterPluginsIDs: string[],\n insertPluginIDs: string[],\n beforePluginsIDs: string[],\n ): void {\n this.options.plugins = insertPlugin(this.options.plugins, afterPluginsIDs, insertPluginIDs, beforePluginsIDs);\n }\n\n /**\n * generate dotnet commands for \\@semantic-release/exec, appending commands with ' && ' when necessary.\n *\n * Note: All strings in {@link this.ProjectsToPackAndPush} will be converted to basic {@link NugetRegistryInfo} instances with default values.\n * If you need specific NRI settings or you need to push to GitLab-like or GitHub-like registries, instantiate them instead of passing their paths.\n * @todo change to builder method? e.g. static async SetupDotnetCommands(this: SemanticReleaseConfigDotnet): Promise<SemanticReleaseConfigDotnet>\n * @todo Add options param to allow users to enable pushing to GitLab, GitHub, NuGet.org with default settings -OR- with entirely custom settings.\n * @see https://github.com/semantic-release/exec#usage\n */\n async setupDotnetCommands(): Promise<void> {\n let srExecIndex = this.options.plugins.findIndex(\n v => v[0] === '@semantic-release/exec',\n );\n if (srExecIndex === -1) {\n const message = `\\\nUnable to find\\`['@semantic-release/exec', unknown]\\` in plugins array!\nAppending it to the end of the array...This may cause an unexpected order of operations!`;\n console.warn(message);\n srExecIndex = this.options.plugins.push(['@semantic-release/exec', {}]) - 1;\n }\n\n const plugin = this.options.plugins[srExecIndex] as ['@semantic-release/exec', SRExecOptions];\n const execOptions: SRExecOptions = plugin[1];\n\n // ensure all packable projects are evaluated\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n this._projectsToPackAndPush = await Promise.all(\n this._projectsToPackAndPush.map(async (project) => {\n if (typeof project === 'string') {\n const packableProjects = await Promise.all(\n await MSBuildProject.PackableProjectsToMSBuildProjects(\n [project],\n ),\n );\n if (packableProjects.length === 0)\n throw new Error('No MSBuildProject instances were returned!');\n this._evaluatedProjects.push(...packableProjects);\n\n // if the user doesn't want a defaulted NRI, they should pass their own NRI (or derived) instance.\n return packableProjects.map(project => new NugetRegistryInfo({ project }));\n }\n else return [project];\n }),\n ).then(p => p.flat()) as NugetRegistryInfo[];\n\n // todo: double-check token-testing commands. Are they formatted prepended correctly?\n const verifyConditionsCmdAppendix = await Promise.all(\n this._projectsToPackAndPush\n .map(async project =>\n await project.PackDummyPackage({})\n .then(() =>\n project.GetPushDummyCommand({}),\n ),\n ),\n ).then(cmds =>\n cmds.join(' && '),\n );\n execOptions.verifyConditionsCmd\n = execOptions.verifyConditionsCmd && execOptions.verifyConditionsCmd.trim().length > 0\n ? `${execOptions.verifyConditionsCmd} && ${verifyConditionsCmdAppendix}`\n : verifyConditionsCmdAppendix;\n\n const verifyReleaseCmdAppendix\n = this.ProjectsToPackAndPush\n .filter(project =>\n typeof project !== 'string',\n ).map(project =>\n project.GetIsNextVersionAlreadyPublishedCommand(),\n ).join(' && ');\n execOptions.verifyReleaseCmd\n = execOptions.verifyReleaseCmd && execOptions.verifyReleaseCmd.trim().length > 0\n ? `${execOptions.verifyReleaseCmd} && ${verifyReleaseCmdAppendix}`\n : verifyConditionsCmdAppendix;\n\n const prepareCmdAppendix = await configurePrepareCmd(\n this._projectsToPublish,\n this._projectsToPackAndPush,\n );\n\n // 'ZipPublishDir' zips each publish folder to ./publish/*.zip\n execOptions.prepareCmd\n = execOptions.prepareCmd && execOptions.prepareCmd.trim().length > 0\n ? `${execOptions.prepareCmd} && ${prepareCmdAppendix}`\n : prepareCmdAppendix;\n\n // FINISHED execOptions.prepareCmd\n // STARTING execOptions.publishCmd\n if (this._projectsToPackAndPush.length > 0) {\n const publishCmdAppendix: string = configureDotnetNugetPush(\n this._projectsToPackAndPush,\n );\n execOptions.publishCmd\n = execOptions.publishCmd && execOptions.publishCmd.trim().length > 0\n ? `${execOptions.publishCmd} && ${publishCmdAppendix}`\n : publishCmdAppendix;\n }\n\n // FINISHED execOptions.publishCmd\n }\n\n /**\n * Insert a plugin into the plugins array.\n * @param insertAfterPluginIDs Plugins which should appear BEFORE\n * {@link insertPluginIDs}.\n * @param insertPluginIDs The plugin(s) to insert into the plugins array.\n * @param insertBeforePluginsIDs plugins which should appear AFTER the\n * inserted plugin(s).\n */\n splicePlugin(\n insertAfterPluginIDs: string[],\n insertPluginIDs: string[],\n insertBeforePluginsIDs: string[],\n ): void {\n const errors: Error[] = [];\n const pluginIDs = this.options.plugins.map(v =>\n typeof v === 'string' ? v : v[0],\n ) as (typeof this.options.plugins[number])[][0];\n\n // if any beforePluginIDs are ordered before the last afterPlugin, throw. Impossible to sort.\n\n const indexOfLastPreceding: number | undefined = insertAfterPluginIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort()\n .find((_v, i, obj) => i === obj.length - 1);\n if (!indexOfLastPreceding)\n throw new ReferenceError(\n 'An attempt to get the last element of indexOfLastAfter returned undefined.',\n );\n\n const indicesOfBefore: number[] = insertBeforePluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort();\n\n for (const index of indicesOfBefore) {\n if (index <= indexOfLastPreceding) {\n const formattedInsertIds: string\n = '[' + insertPluginIDs.map(v => `\"${v}\"`).join(', ') + ']';\n const formattedAfterIds: string\n = '[' + insertAfterPluginIDs.map(v => `\"${v}\"`).join(', ') + ']';\n const formattedBeforeIds: string\n = '[' + insertBeforePluginsIDs.map(v => `\"${v}\"`).join(', ') + ']';\n errors.push(\n new Error(\n `insertPlugin was instructed to insert ${formattedInsertIds} after ${formattedAfterIds} and before ${formattedBeforeIds}, `\n + `but ${JSON.stringify(pluginIDs[indexOfLastPreceding])} is ordered after ${JSON.stringify(pluginIDs[index])}!`,\n ),\n );\n }\n }\n\n if (errors.length > 0)\n throw new AggregateError(errors, 'One or more errors occurred while splicing plugin-option tuples into the Semantic Release config!');\n\n this.options.plugins.splice(\n indexOfLastPreceding + 1,\n 0,\n ...insertPluginIDs.map(v => [v, {}] satisfies [string, unknown]),\n );\n }\n\n // todo: join result with dummy pack commands\n protected async getTokenTestingCommands(): Promise<string> {\n const promiseProjects = this.ProjectsToPackAndPush.every(nri => nri instanceof NugetRegistryInfo)\n ? this.ProjectsToPackAndPush.map(nri => nri.project)\n : await Promise.all(await MSBuildProject.PackableProjectsToMSBuildProjects(this.ProjectsToPackAndPush));\n\n /** if a project is not in {@link EvaluatedProjects}, add it */\n for (const project of promiseProjects) {\n if (!this.EvaluatedProjects.includes(project))\n this.EvaluatedProjects.push(project);\n }\n\n const regInfos = promiseProjects.map(\n p => new NugetRegistryInfo({ project: p }),\n );\n const nupkgPaths = await Promise.all(\n regInfos.map(nri =>\n nri.PackDummyPackage({}).then((nupkgs) => {\n // this is a full file path.\n const mainNupkg = nupkgs.find(nupkg =>\n new RegExp(/(?<!symbols)\\.nupkg$/).test(nupkg),\n );\n if (mainNupkg !== undefined)\n return { nri: nri, nupkgPath: mainNupkg } as const;\n throw new Error(\n 'None of the following dummy packages are non-symbol .nupkg files:\\n'\n + nupkgs.map(nupkg => ` - ${nupkg}`).join('\\n')\n + '\\nIf you intended to push only symbol packages, check if a feature request already exists (https://github.com/HaloSPV3/HCE.Shared/issues?q=push+snupkg) and, if one does not exist, create one containing the keywords \"push snupkg\".',\n );\n }),\n ),\n );\n const pushCommands = nupkgPaths.map(pair =>\n pair.nri.GetPushDummyCommand({}),\n );\n return pushCommands.join(' && ');\n }\n\n toOptions(): Options {\n return this.options;\n }\n}\n\n/**\n * Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet`\n * publish, pack, and nuget-push.\n * @param projectsToPublish\n * An array of dotnet projects' relative paths -OR- an array of\n * {@link MSBuildProject} instances.\n * - If `MSBuildProject[]`, the instances will be used as-is.\n * - If `[]`, tries getting projects' semi-colon-separated relative paths from\n * the `PROJECTS_TO_PUBLISH` environment variable.\n * - If configured as recommended, the projects' publish outputs will be zipped\n * to '$PWD/publish' for use in the `publish` semantic-release step e.g. for a\n * GitHub release.\n * @param projectsToPackAndPush An array of dotnet projects' relative paths -OR-\n * an array of instances of {@link NugetRegistryInfo} and/or derived classes.\n * - If `NugetRegistryInfo[]`, no conversions or modifications will occur.\n * - If `string[]`, the project paths will be converted to\n * {@link NugetRegistryInfo} instances with default values. This may be undesired.\n * - If `[]`, `dotnet pack` and `dotnet nuget push` commands will not be configured.\n * - If `undefined`, tries getting projects' semi-colon-separated relative paths\n * from the `PROJECTS_TO_PACK_AND_PUSH` environment variable.\n * With the recommended configuration, `dotnet pack` will write the nupkg/snupkg\n * files to `$PWD/publish` where they will be globbed by `dotnet nuget push`.\n * @returns a semantic-release Options object, based on\n * `@halospv3/hce.shared-config` (our base config), with the\n * `@semantic-release/exec` plugin configured to `dotnet publish`, `pack`, and\n * `push` the specified projects.\n */\nexport async function getConfig(\n projectsToPublish: string[] | MSBuildProject[],\n projectsToPackAndPush?: string[] | NugetRegistryInfo[],\n): Promise<Options> {\n if (debug.enabled) {\n debug(\n 'hce.shared-config:\\n' + inspect(baseConfig, false, Infinity, true),\n );\n }\n\n const errors: Error[] = [];\n\n if (projectsToPublish.length === 0) {\n const _ = getEnvVarValue('PROJECTS_TO_PUBLISH');\n if (_ === undefined)\n errors.push(\n new Error(\n 'projectsToPublish.length must be > 0 or PROJECTS_TO_PUBLISH must be defined and contain at least one path.',\n ),\n );\n else projectsToPublish = _.split(';');\n }\n\n if (!projectsToPackAndPush) {\n const _ = getEnvVarValue('PROJECTS_TO_PACK_AND_PUSH');\n if (_ === undefined)\n errors.push(\n new Error(\n 'projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path.',\n ),\n );\n else projectsToPackAndPush = _.split(';');\n }\n\n if (errors.length > 0) {\n throw new Error(\n [\n 'getConfig cannot continue. One or more errors occurred.',\n ...errors.map(v => v.stack),\n ].join('\\n'),\n );\n }\n\n const config = new SemanticReleaseConfigDotnet(\n projectsToPublish,\n projectsToPackAndPush ?? [],\n );\n await config.setupDotnetCommands();\n\n const options: Options = config.toOptions();\n if (debug.enabled) {\n debug('modified plugins array:');\n debug(inspect(options.plugins, false, Infinity));\n }\n\n return options;\n}\n\n/**\n * @module semanticReleaseConfigDotnet\n */\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAa,8BAAb,MAAyC;CACvC;CACA;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BA,YACE,mBACA,uBACA;EACA,KAAK,UAAU;EAEf,KAAK,QAAQ,UAAU,KAAK,QAAQ,QAAQ,KAAI,eAAc,OAAO,eAAe,WAChF,CAAC,YAAY,EAAE,CAAC,GAChB,WACH;EAED,KAAK,qBAAqB;EAC1B,IAAI,KAAK,mBAAmB,WAAW,GAAG;GACxC,MAAM,IAAI,eAAe,sBAAsB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AK,CACb;CAGH,MAAM,SAAS,IAAI,4BACjB,mBACA,yBAAyB,EAAE,CAC5B;CACD,MAAM,OAAO,qBAAqB;CAElC,MAAM,UAAmB,OAAO,WAAW;CAC3C,IAAIA,OAAM,SAAS;EACjB,OAAM,0BAA0B;EAChC,OAAM,QAAQ,QAAQ,SAAS,OAAO,SAAS,CAAC;;CAGlD,OAAO"}
1
+ {"version":3,"file":"semanticReleaseConfigDotnet.mjs","names":["getEnvironmentVariableValue","debug","configurePrepareCommand"],"sources":["../src/semanticReleaseConfigDotnet.ts"],"sourcesContent":["/**\n * # Semantic-Release Config Factory (dotnet)\n * A functional Semantic-Release configuration for dotnet projects\n *\n * extends {@link baseConfig }\n *\n * <-- TABLE OF CONTENTS -->\n *\n * EASY: {@link getConfig}\n * Just provide the paths of the project file(s) and keep your API tokens ready.\n * ADVANCED: {@link SemanticReleaseConfigDotnet}\n * Allows for a hands-on customization if {@link getConfig} doesn't meet your needs.\n * Use a copy of {@link getConfig} as the starting point of a new function and make changes from there.\n * - {@link SemanticReleaseConfigDotnet#splicePlugin splicePlugin (insert/edit plugins)}\n * - {@link SemanticReleaseConfigDotnet#setupDotnetCommands setupDotnetCommands}\n * - {@link SemanticReleaseConfigDotnet#getTokenTestingCommands getTokenTestingCommands}\n */\n\nimport { inspect } from 'node:util';\nimport type { Options } from 'semantic-release';\n// @ts-types=\"./semantic-release__exec.d.ts\"\nimport type { Options as SRExecOptions } from '@semantic-release/exec';\nimport * as console from 'node:console';\nimport debug from './debug.ts';\nimport { configureDotnetNugetPush, configurePrepareCmd as configurePrepareCommand } from './dotnet/helpers.ts';\nimport { getEnvVarValue as getEnvironmentVariableValue } from './utils/env.ts';\nimport { baseConfig } from './semanticReleaseConfig.ts';\nimport { NugetRegistryInfo } from './dotnet/NugetRegistryInfo.ts';\nimport { MSBuildProject } from './dotnet/MSBuildProject.ts';\nimport { insertPlugin } from './insertPlugins.ts';\n\ntype UnArray<T> = T extends (infer U)[] ? U : T;\ninterface SRConfigDotnetOptions extends Omit<typeof baseConfig, 'plugins'> {\n plugins: (UnArray<typeof baseConfig.plugins> | [string, unknown])[];\n}\n\nexport class SemanticReleaseConfigDotnet {\n private readonly options: SRConfigDotnetOptions;\n private readonly _projectsToPublish: string[] | MSBuildProject[];\n private _projectsToPackAndPush: string[] | NugetRegistryInfo[];\n private readonly _evaluatedProjects: MSBuildProject[];\n\n /**\n * Creates an instance of SemanticReleaseConfigDotnet.\n * Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet` publish, pack, and push.\n *\n * Note: To sign packages, create a Target in the corresponding project(s) e.g.\n * ```xml\n * <Target Name=\"SignNupkgs\" AfterTargets=\"Pack\">\n * <Exec Command=\"dotnet nuget sign $(PackageOutputPath) [remaining args]\" ConsoleToMsBuild=\"true\" />\n * </Target>\n * ```\n * Alternatively, splice your signing commands into the publishCmd string,\n * inserting them before `dotnet nuget push`.\n * If you sign different signatures depending on the NuGet registry,\n * splice your signing command (with \"overwrite signature\" enabled, if\n * desired) before the corresponding registry's `dotnet nuget push` command.\n * @param projectsToPublish An array of dotnet projects' relative paths. If\n * empty or unspecified, tries getting projects' semi-colon-separated relative\n * paths from the `PROJECTS_TO_PUBLISH` environment variable. If configured as\n * recommended, the projects' publish outputs will be zipped to '$PWD/publish'\n * for use in the `publish` semantic-release step (typically, GitHub release).\n * @param projectsToPackAndPush An array of dotnet projects' relative paths.\n * If empty or unspecified, tries getting projects' semi-colon-separated\n * relative paths from the `PROJECTS_TO_PACK_AND_PUSH` environment variable.\n * Otherwise, no packages will be packed and pushed.\n * If configured as recommended, `dotnet pack` will output the nupkg/snupkg\n * files to `$PWD/publish` where they will be globbed by `dotnet nuget push`.\n */\n constructor(\n projectsToPublish: string[] | MSBuildProject[],\n projectsToPackAndPush: string[] | NugetRegistryInfo[],\n ) {\n this.options = baseConfig;\n /* normalize PluginSpecs to tuples */\n this.options.plugins = this.options.plugins.map(pluginSpec => typeof pluginSpec === 'string'\n ? [pluginSpec, {}]\n : pluginSpec,\n );\n\n this._projectsToPublish = projectsToPublish;\n if (this._projectsToPublish.length === 0) {\n const p = getEnvironmentVariableValue('PROJECTS_TO_PUBLISH')?.split(';');\n if (p && p.length > 0) {\n this._projectsToPublish = p;\n }\n else if (debug.enabled) {\n debug(new Error('At least one project must be published. `projectsToPackAndPush` is empty and environment variable `PROJECTS_TO_PUBLISH` is undefined or empty.'));\n }\n }\n\n this._projectsToPackAndPush = projectsToPackAndPush;\n if (this._projectsToPackAndPush.length === 0) {\n const p = getEnvironmentVariableValue('PROJECTS_TO_PACK_AND_PUSH')?.split(';');\n if (p && p.length > 0) {\n this._projectsToPackAndPush = p;\n }\n else if (debug.enabled) {\n debug(new Error('projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path.'));\n }\n }\n\n // may be zero-length array\n this._evaluatedProjects = [\n ...this._projectsToPublish.filter(v => v instanceof MSBuildProject),\n ...this._projectsToPackAndPush\n .filter(v => v instanceof NugetRegistryInfo)\n .map(v => v.project),\n ];\n }\n\n get ProjectsToPublish(): string[] | MSBuildProject[] {\n return this._projectsToPublish;\n }\n\n get ProjectsToPackAndPush(): string[] | NugetRegistryInfo[] {\n return this._projectsToPackAndPush;\n }\n\n get EvaluatedProjects(): MSBuildProject[] {\n return this._evaluatedProjects;\n }\n\n // eslint-disable-next-line jsdoc/require-param\n /** @deprecated Superseded by {@link splicePlugin} */\n insertPlugin(\n afterPluginsIDs: string[],\n insertPluginIDs: string[],\n beforePluginsIDs: string[],\n ): void {\n this.options.plugins = insertPlugin(this.options.plugins, afterPluginsIDs, insertPluginIDs, beforePluginsIDs);\n }\n\n /**\n * generate dotnet commands for \\@semantic-release/exec, appending commands with ' && ' when necessary.\n *\n * Note: All strings in {@link this.ProjectsToPackAndPush} will be converted to basic {@link NugetRegistryInfo} instances with default values.\n * If you need specific NRI settings or you need to push to GitLab-like or GitHub-like registries, instantiate them instead of passing their paths.\n * @todo change to builder method? e.g. static async SetupDotnetCommands(this: SemanticReleaseConfigDotnet): Promise<SemanticReleaseConfigDotnet>\n * @todo Add options param to allow users to enable pushing to GitLab, GitHub, NuGet.org with default settings -OR- with entirely custom settings.\n * @see https://github.com/semantic-release/exec#usage\n */\n async setupDotnetCommands(): Promise<void> {\n let srExecIndex = this.options.plugins.findIndex(\n v => v[0] === '@semantic-release/exec',\n );\n if (srExecIndex === -1) {\n const message = `\\\nUnable to find\\`['@semantic-release/exec', unknown]\\` in plugins array!\nAppending it to the end of the array...This may cause an unexpected order of operations!`;\n console.warn(message);\n this.options.plugins.push(['@semantic-release/exec', {}]);\n srExecIndex = this.options.plugins.length - 1;\n }\n\n const plugin = this.options.plugins[srExecIndex] as ['@semantic-release/exec', SRExecOptions];\n const execOptions: SRExecOptions = plugin[1];\n\n // ensure all packable projects are evaluated\n const projectPromiseArrayArray = await Promise.all(\n this._projectsToPackAndPush.map(async (project) => {\n if (typeof project === 'string') {\n const packableProjects = await Promise.all(\n await MSBuildProject.PackableProjectsToMSBuildProjects(\n [project],\n ),\n );\n if (packableProjects.length === 0)\n throw new Error('No MSBuildProject instances were returned!');\n this._evaluatedProjects.push(...packableProjects);\n\n // if the user doesn't want a defaulted NRI, they should pass their own NRI (or derived) instance.\n return packableProjects.map(project => new NugetRegistryInfo({ project }));\n }\n return [project];\n }),\n );\n this._projectsToPackAndPush = projectPromiseArrayArray.flat();\n\n const _pushDummyCommands = await Promise.all(\n this._projectsToPackAndPush\n .map(async (project) => {\n await project.PackDummyPackage({});\n return project.GetPushDummyCommand({});\n }),\n );\n const verifyConditionsCommandAppendix = _pushDummyCommands.join(' && ');\n\n execOptions.verifyConditionsCmd\n = execOptions.verifyConditionsCmd && execOptions.verifyConditionsCmd.trim().length > 0\n ? `${execOptions.verifyConditionsCmd} && ${verifyConditionsCommandAppendix}`\n : verifyConditionsCommandAppendix;\n\n const verifyReleaseCommandAppendix\n = this.ProjectsToPackAndPush\n .filter(project =>\n typeof project !== 'string',\n ).map(project =>\n project.GetIsNextVersionAlreadyPublishedCommand(),\n ).join(' && ');\n execOptions.verifyReleaseCmd\n = execOptions.verifyReleaseCmd && execOptions.verifyReleaseCmd.trim().length > 0\n ? `${execOptions.verifyReleaseCmd} && ${verifyReleaseCommandAppendix}`\n : verifyConditionsCommandAppendix;\n\n const prepareCommandAppendix = await configurePrepareCommand(\n this._projectsToPublish,\n this._projectsToPackAndPush,\n );\n\n // 'ZipPublishDir' zips each publish folder to ./publish/*.zip\n execOptions.prepareCmd\n = execOptions.prepareCmd && execOptions.prepareCmd.trim().length > 0\n ? `${execOptions.prepareCmd} && ${prepareCommandAppendix}`\n : prepareCommandAppendix;\n\n // FINISHED execOptions.prepareCmd\n // STARTING execOptions.publishCmd\n if (this._projectsToPackAndPush.length > 0) {\n const publishCommandAppendix: string = configureDotnetNugetPush(\n this._projectsToPackAndPush,\n );\n execOptions.publishCmd\n = execOptions.publishCmd && execOptions.publishCmd.trim().length > 0\n ? `${execOptions.publishCmd} && ${publishCommandAppendix}`\n : publishCommandAppendix;\n }\n\n // FINISHED execOptions.publishCmd\n }\n\n /**\n * Insert a plugin into the plugins array.\n * @param insertAfterPluginIDs Plugins which should appear BEFORE\n * {@link insertPluginIDs}.\n * @param insertPluginIDs The plugin(s) to insert into the plugins array.\n * @param insertBeforePluginsIDs plugins which should appear AFTER the\n * inserted plugin(s).\n */\n splicePlugin(\n insertAfterPluginIDs: string[],\n insertPluginIDs: string[],\n insertBeforePluginsIDs: string[],\n ): void {\n const errors: Error[] = [];\n const pluginIDs = this.options.plugins.map(v =>\n typeof v === 'string' ? v : v[0],\n ) as (typeof this.options.plugins[number])[][0];\n\n // if any beforePluginIDs are ordered before the last afterPlugin, throw. Impossible to sort.\n\n const indexOfLastPreceding: number | undefined = insertAfterPluginIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort((a, b) => a - b)\n .find((_v, index, object) => index === object.length - 1);\n if (!indexOfLastPreceding)\n throw new ReferenceError(\n 'An attempt to get the last element of indexOfLastAfter returned undefined.',\n );\n\n const indicesOfBefore: number[] = insertBeforePluginsIDs\n .filter(v => pluginIDs.includes(v))\n .map(v => pluginIDs.indexOf(v))\n .sort((a, b) => a - b);\n\n for (const index of indicesOfBefore) {\n if (index > indexOfLastPreceding)\n continue;\n\n const formattedInsertIds: string\n = '[' + insertPluginIDs.map(v => `\"${v}\"`).join(', ') + ']';\n const formattedAfterIds: string\n = '[' + insertAfterPluginIDs.map(v => `\"${v}\"`).join(', ') + ']';\n const formattedBeforeIds: string\n = '[' + insertBeforePluginsIDs.map(v => `\"${v}\"`).join(', ') + ']';\n errors.push(\n new Error(\n `insertPlugin was instructed to insert ${formattedInsertIds} after ${formattedAfterIds} and before ${formattedBeforeIds}, `\n + `but ${JSON.stringify(pluginIDs[indexOfLastPreceding])} is ordered after ${JSON.stringify(pluginIDs[index])}!`,\n ),\n );\n }\n\n if (errors.length > 0)\n throw new AggregateError(errors, 'One or more errors occurred while splicing plugin-option tuples into the Semantic Release config!');\n\n this.options.plugins.splice(\n indexOfLastPreceding + 1,\n 0,\n ...insertPluginIDs.map(v => [v, {}] satisfies [string, unknown]),\n );\n }\n\n // todo: join result with dummy pack commands\n protected async getTokenTestingCommands(): Promise<string> {\n const promiseProjects = this.ProjectsToPackAndPush.every(nri => nri instanceof NugetRegistryInfo)\n ? this.ProjectsToPackAndPush.map(nri => nri.project)\n : await Promise.all(await MSBuildProject.PackableProjectsToMSBuildProjects(this.ProjectsToPackAndPush));\n\n /** if a project is not in {@link EvaluatedProjects}, add it */\n for (const project of promiseProjects) {\n if (!this.EvaluatedProjects.includes(project))\n this.EvaluatedProjects.push(project);\n }\n\n const regInfos = promiseProjects.map(\n p => new NugetRegistryInfo({ project: p }),\n );\n const nupkgPaths = await Promise.all(\n regInfos.map(nri =>\n // eslint-disable-next-line unicorn/prefer-await\n nri.PackDummyPackage({}).then((nupkgs) => {\n // this is a full file path.\n const mainNupkg = nupkgs.find(nupkg =>\n new RegExp(/(?<!symbols)\\.nupkg$/).test(nupkg),\n );\n if (mainNupkg !== undefined)\n return { nri: nri, nupkgPath: mainNupkg } as const;\n throw new Error(\n 'None of the following dummy packages are non-symbol .nupkg files:\\n'\n + nupkgs.map(nupkg => ` - ${nupkg}`).join('\\n')\n + '\\nIf you intended to push only symbol packages, check if a feature request already exists (https://github.com/HaloSPV3/HCE.Shared/issues?q=push+snupkg) and, if one does not exist, create one containing the keywords \"push snupkg\".',\n );\n }),\n ),\n );\n const pushCommands = nupkgPaths.map(pair =>\n pair.nri.GetPushDummyCommand({}),\n );\n return pushCommands.join(' && ');\n }\n\n toOptions(): Options {\n return this.options;\n }\n}\n\n/**\n * Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet`\n * publish, pack, and nuget-push.\n * @param projectsToPublish\n * An array of dotnet projects' relative paths -OR- an array of\n * {@link MSBuildProject} instances.\n * - If `MSBuildProject[]`, the instances will be used as-is.\n * - If `[]`, tries getting projects' semi-colon-separated relative paths from\n * the `PROJECTS_TO_PUBLISH` environment variable.\n * - If configured as recommended, the projects' publish outputs will be zipped\n * to '$PWD/publish' for use in the `publish` semantic-release step e.g. for a\n * GitHub release.\n * @param projectsToPackAndPush An array of dotnet projects' relative paths -OR-\n * an array of instances of {@link NugetRegistryInfo} and/or derived classes.\n * - If `NugetRegistryInfo[]`, no conversions or modifications will occur.\n * - If `string[]`, the project paths will be converted to\n * {@link NugetRegistryInfo} instances with default values. This may be undesired.\n * - If `[]`, `dotnet pack` and `dotnet nuget push` commands will not be configured.\n * - If `undefined`, tries getting projects' semi-colon-separated relative paths\n * from the `PROJECTS_TO_PACK_AND_PUSH` environment variable.\n * With the recommended configuration, `dotnet pack` will write the nupkg/snupkg\n * files to `$PWD/publish` where they will be globbed by `dotnet nuget push`.\n * @returns a semantic-release Options object, based on\n * `@halospv3/hce.shared-config` (our base config), with the\n * `@semantic-release/exec` plugin configured to `dotnet publish`, `pack`, and\n * `push` the specified projects.\n */\nexport async function getConfig(\n projectsToPublish: string[] | MSBuildProject[],\n projectsToPackAndPush?: string[] | NugetRegistryInfo[],\n): Promise<Options> {\n if (debug.enabled) {\n debug(\n 'hce.shared-config:\\n' + inspect(baseConfig, false, Infinity, true),\n );\n }\n\n const errors: Error[] = [];\n\n if (projectsToPublish.length === 0) {\n const _ = getEnvironmentVariableValue('PROJECTS_TO_PUBLISH');\n if (_ === undefined)\n errors.push(\n new Error(\n 'projectsToPublish.length must be > 0 or PROJECTS_TO_PUBLISH must be defined and contain at least one path.',\n ),\n );\n else projectsToPublish = _.split(';');\n }\n\n if (!projectsToPackAndPush) {\n const _ = getEnvironmentVariableValue('PROJECTS_TO_PACK_AND_PUSH');\n if (_ === undefined)\n errors.push(\n new Error(\n 'projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path.',\n ),\n );\n else projectsToPackAndPush = _.split(';');\n }\n\n if (errors.length > 0) {\n throw new AggregateError(\n errors,\n 'getConfig cannot continue. One or more errors occurred.',\n );\n }\n\n const config = new SemanticReleaseConfigDotnet(\n projectsToPublish,\n projectsToPackAndPush ?? [],\n );\n await config.setupDotnetCommands();\n\n const options: Options = config.toOptions();\n if (debug.enabled) {\n debug('modified plugins array:');\n debug(inspect(options.plugins, false, Infinity));\n }\n\n return options;\n}\n\n/**\n * @module semanticReleaseConfigDotnet\n */\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAa,8BAAb,MAAyC;CACvC;CACA;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BA,YACE,mBACA,uBACA;EACA,KAAK,UAAU;EAEf,KAAK,QAAQ,UAAU,KAAK,QAAQ,QAAQ,KAAI,eAAc,OAAO,eAAe,WAChF,CAAC,YAAY,CAAC,CAAC,IACf,UACJ;EAEA,KAAK,qBAAqB;EAC1B,IAAI,KAAK,mBAAmB,WAAW,GAAG;GACxC,MAAM,IAAIA,eAA4B,qBAAqB,CAAC,EAAE,MAAM,GAAG;GACvE,IAAI,KAAK,EA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MAAM,IAAIA,eAA4B,2BAA2B;EACjE,IAAI,MAAM,KAAA,GACR,OAAO,qBACL,IAAI,MACF,sHACF,CACF;OACG,wBAAwB,EAAE,MAAM,GAAG;CAC1C;CAEA,IAAI,OAAO,SAAS,GAClB,MAAM,IAAI,eACR,QACA,yDACF;CAGF,MAAM,SAAS,IAAI,4BACjB,mBACA,yBAAyB,CAAC,CAC5B;CACA,MAAM,OAAO,oBAAoB;CAEjC,MAAM,UAAmB,OAAO,UAAU;CAC1C,IAAIC,OAAM,SAAS;EACjB,OAAM,yBAAyB;EAC/B,OAAM,QAAQ,QAAQ,SAAS,OAAO,QAAQ,CAAC;CACjD;CAEA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"setupGitPluginSpec.d.mts","names":[],"sources":["../src/setupGitPluginSpec.ts"],"mappings":";;;;cAKa,WAAA;;AAAb;;;;;AAiGA;;;iBAAgB,kBAAA,CAAmB,OAAA,EAAS,eAAA,KAAoB,eAAA"}
1
+ {"version":3,"file":"setupGitPluginSpec.d.mts","names":[],"sources":["../src/setupGitPluginSpec.ts"],"mappings":";;;;cAKa,WAAA;;AAAb;;;;AAAa;AAgGb;;;iBAAgB,kBAAA,CAAmB,OAAA,EAAS,eAAA,KAAoB,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"setupGitPluginSpec.default.mjs","names":[],"sources":["../src/setupGitPluginSpec.default.ts"],"sourcesContent":["/// <reference file=\"./semantic-release__git.d.ts\">\n// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { Options as GitOptions } from '@semantic-release/git';\n/**\n * As specified at https://github.com/semantic-release/git#options\n * To use, assign or create an object with the same (but mutable) properties and deeply-copy to the object\n * @satisfies { GitOptions }\n */\nexport const DefaultOptions: {\n readonly assets: ['README.md', 'CHANGELOG.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json'];\n readonly message: 'chore(release): ${nextRelease.version} [skip ci]\\n\\n${nextRelease.notes}';\n} = {\n assets: [\n 'README.md',\n 'CHANGELOG.md',\n 'package.json',\n 'package-lock.json',\n 'npm-shrinkwrap.json',\n ],\n message:\n 'chore(release): ${nextRelease.version} [skip ci]\\n\\n${nextRelease.notes}',\n} as const satisfies GitOptions;\n"],"mappings":";;;;;;AAQA,MAAa,iBAGT;CACF,QAAQ;EACN;EACA;EACA;EACA;EACA;EACD;CACD,SACE;CACH"}
1
+ {"version":3,"file":"setupGitPluginSpec.default.mjs","names":[],"sources":["../src/setupGitPluginSpec.default.ts"],"sourcesContent":["/// <reference file=\"./semantic-release__git.d.ts\">\n// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { Options as GitOptions } from '@semantic-release/git';\n/**\n * As specified at https://github.com/semantic-release/git#options\n * To use, assign or create an object with the same (but mutable) properties and deeply-copy to the object\n * @satisfies { GitOptions }\n */\nexport const DefaultOptions: {\n readonly assets: ['README.md', 'CHANGELOG.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json'];\n readonly message: 'chore(release): ${nextRelease.version} [skip ci]\\n\\n${nextRelease.notes}';\n} = {\n assets: [\n 'README.md',\n 'CHANGELOG.md',\n 'package.json',\n 'package-lock.json',\n 'npm-shrinkwrap.json',\n ],\n message:\n 'chore(release): ${nextRelease.version} [skip ci]\\n\\n${nextRelease.notes}',\n} as const satisfies GitOptions;\n"],"mappings":";;;;;;AAQA,MAAa,iBAGT;CACF,QAAQ;EACN;EACA;EACA;EACA;EACA;CACF;CACA,SACE;AACJ"}
@@ -21,29 +21,29 @@ function gitAssetsToStringArray(assets) {
21
21
  if (Array.isArray(assets)) return assets.filter((asset) => isGitAsset(asset)).map((v) => typeof v === "string" ? v : v.path);
22
22
  if (typeof assets === "string") return [assets];
23
23
  if (typeof assets.path === "string") return [assets.path];
24
- else throw new TypeError("assets is not typeof GitOptions['assets'!");
24
+ throw new TypeError("assets is not typeof GitOptions['assets'!");
25
25
  }
26
26
  /**
27
27
  * Sanitize a {@link GitOptions} object so its {@link GitOptions#assets} property is either `false` or a `string[]`.
28
- * @param opts A {@link GitOptions} object.
28
+ * @param options A {@link GitOptions} object.
29
29
  * @returns A {@link GitOptions} object whose {@link GitOptions#assets} is `string[] | false`.
30
30
  */
31
- function sanitizeGitOptions(opts) {
31
+ function sanitizeGitOptions(options) {
32
32
  return {
33
- ...opts,
34
- assets: opts.assets === false ? opts.assets : gitAssetsToStringArray(opts.assets)
33
+ ...options,
34
+ assets: options.assets === false ? options.assets : gitAssetsToStringArray(options.assets)
35
35
  };
36
36
  }
37
37
  /**
38
- *Determine if {@link opts} is a {@link GitOptions} object.
39
- * @param opts Anything.
40
- * @returns `true` if {@link opts} is a {@link GitOptions} object. Else, `false`.
38
+ *Determine if {@link options} is a {@link GitOptions} object.
39
+ * @param options Anything.
40
+ * @returns `true` if {@link options} is a {@link GitOptions} object. Else, `false`.
41
41
  */
42
- function isGitOptions(opts) {
42
+ function isGitOptions(options) {
43
43
  let isOptions = false;
44
- if (typeof opts !== "object" || opts == void 0) return isOptions;
45
- if ("assets" in opts) isOptions = Array.isArray(opts.assets) ? opts.assets.every((unk) => isGitAsset(unk)) : isGitAsset(opts.assets);
46
- if ("message" in opts) isOptions = typeof opts.message === "string";
44
+ if (typeof options !== "object" || options == void 0) return isOptions;
45
+ if ("assets" in options) isOptions = Array.isArray(options.assets) ? options.assets.every((unk) => isGitAsset(unk)) : isGitAsset(options.assets);
46
+ if ("message" in options) isOptions = typeof options.message === "string";
47
47
  return isOptions;
48
48
  }
49
49
  /**
@@ -80,7 +80,7 @@ function setupGitPluginSpec(plugins) {
80
80
  * Modifying them will affect the plugins array.
81
81
  */
82
82
  const firstGitPlugin = plugins[firstGitPluginIndex];
83
- const firstGitOpts = isGitOptions(firstGitPlugin[1]) ? sanitizeGitOptions(firstGitPlugin[1]) : DefaultOptions;
83
+ const firstGitOptions = isGitOptions(firstGitPlugin[1]) ? sanitizeGitOptions(firstGitPlugin[1]) : DefaultOptions;
84
84
  /**
85
85
  * remove duplicate Git plugin entries;
86
86
  * merge extra options into firstGitPlugin's options
@@ -92,14 +92,14 @@ function setupGitPluginSpec(plugins) {
92
92
  if (index <= firstGitPluginIndex || !isGitPluginSpecTuple(current)) return current;
93
93
  /** if another Git PluginSpec is discovered, copy its options to the first Git PluginSpec and return undefined. */
94
94
  if (hasGitOptions(current)) {
95
- const currentGitOpts = sanitizeGitOptions(current[1]);
96
- if (currentGitOpts.assets === false) firstGitOpts.assets = false;
95
+ const currentGitOptions = sanitizeGitOptions(current[1]);
96
+ if (currentGitOptions.assets === false) firstGitOptions.assets = false;
97
97
  else {
98
- const assets = gitAssetsToStringArray(currentGitOpts.assets);
99
- if (Array.isArray(firstGitOpts.assets)) firstGitOpts.assets.push(...assets);
100
- else firstGitOpts.assets = assets;
98
+ const assets = gitAssetsToStringArray(currentGitOptions.assets);
99
+ if (Array.isArray(firstGitOptions.assets)) firstGitOptions.assets.push(...assets);
100
+ else firstGitOptions.assets = assets;
101
101
  }
102
- if (typeof currentGitOpts.message === "string") firstGitOpts.message = currentGitOpts.message;
102
+ if (typeof currentGitOptions.message === "string") firstGitOptions.message = currentGitOptions.message;
103
103
  }
104
104
  }).filter((pluginSpec) => pluginSpec !== void 0);
105
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"setupGitPluginSpec.mjs","names":[],"sources":["../src/setupGitPluginSpec.ts"],"sourcesContent":["// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { AssetEntry, Options as GitOptions } from '@semantic-release/git';\nimport type { PluginSpecSRGit, PluginSpecTuple } from './semanticReleaseConfig.ts';\nimport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\nexport const GitPluginId = '@semantic-release/git';\nexport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\n/**\n * Check if {@link unk} is an {@link AssetEntry}.\n * @param unk Anything.\n * @returns `true` if {@link unk} is an {@link AssetEntry}. Else, `false`.\n */\nfunction isGitAsset(unk: unknown): unk is AssetEntry {\n if (typeof unk === 'string')\n return true;\n // Avoid ending condition with `typeof unk.path === 'string'`.\n // TS narrowing is bugged; requires the check to be performed TWICE!!\n if (typeof unk === 'object' && unk != undefined && 'path' in unk) {\n return typeof unk.path === 'string';\n }\n return false;\n}\n\n/**\n * Convert one or more {@link AssetEntry AssetEntries} to a `string[]`.\n * @param assets The `assets` property of a {@link GitOptions} object. This may not be `false`.\n * @returns A `string[]` of the given {@link AssetEntry} objects or strings.\n */\nfunction gitAssetsToStringArray(\n assets: Exclude<GitOptions['assets'], false>,\n): string[] {\n if (assets === undefined)\n return [];\n if (Array.isArray(assets)) {\n return assets.filter(asset => isGitAsset(asset))\n .map(v => typeof v === 'string' ? v : v.path);\n }\n if (typeof assets === 'string')\n return [assets] as string[];\n if (typeof assets.path === 'string')\n return [assets.path];\n else\n throw new TypeError('assets is not typeof GitOptions[\\'assets\\'!');\n}\n\n/**\n * Sanitize a {@link GitOptions} object so its {@link GitOptions#assets} property is either `false` or a `string[]`.\n * @param opts A {@link GitOptions} object.\n * @returns A {@link GitOptions} object whose {@link GitOptions#assets} is `string[] | false`.\n */\nfunction sanitizeGitOptions(opts: GitOptions): Omit<GitOptions, 'assets'> & { assets: string[] | false } {\n return { ...opts, assets: opts.assets === false ? opts.assets : gitAssetsToStringArray(opts.assets) };\n}\n\n/**\n *Determine if {@link opts} is a {@link GitOptions} object.\n * @param opts Anything.\n * @returns `true` if {@link opts} is a {@link GitOptions} object. Else, `false`.\n */\nfunction isGitOptions(opts: unknown): opts is GitOptions {\n let isOptions = false;\n\n if (typeof opts !== 'object' || opts == undefined)\n return isOptions;\n if ('assets' in opts) {\n isOptions = Array.isArray(opts.assets)\n ? opts.assets.every(unk => isGitAsset(unk))\n : isGitAsset(opts.assets);\n }\n if ('message' in opts)\n isOptions = typeof opts.message === 'string';\n return isOptions;\n}\n\n/**\n * Determine if {@link pluginSpec} includes a {@link GitOptions} object.\n * @param pluginSpec a {@link PluginSpecTuple}.\n * @returns `true` if {@link pluginSpec[1]} is a {@link GitOptions} object. Else, `false`.\n */\nfunction hasGitOptions<P extends string>(pluginSpec: PluginSpecTuple<P>): pluginSpec is PluginSpecTuple<P, GitOptions> {\n return isGitOptions(pluginSpec[1]);\n};\n\n/**\n * Determined if the plugin ID in {@link pluginSpec} is {@link GitPluginId}.\n * @param pluginSpec A {@link PluginSpecTuple}\n * @returns `true` if {@link pluginSpec[0]} is {@link GitPluginId}\n */\nfunction isGitPluginSpecTuple<T>(pluginSpec: [string, T]): pluginSpec is [typeof GitPluginId, T] {\n return pluginSpec[0] === GitPluginId;\n}\n\n/**\n * https://github.com/semantic-release/git#options\n *\n * This plugin may be deprecated at a later date.\n * Q: Why would I need to commit during release?\n * A: This is for committing your changelog, README, and/or other files updated during the release procedure.\n * @param plugins An ordered array of {@link PluginSpecTuple PluginSpecTuples}.\n * @returns A {@link PluginSpecTuple}[]. Duplicate `@semantic-release/git` plugin entries are merged or overridden. The last entry takes priority e.g. if the last entry is `{assets: false}`, previous entries' assets are ignored.\n */\nexport function setupGitPluginSpec(plugins: PluginSpecTuple[]): PluginSpecTuple[] {\n /** if Git plugin not in load order, return as-is. */\n const firstGitPluginIndex = plugins.findIndex(plugin => isGitPluginSpecTuple(plugin));\n if (firstGitPluginIndex === -1)\n return plugins;\n\n /**\n * the following two const variables are references--not clones.\n * Modifying them will affect the plugins array.\n */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstGitPlugin = plugins[firstGitPluginIndex]!;\n const firstGitOpts: ReturnType<typeof sanitizeGitOptions> = isGitOptions(firstGitPlugin[1])\n ? sanitizeGitOptions(firstGitPlugin[1])\n : DefaultOptions;\n\n /**\n * remove duplicate Git plugin entries;\n * merge extra options into firstGitPlugin's options\n * if `firstGitOpts.assets === false`, do not change it.\n * All duplicate PluginSpecSRGit entries are then reassigned `undefined` and all\n * `undefined` items are filtered from the plugins array.\n */\n return plugins.map((current: PluginSpecTuple, index): PluginSpecTuple | PluginSpecSRGit | undefined => {\n // skip everything up to and including the first Git PluginSpec\n if (index <= firstGitPluginIndex || !isGitPluginSpecTuple(current))\n return current;\n\n /** if another Git PluginSpec is discovered, copy its options to the first Git PluginSpec and return undefined. */\n if (hasGitOptions(current)) {\n const currentGitOpts = sanitizeGitOptions(current[1]);\n\n if (currentGitOpts.assets === false) {\n firstGitOpts.assets = false;\n }\n else {\n const assets: string[] = gitAssetsToStringArray(currentGitOpts.assets);\n if (Array.isArray(firstGitOpts.assets)) {\n firstGitOpts.assets.push(...assets);\n }\n else {\n firstGitOpts.assets = assets;\n }\n }\n\n if (typeof currentGitOpts.message === 'string')\n firstGitOpts.message = currentGitOpts.message;\n }\n return undefined;\n }).filter(pluginSpec => pluginSpec !== undefined);\n}\n"],"mappings":";;AAKA,MAAa,cAAc;;;;;;AAQ3B,SAAS,WAAW,KAAiC;CACnD,IAAI,OAAO,QAAQ,UACjB,OAAO;CAGT,IAAI,OAAO,QAAQ,YAAY,OAAO,KAAA,KAAa,UAAU,KAC3D,OAAO,OAAO,IAAI,SAAS;CAE7B,OAAO;;;;;;;AAQT,SAAS,uBACP,QACU;CACV,IAAI,WAAW,KAAA,GACb,OAAO,EAAE;CACX,IAAI,MAAM,QAAQ,OAAO,EACvB,OAAO,OAAO,QAAO,UAAS,WAAW,MAAM,CAAC,CAC7C,KAAI,MAAK,OAAO,MAAM,WAAW,IAAI,EAAE,KAAK;CAEjD,IAAI,OAAO,WAAW,UACpB,OAAO,CAAC,OAAO;CACjB,IAAI,OAAO,OAAO,SAAS,UACzB,OAAO,CAAC,OAAO,KAAK;MAEpB,MAAM,IAAI,UAAU,4CAA8C;;;;;;;AAQtE,SAAS,mBAAmB,MAA6E;CACvG,OAAO;EAAE,GAAG;EAAM,QAAQ,KAAK,WAAW,QAAQ,KAAK,SAAS,uBAAuB,KAAK,OAAO;EAAE;;;;;;;AAQvG,SAAS,aAAa,MAAmC;CACvD,IAAI,YAAY;CAEhB,IAAI,OAAO,SAAS,YAAY,QAAQ,KAAA,GACtC,OAAO;CACT,IAAI,YAAY,MACd,YAAY,MAAM,QAAQ,KAAK,OAAO,GAClC,KAAK,OAAO,OAAM,QAAO,WAAW,IAAI,CAAC,GACzC,WAAW,KAAK,OAAO;CAE7B,IAAI,aAAa,MACf,YAAY,OAAO,KAAK,YAAY;CACtC,OAAO;;;;;;;AAQT,SAAS,cAAgC,YAA8E;CACrH,OAAO,aAAa,WAAW,GAAG;;;;;;;AAQpC,SAAS,qBAAwB,YAAgE;CAC/F,OAAO,WAAW,OAAO;;;;;;;;;;;AAY3B,SAAgB,mBAAmB,SAA+C;;CAEhF,MAAM,sBAAsB,QAAQ,WAAU,WAAU,qBAAqB,OAAO,CAAC;CACrF,IAAI,wBAAwB,IAC1B,OAAO;;;;;CAOT,MAAM,iBAAiB,QAAQ;CAC/B,MAAM,eAAsD,aAAa,eAAe,GAAG,GACvF,mBAAmB,eAAe,GAAG,GACrC;;;;;;;;CASJ,OAAO,QAAQ,KAAK,SAA0B,UAAyD;EAErG,IAAI,SAAS,uBAAuB,CAAC,qBAAqB,QAAQ,EAChE,OAAO;;EAGT,IAAI,cAAc,QAAQ,EAAE;GAC1B,MAAM,iBAAiB,mBAAmB,QAAQ,GAAG;GAErD,IAAI,eAAe,WAAW,OAC5B,aAAa,SAAS;QAEnB;IACH,MAAM,SAAmB,uBAAuB,eAAe,OAAO;IACtE,IAAI,MAAM,QAAQ,aAAa,OAAO,EACpC,aAAa,OAAO,KAAK,GAAG,OAAO;SAGnC,aAAa,SAAS;;GAI1B,IAAI,OAAO,eAAe,YAAY,UACpC,aAAa,UAAU,eAAe;;GAG1C,CAAC,QAAO,eAAc,eAAe,KAAA,EAAU"}
1
+ {"version":3,"file":"setupGitPluginSpec.mjs","names":[],"sources":["../src/setupGitPluginSpec.ts"],"sourcesContent":["// @ts-types=\"./semantic-release__git.d.ts\"\nimport type { AssetEntry, Options as GitOptions } from '@semantic-release/git';\nimport type { PluginSpecSRGit, PluginSpecTuple } from './semanticReleaseConfig.ts';\nimport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\nexport const GitPluginId = '@semantic-release/git';\nexport { DefaultOptions } from './setupGitPluginSpec.default.ts';\n\n/**\n * Check if {@link unk} is an {@link AssetEntry}.\n * @param unk Anything.\n * @returns `true` if {@link unk} is an {@link AssetEntry}. Else, `false`.\n */\nfunction isGitAsset(unk: unknown): unk is AssetEntry {\n if (typeof unk === 'string')\n return true;\n // Avoid ending condition with `typeof unk.path === 'string'`.\n // TS narrowing is bugged; requires the check to be performed TWICE!!\n if (typeof unk === 'object' && unk != undefined && 'path' in unk) {\n return typeof unk.path === 'string';\n }\n return false;\n}\n\n/**\n * Convert one or more {@link AssetEntry AssetEntries} to a `string[]`.\n * @param assets The `assets` property of a {@link GitOptions} object. This may not be `false`.\n * @returns A `string[]` of the given {@link AssetEntry} objects or strings.\n */\nfunction gitAssetsToStringArray(\n assets: Exclude<GitOptions['assets'], false>,\n): string[] {\n if (assets === undefined)\n return [];\n if (Array.isArray(assets)) {\n return assets.filter(asset => isGitAsset(asset))\n .map(v => typeof v === 'string' ? v : v.path);\n }\n if (typeof assets === 'string')\n return [assets] as string[];\n if (typeof assets.path === 'string')\n return [assets.path];\n throw new TypeError('assets is not typeof GitOptions[\\'assets\\'!');\n}\n\n/**\n * Sanitize a {@link GitOptions} object so its {@link GitOptions#assets} property is either `false` or a `string[]`.\n * @param options A {@link GitOptions} object.\n * @returns A {@link GitOptions} object whose {@link GitOptions#assets} is `string[] | false`.\n */\nfunction sanitizeGitOptions(options: GitOptions): Omit<GitOptions, 'assets'> & { assets: string[] | false } {\n return { ...options, assets: options.assets === false ? options.assets : gitAssetsToStringArray(options.assets) };\n}\n\n/**\n *Determine if {@link options} is a {@link GitOptions} object.\n * @param options Anything.\n * @returns `true` if {@link options} is a {@link GitOptions} object. Else, `false`.\n */\nfunction isGitOptions(options: unknown): options is GitOptions {\n let isOptions = false;\n\n if (typeof options !== 'object' || options == undefined)\n return isOptions;\n if ('assets' in options) {\n isOptions = Array.isArray(options.assets)\n ? options.assets.every(unk => isGitAsset(unk))\n : isGitAsset(options.assets);\n }\n if ('message' in options)\n isOptions = typeof options.message === 'string';\n return isOptions;\n}\n\n/**\n * Determine if {@link pluginSpec} includes a {@link GitOptions} object.\n * @param pluginSpec a {@link PluginSpecTuple}.\n * @returns `true` if {@link pluginSpec[1]} is a {@link GitOptions} object. Else, `false`.\n */\nfunction hasGitOptions<P extends string>(pluginSpec: PluginSpecTuple<P>): pluginSpec is PluginSpecTuple<P, GitOptions> {\n return isGitOptions(pluginSpec[1]);\n};\n\n/**\n * Determined if the plugin ID in {@link pluginSpec} is {@link GitPluginId}.\n * @param pluginSpec A {@link PluginSpecTuple}\n * @returns `true` if {@link pluginSpec[0]} is {@link GitPluginId}\n */\nfunction isGitPluginSpecTuple<T>(pluginSpec: [string, T]): pluginSpec is [typeof GitPluginId, T] {\n return pluginSpec[0] === GitPluginId;\n}\n\n/**\n * https://github.com/semantic-release/git#options\n *\n * This plugin may be deprecated at a later date.\n * Q: Why would I need to commit during release?\n * A: This is for committing your changelog, README, and/or other files updated during the release procedure.\n * @param plugins An ordered array of {@link PluginSpecTuple PluginSpecTuples}.\n * @returns A {@link PluginSpecTuple}[]. Duplicate `@semantic-release/git` plugin entries are merged or overridden. The last entry takes priority e.g. if the last entry is `{assets: false}`, previous entries' assets are ignored.\n */\nexport function setupGitPluginSpec(plugins: PluginSpecTuple[]): PluginSpecTuple[] {\n /** if Git plugin not in load order, return as-is. */\n const firstGitPluginIndex = plugins.findIndex(plugin => isGitPluginSpecTuple(plugin));\n if (firstGitPluginIndex === -1)\n return plugins;\n\n /**\n * the following two const variables are references--not clones.\n * Modifying them will affect the plugins array.\n */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstGitPlugin = plugins[firstGitPluginIndex]!;\n const firstGitOptions: ReturnType<typeof sanitizeGitOptions> = isGitOptions(firstGitPlugin[1])\n ? sanitizeGitOptions(firstGitPlugin[1])\n : DefaultOptions;\n\n /**\n * remove duplicate Git plugin entries;\n * merge extra options into firstGitPlugin's options\n * if `firstGitOpts.assets === false`, do not change it.\n * All duplicate PluginSpecSRGit entries are then reassigned `undefined` and all\n * `undefined` items are filtered from the plugins array.\n */\n return plugins.map((current: PluginSpecTuple, index): PluginSpecTuple | PluginSpecSRGit | undefined => {\n // skip everything up to and including the first Git PluginSpec\n if (index <= firstGitPluginIndex || !isGitPluginSpecTuple(current))\n return current;\n\n /** if another Git PluginSpec is discovered, copy its options to the first Git PluginSpec and return undefined. */\n if (hasGitOptions(current)) {\n const currentGitOptions = sanitizeGitOptions(current[1]);\n\n if (currentGitOptions.assets === false) {\n firstGitOptions.assets = false;\n }\n else {\n const assets: string[] = gitAssetsToStringArray(currentGitOptions.assets);\n if (Array.isArray(firstGitOptions.assets)) {\n firstGitOptions.assets.push(...assets);\n }\n else {\n firstGitOptions.assets = assets;\n }\n }\n\n if (typeof currentGitOptions.message === 'string')\n firstGitOptions.message = currentGitOptions.message;\n }\n return undefined;\n }).filter(pluginSpec => pluginSpec !== undefined);\n}\n"],"mappings":";;AAKA,MAAa,cAAc;;;;;;AAQ3B,SAAS,WAAW,KAAiC;CACnD,IAAI,OAAO,QAAQ,UACjB,OAAO;CAGT,IAAI,OAAO,QAAQ,YAAY,OAAO,KAAA,KAAa,UAAU,KAC3D,OAAO,OAAO,IAAI,SAAS;CAE7B,OAAO;AACT;;;;;;AAOA,SAAS,uBACP,QACU;CACV,IAAI,WAAW,KAAA,GACb,OAAO,CAAC;CACV,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,QAAO,UAAS,WAAW,KAAK,CAAC,CAAC,CAC7C,KAAI,MAAK,OAAO,MAAM,WAAW,IAAI,EAAE,IAAI;CAEhD,IAAI,OAAO,WAAW,UACpB,OAAO,CAAC,MAAM;CAChB,IAAI,OAAO,OAAO,SAAS,UACzB,OAAO,CAAC,OAAO,IAAI;CACrB,MAAM,IAAI,UAAU,2CAA6C;AACnE;;;;;;AAOA,SAAS,mBAAmB,SAAgF;CAC1G,OAAO;EAAE,GAAG;EAAS,QAAQ,QAAQ,WAAW,QAAQ,Q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;AAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Exact.d.mts","names":["Exact","T","S","K","Coerce","TypeError","Message"],"sources":["../../src/utils/Exact.d.ts"],"mappings":";;AASA;;;;;;;;KAAYA,KAAAA,gBAAqBC,CAAAA,iBAAkBC,CAAAA,KAC9CD,CAAAA,WAAYC,CAAAA,kBAAmBD,CAAAA,GAAIA,CAAAA,CAAEE,CAAAA,MAAOD,CAAAA,iBAC/BD,CAAAA,IAAKE,CAAAA,eAAgBD,CAAAA,WAAYC,CAAAA,GAAIE,SAAAA,aAAsBD,MAAAA,CAAOD,CAAAA;AAAAA,UAE1EE,SAAAA;EAAAA,CAAsB,YAAA,GAAeC,OAAAA;AAAAA;AAAAA,KAG1CF,MAAAA,SAAeH,CAAAA"}
1
+ {"version":3,"file":"Exact.d.mts","names":["T","S","K","TypeError","Coerce","Message"],"sources":["../../src/utils/Exact.d.ts"],"mappings":";;AASA;;;;;;;;KAAY,KAAA,gBAAqB,CAAA,iBAAkB,CAAA,KAC9C,CAAA,WAAY,CAAA,kBAAmB,CAAA,GAAI,CAAA,CAAE,CAAA,MAAO,CAAA,iBAC/B,CAAA,IAAK,CAAA,eAAgB,CAAA,WAAY,CAAA,GAAI,SAAA,aAAsB,MAAA,CAAO,CAAA;AAAA,UAE1E,SAAA;EAAA,CAAsB,YAAA,GAAe,OAAO;AAAA;AAAA,KAGjD,MAAA,SAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GracefulRecursion.d.mts","names":["Length","T","length","TupleOf","N","Pop","U","Increment","Decrement"],"sources":["../../src/utils/GracefulRecursion.d.ts"],"mappings":";;KACYA,MAAAA,yBAA+BC,CAAAA;EAAYC,MAAAA;AAAAA,IAAmBD,CAAAA;AAAAA,KAC9DE,OAAAA,+CAAsDH,MAAAA,CAAOC,CAAAA,UAAWG,CAAAA,GAChFH,CAAAA,GACAE,OAAAA,CAAQC,CAAAA,MAAOH,CAAAA;AAAAA,KACPI,GAAAA,wBAA2BJ,CAAAA,iCAAkCK,CAAAA;AAAAA;AAAAA,KAE7DC,SAAAA,qBAA8BP,MAAAA,QAAcG,OAAAA,CAAQC,CAAAA;AAAAA;AAAAA,KAEpDI,SAAAA,qBAA8BR,MAAAA,CAAOK,GAAAA,CAAIF,OAAAA,CAAQC,CAAAA"}
1
+ {"version":3,"file":"GracefulRecursion.d.mts","names":["T","length","N","Length","TupleOf","U","Pop"],"sources":["../../src/utils/GracefulRecursion.d.ts"],"mappings":";;KACY,MAAA,yBAA+B,CAAA;EAAYC,MAAAA;AAAAA,IAAmB,CAAC;AAAA,KAC/D,OAAA,+CAAsD,MAAA,CAAO,CAAA,UAAW,CAAA,GAChF,CAAA,GACA,OAAA,CAAQ,CAAA,MAAO,CAAA;AAAA,KACP,GAAA,wBAA2B,CAAC,iCAAiCI,CAAAA;AAAAA;AAAAA,KAE7D,SAAA,qBAA8B,MAAA,QAAc,OAAA,CAAQ,CAAA;AAAA;AAAA,KAEpD,SAAA,qBAA8B,MAAA,CAAO,GAAA,CAAI,OAAA,CAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.mts","names":[],"sources":["../../src/utils/env.ts"],"mappings":";;;;;AAuBA;;;;;;iBAAgB,MAAA,CAAO,aAAA,GAAgB,mBAAA,EAAqB,SAAA,GAAY,MAAA,CAAO,UAAA,GAAa,MAAA,CAAO,UAAA;;;;;;;;;;;AAqBnG;;iBAAgB,cAAA,CAAe,MAAA,UAAgB,OAAA,GAAU,UAAA"}
1
+ {"version":3,"file":"env.d.mts","names":[],"sources":["../../src/utils/env.ts"],"mappings":";;;;;AAwBA;;;;;;iBAAgB,MAAA,CAAO,aAAA,GAAgB,mBAAA,EAAqB,SAAA,GAAY,MAAA,CAAO,UAAA,GAAa,MAAA,CAAO,UAAA;;;;;;;;;;AAAA;AAqBnG;;iBAAgB,cAAA,CAAe,MAAA,UAAgB,OAAA,GAAU,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.mjs","names":[],"sources":["../../src/utils/env.ts"],"sourcesContent":["import dotenvx, {\n type DotenvConfigOptions,\n type GetOptions,\n} from '@dotenvx/dotenvx';\nimport { env } from 'node:process';\n\n// I hate importing CommonJS modules with their broken default exports\nconst {\n get,\n config: loadDotenv,\n} = dotenvx;\n\n/** `get` can return `undefined`. It can also return a `Record`, but that's internal. */\ntype Get = (key: string, options?: GetOptions) => string | undefined;\n\n/**\n * A thin wrapper for {@link loadDotenv}. Loads a .env file from {@link process.cwd()} with the given options (or defaults), returns the new value of {@link process.env} with optional overrides.\n * @param [dotenvOptions] An optional {@link DotenvConfigOptions} object to pass to {@link loadDotenv}.\n * @param [overrides] If provided, this {@link NodeJS.ProcessEnv} object is merged into the return value, overriding existing properties where overlap occurs.\n * @returns A {@link NodeJS.ProcessEnv} object whose properties are variables loaded from the\n * process environment, the nearest .env file, and {@link overrides} (if provided). Where\n * overlap occurs, the later source takes priority.\n */\nexport function getEnv(dotenvOptions?: DotenvConfigOptions, overrides?: NodeJS.ProcessEnv): NodeJS.ProcessEnv {\n loadDotenv(dotenvOptions);\n\n if (overrides)\n Object.assign(env, overrides);\n\n return env;\n}\n\n/**\n * Get the value from the given env var in the current process or nearby .env file.\n * If found in process environment, its value is returned.\n * Else, try to get it from the nearest .env file.\n * If NOT found, return `undefined`\n * @param envVar The environment variable to lookup.\n * @param [options] Options to pass to {@link get}\n * @returns The string value of the environment variable or `undefined`.\n * `undefined` may be returned when the variable is undefined or its string is\n * empty, whitespace, or appears to have been converted from `null` or\n * `undefined`.\n */\nexport function getEnvVarValue(envVar: string, options?: GetOptions): string | undefined {\n options ??= { ignore: ['MISSING_KEY', 'MISSING_ENV_FILE'] };\n let value = env[envVar];\n const x = (get as Get)(envVar, options);\n if (typeof x === 'string')\n value = x;\n // I hate this. Why is undefined converted to a string?\n return value === '' || value === 'undefined'\n ? undefined\n : value;\n}\n"],"mappings":";;;AAOA,MAAM,EACJ,KACA,QAAQ,eACN;;;;;;;;;AAaJ,SAAgB,OAAO,eAAqC,WAAkD;CAC5G,WAAW,cAAc;CAEzB,IAAI,WACF,OAAO,OAAO,KAAK,UAAU;CAE/B,OAAO;;;;;;;;;;;;;;AAeT,SAAgB,eAAe,QAAgB,SAA0C;CACvF,YAAY,EAAE,QAAQ,CAAC,eAAe,mBAAmB,EAAE;CAC3D,IAAI,QAAQ,IAAI;CAChB,MAAM,IAAK,IAAY,QAAQ,QAAQ;CACvC,IAAI,OAAO,MAAM,UACf,QAAQ;CAEV,OAAO,UAAU,MAAM,UAAU,cAC7B,KAAA,IACA"}
1
+ {"version":3,"file":"env.mjs","names":[],"sources":["../../src/utils/env.ts"],"sourcesContent":["/* eslint-disable unicorn/name-replacements */\nimport dotenvx, {\n type DotenvConfigOptions,\n type GetOptions,\n} from '@dotenvx/dotenvx';\nimport { env } from 'node:process';\n\n// I hate importing CommonJS modules with their broken default exports\nconst {\n get,\n config: loadDotenv,\n} = dotenvx;\n\n/** `get` can return `undefined`. It can also return a `Record`, but that's internal. */\ntype Get = (key: string, options?: GetOptions) => string | undefined;\n\n/**\n * A thin wrapper for {@link loadDotenv}. Loads a .env file from {@link process.cwd()} with the given options (or defaults), returns the new value of {@link process.env} with optional overrides.\n * @param [dotenvOptions] An optional {@link DotenvConfigOptions} object to pass to {@link loadDotenv}.\n * @param [overrides] If provided, this {@link NodeJS.ProcessEnv} object is merged into the return value, overriding existing properties where overlap occurs.\n * @returns A {@link NodeJS.ProcessEnv} object whose properties are variables loaded from the\n * process environment, the nearest .env file, and {@link overrides} (if provided). Where\n * overlap occurs, the later source takes priority.\n */\nexport function getEnv(dotenvOptions?: DotenvConfigOptions, overrides?: NodeJS.ProcessEnv): NodeJS.ProcessEnv {\n loadDotenv(dotenvOptions);\n\n if (overrides)\n Object.assign(env, overrides);\n\n return env;\n}\n\n/**\n * Get the value from the given env var in the current process or nearby .env file.\n * If found in process environment, its value is returned.\n * Else, try to get it from the nearest .env file.\n * If NOT found, return `undefined`\n * @param envVar The environment variable to lookup.\n * @param [options] Options to pass to {@link get}\n * @returns The string value of the environment variable or `undefined`.\n * `undefined` may be returned when the variable is undefined or its string is\n * empty, whitespace, or appears to have been converted from `null` or\n * `undefined`.\n */\nexport function getEnvVarValue(envVar: string, options?: GetOptions): string | undefined {\n options ??= { ignore: ['MISSING_KEY', 'MISSING_ENV_FILE'] };\n let value = env[envVar];\n const x = (get as Get)(envVar, options);\n if (typeof x === 'string')\n value = x;\n // I hate this. Why is undefined converted to a string?\n return value === '' || value === 'undefined'\n ? undefined\n : value;\n}\n"],"mappings":";;;AAQA,MAAM,EACJ,KACA,QAAQ,eACN;;;;;;;;;AAaJ,SAAgB,OAAO,eAAqC,WAAkD;CAC5G,WAAW,aAAa;CAExB,IAAI,WACF,OAAO,OAAO,KAAK,SAAS;CAE9B,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,eAAe,QAAgB,SAA0C;CACvF,YAAY,EAAE,QAAQ,CAAC,eAAe,kBAAkB,EAAE;CAC1D,IAAI,QAAQ,IAAI;CAChB,MAAM,IAAK,IAAY,QAAQ,OAAO;CACtC,IAAI,OAAO,MAAM,UACf,QAAQ;CAEV,OAAO,UAAU,MAAM,UAAU,cAC7B,KAAA,IACA;AACN"}
@@ -5,11 +5,11 @@ import { Type } from "arktype";
5
5
  * A `promisify(exec)` wrapper to optionally assign the child process's STDERR as the {@link Error.prototype.cause}.
6
6
  * @see {@link promisify}, {@link exec}
7
7
  * @param command The command to run, with space-separated arguments.
8
- * @param [setStderrAsCause=false] If true and the child process's stderr is available, the thrown Error's {@link Error.prototype.cause} is assigned the stderr string.
8
+ * @param [shouldSetStderrAsCause=false] If true and the child process's stderr is available, the thrown Error's {@link Error.prototype.cause} is assigned the stderr string.
9
9
  * @returns A promise of the child process's STDOUT and STDERR streams as strings
10
10
  * @throws {Error | ChildProcessSpawnException}
11
11
  */
12
- declare function execAsync(command: string, setStderrAsCause?: boolean): Promise<{
12
+ declare function execAsync(command: string, shouldSetStderrAsCause?: boolean): Promise<{
13
13
  stdout: string;
14
14
  stderr: string;
15
15
  }>;
@@ -27,13 +27,13 @@ declare const T_ExecException: Type<{
27
27
  }>;
28
28
  type _ExecException = typeof T_ExecException.inferOut;
29
29
  declare class ChildProcessSpawnException extends Error implements _ExecException {
30
- constructor(message: Parameters<typeof Error>[0], options: typeof T_ExecException.inferIn);
31
30
  cmd: typeof T_ExecException.inferOut.cmd;
32
31
  code: typeof T_ExecException.inferOut.code;
33
32
  killed: typeof T_ExecException.inferOut.killed;
34
33
  signal: typeof T_ExecException.inferOut.signal;
35
34
  stderr: typeof T_ExecException.inferOut.stderr;
36
35
  stdout: typeof T_ExecException.inferOut.stdout;
36
+ constructor(message: Parameters<typeof Error>[0], options: typeof T_ExecException.inferIn);
37
37
  }
38
38
  //#endregion
39
39
  export { ChildProcessSpawnException, execAsync };
@@ -1 +1 @@
1
- {"version":3,"file":"execAsync.d.mts","names":[],"sources":["../../src/utils/execAsync.ts"],"mappings":";;;;;AAeA;;;;;;iBAAsB,SAAA,CAAU,OAAA,UAAiB,gBAAA,aAA2B,OAAA;EAC1E,MAAA;EACA,MAAA;AAAA;AAAA,cAwBI,eAAA,EAAiB,IAAA;EACrB,IAAA;EACA,OAAA;EACA,KAAA;EACA,KAAA;EACA,GAAA;EACA,MAAA;EACA,IAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;AAAA;AAAA,KAaG,cAAA,UAAwB,eAAA,CAAgB,QAAA;AAAA,cAEhC,0BAAA,SAAmC,KAAA,YAAiB,cAAA;EAC/D,WAAA,CACE,OAAA,EAAS,UAAA,QAAkB,KAAA,MAC3B,OAAA,SAAgB,eAAA,CAAgB,OAAA;EAYlC,GAAA,SAAY,eAAA,CAAgB,QAAA,CAAS,GAAA;EACrC,IAAA,SAAa,eAAA,CAAgB,QAAA,CAAS,IAAA;EACtC,MAAA,SAAe,eAAA,CAAgB,QAAA,CAAS,MAAA;EACxC,MAAA,SAAe,eAAA,CAAgB,QAAA,CAAS,MAAA;EACxC,MAAA,SAAe,eAAA,C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