@uipath/project-packager 1.1.15 → 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 +1226 -89
- package/dist/node.js +1160 -75
- package/dist/src/base-browser-packager-factory.d.ts +37 -0
- package/dist/src/base-node-packager-factory.d.ts +8 -1
- 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 +4 -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 +10 -1
- 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 +0 -12
- package/dist/tests/{project-packager-e2e.test.d.ts → project-packager.e2e.test.d.ts} +1 -0
- package/dist/tests/publish/local-folder-publisher.spec.d.ts +1 -0
- package/dist/tests/publish/node-project-publisher-factory.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 +22 -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-tool-executor.test.d.ts → project-pack-options-builder.spec.d.ts} +0 -0
- /package/dist/tests/{project-packager.test.d.ts → project-packager.spec.d.ts} +0 -0
- /package/dist/tests/{tools-factory-repository.test.d.ts → project-tool-executor.spec.d.ts} +0 -0
package/dist/node.js
CHANGED
|
@@ -46,9 +46,38 @@ var de_default = {
|
|
|
46
46
|
signing: {
|
|
47
47
|
errors: {
|
|
48
48
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
dotnet: {
|
|
50
52
|
info: {
|
|
51
|
-
|
|
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}"
|
|
52
81
|
}
|
|
53
82
|
}
|
|
54
83
|
}
|
|
@@ -100,9 +129,38 @@ var en = {
|
|
|
100
129
|
signing: {
|
|
101
130
|
errors: {
|
|
102
131
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
103
|
-
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
dotnet: {
|
|
104
135
|
info: {
|
|
105
|
-
|
|
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}"
|
|
106
164
|
}
|
|
107
165
|
}
|
|
108
166
|
}
|
|
@@ -153,9 +211,38 @@ var es_default = {
|
|
|
153
211
|
signing: {
|
|
154
212
|
errors: {
|
|
155
213
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
156
|
-
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
dotnet: {
|
|
157
217
|
info: {
|
|
158
|
-
|
|
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}"
|
|
159
246
|
}
|
|
160
247
|
}
|
|
161
248
|
}
|
|
@@ -206,9 +293,38 @@ var es_MX_default = {
|
|
|
206
293
|
signing: {
|
|
207
294
|
errors: {
|
|
208
295
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
209
|
-
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
dotnet: {
|
|
210
299
|
info: {
|
|
211
|
-
|
|
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}"
|
|
212
328
|
}
|
|
213
329
|
}
|
|
214
330
|
}
|
|
@@ -259,9 +375,38 @@ var fr_default = {
|
|
|
259
375
|
signing: {
|
|
260
376
|
errors: {
|
|
261
377
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
262
|
-
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
dotnet: {
|
|
263
381
|
info: {
|
|
264
|
-
|
|
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}"
|
|
265
410
|
}
|
|
266
411
|
}
|
|
267
412
|
}
|
|
@@ -312,9 +457,38 @@ var ja_default = {
|
|
|
312
457
|
signing: {
|
|
313
458
|
errors: {
|
|
314
459
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
315
|
-
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
dotnet: {
|
|
316
463
|
info: {
|
|
317
|
-
|
|
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}"
|
|
318
492
|
}
|
|
319
493
|
}
|
|
320
494
|
}
|
|
@@ -365,9 +539,38 @@ var ko_default = {
|
|
|
365
539
|
signing: {
|
|
366
540
|
errors: {
|
|
367
541
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
368
|
-
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
dotnet: {
|
|
369
545
|
info: {
|
|
370
|
-
|
|
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}"
|
|
371
574
|
}
|
|
372
575
|
}
|
|
373
576
|
}
|
|
@@ -418,9 +621,38 @@ var pt_default = {
|
|
|
418
621
|
signing: {
|
|
419
622
|
errors: {
|
|
420
623
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
421
|
-
}
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
dotnet: {
|
|
422
627
|
info: {
|
|
423
|
-
|
|
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}"
|
|
424
656
|
}
|
|
425
657
|
}
|
|
426
658
|
}
|
|
@@ -471,9 +703,38 @@ var pt_BR_default = {
|
|
|
471
703
|
signing: {
|
|
472
704
|
errors: {
|
|
473
705
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
474
|
-
}
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
dotnet: {
|
|
475
709
|
info: {
|
|
476
|
-
|
|
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}"
|
|
477
738
|
}
|
|
478
739
|
}
|
|
479
740
|
}
|
|
@@ -524,9 +785,38 @@ var ro_default = {
|
|
|
524
785
|
signing: {
|
|
525
786
|
errors: {
|
|
526
787
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
527
|
-
}
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
dotnet: {
|
|
528
791
|
info: {
|
|
529
|
-
|
|
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}"
|
|
530
820
|
}
|
|
531
821
|
}
|
|
532
822
|
}
|
|
@@ -577,9 +867,38 @@ var ru_default = {
|
|
|
577
867
|
signing: {
|
|
578
868
|
errors: {
|
|
579
869
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
580
|
-
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
dotnet: {
|
|
581
873
|
info: {
|
|
582
|
-
|
|
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}"
|
|
583
902
|
}
|
|
584
903
|
}
|
|
585
904
|
}
|
|
@@ -630,9 +949,38 @@ var tr_default = {
|
|
|
630
949
|
signing: {
|
|
631
950
|
errors: {
|
|
632
951
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
633
|
-
}
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
dotnet: {
|
|
634
955
|
info: {
|
|
635
|
-
|
|
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}"
|
|
636
984
|
}
|
|
637
985
|
}
|
|
638
986
|
}
|
|
@@ -683,9 +1031,38 @@ var zh_CN_default = {
|
|
|
683
1031
|
signing: {
|
|
684
1032
|
errors: {
|
|
685
1033
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
686
|
-
}
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
dotnet: {
|
|
687
1037
|
info: {
|
|
688
|
-
|
|
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}"
|
|
689
1066
|
}
|
|
690
1067
|
}
|
|
691
1068
|
}
|
|
@@ -736,9 +1113,38 @@ var zh_TW_default = {
|
|
|
736
1113
|
signing: {
|
|
737
1114
|
errors: {
|
|
738
1115
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
739
|
-
}
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
dotnet: {
|
|
740
1119
|
info: {
|
|
741
|
-
|
|
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}"
|
|
742
1148
|
}
|
|
743
1149
|
}
|
|
744
1150
|
}
|
|
@@ -789,9 +1195,38 @@ var zu_default = {
|
|
|
789
1195
|
signing: {
|
|
790
1196
|
errors: {
|
|
791
1197
|
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
792
|
-
}
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
dotnet: {
|
|
793
1201
|
info: {
|
|
794
|
-
|
|
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}"
|
|
795
1230
|
}
|
|
796
1231
|
}
|
|
797
1232
|
}
|
|
@@ -823,7 +1258,6 @@ import {
|
|
|
823
1258
|
import { ConsoleTelemetryProvider } from "@uipath/common/telemetry";
|
|
824
1259
|
|
|
825
1260
|
// src/base-node-packager-factory.ts
|
|
826
|
-
import { execSync } from "node:child_process";
|
|
827
1261
|
import {
|
|
828
1262
|
DebugTelemetryProvider,
|
|
829
1263
|
NodeContextStorage,
|
|
@@ -920,6 +1354,7 @@ class ToolLogger {
|
|
|
920
1354
|
|
|
921
1355
|
// src/base-node-packager-factory.ts
|
|
922
1356
|
class BaseNodePackagerFactory {
|
|
1357
|
+
dotnetDiscovery;
|
|
923
1358
|
getOrCreateFileSystem(config) {
|
|
924
1359
|
return config?.fileSystem ?? new NodeFileSystem;
|
|
925
1360
|
}
|
|
@@ -932,14 +1367,16 @@ class BaseNodePackagerFactory {
|
|
|
932
1367
|
return new TelemetryService(provider, contextStorage);
|
|
933
1368
|
}
|
|
934
1369
|
checkDotnetAvailability(logger) {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
logger.info("dotnet
|
|
941
|
-
|
|
942
|
-
|
|
1370
|
+
if (!this.dotnetDiscovery) {
|
|
1371
|
+
return;
|
|
1372
|
+
}
|
|
1373
|
+
const version = this.dotnetDiscovery.getDotnetVersion();
|
|
1374
|
+
if (version) {
|
|
1375
|
+
logger.info(translate.t("solutionpackager.dotnet.info.available", {
|
|
1376
|
+
version
|
|
1377
|
+
}));
|
|
1378
|
+
} else {
|
|
1379
|
+
logger.warn(translate.t("solutionpackager.dotnet.warnings.notAvailable"));
|
|
943
1380
|
}
|
|
944
1381
|
}
|
|
945
1382
|
configureLogHandler(config) {
|
|
@@ -990,6 +1427,7 @@ class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
|
990
1427
|
|
|
991
1428
|
// src/models/project-build-options.ts
|
|
992
1429
|
class ProjectBuildOptions extends ProjectValidateOptions {
|
|
1430
|
+
outputType;
|
|
993
1431
|
}
|
|
994
1432
|
// src/models/project-pack-options.ts
|
|
995
1433
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
@@ -998,8 +1436,33 @@ class ProjectPackOptions extends ProjectBuildOptions {
|
|
|
998
1436
|
signingInfo;
|
|
999
1437
|
packOptions;
|
|
1000
1438
|
}
|
|
1439
|
+
// src/services/dotnet-discovery-service.ts
|
|
1440
|
+
import { execSync } from "node:child_process";
|
|
1441
|
+
|
|
1442
|
+
class DotnetDiscoveryService {
|
|
1443
|
+
cachedVersion;
|
|
1444
|
+
isDotnetAvailable() {
|
|
1445
|
+
return this.getDotnetVersion() !== undefined;
|
|
1446
|
+
}
|
|
1447
|
+
getDotnetVersion() {
|
|
1448
|
+
if (this.cachedVersion !== undefined) {
|
|
1449
|
+
return this.cachedVersion;
|
|
1450
|
+
}
|
|
1451
|
+
try {
|
|
1452
|
+
const output = execSync("dotnet --version", {
|
|
1453
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
1454
|
+
encoding: "utf-8"
|
|
1455
|
+
});
|
|
1456
|
+
this.cachedVersion = output.trim();
|
|
1457
|
+
return this.cachedVersion;
|
|
1458
|
+
} catch {
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1001
1464
|
// src/services/package-sign-service.ts
|
|
1002
|
-
import {
|
|
1465
|
+
import { spawn } from "node:child_process";
|
|
1003
1466
|
import {
|
|
1004
1467
|
ToolErrorCodes,
|
|
1005
1468
|
ToolResult,
|
|
@@ -1007,13 +1470,14 @@ import {
|
|
|
1007
1470
|
} from "@uipath/solutionpackager-tool-core";
|
|
1008
1471
|
|
|
1009
1472
|
class NodePackageSignService {
|
|
1473
|
+
dotnetDiscovery;
|
|
1010
1474
|
logger;
|
|
1011
|
-
constructor(logger) {
|
|
1475
|
+
constructor(dotnetDiscovery, logger) {
|
|
1476
|
+
this.dotnetDiscovery = dotnetDiscovery;
|
|
1012
1477
|
this.logger = logger;
|
|
1013
1478
|
}
|
|
1014
1479
|
async signPackageAsync(packagePath, certificatePath, certificatePassword, timestampServer) {
|
|
1015
|
-
if (!this.
|
|
1016
|
-
this.logger.error(translate2.t("solutionpackager.signing.info.dotnetNotAvailable"));
|
|
1480
|
+
if (!this.dotnetDiscovery.isDotnetAvailable()) {
|
|
1017
1481
|
return ToolResult.error(ToolErrorCodes.InternalError, translate2.t("solutionpackager.signing.errors.dotnetNotAvailable"));
|
|
1018
1482
|
}
|
|
1019
1483
|
const args = [
|
|
@@ -1059,18 +1523,6 @@ class NodePackageSignService {
|
|
|
1059
1523
|
});
|
|
1060
1524
|
});
|
|
1061
1525
|
}
|
|
1062
|
-
checkAvailable() {
|
|
1063
|
-
try {
|
|
1064
|
-
const output = execSync2("dotnet nuget --version", {
|
|
1065
|
-
stdio: ["ignore", "pipe", "ignore"],
|
|
1066
|
-
encoding: "utf-8"
|
|
1067
|
-
});
|
|
1068
|
-
this.logger.info(`dotnet CLI found, version ${output.trim()}`);
|
|
1069
|
-
return true;
|
|
1070
|
-
} catch {
|
|
1071
|
-
return false;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
1526
|
}
|
|
1075
1527
|
|
|
1076
1528
|
// src/services/project-packager.ts
|
|
@@ -1103,7 +1555,6 @@ var TelemetryNames;
|
|
|
1103
1555
|
// src/services/governance-policy-service.ts
|
|
1104
1556
|
import {
|
|
1105
1557
|
Path,
|
|
1106
|
-
toRelativeUrl,
|
|
1107
1558
|
translate as translate3
|
|
1108
1559
|
} from "@uipath/solutionpackager-tool-core";
|
|
1109
1560
|
var LICENSE_TYPES = {
|
|
@@ -1140,7 +1591,7 @@ class GovernancePolicyService {
|
|
|
1140
1591
|
this.logger.info(t("info.alreadyProvided"));
|
|
1141
1592
|
return;
|
|
1142
1593
|
}
|
|
1143
|
-
|
|
1594
|
+
let cloudUrl = connectionInfo?.cloudUrl;
|
|
1144
1595
|
const organizationId = connectionInfo?.organizationId;
|
|
1145
1596
|
const tenantId = connectionInfo?.tenantId;
|
|
1146
1597
|
const accessToken = connectionInfo?.accessToken;
|
|
@@ -1150,9 +1601,17 @@ class GovernancePolicyService {
|
|
|
1150
1601
|
return;
|
|
1151
1602
|
}
|
|
1152
1603
|
const profileKey = validateOptions.profileKey ?? DEFAULT_PROFILE_KEY;
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1604
|
+
let cloudOrigin;
|
|
1605
|
+
try {
|
|
1606
|
+
cloudOrigin = new URL(cloudUrl).origin;
|
|
1607
|
+
cloudUrl = cloudUrl.replace(/\/+$/, "");
|
|
1608
|
+
} catch {
|
|
1609
|
+
this.logger.warn(t("errors.connectionIncomplete"));
|
|
1610
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
const licenseType = await this.resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken);
|
|
1614
|
+
const policy = await this.downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
|
|
1156
1615
|
if (!policy) {
|
|
1157
1616
|
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1158
1617
|
return;
|
|
@@ -1170,8 +1629,8 @@ class GovernancePolicyService {
|
|
|
1170
1629
|
validateOptions.governanceFileType = "Default" /* Default */;
|
|
1171
1630
|
}
|
|
1172
1631
|
}
|
|
1173
|
-
async downloadPolicyAsync(organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
|
|
1174
|
-
const policyUrl =
|
|
1632
|
+
async downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
|
|
1633
|
+
const policyUrl = `${cloudOrigin}/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
|
|
1175
1634
|
this.logger.info(t("info.downloading", { url: policyUrl }));
|
|
1176
1635
|
try {
|
|
1177
1636
|
const response = await this.fetchFn(policyUrl, {
|
|
@@ -1203,11 +1662,11 @@ class GovernancePolicyService {
|
|
|
1203
1662
|
return null;
|
|
1204
1663
|
}
|
|
1205
1664
|
}
|
|
1206
|
-
async resolveLicenseTypeAsync(profileKey,
|
|
1665
|
+
async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
|
|
1207
1666
|
const isStudioWeb = profileKey === DEFAULT_PROFILE_KEY;
|
|
1208
1667
|
const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
|
|
1209
1668
|
try {
|
|
1210
|
-
const response = await this.fetchFn(`${
|
|
1669
|
+
const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
|
|
1211
1670
|
method: "POST",
|
|
1212
1671
|
headers: { Authorization: `Bearer ${accessToken}` },
|
|
1213
1672
|
signal: cancellationToken
|
|
@@ -1243,7 +1702,7 @@ class GovernancePolicyService {
|
|
|
1243
1702
|
|
|
1244
1703
|
// src/services/pack-service.ts
|
|
1245
1704
|
class PackService {
|
|
1246
|
-
disallowedCharsRegex = /[^\
|
|
1705
|
+
disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
|
|
1247
1706
|
spacesDotRegex = /[\s.]+/g;
|
|
1248
1707
|
dotDashRegex = /\.{0,10}[-:]\.{0,10}/g;
|
|
1249
1708
|
MaxPackageIdLength = 100;
|
|
@@ -1332,13 +1791,13 @@ class ProjectBuildOptionsValidator extends PackagerParametersValidator {
|
|
|
1332
1791
|
// src/services/project-loader.ts
|
|
1333
1792
|
import {
|
|
1334
1793
|
Path as Path2,
|
|
1794
|
+
ProjectTool,
|
|
1335
1795
|
ProjectTypes,
|
|
1336
1796
|
translate as translate5
|
|
1337
1797
|
} from "@uipath/solutionpackager-tool-core";
|
|
1338
1798
|
|
|
1339
1799
|
class ProjectLoader {
|
|
1340
1800
|
fileSystem;
|
|
1341
|
-
static ProjectFileName = "project.uiproj";
|
|
1342
1801
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
1343
1802
|
constructor(fileSystem) {
|
|
1344
1803
|
this.fileSystem = fileSystem;
|
|
@@ -1347,7 +1806,7 @@ class ProjectLoader {
|
|
|
1347
1806
|
if (!projectPath) {
|
|
1348
1807
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.pathRequired"));
|
|
1349
1808
|
}
|
|
1350
|
-
const projectFilePath = Path2.join(projectPath,
|
|
1809
|
+
const projectFilePath = Path2.join(projectPath, ProjectTool.ProjectFileName);
|
|
1351
1810
|
const projectFileExists = await this.fileSystem.exists(projectFilePath);
|
|
1352
1811
|
if (projectFileExists) {
|
|
1353
1812
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
@@ -1358,7 +1817,7 @@ class ProjectLoader {
|
|
|
1358
1817
|
return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
|
|
1359
1818
|
}
|
|
1360
1819
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
1361
|
-
projectFile:
|
|
1820
|
+
projectFile: ProjectTool.ProjectFileName,
|
|
1362
1821
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
1363
1822
|
path: projectPath
|
|
1364
1823
|
}));
|
|
@@ -1425,7 +1884,7 @@ class ProjectPackOptionsBuilder {
|
|
|
1425
1884
|
policyFilePath: parameters.validateOptions.governanceFilePath,
|
|
1426
1885
|
policyFileType: parameters.validateOptions.governanceFileType,
|
|
1427
1886
|
outputPath: parameters.outputPath,
|
|
1428
|
-
outputType:
|
|
1887
|
+
outputType: parameters.outputType,
|
|
1429
1888
|
projectType: project.type,
|
|
1430
1889
|
package: packageInfo,
|
|
1431
1890
|
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
@@ -1599,10 +2058,6 @@ class ProjectPackager {
|
|
|
1599
2058
|
this.projectLoader = new ProjectLoader(this.fileSystem);
|
|
1600
2059
|
this.governancePolicyService = new GovernancePolicyService(this.fileSystem, this.temporaryStorage);
|
|
1601
2060
|
}
|
|
1602
|
-
async canPackProjectAsync(projectPath) {
|
|
1603
|
-
const project = await this.projectLoader.loadProject(projectPath);
|
|
1604
|
-
return this.repository.canHandleProject(project.type);
|
|
1605
|
-
}
|
|
1606
2061
|
async setupAsync(input, operationId) {
|
|
1607
2062
|
this.telemetryService.setOperationId(operationId);
|
|
1608
2063
|
await this.temporaryStorage.cleanup();
|
|
@@ -1677,7 +2132,7 @@ class ProjectPackager {
|
|
|
1677
2132
|
policyFilePath: options.validateOptions.governanceFilePath,
|
|
1678
2133
|
policyFileType: options.validateOptions.governanceFileType,
|
|
1679
2134
|
outputPath: options.outputPath,
|
|
1680
|
-
outputType:
|
|
2135
|
+
outputType: options.outputType,
|
|
1681
2136
|
projectType: uiPathProject.Type
|
|
1682
2137
|
};
|
|
1683
2138
|
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, undefined, cancellationToken);
|
|
@@ -1848,7 +2303,8 @@ class NodeProjectPackagerFactory extends BaseNodePackagerFactory {
|
|
|
1848
2303
|
logger.info("Creating ProjectPackager instance...");
|
|
1849
2304
|
const fileSystem = this.getOrCreateFileSystem(config);
|
|
1850
2305
|
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
1851
|
-
|
|
2306
|
+
this.dotnetDiscovery = new DotnetDiscoveryService;
|
|
2307
|
+
const packageSignService = new NodePackageSignService(this.dotnetDiscovery, logger);
|
|
1852
2308
|
const projectPackager = new ProjectPackager(fileSystem, telemetryService, packageSignService);
|
|
1853
2309
|
this.checkDotnetAvailability(logger);
|
|
1854
2310
|
logger.info("ProjectPackager created successfully.");
|
|
@@ -1859,18 +2315,645 @@ async function createNodeProjectPackager(options) {
|
|
|
1859
2315
|
const factory = new NodeProjectPackagerFactory;
|
|
1860
2316
|
return factory.createAsync(options);
|
|
1861
2317
|
}
|
|
2318
|
+
// src/publish/models/publish-options.ts
|
|
2319
|
+
var PublishDestinationKind;
|
|
2320
|
+
((PublishDestinationKind2) => {
|
|
2321
|
+
PublishDestinationKind2["LocalFolder"] = "LocalFolder";
|
|
2322
|
+
PublishDestinationKind2["NugetFeed"] = "NugetFeed";
|
|
2323
|
+
PublishDestinationKind2["OrchestratorPersonalWorkspace"] = "OrchestratorPersonalWorkspace";
|
|
2324
|
+
PublishDestinationKind2["OrchestratorTenantProcesses"] = "OrchestratorTenantProcesses";
|
|
2325
|
+
PublishDestinationKind2["OrchestratorSharedLibraries"] = "OrchestratorSharedLibraries";
|
|
2326
|
+
PublishDestinationKind2["OrchestratorCustom"] = "OrchestratorCustom";
|
|
2327
|
+
})(PublishDestinationKind ||= {});
|
|
2328
|
+
|
|
2329
|
+
class ProjectPublishOptions {
|
|
2330
|
+
packagePaths;
|
|
2331
|
+
destination;
|
|
2332
|
+
constructor(packagePaths, destination) {
|
|
2333
|
+
this.packagePaths = packagePaths;
|
|
2334
|
+
this.destination = destination;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
// src/publish/services/project-publisher.ts
|
|
2338
|
+
import {
|
|
2339
|
+
ToolErrorCodes as ToolErrorCodes8,
|
|
2340
|
+
ToolResult as ToolResult8,
|
|
2341
|
+
translate as translate11
|
|
2342
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
2343
|
+
|
|
2344
|
+
// src/publish/services/local-folder-publisher.ts
|
|
2345
|
+
import {
|
|
2346
|
+
ToolErrorCodes as ToolErrorCodes5,
|
|
2347
|
+
ToolResult as ToolResult5,
|
|
2348
|
+
translate as translate7
|
|
2349
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
2350
|
+
class LocalFolderPublisher {
|
|
2351
|
+
fileSystem;
|
|
2352
|
+
logger;
|
|
2353
|
+
constructor(fileSystem) {
|
|
2354
|
+
this.fileSystem = fileSystem;
|
|
2355
|
+
this.logger = new ToolLogger("ProjectPublisher", "LocalFolder");
|
|
2356
|
+
}
|
|
2357
|
+
async publishAsync(packagePaths, destination) {
|
|
2358
|
+
const overwrite = destination.overwrite ?? true;
|
|
2359
|
+
if (!destination.folderPath) {
|
|
2360
|
+
return ToolResult5.error(ToolErrorCodes5.InternalError, translate7.t("solutionpackager.publish.errors.localFolderRequired"));
|
|
2361
|
+
}
|
|
2362
|
+
if (!await this.fileSystem.exists(destination.folderPath)) {
|
|
2363
|
+
await this.fileSystem.mkdir(destination.folderPath);
|
|
2364
|
+
}
|
|
2365
|
+
const written = [];
|
|
2366
|
+
for (const sourcePath of packagePaths) {
|
|
2367
|
+
const fileName = this.fileSystem.path.basename(sourcePath);
|
|
2368
|
+
const destPath = this.fileSystem.path.join(destination.folderPath, fileName);
|
|
2369
|
+
if (!overwrite && await this.fileSystem.exists(destPath)) {
|
|
2370
|
+
return ToolResult5.error(ToolErrorCodes5.InternalError, translate7.t("solutionpackager.publish.errors.localFolderFileExists", { path: destPath }));
|
|
2371
|
+
}
|
|
2372
|
+
const data = await this.fileSystem.readFile(sourcePath);
|
|
2373
|
+
if (!data) {
|
|
2374
|
+
return ToolResult5.error(ToolErrorCodes5.InternalError, translate7.t("solutionpackager.publish.errors.failedToReadPackage", { path: sourcePath }));
|
|
2375
|
+
}
|
|
2376
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
2377
|
+
written.push(destPath);
|
|
2378
|
+
this.logger.info(`Copied package to ${destPath}`);
|
|
2379
|
+
}
|
|
2380
|
+
return new ToolResult5(ToolErrorCodes5.Success, undefined, written);
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
// src/publish/services/nuget-feed-publisher.ts
|
|
2385
|
+
import {
|
|
2386
|
+
ToolErrorCodes as ToolErrorCodes6,
|
|
2387
|
+
ToolResult as ToolResult6,
|
|
2388
|
+
translate as translate8
|
|
2389
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
2390
|
+
var NUGET_V3_PACKAGE_PUBLISH_TYPE = "PackagePublish/2.0.0";
|
|
2391
|
+
|
|
2392
|
+
class NugetFeedPublisher {
|
|
2393
|
+
fileSystem;
|
|
2394
|
+
logger;
|
|
2395
|
+
constructor(fileSystem) {
|
|
2396
|
+
this.fileSystem = fileSystem;
|
|
2397
|
+
this.logger = new ToolLogger("ProjectPublisher", "NugetFeed");
|
|
2398
|
+
}
|
|
2399
|
+
async publishAsync(packagePaths, destination) {
|
|
2400
|
+
if (!destination.feedUrl) {
|
|
2401
|
+
return ToolResult6.error(ToolErrorCodes6.InternalError, translate8.t("solutionpackager.publish.errors.nugetFeedUrlRequired"));
|
|
2402
|
+
}
|
|
2403
|
+
let pushUrl;
|
|
2404
|
+
try {
|
|
2405
|
+
pushUrl = await this.resolvePushUrl(destination.feedUrl, destination.apiKey);
|
|
2406
|
+
} catch (error) {
|
|
2407
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2408
|
+
return ToolResult6.error(ToolErrorCodes6.InternalError, translate8.t("solutionpackager.publish.errors.nugetPushUrlResolutionFailed", { feedUrl: destination.feedUrl, message }));
|
|
2409
|
+
}
|
|
2410
|
+
const published = [];
|
|
2411
|
+
for (const packagePath of packagePaths) {
|
|
2412
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
2413
|
+
if (!data) {
|
|
2414
|
+
return ToolResult6.error(ToolErrorCodes6.InternalError, translate8.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
|
|
2415
|
+
}
|
|
2416
|
+
const fileName = this.fileSystem.path.basename(packagePath);
|
|
2417
|
+
const form = new FormData;
|
|
2418
|
+
form.append("package", new Blob([data], {
|
|
2419
|
+
type: "application/octet-stream"
|
|
2420
|
+
}), fileName);
|
|
2421
|
+
const headers = {};
|
|
2422
|
+
if (destination.apiKey) {
|
|
2423
|
+
headers["X-NuGet-ApiKey"] = destination.apiKey;
|
|
2424
|
+
}
|
|
2425
|
+
this.logger.info(`Pushing ${fileName} to ${pushUrl}`);
|
|
2426
|
+
const response = await fetch(pushUrl, {
|
|
2427
|
+
method: "PUT",
|
|
2428
|
+
headers,
|
|
2429
|
+
body: form
|
|
2430
|
+
});
|
|
2431
|
+
if (!response.ok) {
|
|
2432
|
+
const body = await this.safeReadBody(response);
|
|
2433
|
+
return ToolResult6.error(ToolErrorCodes6.InternalError, translate8.t("solutionpackager.publish.errors.nugetPushFailed", {
|
|
2434
|
+
fileName,
|
|
2435
|
+
status: response.status,
|
|
2436
|
+
statusText: response.statusText,
|
|
2437
|
+
body: body ? ` - ${body}` : ""
|
|
2438
|
+
}));
|
|
2439
|
+
}
|
|
2440
|
+
published.push(packagePath);
|
|
2441
|
+
this.logger.info(`Pushed ${fileName} successfully.`);
|
|
2442
|
+
}
|
|
2443
|
+
return new ToolResult6(ToolErrorCodes6.Success, undefined, published);
|
|
2444
|
+
}
|
|
2445
|
+
async resolvePushUrl(feedUrl, apiKey) {
|
|
2446
|
+
let end = feedUrl.length;
|
|
2447
|
+
while (end > 0 && feedUrl.charCodeAt(end - 1) === 47)
|
|
2448
|
+
end--;
|
|
2449
|
+
const trimmed = feedUrl.slice(0, end);
|
|
2450
|
+
if (/\/api\/v2\/package\/?$/i.test(trimmed)) {
|
|
2451
|
+
return trimmed;
|
|
2452
|
+
}
|
|
2453
|
+
if (/\.json$/i.test(trimmed)) {
|
|
2454
|
+
return this.resolveFromServiceIndex(trimmed, apiKey);
|
|
2455
|
+
}
|
|
2456
|
+
return `${trimmed}/api/v2/package`;
|
|
2457
|
+
}
|
|
2458
|
+
async resolveFromServiceIndex(serviceIndexUrl, apiKey) {
|
|
2459
|
+
const headers = { Accept: "application/json" };
|
|
2460
|
+
if (apiKey) {
|
|
2461
|
+
headers["X-NuGet-ApiKey"] = apiKey;
|
|
2462
|
+
}
|
|
2463
|
+
const response = await fetch(serviceIndexUrl, { headers });
|
|
2464
|
+
if (!response.ok) {
|
|
2465
|
+
throw new Error(`service index returned ${response.status} ${response.statusText}`);
|
|
2466
|
+
}
|
|
2467
|
+
const index = await response.json();
|
|
2468
|
+
const resource = index.resources?.find((r) => r["@type"] === NUGET_V3_PACKAGE_PUBLISH_TYPE);
|
|
2469
|
+
if (!resource?.["@id"]) {
|
|
2470
|
+
throw new Error(`service index has no ${NUGET_V3_PACKAGE_PUBLISH_TYPE} resource`);
|
|
2471
|
+
}
|
|
2472
|
+
return resource["@id"];
|
|
2473
|
+
}
|
|
2474
|
+
async safeReadBody(response) {
|
|
2475
|
+
try {
|
|
2476
|
+
const text = await response.text();
|
|
2477
|
+
return text.slice(0, 500);
|
|
2478
|
+
} catch {
|
|
2479
|
+
return "";
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
// src/publish/services/orchestrator-publisher.ts
|
|
2485
|
+
import {
|
|
2486
|
+
ToolErrorCodes as ToolErrorCodes7,
|
|
2487
|
+
ToolResult as ToolResult7,
|
|
2488
|
+
translate as translate10
|
|
2489
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
2490
|
+
|
|
2491
|
+
// src/publish/services/orchestrator-feed-types.ts
|
|
2492
|
+
var PackageFeedDtoPurposeEnum = {
|
|
2493
|
+
Undefined: "Undefined",
|
|
2494
|
+
Processes: "Processes",
|
|
2495
|
+
Libraries: "Libraries",
|
|
2496
|
+
PersonalWorkspace: "PersonalWorkspace",
|
|
2497
|
+
FolderHierarchy: "FolderHierarchy"
|
|
2498
|
+
};
|
|
2499
|
+
var PackageFeedDtoAuthenticationTypeEnum = {
|
|
2500
|
+
Secure: "Secure",
|
|
2501
|
+
ApiKey: "ApiKey",
|
|
2502
|
+
Basic: "Basic"
|
|
2503
|
+
};
|
|
2504
|
+
var ExtendedFolderDtoFeedTypeEnum = {
|
|
2505
|
+
Undefined: "Undefined",
|
|
2506
|
+
Processes: "Processes",
|
|
2507
|
+
Libraries: "Libraries",
|
|
2508
|
+
PersonalWorkspace: "PersonalWorkspace",
|
|
2509
|
+
FolderHierarchy: "FolderHierarchy"
|
|
2510
|
+
};
|
|
2511
|
+
|
|
2512
|
+
// src/publish/services/orchestrator-feeds-service.ts
|
|
2513
|
+
import { addSdkUserAgentHeader } from "@uipath/common/sdk-user-agent";
|
|
2514
|
+
import { translate as translate9 } from "@uipath/solutionpackager-tool-core";
|
|
2515
|
+
// package.json
|
|
2516
|
+
var package_default = {
|
|
2517
|
+
name: "@uipath/project-packager",
|
|
2518
|
+
license: "MIT",
|
|
2519
|
+
version: "1.196.0",
|
|
2520
|
+
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
2521
|
+
type: "module",
|
|
2522
|
+
main: "./dist/index.js",
|
|
2523
|
+
exports: {
|
|
2524
|
+
".": {
|
|
2525
|
+
types: "./dist/src/index.d.ts",
|
|
2526
|
+
default: "./dist/index.js"
|
|
2527
|
+
},
|
|
2528
|
+
"./node": {
|
|
2529
|
+
types: "./dist/src/node.d.ts",
|
|
2530
|
+
default: "./dist/node.js"
|
|
2531
|
+
},
|
|
2532
|
+
"./browser": {
|
|
2533
|
+
types: "./dist/src/browser.d.ts",
|
|
2534
|
+
default: "./dist/browser.js"
|
|
2535
|
+
}
|
|
2536
|
+
},
|
|
2537
|
+
types: "./dist/src/index.d.ts",
|
|
2538
|
+
repository: {
|
|
2539
|
+
type: "git",
|
|
2540
|
+
url: "https://github.com/UiPath/cli.git",
|
|
2541
|
+
directory: "packages/packager/project-packager"
|
|
2542
|
+
},
|
|
2543
|
+
publishConfig: {
|
|
2544
|
+
registry: "https://npm.pkg.github.com/"
|
|
2545
|
+
},
|
|
2546
|
+
files: [
|
|
2547
|
+
"dist",
|
|
2548
|
+
"!dist/**/*.map"
|
|
2549
|
+
],
|
|
2550
|
+
scripts: {
|
|
2551
|
+
build: "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem && bun build ./src/browser.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem && bun build ./src/node.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core --external '@uipath/common/*' --external @uipath/common --external '@uipath/filesystem/*' --external @uipath/filesystem && tsc --emitDeclarationOnly --outDir dist",
|
|
2552
|
+
clean: "rimraf dist",
|
|
2553
|
+
test: "vitest run",
|
|
2554
|
+
e2e: "vitest run --config vitest.e2e.config.ts",
|
|
2555
|
+
"test:coverage": "vitest run --coverage",
|
|
2556
|
+
prepack: "bun run build",
|
|
2557
|
+
"publish:dry": "bun publish --dry-run",
|
|
2558
|
+
"publish:gh": "bun publish",
|
|
2559
|
+
"version:patch": "bun version patch --no-git-tag-version",
|
|
2560
|
+
"version:minor": "bun version minor --no-git-tag-version",
|
|
2561
|
+
"version:major": "bun version major --no-git-tag-version",
|
|
2562
|
+
lint: "biome check ."
|
|
2563
|
+
},
|
|
2564
|
+
dependencies: {
|
|
2565
|
+
"@uipath/filesystem": "workspace:*",
|
|
2566
|
+
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
2567
|
+
"@uipath/common": "workspace:*"
|
|
2568
|
+
},
|
|
2569
|
+
peerDependencies: {
|
|
2570
|
+
fflate: "^0.8.2"
|
|
2571
|
+
},
|
|
2572
|
+
devDependencies: {
|
|
2573
|
+
"@types/node": "^25.5.2",
|
|
2574
|
+
"@uipath/resource-builder-tool": "2025.11.0-alpha2928-3101",
|
|
2575
|
+
"@uipath/tool-agent": "^1.2.6",
|
|
2576
|
+
"@uipath/packager-tool-apiworkflow": "workspace:*",
|
|
2577
|
+
"@uipath/packager-tool-connector": "workspace:*",
|
|
2578
|
+
"@uipath/packager-tool-flow": "workspace:*",
|
|
2579
|
+
"@uipath/packager-tool-functions": "workspace:*",
|
|
2580
|
+
"@uipath/packager-tool-webapp": "workspace:*",
|
|
2581
|
+
"@uipath/packager-tool-workflowcompiler": "workspace:*",
|
|
2582
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
2583
|
+
jsdom: "^29.0.0",
|
|
2584
|
+
typescript: "^6.0.2",
|
|
2585
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
2586
|
+
vitest: "^4.1.6"
|
|
2587
|
+
}
|
|
2588
|
+
};
|
|
2589
|
+
|
|
2590
|
+
// src/publish/services/orchestrator-feeds-service.ts
|
|
2591
|
+
var HEADER_TENANT_ID = "X-UIPATH-TenantId";
|
|
2592
|
+
var FEEDS_PATH = "/api/PackageFeeds/GetFeeds";
|
|
2593
|
+
var FOLDERS_PATH = "/api/FoldersNavigation/GetAllFoldersForCurrentUser";
|
|
2594
|
+
var SDK_USER_AGENT = `${package_default.name.replace(/^@uipath\//, "")}/${package_default.version}`;
|
|
2595
|
+
|
|
2596
|
+
class OrchestratorFeedsService {
|
|
2597
|
+
logger;
|
|
2598
|
+
constructor() {
|
|
2599
|
+
this.logger = new ToolLogger("OrchestratorFeedsService", "Feeds");
|
|
2600
|
+
}
|
|
2601
|
+
async getAccessibleFeedsAsync(connection) {
|
|
2602
|
+
this.ensureOrchestratorUrl(connection);
|
|
2603
|
+
this.logger.info(`Fetching accessible feeds from ${connection.orchestratorUrl}`);
|
|
2604
|
+
try {
|
|
2605
|
+
const json = await orchestratorGet(connection, FEEDS_PATH);
|
|
2606
|
+
return Array.isArray(json) ? json : [];
|
|
2607
|
+
} catch (error) {
|
|
2608
|
+
const { status, statusText, body } = await describeResponseError(error);
|
|
2609
|
+
throw new Error(translate9.t("solutionpackager.publish.errors.getAccessibleFeedsFailed", { status, statusText, body }));
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
async getFoldersForCurrentUserAsync(connection) {
|
|
2613
|
+
this.ensureOrchestratorUrl(connection);
|
|
2614
|
+
this.logger.info(`Fetching folders from ${connection.orchestratorUrl}`);
|
|
2615
|
+
try {
|
|
2616
|
+
const json = await orchestratorGet(connection, FOLDERS_PATH);
|
|
2617
|
+
return Array.isArray(json) ? json.map(mapExtendedFolder) : [];
|
|
2618
|
+
} catch (error) {
|
|
2619
|
+
const { status, statusText, body } = await describeResponseError(error);
|
|
2620
|
+
throw new Error(translate9.t("solutionpackager.publish.errors.getFoldersForCurrentUserFailed", { status, statusText, body }));
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
ensureOrchestratorUrl(connection) {
|
|
2624
|
+
if (!connection.orchestratorUrl) {
|
|
2625
|
+
throw new Error(translate9.t("solutionpackager.publish.errors.orchestratorUrlRequired"));
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
function mapExtendedFolder(json) {
|
|
2630
|
+
return {
|
|
2631
|
+
isSelectable: json.IsSelectable,
|
|
2632
|
+
hasChildren: json.HasChildren,
|
|
2633
|
+
level: json.Level,
|
|
2634
|
+
key: json.Key,
|
|
2635
|
+
displayName: json.DisplayName,
|
|
2636
|
+
fullyQualifiedName: json.FullyQualifiedName,
|
|
2637
|
+
description: json.Description,
|
|
2638
|
+
folderType: json.FolderType,
|
|
2639
|
+
isPersonal: json.IsPersonal,
|
|
2640
|
+
provisionType: json.ProvisionType,
|
|
2641
|
+
permissionModel: json.PermissionModel,
|
|
2642
|
+
parentId: json.ParentId,
|
|
2643
|
+
parentKey: json.ParentKey,
|
|
2644
|
+
feedType: json.FeedType,
|
|
2645
|
+
id: json.Id
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
class OrchestratorResponseError extends Error {
|
|
2650
|
+
response;
|
|
2651
|
+
constructor(response) {
|
|
2652
|
+
super(`Orchestrator request failed with status ${response.status}.`);
|
|
2653
|
+
this.response = response;
|
|
2654
|
+
this.name = "OrchestratorResponseError";
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
async function orchestratorGet(connection, relativePath) {
|
|
2658
|
+
const url = `${normalizeOrchestratorBasePath(connection.orchestratorUrl)}${relativePath}`;
|
|
2659
|
+
const response = await fetch(url, {
|
|
2660
|
+
method: "GET",
|
|
2661
|
+
headers: buildHeaders(connection)
|
|
2662
|
+
});
|
|
2663
|
+
if (!response.ok) {
|
|
2664
|
+
throw new OrchestratorResponseError(response);
|
|
2665
|
+
}
|
|
2666
|
+
const text = await response.text();
|
|
2667
|
+
if (text === "" || text === "null") {
|
|
2668
|
+
return null;
|
|
2669
|
+
}
|
|
2670
|
+
return JSON.parse(text);
|
|
2671
|
+
}
|
|
2672
|
+
function buildHeaders(connection) {
|
|
2673
|
+
const headers = {};
|
|
2674
|
+
if (connection.accessToken) {
|
|
2675
|
+
headers.Authorization = `Bearer ${connection.accessToken}`;
|
|
2676
|
+
}
|
|
2677
|
+
if (connection.tenantId) {
|
|
2678
|
+
headers[HEADER_TENANT_ID] = connection.tenantId;
|
|
2679
|
+
}
|
|
2680
|
+
return addSdkUserAgentHeader(headers, SDK_USER_AGENT);
|
|
2681
|
+
}
|
|
2682
|
+
function normalizeOrchestratorBasePath(orchestratorUrl) {
|
|
2683
|
+
let end = orchestratorUrl.length;
|
|
2684
|
+
while (end > 0 && orchestratorUrl.charCodeAt(end - 1) === 47)
|
|
2685
|
+
end--;
|
|
2686
|
+
const trimmed = orchestratorUrl.slice(0, end);
|
|
2687
|
+
return /\/orchestrator_$/i.test(trimmed) ? trimmed : `${trimmed}/orchestrator_`;
|
|
2688
|
+
}
|
|
2689
|
+
async function describeResponseError(error) {
|
|
2690
|
+
const response = error?.response;
|
|
2691
|
+
if (response) {
|
|
2692
|
+
let body = "";
|
|
2693
|
+
try {
|
|
2694
|
+
body = (await response.text()).slice(0, 500);
|
|
2695
|
+
} catch {
|
|
2696
|
+
body = "";
|
|
2697
|
+
}
|
|
2698
|
+
return {
|
|
2699
|
+
status: response.status,
|
|
2700
|
+
statusText: response.statusText,
|
|
2701
|
+
body: body ? ` - ${body}` : ""
|
|
2702
|
+
};
|
|
2703
|
+
}
|
|
2704
|
+
const cause = error?.cause;
|
|
2705
|
+
const message = cause instanceof Error ? cause.message : error instanceof Error ? error.message : String(error);
|
|
2706
|
+
return { status: "?", statusText: message, body: "" };
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
// src/publish/services/orchestrator-publisher.ts
|
|
2710
|
+
var HEADER_FOLDER_ID = "X-UIPATH-OrganizationUnitId";
|
|
2711
|
+
var HEADER_TENANT_ID2 = "X-UIPATH-TenantId";
|
|
2712
|
+
var HEADER_NUGET_API_KEY = "X-NuGet-ApiKey";
|
|
2713
|
+
var ORCHESTRATOR_RELATIVE_URL = "/orchestrator_";
|
|
2714
|
+
var PROCESSES_UPLOAD_PATH = "/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage";
|
|
2715
|
+
var LIBRARIES_UPLOAD_PATH = "/odata/Libraries/UiPath.Server.Configuration.OData.UploadPackage";
|
|
2716
|
+
|
|
2717
|
+
class OrchestratorPublisher {
|
|
2718
|
+
fileSystem;
|
|
2719
|
+
logger;
|
|
2720
|
+
feedsService;
|
|
2721
|
+
constructor(fileSystem, feedsService) {
|
|
2722
|
+
this.fileSystem = fileSystem;
|
|
2723
|
+
this.logger = new ToolLogger("ProjectPublisher", "Orchestrator");
|
|
2724
|
+
this.feedsService = feedsService ?? new OrchestratorFeedsService;
|
|
2725
|
+
}
|
|
2726
|
+
async publishAsync(packagePaths, destination) {
|
|
2727
|
+
if (packagePaths.length === 0) {
|
|
2728
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.orchestratorNoPackages"));
|
|
2729
|
+
}
|
|
2730
|
+
if (destination.kind === "OrchestratorCustom" /* OrchestratorCustom */) {
|
|
2731
|
+
if (!destination.publishUrl) {
|
|
2732
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.orchestratorCustomPublishUrlRequired"));
|
|
2733
|
+
}
|
|
2734
|
+
this.logger.info(`Publishing ${packagePaths.length} package(s) to ${destination.publishUrl} (custom)`);
|
|
2735
|
+
return this.postPackages(packagePaths, destination.publishUrl, this.buildCustomHeaders(destination));
|
|
2736
|
+
}
|
|
2737
|
+
if (!destination.connectionInfo?.cloudUrl) {
|
|
2738
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.orchestratorCloudUrlRequired"));
|
|
2739
|
+
}
|
|
2740
|
+
const orchestratorUrl = this.deriveOrchestratorUrl(destination.connectionInfo);
|
|
2741
|
+
let feed;
|
|
2742
|
+
try {
|
|
2743
|
+
feed = await this.resolveFeed(destination, orchestratorUrl);
|
|
2744
|
+
} catch (error) {
|
|
2745
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2746
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.orchestratorFeedResolutionFailed", { message }));
|
|
2747
|
+
}
|
|
2748
|
+
const targetUrl = this.buildPublishUrl(orchestratorUrl, feed);
|
|
2749
|
+
const headers = this.buildHeaders(destination, feed);
|
|
2750
|
+
this.logger.info(`Publishing ${packagePaths.length} package(s) to ${targetUrl} (feed ${feed.name}, ${feed.purpose})`);
|
|
2751
|
+
return this.postPackages(packagePaths, targetUrl, headers);
|
|
2752
|
+
}
|
|
2753
|
+
async postPackages(packagePaths, targetUrl, headers) {
|
|
2754
|
+
const form = new FormData;
|
|
2755
|
+
for (const packagePath of packagePaths) {
|
|
2756
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
2757
|
+
if (!data) {
|
|
2758
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
|
|
2759
|
+
}
|
|
2760
|
+
const fileName = this.fileSystem.path.basename(packagePath);
|
|
2761
|
+
form.append("file", new Blob([data], {
|
|
2762
|
+
type: "application/octet-stream"
|
|
2763
|
+
}), fileName);
|
|
2764
|
+
}
|
|
2765
|
+
const response = await fetch(targetUrl, {
|
|
2766
|
+
method: "POST",
|
|
2767
|
+
headers,
|
|
2768
|
+
body: form
|
|
2769
|
+
});
|
|
2770
|
+
if (!response.ok) {
|
|
2771
|
+
const body = await this.safeReadBody(response);
|
|
2772
|
+
return ToolResult7.error(ToolErrorCodes7.InternalError, translate10.t("solutionpackager.publish.errors.orchestratorPublishFailed", {
|
|
2773
|
+
status: response.status,
|
|
2774
|
+
statusText: response.statusText,
|
|
2775
|
+
body: body ? ` - ${body}` : ""
|
|
2776
|
+
}));
|
|
2777
|
+
}
|
|
2778
|
+
this.logger.info("Orchestrator publish completed.");
|
|
2779
|
+
return new ToolResult7(ToolErrorCodes7.Success, undefined, packagePaths);
|
|
2780
|
+
}
|
|
2781
|
+
async resolveFeed(destination, orchestratorUrl) {
|
|
2782
|
+
const connection = {
|
|
2783
|
+
orchestratorUrl,
|
|
2784
|
+
accessToken: destination.connectionInfo.accessToken,
|
|
2785
|
+
tenantId: destination.connectionInfo.tenantId
|
|
2786
|
+
};
|
|
2787
|
+
const feeds = await this.feedsService.getAccessibleFeedsAsync(connection);
|
|
2788
|
+
if (destination.kind === "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */) {
|
|
2789
|
+
const folders = await this.feedsService.getFoldersForCurrentUserAsync(connection);
|
|
2790
|
+
const personalFolder = folders.find((f) => f.feedType === ExtendedFolderDtoFeedTypeEnum.PersonalWorkspace);
|
|
2791
|
+
if (!personalFolder) {
|
|
2792
|
+
const foldersDebug = folders.length === 0 ? "<none>" : folders.map((f) => `${f.displayName} (id=${f.id}, feedType=${f.feedType})`).join(", ");
|
|
2793
|
+
throw new Error(translate10.t("solutionpackager.publish.errors.orchestratorPersonalWorkspaceFolderNotFound", { folders: foldersDebug }));
|
|
2794
|
+
}
|
|
2795
|
+
if (personalFolder.id == null) {
|
|
2796
|
+
throw new Error(`Personal-workspace folder "${personalFolder.displayName}" has no id; cannot resolve its feed.`);
|
|
2797
|
+
}
|
|
2798
|
+
const match2 = feeds.find((f) => f.folderId === personalFolder.id);
|
|
2799
|
+
if (!match2) {
|
|
2800
|
+
this.throwFeedNotFound(destination, feeds);
|
|
2801
|
+
}
|
|
2802
|
+
return match2;
|
|
2803
|
+
}
|
|
2804
|
+
const expectedPurpose = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? PackageFeedDtoPurposeEnum.Libraries : PackageFeedDtoPurposeEnum.Processes;
|
|
2805
|
+
const match = feeds.find((f) => f.purpose === expectedPurpose && f.folderId == null);
|
|
2806
|
+
if (!match) {
|
|
2807
|
+
this.throwFeedNotFound(destination, feeds);
|
|
2808
|
+
}
|
|
2809
|
+
return match;
|
|
2810
|
+
}
|
|
2811
|
+
throwFeedNotFound(destination, feeds) {
|
|
2812
|
+
const available = feeds.length === 0 ? "<none>" : feeds.map((f) => `${f.name} (purpose=${f.purpose}, folderId=${f.folderId ?? "null"})`).join(", ");
|
|
2813
|
+
throw new Error(translate10.t("solutionpackager.publish.errors.orchestratorFeedNotFound", {
|
|
2814
|
+
kind: destination.kind,
|
|
2815
|
+
available
|
|
2816
|
+
}));
|
|
2817
|
+
}
|
|
2818
|
+
buildPublishUrl(orchestratorUrl, feed) {
|
|
2819
|
+
const baseUrl = feed.publishUrl ? feed.publishUrl : `${orchestratorUrl}${feed.purpose === PackageFeedDtoPurposeEnum.Libraries ? LIBRARIES_UPLOAD_PATH : PROCESSES_UPLOAD_PATH}`;
|
|
2820
|
+
const parsed = new URL(baseUrl);
|
|
2821
|
+
if (feed.id) {
|
|
2822
|
+
parsed.searchParams.set("feedId", feed.id);
|
|
2823
|
+
}
|
|
2824
|
+
return parsed.toString();
|
|
2825
|
+
}
|
|
2826
|
+
deriveOrchestratorUrl(connectionInfo) {
|
|
2827
|
+
const raw = connectionInfo.cloudUrl ?? "";
|
|
2828
|
+
let end = raw.length;
|
|
2829
|
+
while (end > 0 && raw.charCodeAt(end - 1) === 47)
|
|
2830
|
+
end--;
|
|
2831
|
+
return `${raw.slice(0, end)}${ORCHESTRATOR_RELATIVE_URL}`;
|
|
2832
|
+
}
|
|
2833
|
+
buildHeaders(destination, feed) {
|
|
2834
|
+
const headers = this.buildAuthHeaders(destination.connectionInfo);
|
|
2835
|
+
const folderHeader = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? destination.folderId : feed.folderId;
|
|
2836
|
+
if (folderHeader != null) {
|
|
2837
|
+
headers[HEADER_FOLDER_ID] = String(folderHeader);
|
|
2838
|
+
}
|
|
2839
|
+
if (feed.authenticationType === PackageFeedDtoAuthenticationTypeEnum.ApiKey && feed.apiKey) {
|
|
2840
|
+
headers[HEADER_NUGET_API_KEY] = feed.apiKey;
|
|
2841
|
+
}
|
|
2842
|
+
return headers;
|
|
2843
|
+
}
|
|
2844
|
+
buildCustomHeaders(destination) {
|
|
2845
|
+
const headers = this.buildAuthHeaders(destination.connectionInfo);
|
|
2846
|
+
if (destination.folderId != null) {
|
|
2847
|
+
headers[HEADER_FOLDER_ID] = String(destination.folderId);
|
|
2848
|
+
}
|
|
2849
|
+
if (destination.apiKey) {
|
|
2850
|
+
headers[HEADER_NUGET_API_KEY] = destination.apiKey;
|
|
2851
|
+
}
|
|
2852
|
+
return headers;
|
|
2853
|
+
}
|
|
2854
|
+
buildAuthHeaders(connectionInfo) {
|
|
2855
|
+
const headers = {};
|
|
2856
|
+
if (connectionInfo.accessToken) {
|
|
2857
|
+
headers.Authorization = `Bearer ${connectionInfo.accessToken}`;
|
|
2858
|
+
}
|
|
2859
|
+
if (connectionInfo.tenantId) {
|
|
2860
|
+
headers[HEADER_TENANT_ID2] = connectionInfo.tenantId;
|
|
2861
|
+
}
|
|
2862
|
+
return headers;
|
|
2863
|
+
}
|
|
2864
|
+
async safeReadBody(response) {
|
|
2865
|
+
try {
|
|
2866
|
+
const text = await response.text();
|
|
2867
|
+
return text.slice(0, 500);
|
|
2868
|
+
} catch {
|
|
2869
|
+
return "";
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
// src/publish/services/project-publisher.ts
|
|
2875
|
+
class ProjectPublisher {
|
|
2876
|
+
fileSystem;
|
|
2877
|
+
logger;
|
|
2878
|
+
localFolderPublisher;
|
|
2879
|
+
nugetFeedPublisher;
|
|
2880
|
+
orchestratorPublisher;
|
|
2881
|
+
constructor(fileSystem, publishers) {
|
|
2882
|
+
this.fileSystem = fileSystem;
|
|
2883
|
+
this.logger = new ToolLogger("ProjectPublisher", "Publish");
|
|
2884
|
+
this.localFolderPublisher = publishers?.localFolder ?? new LocalFolderPublisher(fileSystem);
|
|
2885
|
+
this.nugetFeedPublisher = publishers?.nugetFeed ?? new NugetFeedPublisher(fileSystem);
|
|
2886
|
+
this.orchestratorPublisher = publishers?.orchestrator ?? new OrchestratorPublisher(fileSystem);
|
|
2887
|
+
}
|
|
2888
|
+
async publishAsync(options) {
|
|
2889
|
+
if (!options.packagePaths || options.packagePaths.length === 0) {
|
|
2890
|
+
return ToolResult8.error(ToolErrorCodes8.InternalError, translate11.t("solutionpackager.publish.errors.atLeastOnePackage"));
|
|
2891
|
+
}
|
|
2892
|
+
for (const path of options.packagePaths) {
|
|
2893
|
+
if (!await this.fileSystem.exists(path)) {
|
|
2894
|
+
return ToolResult8.error(ToolErrorCodes8.InternalError, translate11.t("solutionpackager.publish.errors.packageNotFound", { path }));
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
try {
|
|
2898
|
+
const destination = options.destination;
|
|
2899
|
+
switch (destination.kind) {
|
|
2900
|
+
case "LocalFolder" /* LocalFolder */:
|
|
2901
|
+
return await this.localFolderPublisher.publishAsync(options.packagePaths, destination);
|
|
2902
|
+
case "NugetFeed" /* NugetFeed */:
|
|
2903
|
+
return await this.nugetFeedPublisher.publishAsync(options.packagePaths, destination);
|
|
2904
|
+
case "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */:
|
|
2905
|
+
case "OrchestratorTenantProcesses" /* OrchestratorTenantProcesses */:
|
|
2906
|
+
case "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */:
|
|
2907
|
+
case "OrchestratorCustom" /* OrchestratorCustom */:
|
|
2908
|
+
return await this.orchestratorPublisher.publishAsync(options.packagePaths, destination);
|
|
2909
|
+
default: {
|
|
2910
|
+
const exhaustive = destination;
|
|
2911
|
+
return ToolResult8.error(ToolErrorCodes8.InternalError, translate11.t("solutionpackager.publish.errors.unknownDestination", { destination: JSON.stringify(exhaustive) }));
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
} catch (error) {
|
|
2915
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2916
|
+
const localized = translate11.t("solutionpackager.publish.errors.publishFailed", { message });
|
|
2917
|
+
this.logger.error(localized);
|
|
2918
|
+
return ToolResult8.error(ToolErrorCodes8.InternalError, localized);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
// src/publish/node-project-publisher-factory.ts
|
|
2924
|
+
class NodeProjectPublisherFactory extends BaseNodePackagerFactory {
|
|
2925
|
+
async createAsync(config) {
|
|
2926
|
+
const logger = new ToolLogger("ProjectPublisherFactory", "Create");
|
|
2927
|
+
this.configureLanguage(config);
|
|
2928
|
+
this.configureLogHandler(config);
|
|
2929
|
+
logger.info("Creating ProjectPublisher instance...");
|
|
2930
|
+
const fileSystem = this.getOrCreateFileSystem(config);
|
|
2931
|
+
this.getOrCreateTelemetryService(config);
|
|
2932
|
+
const projectPublisher = new ProjectPublisher(fileSystem);
|
|
2933
|
+
logger.info("ProjectPublisher created successfully.");
|
|
2934
|
+
return projectPublisher;
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
async function createNodeProjectPublisher(options) {
|
|
2938
|
+
const factory = new NodeProjectPublisherFactory;
|
|
2939
|
+
return factory.createAsync(options);
|
|
2940
|
+
}
|
|
1862
2941
|
export {
|
|
1863
2942
|
setGlobalLogHandler,
|
|
2943
|
+
createNodeProjectPublisher,
|
|
1864
2944
|
createNodeProjectPackager,
|
|
1865
2945
|
ToolsFactory,
|
|
1866
2946
|
ToolLogger,
|
|
1867
2947
|
TelemetryService2 as TelemetryService,
|
|
1868
2948
|
TelemetryNames,
|
|
1869
2949
|
RulesConfigFileType,
|
|
2950
|
+
PublishDestinationKind,
|
|
1870
2951
|
ProjectValidateOptionsValidator,
|
|
1871
2952
|
ProjectValidateOptions,
|
|
1872
2953
|
ProjectToolExecutor,
|
|
1873
2954
|
ProjectRestoreOptions,
|
|
2955
|
+
ProjectPublisher,
|
|
2956
|
+
ProjectPublishOptions,
|
|
1874
2957
|
ProjectPackager,
|
|
1875
2958
|
ProjectPackOptions,
|
|
1876
2959
|
ProjectLoader,
|
|
@@ -1881,6 +2964,8 @@ export {
|
|
|
1881
2964
|
PackService,
|
|
1882
2965
|
NodePackageSignService,
|
|
1883
2966
|
NodeContextStorage2 as NodeContextStorage,
|
|
2967
|
+
GovernancePolicyService,
|
|
2968
|
+
DotnetDiscoveryService,
|
|
1884
2969
|
DebugTelemetryProvider2 as DebugTelemetryProvider,
|
|
1885
2970
|
ConsoleTelemetryProvider,
|
|
1886
2971
|
BaseNodePackagerFactory
|