@halospv3/hce.shared-config 2.6.4 → 3.0.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +356 -101
- package/README.md +100 -87
- package/dotnet/.github/workflows/_unit_test.yml +6 -3
- package/dotnet/.github/workflows/ci.yml +2 -2
- package/dotnet/.github/workflows/dotnet-release.yml +31 -28
- package/dotnet/.github/workflows/sample-dotnet-build.yml +16 -11
- package/dotnet/ExecNupkgDeterministicator.README.md +20 -0
- package/dotnet/ExecNupkgDeterministicator.targets +173 -0
- package/dotnet/GitVersion.yml +3 -1
- package/dotnet/GitVersion6.0.yml +3 -1
- package/dotnet/HCE.Shared.sln +34 -0
- package/dotnet/HCE.Shared.targets +1 -0
- package/dotnet/PublishAll.targets +2 -0
- package/dotnet/SignAfterPack.targets +104 -0
- package/dotnet/samples/HCE.Shared.DeterministicNupkg/Dummy.cs +6 -0
- package/dotnet/samples/HCE.Shared.DeterministicNupkg/HCE.Shared.DeterministicNupkg.csproj +21 -0
- package/dotnet/samples/HCE.Shared.SignAfterPack/Class1.cs +6 -0
- package/dotnet/samples/HCE.Shared.SignAfterPack/HCE.Shared.SignAfterPack.csproj +21 -0
- package/dotnet/samples/HCE.Shared.SignAfterPack/sampleCert.samplepfx +0 -0
- package/dotnet/samples/README.md +7 -0
- package/package.json +72 -73
- package/src/CaseInsensitiveMap.ts +34 -0
- package/src/commitlintConfig.ts +17 -9
- package/src/debug.ts +3 -3
- package/src/dotnet/GithubNugetRegistryInfo.ts +60 -0
- package/src/dotnet/GitlabNugetRegistryInfo.ts +112 -0
- package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +44 -0
- package/src/dotnet/MSBuildProject.ts +557 -76
- package/src/dotnet/MSBuildProjectProperties.ts +280 -15
- package/src/dotnet/NugetProjectProperties.ts +608 -0
- package/src/dotnet/NugetRegistryInfo.ts +939 -0
- package/src/dotnet/helpers.ts +448 -0
- package/src/eslintConfig.ts +174 -71
- package/src/index.ts +1 -3
- package/src/semantic-release__commit-analyzer.d.ts +44 -38
- package/src/semantic-release__exec.d.ts +15 -0
- package/src/semantic-release__git.d.ts +85 -88
- package/src/semantic-release__github.d.ts +139 -139
- package/src/semanticReleaseConfig.ts +106 -47
- package/src/semanticReleaseConfigDotnet.ts +394 -104
- package/src/setupGitPluginSpec.ts +149 -57
- package/src/tsconfig.json +8 -8
- package/src/utils/Exact.ts +49 -0
- package/src/utils/GracefulRecursion.d.ts +12 -0
- package/src/utils/env.ts +44 -0
- package/src/utils/execAsync.ts +77 -0
- package/src/utils/miscTypes.ts +17 -0
- package/src/utils/reflection/FunctionLike.d.ts +17 -0
- package/src/utils/reflection/GetterDescriptor.d.ts +8 -0
- package/src/utils/reflection/InstancePropertyDescriptorMap.d.ts +32 -0
- package/src/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.ts +20 -0
- package/src/utils/reflection/OwnGetterDescriptorMap.d.ts +17 -0
- package/src/utils/reflection/OwnKeyOf.d.ts +20 -0
- package/src/utils/reflection/OwnPropertyDescriptorMap.d.ts +82 -0
- package/src/utils/reflection/PropertyDescriptorMap.d.ts +15 -0
- package/src/utils/reflection/filterForGetters.ts +59 -0
- package/src/utils/reflection/getOwnPropertyDescriptors.ts +52 -0
- package/src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts +127 -0
- package/src/utils/reflection/getPrototypeChainOf.ts +85 -0
- package/src/utils/reflection/getPrototypeOf.ts +12 -0
- package/src/utils/reflection/inheritance.ts +262 -0
- package/src/utils/reflection/isConstructor.ts +74 -0
- package/src/utils/reflection/isGetterDescriptor.ts +11 -0
- package/src/utils/reflection/listOwnGetters.ts +80 -0
- package/src/utils/reflection.ts +18 -0
- package/cjs/commitlintConfig-wrapper.mjs +0 -6
- package/cjs/commitlintConfig.cjs +0 -14
- package/cjs/commitlintConfig.cjs.map +0 -1
- package/cjs/commitlintConfig.d.ts +0 -4
- package/cjs/commitlintConfig.d.ts.map +0 -1
- package/cjs/debug.cjs +0 -13
- package/cjs/debug.cjs.map +0 -1
- package/cjs/debug.d.ts +0 -4
- package/cjs/debug.d.ts.map +0 -1
- package/cjs/dotnet/MSBuildProject.cjs +0 -84
- package/cjs/dotnet/MSBuildProject.cjs.map +0 -1
- package/cjs/dotnet/MSBuildProject.d.ts +0 -42
- package/cjs/dotnet/MSBuildProject.d.ts.map +0 -1
- package/cjs/dotnet/MSBuildProjectProperties.cjs +0 -22
- package/cjs/dotnet/MSBuildProjectProperties.cjs.map +0 -1
- package/cjs/dotnet/MSBuildProjectProperties.d.ts +0 -13
- package/cjs/dotnet/MSBuildProjectProperties.d.ts.map +0 -1
- package/cjs/dotnet/createDummyNupkg.cjs +0 -26
- package/cjs/dotnet/createDummyNupkg.cjs.map +0 -1
- package/cjs/dotnet/createDummyNupkg.d.ts +0 -2
- package/cjs/dotnet/createDummyNupkg.d.ts.map +0 -1
- package/cjs/dotnet/dotnetGHPR.cjs +0 -173
- package/cjs/dotnet/dotnetGHPR.cjs.map +0 -1
- package/cjs/dotnet/dotnetGHPR.d.ts +0 -37
- package/cjs/dotnet/dotnetGHPR.d.ts.map +0 -1
- package/cjs/dotnet/dotnetGLPR.cjs +0 -41
- package/cjs/dotnet/dotnetGLPR.cjs.map +0 -1
- package/cjs/dotnet/dotnetGLPR.d.ts +0 -13
- package/cjs/dotnet/dotnetGLPR.d.ts.map +0 -1
- package/cjs/dotnet/dotnetHelpers.cjs +0 -141
- package/cjs/dotnet/dotnetHelpers.cjs.map +0 -1
- package/cjs/dotnet/dotnetHelpers.d.ts +0 -26
- package/cjs/dotnet/dotnetHelpers.d.ts.map +0 -1
- package/cjs/dotnet-wrapper.mjs +0 -6
- package/cjs/dotnet.cjs +0 -15
- package/cjs/dotnet.cjs.map +0 -1
- package/cjs/dotnet.d.ts +0 -7
- package/cjs/dotnet.d.ts.map +0 -1
- package/cjs/envUtils-wrapper.mjs +0 -6
- package/cjs/envUtils.cjs +0 -37
- package/cjs/envUtils.cjs.map +0 -1
- package/cjs/envUtils.d.ts +0 -15
- package/cjs/envUtils.d.ts.map +0 -1
- package/cjs/eslintConfig-wrapper.mjs +0 -6
- package/cjs/eslintConfig.cjs +0 -52
- package/cjs/eslintConfig.cjs.map +0 -1
- package/cjs/eslintConfig.d.ts +0 -3
- package/cjs/eslintConfig.d.ts.map +0 -1
- package/cjs/findStaticConfig-wrapper.mjs +0 -6
- package/cjs/findStaticConfig.cjs +0 -34
- package/cjs/findStaticConfig.cjs.map +0 -1
- package/cjs/findStaticConfig.d.ts +0 -2
- package/cjs/findStaticConfig.d.ts.map +0 -1
- package/cjs/index-wrapper.mjs +0 -6
- package/cjs/index.cjs +0 -10
- package/cjs/index.cjs.map +0 -1
- package/cjs/index.d.ts +0 -5
- package/cjs/index.d.ts.map +0 -1
- package/cjs/semantic-release__commit-analyzer.d.cjs +0 -2
- package/cjs/semantic-release__commit-analyzer.d.cjs.map +0 -1
- package/cjs/semantic-release__git.d.cjs +0 -2
- package/cjs/semantic-release__git.d.cjs.map +0 -1
- package/cjs/semantic-release__github.d.cjs +0 -2
- package/cjs/semantic-release__github.d.cjs.map +0 -1
- package/cjs/semanticReleaseConfig-wrapper.mjs +0 -6
- package/cjs/semanticReleaseConfig.cjs +0 -33
- package/cjs/semanticReleaseConfig.cjs.map +0 -1
- package/cjs/semanticReleaseConfig.d.ts +0 -4
- package/cjs/semanticReleaseConfig.d.ts.map +0 -1
- package/cjs/semanticReleaseConfigDotnet-wrapper.mjs +0 -7
- package/cjs/semanticReleaseConfigDotnet.cjs +0 -112
- package/cjs/semanticReleaseConfigDotnet.cjs.map +0 -1
- package/cjs/semanticReleaseConfigDotnet.d.ts +0 -51
- package/cjs/semanticReleaseConfigDotnet.d.ts.map +0 -1
- package/cjs/setupGitPluginSpec-wrapper.mjs +0 -6
- package/cjs/setupGitPluginSpec.cjs +0 -67
- package/cjs/setupGitPluginSpec.cjs.map +0 -1
- package/cjs/setupGitPluginSpec.d.ts +0 -19
- package/cjs/setupGitPluginSpec.d.ts.map +0 -1
- package/src/dotnet/createDummyNupkg.ts +0 -30
- package/src/dotnet/dotnetGHPR.ts +0 -232
- package/src/dotnet/dotnetGLPR.ts +0 -46
- package/src/dotnet/dotnetHelpers.ts +0 -184
- package/src/dotnet.ts +0 -6
- package/src/envUtils.ts +0 -36
- package/src/findStaticConfig.ts +0 -31
- package/static/.releaserc.yml +0 -35
package/cjs/eslintConfig.cjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const eslint = require('@eslint/js');
|
|
4
|
-
const jsonc = require('eslint-plugin-jsonc');
|
|
5
|
-
const node_module = require('node:module');
|
|
6
|
-
const tseslint = require('typescript-eslint');
|
|
7
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
8
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
9
|
-
default: e
|
|
10
|
-
};
|
|
11
|
-
const eslint__default = /*#__PURE__*/_interopDefault(eslint);
|
|
12
|
-
const jsonc__default = /*#__PURE__*/_interopDefault(jsonc);
|
|
13
|
-
const tseslint__default = /*#__PURE__*/_interopDefault(tseslint);
|
|
14
|
-
|
|
15
|
-
// CJS compatibility; it started transpiling to a top-level await after upgrading from packemon 4.0.1 to 4.1.0
|
|
16
|
-
const require$1 = node_module.createRequire(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('eslintConfig.cjs', document.baseURI).href);
|
|
17
|
-
const globals = require$1("globals");
|
|
18
|
-
// https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
|
|
19
|
-
// https://www.google.com/search?q=javascript+recurse+through+object+and+remove+undefined+properties
|
|
20
|
-
const globalIgnores = {
|
|
21
|
-
name: "global ignores",
|
|
22
|
-
ignores: ["_tsout/**/*", "_tsout/*", "_tsout/", "cjs/**/*", "cjs/*/*", "cjs/*", "mjs/**/*", "mjs/*", "mjs/", "node_modules/**/*", "**/node_modules/**/*"]
|
|
23
|
-
};
|
|
24
|
-
const eslintConfig = tseslint__default.default.config({
|
|
25
|
-
name: "flat/recommended-with-json - https://github.com/ota-meshi/eslint-plugin-jsonc",
|
|
26
|
-
extends: jsonc__default.default.configs["flat/recommended-with-json"],
|
|
27
|
-
files: ["*.json", "**/*.json"],
|
|
28
|
-
ignores: globalIgnores.ignores
|
|
29
|
-
}, {
|
|
30
|
-
name: "flat/recommended-with-json5 - https://github.com/ota-meshi/eslint-plugin-jsonc",
|
|
31
|
-
extends: jsonc__default.default.configs["flat/recommended-with-json5"],
|
|
32
|
-
files: ["*.json5", "**/*.json5"],
|
|
33
|
-
ignores: globalIgnores.ignores
|
|
34
|
-
}, {
|
|
35
|
-
name: "flat/recommended-with-jsonc - https://github.com/ota-meshi/eslint-plugin-jsonc",
|
|
36
|
-
extends: jsonc__default.default.configs["flat/recommended-with-jsonc"],
|
|
37
|
-
files: ["*.jsonc", "**/*.jsonc"],
|
|
38
|
-
ignores: globalIgnores.ignores
|
|
39
|
-
}, {
|
|
40
|
-
name: "TSJS",
|
|
41
|
-
extends: [eslint__default.default.configs.recommended, ...tseslint__default.default.configs.strict, ...tseslint__default.default.configs.stylistic],
|
|
42
|
-
files: ["**/*.ts", "**/*.cts", "**/*.mts", "**/*.js", "**/*.cjs", "**/*.mjs"],
|
|
43
|
-
ignores: globalIgnores.ignores,
|
|
44
|
-
languageOptions: {
|
|
45
|
-
parserOptions: {
|
|
46
|
-
useProjectService: true
|
|
47
|
-
},
|
|
48
|
-
globals: globals.node
|
|
49
|
-
}
|
|
50
|
-
}, globalIgnores);
|
|
51
|
-
module.exports = eslintConfig;
|
|
52
|
-
//# sourceMappingURL=eslintConfig.cjs.map
|
package/cjs/eslintConfig.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslintConfig.cjs","sources":["../src/eslintConfig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,CAAC,OAAO,CAAC,SAAS,CAAC;AAClG,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;AAC/E,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO;AAChC,EAAE,eAAe,EAAE;AACnB,IAAI,aAAa,EAAE;AACnB,MAAM,iBAAiB,EAAE;AACzB,KAAK;AACL,IAAI,OAAO,EAAE,OAAO,CAAC;AACrB;AACA,CAAC,EAAE,aAAa,CAAC;;;;"}
|
package/cjs/eslintConfig.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslintConfig.d.ts","sourceRoot":"","sources":["../src/eslintConfig.ts"],"names":[],"mappings":";AA2BA,wBAoDE"}
|
package/cjs/findStaticConfig.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const node_fs = require('node:fs');
|
|
4
|
-
const path = require('node:path');
|
|
5
|
-
const node_url = require('node:url');
|
|
6
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
8
|
-
default: e
|
|
9
|
-
};
|
|
10
|
-
const path__default = /*#__PURE__*/_interopDefault(path);
|
|
11
|
-
|
|
12
|
-
/// ../static/.releaserc.yml
|
|
13
|
-
function findStaticConfig() {
|
|
14
|
-
const glob = 'static/.releaserc.yml';
|
|
15
|
-
let dirPath = node_url.fileURLToPath(path__default.default.dirname(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('findStaticConfig.cjs', document.baseURI).href));
|
|
16
|
-
let combinedPath = path__default.default.join(dirPath, glob);
|
|
17
|
-
while (!node_fs.existsSync(combinedPath)) {
|
|
18
|
-
/* file:// + dirname behavior on Windows. 'root' is empty when 'file://' is present.
|
|
19
|
-
* file:///C:/Repos
|
|
20
|
-
* file:///C:
|
|
21
|
-
* file://
|
|
22
|
-
* .
|
|
23
|
-
*/
|
|
24
|
-
// DEBUG.log(dirPath);
|
|
25
|
-
// DEBUG.log(combinedPath.href);
|
|
26
|
-
/** Throw if we reached root. */
|
|
27
|
-
if (path__default.default.dirname(dirPath) === '') throw new Error(`Failed to get full path for HCE.Shared's shared configuration. HCE.Shared recursively searched parent directories for '${glob}' starting from '${path__default.default.dirname(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('findStaticConfig.cjs', document.baseURI).href)}'`);
|
|
28
|
-
dirPath = path__default.default.dirname(dirPath);
|
|
29
|
-
combinedPath = path__default.default.join(dirPath, glob);
|
|
30
|
-
}
|
|
31
|
-
return combinedPath;
|
|
32
|
-
}
|
|
33
|
-
exports.findStaticConfig = findStaticConfig;
|
|
34
|
-
//# sourceMappingURL=findStaticConfig.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findStaticConfig.cjs","sources":["../src/findStaticConfig.ts"],"sourcesContent":null,"names":["fileURLToPath","path","existsSync"],"mappings":";;;;;;;;;;;AAIA;AACO,SAAS,gBAAgB,GAAG;AACnC,EAAE,MAAM,IAAI,GAAG,uBAAuB;AACtC,EAAE,IAAI,OAAO,GAAGA,sBAAa,CAACC,qBAAI,CAAC,OAAO,CAAC,sQAAe,CAAC,CAAC;AAC5D,EAAE,IAAI,YAAY,GAAGA,qBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;AAC7C,EAAE,OAAO,CAACC,kBAAU,CAAC,YAAY,CAAC,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAID,qBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,uHAAuH,EAAE,IAAI,CAAC,iBAAiB,EAAEA,qBAAI,CAAC,OAAO,CAAC,sQAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACzO,IAAI,OAAO,GAAGA,qBAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AACnC,IAAI,YAAY,GAAGA,qBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;AAC3C;AACA,EAAE,OAAO,YAAY;AACrB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findStaticConfig.d.ts","sourceRoot":"","sources":["../src/findStaticConfig.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,IAAI,MAAM,CAyBzC"}
|
package/cjs/index-wrapper.mjs
DELETED
package/cjs/index.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const semanticReleaseConfig = require('./semanticReleaseConfig.cjs');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Runs HCE.Shared and returns a semantic-release "shareable configuration" object.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
module.exports = semanticReleaseConfig.baseConfig;
|
|
10
|
-
//# sourceMappingURL=index.cjs.map
|
package/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":null,"names":[],"mappings":";;;;AAAA;AACA;AACA;;;;"}
|
package/cjs/index.d.ts
DELETED
package/cjs/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;EAEE;AACF,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-release__commit-analyzer.d.cjs","sources":[],"sourcesContent":null,"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-release__git.d.cjs","sources":[],"sourcesContent":null,"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-release__github.d.cjs","sources":[],"sourcesContent":null,"names":[],"mappings":";;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const setupGitPluginSpec = require('./setupGitPluginSpec.cjs');
|
|
4
|
-
const defaultPlugins = ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github'];
|
|
5
|
-
const baseConfig = {
|
|
6
|
-
/** @see https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugin-options-configuration */
|
|
7
|
-
preset: 'conventionalcommits',
|
|
8
|
-
branches: ['main', {
|
|
9
|
-
name: 'develop',
|
|
10
|
-
channel: 'develop',
|
|
11
|
-
prerelease: true
|
|
12
|
-
}],
|
|
13
|
-
plugins: [["@semantic-release/commit-analyzer", {}], ["semantic-release-export-data", {}], ["@semantic-release/release-notes-generator", {}], ["@semantic-release/changelog", {}], ["@semantic-release/git", setupGitPluginSpec.DefaultOptions],
|
|
14
|
-
// Arbitrary shell commands - https://github.com/semantic-release/exec
|
|
15
|
-
// hint: set 'prepareCmd' to`dotnet publish`.
|
|
16
|
-
// Because this is sorted after @semantic-release / git, the new Git tag will
|
|
17
|
-
// be visible to dotnet(and GitVersion).Dotnet artifacts will be
|
|
18
|
-
// versioned accordingly.
|
|
19
|
-
// Plugins' Steps: https://github.com/semantic-release/semantic-release/blob/master/docs/extending/plugins-list.md
|
|
20
|
-
["@semantic-release/exec", {}], ["@semantic-release/github", {
|
|
21
|
-
assets: [{
|
|
22
|
-
path: './publish/*'
|
|
23
|
-
}]
|
|
24
|
-
}]]
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/// (OPTIONAL) update static Version strings before Git plugin
|
|
28
|
-
// https://github.com/jpoehnelt/semantic-release-replace-plugin
|
|
29
|
-
// https://github.com/droidsolutions/semantic-release-update-file
|
|
30
|
-
|
|
31
|
-
exports.baseConfig = baseConfig;
|
|
32
|
-
exports.defaultPlugins = defaultPlugins;
|
|
33
|
-
//# sourceMappingURL=semanticReleaseConfig.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReleaseConfig.cjs","sources":["../src/semanticReleaseConfig.ts"],"sourcesContent":null,"names":["DefaultOptions"],"mappings":";;;;AACY,MAAC,cAAc,GAAG,CAAC,mCAAmC,EAAE,2CAA2C,EAAE,uBAAuB,EAAE,0BAA0B;AACxJ,MAAC,UAAU,GAAG;AAC1B;AACA,EAAE,MAAM,EAAE,qBAAqB;AAC/B,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE;AACrB,IAAI,IAAI,EAAE,SAAS;AACnB,IAAI,OAAO,EAAE,SAAS;AACtB,IAAI,UAAU,EAAE;AAChB,GAAG,CAAC;AACJ,EAAE,OAAO,EAAE,CAAC,CAAC,mCAAmC,EAAE,EAAE,CAAC,EAAE,CAAC,8BAA8B,EAAE,EAAE,CAAC,EAAE,CAAC,2CAA2C,EAAE,EAAE,CAAC,EAAE,CAAC,6BAA6B,EAAE,EAAE,CAAC,EAAE,CAAC,uBAAuB,EAAEA,iCAAc,CAAC;AAC9N;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,CAAC,wBAAwB,EAAE,EAAE,CAAC,EAAE,CAAC,0BAA0B,EAAE;AAC/D,IAAI,MAAM,EAAE,CAAC;AACb,MAAM,IAAI,EAAE;AACZ,KAAK;AACL,GAAG,CAAC;AACJ;;AAEA;AACA;AACA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReleaseConfig.d.ts","sourceRoot":"","sources":["../src/semanticReleaseConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG5D,eAAO,MAAM,cAAc,EAAE,SAAS,UAAU,EAK/C,CAAC;AAEF,eAAO,MAAM,UAAU,EAmClB,OAAO,CAAC"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
Object.defineProperty(exports, '__esModule', {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
const node_util = require('node:util');
|
|
12
|
-
const debug = require('./debug.cjs');
|
|
13
|
-
const dotnetHelpers = require('./dotnet/dotnetHelpers.cjs');
|
|
14
|
-
const envUtils = require('./envUtils.cjs');
|
|
15
|
-
const semanticReleaseConfig = require('./semanticReleaseConfig.cjs');
|
|
16
|
-
const setupGitPluginSpec = require('./setupGitPluginSpec.cjs');
|
|
17
|
-
|
|
18
|
-
/** Semantic-Release Config Factory (dotnet)
|
|
19
|
-
* A functional Semantic-Release configuration for dotnet projects
|
|
20
|
-
*
|
|
21
|
-
* extends {@link baseConfig }
|
|
22
|
-
*
|
|
23
|
-
* <-- TABLE OF CONTENTS -->
|
|
24
|
-
* - evaluateProperties
|
|
25
|
-
* - configureDotnetRelease
|
|
26
|
-
* - Insert-Edit Plugins
|
|
27
|
-
* - Append Plugins
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* TODO: options/params for inserts/edits. NOT ready for production. Currently, this can only add Git plugin's options if undefined or one or more is missing.
|
|
33
|
-
* Insert (`array.splice`) and/or configure plugins.\
|
|
34
|
-
* Can be used to...\
|
|
35
|
-
* ...load plugin A before plugin B\
|
|
36
|
-
* ...edit a plugin's existing configuration
|
|
37
|
-
*
|
|
38
|
-
* @param config An instance of {@link Options}
|
|
39
|
-
* @returns a modified copy of {@link config}
|
|
40
|
-
*/
|
|
41
|
-
function insertAndEditPlugins(config) {
|
|
42
|
-
// const insertAndEditCommands = [];
|
|
43
|
-
config.plugins = [...(config.plugins ?? semanticReleaseConfig.defaultPlugins)];
|
|
44
|
-
config.plugins = setupGitPluginSpec.setupGitPluginSpec(config.plugins);
|
|
45
|
-
return config;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Currently, only configures `@semantic-release/exec` with `prepareCmd: configurePrepareCmd(projectsToPublish, projectsToPackAndPush)` and `publishCmd: configureDotnetNugetPush()`
|
|
50
|
-
* @param config
|
|
51
|
-
* @param projectsToPublish
|
|
52
|
-
* @param projectsToPackAndPush
|
|
53
|
-
* @returns config with the specified plugins and plugin options.
|
|
54
|
-
*/
|
|
55
|
-
function appendPlugins(config, projectsToPublish, projectsToPackAndPush) {
|
|
56
|
-
if (config.plugins === undefined) throw new Error('Plugins array was undefined when it should be an array!');
|
|
57
|
-
config.plugins.push(
|
|
58
|
-
// APPEND this array of [pluginName, pluginConfig] to plugins
|
|
59
|
-
// https://github.com/semantic-release/exec#usage
|
|
60
|
-
['@semantic-release/exec', {
|
|
61
|
-
// 'ZipPublishDir' zips each publish folder to ./publish/*.zip
|
|
62
|
-
prepareCmd: dotnetHelpers.configurePrepareCmd(projectsToPublish, projectsToPackAndPush),
|
|
63
|
-
publishCmd: dotnetHelpers.configureDotnetNugetPush()
|
|
64
|
-
}]);
|
|
65
|
-
return config;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet` publish, pack, and push.
|
|
70
|
-
* @param projectsToPublish An array of dotnet projects' relative paths. If
|
|
71
|
-
* empty or unspecified, tries getting projects' semi-colon-separated relative
|
|
72
|
-
* paths from the `PROJECTS_TO_PUBLISH` environment variable. If configured as
|
|
73
|
-
* recommended, the projects' publish outputs will be zipped to '$PWD/publish'
|
|
74
|
-
* for use in the `publish` semantic-release step (typically, GitHub release).
|
|
75
|
-
* @param projectsToPackAndPush An array of dotnet projects' relative paths. If
|
|
76
|
-
* false, `dotnet pack` and `dotnet nuget push` will be left out of the exec
|
|
77
|
-
* commands. If empty or unspecified, tries getting projects'
|
|
78
|
-
* semi-colon-separated relative paths from the `PROJECTS_TO_PACK_AND_PUSH`
|
|
79
|
-
* environment variable. If configured as recommended, `dotnet pack` will output
|
|
80
|
-
* the nupkg/snupk files to `$PWD/publish` where they will be globbed by `dotnet
|
|
81
|
-
* nuget push`.
|
|
82
|
-
* @returns a semantic-release Options object, based on `@halospv3/hce.shared-config` (our base config), with the `@semantic-release/exec` plugin configured to `dotnet publish`, `pack`, and `push` the specified projects.
|
|
83
|
-
*/
|
|
84
|
-
function getConfig(projectsToPublish = [], projectsToPackAndPush = []) {
|
|
85
|
-
if (debug.enabled) {
|
|
86
|
-
console.debug('hce.shared-config:\n' + node_util.inspect(semanticReleaseConfig.baseConfig, false, Infinity, true));
|
|
87
|
-
}
|
|
88
|
-
const errors = [];
|
|
89
|
-
if (projectsToPublish.length === 0) {
|
|
90
|
-
const _ = envUtils.getEnvVarValue("PROJECTS_TO_PUBLISH");
|
|
91
|
-
if (_ === undefined) errors.push(new Error("projectsToPublish.length must be > 0 or PROJECTS_TO_PUBLISH must be defined and contain at least one path."));else projectsToPublish = _.split(';');
|
|
92
|
-
}
|
|
93
|
-
if (projectsToPackAndPush !== false && projectsToPackAndPush.length === 0) {
|
|
94
|
-
const _ = envUtils.getEnvVarValue("PROJECTS_TO_PACK_AND_PUSH");
|
|
95
|
-
if (_ === undefined) errors.push(new Error("projectsToPackAndPush.length must be > 0 or PROJECTS_TO_PACK_AND_PUSH must be defined and contain at least one path."));else projectsToPackAndPush = _.split(';');
|
|
96
|
-
}
|
|
97
|
-
if (errors.length > 0) {
|
|
98
|
-
throw new Error(["getConfig cannot continue. One or more errors occurred.", ...errors.map(v => v.stack)].join('\n'));
|
|
99
|
-
}
|
|
100
|
-
let config = _objectSpread({}, semanticReleaseConfig.baseConfig);
|
|
101
|
-
config = insertAndEditPlugins(config);
|
|
102
|
-
if (projectsToPublish) config = appendPlugins(config, projectsToPublish, projectsToPackAndPush);
|
|
103
|
-
if (debug.enabled) {
|
|
104
|
-
console.debug(`modified plugins array:\n${node_util.inspect(config.plugins, false, Infinity)}`);
|
|
105
|
-
}
|
|
106
|
-
return config;
|
|
107
|
-
}
|
|
108
|
-
exports.appendPlugins = appendPlugins;
|
|
109
|
-
exports.default = getConfig;
|
|
110
|
-
exports.getConfig = getConfig;
|
|
111
|
-
exports.insertAndEditPlugins = insertAndEditPlugins;
|
|
112
|
-
//# sourceMappingURL=semanticReleaseConfigDotnet.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReleaseConfigDotnet.cjs","sources":["../src/semanticReleaseConfigDotnet.ts"],"sourcesContent":null,"names":["defaultPlugins","setupGitPluginSpec","configurePrepareCmd","configureDotnetNugetPush","inspect","baseConfig","getEnvVarValue"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,MAAM,EAAE;AAC7C;AACA,EAAE,MAAM,CAAC,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,IAAIA,oCAAc,CAAC,CAAC;AAC1D,EAAE,MAAM,CAAC,OAAO,GAAGC,qCAAkB,CAAC,MAAM,CAAC,OAAO,CAAC;AACrD,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,qBAAqB,EAAE;AAChF,EAAE,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC;AAC9G,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;AACrB;AACA;AACA,EAAE,CAAC,wBAAwB,EAAE;AAC7B;AACA,IAAI,UAAU,EAAEC,iCAAmB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;AAC7E,IAAI,UAAU,EAAEC,sCAAwB;AACxC,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,iBAAiB,GAAG,EAAE,EAAE,qBAAqB,GAAG,EAAE,EAAE;AAC9E,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE;AACrB,IAAI,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAGC,iBAAO,CAACC,gCAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACtF;AACA,EAAE,MAAM,MAA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AACA,EAAE,OAAO,MAAM;AACf;;;;;;;"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/** Semantic-Release Config Factory (dotnet)
|
|
2
|
-
* A functional Semantic-Release configuration for dotnet projects
|
|
3
|
-
*
|
|
4
|
-
* extends {@link baseConfig }
|
|
5
|
-
*
|
|
6
|
-
* <-- TABLE OF CONTENTS -->
|
|
7
|
-
* - evaluateProperties
|
|
8
|
-
* - configureDotnetRelease
|
|
9
|
-
* - Insert-Edit Plugins
|
|
10
|
-
* - Append Plugins
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
import type { Options } from 'semantic-release';
|
|
14
|
-
/**
|
|
15
|
-
* TODO: options/params for inserts/edits. NOT ready for production. Currently, this can only add Git plugin's options if undefined or one or more is missing.
|
|
16
|
-
* Insert (`array.splice`) and/or configure plugins.\
|
|
17
|
-
* Can be used to...\
|
|
18
|
-
* ...load plugin A before plugin B\
|
|
19
|
-
* ...edit a plugin's existing configuration
|
|
20
|
-
*
|
|
21
|
-
* @param config An instance of {@link Options}
|
|
22
|
-
* @returns a modified copy of {@link config}
|
|
23
|
-
*/
|
|
24
|
-
export declare function insertAndEditPlugins(config: Options): Options;
|
|
25
|
-
/**
|
|
26
|
-
* Currently, only configures `@semantic-release/exec` with `prepareCmd: configurePrepareCmd(projectsToPublish, projectsToPackAndPush)` and `publishCmd: configureDotnetNugetPush()`
|
|
27
|
-
* @param config
|
|
28
|
-
* @param projectsToPublish
|
|
29
|
-
* @param projectsToPackAndPush
|
|
30
|
-
* @returns config with the specified plugins and plugin options.
|
|
31
|
-
*/
|
|
32
|
-
export declare function appendPlugins(config: Options, projectsToPublish: string[], projectsToPackAndPush: string[] | false): Options;
|
|
33
|
-
/**
|
|
34
|
-
* Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet` publish, pack, and push.
|
|
35
|
-
* @param projectsToPublish An array of dotnet projects' relative paths. If
|
|
36
|
-
* empty or unspecified, tries getting projects' semi-colon-separated relative
|
|
37
|
-
* paths from the `PROJECTS_TO_PUBLISH` environment variable. If configured as
|
|
38
|
-
* recommended, the projects' publish outputs will be zipped to '$PWD/publish'
|
|
39
|
-
* for use in the `publish` semantic-release step (typically, GitHub release).
|
|
40
|
-
* @param projectsToPackAndPush An array of dotnet projects' relative paths. If
|
|
41
|
-
* false, `dotnet pack` and `dotnet nuget push` will be left out of the exec
|
|
42
|
-
* commands. If empty or unspecified, tries getting projects'
|
|
43
|
-
* semi-colon-separated relative paths from the `PROJECTS_TO_PACK_AND_PUSH`
|
|
44
|
-
* environment variable. If configured as recommended, `dotnet pack` will output
|
|
45
|
-
* the nupkg/snupk files to `$PWD/publish` where they will be globbed by `dotnet
|
|
46
|
-
* nuget push`.
|
|
47
|
-
* @returns a semantic-release Options object, based on `@halospv3/hce.shared-config` (our base config), with the `@semantic-release/exec` plugin configured to `dotnet publish`, `pack`, and `push` the specified projects.
|
|
48
|
-
*/
|
|
49
|
-
export declare function getConfig(projectsToPublish?: string[], projectsToPackAndPush?: string[] | false): Options;
|
|
50
|
-
export default getConfig;
|
|
51
|
-
//# sourceMappingURL=semanticReleaseConfigDotnet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReleaseConfigDotnet.d.ts","sourceRoot":"","sources":["../src/semanticReleaseConfigDotnet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAO5D;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAO7D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,OAAO,EACf,iBAAiB,EAAE,MAAM,EAAE,EAC3B,qBAAqB,EAAE,MAAM,EAAE,GAAG,KAAK,GACrC,OAAO,CAgBT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,iBAAiB,GAAE,MAAM,EAAO,EAAE,qBAAqB,GAAE,MAAM,EAAE,GAAG,KAAU,GAAG,OAAO,CA0CjH;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const GitPluginId = '@semantic-release/git';
|
|
4
|
-
/** As specified at https://github.com/semantic-release/git#options */
|
|
5
|
-
const DefaultOptions = {
|
|
6
|
-
assets: ['README.md', 'CHANGELOG.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json'],
|
|
7
|
-
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
|
|
8
|
-
};
|
|
9
|
-
function gitAssetsToArray(assets) {
|
|
10
|
-
if (assets === undefined || assets === false) return [];
|
|
11
|
-
if (Array.isArray(assets)) return assets;
|
|
12
|
-
if (typeof assets === 'string') return [assets];
|
|
13
|
-
return assets.path === 'string' ? [assets.path] : [];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* https://github.com/semantic-release/git#options
|
|
18
|
-
*
|
|
19
|
-
* This plugin may be deprecated at a later date.
|
|
20
|
-
* Why do you need to commit during release?
|
|
21
|
-
* If you don't need to update a changelog or version in a file, then you don't need this.
|
|
22
|
-
*
|
|
23
|
-
* @returns A {@link PluginSpec} array with {@link PluginSpec<GitOptions>}. If Git plugin not in original array, returns the original array.
|
|
24
|
-
* todo: deprecate for generic or parameterized function
|
|
25
|
-
*/
|
|
26
|
-
function setupGitPluginSpec(plugins) {
|
|
27
|
-
let newPlugins = plugins;
|
|
28
|
-
let gitPluginIndex = -1;
|
|
29
|
-
function pluginSpecIsGit(pluginSpec, pluginSpecIndex) {
|
|
30
|
-
if (pluginSpec === GitPluginId || pluginSpec[0] === GitPluginId) {
|
|
31
|
-
gitPluginIndex = pluginSpecIndex;
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// if Git plugin not in load order, return as-is.
|
|
38
|
-
if (!newPlugins.some(pluginSpecIsGit)) return plugins;
|
|
39
|
-
|
|
40
|
-
// if string, replace with tuple with default options.
|
|
41
|
-
newPlugins = newPlugins.map(plugin => plugin === GitPluginId ? [GitPluginId, DefaultOptions] : plugin);
|
|
42
|
-
|
|
43
|
-
// ensure assets is an array
|
|
44
|
-
newPlugins[gitPluginIndex][1].assets = gitAssetsToArray(newPlugins[gitPluginIndex][1].assets);
|
|
45
|
-
const discardPile = [];
|
|
46
|
-
|
|
47
|
-
// de-duplicate Git plugin entries; assign single entry to newPlugins[gitPluginIndex]
|
|
48
|
-
newPlugins.forEach((current, i) => {
|
|
49
|
-
if (i > gitPluginIndex && pluginSpecIsGit(current, gitPluginIndex)) {
|
|
50
|
-
// convert its assets to an array
|
|
51
|
-
const assets = newPlugins[i][1].assets;
|
|
52
|
-
const message = newPlugins[i][1].message;
|
|
53
|
-
// push unique assets to first entry's assets array
|
|
54
|
-
if (assets !== undefined) newPlugins[gitPluginIndex][1].assets.push(...gitAssetsToArray(assets));
|
|
55
|
-
if (message !== undefined) newPlugins[gitPluginIndex][1].message = message;
|
|
56
|
-
discardPile.push(i);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
for (const i of discardPile.sort().reverse()) {
|
|
60
|
-
newPlugins.splice(i, 1);
|
|
61
|
-
}
|
|
62
|
-
return newPlugins;
|
|
63
|
-
}
|
|
64
|
-
exports.DefaultOptions = DefaultOptions;
|
|
65
|
-
exports.GitPluginId = GitPluginId;
|
|
66
|
-
exports.setupGitPluginSpec = setupGitPluginSpec;
|
|
67
|
-
//# sourceMappingURL=setupGitPluginSpec.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupGitPluginSpec.cjs","sources":["../src/setupGitPluginSpec.ts"],"sourcesContent":null,"names":[],"mappings":";;AAAY,MAAC,WAAW,GAAG;AAC3B;AACY,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EA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AM,CAAC;AAC/F,EAAE,MAAM,WAAW,GAAG,EAAE;;AAExB;AACA,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK;AACrC,IAAI,IAAI,CAAC,GAAG,cAAc,IAAI,eAAe,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE;AACxE;AACA,MAAM,MAAM;AACZ,QAAQ;AACR,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,MAAM,MAAM;AACZ,QAAQ;AACR,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B;AACA,MAAM,IAAI,MAAM,KAAK,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACtG,MAAM,IAAI,OAAO,KAAK,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO;AAChF,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AACzB;AACA,GAAG,CAAC;AACJ,EAAE,KAAK,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;AAChD,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;AAC3B;AACA,EAAE,OAAO,UAAU;AACnB;;;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { PluginSpec } from 'semantic-release';
|
|
2
|
-
export declare const GitPluginId = "@semantic-release/git";
|
|
3
|
-
/** As specified at https://github.com/semantic-release/git#options */
|
|
4
|
-
export declare const DefaultOptions: {
|
|
5
|
-
assets: string[];
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* https://github.com/semantic-release/git#options
|
|
10
|
-
*
|
|
11
|
-
* This plugin may be deprecated at a later date.
|
|
12
|
-
* Why do you need to commit during release?
|
|
13
|
-
* If you don't need to update a changelog or version in a file, then you don't need this.
|
|
14
|
-
*
|
|
15
|
-
* @returns A {@link PluginSpec} array with {@link PluginSpec<GitOptions>}. If Git plugin not in original array, returns the original array.
|
|
16
|
-
* todo: deprecate for generic or parameterized function
|
|
17
|
-
*/
|
|
18
|
-
export declare function setupGitPluginSpec(plugins: PluginSpec[]): PluginSpec[];
|
|
19
|
-
//# sourceMappingURL=setupGitPluginSpec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupGitPluginSpec.d.ts","sourceRoot":"","sources":["../src/setupGitPluginSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,WAAW,0BAA0B,CAAC;AACnD,sEAAsE;AACtE,eAAO,MAAM,cAAc;;;CAGL,CAAC;AASvB;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CA+CtE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { execSync, type ExecSyncOptionsWithStringEncoding } from 'node:child_process';
|
|
2
|
-
import { existsSync, unlinkSync } from 'node:fs';
|
|
3
|
-
import { dirname, join } from 'node:path';
|
|
4
|
-
import { dirSync } from 'tmp';
|
|
5
|
-
|
|
6
|
-
export function createDummyNupkg(): string {
|
|
7
|
-
const dirResult = dirSync({ unsafeCleanup: true });
|
|
8
|
-
const dummyPkgFullPath: string = join(dirResult.name, 'DUMMY.1.0.0.nupkg');
|
|
9
|
-
|
|
10
|
-
// delete old and possibly-poisoned nupkg
|
|
11
|
-
if (existsSync(dummyPkgFullPath))
|
|
12
|
-
unlinkSync(dummyPkgFullPath);
|
|
13
|
-
|
|
14
|
-
const options: ExecSyncOptionsWithStringEncoding = {
|
|
15
|
-
cwd: dirResult.name,
|
|
16
|
-
encoding: 'utf8'
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
execSync('dotnet new console --name DUMMY', options);
|
|
20
|
-
const packOut = execSync(`dotnet pack DUMMY --configuration Release --output ${dirname(dummyPkgFullPath)}`, options);
|
|
21
|
-
|
|
22
|
-
const createdLine = packOut.replace('\r', '')
|
|
23
|
-
.split('\n')
|
|
24
|
-
.find(line => line.includes('Successfully created package'))?.trim();
|
|
25
|
-
|
|
26
|
-
if (!existsSync(dummyPkgFullPath))
|
|
27
|
-
throw new Error(`The dummy nupkg was created, but could not be found at ${dummyPkgFullPath}. See '${createdLine}'.`);
|
|
28
|
-
|
|
29
|
-
return dummyPkgFullPath;
|
|
30
|
-
}
|