@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.
Files changed (44) hide show
  1. package/dist/browser.js +2380 -0
  2. package/dist/index.js +1331 -131
  3. package/dist/node.js +1225 -110
  4. package/dist/src/base-browser-packager-factory.d.ts +37 -0
  5. package/dist/src/base-node-packager-factory.d.ts +9 -2
  6. package/dist/src/browser-project-packager-factory.d.ts +26 -0
  7. package/dist/src/browser.d.ts +3 -0
  8. package/dist/src/i18n/locales/en.d.ts +30 -1
  9. package/dist/src/index.d.ts +6 -2
  10. package/dist/src/models/packager-config.d.ts +2 -2
  11. package/dist/src/models/packager-parameters.d.ts +8 -0
  12. package/dist/src/models/project-build-options.d.ts +4 -0
  13. package/dist/src/models/project-models.d.ts +0 -11
  14. package/dist/src/node.d.ts +18 -3
  15. package/dist/src/publish/models/publish-options.d.ts +158 -0
  16. package/dist/src/publish/node-project-publisher-factory.d.ts +6 -0
  17. package/dist/src/publish/services/local-folder-publisher.d.ts +19 -0
  18. package/dist/src/publish/services/nuget-feed-publisher.d.ts +29 -0
  19. package/dist/src/publish/services/orchestrator-feed-types.d.ts +98 -0
  20. package/dist/src/publish/services/orchestrator-feeds-service.d.ts +44 -0
  21. package/dist/src/publish/services/orchestrator-publisher.d.ts +78 -0
  22. package/dist/src/publish/services/project-publisher.d.ts +29 -0
  23. package/dist/src/services/dotnet-discovery-service.d.ts +18 -0
  24. package/dist/src/services/nupkg-resolver.d.ts +20 -0
  25. package/dist/src/services/package-sign-service.d.ts +3 -2
  26. package/dist/src/services/package-signer.d.ts +24 -0
  27. package/dist/src/services/project-loader.d.ts +0 -1
  28. package/dist/src/services/project-packager.d.ts +19 -13
  29. package/dist/src/services/project-tool-executor.d.ts +1 -1
  30. package/dist/tests/{project-packager-e2e.test.d.ts → project-packager.e2e.test.d.ts} +1 -0
  31. package/dist/tests/project-packager.spec.d.ts +1 -0
  32. package/dist/tests/publish/local-folder-publisher.spec.d.ts +1 -0
  33. package/dist/tests/publish/nuget-feed-publisher.spec.d.ts +1 -0
  34. package/dist/tests/publish/orchestrator-feeds-service.spec.d.ts +1 -0
  35. package/dist/tests/publish/orchestrator-publisher.spec.d.ts +1 -0
  36. package/dist/tests/publish/project-publisher.spec.d.ts +1 -0
  37. package/dist/tests/tools-factory-repository.spec.d.ts +1 -0
  38. package/package.json +23 -30
  39. /package/dist/tests/{governance-policy-service.test.d.ts → governance-policy-service.spec.d.ts} +0 -0
  40. /package/dist/tests/{pack-service.test.d.ts → pack-service.spec.d.ts} +0 -0
  41. /package/dist/tests/{project-loader.test.d.ts → project-loader.spec.d.ts} +0 -0
  42. /package/dist/tests/{project-packager.test.d.ts → project-pack-options-builder.spec.d.ts} +0 -0
  43. /package/dist/tests/{project-tool-executor.test.d.ts → project-tool-executor.spec.d.ts} +0 -0
  44. /package/dist/tests/{tools-factory-repository.test.d.ts → publish/node-project-publisher-factory.spec.d.ts} +0 -0
package/dist/index.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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
- dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
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
  }
@@ -814,22 +1249,7 @@ I18nManager.registerTranslations("zh-CN", zh_CN_default);
814
1249
  I18nManager.registerTranslations("zh-TW", zh_TW_default);
815
1250
  I18nManager.registerTranslations("zu", zu_default);
816
1251
 
