@halospv3/hce.shared-config 3.0.0-develop.4 → 3.0.0-develop.6
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 +29 -0
- package/dotnet/.github/workflows/_unit_test.yml +0 -3
- package/dotnet/.github/workflows/dotnet-release.yml +0 -3
- package/dotnet/.github/workflows/sample-dotnet-build.yml +0 -3
- package/mjs/CaseInsensitiveMap.d.ts +12 -0
- package/mjs/CaseInsensitiveMap.d.ts.map +1 -0
- package/mjs/CaseInsensitiveMap.mjs +33 -0
- package/mjs/CaseInsensitiveMap.mjs.map +1 -0
- package/mjs/commitlintConfig.d.ts +12 -0
- package/mjs/commitlintConfig.d.ts.map +1 -0
- package/mjs/commitlintConfig.mjs +13 -0
- package/mjs/commitlintConfig.mjs.map +1 -0
- package/mjs/debug.d.ts +4 -0
- package/mjs/debug.d.ts.map +1 -0
- package/mjs/debug.mjs +7 -0
- package/mjs/debug.mjs.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts +34 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs +45 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +57 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +99 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts +2 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts.map +1 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +26 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProject.d.ts +263 -0
- package/mjs/dotnet/MSBuildProject.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProject.mjs +444 -0
- package/mjs/dotnet/MSBuildProject.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts +169 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs +259 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -0
- package/mjs/dotnet/NugetProjectProperties.d.ts +378 -0
- package/mjs/dotnet/NugetProjectProperties.d.ts.map +1 -0
- package/mjs/dotnet/NugetProjectProperties.mjs +577 -0
- package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -0
- package/mjs/dotnet/NugetRegistryInfo.d.ts +382 -0
- package/mjs/dotnet/NugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/NugetRegistryInfo.mjs +752 -0
- package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/helpers.d.ts +95 -0
- package/mjs/dotnet/helpers.d.ts.map +1 -0
- package/mjs/dotnet/helpers.mjs +351 -0
- package/mjs/dotnet/helpers.mjs.map +1 -0
- package/mjs/eslintConfig.d.ts +4 -0
- package/mjs/eslintConfig.d.ts.map +1 -0
- package/mjs/eslintConfig.mjs +98 -0
- package/mjs/eslintConfig.mjs.map +1 -0
- package/mjs/index.d.ts +3 -0
- package/mjs/index.d.ts.map +1 -0
- package/mjs/index.mjs +4 -0
- package/mjs/index.mjs.map +1 -0
- package/mjs/insertPlugins.d.ts +18 -0
- package/mjs/insertPlugins.d.ts.map +1 -0
- package/mjs/insertPlugins.mjs +73 -0
- package/mjs/insertPlugins.mjs.map +1 -0
- package/mjs/semantic-release__commit-analyzer.d.mjs +2 -0
- package/mjs/semantic-release__commit-analyzer.d.mjs.map +1 -0
- package/mjs/semantic-release__exec.d.mjs +2 -0
- package/mjs/semantic-release__exec.d.mjs.map +1 -0
- package/mjs/semantic-release__git.d.mjs +2 -0
- package/mjs/semantic-release__git.d.mjs.map +1 -0
- package/mjs/semantic-release__github.d.mjs +2 -0
- package/mjs/semantic-release__github.d.mjs.map +1 -0
- package/mjs/semanticReleaseConfig.d.ts +92 -0
- package/mjs/semanticReleaseConfig.d.ts.map +1 -0
- package/mjs/semanticReleaseConfig.mjs +63 -0
- package/mjs/semanticReleaseConfig.mjs.map +1 -0
- package/mjs/semanticReleaseConfigDotnet.d.ts +109 -0
- package/mjs/semanticReleaseConfigDotnet.d.ts.map +1 -0
- package/mjs/semanticReleaseConfigDotnet.mjs +267 -0
- package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -0
- package/mjs/setupGitPluginSpec.d.ts +22 -0
- package/mjs/setupGitPluginSpec.d.ts.map +1 -0
- package/mjs/setupGitPluginSpec.mjs +144 -0
- package/mjs/setupGitPluginSpec.mjs.map +1 -0
- package/mjs/utils/Exact.d.ts +20 -0
- package/mjs/utils/Exact.d.ts.map +1 -0
- package/mjs/utils/Exact.mjs +75 -0
- package/mjs/utils/Exact.mjs.map +1 -0
- package/mjs/utils/GracefulRecursion.d.mjs +2 -0
- package/mjs/utils/GracefulRecursion.d.mjs.map +1 -0
- package/mjs/utils/env.d.ts +24 -0
- package/mjs/utils/env.d.ts.map +1 -0
- package/mjs/utils/env.mjs +39 -0
- package/mjs/utils/env.mjs.map +1 -0
- package/mjs/utils/execAsync.d.ts +36 -0
- package/mjs/utils/execAsync.d.ts.map +1 -0
- package/mjs/utils/execAsync.mjs +59 -0
- package/mjs/utils/execAsync.mjs.map +1 -0
- package/mjs/utils/miscTypes.d.ts +11 -0
- package/mjs/utils/miscTypes.d.ts.map +1 -0
- package/mjs/utils/miscTypes.mjs +10 -0
- package/mjs/utils/miscTypes.mjs.map +1 -0
- package/mjs/utils/reflection/FunctionLike.d.mjs +2 -0
- package/mjs/utils/reflection/FunctionLike.d.mjs.map +1 -0
- package/mjs/utils/reflection/GetterDescriptor.d.mjs +2 -0
- package/mjs/utils/reflection/GetterDescriptor.d.mjs.map +1 -0
- package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnKeyOf.d.mjs +2 -0
- package/mjs/utils/reflection/OwnKeyOf.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/filterForGetters.d.ts +7 -0
- package/mjs/utils/reflection/filterForGetters.d.ts.map +1 -0
- package/mjs/utils/reflection/filterForGetters.mjs +27 -0
- package/mjs/utils/reflection/filterForGetters.mjs.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts +22 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs +34 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts +56 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +72 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -0
- package/mjs/utils/reflection/getPrototypeChainOf.d.ts +16 -0
- package/mjs/utils/reflection/getPrototypeChainOf.d.ts.map +1 -0
- package/mjs/utils/reflection/getPrototypeChainOf.mjs +55 -0
- package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -0
- package/mjs/utils/reflection/getPrototypeOf.d.ts +8 -0
- package/mjs/utils/reflection/getPrototypeOf.d.ts.map +1 -0
- package/mjs/utils/reflection/getPrototypeOf.mjs +10 -0
- package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -0
- package/mjs/utils/reflection/inheritance.d.ts +180 -0
- package/mjs/utils/reflection/inheritance.d.ts.map +1 -0
- package/mjs/utils/reflection/inheritance.mjs +148 -0
- package/mjs/utils/reflection/inheritance.mjs.map +1 -0
- package/mjs/utils/reflection/isConstructor.d.ts +17 -0
- package/mjs/utils/reflection/isConstructor.d.ts.map +1 -0
- package/mjs/utils/reflection/isConstructor.mjs +63 -0
- package/mjs/utils/reflection/isConstructor.mjs.map +1 -0
- package/mjs/utils/reflection/isGetterDescriptor.d.ts +9 -0
- package/mjs/utils/reflection/isGetterDescriptor.d.ts.map +1 -0
- package/mjs/utils/reflection/isGetterDescriptor.mjs +12 -0
- package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -0
- package/mjs/utils/reflection/listOwnGetters.d.ts +26 -0
- package/mjs/utils/reflection/listOwnGetters.d.ts.map +1 -0
- package/mjs/utils/reflection/listOwnGetters.mjs +39 -0
- package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -0
- package/mjs/utils/reflection.d.ts +18 -0
- package/mjs/utils/reflection.d.ts.map +1 -0
- package/mjs/utils/reflection.mjs +10 -0
- package/mjs/utils/reflection.mjs.map +1 -0
- package/package.json +6 -4
- package/src/insertPlugins.ts +116 -0
- package/src/semanticReleaseConfigDotnet.ts +84 -81
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## [3.0.0-develop.6](https://github.com/HaloSPV3/HCE.Shared/compare/v3.0.0-develop.5...v3.0.0-develop.6) (2025-07-17)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* try fixing GitLab asset label, path ([75463a0](https://github.com/HaloSPV3/HCE.Shared/commit/75463a02ce247b33c25435d1e4afa78d6748f8db))
|
|
6
|
+
* try fixing GitLab assets path AGAIN ([0bee0ae](https://github.com/HaloSPV3/HCE.Shared/commit/0bee0aee71e2da6707228820cec41c4a2248c44a))
|
|
7
|
+
|
|
8
|
+
## [3.0.0-develop.5](https://github.com/HaloSPV3/HCE.Shared/compare/v3.0.0-develop.4...v3.0.0-develop.5) (2025-07-17)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **insertPlugins:** add, export `insertPlugin`; declare internal `insertAndSortPlugins`; fix false-positive error caused by `!0` ([8971599](https://github.com/HaloSPV3/HCE.Shared/commit/8971599585dc962d5be6e7c3cc084f8c1a65d71c))
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **dotnet.SemanticRelease:** append `@semantic-release/exec` plugin to plugins array if not found ([7eeafb2](https://github.com/HaloSPV3/HCE.Shared/commit/7eeafb2caab31358ecb91f8b3f1b885a11bc43b8))
|
|
17
|
+
* **dotnet.SemanticRelease:** set/append dummy pack, dummy push, and INVAP commands ([88a523e](https://github.com/HaloSPV3/HCE.Shared/commit/88a523e231a821b59b72af0dee785affa9889499))
|
|
18
|
+
|
|
19
|
+
## [3.0.0-develop.5](https://github.com/HaloSPV3/HCE.Shared/compare/v3.0.0-develop.4...v3.0.0-develop.5) (2025-07-17)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **insertPlugins:** add, export `insertPlugin`; declare internal `insertAndSortPlugins`; fix false-positive error caused by `!0` ([8971599](https://github.com/HaloSPV3/HCE.Shared/commit/8971599585dc962d5be6e7c3cc084f8c1a65d71c))
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **dotnet.SemanticRelease:** append `@semantic-release/exec` plugin to plugins array if not found ([7eeafb2](https://github.com/HaloSPV3/HCE.Shared/commit/7eeafb2caab31358ecb91f8b3f1b885a11bc43b8))
|
|
28
|
+
* **dotnet.SemanticRelease:** set/append dummy pack, dummy push, and INVAP commands ([88a523e](https://github.com/HaloSPV3/HCE.Shared/commit/88a523e231a821b59b72af0dee785affa9889499))
|
|
29
|
+
|
|
1
30
|
## [3.0.0-develop.4](https://github.com/HaloSPV3/HCE.Shared/compare/v3.0.0-develop.3...v3.0.0-develop.4) (2025-07-16)
|
|
2
31
|
|
|
3
32
|
### Bug Fixes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://stackoverflow.com/a/50022230/14894786
|
|
3
|
+
* licensed under CC BY-SA 4.0
|
|
4
|
+
* changes: add overrides, remove "as any", remove empty lines
|
|
5
|
+
*/
|
|
6
|
+
export declare class CaseInsensitiveMap<T, U> extends Map<T, U> {
|
|
7
|
+
delete(key: T): boolean;
|
|
8
|
+
get(key: T): U | undefined;
|
|
9
|
+
has(key: T): boolean;
|
|
10
|
+
set(key: T, value: U): this;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=CaseInsensitiveMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseInsensitiveMap.d.ts","sourceRoot":"","sources":["../src/CaseInsensitiveMap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5C,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAOvB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAO1B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAOpB,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;CAMrC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://stackoverflow.com/a/50022230/14894786
|
|
3
|
+
* licensed under CC BY-SA 4.0
|
|
4
|
+
* changes: add overrides, remove "as any", remove empty lines
|
|
5
|
+
*/
|
|
6
|
+
class CaseInsensitiveMap extends Map {
|
|
7
|
+
delete(key) {
|
|
8
|
+
if (typeof key === 'string') {
|
|
9
|
+
key = key.toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
return super.delete(key);
|
|
12
|
+
}
|
|
13
|
+
get(key) {
|
|
14
|
+
if (typeof key === 'string') {
|
|
15
|
+
key = key.toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
return super.get(key);
|
|
18
|
+
}
|
|
19
|
+
has(key) {
|
|
20
|
+
if (typeof key === 'string') {
|
|
21
|
+
key = key.toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
return super.has(key);
|
|
24
|
+
}
|
|
25
|
+
set(key, value) {
|
|
26
|
+
if (typeof key === 'string') {
|
|
27
|
+
key = key.toLowerCase();
|
|
28
|
+
}
|
|
29
|
+
return super.set(key, value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export { CaseInsensitiveMap };
|
|
33
|
+
//# sourceMappingURL=CaseInsensitiveMap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseInsensitiveMap.mjs","sources":["../src/CaseInsensitiveMap.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAkB,SAAS,GAAG,CAAC;AAC5C,EAAE,MAAM,CAAC,GAAG,EAAE;AACd,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE;AAC7B;AACA,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;AAC5B;AACA,EAAE,GAAG,CAAC,GAAG,EAAE;AACX,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE;AAC7B;AACA,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACzB;AACA,EAAE,GAAG,CAAC,GAAG,EAAE;AACX,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE;AAC7B;AACA,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACzB;AACA,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE;AAClB,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE;AAC7B;AACA,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC;AAChC;AACA;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RuleConfigSeverity, UserConfig } from '@commitlint/types';
|
|
2
|
+
declare const disabled: RuleConfigSeverity.Disabled;
|
|
3
|
+
declare const commitlintConfig: UserConfig & {
|
|
4
|
+
extends: UserConfig['extends'] | ['@commitlint/config-conventional'];
|
|
5
|
+
rules: {
|
|
6
|
+
'body-max-line-length': [typeof disabled];
|
|
7
|
+
'footer-max-line-length': [typeof disabled];
|
|
8
|
+
'header-max-length': [typeof disabled];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default commitlintConfig;
|
|
12
|
+
//# sourceMappingURL=commitlintConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitlintConfig.d.ts","sourceRoot":"","sources":["../src/commitlintConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIxE,QAAA,MAAM,QAAQ,EAAQ,kBAAkB,CAAC,QAAQ,CAAC;AAClD,QAAA,MAAM,gBAAgB,EAAE,UAAU,GAAG;IACnC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IACrE,KAAK,EAAE;QACL,sBAAsB,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC;QAC1C,wBAAwB,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC;QAC5C,mBAAmB,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC;KACxC,CAAC;CAQH,CAAC;AAGF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// explicit type annotations for isolatedDeclarations. Allows for faster processing.
|
|
2
|
+
|
|
3
|
+
const disabled = 0;
|
|
4
|
+
const commitlintConfig = {
|
|
5
|
+
extends: ['@commitlint/config-conventional'],
|
|
6
|
+
rules: {
|
|
7
|
+
'body-max-line-length': [disabled],
|
|
8
|
+
'footer-max-line-length': [disabled],
|
|
9
|
+
'header-max-length': [disabled]
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export { commitlintConfig as default };
|
|
13
|
+
//# sourceMappingURL=commitlintConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitlintConfig.mjs","sources":["../src/commitlintConfig.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;;AAEA,MAAM,QAAQ,GAAG,CAAC;AACb,MAAC,gBAAgB,GAAG;AACzB,EAAE,OAAO,EAAE,CAAC,iCAAiC,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,sBAAsB,EAAE,CAAC,QAAQ,CAAC;AACtC,IAAI,wBAAwB,EAAE,CAAC,QAAQ,CAAC;AACxC,IAAI,mBAAmB,EAAE,CAAC,QAAQ;AAClC;AACA;;;;"}
|
package/mjs/debug.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,MAAM,gBAAuC,CAAC;AAMpD,eAAe,MAAM,CAAC"}
|
package/mjs/debug.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import debug from 'debug';
|
|
2
|
+
const _debug = debug('@halospv3/hce.shared-config');
|
|
3
|
+
if (process.argv.some(v => v.includes('--debug')) || debug.enabled('@halospv3/hce.shared-config')) {
|
|
4
|
+
debug.enable(_debug.namespace);
|
|
5
|
+
}
|
|
6
|
+
export { _debug as default };
|
|
7
|
+
//# sourceMappingURL=debug.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.mjs","sources":["../src/debug.ts"],"sourcesContent":null,"names":[],"mappings":";;AACK,MAAC,MAAM,GAAG,KAAK,CAAC,6BAA6B;AAClD,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,6BAA6B,CAAC,EAAE;AACnG,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;AAChC;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NugetRegistryInfo } from './NugetRegistryInfo.js';
|
|
2
|
+
export declare class GithubNugetRegistryInfo extends NugetRegistryInfo {
|
|
3
|
+
static readonly NUGET_PKG_GITHUB_COM = "https://nuget.pkg.github.com";
|
|
4
|
+
static readonly DefaultGithubTokenEnvVars: readonly ["GH_TOKEN", "GITHUB_TOKEN"];
|
|
5
|
+
/**
|
|
6
|
+
* Creates an instance of GithubNugetRegistryInfo.
|
|
7
|
+
* @param opts The input type of {@link GHNRIOpts.from}
|
|
8
|
+
*/
|
|
9
|
+
constructor(opts: typeof GHNRIOpts.inferIn);
|
|
10
|
+
/**
|
|
11
|
+
* Returns `https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json`
|
|
12
|
+
* or (if GITHUB_REPOSITORY_OWNER is not defined in {@link process.env} nor
|
|
13
|
+
* {@link process.cwd() $CWD}/.env) `undefined`.
|
|
14
|
+
* @returns If GITHUB_REPOSITORY_OWNER is defined, returns the GitHub Package Repository URL endpoint for NuGet pushes (--source).\
|
|
15
|
+
* Otherwise, returns `undefined`
|
|
16
|
+
*/
|
|
17
|
+
static getNugetGitHubUrl(): string | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The default value of {@link GHNRIOpts.t.source `source`} is dependent on
|
|
21
|
+
* {@link GHNRI.getNugetGitHubUrl} and will default to an empty string if the
|
|
22
|
+
* environment variable `GITHUB_REPOSITORY_OWNER` is undefined!
|
|
23
|
+
*/
|
|
24
|
+
export declare const GHNRIOpts: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
25
|
+
project: import("./MSBuildProject.js").MSBuildProject | {
|
|
26
|
+
readonly Items: Readonly<Required<import("./MSBuildProject.js").MSBuildEvaluationOutput>["Items"]>;
|
|
27
|
+
readonly Properties: Readonly<import("./NugetProjectProperties.js").NugetProjectProperties>;
|
|
28
|
+
readonly Targets: readonly string[];
|
|
29
|
+
readonly TargetResults: Required<import("./MSBuildProject.js").MSBuildEvaluationOutput>["TargetResults"][];
|
|
30
|
+
};
|
|
31
|
+
source: import("arktype/internal/attributes.ts").Default<string, string>;
|
|
32
|
+
tokenEnvVars: import("arktype/internal/attributes.ts").Default<readonly string[], readonly ["GH_TOKEN", "GITHUB_TOKEN"]>;
|
|
33
|
+
}, {}>;
|
|
34
|
+
//# sourceMappingURL=GithubNugetRegistryInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubNugetRegistryInfo.d.ts","sourceRoot":"","sources":["../../src/dotnet/GithubNugetRegistryInfo.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAQhC,qBAAa,uBAAwB,SAAQ,iBAAiB;IAC5D,MAAM,CAAC,QAAQ,CAAC,oBAAoB,kCAAkC;IAEtE,MAAM,CAAC,QAAQ,CAAC,yBAAyB,wCAG7B;IAGZ;;;OAGG;gBACS,IAAI,EAAE,OAAO,SAAS,CAAC,OAAO;IAI1C;;;;;;OAMG;IACH,MAAM,CAAC,iBAAiB,IAAI,MAAM,GAAG,SAAS;CAM/C;AAGD;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;;;;MASpB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getEnvVarValue } from '../utils/env.mjs';
|
|
2
|
+
import { NugetRegistryInfo, NRIOptsBase } from './NugetRegistryInfo.mjs';
|
|
3
|
+
const NUGET_PKG_GITHUB_COM = 'https://nuget.pkg.github.com';
|
|
4
|
+
const DefaultGithubTokenEnvVars = Object.freeze(['GH_TOKEN', 'GITHUB_TOKEN']);
|
|
5
|
+
class GithubNugetRegistryInfo extends NugetRegistryInfo {
|
|
6
|
+
static NUGET_PKG_GITHUB_COM = 'https://nuget.pkg.github.com';
|
|
7
|
+
// todo: deduplicate definition
|
|
8
|
+
static DefaultGithubTokenEnvVars = Object.freeze(['GH_TOKEN', 'GITHUB_TOKEN']);
|
|
9
|
+
|
|
10
|
+
// GithubNugetRegistryInfo.CtorArgs(...) behaves differently than NugetRegistryInfo.CtorArgs(...)
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of GithubNugetRegistryInfo.
|
|
13
|
+
* @param opts The input type of {@link GHNRIOpts.from}
|
|
14
|
+
*/
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
super(GHNRIOpts.from(opts));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Returns `https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json`
|
|
21
|
+
* or (if GITHUB_REPOSITORY_OWNER is not defined in {@link process.env} nor
|
|
22
|
+
* {@link process.cwd() $CWD}/.env) `undefined`.
|
|
23
|
+
* @returns If GITHUB_REPOSITORY_OWNER is defined, returns the GitHub Package Repository URL endpoint for NuGet pushes (--source).\
|
|
24
|
+
* Otherwise, returns `undefined`
|
|
25
|
+
*/
|
|
26
|
+
static getNugetGitHubUrl() {
|
|
27
|
+
const owner = getEnvVarValue('GITHUB_REPOSITORY_OWNER');
|
|
28
|
+
return owner === undefined ? undefined : `${NUGET_PKG_GITHUB_COM}/${owner}/index.json`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const GHNRI = GithubNugetRegistryInfo;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The default value of {@link GHNRIOpts.t.source `source`} is dependent on
|
|
35
|
+
* {@link GHNRI.getNugetGitHubUrl} and will default to an empty string if the
|
|
36
|
+
* environment variable `GITHUB_REPOSITORY_OWNER` is undefined!
|
|
37
|
+
*/
|
|
38
|
+
const GHNRIOpts = NRIOptsBase.merge({
|
|
39
|
+
/** @see {@link GHNRI.getNugetGitHubUrl } */
|
|
40
|
+
source: NRIOptsBase.get('source').default(() => GHNRI.getNugetGitHubUrl() ?? ''),
|
|
41
|
+
tokenEnvVars: NRIOptsBase.get('tokenEnvVars').default(/* must be a function. A fixed-length array is NOT a primitive type! */
|
|
42
|
+
() => DefaultGithubTokenEnvVars)
|
|
43
|
+
});
|
|
44
|
+
export { GHNRIOpts, GithubNugetRegistryInfo };
|
|
45
|
+
//# sourceMappingURL=GithubNugetRegistryInfo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubNugetRegistryInfo.mjs","sources":["../../src/dotnet/GithubNugetRegistryInfo.ts"],"sourcesContent":null,"names":[],"mappings":";;;AAEA,MAAM,oBAAoB,GAAG,8BAA8B;AAC3D,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AACtE,MAAM,uBAAuB,SAAS,iBAAiB,CAAC;AAC/D,EAAE,OAAO,oBAAoB,GAAG,8BAA8B;AAC9D;AACA,EAAE,OAAO,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;;AAEhF;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,IAAI,EAAE;AACpB,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,iBAAiB,GAAG;AAC7B,IAAI,MAAM,KAAK,GAAG,cAAc,CAAC,yBAAyB,CAAC;AAC3D,IAAI,OAAO,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;AAC1F;AACA;AACA,MAAM,KAAK,GAAG,uBAAuB;;AAErC;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;AAC3C;AACA,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC;AAClF,EAAE,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,OAAO;AACvD,EAAE,MAAM,yBAAyB;AACjC,CAAC;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { NugetRegistryInfo } from './NugetRegistryInfo.js';
|
|
2
|
+
export declare class GitlabNugetRegistryInfo extends NugetRegistryInfo {
|
|
3
|
+
/**
|
|
4
|
+
* The GitLab API v4 root URL.
|
|
5
|
+
* @returns The value of the environment variable `CI_API_V4_URL`.
|
|
6
|
+
* If that's `undefined`, 'https://gitlab.com/api/v4' is returned, instead.
|
|
7
|
+
*/
|
|
8
|
+
static get CI_API_V4_URL(): string;
|
|
9
|
+
/**
|
|
10
|
+
* CI_PROJECT_ID - If you want to publish to your GitLab server, this needs to be set to the Id of the project you want to publish to. When running in GitLab CI this is already set to the project the pipeline runs in by GitLab.
|
|
11
|
+
* This method checks the contents of your `.env` file, if present.
|
|
12
|
+
* @returns The value of the environment variable `CI_PROJECT_ID` or `undefined`.
|
|
13
|
+
* @todo add URI encoded project pathname as alternative e.g. 'halospv3%2FHCE.Shared' in 'https://gitlab.com/api/v4/projects/halospv3%2FHCE.Shared'
|
|
14
|
+
*/
|
|
15
|
+
static get projectId(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* CI_PROJECT_NAMESPACE_ID
|
|
18
|
+
* This method checks the contents of your `.env` file, if present.
|
|
19
|
+
* @returns The value of the environment variable 'CI_PROJECT_NAMESPACE_ID' or `undefined`.
|
|
20
|
+
*/
|
|
21
|
+
static get ownerId(): string | undefined;
|
|
22
|
+
static readonly DefaultGitlabTokenEnvVars: readonly ["GL_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN"];
|
|
23
|
+
/**
|
|
24
|
+
* Creates an instance of GitlabNugetRegistryInfo.
|
|
25
|
+
* @param opts The input type of {@link GLNRIOpts.from}
|
|
26
|
+
*/
|
|
27
|
+
constructor(opts: typeof GLNRIOpts.inferIn);
|
|
28
|
+
/**
|
|
29
|
+
* Get the GitLab Nuget API for your project url as seen in https://docs.gitlab.com/ee/user/packages/nuget_repository/index.html#publish-a-nuget-package-by-using-cicd
|
|
30
|
+
* ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json
|
|
31
|
+
* @returns If {@link this.projectId} is a string, a string formatted like
|
|
32
|
+
* `${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json`.
|
|
33
|
+
* Else, {@link Error}.
|
|
34
|
+
*/
|
|
35
|
+
static get projectUrl(): string | Error;
|
|
36
|
+
/**
|
|
37
|
+
* ${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json
|
|
38
|
+
* @returns If {@link ownerId} is a string, then a string formatted like
|
|
39
|
+
* `${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json`.
|
|
40
|
+
* Else, {@link Error}.
|
|
41
|
+
*/
|
|
42
|
+
static get groupUrl(): string | Error;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The Arktype definition for {@link GitlabNugetRegistryInfo}'s constructor parameter. Construct an object of this type by calling {@link GLNRIOpts.from}
|
|
46
|
+
*/
|
|
47
|
+
export declare const GLNRIOpts: import("arktype/internal/methods/object.ts").ObjectType<{
|
|
48
|
+
project: import("./MSBuildProject.js").MSBuildProject | {
|
|
49
|
+
readonly Items: Readonly<Required<import("./MSBuildProject.js").MSBuildEvaluationOutput>["Items"]>;
|
|
50
|
+
readonly Properties: Readonly<import("./NugetProjectProperties.js").NugetProjectProperties>;
|
|
51
|
+
readonly Targets: readonly string[];
|
|
52
|
+
readonly TargetResults: Required<import("./MSBuildProject.js").MSBuildEvaluationOutput>["TargetResults"][];
|
|
53
|
+
};
|
|
54
|
+
tokenEnvVars: import("arktype/internal/attributes.ts").Default<readonly string[], readonly ["GL_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN"]>;
|
|
55
|
+
source: (In: import("arktype/internal/attributes.ts").Default<string | Error, string | Error>) => import("arktype").Out<string | Error>;
|
|
56
|
+
}, {}>;
|
|
57
|
+
//# sourceMappingURL=GitlabNugetRegistryInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitlabNugetRegistryInfo.d.ts","sourceRoot":"","sources":["../../src/dotnet/GitlabNugetRegistryInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EAGlB,MAAM,wBAAwB,CAAC;AAGhC,qBAAa,uBAAwB,SAAQ,iBAAiB;IAC5D;;;;OAIG;IACH,MAAM,KAAK,aAAa,WAEvB;IAED;;;;;OAKG;IACH,MAAM,KAAK,SAAS,uBAEnB;IAED;;;;OAIG;IACH,MAAM,KAAK,OAAO,uBAEjB;IAED,MAAM,CAAC,QAAQ,CAAC,yBAAyB,wDAI7B;IAEZ;;;OAGG;gBACS,IAAI,EAAE,OAAO,SAAS,CAAC,OAAO;IAO1C;;;;;;OAMG;IACH,MAAM,KAAK,UAAU,IAAI,MAAM,GAAG,KAAK,CAItC;IAED;;;;;OAKG;IACH,MAAM,KAAK,QAAQ,IAAI,MAAM,GAAG,KAAK,CAIpC;CACF;AAGD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;MA0BpB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { isNativeError } from 'node:util/types';
|
|
2
|
+
import { getEnvVarValue } from '../utils/env.mjs';
|
|
3
|
+
import { NugetRegistryInfo, NRIOpts, NRIOptsBase } from './NugetRegistryInfo.mjs';
|
|
4
|
+
|
|
5
|
+
// https://docs.gitlab.com/ee/user/packages/nuget_repository/
|
|
6
|
+
class GitlabNugetRegistryInfo extends NugetRegistryInfo {
|
|
7
|
+
/**
|
|
8
|
+
* The GitLab API v4 root URL.
|
|
9
|
+
* @returns The value of the environment variable `CI_API_V4_URL`.
|
|
10
|
+
* If that's `undefined`, 'https://gitlab.com/api/v4' is returned, instead.
|
|
11
|
+
*/
|
|
12
|
+
static get CI_API_V4_URL() {
|
|
13
|
+
return getEnvVarValue('CI_API_V4_URL') ?? 'https://gitlab.com/api/v4';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* CI_PROJECT_ID - If you want to publish to your GitLab server, this needs to be set to the Id of the project you want to publish to. When running in GitLab CI this is already set to the project the pipeline runs in by GitLab.
|
|
18
|
+
* This method checks the contents of your `.env` file, if present.
|
|
19
|
+
* @returns The value of the environment variable `CI_PROJECT_ID` or `undefined`.
|
|
20
|
+
* @todo add URI encoded project pathname as alternative e.g. 'halospv3%2FHCE.Shared' in 'https://gitlab.com/api/v4/projects/halospv3%2FHCE.Shared'
|
|
21
|
+
*/
|
|
22
|
+
static get projectId() {
|
|
23
|
+
return getEnvVarValue('CI_PROJECT_ID');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* CI_PROJECT_NAMESPACE_ID
|
|
28
|
+
* This method checks the contents of your `.env` file, if present.
|
|
29
|
+
* @returns The value of the environment variable 'CI_PROJECT_NAMESPACE_ID' or `undefined`.
|
|
30
|
+
*/
|
|
31
|
+
static get ownerId() {
|
|
32
|
+
return getEnvVarValue('CI_PROJECT_NAMESPACE_ID');
|
|
33
|
+
}
|
|
34
|
+
static DefaultGitlabTokenEnvVars = Object.freeze(['GL_TOKEN', 'GITLAB_TOKEN', 'CI_JOB_TOKEN']);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Creates an instance of GitlabNugetRegistryInfo.
|
|
38
|
+
* @param opts The input type of {@link GLNRIOpts.from}
|
|
39
|
+
*/
|
|
40
|
+
constructor(opts) {
|
|
41
|
+
const optsOut = GLNRIOpts.from(opts);
|
|
42
|
+
if (isNativeError(optsOut.source)) throw optsOut.source;
|
|
43
|
+
super(optsOut);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get the GitLab Nuget API for your project url as seen in https://docs.gitlab.com/ee/user/packages/nuget_repository/index.html#publish-a-nuget-package-by-using-cicd
|
|
48
|
+
* ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json
|
|
49
|
+
* @returns If {@link this.projectId} is a string, a string formatted like
|
|
50
|
+
* `${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json`.
|
|
51
|
+
* Else, {@link Error}.
|
|
52
|
+
*/
|
|
53
|
+
static get projectUrl() {
|
|
54
|
+
return this.projectId ? `${this.CI_API_V4_URL}/projects/${this.projectId}/packages/nuget/index.json` : new Error('The project-type URL was specified, but one or more of the required environment variables (CI_API_V4_URL, CI_PROJECT_ID) were undefined.');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* ${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json
|
|
59
|
+
* @returns If {@link ownerId} is a string, then a string formatted like
|
|
60
|
+
* `${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json`.
|
|
61
|
+
* Else, {@link Error}.
|
|
62
|
+
*/
|
|
63
|
+
static get groupUrl() {
|
|
64
|
+
return this.ownerId ? `${this.CI_API_V4_URL}/groups/${this.ownerId}/-/packages/nuget/index.json` : new Error('env.CI_PROJECT_NAMESPACE_ID must be defined to use its GitLab API endpoint!');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const GLNRI = GitlabNugetRegistryInfo;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The Arktype definition for {@link GitlabNugetRegistryInfo}'s constructor parameter. Construct an object of this type by calling {@link GLNRIOpts.from}
|
|
71
|
+
*/
|
|
72
|
+
const GLNRIOpts = NRIOpts.merge({
|
|
73
|
+
tokenEnvVars: NRIOptsBase.get('tokenEnvVars').default(() => GLNRI.DefaultGitlabTokenEnvVars),
|
|
74
|
+
/**
|
|
75
|
+
* The GitLab Nuget API URL to push packages to -OR- a keyword such as "group"
|
|
76
|
+
* or "project" used to determine URL.
|
|
77
|
+
* @default GLNRI.projectUrl
|
|
78
|
+
* @see {@link GLNRI.projectUrl}, {@link GLNRI.groupUrl}
|
|
79
|
+
*/
|
|
80
|
+
// todo: change '"group" | "project"' to '"GITLAB:PROJECT" | "GITLAB:GROUP"'
|
|
81
|
+
source: NRIOptsBase.get('source').or('"group" | "project" | Error').pipe(source => {
|
|
82
|
+
switch (source) {
|
|
83
|
+
case 'group':
|
|
84
|
+
{
|
|
85
|
+
return GLNRI.groupUrl;
|
|
86
|
+
}
|
|
87
|
+
case 'project':
|
|
88
|
+
{
|
|
89
|
+
return GLNRI.projectUrl;
|
|
90
|
+
}
|
|
91
|
+
default:
|
|
92
|
+
{
|
|
93
|
+
return source;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}).default(() => GLNRI.projectUrl)
|
|
97
|
+
});
|
|
98
|
+
export { GLNRIOpts, GitlabNugetRegistryInfo };
|
|
99
|
+
//# sourceMappingURL=GitlabNugetRegistryInfo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitlabNugetRegistryInfo.mjs","sources":["../../src/dotnet/GitlabNugetRegistryInfo.ts"],"sourcesContent":null,"names":[],"mappings":";;;;AAIA;AACO,MAAM,uBAAuB,SAAS,iBAAiB,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,aAAa,GAAG;AAC7B,IAAI,OAAO,cAAc,CAAC,eAAe,CAAC,IAAI,2BAA2B;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,SAAS,GAAG;AACzB,IAAI,OAAO,cAAc,CAAC,eAAe,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,OAAO,GAAG;AACvB,IAAI,OAAO,cAAc,CAAC,yBAAyB,CAAC;AACpD;AACA,EAAE,OAAO,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;;AAEhG;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,IAAI,EAAE;AACpB,IAAI,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;AACxC,IAAI,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM;AAC3D,IAAI,KAAK,CAAC,OAAO,CAAC;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,UAAU,GAAG;AAC1B,IAAI,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,GAAG,IAAI,KAAK,CAAC,0IAA0I,CAAC;AAChQ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,QAAQ,GAAG;AACxB,IAAI,OAAO,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,GAAG,IAAI,KAAK,CAAC,6EAA6E,CAAC;AAC/L;AACA;AACA,MAAM,KAAK,GAAG,uBAAuB;;AAErC;AACA;AACA;AACY,MAAC,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;AACvC,EAAE,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,yBAAyB,CAAC;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI;AACrF,IAAI,QAAQ,MAAM;AAClB,MAAM,KAAK,OAAO;AAClB,QAAQ;AACR,UAAU,OAAO,KAAK,CAAC,QAAQ;AAC/B;AACA,MAAM,KAAK,SAAS;AACpB,QAAQ;AACR,UAAU,OAAO,KAAK,CAAC,UAAU;AACjC;AACA,MAAM;AACN,QAAQ;AACR,UAAU,OAAO,MAAM;AACvB;AACA;AACA,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,UAAU;AACnC,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNextVersionAlreadyPublished.cli.d.ts","sourceRoot":"","sources":["../../src/dotnet/IsNextVersionAlreadyPublished.cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getGithubOutput, NugetRegistryInfo } from './NugetRegistryInfo.mjs';
|
|
2
|
+
const args = process.argv.slice(2);
|
|
3
|
+
|
|
4
|
+
// Parse command-line arguments - https://stackoverflow.com/a/76298476/14894786
|
|
5
|
+
const options = {};
|
|
6
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
7
|
+
const argName = args[i];
|
|
8
|
+
const argValue = args[i + 1];
|
|
9
|
+
if (argValue !== undefined && argName?.startsWith('--') === true && options[argName.slice(2)] !== undefined) {
|
|
10
|
+
options[argName.slice(2)] = argValue;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (typeof options.packageId !== 'string') throw new Error('packageId must be a string');
|
|
14
|
+
if (typeof options.source !== 'string') throw new Error('source must be a string');
|
|
15
|
+
const packageId = options.packageId,
|
|
16
|
+
source = options.source,
|
|
17
|
+
versionPattern = new RegExp(/\d+\.\d+\.\d+([-+].+)?/);
|
|
18
|
+
const ghOutput = (await getGithubOutput()) ?? {};
|
|
19
|
+
const matches = versionPattern.exec(ghOutput['new-release-version'] ?? '');
|
|
20
|
+
if (matches === null || matches.length === 0) throw new Error('The variable new-release-version is not present in the GITHUB_OUTPUT env file or its value contains invalid characters.');
|
|
21
|
+
const nextVersion = matches[0];
|
|
22
|
+
const isPublished = await NugetRegistryInfo.IsNextVersionAlreadyPublished(source, packageId, nextVersion);
|
|
23
|
+
if (typeof isPublished !== 'boolean') throw new Error('isPublished is not a boolean');
|
|
24
|
+
if (isPublished) throw new Error(`${packageId}@${nextVersion} already exists at ${source}.`);
|
|
25
|
+
console.log(`OK: ${packageId}@${nextVersion} does NOT yet exist at ${source}. Yay.`);
|
|
26
|
+
//# sourceMappingURL=IsNextVersionAlreadyPublished.cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNextVersionAlreadyPublished.cli.mjs","sources":["../../src/dotnet/IsNextVersionAlreadyPublished.cli.ts"],"sourcesContent":null,"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;AAElC;AACA,MAAM,OAAO,GAAG,EAAE;AAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AACzC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;AACzB,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AAC9B,EAAE,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;AAC/G,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ;AACxC;AACA;AACA,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;AACxF,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS;AACnC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM;AACzB,EAAE,cAAc,GAAG,IAAI,MAAM,CAAC,wBAAwB,CAAC;AACvD,MAAM,QAAQ,GAAG,CAAC,MAAM,eAAe,EAAE,KAAK,EAAE;AAChD,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC1E,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,yHAAyH,CAAC;AACxL,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;AAC9B,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,6BAA6B,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC;AACzG,IAAI,OAAO,WAAW,KAAK,SAAS,EAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC;AACrF,IAAI,WAAW,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5F,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC"}
|