@uipath/packager-tool-workflowcompiler 1.207.0-preview.376 → 1.207.0-preview.377

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.
@@ -17,6 +17,7 @@ export declare const en: {
17
17
  readonly startFailed: "Failed to start workflow compiler: {message}";
18
18
  readonly operationCancelled: "Operation cancelled";
19
19
  readonly dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.";
20
+ readonly packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'.";
20
21
  };
21
22
  readonly pathResolver: {
22
23
  readonly info: {
package/dist/index.js CHANGED
@@ -15,7 +15,8 @@ var de_default = {
15
15
  processError: "[WorkflowCompiler] Process error: {message}",
16
16
  startFailed: "Failed to start workflow compiler: {message}",
17
17
  operationCancelled: "Operation cancelled",
18
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
18
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
19
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
19
20
  },
20
21
  pathResolver: {
21
22
  info: {
@@ -58,7 +59,8 @@ var en = {
58
59
  processError: "[WorkflowCompiler] Process error: {message}",
59
60
  startFailed: "Failed to start workflow compiler: {message}",
60
61
  operationCancelled: "Operation cancelled",
61
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
62
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
63
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
62
64
  },
63
65
  pathResolver: {
64
66
  info: {
@@ -100,7 +102,8 @@ var es_default = {
100
102
  processError: "[WorkflowCompiler] Process error: {message}",
101
103
  startFailed: "Failed to start workflow compiler: {message}",
102
104
  operationCancelled: "Operation cancelled",
103
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
105
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
106
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
104
107
  },
105
108
  pathResolver: {
106
109
  info: {
@@ -142,7 +145,8 @@ var es_MX_default = {
142
145
  processError: "[WorkflowCompiler] Process error: {message}",
143
146
  startFailed: "Failed to start workflow compiler: {message}",
144
147
  operationCancelled: "Operation cancelled",
145
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
148
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
149
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
146
150
  },
147
151
  pathResolver: {
148
152
  info: {
@@ -184,7 +188,8 @@ var fr_default = {
184
188
  processError: "[WorkflowCompiler] Process error: {message}",
185
189
  startFailed: "Failed to start workflow compiler: {message}",
186
190
  operationCancelled: "Operation cancelled",
187
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
191
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
192
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
188
193
  },
189
194
  pathResolver: {
190
195
  info: {
@@ -226,7 +231,8 @@ var ja_default = {
226
231
  processError: "[WorkflowCompiler] Process error: {message}",
227
232
  startFailed: "Failed to start workflow compiler: {message}",
228
233
  operationCancelled: "Operation cancelled",
229
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
234
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
235
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
230
236
  },
231
237
  pathResolver: {
232
238
  info: {
@@ -268,7 +274,8 @@ var ko_default = {
268
274
  processError: "[WorkflowCompiler] Process error: {message}",
269
275
  startFailed: "Failed to start workflow compiler: {message}",
270
276
  operationCancelled: "Operation cancelled",
271
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
277
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
278
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
272
279
  },
273
280
  pathResolver: {
274
281
  info: {
@@ -310,7 +317,8 @@ var pt_default = {
310
317
  processError: "[WorkflowCompiler] Process error: {message}",
311
318
  startFailed: "Failed to start workflow compiler: {message}",
312
319
  operationCancelled: "Operation cancelled",
313
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
320
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
321
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
314
322
  },
315
323
  pathResolver: {
316
324
  info: {
@@ -352,7 +360,8 @@ var pt_BR_default = {
352
360
  processError: "[WorkflowCompiler] Process error: {message}",
353
361
  startFailed: "Failed to start workflow compiler: {message}",
354
362
  operationCancelled: "Operation cancelled",
355
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
363
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
364
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
356
365
  },
357
366
  pathResolver: {
358
367
  info: {
@@ -394,7 +403,8 @@ var ro_default = {
394
403
  processError: "[WorkflowCompiler] Process error: {message}",
395
404
  startFailed: "Failed to start workflow compiler: {message}",
396
405
  operationCancelled: "Operation cancelled",
397
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
406
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
407
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
398
408
  },
399
409
  pathResolver: {
400
410
  info: {
@@ -436,7 +446,8 @@ var ru_default = {
436
446
  processError: "[WorkflowCompiler] Process error: {message}",
437
447
  startFailed: "Failed to start workflow compiler: {message}",
438
448
  operationCancelled: "Operation cancelled",
439
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
449
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
450
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
440
451
  },
441
452
  pathResolver: {
442
453
  info: {
@@ -478,7 +489,8 @@ var tr_default = {
478
489
  processError: "[WorkflowCompiler] Process error: {message}",
479
490
  startFailed: "Failed to start workflow compiler: {message}",
480
491
  operationCancelled: "Operation cancelled",
481
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
492
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
493
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
482
494
  },
483
495
  pathResolver: {
484
496
  info: {
@@ -520,7 +532,8 @@ var zh_CN_default = {
520
532
  processError: "[WorkflowCompiler] Process error: {message}",
521
533
  startFailed: "Failed to start workflow compiler: {message}",
522
534
  operationCancelled: "Operation cancelled",
523
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
535
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
536
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
524
537
  },
525
538
  pathResolver: {
526
539
  info: {
@@ -562,7 +575,8 @@ var zh_TW_default = {
562
575
  processError: "[WorkflowCompiler] Process error: {message}",
563
576
  startFailed: "Failed to start workflow compiler: {message}",
564
577
  operationCancelled: "Operation cancelled",
565
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
578
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
579
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
566
580
  },
567
581
  pathResolver: {
568
582
  info: {
@@ -604,7 +618,8 @@ var zu_default = {
604
618
  processError: "[WorkflowCompiler] Process error: {message}",
605
619
  startFailed: "Failed to start workflow compiler: {message}",
606
620
  operationCancelled: "Operation cancelled",
607
- dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command."
621
+ dotnetNotAvailable: "The .NET SDK 8.0 is required by the workflow compiler, but the 'dotnet' CLI was not found on PATH. Install SDK 8.0 from https://dotnet.microsoft.com/download/dotnet/8.0, then re-run this command.",
622
+ packageNotFoundWithoutFeedFolder: "NuGet found no source for {packages}. Without --feed-folder, the only Orchestrator feeds searched are the tenant library feeds. If the library is in a folder feed, or in the tenant Processes feed (where 'uip or packages upload' puts it), rerun with --feed-folder <folder the process runs from>, or publish it with 'uip or libraries upload'."
608
623
  },
609
624
  pathResolver: {
610
625
  info: {
@@ -653,7 +668,7 @@ I18nManager.registerTranslations("zu", zu_default);
653
668
  import { execSync } from "node:child_process";
654
669
  import {
655
670
  ProjectTypes,
656
- translate as translate5
671
+ translate as translate6
657
672
  } from "@uipath/solutionpackager-tool-core";
658
673
 
659
674
  // src/project-identity.ts
@@ -734,14 +749,17 @@ var en2 = {
734
749
  errors: {
735
750
  orchestratorUrlRequired: "Orchestrator URL is required.",
736
751
  requestFailed: "{operation} failed: {status} {statusText}{body}",
737
- feedFolderNeedsConnection: "Cannot resolve the library feed of folder '{folder}' without a signed-in Orchestrator session. Run 'uip login', or omit the folder to use every accessible tenant feed.",
752
+ feedFolderNeedsConnection: "Cannot resolve the library feed of folder '{folder}' without a signed-in Orchestrator session. Run 'uip login', or omit the folder to use only the tenant library feeds.",
738
753
  feedFolderNotFound: "Orchestrator folder '{folder}' was not found. Available folders: {available}",
739
754
  feedFolderAmbiguous: "Orchestrator folder name '{folder}' is ambiguous — {count} folders share it ({paths}). Pass the fully qualified path instead.",
740
- feedFolderNotWritten: "Could not write the feed configuration for folder '{folder}'. Retry, or omit the folder to use every accessible tenant feed.",
741
- feedFolderHasNoFeed: "Orchestrator folder '{folder}' has no library feed. Publish a library to that folder, or omit the folder to use every accessible tenant feed."
755
+ feedFolderNotWritten: "Could not write the feed configuration for folder '{folder}'. Retry, or omit the folder to use only the tenant library feeds.",
756
+ feedFolderTenantFeedsFailed: "Orchestrator folder '{folder}' uses the tenant package feed, and the tenant feeds could not be retrieved: {reason}. Retry, or omit the folder to use only the tenant library feeds.",
757
+ feedFolderTenantFeedMissing: "Orchestrator folder '{folder}' uses the tenant package feed, but Orchestrator listed no tenant Processes feed for this session. Orchestrator hides the tenant feeds from an account that is not entitled to publish to them; sign in with one that is, or omit the folder to use only the tenant library feeds."
742
758
  },
743
759
  warnings: {
744
- tenantFeedsUnavailable: "Could not retrieve Orchestrator tenant feeds. Packaging will continue, but it may fail if a project references a library published to a tenant feed."
760
+ tenantFeedsUnavailable: "Could not retrieve Orchestrator tenant feeds. Packaging will continue, but it may fail if a project references a library published to a tenant feed.",
761
+ basicFeedsSkipped: "Skipping Orchestrator feeds that need a user name and password: {feeds}. Orchestrator does not hand those credentials to uip, so a library only published there will not resolve. Add the feed with its credentials to a NuGet.config and pass that file to the command (--nuget-sources-config-path on uip solution pack, restore and cleanup).",
762
+ tenantFeedsWithheld: "Orchestrator listed no tenant feeds for this session: it hides them from an account that is not entitled to publish to the tenant feed. Packaging will continue without them, so a library published to a tenant feed will not resolve. Sign in with an account that has that entitlement to use them."
745
763
  }
746
764
  }
747
765
  }
@@ -1290,12 +1308,12 @@ class OrchestratorFeedsService {
1290
1308
  constructor(logger) {
1291
1309
  this.logger = logger;
1292
1310
  }
1293
- async getAccessibleFeedsAsync(connection) {
1311
+ async getFeedsAsync(connection) {
1294
1312
  const { orchestratorUrl, accessToken, tenantId } = connection;
1295
1313
  if (!orchestratorUrl) {
1296
1314
  throw new Error(translate.t("packagerOrchestratorClient.feeds.errors.orchestratorUrlRequired"));
1297
1315
  }
1298
- this.logger.info(`Fetching accessible feeds from ${orchestratorUrl}`);
1316
+ this.logger.info(`Fetching feeds from ${orchestratorUrl}`);
1299
1317
  const headers = {};
1300
1318
  if (accessToken) {
1301
1319
  headers.Authorization = `Bearer ${accessToken}`;
@@ -1310,7 +1328,7 @@ class OrchestratorFeedsService {
1310
1328
  });
1311
1329
  if (!response.ok) {
1312
1330
  throw new Error(translate.t("packagerOrchestratorClient.feeds.errors.requestFailed", {
1313
- operation: "GetAccessibleFeeds",
1331
+ operation: "GetFeeds",
1314
1332
  ...await describeFailure(response)
1315
1333
  }));
1316
1334
  }
@@ -1410,13 +1428,14 @@ async function describeFailure(response) {
1410
1428
 
1411
1429
  // ../packager-orchestrator-client/src/tenant-feeds-cache.ts
1412
1430
  var feedsByTenant = new Map;
1431
+ var warningsByTenant = new Map;
1413
1432
  function tenantKey(connection) {
1414
1433
  return JSON.stringify([
1415
1434
  connection.orchestratorUrl,
1416
1435
  connection.tenantId ?? ""
1417
1436
  ]);
1418
1437
  }
1419
- function getAccessibleFeedsOnce(connection, fetchFeeds) {
1438
+ function getFeedsOnce(connection, fetchFeeds) {
1420
1439
  const key = tenantKey(connection);
1421
1440
  const inFlight = feedsByTenant.get(key);
1422
1441
  if (inFlight) {
@@ -1431,10 +1450,23 @@ function getAccessibleFeedsOnce(connection, fetchFeeds) {
1431
1450
  });
1432
1451
  return request;
1433
1452
  }
1453
+ function isFirstTenantWarning(connection, warning) {
1454
+ const key = tenantKey(connection);
1455
+ const warned = warningsByTenant.get(key) ?? new Set;
1456
+ warningsByTenant.set(key, warned);
1457
+ if (warned.has(warning)) {
1458
+ return false;
1459
+ }
1460
+ warned.add(warning);
1461
+ return true;
1462
+ }
1434
1463
 
1435
1464
  // ../packager-orchestrator-client/src/feed-composer.ts
1436
1465
  var FEEDS_FILE_NAME = "nuget-feeds.json";
1437
1466
  var LIBRARIES_PURPOSE = "Libraries";
1467
+ var PROCESSES_PURPOSE = "Processes";
1468
+ var BASIC_ACCESS = "Basic";
1469
+ var NUGET_PROTOCOL = "nuget";
1438
1470
  var NO_FEEDS = { dispose: async () => {} };
1439
1471
 
1440
1472
  class OrchestratorFeedComposer {
@@ -1450,7 +1482,12 @@ class OrchestratorFeedComposer {
1450
1482
  connection,
1451
1483
  feedFolder
1452
1484
  }) {
1453
- const feeds = feedFolder ? await this.resolveFolderFeed(connection, feedFolder) : await this.resolveTenantFeeds(connection);
1485
+ const folderFeed = feedFolder ? await this.resolveFolderFeed(connection, feedFolder) : undefined;
1486
+ const tenantFeeds = await this.resolveTenantFeeds(connection, folderFeed === TENANT_FEED ? feedFolder : undefined);
1487
+ const feeds = folderFeed && folderFeed !== TENANT_FEED ? [
1488
+ folderFeed,
1489
+ ...tenantFeeds.filter((feed) => feed.Url !== folderFeed.Url)
1490
+ ] : tenantFeeds;
1454
1491
  if (feeds.length === 0) {
1455
1492
  return NO_FEEDS;
1456
1493
  }
@@ -1464,33 +1501,51 @@ class OrchestratorFeedComposer {
1464
1501
  }
1465
1502
  return composed;
1466
1503
  }
1467
- async resolveTenantFeeds(connection) {
1468
- if (!connection?.accessToken || !connection.cloudUrl) {
1504
+ async resolveTenantFeeds(connection, tenantFeedFolder) {
1505
+ const orchestratorConnection = toOrchestratorConnection(connection);
1506
+ if (!orchestratorConnection) {
1469
1507
  return [];
1470
1508
  }
1471
- const { accessToken, cloudUrl, tenantId } = connection;
1472
- const orchestratorConnection = {
1473
- orchestratorUrl: cloudUrl,
1474
- accessToken,
1475
- tenantId
1476
- };
1477
- const [error, feeds] = await catchError(getAccessibleFeedsOnce(orchestratorConnection, () => this.feedsService.getAccessibleFeedsAsync(orchestratorConnection)));
1509
+ const { accessToken, orchestratorUrl } = orchestratorConnection;
1510
+ const [error, feeds] = await catchError(getFeedsOnce(orchestratorConnection, () => this.feedsService.getFeedsAsync(orchestratorConnection)));
1478
1511
  if (error || !feeds) {
1479
- this.warnFeedsUnavailable();
1512
+ if (tenantFeedFolder) {
1513
+ throw new Error(translate2.t("packagerOrchestratorClient.feeds.errors.feedFolderTenantFeedsFailed", {
1514
+ folder: tenantFeedFolder,
1515
+ reason: error?.message ?? ""
1516
+ }));
1517
+ }
1518
+ this.warnOncePerTenant(orchestratorConnection, translate2.t("packagerOrchestratorClient.feeds.warnings.tenantFeedsUnavailable"));
1480
1519
  return [];
1481
1520
  }
1482
- return feeds.map((feed) => toTenantFeedSource(feed, accessToken)).filter((feed) => feed !== undefined);
1521
+ const toSources = (purposeFeeds) => {
1522
+ this.warnBasicFeedsSkipped(orchestratorConnection, purposeFeeds);
1523
+ return purposeFeeds.map((feed) => toFeedSource(feed, accessToken, orchestratorUrl)).filter((feed) => feed !== undefined);
1524
+ };
1525
+ const libraries = toSources(feeds.filter(isLibraryFeed));
1526
+ const tenantFeedsWithheld = !feeds.some(isTenantFeed);
1527
+ if (!tenantFeedFolder) {
1528
+ if (tenantFeedsWithheld) {
1529
+ this.warnOncePerTenant(orchestratorConnection, translate2.t("packagerOrchestratorClient.feeds.warnings.tenantFeedsWithheld"));
1530
+ }
1531
+ return libraries;
1532
+ }
1533
+ const processes = toSources(feeds.filter(isTenantProcessesFeed));
1534
+ if (processes.length === 0) {
1535
+ throw new Error(translate2.t("packagerOrchestratorClient.feeds.errors.feedFolderTenantFeedMissing", { folder: tenantFeedFolder }));
1536
+ }
1537
+ this.logger.info(`Orchestrator folder '${tenantFeedFolder}' uses the tenant package feed. Resolving library dependencies from the tenant Processes feed and the tenant library feeds.`);
1538
+ return [
1539
+ ...processes,
1540
+ ...libraries.filter((library) => !processes.some((p) => p.Url === library.Url))
1541
+ ];
1483
1542
  }
1484
1543
  async resolveFolderFeed(connection, feedFolder) {
1485
- if (!connection?.accessToken || !connection.cloudUrl) {
1544
+ const orchestratorConnection = toOrchestratorConnection(connection);
1545
+ if (!orchestratorConnection) {
1486
1546
  throw new Error(translate2.t("packagerOrchestratorClient.feeds.errors.feedFolderNeedsConnection", { folder: feedFolder }));
1487
1547
  }
1488
- const { accessToken, cloudUrl, tenantId } = connection;
1489
- const orchestratorConnection = {
1490
- orchestratorUrl: cloudUrl,
1491
- accessToken,
1492
- tenantId
1493
- };
1548
+ const { accessToken, orchestratorUrl } = orchestratorConnection;
1494
1549
  const folders = await this.feedsService.getFoldersAsync(orchestratorConnection);
1495
1550
  const wanted = feedFolder.trim().toLowerCase();
1496
1551
  const byPath = folders.filter((f) => f.fullyQualifiedName?.toLowerCase() === wanted);
@@ -1511,15 +1566,13 @@ class OrchestratorFeedComposer {
1511
1566
  }
1512
1567
  const feedId = await this.feedsService.getFolderFeedIdAsync(orchestratorConnection, folder.key);
1513
1568
  if (!feedId) {
1514
- throw new Error(translate2.t("packagerOrchestratorClient.feeds.errors.feedFolderHasNoFeed", { folder: feedFolder }));
1569
+ return TENANT_FEED;
1515
1570
  }
1516
- this.logger.info(`Resolving library dependencies from the feed of folder '${feedFolder}' instead of all tenant feeds.`);
1517
- return [
1518
- {
1519
- Url: folderFeedUrl(cloudUrl, feedId),
1520
- AccessToken: accessToken
1521
- }
1522
- ];
1571
+ this.logger.info(`Resolving library dependencies from the feed of folder '${feedFolder}' and the tenant library feeds.`);
1572
+ return {
1573
+ Url: folderFeedUrl(orchestratorUrl, feedId),
1574
+ AccessToken: accessToken
1575
+ };
1523
1576
  }
1524
1577
  async writeFeedsFile(feeds) {
1525
1578
  const storage = new TemporaryStorageService(this.fileSystem);
@@ -1528,22 +1581,79 @@ class OrchestratorFeedComposer {
1528
1581
  await this.fileSystem.writeFile(configPath, JSON.stringify(feeds));
1529
1582
  return { configPath, dispose: () => storage.cleanup() };
1530
1583
  }
1584
+ warnBasicFeedsSkipped(connection, feeds) {
1585
+ const names = basicFeedNames(feeds);
1586
+ if (names.length > 0) {
1587
+ this.warnOncePerTenant(connection, translate2.t("packagerOrchestratorClient.feeds.warnings.basicFeedsSkipped", { feeds: names.join(", ") }));
1588
+ }
1589
+ }
1590
+ warnOncePerTenant(connection, warning) {
1591
+ if (isFirstTenantWarning(connection, warning)) {
1592
+ this.logger.warn(warning);
1593
+ }
1594
+ }
1531
1595
  warnFeedsUnavailable() {
1532
1596
  this.logger.warn(translate2.t("packagerOrchestratorClient.feeds.warnings.tenantFeedsUnavailable"));
1533
1597
  }
1534
1598
  }
1535
- function toTenantFeedSource(feed, accessToken) {
1536
- if (feed.purpose !== LIBRARIES_PURPOSE || !feed.feedUrl) {
1599
+ var TENANT_FEED = Symbol("tenant-feed");
1600
+ function toOrchestratorConnection(connection) {
1601
+ if (!connection?.accessToken || !connection.cloudUrl) {
1602
+ return;
1603
+ }
1604
+ return {
1605
+ orchestratorUrl: connection.cloudUrl,
1606
+ accessToken: connection.accessToken,
1607
+ tenantId: connection.tenantId
1608
+ };
1609
+ }
1610
+ function toFeedSource(feed, accessToken, orchestratorUrl) {
1611
+ if (!feed.feedUrl || !isNuGetFeed(feed)) {
1612
+ return;
1613
+ }
1614
+ const access = feedAccess(feed);
1615
+ if (access === BASIC_ACCESS) {
1537
1616
  return;
1538
1617
  }
1539
- return { Url: feed.feedUrl, AccessToken: accessToken };
1618
+ return access === "Secure" && isSameOrigin(feed.feedUrl, orchestratorUrl) ? { Url: feed.feedUrl, AccessToken: accessToken } : { Url: feed.feedUrl };
1619
+ }
1620
+ function isLibraryFeed(feed) {
1621
+ return feed.purpose === LIBRARIES_PURPOSE;
1622
+ }
1623
+ function isTenantProcessesFeed(feed) {
1624
+ return feed.purpose === PROCESSES_PURPOSE && isTenantFeed(feed);
1625
+ }
1626
+ function isTenantFeed(feed) {
1627
+ return feed.folderId === null || feed.folderId === undefined;
1628
+ }
1629
+ function feedAccess(feed) {
1630
+ if (feed.isExternal) {
1631
+ return feed.authenticationType;
1632
+ }
1633
+ return feed.isPublic ? "ApiKey" : "Secure";
1634
+ }
1635
+ function basicFeedNames(feeds) {
1636
+ return feeds.filter((feed) => feed.feedUrl && isNuGetFeed(feed) && feedAccess(feed) === BASIC_ACCESS).map((feed) => feed.name ?? feedHost(feed.feedUrl));
1637
+ }
1638
+ function feedHost(feedUrl) {
1639
+ return URL.canParse(feedUrl) ? new URL(feedUrl).host : "(unnamed feed)";
1640
+ }
1641
+ function isNuGetFeed(feed) {
1642
+ return !feed.protocol || feed.protocol.toLowerCase() === NUGET_PROTOCOL;
1643
+ }
1644
+ function isSameOrigin(feedUrl, orchestratorUrl) {
1645
+ if (!URL.canParse(feedUrl) || !URL.canParse(orchestratorUrl)) {
1646
+ return false;
1647
+ }
1648
+ return new URL(feedUrl).origin === new URL(orchestratorUrl).origin;
1540
1649
  }
1541
1650
  // src/workflow-compiler-tool.ts
1542
1651
  import {
1543
1652
  LogLevel,
1544
1653
  normalizeIgnoredRules,
1545
1654
  ProjectTool,
1546
- toProjectCleanupInfo
1655
+ toProjectCleanupInfo,
1656
+ translate as translate5
1547
1657
  } from "@uipath/solutionpackager-tool-core";
1548
1658
 
1549
1659
  // src/workflow-compiler-executor.ts
@@ -1727,7 +1837,10 @@ class WorkflowCompilerExecutor {
1727
1837
  return new Promise((resolve) => {
1728
1838
  let result = null;
1729
1839
  const fallbackErrors = [];
1730
- const findings = [];
1840
+ const collected = {
1841
+ findings: [],
1842
+ missingPackages: new Set
1843
+ };
1731
1844
  const childProcess = this.spawnProcess(executable, commandArgs, workflowCompilerConfig.dotnetEnv);
1732
1845
  let stdoutEnded = false;
1733
1846
  let stderrEnded = false;
@@ -1743,7 +1856,7 @@ class WorkflowCompilerExecutor {
1743
1856
  errorCode: result.errorCode
1744
1857
  }));
1745
1858
  const toolResult = new ToolResult(result.errorCode, result.message, result.outputPackages);
1746
- toolResult.details = withFindings(getAdditionalResultDetails(result), findings);
1859
+ toolResult.details = withMissingPackages(withFindings(getAdditionalResultDetails(result), collected.findings), collected.missingPackages);
1747
1860
  resolve(toolResult);
1748
1861
  } else {
1749
1862
  const exitCode = childProcess.exitCode ?? -1;
@@ -1773,8 +1886,8 @@ class WorkflowCompilerExecutor {
1773
1886
  checkComplete();
1774
1887
  }
1775
1888
  };
1776
- this.setupStdoutHandling(childProcess, streamCompletion, (r) => result = r, findings);
1777
- this.setupStderrHandling(childProcess, streamCompletion, fallbackErrors, findings);
1889
+ this.setupStdoutHandling(childProcess, streamCompletion, (r) => result = r, collected);
1890
+ this.setupStderrHandling(childProcess, streamCompletion, fallbackErrors, collected);
1778
1891
  this.setupProcessEventHandlers(childProcess, streamCompletion, resolve);
1779
1892
  this.setupCancellationHandler(childProcess, cancellationToken, resolve);
1780
1893
  });
@@ -1796,7 +1909,7 @@ class WorkflowCompilerExecutor {
1796
1909
  command: fullCommand.join(" ")
1797
1910
  }));
1798
1911
  }
1799
- setupStdoutHandling(childProcess, streamCompletion, onResult, findings) {
1912
+ setupStdoutHandling(childProcess, streamCompletion, onResult, collected) {
1800
1913
  if (!childProcess.stdout) {
1801
1914
  streamCompletion.markStdoutEnded();
1802
1915
  return;
@@ -1810,17 +1923,17 @@ class WorkflowCompilerExecutor {
1810
1923
  for (const line of lines) {
1811
1924
  if (!line.trim())
1812
1925
  continue;
1813
- this.processOutputLine(line, onResult, findings);
1926
+ this.processOutputLine(line, onResult, collected);
1814
1927
  }
1815
1928
  });
1816
1929
  childProcess.stdout.on("end", () => {
1817
1930
  if (buffer.trim()) {
1818
- this.processOutputLine(buffer, onResult, findings);
1931
+ this.processOutputLine(buffer, onResult, collected);
1819
1932
  }
1820
1933
  streamCompletion.markStdoutEnded();
1821
1934
  });
1822
1935
  }
1823
- processOutputLine(line, onResult, findings) {
1936
+ processOutputLine(line, onResult, collected) {
1824
1937
  const entry = this.parseOutputEntry(line);
1825
1938
  if (!entry)
1826
1939
  return;
@@ -1828,10 +1941,7 @@ class WorkflowCompilerExecutor {
1828
1941
  onResult(entry);
1829
1942
  } else if (entry.type === "Log") {
1830
1943
  const log = entry;
1831
- const finding = toFinding(log);
1832
- if (finding) {
1833
- findings.push(finding);
1834
- }
1944
+ collectFromLog(log, collected);
1835
1945
  this.logMessage(log);
1836
1946
  } else if (entry.type === "Progress") {
1837
1947
  this.logProgress(entry);
@@ -1855,7 +1965,7 @@ class WorkflowCompilerExecutor {
1855
1965
  const separator = percent && progress.message ? " - " : "";
1856
1966
  this.logger.progress(`${percent}${separator}${progress.message ?? ""}`);
1857
1967
  }
1858
- setupStderrHandling(childProcess, streamCompletion, fallbackErrors, findings) {
1968
+ setupStderrHandling(childProcess, streamCompletion, fallbackErrors, collected) {
1859
1969
  if (!childProcess.stderr) {
1860
1970
  streamCompletion.markStderrEnded();
1861
1971
  return;
@@ -1869,24 +1979,21 @@ class WorkflowCompilerExecutor {
1869
1979
  for (const line of lines) {
1870
1980
  if (!line.trim())
1871
1981
  continue;
1872
- this.processErrorLine(line, fallbackErrors, findings);
1982
+ this.processErrorLine(line, fallbackErrors, collected);
1873
1983
  }
1874
1984
  });
1875
1985
  childProcess.stderr.on("end", () => {
1876
1986
  if (buffer.trim()) {
1877
- this.processErrorLine(buffer, fallbackErrors, findings);
1987
+ this.processErrorLine(buffer, fallbackErrors, collected);
1878
1988
  }
1879
1989
  streamCompletion.markStderrEnded();
1880
1990
  });
1881
1991
  }
1882
- processErrorLine(line, fallbackErrors, findings) {
1992
+ processErrorLine(line, fallbackErrors, collected) {
1883
1993
  const entry = this.parseOutputEntry(line);
1884
1994
  if (entry && entry.type === "Log") {
1885
1995
  const log = entry;
1886
- const finding = toFinding(log);
1887
- if (finding) {
1888
- findings.push(finding);
1889
- }
1996
+ collectFromLog(log, collected);
1890
1997
  this.logger.error(log.message);
1891
1998
  } else {
1892
1999
  fallbackErrors.push(line);
@@ -1964,6 +2071,34 @@ function withFindings(details, findings) {
1964
2071
  }
1965
2072
  return { ...details, findings };
1966
2073
  }
2074
+ function collectFromLog(log, collected) {
2075
+ const finding = toFinding(log);
2076
+ if (finding) {
2077
+ collected.findings.push(finding);
2078
+ }
2079
+ const missingPackage = toMissingPackage(log);
2080
+ if (missingPackage) {
2081
+ collected.missingPackages.add(missingPackage);
2082
+ }
2083
+ }
2084
+ var NUGET_PACKAGE_NOT_FOUND_CODES = new Set(["NU1101", "NU1102", "NU1103"]);
2085
+ var PACKAGE_ID_IN_MESSAGE = /\bUnable to find (?:a stable )?package (\S+?)(?:\.(?=\s|$)|\s|$)/;
2086
+ function toMissingPackage(log) {
2087
+ if (log.logLevel !== "Error" || !log.code || !NUGET_PACKAGE_NOT_FOUND_CODES.has(log.code)) {
2088
+ return;
2089
+ }
2090
+ return libraryIdOf(log.data) ?? PACKAGE_ID_IN_MESSAGE.exec(log.message)?.[1];
2091
+ }
2092
+ function libraryIdOf(data) {
2093
+ const libraryId = parseLogData(data)?.LibraryId;
2094
+ return typeof libraryId === "string" && libraryId ? libraryId : undefined;
2095
+ }
2096
+ function withMissingPackages(details, missingPackages) {
2097
+ if (missingPackages.size === 0) {
2098
+ return details;
2099
+ }
2100
+ return { ...details, missingPackages: [...missingPackages] };
2101
+ }
1967
2102
  function toFinding(log) {
1968
2103
  if (!log.source || !FINDING_LOG_SOURCES.has(log.source)) {
1969
2104
  return;
@@ -1971,7 +2106,7 @@ function toFinding(log) {
1971
2106
  if (!log.filePath && !log.code) {
1972
2107
  return;
1973
2108
  }
1974
- const message = parseAnalyzerMessage(log.data) ?? {};
2109
+ const message = parseLogData(log.data) ?? {};
1975
2110
  const activityId = message.ActivityId;
1976
2111
  const item = message.Item;
1977
2112
  return {
@@ -1997,7 +2132,7 @@ function toErrorSeverity(logLevel) {
1997
2132
  return logLevel;
1998
2133
  }
1999
2134
  }
2000
- function parseAnalyzerMessage(data) {
2135
+ function parseLogData(data) {
2001
2136
  if (!data) {
2002
2137
  return;
2003
2138
  }
@@ -2032,6 +2167,14 @@ function pushActivitiesRootCategory(args, activitiesRootCategory) {
2032
2167
  args.push(`--activities-root-category`, activitiesRootCategory);
2033
2168
  }
2034
2169
  }
2170
+ function withFeedFolderInstructions(result) {
2171
+ const missing = result.details?.missingPackages;
2172
+ if (result.isSuccess || result.instructions || !Array.isArray(missing) || missing.length === 0) {
2173
+ return result;
2174
+ }
2175
+ result.instructions = translate5.t("toolWorkflowcompiler.errors.packageNotFoundWithoutFeedFolder", { packages: missing.join(", ") });
2176
+ return result;
2177
+ }
2035
2178
 
2036
2179
  class WorkflowCompilerTool extends ProjectTool {
2037
2180
  context;
@@ -2050,11 +2193,12 @@ class WorkflowCompilerTool extends ProjectTool {
2050
2193
  }
2051
2194
  const composed = await new OrchestratorFeedComposer(this.fileSystem, this.logger).composeAsync({ connection, feedFolder: options.feedFolder });
2052
2195
  try {
2053
- return await run({
2196
+ const result = await run({
2054
2197
  projectPath,
2055
2198
  orchestratorFeedsJsonPath: composed.configPath,
2056
2199
  userNugetConfigPath
2057
2200
  });
2201
+ return options.feedFolder ? result : withFeedFolderInstructions(result);
2058
2202
  } finally {
2059
2203
  await composed.dispose();
2060
2204
  }
@@ -2351,7 +2495,7 @@ class WorkflowCompilerToolFactory {
2351
2495
  ];
2352
2496
  async createAsync(logger, fileSystem, context) {
2353
2497
  if (!this.isPinnedByCaller() && !this.isDotnetAvailable()) {
2354
- throw new Error(translate5.t("toolWorkflowcompiler.errors.dotnetNotAvailable"));
2498
+ throw new Error(translate6.t("toolWorkflowcompiler.errors.dotnetNotAvailable"));
2355
2499
  }
2356
2500
  return new WorkflowCompilerTool(fileSystem, logger, context);
2357
2501
  }
@@ -2379,4 +2523,4 @@ export {
2379
2523
  setupWorkflowCompiler
2380
2524
  };
2381
2525
 
2382
- //# debugId=3D204D661D5034B864756E2164756E21
2526
+ //# debugId=B5A543EBB64FD31F64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-workflowcompiler",
3
- "version": "1.207.0-preview.376",
3
+ "version": "1.207.0-preview.377",
4
4
  "description": "UiPath Workflow Compiler tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -24,5 +24,5 @@
24
24
  "@uipath/solutionpackager-tool-core": "1.207.0"
25
25
  },
26
26
  "dependencies": {},
27
- "gitHead": "3ac720b43f61d2dd8bf90201c14846c02a7cb741"
27
+ "gitHead": "d5b8bb85bdf698654701efbd4df391e31404301e"
28
28
  }