@halospv3/hce.shared-config 3.0.0-develop.2 → 3.0.0-develop.21
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 +164 -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/dotnet/PublishAll.targets +3 -2
- package/dotnet/ZipPublishDir.targets +24 -29
- 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 +6 -0
- package/mjs/debug.d.ts.map +1 -0
- package/mjs/debug.mjs +9 -0
- package/mjs/debug.mjs.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts +38 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs +43 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +62 -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 +41 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProject.d.ts +256 -0
- package/mjs/dotnet/MSBuildProject.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProject.mjs +447 -0
- package/mjs/dotnet/MSBuildProject.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts +170 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs +260 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -0
- package/mjs/dotnet/NugetProjectProperties.d.ts +379 -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 +384 -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 +63 -0
- package/mjs/dotnet/helpers.d.ts.map +1 -0
- package/mjs/dotnet/helpers.mjs +354 -0
- package/mjs/dotnet/helpers.mjs.map +1 -0
- package/mjs/dotnet/index.d.ts +9 -0
- package/mjs/dotnet/index.d.ts.map +1 -0
- package/mjs/dotnet/index.mjs +9 -0
- package/mjs/dotnet/index.mjs.map +1 -0
- package/mjs/dotnet.d.ts +2 -0
- package/mjs/dotnet.d.ts.map +1 -0
- package/mjs/dotnet.mjs +9 -0
- package/mjs/dotnet.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 +97 -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 +268 -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 +37 -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 +13 -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 +17 -17
- package/src/debug.ts +5 -4
- package/src/dotnet/GithubNugetRegistryInfo.ts +17 -9
- package/src/dotnet/GitlabNugetRegistryInfo.ts +19 -5
- package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +53 -36
- package/src/dotnet/MSBuildProject.ts +150 -5
- package/src/dotnet/MSBuildProjectProperties.ts +2 -1
- package/src/dotnet/NugetProjectProperties.ts +3 -2
- package/src/dotnet/NugetRegistryInfo.ts +94 -8
- package/src/dotnet/helpers.ts +87 -53
- package/src/dotnet/index.ts +8 -0
- package/src/dotnet.ts +1 -0
- package/src/insertPlugins.ts +116 -0
- package/src/semantic-release__exec.d.ts +1 -1
- package/src/semanticReleaseConfig.ts +8 -3
- package/src/semanticReleaseConfigDotnet.ts +90 -88
- package/src/setupGitPluginSpec.ts +4 -1
- package/src/tsconfig.json +1 -1
- package/src/utils/execAsync.ts +13 -1
- package/src/utils/miscTypes.ts +4 -3
- package/src/utils/reflection/inheritance.ts +1 -1
- package/tsconfig.base.json +54 -0
- package/tsconfig.json +22 -0
- package/tsconfig.mjs.json +8 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
import { warn } from 'node:console';
|
|
3
|
+
import { realpath, stat, readdir } from 'node:fs/promises';
|
|
4
|
+
import node_path from 'node:path';
|
|
5
|
+
import { setTimeout } from 'node:timers/promises';
|
|
6
|
+
import { isNativeError } from 'node:util/types';
|
|
7
|
+
import { CaseInsensitiveMap } from '../CaseInsensitiveMap.mjs';
|
|
8
|
+
import { execAsync } from '../utils/execAsync.mjs';
|
|
9
|
+
import { MSBuildProjectProperties } from './MSBuildProjectProperties.mjs';
|
|
10
|
+
import { NugetProjectProperties, NPPGetterNames } from './NugetProjectProperties.mjs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* See [MSBuild well-known item metadata](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-well-known-item-metadata).
|
|
14
|
+
* Additional string-type properties may be present (e.g. `{ SubType: "designer" }`).
|
|
15
|
+
*/
|
|
16
|
+
const interface_ItemMetadataBuiltIn = type({
|
|
17
|
+
'[string]': 'string',
|
|
18
|
+
/** @example "c:\\source\\repos\\ConsoleApp1\\ConsoleApp1\\bin\\Debug\\net6.0\\ConsoleApp1.dll" */
|
|
19
|
+
Identity: 'string',
|
|
20
|
+
/** @example "Designer" */
|
|
21
|
+
'SubType?': 'string',
|
|
22
|
+
/** @example ".NETCoreApp" */
|
|
23
|
+
'TargetFrameworkIdentifier?': 'string',
|
|
24
|
+
'TargetPlatformMoniker?': 'string',
|
|
25
|
+
/** @example "c:\\source\\repos\\ConsoleApp1\\ConsoleApp1\\obj\\Debug\\net6.0\\ConsoleApp1.csproj.CopyComplete" */
|
|
26
|
+
'CopyUpToDateMarker?': 'string',
|
|
27
|
+
'TargetPlatformIdentifier?': 'string',
|
|
28
|
+
/** @example "6.0" */
|
|
29
|
+
'TargetFrameworkVersion?': 'string',
|
|
30
|
+
/** @example "c:\\source\\repos\\ConsoleApp1\\ConsoleApp1\\obj\\Debug\\net6.0\\ref\\ConsoleApp1.dll" */
|
|
31
|
+
'ReferenceAssembly?': 'string',
|
|
32
|
+
/** @example "c:\\source\\repos\\ConsoleApp1\\ConsoleApp1\\bin\\Debug\\net6.0\\ConsoleApp1.dll" */
|
|
33
|
+
FullPath: 'string',
|
|
34
|
+
/** @example "c:\\" */
|
|
35
|
+
RootDir: 'string',
|
|
36
|
+
/** @example "ConsoleApp1" */
|
|
37
|
+
Filename: 'string',
|
|
38
|
+
/** @example ".dll" */
|
|
39
|
+
Extension: 'string',
|
|
40
|
+
/** @example "c:\\source\\repos\\ConsoleApp1\\ConsoleApp1\\bin\\Debug\\net6.0\\" */
|
|
41
|
+
RelativeDir: 'string',
|
|
42
|
+
/** @example "source\\repos\\ConsoleApp1\\ConsoleApp1\\bin\\Debug\\net6.0\\" */
|
|
43
|
+
Directory: 'string',
|
|
44
|
+
RecursiveDir: 'string',
|
|
45
|
+
/** @example "2023-11-30 13:38:06.5084339" */
|
|
46
|
+
ModifiedTime: 'string',
|
|
47
|
+
/** @example "2023-11-30 13:38:06.9308716" */
|
|
48
|
+
CreatedTime: 'string',
|
|
49
|
+
/** @example "2023-11-30 13:38:06.9318732" */
|
|
50
|
+
AccessedTime: 'string',
|
|
51
|
+
/** @example "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets" */
|
|
52
|
+
DefiningProjectFullPath: 'string',
|
|
53
|
+
/** @example "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\MSBuild\\Current\\Bin\\amd64\\" */
|
|
54
|
+
DefiningProjectDirectory: 'string',
|
|
55
|
+
/** @example "Microsoft.Common.CurrentVersion" */
|
|
56
|
+
DefiningProjectName: 'string',
|
|
57
|
+
/** @example ".targets" */
|
|
58
|
+
DefiningProjectExtension: 'string'
|
|
59
|
+
});
|
|
60
|
+
const targetSuccess = type({
|
|
61
|
+
Result: '\'Success\'',
|
|
62
|
+
Items: interface_ItemMetadataBuiltIn.array()
|
|
63
|
+
});
|
|
64
|
+
const targetFailure = type({
|
|
65
|
+
Result: '\'Failure\'',
|
|
66
|
+
Items: 'never[]'
|
|
67
|
+
});
|
|
68
|
+
const msbuildEvaluationOutput = type({
|
|
69
|
+
'Properties?': type({
|
|
70
|
+
'[string]': 'string'
|
|
71
|
+
}),
|
|
72
|
+
'Items?': type({
|
|
73
|
+
'[string]': interface_ItemMetadataBuiltIn.array()
|
|
74
|
+
}),
|
|
75
|
+
'TargetResults?': type({
|
|
76
|
+
'[string]': targetSuccess.or(targetFailure)
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
class MSBuildEvaluationOutput {
|
|
80
|
+
/**
|
|
81
|
+
* @param rawMSBuildEvaluation The output of a CLI MSBuild project evaluation.
|
|
82
|
+
* May be the UTF-8 string-encoded JSON or the object decoded from that JSON.
|
|
83
|
+
*/
|
|
84
|
+
constructor(rawMSBuildEvaluation) {
|
|
85
|
+
/** `.assert` instead of `.from` to allow `unknown` JSON.parse return type */
|
|
86
|
+
const knownObject = msbuildEvaluationOutput.assert(typeof rawMSBuildEvaluation === 'string' ? JSON.parse(rawMSBuildEvaluation) : rawMSBuildEvaluation);
|
|
87
|
+
this.Properties = knownObject.Properties;
|
|
88
|
+
this.Items = knownObject.Items;
|
|
89
|
+
this.TargetResults = knownObject.TargetResults;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The specified properties and their values as evaluated by MSBuild Core.
|
|
94
|
+
* `-getProperty:{propertyName,...}`
|
|
95
|
+
*/
|
|
96
|
+
Properties;
|
|
97
|
+
/**
|
|
98
|
+
* The specified items and their values and associated metadata as evaluated
|
|
99
|
+
* by MSBuild Core.
|
|
100
|
+
* `-getItem:{itemName,...}`
|
|
101
|
+
*/
|
|
102
|
+
Items;
|
|
103
|
+
/**
|
|
104
|
+
* The specified Targets and their output values as evaluated by MSBuild
|
|
105
|
+
* Core.
|
|
106
|
+
* `-getTargetResult:{targetName,...}`
|
|
107
|
+
*/
|
|
108
|
+
TargetResults;
|
|
109
|
+
}
|
|
110
|
+
const EvaluationOptions = Object.freeze(type({
|
|
111
|
+
/**
|
|
112
|
+
* The project file's full path.
|
|
113
|
+
*/
|
|
114
|
+
FullName: 'string',
|
|
115
|
+
/**
|
|
116
|
+
* User-defined Properties and their values.
|
|
117
|
+
* { Configuration: "Release" } will cause the MSBuild to first set the
|
|
118
|
+
* Configuration property to Release before evaluating the project
|
|
119
|
+
* or the project's Target(s).
|
|
120
|
+
* ```txt
|
|
121
|
+
* -property:<n>=<v> Set or override these project-level properties. <n> is
|
|
122
|
+
* the property name, and <v> is the property value. Use a
|
|
123
|
+
* semicolon or a comma to separate multiple properties, or
|
|
124
|
+
* specify each property separately. (Short form: -p)
|
|
125
|
+
* Example:
|
|
126
|
+
* -property:WarningLevel=2;OutDir=bin\Debug\
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
Property: type({
|
|
130
|
+
'[string]': 'string'
|
|
131
|
+
}).as().partial(),
|
|
132
|
+
/**
|
|
133
|
+
* The MSBuild Targets to run for evaluation. ["Pack"] is recommended.
|
|
134
|
+
* Property values may be changed by Targets such as those provided by
|
|
135
|
+
* dependencies.
|
|
136
|
+
*
|
|
137
|
+
* ```txt
|
|
138
|
+
* -target:<targets> Build these targets in this project. Use a semicolon or a
|
|
139
|
+
* comma to separate multiple targets, or specify each
|
|
140
|
+
* target separately. (Short form: -t)
|
|
141
|
+
* Example:
|
|
142
|
+
* -target:Resources;Compile
|
|
143
|
+
* ```
|
|
144
|
+
* @default []
|
|
145
|
+
*/
|
|
146
|
+
Targets: type.string.array().readonly().or('string[]'),
|
|
147
|
+
/**
|
|
148
|
+
* MSBuild Items to evaluate. `["Compile"]` will result in the MSBuild output
|
|
149
|
+
* including {@link MSBuild}
|
|
150
|
+
*/
|
|
151
|
+
GetItem: type.string.array().readonly().or('string[]'),
|
|
152
|
+
GetProperty: type.string.array().readonly().or('string[]'),
|
|
153
|
+
GetTargetResult: type.string.array().readonly().or('string[]')
|
|
154
|
+
}));
|
|
155
|
+
class MSBuildProject {
|
|
156
|
+
/**
|
|
157
|
+
* Properties for multi-targeting `dotnet publish` outputs.
|
|
158
|
+
* These are included in {@link NPPGetterNames.InstanceGettersRecursive}.
|
|
159
|
+
*/
|
|
160
|
+
static MatrixProperties = Object.freeze(['TargetFramework', 'TargetFrameworks', 'RuntimeIdentifier', 'RuntimeIdentifiers']);
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Creates an instance of MSBuildProject.
|
|
164
|
+
* @param opts The order-independent arguments for this constructor.
|
|
165
|
+
* Properties may be added or moved around in this definition without
|
|
166
|
+
* breaking compatibility.
|
|
167
|
+
* @param opts.fullPath The full path of the MSBuild project's file. This
|
|
168
|
+
* should have a '.csproj', '.fsproj', or '.vbproj' file extension.
|
|
169
|
+
* @param opts.projTargets A list of MSBuild Targets supported by the project.
|
|
170
|
+
* @param opts.evaluation The output of an MSBuild project evaluation. This
|
|
171
|
+
* comprises MSBuild Properties, Items, and Target results.
|
|
172
|
+
*/
|
|
173
|
+
constructor(opts) {
|
|
174
|
+
this.Items = opts.evaluation.Items ?? {};
|
|
175
|
+
this.Properties = new NugetProjectProperties(opts.fullPath, new CaseInsensitiveMap(Object.entries(opts.evaluation.Properties ?? {})));
|
|
176
|
+
this.Targets = opts.projTargets;
|
|
177
|
+
this.TargetResults = opts.evaluation.TargetResults === undefined ? [] : [opts.evaluation.TargetResults];
|
|
178
|
+
}
|
|
179
|
+
Items;
|
|
180
|
+
Properties;
|
|
181
|
+
Targets;
|
|
182
|
+
/**
|
|
183
|
+
* Allows appending subsequent target results.
|
|
184
|
+
*/
|
|
185
|
+
TargetResults;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @param projectPath The full path of the project file or its directory. A
|
|
189
|
+
* relative path may be passed, but will resolve relative to the current
|
|
190
|
+
* working directory.
|
|
191
|
+
* @param includeNonPublic Include conventionally internal/private MSBuild
|
|
192
|
+
* targets in the result.
|
|
193
|
+
* @returns A string array of the project's MSBuild targets.
|
|
194
|
+
* @todo consider 'file' of -targets[:file]
|
|
195
|
+
* Prints a list of available targets without executing the
|
|
196
|
+
* actual build process. By default the output is written to
|
|
197
|
+
* the console window. If the path to an output file
|
|
198
|
+
* is provided that will be used instead.
|
|
199
|
+
* (Short form: -ts)
|
|
200
|
+
* Example:
|
|
201
|
+
* -ts:out.txt
|
|
202
|
+
*/
|
|
203
|
+
static async GetTargets(projectPath, includeNonPublic = false) {
|
|
204
|
+
return execAsync(`dotnet msbuild ${projectPath} -targets`, true).then(v => {
|
|
205
|
+
const targets = v.stdout.split('\n').filter((v, index) => v !== '' && index !== 0).map(v => v.replace('\r', '')).sort((a, b) => a.localeCompare(b));
|
|
206
|
+
return includeNonPublic ? targets : targets.filter(v => !v.startsWith('_'));
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Evaluate {@link Items}, {@link Properties}, and {@link TargetResults},
|
|
212
|
+
* returning them as an instance of {@link MSBuildProject}.\
|
|
213
|
+
* Note: MSBuild will probably fail if Restore is skipped and another
|
|
214
|
+
* target is specified. If you choose Pack, you must do ['Restore', 'Pack'].
|
|
215
|
+
* @param options The result of {@link EvaluationOptions.from}.
|
|
216
|
+
* @returns A promised {@link MSBuildProject} instance.
|
|
217
|
+
* @throws if the exec command fails -OR- the JSON parse fails -OR-
|
|
218
|
+
* MSBuildProject's constructor fails.
|
|
219
|
+
* @see {@link PackableProjectsToMSBuildProjects} for most use-cases.
|
|
220
|
+
*/
|
|
221
|
+
static async Evaluate(options) {
|
|
222
|
+
if (options.GetProperty.length === 0 && options.GetItem.length === 0 && options.GetTargetResult.length === 0) {
|
|
223
|
+
throw new Error('No MSBuild Property, Item, or TargetResult queries were provided.');
|
|
224
|
+
}
|
|
225
|
+
// reminder: args containing spaces and semi-colons MUST be quote-enclosed!
|
|
226
|
+
options.FullName = MSBuildProjectProperties.GetFullPath(options.FullName);
|
|
227
|
+
const _pairs = Object.entries(options.Property).filter(p => typeof p[1] === 'string');
|
|
228
|
+
const property = _pairs.length === 0 ? '' : `-p:"${_pairs.map(pair => pair[0] + '=' + pair[1]).join(';')}"`;
|
|
229
|
+
const target = options.Targets.length === 0 ? '' : `"-t:${options.Targets.join(';')}"`;
|
|
230
|
+
const getItem = options.GetItem.length === 0 ? '' : `-getItem:"${options.GetItem.join(',')}"`;
|
|
231
|
+
const getProperty = options.GetProperty.length === 0 ? '' : `-getProperty:"${options.GetProperty.join(',')}"`;
|
|
232
|
+
const getTargetResult = options.GetTargetResult.length === 0 ? '' : `-getTargetResult:"${options.GetTargetResult.join(',')}"`;
|
|
233
|
+
const cmdLine = ['dotnet', 'msbuild', `"${options.FullName}"`, '-restore', property, target, getItem, getProperty, getTargetResult].filter(v => v !== '').join(' ');
|
|
234
|
+
let stdio = undefined;
|
|
235
|
+
// may throw
|
|
236
|
+
while (stdio === undefined) {
|
|
237
|
+
stdio = await setTimeout(1000, execAsync(cmdLine, true)).then(async p => await p).catch(catchCsc2012);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// todo: consider -getResultOutputFile:file
|
|
241
|
+
// Redirect output from get* into a file.
|
|
242
|
+
//
|
|
243
|
+
// Example:
|
|
244
|
+
// -getProperty:Bar -getResultOutputFile:Biz.txt
|
|
245
|
+
// This writes the value of property Bar into Biz.txt.
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The following issues have triggered this code path:
|
|
249
|
+
* - BaseIntermediateOutputPath must use Unix path separators ('/') on all
|
|
250
|
+
* platforms. Even Windows. Otherwise, MSBuild/dotnet will error-exit with
|
|
251
|
+
* "The BaseIntermediateOutputPath must end with a trailing slash".
|
|
252
|
+
*/
|
|
253
|
+
if (stdio.stdout.startsWith('MSBuild version')) {
|
|
254
|
+
warn(stdio.stdout);
|
|
255
|
+
throw new Error('dotnet msbuild was expected to output JSON, but output its version header instead.');
|
|
256
|
+
}
|
|
257
|
+
let rawOutput = undefined;
|
|
258
|
+
if (stdio.stdout.startsWith('{')) {
|
|
259
|
+
/** stdout is JSON string */
|
|
260
|
+
rawOutput = stdio.stdout;
|
|
261
|
+
} else if (options.GetProperty.length > 0 && options.GetProperty[0] !== undefined) {
|
|
262
|
+
rawOutput = {
|
|
263
|
+
Properties: {
|
|
264
|
+
[options.GetProperty[0]]: String(JSON.parse(stdio.stdout))
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
} else {
|
|
268
|
+
throw new Error('Dotnet/MSBuild evaluation output is not a string nor JSON object or array.');
|
|
269
|
+
}
|
|
270
|
+
const evaluation = new MSBuildEvaluationOutput(rawOutput);
|
|
271
|
+
return new MSBuildProject({
|
|
272
|
+
fullPath: options.FullName,
|
|
273
|
+
projTargets: await MSBuildProject.GetTargets(options.FullName),
|
|
274
|
+
evaluation
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Evaluate multiple project paths with some default Evaluate options.
|
|
280
|
+
* @async
|
|
281
|
+
* @param projectsToPackAndPush An array of MSBuild projects' full file
|
|
282
|
+
* paths. If a path is a directory, files in that directory are filtered for
|
|
283
|
+
* `.csproj`, `.fsproj`, and `.vbproj` project files.
|
|
284
|
+
* See https://github.com/dotnet/sdk/blob/497f334b2862bdf98b30c00ede2fd259ea5f624d/src/Cli/dotnet/Commands/New/MSBuildEvaluation/MSBuildEvaluationResult.cs#L19-L32.\
|
|
285
|
+
* @returns A promised array of {@link MSBuildProject} instances.
|
|
286
|
+
* All known MSBuild and NuGet properties are evaluated.
|
|
287
|
+
* If applicable, a project's "Pack" target is evaluated.
|
|
288
|
+
*/
|
|
289
|
+
static async PackableProjectsToMSBuildProjects(projectsToPackAndPush) {
|
|
290
|
+
const dirEntriesPromise = toDirEntries(typeof projectsToPackAndPush === 'string' ? [projectsToPackAndPush] : projectsToPackAndPush);
|
|
291
|
+
const projectPromises = await dirEntriesPromise.then(direntArray => direntArray.map(element => convertDirentToMSBuildProject(element)));
|
|
292
|
+
return projectPromises;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Map an array of filesystem paths to {@link Dirent} instances representing project files.
|
|
296
|
+
* @param projectsToPackAndPush An array of MSBuild projects' full file
|
|
297
|
+
* paths. If a path is a directory, files in that directory are filtered for
|
|
298
|
+
* `.csproj`, `.fsproj`, and `.vbproj` project files. See
|
|
299
|
+
* https://github.com/dotnet/sdk/blob/497f334b2862bdf98b30c00ede2fd259ea5f624d/src/Cli/dotnet/Commands/New/MSBuildEvaluation/MSBuildEvaluationResult.cs#L19-L32.\
|
|
300
|
+
* @returns An promised array of Dirent instances for discovered project files.
|
|
301
|
+
*/
|
|
302
|
+
async function toDirEntries(projectsToPackAndPush) {
|
|
303
|
+
const dirEntries = await Promise.all(projectsToPackAndPush.map(async proj => {
|
|
304
|
+
proj = await realpath(makeAbsolute(proj));
|
|
305
|
+
const stats = await stat(proj);
|
|
306
|
+
let entries;
|
|
307
|
+
if (stats.isFile()) {
|
|
308
|
+
entries = await readdir(node_path.dirname(proj), {
|
|
309
|
+
withFileTypes: true
|
|
310
|
+
});
|
|
311
|
+
const dirent = entries.find(v => node_path.join(
|
|
312
|
+
// condition required for compatibility. `.path` was deprecated, but `.parentPath` is not available in our node minversion
|
|
313
|
+
v.path ?? v.parentPath, v.name) === proj);
|
|
314
|
+
if (dirent) return dirent;else throw new Error(`file "${proj}" not found. It may have been moved or deleted.`);
|
|
315
|
+
}
|
|
316
|
+
if (!stats.isDirectory()) throw new Error(`"${proj}" is not a file or directory`);
|
|
317
|
+
entries = await readdir(proj, {
|
|
318
|
+
withFileTypes: true
|
|
319
|
+
});
|
|
320
|
+
return entries.filter(v => v.isFile() && (v.name.endsWith('.csproj') || v.name.endsWith('.fsproj') || v.name.endsWith('.vbproj')));
|
|
321
|
+
}));
|
|
322
|
+
return dirEntries.flat();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Map a {@link Dirent} instance to an {@link MSBuildProject} instance.
|
|
327
|
+
* @param dirent A {@link Dirent} instance. This instance should be an MSBuild project file.
|
|
328
|
+
* @returns An instance of {@link MSBuildProject} evaluated with the `Pack` target result, if applicable. Evaluated properties will be those whose names are returned by {@link NPPGetterNames.InstanceGettersRecursive}.
|
|
329
|
+
*/
|
|
330
|
+
async function convertDirentToMSBuildProject(dirent) {
|
|
331
|
+
const fullPath = node_path.join(
|
|
332
|
+
// condition required for compatibility. `.path` was deprecated, but `.parentPath` is not available in our node minversion
|
|
333
|
+
dirent.path ?? dirent.parentPath, dirent.name);
|
|
334
|
+
const projTargets = MSBuildProject.GetTargets(fullPath);
|
|
335
|
+
const evalTargets = await projTargets.then(v => v.includes('Pack') ? ['Pack'] : []);
|
|
336
|
+
// this might be too long for a command line. What was it on Windows?
|
|
337
|
+
// 2^15 (32,768) character limit for command lines?
|
|
338
|
+
const getProperties = NPPGetterNames.InstanceGettersRecursive;
|
|
339
|
+
return await MSBuildProject.Evaluate(EvaluationOptions.from({
|
|
340
|
+
FullName: fullPath,
|
|
341
|
+
GetItem: [],
|
|
342
|
+
GetProperty: getProperties,
|
|
343
|
+
GetTargetResult: [],
|
|
344
|
+
Property: {},
|
|
345
|
+
Targets: evalTargets
|
|
346
|
+
}));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
static fromJSON(json) {
|
|
350
|
+
const parsed = T_PseudoMSBPInstance.assert(JSON.parse(json));
|
|
351
|
+
type.true.assert(Reflect.setPrototypeOf(parsed, MSBuildProject.prototype));
|
|
352
|
+
type.true.assert(Reflect.setPrototypeOf(parsed.Properties, NugetProjectProperties.prototype));
|
|
353
|
+
parsed.Properties = T_NPP.assert(parsed.Properties);
|
|
354
|
+
return T_MSBuildProject.assert(parsed);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
const T_MSBuildProject = type.instanceOf(MSBuildProject);
|
|
358
|
+
const T_NPP = type.instanceOf(NugetProjectProperties);
|
|
359
|
+
const T_PseudoMSBPInstance = type({
|
|
360
|
+
Items: type({
|
|
361
|
+
'[string]': type({
|
|
362
|
+
'[string]': 'string',
|
|
363
|
+
Identity: 'string',
|
|
364
|
+
FullPath: 'string',
|
|
365
|
+
RootDir: 'string',
|
|
366
|
+
Filename: 'string',
|
|
367
|
+
Extension: 'string',
|
|
368
|
+
RelativeDir: 'string',
|
|
369
|
+
Directory: 'string',
|
|
370
|
+
RecursiveDir: 'string',
|
|
371
|
+
ModifiedTime: 'string',
|
|
372
|
+
CreatedTime: 'string',
|
|
373
|
+
AccessedTime: 'string',
|
|
374
|
+
DefiningProjectFullPath: 'string',
|
|
375
|
+
DefiningProjectDirectory: 'string',
|
|
376
|
+
DefiningProjectName: 'string',
|
|
377
|
+
DefiningProjectExtension: 'string',
|
|
378
|
+
'SubType?': ' string | undefined',
|
|
379
|
+
'TargetFrameworkIdentifier?': 'string | undefined',
|
|
380
|
+
'TargetPlatformMoniker?': 'string | undefined',
|
|
381
|
+
'CopyUpToDateMarker?': 'string | undefined',
|
|
382
|
+
'TargetPlatformIdentifier?': 'string | undefined',
|
|
383
|
+
'TargetFrameworkVersion?': 'string | undefined',
|
|
384
|
+
'ReferenceAssembly?': 'string | undefined'
|
|
385
|
+
}).array()
|
|
386
|
+
}),
|
|
387
|
+
Properties: type.Record('string', 'string').or(T_NPP),
|
|
388
|
+
Targets: type.string.array(),
|
|
389
|
+
TargetResults: msbuildEvaluationOutput.get('TargetResults').exclude('undefined').array()
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* ArkType type definitions for internal usage, but may be re-used elsewhere
|
|
394
|
+
* @internal
|
|
395
|
+
*/
|
|
396
|
+
const _InternalMSBuildEvaluationTypes = type.scope({
|
|
397
|
+
msbuildEvaluationOutput
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Resolve a path if it is not already absolute.
|
|
402
|
+
* @param _path A filesystem path.
|
|
403
|
+
* @returns A full path to a filesystem entry. The path is unchecked for whether or not the path (or its parts) exist.
|
|
404
|
+
*/
|
|
405
|
+
function makeAbsolute(_path) {
|
|
406
|
+
return node_path.isAbsolute(_path) ? _path : node_path.resolve(_path);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Use this in your catch statement or .catch call to return `undefined` when
|
|
411
|
+
* MSBuild error CSC2012 (e.g. "file in use by another process") is reported.
|
|
412
|
+
* @param error Probably an Error object
|
|
413
|
+
* @returns `undefined` if CSC2012 (file in use by another process) occurs
|
|
414
|
+
*/
|
|
415
|
+
function catchCsc2012(error) {
|
|
416
|
+
if (isNativeError(error)) {
|
|
417
|
+
// check for error reported when "file in use by another process" i.e. EBUSY
|
|
418
|
+
// (UNIX), NTSTATUS.ERROR_SHARING_VIOLATION == 0x20 == 32 (Windows)
|
|
419
|
+
if ('stderr' in error && typeof error.stderr === 'string' && /^CSC ?:.+CS2012:/gm.test(
|
|
420
|
+
// '\uFF1A'.normalize('NFKC') === ':' === true;
|
|
421
|
+
error.stderr.normalize('NFKC'))) {
|
|
422
|
+
return undefined; /* retry */
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* some known warnings/errors:
|
|
426
|
+
* - warning MSB3073:
|
|
427
|
+
* The command "dotnet tool list kuinox.nupkgdeterministicator"
|
|
428
|
+
* exited with code 145.
|
|
429
|
+
* > $ dotnet tool list kuinox.nupkgdeterministicator
|
|
430
|
+
* > The command could not be loaded, possibly because:
|
|
431
|
+
* > * You intended to execute a .NET application:
|
|
432
|
+
* > The application 'tool' does not exist.
|
|
433
|
+
* > * You intended to execute a .NET SDK command:
|
|
434
|
+
* > No .NET SDKs were found.
|
|
435
|
+
* >
|
|
436
|
+
* > Download a .NET SDK:
|
|
437
|
+
* > https://aka.ms/dotnet/download
|
|
438
|
+
* >
|
|
439
|
+
* > Learn about SDK resolution:
|
|
440
|
+
* > https://aka.ms/dotnet/sdk-not-found
|
|
441
|
+
*/else throw error;
|
|
442
|
+
} else throw new Error('unknown error', {
|
|
443
|
+
cause: error
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
export { EvaluationOptions, MSBuildEvaluationOutput, MSBuildProject, _InternalMSBuildEvaluationTypes, catchCsc2012 };
|
|
447
|
+
//# sourceMappingURL=MSBuildProject.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSBuildProject.mjs","sources":["../../src/dotnet/MSBuildProject.ts"],"sourcesContent":null,"names":["path"],"mappings":";;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAC3C,EAAE,UAAU,EAAE,QAAQ;AACtB;AACA,EAAE,QAAQ,EAAE,QAAQ;AACpB;AACA,EAAE,UAAU,EAAE,QAAQ;AACtB;AACA,EAAE,4BAA4B,EAAE,QAAQ;AACxC,EAAE,wBAAwB,EAAE,QAA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C,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE;AACrC,MAAM,OAAO,SAAS,CAAC;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM,KAAK;AACvB,GAAG,MAAM,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE;AAC1C,IAAI,KAAK,EAAE;AACX,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { CaseInsensitiveMap } from '../CaseInsensitiveMap.js';
|
|
2
|
+
import type { BaseClass, ClassLike } from '../utils/reflection.js';
|
|
3
|
+
/**
|
|
4
|
+
* Known properties. Additional properties may be added upon request.
|
|
5
|
+
*
|
|
6
|
+
* todo: add Reserved properties, Well-Known properties, Common properties, and more. Maybe as sub classes.
|
|
7
|
+
* See:
|
|
8
|
+
* - {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties?view=vs-2022 MSBuild Reserved and Well-known Properties}
|
|
9
|
+
* - {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties?view=vs-2022 Common MSBuild project properties}
|
|
10
|
+
* - {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props Microsoft.NET.Sdk}
|
|
11
|
+
* - {@link https://learn.microsoft.com/en-us/aspnet/core/razor-pages/web-sdk?view=aspnetcore-8.0&toc=%2Fdotnet%2Fnavigate%2Ftools-diagnostics%2Ftoc.json&bc=%2Fdotnet%2Fbreadcrumb%2Ftoc.json#properties Microsoft.NET.Sdk.Web}
|
|
12
|
+
* - {@link https://learn.microsoft.com/en-us/aspnet/core/razor-pages/sdk?view=aspnetcore-8.0&toc=%2Fdotnet%2Fnavigate%2Ftools-diagnostics%2Ftoc.json&bc=%2Fdotnet%2Fbreadcrumb%2Ftoc.json Microsoft.NET.Sdk.Razor}
|
|
13
|
+
* - {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props-desktop Microsoft.NET.Sdk.Desktop}
|
|
14
|
+
*/
|
|
15
|
+
export declare class MSBuildProjectProperties {
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the given path if it is not absolute. If the path exists, it is returned. Else, an Error is thrown.
|
|
18
|
+
* @param path The full file path of an MSBuild project.
|
|
19
|
+
* @returns The absolute path to the MSBuild project file.
|
|
20
|
+
* @throws {Error} if the path cannot be resolved to an existing file.
|
|
21
|
+
*/
|
|
22
|
+
static GetFullPath(path: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Note: This method may remove elements from {@link properties}.\
|
|
25
|
+
* Try to get an element from {@link properties} by its {@link key}.
|
|
26
|
+
* If an element is found, it is removed and the value of the element is returned.
|
|
27
|
+
* Otherwise, `undefined` is returned.
|
|
28
|
+
* @param properties The CaseInsensitiveMap of properties passed to the constructor.
|
|
29
|
+
* @param key The key of the property to get from {@link properties}
|
|
30
|
+
* @returns If found, the value of the `[string, string]` tuple found in {@link properties}. Else, `undefined`.
|
|
31
|
+
*/
|
|
32
|
+
protected static getAndForget(properties: CaseInsensitiveMap<string, string>, key: string): string | undefined;
|
|
33
|
+
private _msbuildProjectFullPath;
|
|
34
|
+
private _assemblyName;
|
|
35
|
+
private _baseIntermediateOutputPath;
|
|
36
|
+
private _baseOutputPath;
|
|
37
|
+
private _description;
|
|
38
|
+
private _intermediateOutputPath;
|
|
39
|
+
private _outDir;
|
|
40
|
+
private _outputPath;
|
|
41
|
+
private _runtimeIdentifier;
|
|
42
|
+
private _runtimeIdentifiers;
|
|
43
|
+
private _targetFramework;
|
|
44
|
+
private _targetFrameworks;
|
|
45
|
+
private _version;
|
|
46
|
+
private _versionPrefix;
|
|
47
|
+
private _versionSuffix;
|
|
48
|
+
constructor(msbuildProjectFullPath: string, properties: CaseInsensitiveMap<string, string>);
|
|
49
|
+
get MSBuildProjectFullPath(): string;
|
|
50
|
+
/**
|
|
51
|
+
* @returns The name of the assembly.
|
|
52
|
+
*
|
|
53
|
+
* Default: {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties#:~:text=MSBuildProjectDirectory,-Reserved MSBuildProjectDirectory}
|
|
54
|
+
*/
|
|
55
|
+
get AssemblyName(): string;
|
|
56
|
+
/**
|
|
57
|
+
* @returns The top-level folder where all configuration-specific intermediate output
|
|
58
|
+
* folders are created. The default value is `obj\`.
|
|
59
|
+
* @example
|
|
60
|
+
* ```xml
|
|
61
|
+
* <BaseIntermediateOutputPath>c:\xyz\obj\</BaseIntermediateOutputPath>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
get BaseIntermediateOutputPath(): string;
|
|
65
|
+
/**
|
|
66
|
+
* @returns The base path for the output file.
|
|
67
|
+
* If it's set, MSBuild uses `OutputPath = $(BaseOutputPath)\$(Configuration)\`.
|
|
68
|
+
* @example ```xml
|
|
69
|
+
* <BaseOutputPath>c:\xyz\bin\</BaseOutputPath>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
get BaseOutputPath(): string;
|
|
73
|
+
/**
|
|
74
|
+
* A long description for the assembly.
|
|
75
|
+
* If {@link NugetProperties.PackageDescription} is not specified, then this property is also used as the description of the package.
|
|
76
|
+
* @returns The value of the `Description` property.
|
|
77
|
+
*/
|
|
78
|
+
get Description(): string;
|
|
79
|
+
/**
|
|
80
|
+
* @returns The full intermediate output path as derived from
|
|
81
|
+
* {@link BaseIntermediateOutputPath}, if no path is specified.
|
|
82
|
+
* @example "obj\\debug\\"
|
|
83
|
+
*/
|
|
84
|
+
get IntermediateOutput(): string;
|
|
85
|
+
/**
|
|
86
|
+
* @returns The final output location for the project or solution.
|
|
87
|
+
* When you build a solution, OutDir can be used to gather multiple project outputs in one location.
|
|
88
|
+
* In addition, OutDir is included in AssemblySearchPaths used for resolving references.
|
|
89
|
+
* @example
|
|
90
|
+
* `bin/Debug`
|
|
91
|
+
*/
|
|
92
|
+
get OutDir(): string;
|
|
93
|
+
/**
|
|
94
|
+
* @returns The path to the output directory, relative to the project
|
|
95
|
+
* directory.
|
|
96
|
+
* @example
|
|
97
|
+
* `bin/Debug`
|
|
98
|
+
* /// non-AnyCPU builds
|
|
99
|
+
* `bin/Debug/${Platform}`
|
|
100
|
+
*/
|
|
101
|
+
get OutputPath(): string;
|
|
102
|
+
/**
|
|
103
|
+
* Set Version -OR- VersionPrefix.
|
|
104
|
+
* @returns The value of the `Version` property.
|
|
105
|
+
*
|
|
106
|
+
* Default: `"1.0.0"`
|
|
107
|
+
*/
|
|
108
|
+
get Version(): string;
|
|
109
|
+
/**
|
|
110
|
+
* Set Version -OR- VersionPrefix.\
|
|
111
|
+
* Setting {@link NugetProperties.PackageVersion} overwrites {@link VersionPrefix}
|
|
112
|
+
* @returns The MAJOR.MINOR.PATCH string of the version.
|
|
113
|
+
* @see {@link VersionSuffix}
|
|
114
|
+
*/
|
|
115
|
+
get VersionPrefix(): string;
|
|
116
|
+
/**
|
|
117
|
+
* The effect of this property on the package version depends on the values of the Version and VersionPrefix properties, as shown in the following table:
|
|
118
|
+
* | Properties with values | Package version |
|
|
119
|
+
* | ---------------------- | --------------- |
|
|
120
|
+
* | None | 1.0.0 |
|
|
121
|
+
* | Version | $(Version) |
|
|
122
|
+
* | VersionPrefix only | $(VersionPrefix) |
|
|
123
|
+
* | VersionSuffix only | 1.0.0-$(VersionSuffix) |
|
|
124
|
+
* | VersionPrefix and VersionSuffix | $(VersionPrefix)-$(VersionSuffix) |
|
|
125
|
+
* \
|
|
126
|
+
* Setting {@link PackageVersion} overwrites {@link VersionSuffix}
|
|
127
|
+
* @returns The string appended to the end of the MAJOR.MINOR.PATCH semver string (i.e. {@link VersionPrefix})
|
|
128
|
+
*/
|
|
129
|
+
get VersionSuffix(): string;
|
|
130
|
+
/**
|
|
131
|
+
* @returns The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#targetframework Target Framework}
|
|
132
|
+
* @see
|
|
133
|
+
* https://learn.microsoft.com/en-us/nuget/reference/target-frameworks#supported-frameworks
|
|
134
|
+
* https://learn.microsoft.com/en-us/dotnet/standard/frameworks
|
|
135
|
+
*/
|
|
136
|
+
get TargetFramework(): string;
|
|
137
|
+
/**
|
|
138
|
+
* @returns The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#targetframeworks Target Frameworks} (plural)
|
|
139
|
+
* @see
|
|
140
|
+
* https://learn.microsoft.com/en-us/nuget/reference/target-frameworks#supported-frameworks
|
|
141
|
+
* https://learn.microsoft.com/en-us/dotnet/standard/frameworks
|
|
142
|
+
*/
|
|
143
|
+
get TargetFrameworks(): string;
|
|
144
|
+
/**
|
|
145
|
+
* @returns
|
|
146
|
+
* > The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#runtimeidentifier `Runtime Identifier`} property lets you specify a single runtime
|
|
147
|
+
* > identifier (RID) for the project. The RID enables publishing a
|
|
148
|
+
* > self-contained deployment.
|
|
149
|
+
* @see
|
|
150
|
+
* https://learn.microsoft.com/en-us/dotnet/core/rid-catalog
|
|
151
|
+
*/
|
|
152
|
+
get RuntimeIdentifier(): string;
|
|
153
|
+
/**
|
|
154
|
+
* @returns
|
|
155
|
+
* > The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#runtimeidentifiers `RuntimeIdentifiers`} property lets you specify a
|
|
156
|
+
* > semicolon-delimited list of runtime identifiers (RIDs) for the project.
|
|
157
|
+
* > Use this property if you need to publish for multiple runtimes.
|
|
158
|
+
* > `RuntimeIdentifiers` is used at restore time to ensure the right assets
|
|
159
|
+
* > are in the graph.
|
|
160
|
+
* @see
|
|
161
|
+
* https://learn.microsoft.com/en-us/dotnet/core/rid-catalog
|
|
162
|
+
*/
|
|
163
|
+
get RuntimeIdentifiers(): string;
|
|
164
|
+
}
|
|
165
|
+
export type Class_MSBPP = ClassLike<BaseClass<typeof MSBuildProjectProperties & {
|
|
166
|
+
getAndForget: ProtectedMember<typeof MSBuildProjectProperties.getAndForget>;
|
|
167
|
+
}>>;
|
|
168
|
+
type ProtectedMember<T> = T;
|
|
169
|
+
export {};
|
|
170
|
+
//# sourceMappingURL=MSBuildProjectProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSBuildProjectProperties.d.ts","sourceRoot":"","sources":["../../src/dotnet/MSBuildProjectProperties.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAwB;IAGnC;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAQxC;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAM,CAAC,YAAY,CAC3B,UAAU,EAAE,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9C,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS;IAWrB,OAAO,CAAC,uBAAuB,CAAqB;IACpD,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,2BAA2B,CAAqB;IACxD,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,uBAAuB,CAAqB;IACpD,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,cAAc,CAAqB;gBAIzC,sBAAsB,EAAE,MAAM,EAC9B,UAAU,EAAE,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAA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