@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.
Files changed (152) hide show
  1. package/CHANGELOG.md +356 -101
  2. package/README.md +100 -87
  3. package/dotnet/.github/workflows/_unit_test.yml +6 -3
  4. package/dotnet/.github/workflows/ci.yml +2 -2
  5. package/dotnet/.github/workflows/dotnet-release.yml +31 -28
  6. package/dotnet/.github/workflows/sample-dotnet-build.yml +16 -11
  7. package/dotnet/ExecNupkgDeterministicator.README.md +20 -0
  8. package/dotnet/ExecNupkgDeterministicator.targets +173 -0
  9. package/dotnet/GitVersion.yml +3 -1
  10. package/dotnet/GitVersion6.0.yml +3 -1
  11. package/dotnet/HCE.Shared.sln +34 -0
  12. package/dotnet/HCE.Shared.targets +1 -0
  13. package/dotnet/PublishAll.targets +2 -0
  14. package/dotnet/SignAfterPack.targets +104 -0
  15. package/dotnet/samples/HCE.Shared.DeterministicNupkg/Dummy.cs +6 -0
  16. package/dotnet/samples/HCE.Shared.DeterministicNupkg/HCE.Shared.DeterministicNupkg.csproj +21 -0
  17. package/dotnet/samples/HCE.Shared.SignAfterPack/Class1.cs +6 -0
  18. package/dotnet/samples/HCE.Shared.SignAfterPack/HCE.Shared.SignAfterPack.csproj +21 -0
  19. package/dotnet/samples/HCE.Shared.SignAfterPack/sampleCert.samplepfx +0 -0
  20. package/dotnet/samples/README.md +7 -0
  21. package/package.json +72 -73
  22. package/src/CaseInsensitiveMap.ts +34 -0
  23. package/src/commitlintConfig.ts +17 -9
  24. package/src/debug.ts +3 -3
  25. package/src/dotnet/GithubNugetRegistryInfo.ts +60 -0
  26. package/src/dotnet/GitlabNugetRegistryInfo.ts +112 -0
  27. package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +44 -0
  28. package/src/dotnet/MSBuildProject.ts +557 -76
  29. package/src/dotnet/MSBuildProjectProperties.ts +280 -15
  30. package/src/dotnet/NugetProjectProperties.ts +608 -0
  31. package/src/dotnet/NugetRegistryInfo.ts +939 -0
  32. package/src/dotnet/helpers.ts +448 -0
  33. package/src/eslintConfig.ts +174 -71
  34. package/src/index.ts +1 -3
  35. package/src/semantic-release__commit-analyzer.d.ts +44 -38
  36. package/src/semantic-release__exec.d.ts +15 -0
  37. package/src/semantic-release__git.d.ts +85 -88
  38. package/src/semantic-release__github.d.ts +139 -139
  39. package/src/semanticReleaseConfig.ts +106 -47
  40. package/src/semanticReleaseConfigDotnet.ts +394 -104
  41. package/src/setupGitPluginSpec.ts +149 -57
  42. package/src/tsconfig.json +8 -8
  43. package/src/utils/Exact.ts +49 -0
  44. package/src/utils/GracefulRecursion.d.ts +12 -0
  45. package/src/utils/env.ts +44 -0
  46. package/src/utils/execAsync.ts +77 -0
  47. package/src/utils/miscTypes.ts +17 -0
  48. package/src/utils/reflection/FunctionLike.d.ts +17 -0
  49. package/src/utils/reflection/GetterDescriptor.d.ts +8 -0
  50. package/src/utils/reflection/InstancePropertyDescriptorMap.d.ts +32 -0
  51. package/src/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.ts +20 -0
  52. package/src/utils/reflection/OwnGetterDescriptorMap.d.ts +17 -0
  53. package/src/utils/reflection/OwnKeyOf.d.ts +20 -0
  54. package/src/utils/reflection/OwnPropertyDescriptorMap.d.ts +82 -0
  55. package/src/utils/reflection/PropertyDescriptorMap.d.ts +15 -0
  56. package/src/utils/reflection/filterForGetters.ts +59 -0
  57. package/src/utils/reflection/getOwnPropertyDescriptors.ts +52 -0
  58. package/src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts +127 -0
  59. package/src/utils/reflection/getPrototypeChainOf.ts +85 -0
  60. package/src/utils/reflection/getPrototypeOf.ts +12 -0
  61. package/src/utils/reflection/inheritance.ts +262 -0
  62. package/src/utils/reflection/isConstructor.ts +74 -0
  63. package/src/utils/reflection/isGetterDescriptor.ts +11 -0
  64. package/src/utils/reflection/listOwnGetters.ts +80 -0
  65. package/src/utils/reflection.ts +18 -0
  66. package/cjs/commitlintConfig-wrapper.mjs +0 -6
  67. package/cjs/commitlintConfig.cjs +0 -14
  68. package/cjs/commitlintConfig.cjs.map +0 -1
  69. package/cjs/commitlintConfig.d.ts +0 -4
  70. package/cjs/commitlintConfig.d.ts.map +0 -1
  71. package/cjs/debug.cjs +0 -13
  72. package/cjs/debug.cjs.map +0 -1
  73. package/cjs/debug.d.ts +0 -4
  74. package/cjs/debug.d.ts.map +0 -1
  75. package/cjs/dotnet/MSBuildProject.cjs +0 -84
  76. package/cjs/dotnet/MSBuildProject.cjs.map +0 -1
  77. package/cjs/dotnet/MSBuildProject.d.ts +0 -42
  78. package/cjs/dotnet/MSBuildProject.d.ts.map +0 -1
  79. package/cjs/dotnet/MSBuildProjectProperties.cjs +0 -22
  80. package/cjs/dotnet/MSBuildProjectProperties.cjs.map +0 -1
  81. package/cjs/dotnet/MSBuildProjectProperties.d.ts +0 -13
  82. package/cjs/dotnet/MSBuildProjectProperties.d.ts.map +0 -1
  83. package/cjs/dotnet/createDummyNupkg.cjs +0 -26
  84. package/cjs/dotnet/createDummyNupkg.cjs.map +0 -1
  85. package/cjs/dotnet/createDummyNupkg.d.ts +0 -2
  86. package/cjs/dotnet/createDummyNupkg.d.ts.map +0 -1
  87. package/cjs/dotnet/dotnetGHPR.cjs +0 -173
  88. package/cjs/dotnet/dotnetGHPR.cjs.map +0 -1
  89. package/cjs/dotnet/dotnetGHPR.d.ts +0 -37
  90. package/cjs/dotnet/dotnetGHPR.d.ts.map +0 -1
  91. package/cjs/dotnet/dotnetGLPR.cjs +0 -41
  92. package/cjs/dotnet/dotnetGLPR.cjs.map +0 -1
  93. package/cjs/dotnet/dotnetGLPR.d.ts +0 -13
  94. package/cjs/dotnet/dotnetGLPR.d.ts.map +0 -1
  95. package/cjs/dotnet/dotnetHelpers.cjs +0 -141
  96. package/cjs/dotnet/dotnetHelpers.cjs.map +0 -1
  97. package/cjs/dotnet/dotnetHelpers.d.ts +0 -26
  98. package/cjs/dotnet/dotnetHelpers.d.ts.map +0 -1
  99. package/cjs/dotnet-wrapper.mjs +0 -6
  100. package/cjs/dotnet.cjs +0 -15
  101. package/cjs/dotnet.cjs.map +0 -1
  102. package/cjs/dotnet.d.ts +0 -7
  103. package/cjs/dotnet.d.ts.map +0 -1
  104. package/cjs/envUtils-wrapper.mjs +0 -6
  105. package/cjs/envUtils.cjs +0 -37
  106. package/cjs/envUtils.cjs.map +0 -1
  107. package/cjs/envUtils.d.ts +0 -15
  108. package/cjs/envUtils.d.ts.map +0 -1
  109. package/cjs/eslintConfig-wrapper.mjs +0 -6
  110. package/cjs/eslintConfig.cjs +0 -52
  111. package/cjs/eslintConfig.cjs.map +0 -1
  112. package/cjs/eslintConfig.d.ts +0 -3
  113. package/cjs/eslintConfig.d.ts.map +0 -1
  114. package/cjs/findStaticConfig-wrapper.mjs +0 -6
  115. package/cjs/findStaticConfig.cjs +0 -34
  116. package/cjs/findStaticConfig.cjs.map +0 -1
  117. package/cjs/findStaticConfig.d.ts +0 -2
  118. package/cjs/findStaticConfig.d.ts.map +0 -1
  119. package/cjs/index-wrapper.mjs +0 -6
  120. package/cjs/index.cjs +0 -10
  121. package/cjs/index.cjs.map +0 -1
  122. package/cjs/index.d.ts +0 -5
  123. package/cjs/index.d.ts.map +0 -1
  124. package/cjs/semantic-release__commit-analyzer.d.cjs +0 -2
  125. package/cjs/semantic-release__commit-analyzer.d.cjs.map +0 -1
  126. package/cjs/semantic-release__git.d.cjs +0 -2
  127. package/cjs/semantic-release__git.d.cjs.map +0 -1
  128. package/cjs/semantic-release__github.d.cjs +0 -2
  129. package/cjs/semantic-release__github.d.cjs.map +0 -1
  130. package/cjs/semanticReleaseConfig-wrapper.mjs +0 -6
  131. package/cjs/semanticReleaseConfig.cjs +0 -33
  132. package/cjs/semanticReleaseConfig.cjs.map +0 -1
  133. package/cjs/semanticReleaseConfig.d.ts +0 -4
  134. package/cjs/semanticReleaseConfig.d.ts.map +0 -1
  135. package/cjs/semanticReleaseConfigDotnet-wrapper.mjs +0 -7
  136. package/cjs/semanticReleaseConfigDotnet.cjs +0 -112
  137. package/cjs/semanticReleaseConfigDotnet.cjs.map +0 -1
  138. package/cjs/semanticReleaseConfigDotnet.d.ts +0 -51
  139. package/cjs/semanticReleaseConfigDotnet.d.ts.map +0 -1
  140. package/cjs/setupGitPluginSpec-wrapper.mjs +0 -6
  141. package/cjs/setupGitPluginSpec.cjs +0 -67
  142. package/cjs/setupGitPluginSpec.cjs.map +0 -1
  143. package/cjs/setupGitPluginSpec.d.ts +0 -19
  144. package/cjs/setupGitPluginSpec.d.ts.map +0 -1
  145. package/src/dotnet/createDummyNupkg.ts +0 -30
  146. package/src/dotnet/dotnetGHPR.ts +0 -232
  147. package/src/dotnet/dotnetGLPR.ts +0 -46
  148. package/src/dotnet/dotnetHelpers.ts +0 -184
  149. package/src/dotnet.ts +0 -6
  150. package/src/envUtils.ts +0 -36
  151. package/src/findStaticConfig.ts +0 -31
  152. package/static/.releaserc.yml +0 -35
