@uipath/project-packager 1.1.10 → 1.196.0
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/dist/browser.js +2380 -0
- package/dist/index.js +1331 -131
- package/dist/node.js +1225 -110
- package/dist/src/base-browser-packager-factory.d.ts +37 -0
- package/dist/src/base-node-packager-factory.d.ts +9 -2
- package/dist/src/browser-project-packager-factory.d.ts +26 -0
- package/dist/src/browser.d.ts +3 -0
- package/dist/src/i18n/locales/en.d.ts +30 -1
- package/dist/src/index.d.ts +6 -2
- package/dist/src/models/packager-config.d.ts +2 -2
- package/dist/src/models/packager-parameters.d.ts +8 -0
- package/dist/src/models/project-build-options.d.ts +4 -0
- package/dist/src/models/project-models.d.ts +0 -11
- package/dist/src/node.d.ts +18 -3
- package/dist/src/publish/models/publish-options.d.ts +158 -0
- package/dist/src/publish/node-project-publisher-factory.d.ts +6 -0
- package/dist/src/publish/services/local-folder-publisher.d.ts +19 -0
- package/dist/src/publish/services/nuget-feed-publisher.d.ts +29 -0
- package/dist/src/publish/services/orchestrator-feed-types.d.ts +98 -0
- package/dist/src/publish/services/orchestrator-feeds-service.d.ts +44 -0
- package/dist/src/publish/services/orchestrator-publisher.d.ts +78 -0
- package/dist/src/publish/services/project-publisher.d.ts +29 -0
- package/dist/src/services/dotnet-discovery-service.d.ts +18 -0
- package/dist/src/services/nupkg-resolver.d.ts +20 -0
- package/dist/src/services/package-sign-service.d.ts +3 -2
- package/dist/src/services/package-signer.d.ts +24 -0
- package/dist/src/services/project-loader.d.ts +0 -1
- package/dist/src/services/project-packager.d.ts +19 -13
- package/dist/src/services/project-tool-executor.d.ts +1 -1
- package/dist/tests/{project-packager-e2e.test.d.ts → project-packager.e2e.test.d.ts} +1 -0
- package/dist/tests/project-packager.spec.d.ts +1 -0
- package/dist/tests/publish/local-folder-publisher.spec.d.ts +1 -0
- package/dist/tests/publish/nuget-feed-publisher.spec.d.ts +1 -0
- package/dist/tests/publish/orchestrator-feeds-service.spec.d.ts +1 -0
- package/dist/tests/publish/orchestrator-publisher.spec.d.ts +1 -0
- package/dist/tests/publish/project-publisher.spec.d.ts +1 -0
- package/dist/tests/tools-factory-repository.spec.d.ts +1 -0
- package/package.json +23 -30
- /package/dist/tests/{governance-policy-service.test.d.ts → governance-policy-service.spec.d.ts} +0 -0
- /package/dist/tests/{pack-service.test.d.ts → pack-service.spec.d.ts} +0 -0
- /package/dist/tests/{project-loader.test.d.ts → project-loader.spec.d.ts} +0 -0
- /package/dist/tests/{project-packager.test.d.ts → project-pack-options-builder.spec.d.ts} +0 -0
- /package/dist/tests/{project-tool-executor.test.d.ts → project-tool-executor.spec.d.ts} +0 -0
- /package/dist/tests/{tools-factory-repository.test.d.ts → publish/node-project-publisher-factory.spec.d.ts} +0 -0
package/dist/browser.js
ADDED
|
@@ -0,0 +1,2380 @@
|
|
|
1
|
+
// src/i18n/index.ts
|
|
2
|
+
import { I18nManager } from "@uipath/solutionpackager-tool-core";
|
|
3
|
+
// src/i18n/locales/de.json
|
|
4
|
+
var de_default = {
|
|
5
|
+
solutionpackager: {
|
|
6
|
+
projectLoader: {
|
|
7
|
+
errors: {
|
|
8
|
+
pathRequired: "Project directory path is required",
|
|
9
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
10
|
+
readFailed: "Failed to read project file: {path}",
|
|
11
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
validator: {
|
|
15
|
+
errors: {
|
|
16
|
+
destinationNotDefined: "Destination path is not defined",
|
|
17
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
18
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
19
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
packager: {
|
|
23
|
+
errors: {
|
|
24
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
25
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
governance: {
|
|
29
|
+
info: {
|
|
30
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
31
|
+
saved: "Governance policy saved to {path}",
|
|
32
|
+
downloading: "Downloading governance policy from {url}",
|
|
33
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
34
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
35
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
36
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
37
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
38
|
+
},
|
|
39
|
+
errors: {
|
|
40
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
41
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
42
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
43
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
signing: {
|
|
47
|
+
errors: {
|
|
48
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
dotnet: {
|
|
52
|
+
info: {
|
|
53
|
+
available: "dotnet CLI is available (version {version})."
|
|
54
|
+
},
|
|
55
|
+
warnings: {
|
|
56
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
publish: {
|
|
60
|
+
errors: {
|
|
61
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
62
|
+
packageNotFound: "Package file not found: {path}",
|
|
63
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
64
|
+
publishFailed: "Publish failed: {message}",
|
|
65
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
66
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
67
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
68
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
69
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
70
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
71
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
72
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
73
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
74
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
75
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
76
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
77
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
78
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
79
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
80
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// src/i18n/locales/en.ts
|
|
87
|
+
var en = {
|
|
88
|
+
solutionpackager: {
|
|
89
|
+
projectLoader: {
|
|
90
|
+
errors: {
|
|
91
|
+
pathRequired: "Project directory path is required",
|
|
92
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
93
|
+
readFailed: "Failed to read project file: {path}",
|
|
94
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
validator: {
|
|
98
|
+
errors: {
|
|
99
|
+
destinationNotDefined: "Destination path is not defined",
|
|
100
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
101
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
102
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
packager: {
|
|
106
|
+
errors: {
|
|
107
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
108
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
governance: {
|
|
112
|
+
info: {
|
|
113
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
114
|
+
saved: "Governance policy saved to {path}",
|
|
115
|
+
downloading: "Downloading governance policy from {url}",
|
|
116
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
117
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
118
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
119
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
120
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
121
|
+
},
|
|
122
|
+
errors: {
|
|
123
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
124
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
125
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
126
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
signing: {
|
|
130
|
+
errors: {
|
|
131
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
dotnet: {
|
|
135
|
+
info: {
|
|
136
|
+
available: "dotnet CLI is available (version {version})."
|
|
137
|
+
},
|
|
138
|
+
warnings: {
|
|
139
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
publish: {
|
|
143
|
+
errors: {
|
|
144
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
145
|
+
packageNotFound: "Package file not found: {path}",
|
|
146
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
147
|
+
publishFailed: "Publish failed: {message}",
|
|
148
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
149
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
150
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
151
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
152
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
153
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
154
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
155
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
156
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
157
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
158
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
159
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
160
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
161
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
162
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
163
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
// src/i18n/locales/es.json
|
|
169
|
+
var es_default = {
|
|
170
|
+
solutionpackager: {
|
|
171
|
+
projectLoader: {
|
|
172
|
+
errors: {
|
|
173
|
+
pathRequired: "Project directory path is required",
|
|
174
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
175
|
+
readFailed: "Failed to read project file: {path}",
|
|
176
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
validator: {
|
|
180
|
+
errors: {
|
|
181
|
+
destinationNotDefined: "Destination path is not defined",
|
|
182
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
183
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
184
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
packager: {
|
|
188
|
+
errors: {
|
|
189
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
190
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
governance: {
|
|
194
|
+
info: {
|
|
195
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
196
|
+
saved: "Governance policy saved to {path}",
|
|
197
|
+
downloading: "Downloading governance policy from {url}",
|
|
198
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
199
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
200
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
201
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
202
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
203
|
+
},
|
|
204
|
+
errors: {
|
|
205
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
206
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
207
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
208
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
signing: {
|
|
212
|
+
errors: {
|
|
213
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
dotnet: {
|
|
217
|
+
info: {
|
|
218
|
+
available: "dotnet CLI is available (version {version})."
|
|
219
|
+
},
|
|
220
|
+
warnings: {
|
|
221
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
publish: {
|
|
225
|
+
errors: {
|
|
226
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
227
|
+
packageNotFound: "Package file not found: {path}",
|
|
228
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
229
|
+
publishFailed: "Publish failed: {message}",
|
|
230
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
231
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
232
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
233
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
234
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
235
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
236
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
237
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
238
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
239
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
240
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
241
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
242
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
243
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
244
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
245
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
// src/i18n/locales/es-MX.json
|
|
251
|
+
var es_MX_default = {
|
|
252
|
+
solutionpackager: {
|
|
253
|
+
projectLoader: {
|
|
254
|
+
errors: {
|
|
255
|
+
pathRequired: "Project directory path is required",
|
|
256
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
257
|
+
readFailed: "Failed to read project file: {path}",
|
|
258
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
validator: {
|
|
262
|
+
errors: {
|
|
263
|
+
destinationNotDefined: "Destination path is not defined",
|
|
264
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
265
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
266
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
packager: {
|
|
270
|
+
errors: {
|
|
271
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
272
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
governance: {
|
|
276
|
+
info: {
|
|
277
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
278
|
+
saved: "Governance policy saved to {path}",
|
|
279
|
+
downloading: "Downloading governance policy from {url}",
|
|
280
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
281
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
282
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
283
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
284
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
285
|
+
},
|
|
286
|
+
errors: {
|
|
287
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
288
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
289
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
290
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
signing: {
|
|
294
|
+
errors: {
|
|
295
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
dotnet: {
|
|
299
|
+
info: {
|
|
300
|
+
available: "dotnet CLI is available (version {version})."
|
|
301
|
+
},
|
|
302
|
+
warnings: {
|
|
303
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
publish: {
|
|
307
|
+
errors: {
|
|
308
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
309
|
+
packageNotFound: "Package file not found: {path}",
|
|
310
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
311
|
+
publishFailed: "Publish failed: {message}",
|
|
312
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
313
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
314
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
315
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
316
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
317
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
318
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
319
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
320
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
321
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
322
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
323
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
324
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
325
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
326
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
327
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
// src/i18n/locales/fr.json
|
|
333
|
+
var fr_default = {
|
|
334
|
+
solutionpackager: {
|
|
335
|
+
projectLoader: {
|
|
336
|
+
errors: {
|
|
337
|
+
pathRequired: "Project directory path is required",
|
|
338
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
339
|
+
readFailed: "Failed to read project file: {path}",
|
|
340
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
validator: {
|
|
344
|
+
errors: {
|
|
345
|
+
destinationNotDefined: "Destination path is not defined",
|
|
346
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
347
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
348
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
packager: {
|
|
352
|
+
errors: {
|
|
353
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
354
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
governance: {
|
|
358
|
+
info: {
|
|
359
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
360
|
+
saved: "Governance policy saved to {path}",
|
|
361
|
+
downloading: "Downloading governance policy from {url}",
|
|
362
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
363
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
364
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
365
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
366
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
367
|
+
},
|
|
368
|
+
errors: {
|
|
369
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
370
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
371
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
372
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
signing: {
|
|
376
|
+
errors: {
|
|
377
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
dotnet: {
|
|
381
|
+
info: {
|
|
382
|
+
available: "dotnet CLI is available (version {version})."
|
|
383
|
+
},
|
|
384
|
+
warnings: {
|
|
385
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
publish: {
|
|
389
|
+
errors: {
|
|
390
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
391
|
+
packageNotFound: "Package file not found: {path}",
|
|
392
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
393
|
+
publishFailed: "Publish failed: {message}",
|
|
394
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
395
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
396
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
397
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
398
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
399
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
400
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
401
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
402
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
403
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
404
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
405
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
406
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
407
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
408
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
409
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
// src/i18n/locales/ja.json
|
|
415
|
+
var ja_default = {
|
|
416
|
+
solutionpackager: {
|
|
417
|
+
projectLoader: {
|
|
418
|
+
errors: {
|
|
419
|
+
pathRequired: "Project directory path is required",
|
|
420
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
421
|
+
readFailed: "Failed to read project file: {path}",
|
|
422
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
validator: {
|
|
426
|
+
errors: {
|
|
427
|
+
destinationNotDefined: "Destination path is not defined",
|
|
428
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
429
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
430
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
packager: {
|
|
434
|
+
errors: {
|
|
435
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
436
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
governance: {
|
|
440
|
+
info: {
|
|
441
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
442
|
+
saved: "Governance policy saved to {path}",
|
|
443
|
+
downloading: "Downloading governance policy from {url}",
|
|
444
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
445
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
446
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
447
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
448
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
449
|
+
},
|
|
450
|
+
errors: {
|
|
451
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
452
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
453
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
454
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
signing: {
|
|
458
|
+
errors: {
|
|
459
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
dotnet: {
|
|
463
|
+
info: {
|
|
464
|
+
available: "dotnet CLI is available (version {version})."
|
|
465
|
+
},
|
|
466
|
+
warnings: {
|
|
467
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
publish: {
|
|
471
|
+
errors: {
|
|
472
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
473
|
+
packageNotFound: "Package file not found: {path}",
|
|
474
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
475
|
+
publishFailed: "Publish failed: {message}",
|
|
476
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
477
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
478
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
479
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
480
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
481
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
482
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
483
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
484
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
485
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
486
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
487
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
488
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
489
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
490
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
491
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
// src/i18n/locales/ko.json
|
|
497
|
+
var ko_default = {
|
|
498
|
+
solutionpackager: {
|
|
499
|
+
projectLoader: {
|
|
500
|
+
errors: {
|
|
501
|
+
pathRequired: "Project directory path is required",
|
|
502
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
503
|
+
readFailed: "Failed to read project file: {path}",
|
|
504
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
validator: {
|
|
508
|
+
errors: {
|
|
509
|
+
destinationNotDefined: "Destination path is not defined",
|
|
510
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
511
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
512
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
packager: {
|
|
516
|
+
errors: {
|
|
517
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
518
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
governance: {
|
|
522
|
+
info: {
|
|
523
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
524
|
+
saved: "Governance policy saved to {path}",
|
|
525
|
+
downloading: "Downloading governance policy from {url}",
|
|
526
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
527
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
528
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
529
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
530
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
531
|
+
},
|
|
532
|
+
errors: {
|
|
533
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
534
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
535
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
536
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
signing: {
|
|
540
|
+
errors: {
|
|
541
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
dotnet: {
|
|
545
|
+
info: {
|
|
546
|
+
available: "dotnet CLI is available (version {version})."
|
|
547
|
+
},
|
|
548
|
+
warnings: {
|
|
549
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
publish: {
|
|
553
|
+
errors: {
|
|
554
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
555
|
+
packageNotFound: "Package file not found: {path}",
|
|
556
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
557
|
+
publishFailed: "Publish failed: {message}",
|
|
558
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
559
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
560
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
561
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
562
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
563
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
564
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
565
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
566
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
567
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
568
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
569
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
570
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
571
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
572
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
573
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
// src/i18n/locales/pt.json
|
|
579
|
+
var pt_default = {
|
|
580
|
+
solutionpackager: {
|
|
581
|
+
projectLoader: {
|
|
582
|
+
errors: {
|
|
583
|
+
pathRequired: "Project directory path is required",
|
|
584
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
585
|
+
readFailed: "Failed to read project file: {path}",
|
|
586
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
validator: {
|
|
590
|
+
errors: {
|
|
591
|
+
destinationNotDefined: "Destination path is not defined",
|
|
592
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
593
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
594
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
packager: {
|
|
598
|
+
errors: {
|
|
599
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
600
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
governance: {
|
|
604
|
+
info: {
|
|
605
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
606
|
+
saved: "Governance policy saved to {path}",
|
|
607
|
+
downloading: "Downloading governance policy from {url}",
|
|
608
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
609
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
610
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
611
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
612
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
613
|
+
},
|
|
614
|
+
errors: {
|
|
615
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
616
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
617
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
618
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
signing: {
|
|
622
|
+
errors: {
|
|
623
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
dotnet: {
|
|
627
|
+
info: {
|
|
628
|
+
available: "dotnet CLI is available (version {version})."
|
|
629
|
+
},
|
|
630
|
+
warnings: {
|
|
631
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
publish: {
|
|
635
|
+
errors: {
|
|
636
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
637
|
+
packageNotFound: "Package file not found: {path}",
|
|
638
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
639
|
+
publishFailed: "Publish failed: {message}",
|
|
640
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
641
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
642
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
643
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
644
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
645
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
646
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
647
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
648
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
649
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
650
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
651
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
652
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
653
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
654
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
655
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
// src/i18n/locales/pt-BR.json
|
|
661
|
+
var pt_BR_default = {
|
|
662
|
+
solutionpackager: {
|
|
663
|
+
projectLoader: {
|
|
664
|
+
errors: {
|
|
665
|
+
pathRequired: "Project directory path is required",
|
|
666
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
667
|
+
readFailed: "Failed to read project file: {path}",
|
|
668
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
validator: {
|
|
672
|
+
errors: {
|
|
673
|
+
destinationNotDefined: "Destination path is not defined",
|
|
674
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
675
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
676
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
packager: {
|
|
680
|
+
errors: {
|
|
681
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
682
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
governance: {
|
|
686
|
+
info: {
|
|
687
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
688
|
+
saved: "Governance policy saved to {path}",
|
|
689
|
+
downloading: "Downloading governance policy from {url}",
|
|
690
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
691
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
692
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
693
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
694
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
695
|
+
},
|
|
696
|
+
errors: {
|
|
697
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
698
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
699
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
700
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
signing: {
|
|
704
|
+
errors: {
|
|
705
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
dotnet: {
|
|
709
|
+
info: {
|
|
710
|
+
available: "dotnet CLI is available (version {version})."
|
|
711
|
+
},
|
|
712
|
+
warnings: {
|
|
713
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
publish: {
|
|
717
|
+
errors: {
|
|
718
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
719
|
+
packageNotFound: "Package file not found: {path}",
|
|
720
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
721
|
+
publishFailed: "Publish failed: {message}",
|
|
722
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
723
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
724
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
725
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
726
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
727
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
728
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
729
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
730
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
731
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
732
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
733
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
734
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
735
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
736
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
737
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
// src/i18n/locales/ro.json
|
|
743
|
+
var ro_default = {
|
|
744
|
+
solutionpackager: {
|
|
745
|
+
projectLoader: {
|
|
746
|
+
errors: {
|
|
747
|
+
pathRequired: "Project directory path is required",
|
|
748
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
749
|
+
readFailed: "Failed to read project file: {path}",
|
|
750
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
validator: {
|
|
754
|
+
errors: {
|
|
755
|
+
destinationNotDefined: "Destination path is not defined",
|
|
756
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
757
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
758
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
packager: {
|
|
762
|
+
errors: {
|
|
763
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
764
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
governance: {
|
|
768
|
+
info: {
|
|
769
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
770
|
+
saved: "Governance policy saved to {path}",
|
|
771
|
+
downloading: "Downloading governance policy from {url}",
|
|
772
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
773
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
774
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
775
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
776
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
777
|
+
},
|
|
778
|
+
errors: {
|
|
779
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
780
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
781
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
782
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
signing: {
|
|
786
|
+
errors: {
|
|
787
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
dotnet: {
|
|
791
|
+
info: {
|
|
792
|
+
available: "dotnet CLI is available (version {version})."
|
|
793
|
+
},
|
|
794
|
+
warnings: {
|
|
795
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
publish: {
|
|
799
|
+
errors: {
|
|
800
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
801
|
+
packageNotFound: "Package file not found: {path}",
|
|
802
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
803
|
+
publishFailed: "Publish failed: {message}",
|
|
804
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
805
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
806
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
807
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
808
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
809
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
810
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
811
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
812
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
813
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
814
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
815
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
816
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
817
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
818
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
819
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
// src/i18n/locales/ru.json
|
|
825
|
+
var ru_default = {
|
|
826
|
+
solutionpackager: {
|
|
827
|
+
projectLoader: {
|
|
828
|
+
errors: {
|
|
829
|
+
pathRequired: "Project directory path is required",
|
|
830
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
831
|
+
readFailed: "Failed to read project file: {path}",
|
|
832
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
validator: {
|
|
836
|
+
errors: {
|
|
837
|
+
destinationNotDefined: "Destination path is not defined",
|
|
838
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
839
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
840
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
packager: {
|
|
844
|
+
errors: {
|
|
845
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
846
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
governance: {
|
|
850
|
+
info: {
|
|
851
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
852
|
+
saved: "Governance policy saved to {path}",
|
|
853
|
+
downloading: "Downloading governance policy from {url}",
|
|
854
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
855
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
856
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
857
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
858
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
859
|
+
},
|
|
860
|
+
errors: {
|
|
861
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
862
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
863
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
864
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
signing: {
|
|
868
|
+
errors: {
|
|
869
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
dotnet: {
|
|
873
|
+
info: {
|
|
874
|
+
available: "dotnet CLI is available (version {version})."
|
|
875
|
+
},
|
|
876
|
+
warnings: {
|
|
877
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
publish: {
|
|
881
|
+
errors: {
|
|
882
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
883
|
+
packageNotFound: "Package file not found: {path}",
|
|
884
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
885
|
+
publishFailed: "Publish failed: {message}",
|
|
886
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
887
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
888
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
889
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
890
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
891
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
892
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
893
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
894
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
895
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
896
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
897
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
898
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
899
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
900
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
901
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
// src/i18n/locales/tr.json
|
|
907
|
+
var tr_default = {
|
|
908
|
+
solutionpackager: {
|
|
909
|
+
projectLoader: {
|
|
910
|
+
errors: {
|
|
911
|
+
pathRequired: "Project directory path is required",
|
|
912
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
913
|
+
readFailed: "Failed to read project file: {path}",
|
|
914
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
validator: {
|
|
918
|
+
errors: {
|
|
919
|
+
destinationNotDefined: "Destination path is not defined",
|
|
920
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
921
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
922
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
packager: {
|
|
926
|
+
errors: {
|
|
927
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
928
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
governance: {
|
|
932
|
+
info: {
|
|
933
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
934
|
+
saved: "Governance policy saved to {path}",
|
|
935
|
+
downloading: "Downloading governance policy from {url}",
|
|
936
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
937
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
938
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
939
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
940
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
941
|
+
},
|
|
942
|
+
errors: {
|
|
943
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
944
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
945
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
946
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
signing: {
|
|
950
|
+
errors: {
|
|
951
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
dotnet: {
|
|
955
|
+
info: {
|
|
956
|
+
available: "dotnet CLI is available (version {version})."
|
|
957
|
+
},
|
|
958
|
+
warnings: {
|
|
959
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
publish: {
|
|
963
|
+
errors: {
|
|
964
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
965
|
+
packageNotFound: "Package file not found: {path}",
|
|
966
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
967
|
+
publishFailed: "Publish failed: {message}",
|
|
968
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
969
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
970
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
971
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
972
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
973
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
974
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
975
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
976
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
977
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
978
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
979
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
980
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
981
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
982
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
983
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
// src/i18n/locales/zh-CN.json
|
|
989
|
+
var zh_CN_default = {
|
|
990
|
+
solutionpackager: {
|
|
991
|
+
projectLoader: {
|
|
992
|
+
errors: {
|
|
993
|
+
pathRequired: "Project directory path is required",
|
|
994
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
995
|
+
readFailed: "Failed to read project file: {path}",
|
|
996
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
validator: {
|
|
1000
|
+
errors: {
|
|
1001
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1002
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1003
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1004
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
packager: {
|
|
1008
|
+
errors: {
|
|
1009
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1010
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
governance: {
|
|
1014
|
+
info: {
|
|
1015
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1016
|
+
saved: "Governance policy saved to {path}",
|
|
1017
|
+
downloading: "Downloading governance policy from {url}",
|
|
1018
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1019
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1020
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1021
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1022
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1023
|
+
},
|
|
1024
|
+
errors: {
|
|
1025
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1026
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1027
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1028
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
signing: {
|
|
1032
|
+
errors: {
|
|
1033
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
dotnet: {
|
|
1037
|
+
info: {
|
|
1038
|
+
available: "dotnet CLI is available (version {version})."
|
|
1039
|
+
},
|
|
1040
|
+
warnings: {
|
|
1041
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
publish: {
|
|
1045
|
+
errors: {
|
|
1046
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1047
|
+
packageNotFound: "Package file not found: {path}",
|
|
1048
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1049
|
+
publishFailed: "Publish failed: {message}",
|
|
1050
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1051
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1052
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1053
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1054
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1055
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1056
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1057
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1058
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1059
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1060
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1061
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1062
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1063
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1064
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1065
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
// src/i18n/locales/zh-TW.json
|
|
1071
|
+
var zh_TW_default = {
|
|
1072
|
+
solutionpackager: {
|
|
1073
|
+
projectLoader: {
|
|
1074
|
+
errors: {
|
|
1075
|
+
pathRequired: "Project directory path is required",
|
|
1076
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1077
|
+
readFailed: "Failed to read project file: {path}",
|
|
1078
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
validator: {
|
|
1082
|
+
errors: {
|
|
1083
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1084
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1085
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1086
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
packager: {
|
|
1090
|
+
errors: {
|
|
1091
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1092
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
governance: {
|
|
1096
|
+
info: {
|
|
1097
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1098
|
+
saved: "Governance policy saved to {path}",
|
|
1099
|
+
downloading: "Downloading governance policy from {url}",
|
|
1100
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1101
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1102
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1103
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1104
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1105
|
+
},
|
|
1106
|
+
errors: {
|
|
1107
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1108
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1109
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1110
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
signing: {
|
|
1114
|
+
errors: {
|
|
1115
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
dotnet: {
|
|
1119
|
+
info: {
|
|
1120
|
+
available: "dotnet CLI is available (version {version})."
|
|
1121
|
+
},
|
|
1122
|
+
warnings: {
|
|
1123
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
publish: {
|
|
1127
|
+
errors: {
|
|
1128
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1129
|
+
packageNotFound: "Package file not found: {path}",
|
|
1130
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1131
|
+
publishFailed: "Publish failed: {message}",
|
|
1132
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1133
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1134
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1135
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1136
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1137
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1138
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1139
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1140
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1141
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1142
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1143
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1144
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1145
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1146
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1147
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
// src/i18n/locales/zu.json
|
|
1153
|
+
var zu_default = {
|
|
1154
|
+
solutionpackager: {
|
|
1155
|
+
projectLoader: {
|
|
1156
|
+
errors: {
|
|
1157
|
+
pathRequired: "Project directory path is required",
|
|
1158
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1159
|
+
readFailed: "Failed to read project file: {path}",
|
|
1160
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
validator: {
|
|
1164
|
+
errors: {
|
|
1165
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1166
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1167
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1168
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
packager: {
|
|
1172
|
+
errors: {
|
|
1173
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1174
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
governance: {
|
|
1178
|
+
info: {
|
|
1179
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1180
|
+
saved: "Governance policy saved to {path}",
|
|
1181
|
+
downloading: "Downloading governance policy from {url}",
|
|
1182
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1183
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1184
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1185
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1186
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1187
|
+
},
|
|
1188
|
+
errors: {
|
|
1189
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1190
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1191
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1192
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
signing: {
|
|
1196
|
+
errors: {
|
|
1197
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
dotnet: {
|
|
1201
|
+
info: {
|
|
1202
|
+
available: "dotnet CLI is available (version {version})."
|
|
1203
|
+
},
|
|
1204
|
+
warnings: {
|
|
1205
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
publish: {
|
|
1209
|
+
errors: {
|
|
1210
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1211
|
+
packageNotFound: "Package file not found: {path}",
|
|
1212
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1213
|
+
publishFailed: "Publish failed: {message}",
|
|
1214
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1215
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1216
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1217
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1218
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1219
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1220
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1221
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1222
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1223
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1224
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1225
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1226
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1227
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1228
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1229
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
// src/i18n/index.ts
|
|
1236
|
+
I18nManager.registerTranslations("en", en);
|
|
1237
|
+
I18nManager.registerTranslations("de", de_default);
|
|
1238
|
+
I18nManager.registerTranslations("es", es_default);
|
|
1239
|
+
I18nManager.registerTranslations("es-MX", es_MX_default);
|
|
1240
|
+
I18nManager.registerTranslations("fr", fr_default);
|
|
1241
|
+
I18nManager.registerTranslations("ja", ja_default);
|
|
1242
|
+
I18nManager.registerTranslations("ko", ko_default);
|
|
1243
|
+
I18nManager.registerTranslations("pt", pt_default);
|
|
1244
|
+
I18nManager.registerTranslations("pt-BR", pt_BR_default);
|
|
1245
|
+
I18nManager.registerTranslations("ro", ro_default);
|
|
1246
|
+
I18nManager.registerTranslations("ru", ru_default);
|
|
1247
|
+
I18nManager.registerTranslations("tr", tr_default);
|
|
1248
|
+
I18nManager.registerTranslations("zh-CN", zh_CN_default);
|
|
1249
|
+
I18nManager.registerTranslations("zh-TW", zh_TW_default);
|
|
1250
|
+
I18nManager.registerTranslations("zu", zu_default);
|
|
1251
|
+
|
|
1252
|
+
// ../../common/dist/telemetry/index.js
|
|
1253
|
+
class BrowserContextStorage {
|
|
1254
|
+
contextStack = [];
|
|
1255
|
+
run(context, fn) {
|
|
1256
|
+
this.contextStack.push(context);
|
|
1257
|
+
try {
|
|
1258
|
+
const result = fn();
|
|
1259
|
+
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
1260
|
+
return result.finally(() => {
|
|
1261
|
+
this.contextStack.pop();
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
this.contextStack.pop();
|
|
1265
|
+
return result;
|
|
1266
|
+
} catch (error) {
|
|
1267
|
+
this.contextStack.pop();
|
|
1268
|
+
throw error;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
getContext() {
|
|
1272
|
+
return this.contextStack.length > 0 ? this.contextStack[this.contextStack.length - 1] : undefined;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
class ConsoleTelemetryProvider {
|
|
1277
|
+
async trackEvent(eventName, _properties) {
|
|
1278
|
+
console.debug(`[Telemetry] Event: ${eventName}`);
|
|
1279
|
+
}
|
|
1280
|
+
async trackException(error, _properties) {
|
|
1281
|
+
console.error(`[Telemetry] Exception: ${error.message}`);
|
|
1282
|
+
}
|
|
1283
|
+
async trackRequest(name, duration, success, _properties) {
|
|
1284
|
+
console.debug(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
1285
|
+
}
|
|
1286
|
+
async trackDependency(name, type, duration, success, _properties) {
|
|
1287
|
+
console.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
1291
|
+
"token",
|
|
1292
|
+
"tokens",
|
|
1293
|
+
"secret",
|
|
1294
|
+
"secrets",
|
|
1295
|
+
"password",
|
|
1296
|
+
"passwords",
|
|
1297
|
+
"pwd",
|
|
1298
|
+
"credential",
|
|
1299
|
+
"credentials",
|
|
1300
|
+
"auth",
|
|
1301
|
+
"authentication",
|
|
1302
|
+
"authorization",
|
|
1303
|
+
"authority",
|
|
1304
|
+
"cert",
|
|
1305
|
+
"certificate",
|
|
1306
|
+
"certificates"
|
|
1307
|
+
]);
|
|
1308
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
1309
|
+
"api",
|
|
1310
|
+
"access",
|
|
1311
|
+
"client",
|
|
1312
|
+
"private",
|
|
1313
|
+
"public",
|
|
1314
|
+
"signing",
|
|
1315
|
+
"encryption",
|
|
1316
|
+
"session",
|
|
1317
|
+
"master",
|
|
1318
|
+
"shared",
|
|
1319
|
+
"root",
|
|
1320
|
+
"ssh",
|
|
1321
|
+
"rsa",
|
|
1322
|
+
"aes",
|
|
1323
|
+
"hmac",
|
|
1324
|
+
"oauth"
|
|
1325
|
+
]);
|
|
1326
|
+
var PREFIX = "@uipath/common/";
|
|
1327
|
+
var _g = globalThis;
|
|
1328
|
+
function singleton(ctorOrName) {
|
|
1329
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
1330
|
+
const key = Symbol.for(PREFIX + name);
|
|
1331
|
+
return {
|
|
1332
|
+
get(fallback) {
|
|
1333
|
+
return _g[key] ?? fallback;
|
|
1334
|
+
},
|
|
1335
|
+
set(value) {
|
|
1336
|
+
_g[key] = value;
|
|
1337
|
+
},
|
|
1338
|
+
clear() {
|
|
1339
|
+
delete _g[key];
|
|
1340
|
+
},
|
|
1341
|
+
getOrInit(factory, guard) {
|
|
1342
|
+
const existing = _g[key];
|
|
1343
|
+
if (existing != null && typeof existing === "object") {
|
|
1344
|
+
if (!guard || guard(existing)) {
|
|
1345
|
+
return existing;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
const instance = factory();
|
|
1349
|
+
_g[key] = instance;
|
|
1350
|
+
return instance;
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
1355
|
+
function getGlobalTelemetryProperties() {
|
|
1356
|
+
return telemetryPropsSlot.get();
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
class TelemetryService {
|
|
1360
|
+
telemetryProvider;
|
|
1361
|
+
contextStorage;
|
|
1362
|
+
operationId;
|
|
1363
|
+
defaultProperties;
|
|
1364
|
+
constructor(telemetryProvider, contextStorage) {
|
|
1365
|
+
this.telemetryProvider = telemetryProvider;
|
|
1366
|
+
this.contextStorage = contextStorage;
|
|
1367
|
+
}
|
|
1368
|
+
setOperationId(operationId) {
|
|
1369
|
+
this.operationId = operationId;
|
|
1370
|
+
}
|
|
1371
|
+
setProvider(provider) {
|
|
1372
|
+
this.telemetryProvider = provider;
|
|
1373
|
+
}
|
|
1374
|
+
setDefaultProperties(properties) {
|
|
1375
|
+
this.defaultProperties = properties === undefined ? undefined : { ...this.defaultProperties, ...properties };
|
|
1376
|
+
}
|
|
1377
|
+
trackEvent(name, properties) {
|
|
1378
|
+
const context = this.getCurrentContext();
|
|
1379
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
1380
|
+
this.telemetryProvider.trackEvent(name, enrichedProperties);
|
|
1381
|
+
}
|
|
1382
|
+
trackException(error, properties) {
|
|
1383
|
+
const context = this.getCurrentContext();
|
|
1384
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
1385
|
+
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
1386
|
+
}
|
|
1387
|
+
async trackRequest(name, fn, properties) {
|
|
1388
|
+
const context = {
|
|
1389
|
+
operationId: this.operationId ?? this.generateId(),
|
|
1390
|
+
id: this.generateId()
|
|
1391
|
+
};
|
|
1392
|
+
const startTime = performance.now();
|
|
1393
|
+
try {
|
|
1394
|
+
const result = await this.contextStorage.run(context, fn);
|
|
1395
|
+
const durationMs = performance.now() - startTime;
|
|
1396
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
1397
|
+
await this.telemetryProvider.trackRequest(name, durationMs, true, enrichedProperties);
|
|
1398
|
+
return result;
|
|
1399
|
+
} catch (error) {
|
|
1400
|
+
const durationMs = performance.now() - startTime;
|
|
1401
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
1402
|
+
const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, context);
|
|
1403
|
+
await this.telemetryProvider.trackRequest(name, durationMs, false, enrichedProperties);
|
|
1404
|
+
throw error;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
async trackDependencyOperation(name, type, fn, properties) {
|
|
1408
|
+
const parentContext = this.getCurrentContext();
|
|
1409
|
+
if (!parentContext) {
|
|
1410
|
+
throw new Error("trackDependencyOperation must be called within a trackRequest block.");
|
|
1411
|
+
}
|
|
1412
|
+
const childContext = {
|
|
1413
|
+
operationId: parentContext.operationId,
|
|
1414
|
+
parentId: parentContext.id,
|
|
1415
|
+
id: this.generateId()
|
|
1416
|
+
};
|
|
1417
|
+
const startTime = performance.now();
|
|
1418
|
+
try {
|
|
1419
|
+
const result = await this.contextStorage.run(childContext, fn);
|
|
1420
|
+
const durationMs = performance.now() - startTime;
|
|
1421
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, childContext);
|
|
1422
|
+
await this.telemetryProvider.trackDependency(name, type, durationMs, true, enrichedProperties);
|
|
1423
|
+
return result;
|
|
1424
|
+
} catch (error) {
|
|
1425
|
+
const durationMs = performance.now() - startTime;
|
|
1426
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
1427
|
+
const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, childContext);
|
|
1428
|
+
await this.telemetryProvider.trackDependency(name, type, durationMs, false, enrichedProperties);
|
|
1429
|
+
throw error;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
getCurrentContext() {
|
|
1433
|
+
return this.contextStorage.getContext();
|
|
1434
|
+
}
|
|
1435
|
+
enrichPropertiesWithContext(properties, context) {
|
|
1436
|
+
return {
|
|
1437
|
+
...getGlobalTelemetryProperties(),
|
|
1438
|
+
...this.defaultProperties,
|
|
1439
|
+
...properties,
|
|
1440
|
+
...context
|
|
1441
|
+
};
|
|
1442
|
+
}
|
|
1443
|
+
generateId() {
|
|
1444
|
+
return crypto.randomUUID().replaceAll("-", "");
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
// src/base-browser-packager-factory.ts
|
|
1449
|
+
import { BrowserFileSystem } from "@uipath/filesystem/browser";
|
|
1450
|
+
import { translate } from "@uipath/solutionpackager-tool-core";
|
|
1451
|
+
|
|
1452
|
+
// src/services/tool-logger.ts
|
|
1453
|
+
import {
|
|
1454
|
+
LogLevel,
|
|
1455
|
+
LogMessage
|
|
1456
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1457
|
+
var globalLogHandler = (logMessage) => {
|
|
1458
|
+
const formattedMessage = logMessage.toFormattedString();
|
|
1459
|
+
switch (logMessage.logLevel) {
|
|
1460
|
+
case LogLevel.Debug:
|
|
1461
|
+
console.debug(formattedMessage);
|
|
1462
|
+
break;
|
|
1463
|
+
case LogLevel.Info:
|
|
1464
|
+
console.info(formattedMessage);
|
|
1465
|
+
break;
|
|
1466
|
+
case LogLevel.Warn:
|
|
1467
|
+
console.warn(formattedMessage);
|
|
1468
|
+
break;
|
|
1469
|
+
case LogLevel.Error:
|
|
1470
|
+
console.error(formattedMessage);
|
|
1471
|
+
break;
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
function setGlobalLogHandler(handler) {
|
|
1475
|
+
globalLogHandler = handler;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
class ToolLogger {
|
|
1479
|
+
source;
|
|
1480
|
+
sourceTarget;
|
|
1481
|
+
constructor(source, sourceTarget) {
|
|
1482
|
+
this.source = source;
|
|
1483
|
+
this.sourceTarget = sourceTarget;
|
|
1484
|
+
}
|
|
1485
|
+
debug(message, options) {
|
|
1486
|
+
const logMessage = new LogMessage(message, LogLevel.Debug, {
|
|
1487
|
+
source: this.source,
|
|
1488
|
+
sourceTarget: this.sourceTarget,
|
|
1489
|
+
...options
|
|
1490
|
+
});
|
|
1491
|
+
globalLogHandler(logMessage);
|
|
1492
|
+
}
|
|
1493
|
+
info(message, options) {
|
|
1494
|
+
const logMessage = new LogMessage(message, LogLevel.Info, {
|
|
1495
|
+
source: this.source,
|
|
1496
|
+
sourceTarget: this.sourceTarget,
|
|
1497
|
+
...options
|
|
1498
|
+
});
|
|
1499
|
+
globalLogHandler(logMessage);
|
|
1500
|
+
}
|
|
1501
|
+
warn(message, options) {
|
|
1502
|
+
const logMessage = new LogMessage(message, LogLevel.Warn, {
|
|
1503
|
+
source: this.source,
|
|
1504
|
+
sourceTarget: this.sourceTarget,
|
|
1505
|
+
...options
|
|
1506
|
+
});
|
|
1507
|
+
globalLogHandler(logMessage);
|
|
1508
|
+
}
|
|
1509
|
+
error(message, options) {
|
|
1510
|
+
const logMessage = new LogMessage(message, LogLevel.Error, {
|
|
1511
|
+
source: this.source,
|
|
1512
|
+
sourceTarget: this.sourceTarget,
|
|
1513
|
+
...options
|
|
1514
|
+
});
|
|
1515
|
+
globalLogHandler(logMessage);
|
|
1516
|
+
}
|
|
1517
|
+
progress(message, options) {
|
|
1518
|
+
const logMessage = new LogMessage(message, LogLevel.Info, {
|
|
1519
|
+
source: this.source,
|
|
1520
|
+
sourceTarget: this.sourceTarget,
|
|
1521
|
+
...options
|
|
1522
|
+
});
|
|
1523
|
+
globalLogHandler(logMessage);
|
|
1524
|
+
}
|
|
1525
|
+
log(message, logLevel, options) {
|
|
1526
|
+
const logMessage = new LogMessage(message, logLevel, {
|
|
1527
|
+
source: this.source,
|
|
1528
|
+
sourceTarget: this.sourceTarget,
|
|
1529
|
+
...options
|
|
1530
|
+
});
|
|
1531
|
+
globalLogHandler(logMessage);
|
|
1532
|
+
}
|
|
1533
|
+
logMessage(message) {
|
|
1534
|
+
globalLogHandler(message);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
// src/base-browser-packager-factory.ts
|
|
1539
|
+
var sharedFileSystem = null;
|
|
1540
|
+
var GLOBAL_FS_KEY = "__uipath_sharedFileSystem";
|
|
1541
|
+
|
|
1542
|
+
class BaseBrowserPackagerFactory {
|
|
1543
|
+
async getOrCreateFileSystem(config) {
|
|
1544
|
+
if (config?.fileSystem) {
|
|
1545
|
+
return config.fileSystem;
|
|
1546
|
+
}
|
|
1547
|
+
const globalRecord = globalThis;
|
|
1548
|
+
if (!sharedFileSystem) {
|
|
1549
|
+
sharedFileSystem = globalRecord[GLOBAL_FS_KEY] ?? null;
|
|
1550
|
+
}
|
|
1551
|
+
if (!sharedFileSystem) {
|
|
1552
|
+
const fs = new BrowserFileSystem;
|
|
1553
|
+
try {
|
|
1554
|
+
await fs.init();
|
|
1555
|
+
} catch (error) {
|
|
1556
|
+
if (error instanceof Error && error.message.includes("Mount point is already in use")) {
|
|
1557
|
+
fs.initialized = true;
|
|
1558
|
+
} else {
|
|
1559
|
+
throw error;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
sharedFileSystem = fs;
|
|
1563
|
+
globalRecord[GLOBAL_FS_KEY] = fs;
|
|
1564
|
+
}
|
|
1565
|
+
return sharedFileSystem;
|
|
1566
|
+
}
|
|
1567
|
+
getOrCreateTelemetryService(config) {
|
|
1568
|
+
if (config?.telemetryService) {
|
|
1569
|
+
return config.telemetryService;
|
|
1570
|
+
}
|
|
1571
|
+
const provider = new ConsoleTelemetryProvider;
|
|
1572
|
+
const contextStorage = new BrowserContextStorage;
|
|
1573
|
+
return new TelemetryService(provider, contextStorage);
|
|
1574
|
+
}
|
|
1575
|
+
configureLogHandler(config) {
|
|
1576
|
+
if (config?.logHandler) {
|
|
1577
|
+
setGlobalLogHandler(config.logHandler);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
configureLanguage(config) {
|
|
1581
|
+
const language = config?.language ?? "en";
|
|
1582
|
+
translate.setLocale(language);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
// src/services/project-packager.ts
|
|
1586
|
+
import {
|
|
1587
|
+
toolsFactoryRepository as defaultToolsFactoryRepository,
|
|
1588
|
+
NugetPackager,
|
|
1589
|
+
Path as Path3,
|
|
1590
|
+
TargetFramework,
|
|
1591
|
+
TemporaryStorageService,
|
|
1592
|
+
ToolErrorCodes as ToolErrorCodes3,
|
|
1593
|
+
ToolResult as ToolResult3,
|
|
1594
|
+
translate as translate5,
|
|
1595
|
+
ZipService
|
|
1596
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1597
|
+
|
|
1598
|
+
// src/services/governance-policy-service.ts
|
|
1599
|
+
import {
|
|
1600
|
+
Path,
|
|
1601
|
+
translate as translate2
|
|
1602
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1603
|
+
|
|
1604
|
+
// src/models/packager-parameters.ts
|
|
1605
|
+
import {
|
|
1606
|
+
LogLevel as LogLevel2
|
|
1607
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1608
|
+
class PackagerParameters {
|
|
1609
|
+
inputPath;
|
|
1610
|
+
downloadUrl;
|
|
1611
|
+
logLevel = LogLevel2.Warn;
|
|
1612
|
+
outputPath;
|
|
1613
|
+
targetFramework;
|
|
1614
|
+
excludeConfiguredSources = false;
|
|
1615
|
+
nuGetSourcesConfigPath;
|
|
1616
|
+
detailedLogPath;
|
|
1617
|
+
connection;
|
|
1618
|
+
workflowCompilerVersion;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
// src/services/governance-policy-service.ts
|
|
1622
|
+
var LICENSE_TYPES = {
|
|
1623
|
+
NoLicense: "NoLicense",
|
|
1624
|
+
Development: "Development",
|
|
1625
|
+
Attended: "Attended",
|
|
1626
|
+
Unattended: "Unattended",
|
|
1627
|
+
StudioX: "StudioX",
|
|
1628
|
+
StudioPro: "StudioPro",
|
|
1629
|
+
AutomationKit: "AutomationKit"
|
|
1630
|
+
};
|
|
1631
|
+
var DEFAULT_PROFILE_KEY = "StudioWeb";
|
|
1632
|
+
var ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense";
|
|
1633
|
+
var GOVERNANCE_SUBFOLDER = "governance";
|
|
1634
|
+
var GOVERNANCE_FILE_NAME = "governance-policy.json";
|
|
1635
|
+
var errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
1636
|
+
var t = (key, params) => translate2.t(`solutionpackager.governance.${key}`, params);
|
|
1637
|
+
|
|
1638
|
+
class GovernancePolicyService {
|
|
1639
|
+
fileSystem;
|
|
1640
|
+
temporaryStorage;
|
|
1641
|
+
fetchFn;
|
|
1642
|
+
logger = new ToolLogger("GovernancePolicyService", "ResolvePolicy");
|
|
1643
|
+
constructor(fileSystem, temporaryStorage, fetchFn = fetch.bind(globalThis)) {
|
|
1644
|
+
this.fileSystem = fileSystem;
|
|
1645
|
+
this.temporaryStorage = temporaryStorage;
|
|
1646
|
+
this.fetchFn = fetchFn;
|
|
1647
|
+
}
|
|
1648
|
+
async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken) {
|
|
1649
|
+
if (validateOptions.governanceFileType !== "AutomationOps" /* AutomationOps */) {
|
|
1650
|
+
return;
|
|
1651
|
+
}
|
|
1652
|
+
if (validateOptions.governanceFilePath) {
|
|
1653
|
+
this.logger.info(t("info.alreadyProvided"));
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1656
|
+
let cloudUrl = connectionInfo?.cloudUrl;
|
|
1657
|
+
const organizationId = connectionInfo?.organizationId;
|
|
1658
|
+
const tenantId = connectionInfo?.tenantId;
|
|
1659
|
+
const accessToken = connectionInfo?.accessToken;
|
|
1660
|
+
if (!cloudUrl || !organizationId || !tenantId || !accessToken) {
|
|
1661
|
+
this.logger.warn(t("errors.connectionIncomplete"));
|
|
1662
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1663
|
+
return;
|
|
1664
|
+
}
|
|
1665
|
+
const profileKey = validateOptions.profileKey ?? DEFAULT_PROFILE_KEY;
|
|
1666
|
+
let cloudOrigin;
|
|
1667
|
+
try {
|
|
1668
|
+
cloudOrigin = new URL(cloudUrl).origin;
|
|
1669
|
+
cloudUrl = cloudUrl.replace(/\/+$/, "");
|
|
1670
|
+
} catch {
|
|
1671
|
+
this.logger.warn(t("errors.connectionIncomplete"));
|
|
1672
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1673
|
+
return;
|
|
1674
|
+
}
|
|
1675
|
+
const licenseType = await this.resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken);
|
|
1676
|
+
const policy = await this.downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
|
|
1677
|
+
if (!policy) {
|
|
1678
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1679
|
+
return;
|
|
1680
|
+
}
|
|
1681
|
+
try {
|
|
1682
|
+
const dir = await this.temporaryStorage.getTempSubfolderPathAsync(GOVERNANCE_SUBFOLDER);
|
|
1683
|
+
const filePath = Path.join(dir, GOVERNANCE_FILE_NAME);
|
|
1684
|
+
await this.fileSystem.writeFile(filePath, policy);
|
|
1685
|
+
this.logger.info(t("info.saved", { path: filePath }));
|
|
1686
|
+
validateOptions.governanceFilePath = filePath;
|
|
1687
|
+
} catch (error) {
|
|
1688
|
+
this.logger.warn(t("errors.failedToSave", {
|
|
1689
|
+
error: errorMessage(error)
|
|
1690
|
+
}));
|
|
1691
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
async downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
|
|
1695
|
+
const policyUrl = `${cloudOrigin}/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
|
|
1696
|
+
this.logger.info(t("info.downloading", { url: policyUrl }));
|
|
1697
|
+
try {
|
|
1698
|
+
const response = await this.fetchFn(policyUrl, {
|
|
1699
|
+
headers: {
|
|
1700
|
+
Authorization: `Bearer ${accessToken}`,
|
|
1701
|
+
AccountId: organizationId
|
|
1702
|
+
},
|
|
1703
|
+
signal: cancellationToken
|
|
1704
|
+
});
|
|
1705
|
+
if (response.status === 204 || response.status === 404) {
|
|
1706
|
+
this.logger.info(t("info.noPolicyFound"));
|
|
1707
|
+
return null;
|
|
1708
|
+
}
|
|
1709
|
+
if (!response.ok) {
|
|
1710
|
+
const body = await response.text();
|
|
1711
|
+
this.logger.warn(t("errors.failedToGetPolicy", { content: body }));
|
|
1712
|
+
return null;
|
|
1713
|
+
}
|
|
1714
|
+
const content = await response.text();
|
|
1715
|
+
if (!content?.trimStart().startsWith("{")) {
|
|
1716
|
+
this.logger.info(t("info.responseNotJson"));
|
|
1717
|
+
return null;
|
|
1718
|
+
}
|
|
1719
|
+
return content;
|
|
1720
|
+
} catch (error) {
|
|
1721
|
+
this.logger.warn(t("errors.failedToDownload", {
|
|
1722
|
+
error: errorMessage(error)
|
|
1723
|
+
}));
|
|
1724
|
+
return null;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
|
|
1728
|
+
const isStudioWeb = profileKey === DEFAULT_PROFILE_KEY;
|
|
1729
|
+
const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
|
|
1730
|
+
try {
|
|
1731
|
+
const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
|
|
1732
|
+
method: "POST",
|
|
1733
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
1734
|
+
signal: cancellationToken
|
|
1735
|
+
});
|
|
1736
|
+
if (!response.ok) {
|
|
1737
|
+
this.logger.info(t("info.licenseStatus", {
|
|
1738
|
+
status: response.status,
|
|
1739
|
+
fallback
|
|
1740
|
+
}));
|
|
1741
|
+
return fallback;
|
|
1742
|
+
}
|
|
1743
|
+
const { isLicensed, robotType } = await response.json();
|
|
1744
|
+
this.logger.info(t("info.licenseResponse", {
|
|
1745
|
+
isLicensed: String(isLicensed),
|
|
1746
|
+
robotType: String(robotType)
|
|
1747
|
+
}));
|
|
1748
|
+
if (!isLicensed || !robotType) {
|
|
1749
|
+
return fallback;
|
|
1750
|
+
}
|
|
1751
|
+
if (isStudioWeb) {
|
|
1752
|
+
return robotType === LICENSE_TYPES.AutomationKit ? LICENSE_TYPES.AutomationKit : LICENSE_TYPES.NoLicense;
|
|
1753
|
+
}
|
|
1754
|
+
return robotType;
|
|
1755
|
+
} catch (error) {
|
|
1756
|
+
this.logger.info(t("info.licenseFailed", {
|
|
1757
|
+
error: errorMessage(error),
|
|
1758
|
+
fallback
|
|
1759
|
+
}));
|
|
1760
|
+
return fallback;
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
// src/services/pack-service.ts
|
|
1766
|
+
class PackService {
|
|
1767
|
+
disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
|
|
1768
|
+
spacesDotRegex = /[\s.]+/g;
|
|
1769
|
+
dotDashRegex = /\.{0,10}[-:]\.{0,10}/g;
|
|
1770
|
+
MaxPackageIdLength = 100;
|
|
1771
|
+
sanitizePackageId(packageId) {
|
|
1772
|
+
packageId = packageId.trim();
|
|
1773
|
+
packageId = packageId.replace(this.spacesDotRegex, ".");
|
|
1774
|
+
packageId = packageId.replace(this.dotDashRegex, "-");
|
|
1775
|
+
packageId = packageId.replace(this.disallowedCharsRegex, "_");
|
|
1776
|
+
if (packageId.length > this.MaxPackageIdLength) {
|
|
1777
|
+
throw new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
|
|
1778
|
+
}
|
|
1779
|
+
return packageId;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
// src/services/packager-parameters-validator.ts
|
|
1784
|
+
import {
|
|
1785
|
+
ToolErrorCodes,
|
|
1786
|
+
ToolResult,
|
|
1787
|
+
translate as translate3
|
|
1788
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1789
|
+
class PackagerParametersValidator {
|
|
1790
|
+
logger;
|
|
1791
|
+
fileSystem;
|
|
1792
|
+
constructor(logger, fileSystem) {
|
|
1793
|
+
this.logger = logger;
|
|
1794
|
+
this.fileSystem = fileSystem;
|
|
1795
|
+
}
|
|
1796
|
+
async validateAsync(_options, _cancellationToken) {
|
|
1797
|
+
return ToolResult.success();
|
|
1798
|
+
}
|
|
1799
|
+
validateDestinationPath(destinationPath) {
|
|
1800
|
+
if (!destinationPath) {
|
|
1801
|
+
const error = translate3.t("solutionpackager.validator.errors.destinationNotDefined");
|
|
1802
|
+
this.logger.error(error);
|
|
1803
|
+
return ToolResult.error(ToolErrorCodes.InternalError, error);
|
|
1804
|
+
}
|
|
1805
|
+
return ToolResult.success();
|
|
1806
|
+
}
|
|
1807
|
+
async validateGovernanceOptions(validateOptions) {
|
|
1808
|
+
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
1809
|
+
if (validateOptions.governanceFilePath) {
|
|
1810
|
+
this.logger.warn(`Governance file path '${validateOptions.governanceFilePath}' will be ignored when governance file type is Default`);
|
|
1811
|
+
}
|
|
1812
|
+
return ToolResult.success();
|
|
1813
|
+
}
|
|
1814
|
+
if (!validateOptions.governanceFilePath) {
|
|
1815
|
+
const error = translate3.t("solutionpackager.validator.errors.governanceRequired");
|
|
1816
|
+
this.logger.error(error);
|
|
1817
|
+
return ToolResult.error(ToolErrorCodes.InternalError, error);
|
|
1818
|
+
}
|
|
1819
|
+
try {
|
|
1820
|
+
const stat = await this.fileSystem.stat(validateOptions.governanceFilePath);
|
|
1821
|
+
if (!stat) {
|
|
1822
|
+
const error = translate3.t("solutionpackager.validator.errors.governanceFileInfo", {
|
|
1823
|
+
path: validateOptions.governanceFilePath
|
|
1824
|
+
});
|
|
1825
|
+
this.logger.error(error);
|
|
1826
|
+
return ToolResult.error(ToolErrorCodes.InternalError, error);
|
|
1827
|
+
}
|
|
1828
|
+
if (stat.isDirectory()) {
|
|
1829
|
+
const error = translate3.t("solutionpackager.validator.errors.governanceInvalidFile", {
|
|
1830
|
+
path: validateOptions.governanceFilePath
|
|
1831
|
+
});
|
|
1832
|
+
this.logger.error(error);
|
|
1833
|
+
return ToolResult.error(ToolErrorCodes.InternalError, error);
|
|
1834
|
+
}
|
|
1835
|
+
} catch (error) {
|
|
1836
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
1837
|
+
const errorLog = `Governance file not found or inaccessible: ${validateOptions.governanceFilePath}. Error: ${errorMessage2}`;
|
|
1838
|
+
this.logger.error(errorLog);
|
|
1839
|
+
return ToolResult.error(ToolErrorCodes.InternalError, errorLog);
|
|
1840
|
+
}
|
|
1841
|
+
this.logger.info(`Using Studio governance file: ${validateOptions.governanceFilePath}`);
|
|
1842
|
+
return ToolResult.success();
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
// src/services/project-build-options-validator.ts
|
|
1847
|
+
class ProjectBuildOptionsValidator extends PackagerParametersValidator {
|
|
1848
|
+
async validateAsync(options, _cancellationToken) {
|
|
1849
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
// src/services/project-loader.ts
|
|
1854
|
+
import {
|
|
1855
|
+
Path as Path2,
|
|
1856
|
+
ProjectTool,
|
|
1857
|
+
ProjectTypes,
|
|
1858
|
+
translate as translate4
|
|
1859
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1860
|
+
|
|
1861
|
+
class ProjectLoader {
|
|
1862
|
+
fileSystem;
|
|
1863
|
+
static WebAppManifestFileName = "webAppManifest.json";
|
|
1864
|
+
constructor(fileSystem) {
|
|
1865
|
+
this.fileSystem = fileSystem;
|
|
1866
|
+
}
|
|
1867
|
+
async loadProject(projectPath) {
|
|
1868
|
+
if (!projectPath) {
|
|
1869
|
+
throw new Error(translate4.t("solutionpackager.projectLoader.errors.pathRequired"));
|
|
1870
|
+
}
|
|
1871
|
+
const projectFilePath = Path2.join(projectPath, ProjectTool.ProjectFileName);
|
|
1872
|
+
const projectFileExists = await this.fileSystem.exists(projectFilePath);
|
|
1873
|
+
if (projectFileExists) {
|
|
1874
|
+
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
1875
|
+
}
|
|
1876
|
+
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
1877
|
+
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
1878
|
+
if (webAppManifestExists) {
|
|
1879
|
+
return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
|
|
1880
|
+
}
|
|
1881
|
+
throw new Error(translate4.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
1882
|
+
projectFile: ProjectTool.ProjectFileName,
|
|
1883
|
+
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
1884
|
+
path: projectPath
|
|
1885
|
+
}));
|
|
1886
|
+
}
|
|
1887
|
+
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
1888
|
+
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
1889
|
+
if (!fileContent) {
|
|
1890
|
+
throw new Error(translate4.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
1891
|
+
path: projectFilePath
|
|
1892
|
+
}));
|
|
1893
|
+
}
|
|
1894
|
+
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
1895
|
+
const projectData = JSON.parse(json);
|
|
1896
|
+
const projectType = projectData?.ProjectType || projectData?.type;
|
|
1897
|
+
if (!projectData || !projectType) {
|
|
1898
|
+
throw new Error(translate4.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
1899
|
+
path: projectFilePath
|
|
1900
|
+
}));
|
|
1901
|
+
}
|
|
1902
|
+
return {
|
|
1903
|
+
type: projectType,
|
|
1904
|
+
name: projectData.Name || Path2.basename(projectPath),
|
|
1905
|
+
projectPath,
|
|
1906
|
+
projectFilePath
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
1910
|
+
const folderName = Path2.basename(projectPath);
|
|
1911
|
+
return {
|
|
1912
|
+
type: ProjectTypes.AppV2,
|
|
1913
|
+
name: folderName,
|
|
1914
|
+
projectPath,
|
|
1915
|
+
projectFilePath: webAppManifestPath
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
// src/services/project-pack-options-builder.ts
|
|
1921
|
+
class ProjectPackOptionsBuilder {
|
|
1922
|
+
packService;
|
|
1923
|
+
fileSystem;
|
|
1924
|
+
constructor(packService, fileSystem) {
|
|
1925
|
+
this.packService = packService;
|
|
1926
|
+
this.fileSystem = fileSystem;
|
|
1927
|
+
}
|
|
1928
|
+
async buildProjectPackOptions(parameters, project) {
|
|
1929
|
+
if (!parameters.outputPath) {
|
|
1930
|
+
throw new Error("Output path is required for Pack command");
|
|
1931
|
+
}
|
|
1932
|
+
await this.fileSystem.mkdir(parameters.outputPath);
|
|
1933
|
+
const packageId = !parameters.package.id || parameters.package.id.trim() === "" ? project.name : parameters.package.id;
|
|
1934
|
+
const packageInfo = {
|
|
1935
|
+
...parameters.package,
|
|
1936
|
+
id: this.packService.sanitizePackageId(packageId)
|
|
1937
|
+
};
|
|
1938
|
+
return {
|
|
1939
|
+
projectPath: project.projectPath,
|
|
1940
|
+
excludeConfiguredSources: parameters.excludeConfiguredSources ?? false,
|
|
1941
|
+
nuGetSourcesConfigPath: parameters.nuGetSourcesConfigPath,
|
|
1942
|
+
logLevel: parameters.logLevel,
|
|
1943
|
+
skipAnalyze: parameters.validateOptions.skipAnalyze,
|
|
1944
|
+
skipValidate: parameters.validateOptions.skipValidate,
|
|
1945
|
+
detailedLogPath: parameters.detailedLogPath,
|
|
1946
|
+
policyFilePath: parameters.validateOptions.governanceFilePath,
|
|
1947
|
+
policyFileType: parameters.validateOptions.governanceFileType,
|
|
1948
|
+
outputPath: parameters.outputPath,
|
|
1949
|
+
outputType: parameters.outputType,
|
|
1950
|
+
projectType: project.type,
|
|
1951
|
+
package: packageInfo,
|
|
1952
|
+
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
1953
|
+
includeSources: parameters.packOptions?.includeSources ?? false,
|
|
1954
|
+
splitPackages: parameters.packOptions?.splitPackages ?? false
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
// src/services/project-pack-options-validator.ts
|
|
1960
|
+
class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
1961
|
+
async validateAsync(options, cancellationToken) {
|
|
1962
|
+
const destinationResult = this.validateDestinationPath(options.destinationPath);
|
|
1963
|
+
if (!destinationResult.isSuccess) {
|
|
1964
|
+
return destinationResult;
|
|
1965
|
+
}
|
|
1966
|
+
return await super.validateAsync(options, cancellationToken);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
// src/services/project-tool-executor.ts
|
|
1971
|
+
import {
|
|
1972
|
+
ToolErrorCodes as ToolErrorCodes2,
|
|
1973
|
+
ToolResult as ToolResult2
|
|
1974
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
1975
|
+
class ProjectToolExecutor {
|
|
1976
|
+
toolsFactory;
|
|
1977
|
+
telemetry;
|
|
1978
|
+
packageSignService;
|
|
1979
|
+
constructor(toolsFactory, telemetry, packageSignService) {
|
|
1980
|
+
this.toolsFactory = toolsFactory;
|
|
1981
|
+
this.telemetry = telemetry;
|
|
1982
|
+
this.packageSignService = packageSignService;
|
|
1983
|
+
}
|
|
1984
|
+
async restoreAsync(options, project, context, cancellationToken) {
|
|
1985
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Restore" /* ProjectToolRestore */, project.Type, async () => tool.restoreAsync(options, cancellationToken), {
|
|
1986
|
+
projectId: project.Id,
|
|
1987
|
+
projectType: project.Type
|
|
1988
|
+
}));
|
|
1989
|
+
}
|
|
1990
|
+
async validateAsync(options, project, context, cancellationToken) {
|
|
1991
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Validate" /* ProjectToolValidate */, project.Type, async () => tool.validateAsync(options, cancellationToken), {
|
|
1992
|
+
projectId: project.Id,
|
|
1993
|
+
projectType: project.Type
|
|
1994
|
+
}));
|
|
1995
|
+
}
|
|
1996
|
+
async buildAsync(options, project, context, cancellationToken) {
|
|
1997
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Build" /* ProjectToolBuild */, project.Type, async () => tool.buildAsync(options, cancellationToken), {
|
|
1998
|
+
projectId: project.Id,
|
|
1999
|
+
projectType: project.Type
|
|
2000
|
+
}));
|
|
2001
|
+
}
|
|
2002
|
+
async packAsync(options, project, context, signingInfo, cancellationToken) {
|
|
2003
|
+
return await this.executeToolOperationAsync(project, context, async (tool) => {
|
|
2004
|
+
const result = await this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Pack" /* ProjectToolPack */, project.Type, async () => {
|
|
2005
|
+
return await tool.packAsync(options, cancellationToken);
|
|
2006
|
+
}, {
|
|
2007
|
+
projectId: project.Id,
|
|
2008
|
+
projectType: project.Type
|
|
2009
|
+
});
|
|
2010
|
+
if (result.isSuccess && signingInfo?.certificatePath && result.packages.length > 0) {
|
|
2011
|
+
const signResult = await this.signPackagesAsync(result.packages, signingInfo);
|
|
2012
|
+
if (!signResult.isSuccess) {
|
|
2013
|
+
return signResult;
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
return result;
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
async executeToolOperationAsync(project, context, operation) {
|
|
2020
|
+
try {
|
|
2021
|
+
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
2022
|
+
try {
|
|
2023
|
+
return await operation(tool);
|
|
2024
|
+
} finally {
|
|
2025
|
+
const disposeResult = tool.dispose();
|
|
2026
|
+
if (disposeResult instanceof Promise) {
|
|
2027
|
+
await disposeResult;
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
} catch (error) {
|
|
2031
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, error instanceof Error ? error.message : String(error));
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
async signPackagesAsync(packages, signingInfo) {
|
|
2035
|
+
if (!this.packageSignService) {
|
|
2036
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, "Package signing is required but signing service is not available. Package signing requires dotnet CLI to be installed in Node.js environment.");
|
|
2037
|
+
}
|
|
2038
|
+
const certificatePath = signingInfo.certificatePath;
|
|
2039
|
+
const signResults = await Promise.all(packages.map((packagePath) => this.packageSignService?.signPackageAsync(packagePath, certificatePath, signingInfo.certificatePassword, signingInfo.timestampServer)));
|
|
2040
|
+
const failedResult = signResults.find((result) => result && !result.isSuccess);
|
|
2041
|
+
if (failedResult) {
|
|
2042
|
+
return failedResult;
|
|
2043
|
+
}
|
|
2044
|
+
return ToolResult2.success();
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
// src/services/project-validate-options-validator.ts
|
|
2049
|
+
class ProjectValidateOptionsValidator extends PackagerParametersValidator {
|
|
2050
|
+
async validateAsync(options, _cancellationToken) {
|
|
2051
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
// src/services/tools-factory.ts
|
|
2056
|
+
class ToolsFactory {
|
|
2057
|
+
repository;
|
|
2058
|
+
fileSystem;
|
|
2059
|
+
constructor(repository, fileSystem) {
|
|
2060
|
+
this.repository = repository;
|
|
2061
|
+
this.fileSystem = fileSystem;
|
|
2062
|
+
}
|
|
2063
|
+
async createSolutionToolAsync(solutionName) {
|
|
2064
|
+
const logger = new ToolLogger("ResourceBuilder", solutionName);
|
|
2065
|
+
const factory = this.repository.getSolutionToolFactory();
|
|
2066
|
+
return await factory.createAsync(logger, this.fileSystem);
|
|
2067
|
+
}
|
|
2068
|
+
async createProjectToolAsync(project, context) {
|
|
2069
|
+
const sourceTarget = getSourceTarget();
|
|
2070
|
+
const logger = new ToolLogger(project.Type, sourceTarget);
|
|
2071
|
+
if (!project.ProjectPath) {
|
|
2072
|
+
throw new Error(`Project path not set for project: ${project.Id}`);
|
|
2073
|
+
}
|
|
2074
|
+
const factory = this.repository.getProjectToolFactory(project.Type);
|
|
2075
|
+
return await factory.createAsync(logger, this.fileSystem, context);
|
|
2076
|
+
function getSourceTarget() {
|
|
2077
|
+
const segments = project.ProjectRelativePath.split(/[/\\]/);
|
|
2078
|
+
if (segments.length > 1) {
|
|
2079
|
+
return segments[0];
|
|
2080
|
+
}
|
|
2081
|
+
return project.Id;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
// src/services/project-packager.ts
|
|
2087
|
+
class ProjectPackager {
|
|
2088
|
+
fileSystem;
|
|
2089
|
+
telemetryService;
|
|
2090
|
+
packageSignService;
|
|
2091
|
+
repository;
|
|
2092
|
+
temporaryStorage;
|
|
2093
|
+
zipService;
|
|
2094
|
+
logger;
|
|
2095
|
+
optionsBuilder;
|
|
2096
|
+
toolsFactory;
|
|
2097
|
+
projectExecutor;
|
|
2098
|
+
projectLoader;
|
|
2099
|
+
validateOptionsValidator;
|
|
2100
|
+
buildOptionsValidator;
|
|
2101
|
+
packOptionsValidator;
|
|
2102
|
+
nugetPackager;
|
|
2103
|
+
governancePolicyService;
|
|
2104
|
+
constructor(fileSystem, telemetryService, packageSignService) {
|
|
2105
|
+
this.fileSystem = fileSystem;
|
|
2106
|
+
this.telemetryService = telemetryService;
|
|
2107
|
+
this.packageSignService = packageSignService;
|
|
2108
|
+
this.repository = defaultToolsFactoryRepository;
|
|
2109
|
+
this.temporaryStorage = new TemporaryStorageService(this.fileSystem);
|
|
2110
|
+
this.zipService = new ZipService(this.fileSystem);
|
|
2111
|
+
this.nugetPackager = new NugetPackager(this.fileSystem);
|
|
2112
|
+
this.logger = new ToolLogger("ProjectPackager", "PackProject");
|
|
2113
|
+
this.validateOptionsValidator = new ProjectValidateOptionsValidator(this.logger, this.fileSystem);
|
|
2114
|
+
this.buildOptionsValidator = new ProjectBuildOptionsValidator(this.logger, this.fileSystem);
|
|
2115
|
+
this.packOptionsValidator = new ProjectPackOptionsValidator(this.logger, this.fileSystem);
|
|
2116
|
+
const packService = new PackService;
|
|
2117
|
+
this.optionsBuilder = new ProjectPackOptionsBuilder(packService, this.fileSystem);
|
|
2118
|
+
this.toolsFactory = new ToolsFactory(this.repository, this.fileSystem);
|
|
2119
|
+
this.projectExecutor = new ProjectToolExecutor(this.toolsFactory, this.telemetryService, this.packageSignService);
|
|
2120
|
+
this.projectLoader = new ProjectLoader(this.fileSystem);
|
|
2121
|
+
this.governancePolicyService = new GovernancePolicyService(this.fileSystem, this.temporaryStorage);
|
|
2122
|
+
}
|
|
2123
|
+
async setupAsync(input, operationId) {
|
|
2124
|
+
this.telemetryService.setOperationId(operationId);
|
|
2125
|
+
await this.temporaryStorage.cleanup();
|
|
2126
|
+
if (typeof input === "string") {
|
|
2127
|
+
return input;
|
|
2128
|
+
}
|
|
2129
|
+
const inputPath = await this.temporaryStorage.getTempSubfolderPathAsync("input");
|
|
2130
|
+
await this.zipService.extractAsync(input, inputPath);
|
|
2131
|
+
const entries = await this.fileSystem.readdir(inputPath);
|
|
2132
|
+
if (entries.length === 1) {
|
|
2133
|
+
const innerPath = Path3.join(inputPath, entries[0]);
|
|
2134
|
+
const stat = await this.fileSystem.stat(innerPath);
|
|
2135
|
+
if (stat?.isDirectory()) {
|
|
2136
|
+
return innerPath;
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
return inputPath;
|
|
2140
|
+
}
|
|
2141
|
+
async restoreProjectAsync(options, cancellationToken) {
|
|
2142
|
+
return await this.executeProjectOperationAsync(options, "Restore", "ProjectPackager.Restore" /* ProjectPackagerRestore */, async (uiPathProject, loadedProject) => {
|
|
2143
|
+
const restoreOptions = {
|
|
2144
|
+
projectPath: loadedProject.projectPath,
|
|
2145
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
2146
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
2147
|
+
logLevel: options.logLevel,
|
|
2148
|
+
outputPath: options.outputPath
|
|
2149
|
+
};
|
|
2150
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, undefined, cancellationToken);
|
|
2151
|
+
}, cancellationToken);
|
|
2152
|
+
}
|
|
2153
|
+
async validateProjectAsync(options, cancellationToken) {
|
|
2154
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
2155
|
+
const validationResult = await this.validateOptionsValidator.validateAsync(options, cancellationToken);
|
|
2156
|
+
if (!validationResult.isSuccess) {
|
|
2157
|
+
return validationResult;
|
|
2158
|
+
}
|
|
2159
|
+
return await this.executeProjectOperationAsync(options, "Validate", "ProjectPackager.Validate" /* ProjectPackagerValidate */, async (uiPathProject, loadedProject) => {
|
|
2160
|
+
const validateOptions = {
|
|
2161
|
+
projectPath: loadedProject.projectPath,
|
|
2162
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
2163
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
2164
|
+
logLevel: options.logLevel,
|
|
2165
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
2166
|
+
skipValidate: options.validateOptions.skipValidate,
|
|
2167
|
+
defaultSeverity: options.validateOptions.defaultSeverity,
|
|
2168
|
+
detailedLogPath: options.detailedLogPath,
|
|
2169
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
2170
|
+
policyFileType: options.validateOptions.governanceFileType
|
|
2171
|
+
};
|
|
2172
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
2173
|
+
return await this.projectExecutor.validateAsync(validateOptions, uiPathProject, context, cancellationToken);
|
|
2174
|
+
}, cancellationToken);
|
|
2175
|
+
}
|
|
2176
|
+
async buildProjectAsync(options, cancellationToken) {
|
|
2177
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
2178
|
+
const validationResult = await this.buildOptionsValidator.validateAsync(options, cancellationToken);
|
|
2179
|
+
if (!validationResult.isSuccess) {
|
|
2180
|
+
return validationResult;
|
|
2181
|
+
}
|
|
2182
|
+
return await this.executeProjectOperationAsync(options, "Build", "ProjectPackager.Build" /* ProjectPackagerBuild */, async (uiPathProject, loadedProject) => {
|
|
2183
|
+
if (!options.outputPath) {
|
|
2184
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
2185
|
+
}
|
|
2186
|
+
const buildOptions = {
|
|
2187
|
+
projectPath: loadedProject.projectPath,
|
|
2188
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
2189
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
2190
|
+
logLevel: options.logLevel,
|
|
2191
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
2192
|
+
skipValidate: options.validateOptions.skipValidate,
|
|
2193
|
+
detailedLogPath: options.detailedLogPath,
|
|
2194
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
2195
|
+
policyFileType: options.validateOptions.governanceFileType,
|
|
2196
|
+
outputPath: options.outputPath,
|
|
2197
|
+
outputType: options.outputType,
|
|
2198
|
+
projectType: uiPathProject.Type
|
|
2199
|
+
};
|
|
2200
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, undefined, cancellationToken);
|
|
2201
|
+
}, cancellationToken);
|
|
2202
|
+
}
|
|
2203
|
+
async packProjectAsync(options, cancellationToken) {
|
|
2204
|
+
return await this.telemetryService.trackRequest("ProjectPackager.Pack" /* ProjectPackagerPack */, async () => {
|
|
2205
|
+
try {
|
|
2206
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
2207
|
+
let result = await this.packOptionsValidator.validateAsync(options, cancellationToken);
|
|
2208
|
+
if (!result.isSuccess) {
|
|
2209
|
+
return result;
|
|
2210
|
+
}
|
|
2211
|
+
if (!options.outputPath) {
|
|
2212
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
2213
|
+
}
|
|
2214
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
2215
|
+
this.telemetryService.trackEvent("ProjectPackager.ProjectLoaded" /* ProjectPackagerProjectLoaded */, { projectId: loadedProject.name });
|
|
2216
|
+
const projectPackOptions = await this.optionsBuilder.buildProjectPackOptions(options, loadedProject);
|
|
2217
|
+
const uiPathProject = {
|
|
2218
|
+
Type: loadedProject.type,
|
|
2219
|
+
ProjectRelativePath: Path3.basename(loadedProject.projectFilePath),
|
|
2220
|
+
ProjectPath: loadedProject.projectPath,
|
|
2221
|
+
Id: loadedProject.name
|
|
2222
|
+
};
|
|
2223
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
2224
|
+
result = await this.projectExecutor.packAsync(projectPackOptions, uiPathProject, context, options.signingInfo, cancellationToken);
|
|
2225
|
+
if (result.isSuccess && result.packages.length > 0) {
|
|
2226
|
+
const destinationPackages = await this.copyPackagesToDestination(result.packages, options.destinationPath, projectPackOptions.package);
|
|
2227
|
+
result = new ToolResult3(ToolErrorCodes3.Success, undefined, destinationPackages);
|
|
2228
|
+
}
|
|
2229
|
+
if (result.isSuccess) {
|
|
2230
|
+
this.logger.info(`Project pack completed successfully. Packages: ${result.packages.join(", ")}`);
|
|
2231
|
+
} else {
|
|
2232
|
+
this.logger.error(`Project pack failed with error code ${result.errorCode}: ${result.message}`);
|
|
2233
|
+
}
|
|
2234
|
+
return result;
|
|
2235
|
+
} catch (error) {
|
|
2236
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
2237
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
2238
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, `Project pack failed: ${errorMessage2}`);
|
|
2239
|
+
} finally {
|
|
2240
|
+
await this.temporaryStorage.cleanup();
|
|
2241
|
+
}
|
|
2242
|
+
});
|
|
2243
|
+
}
|
|
2244
|
+
async getPackageStreamsAsync(result) {
|
|
2245
|
+
if (!result.isSuccess) {
|
|
2246
|
+
throw new Error(translate5.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
2247
|
+
errorCode: result.errorCode,
|
|
2248
|
+
message: result.message ?? ""
|
|
2249
|
+
}));
|
|
2250
|
+
}
|
|
2251
|
+
if (!result.packages || result.packages.length === 0) {
|
|
2252
|
+
return [];
|
|
2253
|
+
}
|
|
2254
|
+
const packageStreams = [];
|
|
2255
|
+
for (const packagePath of result.packages) {
|
|
2256
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
2257
|
+
if (!data) {
|
|
2258
|
+
throw new Error(translate5.t("solutionpackager.packager.errors.failedToReadPackage", {
|
|
2259
|
+
path: packagePath
|
|
2260
|
+
}));
|
|
2261
|
+
}
|
|
2262
|
+
const name = packagePath.split(/[\\/]/).pop() || packagePath;
|
|
2263
|
+
packageStreams.push({ name, data });
|
|
2264
|
+
}
|
|
2265
|
+
return packageStreams;
|
|
2266
|
+
}
|
|
2267
|
+
async executeProjectOperationAsync(options, operationName, telemetryName, operation, _cancellationToken) {
|
|
2268
|
+
return await this.telemetryService.trackRequest(telemetryName, async () => {
|
|
2269
|
+
try {
|
|
2270
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
2271
|
+
const uiPathProject = {
|
|
2272
|
+
Type: loadedProject.type,
|
|
2273
|
+
ProjectRelativePath: Path3.basename(loadedProject.projectFilePath),
|
|
2274
|
+
ProjectPath: loadedProject.projectPath,
|
|
2275
|
+
Id: loadedProject.name
|
|
2276
|
+
};
|
|
2277
|
+
const operationResult = await operation(uiPathProject, loadedProject);
|
|
2278
|
+
if (operationResult.isSuccess) {
|
|
2279
|
+
this.logger.info(`Project ${operationName.toLowerCase()} completed successfully.`);
|
|
2280
|
+
} else {
|
|
2281
|
+
this.logger.error(`Project ${operationName.toLowerCase()} failed with error code ${operationResult.errorCode}: ${operationResult.message}`);
|
|
2282
|
+
}
|
|
2283
|
+
return operationResult;
|
|
2284
|
+
} catch (error) {
|
|
2285
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
2286
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
2287
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, `Project ${operationName.toLowerCase()} failed: ${errorMessage2}`);
|
|
2288
|
+
} finally {
|
|
2289
|
+
await this.temporaryStorage.cleanup();
|
|
2290
|
+
}
|
|
2291
|
+
});
|
|
2292
|
+
}
|
|
2293
|
+
createOperationContext(options, uiPathProject) {
|
|
2294
|
+
return {
|
|
2295
|
+
id: crypto.randomUUID(),
|
|
2296
|
+
projects: [uiPathProject],
|
|
2297
|
+
downloadUrl: options.downloadUrl,
|
|
2298
|
+
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
2299
|
+
connection: options.connection,
|
|
2300
|
+
logger: this.logger,
|
|
2301
|
+
workflowCompilerVersion: options.workflowCompilerVersion
|
|
2302
|
+
};
|
|
2303
|
+
}
|
|
2304
|
+
async findNupkgInParentDir(packagePath) {
|
|
2305
|
+
const dirName = Path3.basename(packagePath);
|
|
2306
|
+
const parentDir = Path3.dirname(packagePath);
|
|
2307
|
+
const parentFiles = await this.fileSystem.readdir(parentDir);
|
|
2308
|
+
const matchingFiles = parentFiles.filter((f) => f.endsWith(".nupkg") && f.startsWith(`${dirName}.`));
|
|
2309
|
+
return { dir: parentDir, files: matchingFiles };
|
|
2310
|
+
}
|
|
2311
|
+
async copyFileToDestination(sourcePath, destinationPath) {
|
|
2312
|
+
const fileName = Path3.basename(sourcePath);
|
|
2313
|
+
const destPath = Path3.join(destinationPath, fileName);
|
|
2314
|
+
const data = await this.fileSystem.readFile(sourcePath);
|
|
2315
|
+
if (!data) {
|
|
2316
|
+
throw new Error(translate5.t("solutionpackager.packager.errors.failedToReadPackage", { path: sourcePath }));
|
|
2317
|
+
}
|
|
2318
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
2319
|
+
return destPath;
|
|
2320
|
+
}
|
|
2321
|
+
async copyPackagesToDestination(packagePaths, destinationPath, packageInfo) {
|
|
2322
|
+
await this.fileSystem.mkdir(destinationPath);
|
|
2323
|
+
const destinationPackages = [];
|
|
2324
|
+
for (const packagePath of packagePaths) {
|
|
2325
|
+
const stat = await this.fileSystem.stat(packagePath);
|
|
2326
|
+
if (stat?.isDirectory()) {
|
|
2327
|
+
const files = await this.fileSystem.readdir(packagePath);
|
|
2328
|
+
const nupkgFiles = files.filter((f) => f.endsWith(".nupkg"));
|
|
2329
|
+
if (nupkgFiles.length > 0) {
|
|
2330
|
+
for (const nupkgFile of nupkgFiles) {
|
|
2331
|
+
const filePath = Path3.join(packagePath, nupkgFile);
|
|
2332
|
+
const dest = await this.copyFileToDestination(filePath, destinationPath);
|
|
2333
|
+
destinationPackages.push(dest);
|
|
2334
|
+
}
|
|
2335
|
+
} else {
|
|
2336
|
+
const parent = await this.findNupkgInParentDir(packagePath);
|
|
2337
|
+
if (parent.files.length > 0) {
|
|
2338
|
+
for (const nupkgFile of parent.files) {
|
|
2339
|
+
const filePath = Path3.join(parent.dir, nupkgFile);
|
|
2340
|
+
const dest = await this.copyFileToDestination(filePath, destinationPath);
|
|
2341
|
+
destinationPackages.push(dest);
|
|
2342
|
+
}
|
|
2343
|
+
} else {
|
|
2344
|
+
const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
|
|
2345
|
+
const destPath = Path3.join(destinationPath, nupkgFileName);
|
|
2346
|
+
const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
|
|
2347
|
+
destinationPackages.push(packResult.outputPath);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
} else {
|
|
2351
|
+
const dest = await this.copyFileToDestination(packagePath, destinationPath);
|
|
2352
|
+
destinationPackages.push(dest);
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
return destinationPackages;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
// src/browser-project-packager-factory.ts
|
|
2360
|
+
class BrowserProjectPackagerFactory extends BaseBrowserPackagerFactory {
|
|
2361
|
+
async createAsync(config) {
|
|
2362
|
+
const logger = new ToolLogger("ProjectPackagerFactory", "Create");
|
|
2363
|
+
this.configureLanguage(config);
|
|
2364
|
+
this.configureLogHandler(config);
|
|
2365
|
+
logger.info("Creating ProjectPackager instance...");
|
|
2366
|
+
const fileSystem = await this.getOrCreateFileSystem(config);
|
|
2367
|
+
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
2368
|
+
const projectPackager = new ProjectPackager(fileSystem, telemetryService);
|
|
2369
|
+
logger.info("ProjectPackager created successfully.");
|
|
2370
|
+
return projectPackager;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
async function createBrowserProjectPackager(options) {
|
|
2374
|
+
const factory = new BrowserProjectPackagerFactory;
|
|
2375
|
+
return factory.createAsync(options);
|
|
2376
|
+
}
|
|
2377
|
+
export {
|
|
2378
|
+
createBrowserProjectPackager,
|
|
2379
|
+
BaseBrowserPackagerFactory
|
|
2380
|
+
};
|