817
- // ../../telemetry/dist/index.js
818
- class ConsoleTelemetryProvider {
819
- async trackEvent(eventName, _properties) {
820
- console.log(`[Telemetry] Event: ${eventName}`);
821
- }
822
- async trackException(error, _properties) {
823
- console.log(`[Telemetry] Exception: ${error.message}`);
824
- }
825
- async trackRequest(name, duration, success, _properties) {
826
- console.log(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
827
- }
828
- async trackDependency(name, type, duration, success, _properties) {
829
- console.log(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
830
- }
831
- }
832
-
1252
+ // ../../common/dist/telemetry/index.js
833
1253
  class BrowserContextStorage {
834
1254
  contextStack = [];
835
1255
  run(context, fn) {
@@ -853,6 +1273,89 @@ class BrowserContextStorage {
853
1273
  }
854
1274
  }
855
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
+
856
1359
  class TelemetryService {
857
1360
  telemetryProvider;
858
1361
  contextStorage;
@@ -869,7 +1372,7 @@ class TelemetryService {
869
1372
  this.telemetryProvider = provider;
870
1373
  }
871
1374
  setDefaultProperties(properties) {
872
- this.defaultProperties = properties;
1375
+ this.defaultProperties = properties === undefined ? undefined : { ...this.defaultProperties, ...properties };
873
1376
  }
874
1377
  trackEvent(name, properties) {
875
1378
  const context = this.getCurrentContext();
@@ -931,6 +1434,7 @@ class TelemetryService {
931
1434
  }
932
1435
  enrichPropertiesWithContext(properties, context) {
933
1436
  return {
1437
+ ...getGlobalTelemetryProperties(),
934
1438
  ...this.defaultProperties,
935
1439
  ...properties,
936
1440
  ...context
@@ -953,6 +1457,7 @@ var RulesConfigFileType;
953
1457
 
954
1458
  class PackagerParameters {
955
1459
  inputPath;
1460
+ downloadUrl;
956
1461
  logLevel = LogLevel.Warn;
957
1462
  outputPath;
958
1463
  targetFramework;
@@ -970,12 +1475,14 @@ class ProjectRestoreOptions extends PackagerParameters {
970
1475
  class ProjectValidateOptions extends ProjectRestoreOptions {
971
1476
  validateOptions = {
972
1477
  skipAnalyze: false,
1478
+ skipValidate: false,
973
1479
  governanceFileType: "Default" /* Default */
974
1480
  };
975
1481
  }
976
1482
 
977
1483
  // src/models/project-build-options.ts
978
1484
  class ProjectBuildOptions extends ProjectValidateOptions {
1485
+ outputType;
979
1486
  }
980
1487
  // src/models/project-pack-options.ts
981
1488
  class ProjectPackOptions extends ProjectBuildOptions {
@@ -984,11 +1491,30 @@ class ProjectPackOptions extends ProjectBuildOptions {
984
1491
  signingInfo;
985
1492
  packOptions;
986
1493
  }
987
- // src/services/governance-policy-service.ts
1494
+ // src/publish/models/publish-options.ts
1495
+ var PublishDestinationKind;
1496
+ ((PublishDestinationKind2) => {
1497
+ PublishDestinationKind2["LocalFolder"] = "LocalFolder";
1498
+ PublishDestinationKind2["NugetFeed"] = "NugetFeed";
1499
+ PublishDestinationKind2["OrchestratorPersonalWorkspace"] = "OrchestratorPersonalWorkspace";
1500
+ PublishDestinationKind2["OrchestratorTenantProcesses"] = "OrchestratorTenantProcesses";
1501
+ PublishDestinationKind2["OrchestratorSharedLibraries"] = "OrchestratorSharedLibraries";
1502
+ PublishDestinationKind2["OrchestratorCustom"] = "OrchestratorCustom";
1503
+ })(PublishDestinationKind ||= {});
1504
+
1505
+ class ProjectPublishOptions {
1506
+ packagePaths;
1507
+ destination;
1508
+ constructor(packagePaths, destination) {
1509
+ this.packagePaths = packagePaths;
1510
+ this.destination = destination;
1511
+ }
1512
+ }
1513
+ // src/publish/services/project-publisher.ts
988
1514
  import {
989
- Path,
990
- toRelativeUrl,
991
- translate
1515
+ ToolErrorCodes as ToolErrorCodes4,
1516
+ ToolResult as ToolResult4,
1517
+ translate as translate5
992
1518
  } from "@uipath/solutionpackager-tool-core";
993
1519
 
994
1520
  // src/services/tool-logger.ts
@@ -1077,7 +1603,648 @@ class ToolLogger {
1077
1603
  }
1078
1604
  }
1079
1605
 
1606
+ // src/publish/services/local-folder-publisher.ts
1607
+ import {
1608
+ ToolErrorCodes,
1609
+ ToolResult,
1610
+ translate
1611
+ } from "@uipath/solutionpackager-tool-core";
1612
+ class LocalFolderPublisher {
1613
+ fileSystem;
1614
+ logger;
1615
+ constructor(fileSystem) {
1616
+ this.fileSystem = fileSystem;
1617
+ this.logger = new ToolLogger("ProjectPublisher", "LocalFolder");
1618
+ }
1619
+ async publishAsync(packagePaths, destination) {
1620
+ const overwrite = destination.overwrite ?? true;
1621
+ if (!destination.folderPath) {
1622
+ return ToolResult.error(ToolErrorCodes.InternalError, translate.t("solutionpackager.publish.errors.localFolderRequired"));
1623
+ }
1624
+ if (!await this.fileSystem.exists(destination.folderPath)) {
1625
+ await this.fileSystem.mkdir(destination.folderPath);
1626
+ }
1627
+ const written = [];
1628
+ for (const sourcePath of packagePaths) {
1629
+ const fileName = this.fileSystem.path.basename(sourcePath);
1630
+ const destPath = this.fileSystem.path.join(destination.folderPath, fileName);
1631
+ if (!overwrite && await this.fileSystem.exists(destPath)) {
1632
+ return ToolResult.error(ToolErrorCodes.InternalError, translate.t("solutionpackager.publish.errors.localFolderFileExists", { path: destPath }));
1633
+ }
1634
+ const data = await this.fileSystem.readFile(sourcePath);
1635
+ if (!data) {
1636
+ return ToolResult.error(ToolErrorCodes.InternalError, translate.t("solutionpackager.publish.errors.failedToReadPackage", { path: sourcePath }));
1637
+ }
1638
+ await this.fileSystem.writeFile(destPath, data);
1639
+ written.push(destPath);
1640
+ this.logger.info(`Copied package to ${destPath}`);
1641
+ }
1642
+ return new ToolResult(ToolErrorCodes.Success, undefined, written);
1643
+ }
1644
+ }
1645
+
1646
+ // src/publish/services/nuget-feed-publisher.ts
1647
+ import {
1648
+ ToolErrorCodes as ToolErrorCodes2,
1649
+ ToolResult as ToolResult2,
1650
+ translate as translate2
1651
+ } from "@uipath/solutionpackager-tool-core";
1652
+ var NUGET_V3_PACKAGE_PUBLISH_TYPE = "PackagePublish/2.0.0";
1653
+
1654
+ class NugetFeedPublisher {
1655
+ fileSystem;
1656
+ logger;
1657
+ constructor(fileSystem) {
1658
+ this.fileSystem = fileSystem;
1659
+ this.logger = new ToolLogger("ProjectPublisher", "NugetFeed");
1660
+ }
1661
+ async publishAsync(packagePaths, destination) {
1662
+ if (!destination.feedUrl) {
1663
+ return ToolResult2.error(ToolErrorCodes2.InternalError, translate2.t("solutionpackager.publish.errors.nugetFeedUrlRequired"));
1664
+ }
1665
+ let pushUrl;
1666
+ try {
1667
+ pushUrl = await this.resolvePushUrl(destination.feedUrl, destination.apiKey);
1668
+ } catch (error) {
1669
+ const message = error instanceof Error ? error.message : String(error);
1670
+ return ToolResult2.error(ToolErrorCodes2.InternalError, translate2.t("solutionpackager.publish.errors.nugetPushUrlResolutionFailed", { feedUrl: destination.feedUrl, message }));
1671
+ }
1672
+ const published = [];
1673
+ for (const packagePath of packagePaths) {
1674
+ const data = await this.fileSystem.readFile(packagePath);
1675
+ if (!data) {
1676
+ return ToolResult2.error(ToolErrorCodes2.InternalError, translate2.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
1677
+ }
1678
+ const fileName = this.fileSystem.path.basename(packagePath);
1679
+ const form = new FormData;
1680
+ form.append("package", new Blob([data], {
1681
+ type: "application/octet-stream"
1682
+ }), fileName);
1683
+ const headers = {};
1684
+ if (destination.apiKey) {
1685
+ headers["X-NuGet-ApiKey"] = destination.apiKey;
1686
+ }
1687
+ this.logger.info(`Pushing ${fileName} to ${pushUrl}`);
1688
+ const response = await fetch(pushUrl, {
1689
+ method: "PUT",
1690
+ headers,
1691
+ body: form
1692
+ });
1693
+ if (!response.ok) {
1694
+ const body = await this.safeReadBody(response);
1695
+ return ToolResult2.error(ToolErrorCodes2.InternalError, translate2.t("solutionpackager.publish.errors.nugetPushFailed", {
1696
+ fileName,
1697
+ status: response.status,
1698
+ statusText: response.statusText,
1699
+ body: body ? ` - ${body}` : ""
1700
+ }));
1701
+ }
1702
+ published.push(packagePath);
1703
+ this.logger.info(`Pushed ${fileName} successfully.`);
1704
+ }
1705
+ return new ToolResult2(ToolErrorCodes2.Success, undefined, published);
1706
+ }
1707
+ async resolvePushUrl(feedUrl, apiKey) {
1708
+ let end = feedUrl.length;
1709
+ while (end > 0 && feedUrl.charCodeAt(end - 1) === 47)
1710
+ end--;
1711
+ const trimmed = feedUrl.slice(0, end);
1712
+ if (/\/api\/v2\/package\/?$/i.test(trimmed)) {
1713
+ return trimmed;
1714
+ }
1715
+ if (/\.json$/i.test(trimmed)) {
1716
+ return this.resolveFromServiceIndex(trimmed, apiKey);
1717
+ }
1718
+ return `${trimmed}/api/v2/package`;
1719
+ }
1720
+ async resolveFromServiceIndex(serviceIndexUrl, apiKey) {
1721
+ const headers = { Accept: "application/json" };
1722
+ if (apiKey) {
1723
+ headers["X-NuGet-ApiKey"] = apiKey;
1724
+ }
1725
+ const response = await fetch(serviceIndexUrl, { headers });
1726
+ if (!response.ok) {
1727
+ throw new Error(`service index returned ${response.status} ${response.statusText}`);
1728
+ }
1729
+ const index = await response.json();
1730
+ const resource = index.resources?.find((r) => r["@type"] === NUGET_V3_PACKAGE_PUBLISH_TYPE);
1731
+ if (!resource?.["@id"]) {
1732
+ throw new Error(`service index has no ${NUGET_V3_PACKAGE_PUBLISH_TYPE} resource`);
1733
+ }
1734
+ return resource["@id"];
1735
+ }
1736
+ async safeReadBody(response) {
1737
+ try {
1738
+ const text = await response.text();
1739
+ return text.slice(0, 500);
1740
+ } catch {
1741
+ return "";
1742
+ }
1743
+ }
1744
+ }
1745
+
1746
+ // src/publish/services/orchestrator-publisher.ts
1747
+ import {
1748
+ ToolErrorCodes as ToolErrorCodes3,
1749
+ ToolResult as ToolResult3,
1750
+ translate as translate4
1751
+ } from "@uipath/solutionpackager-tool-core";
1752
+
1753
+ // src/publish/services/orchestrator-feed-types.ts
1754
+ var PackageFeedDtoPurposeEnum = {
1755
+ Undefined: "Undefined",
1756
+ Processes: "Processes",
1757
+ Libraries: "Libraries",
1758
+ PersonalWorkspace: "PersonalWorkspace",
1759
+ FolderHierarchy: "FolderHierarchy"
1760
+ };
1761
+ var PackageFeedDtoAuthenticationTypeEnum = {
1762
+ Secure: "Secure",
1763
+ ApiKey: "ApiKey",
1764
+ Basic: "Basic"
1765
+ };
1766
+ var ExtendedFolderDtoFeedTypeEnum = {
1767
+ Undefined: "Undefined",
1768
+ Processes: "Processes",
1769
+ Libraries: "Libraries",
1770
+ PersonalWorkspace: "PersonalWorkspace",
1771
+ FolderHierarchy: "FolderHierarchy"
1772
+ };
1773
+
1774
+ // ../../common/dist/sdk-user-agent.js
1775
+ var PREFIX2 = "@uipath/common/";
1776
+ var _g2 = globalThis;
1777
+ function singleton2(ctorOrName) {
1778
+ const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
1779
+ const key = Symbol.for(PREFIX2 + name);
1780
+ return {
1781
+ get(fallback) {
1782
+ return _g2[key] ?? fallback;
1783
+ },
1784
+ set(value) {
1785
+ _g2[key] = value;
1786
+ },
1787
+ clear() {
1788
+ delete _g2[key];
1789
+ },
1790
+ getOrInit(factory, guard) {
1791
+ const existing = _g2[key];
1792
+ if (existing != null && typeof existing === "object") {
1793
+ if (!guard || guard(existing)) {
1794
+ return existing;
1795
+ }
1796
+ }
1797
+ const instance = factory();
1798
+ _g2[key] = instance;
1799
+ return instance;
1800
+ }
1801
+ };
1802
+ }
1803
+ var USER_AGENT_HEADER = "User-Agent";
1804
+ var sdkUserAgentHostToken = singleton2("SdkUserAgentHostToken");
1805
+ function splitUserAgentTokens(value) {
1806
+ return value?.trim().split(/\s+/).filter(Boolean) ?? [];
1807
+ }
1808
+ function appendUserAgentToken(value, userAgent) {
1809
+ const tokens = splitUserAgentTokens(value);
1810
+ const seen = new Set(tokens);
1811
+ for (const token of splitUserAgentTokens(userAgent)) {
1812
+ if (!seen.has(token)) {
1813
+ tokens.push(token);
1814
+ seen.add(token);
1815
+ }
1816
+ }
1817
+ return tokens.join(" ");
1818
+ }
1819
+ function getEffectiveUserAgent(userAgent) {
1820
+ return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
1821
+ }
1822
+ function addSdkUserAgentHeader(headers, userAgent) {
1823
+ const result = { ...headers ?? {} };
1824
+ const effectiveUserAgent = getEffectiveUserAgent(userAgent);
1825
+ const headerName = Object.keys(result).find((key) => key.toLowerCase() === USER_AGENT_HEADER.toLowerCase());
1826
+ if (headerName) {
1827
+ result[headerName] = appendUserAgentToken(result[headerName], effectiveUserAgent);
1828
+ } else {
1829
+ result[USER_AGENT_HEADER] = effectiveUserAgent;
1830
+ }
1831
+ return result;
1832
+ }
1833
+
1834
+ // src/publish/services/orchestrator-feeds-service.ts
1835
+ import { translate as translate3 } from "@uipath/solutionpackager-tool-core";
1836
+ // package.json
1837
+ var package_default = {
1838
+ name: "@uipath/project-packager",
1839
+ license: "MIT",
1840
+ version: "1.196.0",
1841
+ description: "UiPath Project Packager - core library for packing individual UiPath projects",
1842
+ type: "module",
1843
+ main: "./dist/index.js",
1844
+ exports: {
1845
+ ".": {
1846
+ types: "./dist/src/index.d.ts",
1847
+ default: "./dist/index.js"
1848
+ },
1849
+ "./node": {
1850
+ types: "./dist/src/node.d.ts",
1851
+ default: "./dist/node.js"
1852
+ },
1853
+ "./browser": {
1854
+ types: "./dist/src/browser.d.ts",
1855
+ default: "./dist/browser.js"
1856
+ }
1857
+ },
1858
+ types: "./dist/src/index.d.ts",
1859
+ repository: {
1860
+ type: "git",
1861
+ url: "https://github.com/UiPath/cli.git",
1862
+ directory: "packages/packager/project-packager"
1863
+ },
1864
+ publishConfig: {
1865
+ registry: "https://npm.pkg.github.com/"
1866
+ },
1867
+ files: [
1868
+ "dist",
1869
+ "!dist/**/*.map"
1870
+ ],
1871
+ scripts: {
1872
+ 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",
1873
+ clean: "rimraf dist",
1874
+ test: "vitest run",
1875
+ e2e: "vitest run --config vitest.e2e.config.ts",
1876
+ "test:coverage": "vitest run --coverage",
1877
+ prepack: "bun run build",
1878
+ "publish:dry": "bun publish --dry-run",
1879
+ "publish:gh": "bun publish",
1880
+ "version:patch": "bun version patch --no-git-tag-version",
1881
+ "version:minor": "bun version minor --no-git-tag-version",
1882
+ "version:major": "bun version major --no-git-tag-version",
1883
+ lint: "biome check ."
1884
+ },
1885
+ dependencies: {
1886
+ "@uipath/filesystem": "workspace:*",
1887
+ "@uipath/solutionpackager-tool-core": "workspace:*",
1888
+ "@uipath/common": "workspace:*"
1889
+ },
1890
+ peerDependencies: {
1891
+ fflate: "^0.8.2"
1892
+ },
1893
+ devDependencies: {
1894
+ "@types/node": "^25.5.2",
1895
+ "@uipath/resource-builder-tool": "2025.11.0-alpha2928-3101",
1896
+ "@uipath/tool-agent": "^1.2.6",
1897
+ "@uipath/packager-tool-apiworkflow": "workspace:*",
1898
+ "@uipath/packager-tool-connector": "workspace:*",
1899
+ "@uipath/packager-tool-flow": "workspace:*",
1900
+ "@uipath/packager-tool-functions": "workspace:*",
1901
+ "@uipath/packager-tool-webapp": "workspace:*",
1902
+ "@uipath/packager-tool-workflowcompiler": "workspace:*",
1903
+ "@vitest/coverage-v8": "^4.1.6",
1904
+ jsdom: "^29.0.0",
1905
+ typescript: "^6.0.2",
1906
+ "vite-tsconfig-paths": "^6.1.1",
1907
+ vitest: "^4.1.6"
1908
+ }
1909
+ };
1910
+
1911
+ // src/publish/services/orchestrator-feeds-service.ts
1912
+ var HEADER_TENANT_ID = "X-UIPATH-TenantId";
1913
+ var FEEDS_PATH = "/api/PackageFeeds/GetFeeds";
1914
+ var FOLDERS_PATH = "/api/FoldersNavigation/GetAllFoldersForCurrentUser";
1915
+ var SDK_USER_AGENT = `${package_default.name.replace(/^@uipath\//, "")}/${package_default.version}`;
1916
+
1917
+ class OrchestratorFeedsService {
1918
+ logger;
1919
+ constructor() {
1920
+ this.logger = new ToolLogger("OrchestratorFeedsService", "Feeds");
1921
+ }
1922
+ async getAccessibleFeedsAsync(connection) {
1923
+ this.ensureOrchestratorUrl(connection);
1924
+ this.logger.info(`Fetching accessible feeds from ${connection.orchestratorUrl}`);
1925
+ try {
1926
+ const json = await orchestratorGet(connection, FEEDS_PATH);
1927
+ return Array.isArray(json) ? json : [];
1928
+ } catch (error) {
1929
+ const { status, statusText, body } = await describeResponseError(error);
1930
+ throw new Error(translate3.t("solutionpackager.publish.errors.getAccessibleFeedsFailed", { status, statusText, body }));
1931
+ }
1932
+ }
1933
+ async getFoldersForCurrentUserAsync(connection) {
1934
+ this.ensureOrchestratorUrl(connection);
1935
+ this.logger.info(`Fetching folders from ${connection.orchestratorUrl}`);
1936
+ try {
1937
+ const json = await orchestratorGet(connection, FOLDERS_PATH);
1938
+ return Array.isArray(json) ? json.map(mapExtendedFolder) : [];
1939
+ } catch (error) {
1940
+ const { status, statusText, body } = await describeResponseError(error);
1941
+ throw new Error(translate3.t("solutionpackager.publish.errors.getFoldersForCurrentUserFailed", { status, statusText, body }));
1942
+ }
1943
+ }
1944
+ ensureOrchestratorUrl(connection) {
1945
+ if (!connection.orchestratorUrl) {
1946
+ throw new Error(translate3.t("solutionpackager.publish.errors.orchestratorUrlRequired"));
1947
+ }
1948
+ }
1949
+ }
1950
+ function mapExtendedFolder(json) {
1951
+ return {
1952
+ isSelectable: json.IsSelectable,
1953
+ hasChildren: json.HasChildren,
1954
+ level: json.Level,
1955
+ key: json.Key,
1956
+ displayName: json.DisplayName,
1957
+ fullyQualifiedName: json.FullyQualifiedName,
1958
+ description: json.Description,
1959
+ folderType: json.FolderType,
1960
+ isPersonal: json.IsPersonal,
1961
+ provisionType: json.ProvisionType,
1962
+ permissionModel: json.PermissionModel,
1963
+ parentId: json.ParentId,
1964
+ parentKey: json.ParentKey,
1965
+ feedType: json.FeedType,
1966
+ id: json.Id
1967
+ };
1968
+ }
1969
+
1970
+ class OrchestratorResponseError extends Error {
1971
+ response;
1972
+ constructor(response) {
1973
+ super(`Orchestrator request failed with status ${response.status}.`);
1974
+ this.response = response;
1975
+ this.name = "OrchestratorResponseError";
1976
+ }
1977
+ }
1978
+ async function orchestratorGet(connection, relativePath) {
1979
+ const url = `${normalizeOrchestratorBasePath(connection.orchestratorUrl)}${relativePath}`;
1980
+ const response = await fetch(url, {
1981
+ method: "GET",
1982
+ headers: buildHeaders(connection)
1983
+ });
1984
+ if (!response.ok) {
1985
+ throw new OrchestratorResponseError(response);
1986
+ }
1987
+ const text = await response.text();
1988
+ if (text === "" || text === "null") {
1989
+ return null;
1990
+ }
1991
+ return JSON.parse(text);
1992
+ }
1993
+ function buildHeaders(connection) {
1994
+ const headers = {};
1995
+ if (connection.accessToken) {
1996
+ headers.Authorization = `Bearer ${connection.accessToken}`;
1997
+ }
1998
+ if (connection.tenantId) {
1999
+ headers[HEADER_TENANT_ID] = connection.tenantId;
2000
+ }
2001
+ return addSdkUserAgentHeader(headers, SDK_USER_AGENT);
2002
+ }
2003
+ function normalizeOrchestratorBasePath(orchestratorUrl) {
2004
+ let end = orchestratorUrl.length;
2005
+ while (end > 0 && orchestratorUrl.charCodeAt(end - 1) === 47)
2006
+ end--;
2007
+ const trimmed = orchestratorUrl.slice(0, end);
2008
+ return /\/orchestrator_$/i.test(trimmed) ? trimmed : `${trimmed}/orchestrator_`;
2009
+ }
2010
+ async function describeResponseError(error) {
2011
+ const response = error?.response;
2012
+ if (response) {
2013
+ let body = "";
2014
+ try {
2015
+ body = (await response.text()).slice(0, 500);
2016
+ } catch {
2017
+ body = "";
2018
+ }
2019
+ return {
2020
+ status: response.status,
2021
+ statusText: response.statusText,
2022
+ body: body ? ` - ${body}` : ""
2023
+ };
2024
+ }
2025
+ const cause = error?.cause;
2026
+ const message = cause instanceof Error ? cause.message : error instanceof Error ? error.message : String(error);
2027
+ return { status: "?", statusText: message, body: "" };
2028
+ }
2029
+
2030
+ // src/publish/services/orchestrator-publisher.ts
2031
+ var HEADER_FOLDER_ID = "X-UIPATH-OrganizationUnitId";
2032
+ var HEADER_TENANT_ID2 = "X-UIPATH-TenantId";
2033
+ var HEADER_NUGET_API_KEY = "X-NuGet-ApiKey";
2034
+ var ORCHESTRATOR_RELATIVE_URL = "/orchestrator_";
2035
+ var PROCESSES_UPLOAD_PATH = "/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage";
2036
+ var LIBRARIES_UPLOAD_PATH = "/odata/Libraries/UiPath.Server.Configuration.OData.UploadPackage";
2037
+
2038
+ class OrchestratorPublisher {
2039
+ fileSystem;
2040
+ logger;
2041
+ feedsService;
2042
+ constructor(fileSystem, feedsService) {
2043
+ this.fileSystem = fileSystem;
2044
+ this.logger = new ToolLogger("ProjectPublisher", "Orchestrator");
2045
+ this.feedsService = feedsService ?? new OrchestratorFeedsService;
2046
+ }
2047
+ async publishAsync(packagePaths, destination) {
2048
+ if (packagePaths.length === 0) {
2049
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.orchestratorNoPackages"));
2050
+ }
2051
+ if (destination.kind === "OrchestratorCustom" /* OrchestratorCustom */) {
2052
+ if (!destination.publishUrl) {
2053
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.orchestratorCustomPublishUrlRequired"));
2054
+ }
2055
+ this.logger.info(`Publishing ${packagePaths.length} package(s) to ${destination.publishUrl} (custom)`);
2056
+ return this.postPackages(packagePaths, destination.publishUrl, this.buildCustomHeaders(destination));
2057
+ }
2058
+ if (!destination.connectionInfo?.cloudUrl) {
2059
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.orchestratorCloudUrlRequired"));
2060
+ }
2061
+ const orchestratorUrl = this.deriveOrchestratorUrl(destination.connectionInfo);
2062
+ let feed;
2063
+ try {
2064
+ feed = await this.resolveFeed(destination, orchestratorUrl);
2065
+ } catch (error) {
2066
+ const message = error instanceof Error ? error.message : String(error);
2067
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.orchestratorFeedResolutionFailed", { message }));
2068
+ }
2069
+ const targetUrl = this.buildPublishUrl(orchestratorUrl, feed);
2070
+ const headers = this.buildHeaders(destination, feed);
2071
+ this.logger.info(`Publishing ${packagePaths.length} package(s) to ${targetUrl} (feed ${feed.name}, ${feed.purpose})`);
2072
+ return this.postPackages(packagePaths, targetUrl, headers);
2073
+ }
2074
+ async postPackages(packagePaths, targetUrl, headers) {
2075
+ const form = new FormData;
2076
+ for (const packagePath of packagePaths) {
2077
+ const data = await this.fileSystem.readFile(packagePath);
2078
+ if (!data) {
2079
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
2080
+ }
2081
+ const fileName = this.fileSystem.path.basename(packagePath);
2082
+ form.append("file", new Blob([data], {
2083
+ type: "application/octet-stream"
2084
+ }), fileName);
2085
+ }
2086
+ const response = await fetch(targetUrl, {
2087
+ method: "POST",
2088
+ headers,
2089
+ body: form
2090
+ });
2091
+ if (!response.ok) {
2092
+ const body = await this.safeReadBody(response);
2093
+ return ToolResult3.error(ToolErrorCodes3.InternalError, translate4.t("solutionpackager.publish.errors.orchestratorPublishFailed", {
2094
+ status: response.status,
2095
+ statusText: response.statusText,
2096
+ body: body ? ` - ${body}` : ""
2097
+ }));
2098
+ }
2099
+ this.logger.info("Orchestrator publish completed.");
2100
+ return new ToolResult3(ToolErrorCodes3.Success, undefined, packagePaths);
2101
+ }
2102
+ async resolveFeed(destination, orchestratorUrl) {
2103
+ const connection = {
2104
+ orchestratorUrl,
2105
+ accessToken: destination.connectionInfo.accessToken,
2106
+ tenantId: destination.connectionInfo.tenantId
2107
+ };
2108
+ const feeds = await this.feedsService.getAccessibleFeedsAsync(connection);
2109
+ if (destination.kind === "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */) {
2110
+ const folders = await this.feedsService.getFoldersForCurrentUserAsync(connection);
2111
+ const personalFolder = folders.find((f) => f.feedType === ExtendedFolderDtoFeedTypeEnum.PersonalWorkspace);
2112
+ if (!personalFolder) {
2113
+ const foldersDebug = folders.length === 0 ? "<none>" : folders.map((f) => `${f.displayName} (id=${f.id}, feedType=${f.feedType})`).join(", ");
2114
+ throw new Error(translate4.t("solutionpackager.publish.errors.orchestratorPersonalWorkspaceFolderNotFound", { folders: foldersDebug }));
2115
+ }
2116
+ if (personalFolder.id == null) {
2117
+ throw new Error(`Personal-workspace folder "${personalFolder.displayName}" has no id; cannot resolve its feed.`);
2118
+ }
2119
+ const match2 = feeds.find((f) => f.folderId === personalFolder.id);
2120
+ if (!match2) {
2121
+ this.throwFeedNotFound(destination, feeds);
2122
+ }
2123
+ return match2;
2124
+ }
2125
+ const expectedPurpose = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? PackageFeedDtoPurposeEnum.Libraries : PackageFeedDtoPurposeEnum.Processes;
2126
+ const match = feeds.find((f) => f.purpose === expectedPurpose && f.folderId == null);
2127
+ if (!match) {
2128
+ this.throwFeedNotFound(destination, feeds);
2129
+ }
2130
+ return match;
2131
+ }
2132
+ throwFeedNotFound(destination, feeds) {
2133
+ const available = feeds.length === 0 ? "<none>" : feeds.map((f) => `${f.name} (purpose=${f.purpose}, folderId=${f.folderId ?? "null"})`).join(", ");
2134
+ throw new Error(translate4.t("solutionpackager.publish.errors.orchestratorFeedNotFound", {
2135
+ kind: destination.kind,
2136
+ available
2137
+ }));
2138
+ }
2139
+ buildPublishUrl(orchestratorUrl, feed) {
2140
+ const baseUrl = feed.publishUrl ? feed.publishUrl : `${orchestratorUrl}${feed.purpose === PackageFeedDtoPurposeEnum.Libraries ? LIBRARIES_UPLOAD_PATH : PROCESSES_UPLOAD_PATH}`;
2141
+ const parsed = new URL(baseUrl);
2142
+ if (feed.id) {
2143
+ parsed.searchParams.set("feedId", feed.id);
2144
+ }
2145
+ return parsed.toString();
2146
+ }
2147
+ deriveOrchestratorUrl(connectionInfo) {
2148
+ const raw = connectionInfo.cloudUrl ?? "";
2149
+ let end = raw.length;
2150
+ while (end > 0 && raw.charCodeAt(end - 1) === 47)
2151
+ end--;
2152
+ return `${raw.slice(0, end)}${ORCHESTRATOR_RELATIVE_URL}`;
2153
+ }
2154
+ buildHeaders(destination, feed) {
2155
+ const headers = this.buildAuthHeaders(destination.connectionInfo);
2156
+ const folderHeader = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? destination.folderId : feed.folderId;
2157
+ if (folderHeader != null) {
2158
+ headers[HEADER_FOLDER_ID] = String(folderHeader);
2159
+ }
2160
+ if (feed.authenticationType === PackageFeedDtoAuthenticationTypeEnum.ApiKey && feed.apiKey) {
2161
+ headers[HEADER_NUGET_API_KEY] = feed.apiKey;
2162
+ }
2163
+ return headers;
2164
+ }
2165
+ buildCustomHeaders(destination) {
2166
+ const headers = this.buildAuthHeaders(destination.connectionInfo);
2167
+ if (destination.folderId != null) {
2168
+ headers[HEADER_FOLDER_ID] = String(destination.folderId);
2169
+ }
2170
+ if (destination.apiKey) {
2171
+ headers[HEADER_NUGET_API_KEY] = destination.apiKey;
2172
+ }
2173
+ return headers;
2174
+ }
2175
+ buildAuthHeaders(connectionInfo) {
2176
+ const headers = {};
2177
+ if (connectionInfo.accessToken) {
2178
+ headers.Authorization = `Bearer ${connectionInfo.accessToken}`;
2179
+ }
2180
+ if (connectionInfo.tenantId) {
2181
+ headers[HEADER_TENANT_ID2] = connectionInfo.tenantId;
2182
+ }
2183
+ return headers;
2184
+ }
2185
+ async safeReadBody(response) {
2186
+ try {
2187
+ const text = await response.text();
2188
+ return text.slice(0, 500);
2189
+ } catch {
2190
+ return "";
2191
+ }
2192
+ }
2193
+ }
2194
+
2195
+ // src/publish/services/project-publisher.ts
2196
+ class ProjectPublisher {
2197
+ fileSystem;
2198
+ logger;
2199
+ localFolderPublisher;
2200
+ nugetFeedPublisher;
2201
+ orchestratorPublisher;
2202
+ constructor(fileSystem, publishers) {
2203
+ this.fileSystem = fileSystem;
2204
+ this.logger = new ToolLogger("ProjectPublisher", "Publish");
2205
+ this.localFolderPublisher = publishers?.localFolder ?? new LocalFolderPublisher(fileSystem);
2206
+ this.nugetFeedPublisher = publishers?.nugetFeed ?? new NugetFeedPublisher(fileSystem);
2207
+ this.orchestratorPublisher = publishers?.orchestrator ?? new OrchestratorPublisher(fileSystem);
2208
+ }
2209
+ async publishAsync(options) {
2210
+ if (!options.packagePaths || options.packagePaths.length === 0) {
2211
+ return ToolResult4.error(ToolErrorCodes4.InternalError, translate5.t("solutionpackager.publish.errors.atLeastOnePackage"));
2212
+ }
2213
+ for (const path of options.packagePaths) {
2214
+ if (!await this.fileSystem.exists(path)) {
2215
+ return ToolResult4.error(ToolErrorCodes4.InternalError, translate5.t("solutionpackager.publish.errors.packageNotFound", { path }));
2216
+ }
2217
+ }
2218
+ try {
2219
+ const destination = options.destination;
2220
+ switch (destination.kind) {
2221
+ case "LocalFolder" /* LocalFolder */:
2222
+ return await this.localFolderPublisher.publishAsync(options.packagePaths, destination);
2223
+ case "NugetFeed" /* NugetFeed */:
2224
+ return await this.nugetFeedPublisher.publishAsync(options.packagePaths, destination);
2225
+ case "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */:
2226
+ case "OrchestratorTenantProcesses" /* OrchestratorTenantProcesses */:
2227
+ case "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */:
2228
+ case "OrchestratorCustom" /* OrchestratorCustom */:
2229
+ return await this.orchestratorPublisher.publishAsync(options.packagePaths, destination);
2230
+ default: {
2231
+ const exhaustive = destination;
2232
+ return ToolResult4.error(ToolErrorCodes4.InternalError, translate5.t("solutionpackager.publish.errors.unknownDestination", { destination: JSON.stringify(exhaustive) }));
2233
+ }
2234
+ }
2235
+ } catch (error) {
2236
+ const message = error instanceof Error ? error.message : String(error);
2237
+ const localized = translate5.t("solutionpackager.publish.errors.publishFailed", { message });
2238
+ this.logger.error(localized);
2239
+ return ToolResult4.error(ToolErrorCodes4.InternalError, localized);
2240
+ }
2241
+ }
2242
+ }
1080
2243
  // src/services/governance-policy-service.ts
2244
+ import {
2245
+ Path,
2246
+ translate as translate6
2247
+ } from "@uipath/solutionpackager-tool-core";
1081
2248
  var LICENSE_TYPES = {
1082
2249
  NoLicense: "NoLicense",
1083
2250
  Development: "Development",
@@ -1092,7 +2259,7 @@ var ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense";
1092
2259
  var GOVERNANCE_SUBFOLDER = "governance";
1093
2260
  var GOVERNANCE_FILE_NAME = "governance-policy.json";
1094
2261
  var errorMessage = (error) => error instanceof Error ? error.message : String(error);
1095
- var t = (key, params) => translate.t(`solutionpackager.governance.${key}`, params);
2262
+ var t = (key, params) => translate6.t(`solutionpackager.governance.${key}`, params);
1096
2263
 
1097
2264
  class GovernancePolicyService {
1098
2265
  fileSystem;
@@ -1112,7 +2279,7 @@ class GovernancePolicyService {
1112
2279
  this.logger.info(t("info.alreadyProvided"));
1113
2280
  return;
1114
2281
  }
1115
- const cloudUrl = connectionInfo?.cloudUrl;
2282
+ let cloudUrl = connectionInfo?.cloudUrl;
1116
2283
  const organizationId = connectionInfo?.organizationId;
1117
2284
  const tenantId = connectionInfo?.tenantId;
1118
2285
  const accessToken = connectionInfo?.accessToken;
@@ -1122,9 +2289,17 @@ class GovernancePolicyService {
1122
2289
  return;
1123
2290
  }
1124
2291
  const profileKey = validateOptions.profileKey ?? DEFAULT_PROFILE_KEY;
1125
- const orchestratorUrl = toRelativeUrl(cloudUrl);
1126
- const licenseType = await this.resolveLicenseTypeAsync(profileKey, orchestratorUrl, accessToken, cancellationToken);
1127
- const policy = await this.downloadPolicyAsync(organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
2292
+ let cloudOrigin;
2293
+ try {
2294
+ cloudOrigin = new URL(cloudUrl).origin;
2295
+ cloudUrl = cloudUrl.replace(/\/+$/, "");
2296
+ } catch {
2297
+ this.logger.warn(t("errors.connectionIncomplete"));
2298
+ validateOptions.governanceFileType = "Default" /* Default */;
2299
+ return;
2300
+ }
2301
+ const licenseType = await this.resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken);
2302
+ const policy = await this.downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
1128
2303
  if (!policy) {
1129
2304
  validateOptions.governanceFileType = "Default" /* Default */;
1130
2305
  return;
@@ -1142,8 +2317,8 @@ class GovernancePolicyService {
1142
2317
  validateOptions.governanceFileType = "Default" /* Default */;
1143
2318
  }
1144
2319
  }
1145
- async downloadPolicyAsync(organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
1146
- const policyUrl = `/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
2320
+ async downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
2321
+ const policyUrl = `${cloudOrigin}/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
1147
2322
  this.logger.info(t("info.downloading", { url: policyUrl }));
1148
2323
  try {
1149
2324
  const response = await this.fetchFn(policyUrl, {
@@ -1175,11 +2350,11 @@ class GovernancePolicyService {
1175
2350
  return null;
1176
2351
  }
1177
2352
  }
1178
- async resolveLicenseTypeAsync(profileKey, orchestratorUrl, accessToken, cancellationToken) {
2353
+ async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
1179
2354
  const isStudioWeb = profileKey === DEFAULT_PROFILE_KEY;
1180
2355
  const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
1181
2356
  try {
1182
- const response = await this.fetchFn(`${orchestratorUrl}${ACQUIRE_LICENSE_PATH}`, {
2357
+ const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
1183
2358
  method: "POST",
1184
2359
  headers: { Authorization: `Bearer ${accessToken}` },
1185
2360
  signal: cancellationToken
@@ -1214,7 +2389,7 @@ class GovernancePolicyService {
1214
2389
  }
1215
2390
  // src/services/pack-service.ts
1216
2391
  class PackService {
1217
- disallowedCharsRegex = /[^\w.-]/g;
2392
+ disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
1218
2393
  spacesDotRegex = /[\s.]+/g;
1219
2394
  dotDashRegex = /\.{0,10}[-:]\.{0,10}/g;
1220
2395
  MaxPackageIdLength = 100;
@@ -1231,9 +2406,9 @@ class PackService {
1231
2406
  }
1232
2407
  // src/services/packager-parameters-validator.ts
1233
2408
  import {
1234
- ToolErrorCodes,
1235
- ToolResult,
1236
- translate as translate2
2409
+ ToolErrorCodes as ToolErrorCodes5,
2410
+ ToolResult as ToolResult5,
2411
+ translate as translate7
1237
2412
  } from "@uipath/solutionpackager-tool-core";
1238
2413
  class PackagerParametersValidator {
1239
2414
  logger;
@@ -1243,52 +2418,52 @@ class PackagerParametersValidator {
1243
2418
  this.fileSystem = fileSystem;
1244
2419
  }
1245
2420
  async validateAsync(_options, _cancellationToken) {
1246
- return ToolResult.success();
2421
+ return ToolResult5.success();
1247
2422
  }
1248
2423
  validateDestinationPath(destinationPath) {
1249
2424
  if (!destinationPath) {
1250
- const error = translate2.t("solutionpackager.validator.errors.destinationNotDefined");
2425
+ const error = translate7.t("solutionpackager.validator.errors.destinationNotDefined");
1251
2426
  this.logger.error(error);
1252
- return ToolResult.error(ToolErrorCodes.InternalError, error);
2427
+ return ToolResult5.error(ToolErrorCodes5.InternalError, error);
1253
2428
  }
1254
- return ToolResult.success();
2429
+ return ToolResult5.success();
1255
2430
  }
1256
2431
  async validateGovernanceOptions(validateOptions) {
1257
2432
  if (validateOptions.governanceFileType === "Default" /* Default */) {
1258
2433
  if (validateOptions.governanceFilePath) {
1259
2434
  this.logger.warn(`Governance file path '${validateOptions.governanceFilePath}' will be ignored when governance file type is Default`);
1260
2435
  }
1261
- return ToolResult.success();
2436
+ return ToolResult5.success();
1262
2437
  }
1263
2438
  if (!validateOptions.governanceFilePath) {
1264
- const error = translate2.t("solutionpackager.validator.errors.governanceRequired");
2439
+ const error = translate7.t("solutionpackager.validator.errors.governanceRequired");
1265
2440
  this.logger.error(error);
1266
- return ToolResult.error(ToolErrorCodes.InternalError, error);
2441
+ return ToolResult5.error(ToolErrorCodes5.InternalError, error);
1267
2442
  }
1268
2443
  try {
1269
2444
  const stat = await this.fileSystem.stat(validateOptions.governanceFilePath);
1270
2445
  if (!stat) {
1271
- const error = translate2.t("solutionpackager.validator.errors.governanceFileInfo", {
2446
+ const error = translate7.t("solutionpackager.validator.errors.governanceFileInfo", {
1272
2447
  path: validateOptions.governanceFilePath
1273
2448
  });
1274
2449
  this.logger.error(error);
1275
- return ToolResult.error(ToolErrorCodes.InternalError, error);
2450
+ return ToolResult5.error(ToolErrorCodes5.InternalError, error);
1276
2451
  }
1277
2452
  if (stat.isDirectory()) {
1278
- const error = translate2.t("solutionpackager.validator.errors.governanceInvalidFile", {
2453
+ const error = translate7.t("solutionpackager.validator.errors.governanceInvalidFile", {
1279
2454
  path: validateOptions.governanceFilePath
1280
2455
  });
1281
2456
  this.logger.error(error);
1282
- return ToolResult.error(ToolErrorCodes.InternalError, error);
2457
+ return ToolResult5.error(ToolErrorCodes5.InternalError, error);
1283
2458
  }
1284
2459
  } catch (error) {
1285
2460
  const errorMessage2 = error instanceof Error ? error.message : String(error);
1286
2461
  const errorLog = `Governance file not found or inaccessible: ${validateOptions.governanceFilePath}. Error: ${errorMessage2}`;
1287
2462
  this.logger.error(errorLog);
1288
- return ToolResult.error(ToolErrorCodes.InternalError, errorLog);
2463
+ return ToolResult5.error(ToolErrorCodes5.InternalError, errorLog);
1289
2464
  }
1290
2465
  this.logger.info(`Using Studio governance file: ${validateOptions.governanceFilePath}`);
1291
- return ToolResult.success();
2466
+ return ToolResult5.success();
1292
2467
  }
1293
2468
  }
1294
2469
  // src/services/project-build-options-validator.ts
@@ -1300,22 +2475,22 @@ class ProjectBuildOptionsValidator extends PackagerParametersValidator {
1300
2475
  // src/services/project-loader.ts
1301
2476
  import {
1302
2477
  Path as Path2,
2478
+ ProjectTool,
1303
2479
  ProjectTypes,
1304
- translate as translate3
2480
+ translate as translate8
1305
2481
  } from "@uipath/solutionpackager-tool-core";
1306
2482
 
1307
2483
  class ProjectLoader {
1308
2484
  fileSystem;
1309
- static ProjectFileName = "project.uiproj";
1310
2485
  static WebAppManifestFileName = "webAppManifest.json";
1311
2486
  constructor(fileSystem) {
1312
2487
  this.fileSystem = fileSystem;
1313
2488
  }
1314
2489
  async loadProject(projectPath) {
1315
2490
  if (!projectPath) {
1316
- throw new Error(translate3.t("solutionpackager.projectLoader.errors.pathRequired"));
2491
+ throw new Error(translate8.t("solutionpackager.projectLoader.errors.pathRequired"));
1317
2492
  }
1318
- const projectFilePath = Path2.join(projectPath, ProjectLoader.ProjectFileName);
2493
+ const projectFilePath = Path2.join(projectPath, ProjectTool.ProjectFileName);
1319
2494
  const projectFileExists = await this.fileSystem.exists(projectFilePath);
1320
2495
  if (projectFileExists) {
1321
2496
  return await this.loadFromProjectFile(projectPath, projectFilePath);
@@ -1325,8 +2500,8 @@ class ProjectLoader {
1325
2500
  if (webAppManifestExists) {
1326
2501
  return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
1327
2502
  }
1328
- throw new Error(translate3.t("solutionpackager.projectLoader.errors.noProjectFile", {
1329
- projectFile: ProjectLoader.ProjectFileName,
2503
+ throw new Error(translate8.t("solutionpackager.projectLoader.errors.noProjectFile", {
2504
+ projectFile: ProjectTool.ProjectFileName,
1330
2505
  manifestFile: ProjectLoader.WebAppManifestFileName,
1331
2506
  path: projectPath
1332
2507
  }));
@@ -1334,7 +2509,7 @@ class ProjectLoader {
1334
2509
  async loadFromProjectFile(projectPath, projectFilePath) {
1335
2510
  const fileContent = await this.fileSystem.readFile(projectFilePath);
1336
2511
  if (!fileContent) {
1337
- throw new Error(translate3.t("solutionpackager.projectLoader.errors.readFailed", {
2512
+ throw new Error(translate8.t("solutionpackager.projectLoader.errors.readFailed", {
1338
2513
  path: projectFilePath
1339
2514
  }));
1340
2515
  }
@@ -1342,7 +2517,7 @@ class ProjectLoader {
1342
2517
  const projectData = JSON.parse(json);
1343
2518
  const projectType = projectData?.ProjectType || projectData?.type;
1344
2519
  if (!projectData || !projectType) {
1345
- throw new Error(translate3.t("solutionpackager.projectLoader.errors.invalidProject", {
2520
+ throw new Error(translate8.t("solutionpackager.projectLoader.errors.invalidProject", {
1346
2521
  path: projectFilePath
1347
2522
  }));
1348
2523
  }
@@ -1368,10 +2543,11 @@ import {
1368
2543
  toolsFactoryRepository as defaultToolsFactoryRepository,
1369
2544
  NugetPackager,
1370
2545
  Path as Path3,
2546
+ TargetFramework,
1371
2547
  TemporaryStorageService,
1372
- ToolErrorCodes as ToolErrorCodes3,
1373
- ToolResult as ToolResult3,
1374
- translate as translate4,
2548
+ ToolErrorCodes as ToolErrorCodes7,
2549
+ ToolResult as ToolResult7,
2550
+ translate as translate9,
1375
2551
  ZipService
1376
2552
  } from "@uipath/solutionpackager-tool-core";
1377
2553
 
@@ -1413,12 +2589,12 @@ class ProjectPackOptionsBuilder {
1413
2589
  nuGetSourcesConfigPath: parameters.nuGetSourcesConfigPath,
1414
2590
  logLevel: parameters.logLevel,
1415
2591
  skipAnalyze: parameters.validateOptions.skipAnalyze,
1416
- skipValidate: false,
2592
+ skipValidate: parameters.validateOptions.skipValidate,
1417
2593
  detailedLogPath: parameters.detailedLogPath,
1418
2594
  policyFilePath: parameters.validateOptions.governanceFilePath,
1419
2595
  policyFileType: parameters.validateOptions.governanceFileType,
1420
2596
  outputPath: parameters.outputPath,
1421
- outputType: undefined,
2597
+ outputType: parameters.outputType,
1422
2598
  projectType: project.type,
1423
2599
  package: packageInfo,
1424
2600
  skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
@@ -1441,8 +2617,8 @@ class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
1441
2617
 
1442
2618
  // src/services/project-tool-executor.ts
1443
2619
  import {
1444
- ToolErrorCodes as ToolErrorCodes2,
1445
- ToolResult as ToolResult2
2620
+ ToolErrorCodes as ToolErrorCodes6,
2621
+ ToolResult as ToolResult6
1446
2622
  } from "@uipath/solutionpackager-tool-core";
1447
2623
  class ProjectToolExecutor {
1448
2624
  toolsFactory;
@@ -1500,12 +2676,12 @@ class ProjectToolExecutor {
1500
2676
  }
1501
2677
  }
1502
2678
  } catch (error) {
1503
- return ToolResult2.error(ToolErrorCodes2.InternalError, error instanceof Error ? error.message : String(error));
2679
+ return ToolResult6.error(ToolErrorCodes6.InternalError, error instanceof Error ? error.message : String(error));
1504
2680
  }
1505
2681
  }
1506
2682
  async signPackagesAsync(packages, signingInfo) {
1507
2683
  if (!this.packageSignService) {
1508
- 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.");
2684
+ return ToolResult6.error(ToolErrorCodes6.InternalError, "Package signing is required but signing service is not available. Package signing requires dotnet CLI to be installed in Node.js environment.");
1509
2685
  }
1510
2686
  const certificatePath = signingInfo.certificatePath;
1511
2687
  const signResults = await Promise.all(packages.map((packagePath) => this.packageSignService?.signPackageAsync(packagePath, certificatePath, signingInfo.certificatePassword, signingInfo.timestampServer)));
@@ -1513,7 +2689,7 @@ class ProjectToolExecutor {
1513
2689
  if (failedResult) {
1514
2690
  return failedResult;
1515
2691
  }
1516
- return ToolResult2.success();
2692
+ return ToolResult6.success();
1517
2693
  }
1518
2694
  }
1519
2695
 
@@ -1592,10 +2768,6 @@ class ProjectPackager {
1592
2768
  this.projectLoader = new ProjectLoader(this.fileSystem);
1593
2769
  this.governancePolicyService = new GovernancePolicyService(this.fileSystem, this.temporaryStorage);
1594
2770
  }
1595
- async canPackProjectAsync(projectPath) {
1596
- const project = await this.projectLoader.loadProject(projectPath);
1597
- return this.repository.canHandleProject(project.type);
1598
- }
1599
2771
  async setupAsync(input, operationId) {
1600
2772
  this.telemetryService.setOperationId(operationId);
1601
2773
  await this.temporaryStorage.cleanup();
@@ -1639,12 +2811,14 @@ class ProjectPackager {
1639
2811
  nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
1640
2812
  logLevel: options.logLevel,
1641
2813
  skipAnalyze: options.validateOptions.skipAnalyze,
2814
+ skipValidate: options.validateOptions.skipValidate,
1642
2815
  defaultSeverity: options.validateOptions.defaultSeverity,
1643
2816
  detailedLogPath: options.detailedLogPath,
1644
2817
  policyFilePath: options.validateOptions.governanceFilePath,
1645
2818
  policyFileType: options.validateOptions.governanceFileType
1646
2819
  };
1647
- return await this.projectExecutor.validateAsync(validateOptions, uiPathProject, undefined, cancellationToken);
2820
+ const context = this.createOperationContext(options, uiPathProject);
2821
+ return await this.projectExecutor.validateAsync(validateOptions, uiPathProject, context, cancellationToken);
1648
2822
  }, cancellationToken);
1649
2823
  }
1650
2824
  async buildProjectAsync(options, cancellationToken) {
@@ -1663,12 +2837,12 @@ class ProjectPackager {
1663
2837
  nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
1664
2838
  logLevel: options.logLevel,
1665
2839
  skipAnalyze: options.validateOptions.skipAnalyze,
1666
- skipValidate: false,
2840
+ skipValidate: options.validateOptions.skipValidate,
1667
2841
  detailedLogPath: options.detailedLogPath,
1668
2842
  policyFilePath: options.validateOptions.governanceFilePath,
1669
2843
  policyFileType: options.validateOptions.governanceFileType,
1670
2844
  outputPath: options.outputPath,
1671
- outputType: undefined,
2845
+ outputType: options.outputType,
1672
2846
  projectType: uiPathProject.Type
1673
2847
  };
1674
2848
  return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, undefined, cancellationToken);
@@ -1694,10 +2868,11 @@ class ProjectPackager {
1694
2868
  ProjectPath: loadedProject.projectPath,
1695
2869
  Id: loadedProject.name
1696
2870
  };
1697
- result = await this.projectExecutor.packAsync(projectPackOptions, uiPathProject, undefined, options.signingInfo, cancellationToken);
2871
+ const context = this.createOperationContext(options, uiPathProject);
2872
+ result = await this.projectExecutor.packAsync(projectPackOptions, uiPathProject, context, options.signingInfo, cancellationToken);
1698
2873
  if (result.isSuccess && result.packages.length > 0) {
1699
2874
  const destinationPackages = await this.copyPackagesToDestination(result.packages, options.destinationPath, projectPackOptions.package);
1700
- result = new ToolResult3(ToolErrorCodes3.Success, undefined, destinationPackages);
2875
+ result = new ToolResult7(ToolErrorCodes7.Success, undefined, destinationPackages);
1701
2876
  }
1702
2877
  if (result.isSuccess) {
1703
2878
  this.logger.info(`Project pack completed successfully. Packages: ${result.packages.join(", ")}`);
@@ -1708,7 +2883,7 @@ class ProjectPackager {
1708
2883
  } catch (error) {
1709
2884
  const errorMessage2 = error instanceof Error ? error.message : String(error);
1710
2885
  this.logger.error(`Processing error: ${errorMessage2}`);
1711
- return ToolResult3.error(ToolErrorCodes3.InternalError, `Project pack failed: ${errorMessage2}`);
2886
+ return ToolResult7.error(ToolErrorCodes7.InternalError, `Project pack failed: ${errorMessage2}`);
1712
2887
  } finally {
1713
2888
  await this.temporaryStorage.cleanup();
1714
2889
  }
@@ -1716,7 +2891,7 @@ class ProjectPackager {
1716
2891
  }
1717
2892
  async getPackageStreamsAsync(result) {
1718
2893
  if (!result.isSuccess) {
1719
- throw new Error(translate4.t("solutionpackager.packager.errors.failedToGetStreams", {
2894
+ throw new Error(translate9.t("solutionpackager.packager.errors.failedToGetStreams", {
1720
2895
  errorCode: result.errorCode,
1721
2896
  message: result.message ?? ""
1722
2897
  }));
@@ -1728,7 +2903,7 @@ class ProjectPackager {
1728
2903
  for (const packagePath of result.packages) {
1729
2904
  const data = await this.fileSystem.readFile(packagePath);
1730
2905
  if (!data) {
1731
- throw new Error(translate4.t("solutionpackager.packager.errors.failedToReadPackage", {
2906
+ throw new Error(translate9.t("solutionpackager.packager.errors.failedToReadPackage", {
1732
2907
  path: packagePath
1733
2908
  }));
1734
2909
  }
@@ -1757,12 +2932,40 @@ class ProjectPackager {
1757
2932
  } catch (error) {
1758
2933
  const errorMessage2 = error instanceof Error ? error.message : String(error);
1759
2934
  this.logger.error(`Processing error: ${errorMessage2}`);
1760
- return ToolResult3.error(ToolErrorCodes3.InternalError, `Project ${operationName.toLowerCase()} failed: ${errorMessage2}`);
2935
+ return ToolResult7.error(ToolErrorCodes7.InternalError, `Project ${operationName.toLowerCase()} failed: ${errorMessage2}`);
1761
2936
  } finally {
1762
2937
  await this.temporaryStorage.cleanup();
1763
2938
  }
1764
2939
  });
1765
2940
  }
2941
+ createOperationContext(options, uiPathProject) {
2942
+ return {
2943
+ id: crypto.randomUUID(),
2944
+ projects: [uiPathProject],
2945
+ downloadUrl: options.downloadUrl,
2946
+ targetFramework: options.targetFramework ?? TargetFramework.Portable,
2947
+ connection: options.connection,
2948
+ logger: this.logger,
2949
+ workflowCompilerVersion: options.workflowCompilerVersion
2950
+ };
2951
+ }
2952
+ async findNupkgInParentDir(packagePath) {
2953
+ const dirName = Path3.basename(packagePath);
2954
+ const parentDir = Path3.dirname(packagePath);
2955
+ const parentFiles = await this.fileSystem.readdir(parentDir);
2956
+ const matchingFiles = parentFiles.filter((f) => f.endsWith(".nupkg") && f.startsWith(`${dirName}.`));
2957
+ return { dir: parentDir, files: matchingFiles };
2958
+ }
2959
+ async copyFileToDestination(sourcePath, destinationPath) {
2960
+ const fileName = Path3.basename(sourcePath);
2961
+ const destPath = Path3.join(destinationPath, fileName);
2962
+ const data = await this.fileSystem.readFile(sourcePath);
2963
+ if (!data) {
2964
+ throw new Error(translate9.t("solutionpackager.packager.errors.failedToReadPackage", { path: sourcePath }));
2965
+ }
2966
+ await this.fileSystem.writeFile(destPath, data);
2967
+ return destPath;
2968
+ }
1766
2969
  async copyPackagesToDestination(packagePaths, destinationPath, packageInfo) {
1767
2970
  await this.fileSystem.mkdir(destinationPath);
1768
2971
  const destinationPackages = [];
@@ -1774,33 +2977,27 @@ class ProjectPackager {
1774
2977
  if (nupkgFiles.length > 0) {
1775
2978
  for (const nupkgFile of nupkgFiles) {
1776
2979
  const filePath = Path3.join(packagePath, nupkgFile);
1777
- const destPath = Path3.join(destinationPath, nupkgFile);
1778
- const data = await this.fileSystem.readFile(filePath);
1779
- if (!data) {
1780
- throw new Error(translate4.t("solutionpackager.packager.errors.failedToReadPackage", {
1781
- path: filePath
1782
- }));
1783
- }
1784
- await this.fileSystem.writeFile(destPath, data);
1785
- destinationPackages.push(destPath);
2980
+ const dest = await this.copyFileToDestination(filePath, destinationPath);
2981
+ destinationPackages.push(dest);
1786
2982
  }
1787
2983
  } else {
1788
- const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
1789
- const destPath = Path3.join(destinationPath, nupkgFileName);
1790
- const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
1791
- destinationPackages.push(packResult.outputPath);
2984
+ const parent = await this.findNupkgInParentDir(packagePath);
2985
+ if (parent.files.length > 0) {
2986
+ for (const nupkgFile of parent.files) {
2987
+ const filePath = Path3.join(parent.dir, nupkgFile);
2988
+ const dest = await this.copyFileToDestination(filePath, destinationPath);
2989
+ destinationPackages.push(dest);
2990
+ }
2991
+ } else {
2992
+ const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
2993
+ const destPath = Path3.join(destinationPath, nupkgFileName);
2994
+ const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
2995
+ destinationPackages.push(packResult.outputPath);
2996
+ }
1792
2997
  }
1793
2998
  } else {
1794
- const fileName = packagePath.split(/[\\/]/).pop() || packagePath;
1795
- const destPath = Path3.join(destinationPath, fileName);
1796
- const data = await this.fileSystem.readFile(packagePath);
1797
- if (!data) {
1798
- throw new Error(translate4.t("solutionpackager.packager.errors.failedToReadPackage", {
1799
- path: packagePath
1800
- }));
1801
- }
1802
- await this.fileSystem.writeFile(destPath, data);
1803
- destinationPackages.push(destPath);
2999
+ const dest = await this.copyFileToDestination(packagePath, destinationPath);
3000
+ destinationPackages.push(dest);
1804
3001
  }
1805
3002
  }
1806
3003
  return destinationPackages;
@@ -1813,10 +3010,13 @@ export {
1813
3010
  TelemetryService,
1814
3011
  TelemetryNames,
1815
3012
  RulesConfigFileType,
3013
+ PublishDestinationKind,
1816
3014
  ProjectValidateOptionsValidator,
1817
3015
  ProjectValidateOptions,
1818
3016
  ProjectToolExecutor,
1819
3017
  ProjectRestoreOptions,
3018
+ ProjectPublisher,
3019
+ ProjectPublishOptions,
1820
3020
  ProjectPackager,
1821
3021
  ProjectPackOptions,
1822
3022
  ProjectLoader,