@@ -0,0 +1,608 @@
1
+ import { type } from 'arktype';
2
+ import { CaseInsensitiveMap } from '../CaseInsensitiveMap.js';
3
+ import {
4
+ tBooleanString,
5
+ tEmptyOrBooleanString,
6
+ type BooleanString,
7
+ type EmptyOrBooleanString,
8
+ } from '../utils/miscTypes.js';
9
+ import {
10
+ getPrototypesChainOf,
11
+ listOwnGetters,
12
+ type ClassLike,
13
+ type ProtoChainOfClass,
14
+ type WithProto,
15
+ } from '../utils/reflection.js';
16
+ import { MSBuildProjectProperties, type Class_MSBPP } from './MSBuildProjectProperties.js';
17
+
18
+ const Type_RepositoryType = type('""|"git"|"tfs"');
19
+ const Type_SymbolPackageFormat = type('"symbols.nupkg" | "snupkg"');
20
+
21
+ /**
22
+ * A readonly record of a .csproj or .fsproj with NuGet configuration properties in
23
+ * addition to those specified by {@link MSBuildProjectProperties}. This record
24
+ * should be considered immutable. A new instance should be constructed from MSBuild's evaluation output.
25
+ * @see https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target-inputs
26
+ */
27
+ export class NugetProjectProperties extends MSBuildProjectProperties {
28
+ // #region private
29
+ private _isPackable: BooleanString | undefined;
30
+ private _suppressDependenciesWhenPacking: BooleanString | undefined;
31
+ private _packageVersion: string | undefined;
32
+ private _packageId: string | undefined;
33
+ private _packageDescription: string | undefined;
34
+ private _authors: string | undefined;
35
+ private _copyright: string | undefined;
36
+ private _packageRequireLicenseAcceptance: BooleanString | undefined;
37
+ private _developmentDependency: EmptyOrBooleanString | undefined;
38
+ private _packageLicenseExpression: string | undefined;
39
+ private _packageLicenseFile: string | undefined;
40
+ private _packageProjectUrl: string | undefined;
41
+ private _packageIcon: string | undefined;
42
+ private _packageReleaseNotes: string | undefined;
43
+ private _packageReadmeFile: string | undefined;
44
+ private _packageTags: string | undefined;
45
+ private _packageOutputPath: string | undefined;
46
+ private _includeSymbols: EmptyOrBooleanString | undefined;
47
+ private _includeSource: EmptyOrBooleanString | undefined;
48
+ private _packageType: string | undefined;
49
+ private _isTool: EmptyOrBooleanString | undefined;
50
+ private _repositoryUrl: string | undefined;
51
+ private _repositoryType: '' | 'git' | 'tfs' | undefined;
52
+ private _repositoryCommit: string | undefined;
53
+ private _symbolPackageFormat: 'symbols.nupkg' | 'snupkg' | undefined;
54
+ private _noPackageAnalysis: EmptyOrBooleanString | undefined;
55
+ private _minClientVersion: string | undefined;
56
+ private _includeBuiltOutput: BooleanString | undefined;
57
+ private _includeContentInPack: BooleanString | undefined;
58
+ private _buildOutputTargetFolder: string | undefined;
59
+ private _contentTargetFolders: string | undefined;
60
+ private _nuspecFile: string | undefined;
61
+ private _nuspecBasePath: string | undefined;
62
+ private _nuspecProperties: string | undefined;
63
+ private _title: string | undefined;
64
+ private _company: string | undefined;
65
+ private _product: string | undefined;
66
+ // #endregion private
67
+
68
+ /**
69
+ * Initialize a readonly record of an MSBuild project's properties, including those related to NuGet.
70
+ * @param msbuildProjectFullPath @inheritdoc {@link NugetProjectProperties.MSBuildProjectFullPath}
71
+ * @param properties The dictionary returned by MSBuild's `-getProperty:propname,...` argument
72
+ */
73
+ constructor(
74
+ msbuildProjectFullPath: string,
75
+ properties: CaseInsensitiveMap<string, string>,
76
+ ) {
77
+ /**
78
+ * names of properties to consume in this constructor instead of its super.
79
+ * These are the names of getters, lowercased.
80
+ */
81
+ const keysToMoveOut = NPPGetterNames.InstanceGetters;
82
+ /** Entries to remove from {@link properties} and apply to `this` after calling `super` */
83
+ const consumables = new CaseInsensitiveMap<string, string>();
84
+ // move property by key from `properties` to `consumables`. The types of keys and values in `properties` do not matter here.
85
+ for (const key of keysToMoveOut) {
86
+ const value = NugetProjectProperties.getAndForget(properties, key);
87
+ if (value !== undefined)
88
+ consumables.set(key, value);
89
+ }
90
+
91
+ // Pass the remainder to super
92
+ super(msbuildProjectFullPath, properties);
93
+
94
+ /** convert values to strings */
95
+ for (const [value, key] of consumables.entries()) {
96
+ if (typeof value !== 'string')
97
+ consumables.set(key, String(value));
98
+ }
99
+
100
+ const _getAndForget = (key: string) => NugetProjectProperties.getAndForget(consumables, key);
101
+ let data;
102
+ this._authors = _getAndForget('Authors');
103
+ this._buildOutputTargetFolder = _getAndForget('BuildOutputTargetFolder');
104
+ this._company = _getAndForget('Company');
105
+ this._contentTargetFolders = _getAndForget('ContentTargetFolders');
106
+ this._copyright = _getAndForget('Copyright');
107
+ if (tEmptyOrBooleanString.allows(data = _getAndForget('DevelopmentDependency')))
108
+ this._developmentDependency = data;
109
+ if (tBooleanString.allows(data = _getAndForget('IncludeBuiltOutput')))
110
+ this._includeBuiltOutput = data;
111
+ if (tBooleanString.allows(data = _getAndForget('IncludeContentInPack')))
112
+ this._includeContentInPack = data;
113
+ if (tEmptyOrBooleanString.allows(data = _getAndForget('IncludeSource')))
114
+ this._includeSource = data;
115
+ if (tEmptyOrBooleanString.allows(data = _getAndForget('IncludeSymbols')))
116
+ this._includeSymbols = data;
117
+ if (tBooleanString.allows(data = _getAndForget('IsPackable')))
118
+ this._isPackable = data;
119
+ if (tEmptyOrBooleanString.allows(data = _getAndForget('IsTool')))
120
+ this._isTool = data;
121
+ this._minClientVersion = _getAndForget('MinClientVersion');
122
+ if (tEmptyOrBooleanString.allows(data = _getAndForget('NoPackageAnalysis')))
123
+ this._noPackageAnalysis = data;
124
+ this._nuspecBasePath = _getAndForget('NuspecBasePath');
125
+ this._nuspecFile = _getAndForget('NuspecFile');
126
+ this._nuspecProperties = _getAndForget('NuspecProperties');
127
+ this._packageDescription = _getAndForget('PackageDescription');
128
+ this._packageIcon = _getAndForget('PackageIcon');
129
+ this._packageId = _getAndForget('PackageId');
130
+ this._packageLicenseExpression = _getAndForget('PackageLicenseExpression');
131
+ this._packageLicenseFile = _getAndForget('PackageLicenseFile');
132
+ this._packageOutputPath = _getAndForget('PackageOutputPath');
133
+ this._packageProjectUrl = _getAndForget('PackageProjectUrl');
134
+ this._packageReadmeFile = _getAndForget('PackageReadmeFile');
135
+ this._packageReleaseNotes = _getAndForget('PackageReleaseNotes');
136
+ if (tBooleanString.allows(data = _getAndForget('PackageRequireLicenseAcceptance')))
137
+ this._packageRequireLicenseAcceptance = data;
138
+ this._packageTags = _getAndForget('PackageTags');
139
+ this._packageType = _getAndForget('PackageType');
140
+ this._packageVersion = _getAndForget('PackageVersion');
141
+ this._product = _getAndForget('Product');
142
+ this._repositoryCommit = _getAndForget('RepositoryCommit');
143
+ if (Type_RepositoryType.allows(data = _getAndForget('RepositoryType')))
144
+ this._repositoryType = data;
145
+ this._repositoryUrl = _getAndForget('RepositoryUrl');
146
+ if (tBooleanString.allows(data = _getAndForget('SuppressDependenciesWhenPacking')))
147
+ this._suppressDependenciesWhenPacking = data;
148
+ if (Type_SymbolPackageFormat.allows(data = _getAndForget('SymbolPackageFormat')))
149
+ this._symbolPackageFormat = data;
150
+ this._title = _getAndForget('Title');
151
+ }
152
+
153
+ /**
154
+ * @returns A string-formatted boolean. If 'false', the project's `Pack`
155
+ * Target (if available) will no-op.
156
+ *
157
+ * Default: `"true"`
158
+ */
159
+ get IsPackable(): BooleanString {
160
+ return this._isPackable ??= 'true';
161
+ }
162
+
163
+ /**
164
+ * @returns `"true"` or `"false"`. If "true", the package's dependencies are
165
+ * excluded from the generated NuGet package.
166
+ *
167
+ * Default: `"false"`
168
+ */
169
+ get SuppressDependenciesWhenPacking(): BooleanString {
170
+ return this._suppressDependenciesWhenPacking ??= 'false';
171
+ }
172
+
173
+ /**
174
+ * @returns A semver-compatible version number in the form
175
+ * Major.Minor.Patch[-Suffix], where -Suffix identifies prerelease versions.
176
+ *
177
+ * Default: {@link Version}
178
+ * @example "1.0.0", "1.0.0-beta", "1.0.0-beta-00345"
179
+ */
180
+ get PackageVersion(): string {
181
+ return this._packageVersion ??= this.Version;
182
+ }
183
+
184
+ /**
185
+ * @returns The ID of the resulting NuGet package.
186
+ *
187
+ * Default: {@link AssemblyName}
188
+ */
189
+ get PackageId(): string {
190
+ return this._packageId ??= this.AssemblyName;
191
+ }
192
+
193
+ /**
194
+ * @returns A long description of the package for UI display.
195
+ *
196
+ * Default: {@link Description}
197
+ */
198
+ get PackageDescription(): string {
199
+ return this._packageDescription ??= this.Description;
200
+ }
201
+
202
+ /**
203
+ * @returns A semicolon-separated list of the package's authors, matching the
204
+ * profile names on nuget.org. These are displayed in the NuGet Gallery on
205
+ * nuget.org and are used to cross-reference packages by the same authors.
206
+ *
207
+ * Default: {@link AssemblyName `AssemblyName`}
208
+ */
209
+ get Authors(): string {
210
+ return this._authors ??= this.AssemblyName;
211
+ }
212
+
213
+ /**
214
+ * @returns Copyright details for the package.
215
+ *
216
+ * Default: `''`
217
+ */
218
+ get Copyright(): string {
219
+ return this._copyright ??= '';
220
+ }
221
+
222
+ /**
223
+ * @returns A string-formatted boolean. If `"true"`, the client must prompt the
224
+ * consumer to accept the package license before installing the package.
225
+ *
226
+ * Default: `"false"`
227
+ */
228
+ get PackageRequireLicenseAcceptance(): BooleanString {
229
+ return this._packageRequireLicenseAcceptance ??= 'false';
230
+ }
231
+
232
+ /**
233
+ * This boolean only affects the package created from the project.
234
+ * @see
235
+ * {@link https://github.com/NuGet/Home/wiki/DevelopmentDependency-support-for-PackageReference DevelopmentDependency support for PackageReference}
236
+ * @returns A string-formatted boolean. If `"true"`, the package is marked as
237
+ * a development-only dependency and is prevented from being included as a
238
+ * dependency in other packages. With PackageReference (NuGet 4.8+), this flag
239
+ * also means that compile-time assets are excluded from compilation.
240
+ *
241
+ * Default: `''` (`false`-y)
242
+ */
243
+ get DevelopmentDependency(): EmptyOrBooleanString {
244
+ return this._developmentDependency ??= '';
245
+ }
246
+
247
+ /**
248
+ * @returns The {@link https://spdx.org/licenses/ SPDX license identifier} or
249
+ * expression.
250
+ *
251
+ * Default: `''`
252
+ * @see
253
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file Packing a license expression or a license file}
254
+ * @example "Apache-2.0"
255
+ */
256
+ get PackageLicenseExpression(): string {
257
+ return this._packageLicenseExpression ??= '';
258
+ }
259
+
260
+ /**
261
+ * @returns The path to a license file within the package if you're using a
262
+ * custom license or a license that hasn't been assigned an SPDX identifier.
263
+ *
264
+ * Default: `''`
265
+ */
266
+ get PackageLicenseFile(): string {
267
+ return this._packageLicenseFile ??= '';
268
+ }
269
+
270
+ /**
271
+ * @returns The package's project URL.
272
+ *
273
+ * Default: `''`
274
+ */
275
+ get PackageProjectUrl(): string {
276
+ return this._packageProjectUrl ??= '';
277
+ }
278
+
279
+ /**
280
+ * @returns The package icon path, relative to the root of the package.
281
+ *
282
+ * Default: `''`
283
+ * @description You must pack the referenced icon image file. By default, it
284
+ * is not packed.
285
+ * @see
286
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-an-icon-image-file Packing an icon image file},
287
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec#icon icon metadata}
288
+ */
289
+ get PackageIcon(): string {
290
+ return this._packageIcon ??= '';
291
+ }
292
+
293
+ /**
294
+ * @returns Release notes for the package.
295
+ *
296
+ * Default: `''`
297
+ */
298
+ get PackageReleaseNotes(): string {
299
+ return this._packageReleaseNotes ??= '';
300
+ }
301
+
302
+ /**
303
+ * @returns The path of the package's README file relative to the package's
304
+ * root.
305
+ *
306
+ * Default: `''`
307
+ * @description You must pack the referenced readme file. By default, it is
308
+ * not packed.
309
+ */
310
+ get PackageReadmeFile(): string {
311
+ return this._packageReadmeFile ??= '';
312
+ }
313
+
314
+ /**
315
+ * @returns A semicolon-delimited list of tags that designates the package.
316
+ *
317
+ * Default : `''`
318
+ */
319
+ get PackageTags(): string {
320
+ return this._packageTags ??= '';
321
+ }
322
+
323
+ /**
324
+ * @returns A relative or absolute path determining the where the packed
325
+ * package will be dropped.
326
+ *
327
+ * Default: {@link OutputPath}
328
+ */
329
+ get PackageOutputPath(): string {
330
+ return this._packageOutputPath ??= this.OutputPath;
331
+ }
332
+
333
+ /**
334
+ * @returns A string-formatted boolean indicating whether the package should
335
+ * create an additional symbols package when the project is packed. The
336
+ * symbols package's format is controlled by the `SymbolPackageFormat`
337
+ * property.
338
+ *
339
+ * Default: `''` (false-y)
340
+ * @description When using `MSBuild -t:pack -p:IncludeSymbols=true`, the
341
+ * corresponding .pdb files are copied along with other output files (.dll,
342
+ * .exe, .winmd, .xml, .json, .pri). Note that setting `IncludeSymbols=true`
343
+ * creates a regular package and a symbols package.
344
+ * @see
345
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#includesymbols IncludeSymbols}
346
+ */
347
+ get IncludeSymbols(): EmptyOrBooleanString {
348
+ return this._includeSymbols ??= '';
349
+ }
350
+
351
+ /**
352
+ * @returns A string-formatted boolean indicating whether the pack process
353
+ * should create a source package. The source package contains the library's
354
+ * source code as well as PDB files. Source files are put under the
355
+ * `src/ProjectName` directory in the resulting package file.
356
+ *
357
+ * Default: `''` (false-y)
358
+ * @see
359
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#includesource IncludeSource}
360
+ */
361
+ get IncludeSource(): EmptyOrBooleanString {
362
+ return this._includeSource ??= '';
363
+ }
364
+
365
+ /**
366
+ * @returns A semicolon-separated list of tags indicating the package's
367
+ * intended use. Custom types are allowed, but cannot be installed via Visual
368
+ * Studio nor nuget.exe. See https://github.com/NuGet/Home/issues/10468.
369
+ *
370
+ * Package types can be version e.g. `PackageType1, 1.0.0.0;PackageType2`
371
+ *
372
+ * Default: `''`
373
+ * @example "Dependency ", "DotnetTool", "MSBuildSdk", "Template"
374
+ * @see {@link https://learn.microsoft.com/en-us/nuget/create-packages/set-package-type?tabs=dotnet Set a NuGet package type}
375
+ */
376
+ get PackageType(): string {
377
+ return this._packageType ??= '';
378
+ }
379
+
380
+ /**
381
+ * @returns A string-formatted boolean specifying whether all output files are
382
+ * copied to the *tools* folder instead of the *lib* folder.
383
+ *
384
+ * Default: `''` (false-y)
385
+ * @see
386
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#istool IsTool}
387
+ */
388
+ get IsTool(): EmptyOrBooleanString {
389
+ return this._isTool ??= '';
390
+ }
391
+
392
+ /**
393
+ * @returns The repository URL used to clone or retrieve source code.
394
+ *
395
+ * Default: `''`
396
+ * @example "https://github.com/NuGet/NuGet.Client.git".
397
+ */
398
+ get RepositoryUrl(): string {
399
+ return this._repositoryUrl ??= '';
400
+ }
401
+
402
+ /**
403
+ * @returns The repository type.
404
+ *
405
+ * Default: `''`
406
+ * @example "git", "fts"
407
+ */
408
+ get RepositoryType(): typeof Type_RepositoryType.inferOut {
409
+ return this._repositoryType ??= '';
410
+ }
411
+
412
+ /**
413
+ * @returns The (optional) repository commit or changeset to indicate which
414
+ * source the package was built against. {@link RepositoryUrl} must also be
415
+ * specified for this property to be included.
416
+ *
417
+ * Default: `''`
418
+ * @description This is evaluated only during the "Pack" and "Publish"
419
+ * Targets. If using nuget.exe or Visual Studio, NuGet 4.7.0 or later is
420
+ * required.
421
+ * @example "0e4d1b598f350b3dc675018d539114d1328189ef"
422
+ */
423
+ get RepositoryCommit(): string {
424
+ return this._repositoryCommit ??= '';
425
+ }
426
+
427
+ /**
428
+ * @returns A string specifying the format of the symbols package. If
429
+ * "symbols.nupkg", a legacy symbols package is created with a .symbols.nupkg
430
+ * extension containing PDBs, DLLs, and other output files. If "snupkg", a
431
+ * snupkg symbol package is created containing the portable PDBs. The default
432
+ * is "symbols.nupkg".
433
+ *
434
+ * Default: "symbols.nupkg"
435
+ * @example "symbols.nupkg", "snupkg"
436
+ */
437
+ get SymbolPackageFormat(): typeof Type_SymbolPackageFormat.inferOut {
438
+ return this._symbolPackageFormat ??= 'symbols.nupkg';
439
+ }
440
+
441
+ /**
442
+ * @returns A string-formatted boolean specifying that `pack` should not run
443
+ * package analysis after building the package.
444
+ *
445
+ * Default: `''` (false-y)
446
+ */
447
+ get NoPackageAnalysis(): EmptyOrBooleanString {
448
+ return this._noPackageAnalysis ??= '';
449
+ }
450
+
451
+ /**
452
+ * @returns A string specifying the minimum version of the NuGet client that
453
+ * can install this package, enforced by nuget.exe and the Visual Studio
454
+ * Package Manager.
455
+ *
456
+ * Default: `''`
457
+ */
458
+ get MinClientVersion(): string {
459
+ return this._minClientVersion ??= '';
460
+ }
461
+
462
+ /**
463
+ * @returns A string-formatted boolean value specifying whether the build
464
+ * output assemblies should be packed into the .nupkg file or not.
465
+ *
466
+ * Default: `"true"`
467
+ */
468
+ get IncludeBuildOutput(): BooleanString {
469
+ return this._includeBuiltOutput ??= 'true';
470
+ }
471
+
472
+ /**
473
+ * @returns A string-formatted boolean specifying whether any items that have
474
+ * a type of Content are included in the resulting package automatically.
475
+ *
476
+ * Default: `"true"`
477
+ */
478
+ get IncludeContentInPack(): BooleanString {
479
+ return this._includeContentInPack ??= 'true';
480
+ }
481
+
482
+ /**
483
+ * @returns The output directory of the output assemblies relative to the root
484
+ * of the package. The output assemblies (and other output files) are copied
485
+ * into their respective framework folders.
486
+ *
487
+ * Default: `''`
488
+ * @see
489
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#output-assemblies Output assemblies}
490
+ */
491
+ get BuildOutputTargetFolder(): string {
492
+ return this._buildOutputTargetFolder ??= '';
493
+ }
494
+
495
+ /**
496
+ * @returns A semicolon-separated list of default locations of where all the
497
+ * content files should go if `PackagePath` is not specified for them.
498
+ *
499
+ * Default: `"content;contentFiles"`
500
+ * @see
501
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#including-content-in-a-package Including content in a package}
502
+ */
503
+ get ContentTargetFolders(): string {
504
+ return this._contentTargetFolders ??= 'content;contentFiles';
505
+ }
506
+
507
+ /**
508
+ * @returns The relative or absolute path to the `*.nuspec` file being used
509
+ * for packing. If specified, it's used **exclusively** for packaging
510
+ * information, and any information in the projects is not used.
511
+ *
512
+ * Default: `''`
513
+ * @see
514
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec-file Packing using a .nuspec}
515
+ */
516
+ get NuspecFile(): string {
517
+ return this._nuspecFile ??= '';
518
+ }
519
+
520
+ /**
521
+ * @returns The base path for the *.nuspec* file.
522
+ *
523
+ * Default: `''`
524
+ * @see
525
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec-file Packing using a .nuspec}
526
+ */
527
+ get NuspecBasePath(): string {
528
+ return this._nuspecBasePath ??= '';
529
+ }
530
+
531
+ /**
532
+ * @returns A semicolon-separated list of key=value pairs.
533
+ *
534
+ * Default: `''`
535
+ * @see
536
+ * {@link https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec-file Packing using a .nuspec}
537
+ */
538
+ get NuspecProperties(): string {
539
+ return this._nuspecProperties ??= '';
540
+ }
541
+
542
+ /**
543
+ * @returns A human-friendly title of the package, typically used in UI displays as
544
+ * on nuget.org and the Package Manager in Visual Studio.
545
+ * Default: {@link PackageId}
546
+ */
547
+ get Title(): string {
548
+ return this._title ??= this.PackageId;
549
+ }
550
+
551
+ /**
552
+ * @returns Company name or information.
553
+ *
554
+ * Default: {@link Authors}
555
+ */
556
+ get Company(): string {
557
+ return this._company ??= this.Authors;
558
+ }
559
+
560
+ /**
561
+ * @returns Product name or information.
562
+ *
563
+ * Default: {@link AssemblyName}
564
+ */
565
+ get Product(): string {
566
+ return this._product ??= this.AssemblyName;
567
+ }
568
+ }
569
+
570
+ export type Class_NPP = ClassLike<
571
+ typeof NugetProjectProperties
572
+ & WithProto<Class_MSBPP>
573
+ >;
574
+
575
+ // eslint-disable-next-line @typescript-eslint/no-extraneous-class
576
+ export class NPPGetterNames {
577
+ private static _prototypeChain: ProtoChainOfClass<Class_NPP> | undefined;
578
+ private static get PrototypeChain(): [Class_NPP, Class_MSBPP] {
579
+ return this._prototypeChain ??= getPrototypesChainOf(NugetProjectProperties as Class_NPP, 'classes');
580
+ }
581
+
582
+ private static _instanceGetters: Exclude<keyof NugetProjectProperties, keyof MSBuildProjectProperties>[] | undefined;
583
+ private static _instanceGettersRecursive: (keyof NugetProjectProperties)[] | undefined;
584
+ private static _StaticGetters: never[] | undefined;
585
+ private static _StaticGettersRecursive: (keyof typeof NugetProjectProperties)[] | undefined;
586
+
587
+ public static get InstanceGetters(): Exclude<keyof NugetProjectProperties, keyof MSBuildProjectProperties>[] {
588
+ return this._instanceGetters ??= listOwnGetters(NugetProjectProperties as Class_NPP, 'Instance');
589
+ }
590
+
591
+ public static get InstanceGettersRecursive(): (keyof NugetProjectProperties)[] {
592
+ return this._instanceGettersRecursive ??= this.PrototypeChain.flatMap(
593
+ proto => listOwnGetters<typeof proto, 'Instance'>(proto, 'Instance'),
594
+ );
595
+ }
596
+
597
+ public static get StaticGetters(): never[] {
598
+ return this._StaticGetters ??= listOwnGetters(NugetProjectProperties as Class_NPP, 'Static');
599
+ };
600
+
601
+ public static get StaticGettersRecursive(): ('prototype' | 'GetFullPath')[] {
602
+ return this._StaticGettersRecursive ??= this.PrototypeChain.flatMap(
603
+ proto => listOwnGetters(proto, 'Static'),
604
+ );
605
+ }
606
+ }
607
+
608
+ /** @module NugetProjectProperties */