@uipath/solution-tool 1.197.0 → 1.198.0-preview.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pack.js CHANGED
@@ -1240,6 +1240,21 @@ class ToolResult {
1240
1240
  return new ToolResult(errorCode, message);
1241
1241
  }
1242
1242
  }
1243
+ function toProjectCleanupInfo(raw) {
1244
+ return createProjectCleanupInfo(raw.unusedDependencies ?? [], raw.cleanedWorkflows ?? []);
1245
+ }
1246
+ function createProjectCleanupInfo(unusedItems, cleanedWorkflows) {
1247
+ const info = {
1248
+ unusedItems,
1249
+ cleanedFiles: cleanedWorkflows.map((w) => w.workflow)
1250
+ };
1251
+ if (cleanedWorkflows.length > 0) {
1252
+ info.toolDetails = {
1253
+ cleanedWorkflows
1254
+ };
1255
+ }
1256
+ return info;
1257
+ }
1243
1258
  function isNonEmptyString(value) {
1244
1259
  return typeof value === "string" && value.length > 0;
1245
1260
  }
@@ -1512,6 +1527,10 @@ class ProjectTool {
1512
1527
  this.logger.info("Pack operation is a noop");
1513
1528
  return ToolResult.success();
1514
1529
  }
1530
+ async cleanupAsync(_options, _cancellationToken) {
1531
+ this.logger.info("Cleanup operation is a noop");
1532
+ return ToolResult.success();
1533
+ }
1515
1534
  async getUiProjectAsync(projectPath) {
1516
1535
  const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
1517
1536
  if (!await this.fileSystem.exists(filePath)) {
@@ -201018,7 +201037,7 @@ init_dist();
201018
201037
  // ../packager/packager-tool-flow/package.json
201019
201038
  var package_default = {
201020
201039
  name: "@uipath/packager-tool-flow",
201021
- version: "1.197.0",
201040
+ version: "1.198.0-preview.81",
201022
201041
  description: "UiPath Flow tool implementation",
201023
201042
  type: "module",
201024
201043
  exports: {
@@ -201231,10 +201250,14 @@ var PROCESS_NODE_PREFIXES = [
201231
201250
  "uipath.core.agent.",
201232
201251
  "uipath.core.api-workflow."
201233
201252
  ];
201234
- var UNRESOLVED_BINDING_PATTERN = /^<bindings\.\w+>$/;
201253
+ var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
201254
+ var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
201235
201255
  function isProcessNode(nodeType) {
201236
201256
  return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
201237
201257
  }
201258
+ function isConnectorToolNode(nodeType) {
201259
+ return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
201260
+ }
201238
201261
  function extractProcessGuid(nodeType) {
201239
201262
  const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
201240
201263
  if (!match) {
@@ -201286,13 +201309,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
201286
201309
  }
201287
201310
  }
201288
201311
  }
201312
+ function createConnectorToolBindings(node, definition95) {
201313
+ const model = definition95.model;
201314
+ const detail = node.inputs?.detail;
201315
+ const connectionId = detail?.connectionId ?? "";
201316
+ const connectionFolderKey = detail?.connectionFolderKey ?? "";
201317
+ const values = model?.bindings?.values ?? [];
201318
+ const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
201319
+ const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
201320
+ const connectionBinding = createBinding2({
201321
+ name: connValue?.name ?? "connection",
201322
+ value: connectionId,
201323
+ resource: "Connection",
201324
+ resourceKey: connectionId,
201325
+ propertyAttribute: "ConnectionId"
201326
+ });
201327
+ const folderKeyBinding = createBinding2({
201328
+ name: folderValue?.name ?? "FolderKey",
201329
+ value: connectionFolderKey,
201330
+ resource: "Connection",
201331
+ resourceKey: connectionId,
201332
+ propertyAttribute: "FolderKey"
201333
+ });
201334
+ return { connectionBinding, folderKeyBinding };
201335
+ }
201336
+ function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
201337
+ if (!context)
201338
+ return;
201339
+ for (const entry of context) {
201340
+ if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
201341
+ if (entry.name === "connection") {
201342
+ entry.default = storedConnection.default;
201343
+ entry.value = `=bindings.${storedConnection.id}`;
201344
+ } else if (entry.name === "folderKey") {
201345
+ entry.default = storedFolderKey.default;
201346
+ entry.value = `=bindings.${storedFolderKey.id}`;
201347
+ }
201348
+ }
201349
+ }
201350
+ }
201289
201351
  function ensureProcessBindings(workflow, logger) {
201290
201352
  const nodes = workflow.nodes ?? [];
201291
201353
  const definitions = workflow.definitions ?? [];
201292
201354
  let bindingsCreated = 0;
201293
201355
  for (const node of nodes) {
201294
- if (!isProcessNode(node.type))
201295
- continue;
201296
201356
  const nodeModel = node.model;
201297
201357
  const defModel = definitions.find((d2) => d2.nodeType === node.type)?.model;
201298
201358
  const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
@@ -201301,25 +201361,49 @@ function ensureProcessBindings(workflow, logger) {
201301
201361
  const definition95 = definitions.find((d2) => d2.nodeType === node.type);
201302
201362
  if (!definition95)
201303
201363
  continue;
201304
- let nameBinding;
201305
- let folderBinding;
201306
- try {
201307
- ({ nameBinding, folderBinding } = createProcessBindings(definition95));
201308
- } catch (err2) {
201309
- logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
201364
+ if (isProcessNode(node.type)) {
201365
+ let nameBinding;
201366
+ let folderBinding;
201367
+ try {
201368
+ ({ nameBinding, folderBinding } = createProcessBindings(definition95));
201369
+ } catch (err2) {
201370
+ logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
201371
+ continue;
201372
+ }
201373
+ const beforeCount = workflow.bindings?.length ?? 0;
201374
+ addBinding(workflow, nameBinding);
201375
+ addBinding(workflow, folderBinding);
201376
+ const storedBindings = workflow.bindings;
201377
+ const storedName = storedBindings.find((b3) => b3.resourceKey === nameBinding.resourceKey && b3.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
201378
+ const storedFolder = storedBindings.find((b3) => b3.resourceKey === folderBinding.resourceKey && b3.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
201379
+ resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
201380
+ resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
201381
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
201382
+ bindingsCreated += added;
201383
+ logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
201310
201384
  continue;
201311
201385
  }
201312
- const beforeCount = workflow.bindings?.length ?? 0;
201313
- addBinding(workflow, nameBinding);
201314
- addBinding(workflow, folderBinding);
201315
- const storedBindings = workflow.bindings;
201316
- const storedName = storedBindings.find((b3) => b3.resourceKey === nameBinding.resourceKey && b3.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
201317
- const storedFolder = storedBindings.find((b3) => b3.resourceKey === folderBinding.resourceKey && b3.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
201318
- resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
201319
- resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
201320
- const added = (workflow.bindings?.length ?? 0) - beforeCount;
201321
- bindingsCreated += added;
201322
- logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
201386
+ if (isConnectorToolNode(node.type)) {
201387
+ let connectionBinding;
201388
+ let folderKeyBinding;
201389
+ try {
201390
+ ({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node, definition95));
201391
+ } catch (err2) {
201392
+ logger.warn(`Skipping connector binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
201393
+ continue;
201394
+ }
201395
+ const beforeCount = workflow.bindings?.length ?? 0;
201396
+ addBinding(workflow, connectionBinding);
201397
+ addBinding(workflow, folderKeyBinding);
201398
+ const storedBindings = workflow.bindings;
201399
+ const storedConn = storedBindings.find((b3) => b3.resourceKey === connectionBinding.resourceKey && b3.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
201400
+ const storedFk = storedBindings.find((b3) => b3.resourceKey === folderKeyBinding.resourceKey && b3.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
201401
+ resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
201402
+ resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
201403
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
201404
+ bindingsCreated += added;
201405
+ logger.info(`Resolved connector bindings for node "${node.id}" (${node.type})`);
201406
+ }
201323
201407
  }
201324
201408
  if (bindingsCreated > 0) {
201325
201409
  logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
@@ -203597,8 +203681,9 @@ class CodedAppStrategy {
203597
203681
  const exists3 = await this.fileSystem.exists(fullBundlePath);
203598
203682
  if (!exists3) {
203599
203683
  const message = ERROR_MESSAGES.BUNDLE_NOT_FOUND(fullBundlePath);
203600
- if (logger?.warn) {
203601
- logger.warn(message);
203684
+ const warnable = logger;
203685
+ if (warnable?.warn) {
203686
+ warnable.warn(message);
203602
203687
  } else {
203603
203688
  logger?.info(`Warning: ${message}`);
203604
203689
  }
@@ -204983,17 +205068,8 @@ function feedsEndpoint(orchestratorUrl) {
204983
205068
  end--;
204984
205069
  }
204985
205070
  const trimmed = orchestratorUrl.slice(0, end);
204986
- if (/\/orchestrator_$/i.test(trimmed)) {
204987
- return `${trimmed}${FEEDS_PATH}`;
204988
- }
204989
- return hasPathSegments(trimmed) ? `${trimmed}/orchestrator_${FEEDS_PATH}` : `${trimmed}${FEEDS_PATH}`;
204990
- }
204991
- function hasPathSegments(url5) {
204992
- const [error95, parsed] = catchError(() => new URL(url5));
204993
- if (error95) {
204994
- return true;
204995
- }
204996
- return parsed.pathname !== "/" && parsed.pathname !== "";
205071
+ const base = /\/orchestrator_$/i.test(trimmed) ? trimmed : `${trimmed}/orchestrator_`;
205072
+ return `${base}${FEEDS_PATH}`;
204997
205073
  }
204998
205074
  async function describeFailure(response) {
204999
205075
  const text = await response.text().catch(() => "");
@@ -205495,20 +205571,24 @@ class WorkflowCompilerTool extends ProjectTool {
205495
205571
  this.context = context;
205496
205572
  this.executor = new WorkflowCompilerExecutor(logger, fileSystem);
205497
205573
  }
205498
- async withNuGetConfig(options, run) {
205574
+ async withFeedPaths(options, run) {
205575
+ const userNugetConfigPath = options.nuGetSourcesConfigPath;
205499
205576
  const connection = this.context?.connection;
205500
- if (options.nuGetSourcesConfigPath || !connection) {
205501
- return run(options.nuGetSourcesConfigPath);
205577
+ if (!connection) {
205578
+ return run({ userNugetConfigPath });
205502
205579
  }
205503
205580
  const composed = await new OrchestratorFeedComposer(this.fileSystem, this.logger).composeAsync({ connection });
205504
205581
  try {
205505
- return await run(composed.configPath);
205582
+ return await run({
205583
+ orchestratorFeedsJsonPath: composed.configPath,
205584
+ userNugetConfigPath
205585
+ });
205506
205586
  } finally {
205507
205587
  await composed.dispose();
205508
205588
  }
205509
205589
  }
205510
205590
  async restoreAsync(options, cancellationToken) {
205511
- return this.withNuGetConfig(options, (nuGetConfigPath) => {
205591
+ return this.withFeedPaths(options, (paths) => {
205512
205592
  const args = [
205513
205593
  `-p`,
205514
205594
  options.projectPath,
@@ -205521,14 +205601,17 @@ class WorkflowCompilerTool extends ProjectTool {
205521
205601
  `--exclude-configured-sources`,
205522
205602
  `${options.excludeConfiguredSources}`
205523
205603
  ];
205524
- if (nuGetConfigPath) {
205525
- args.push(`--nuget-config-file`, nuGetConfigPath);
205604
+ if (paths.orchestratorFeedsJsonPath) {
205605
+ args.push(`--nuget-config-file`, paths.orchestratorFeedsJsonPath);
205606
+ }
205607
+ if (paths.userNugetConfigPath) {
205608
+ args.push(`--nuget-config`, paths.userNugetConfigPath);
205526
205609
  }
205527
205610
  return this.executor.executeAsync("restore", args, cancellationToken);
205528
205611
  });
205529
205612
  }
205530
205613
  async validateAsync(options, cancellationToken) {
205531
- return this.withNuGetConfig(options, (nuGetConfigPath) => {
205614
+ return this.withFeedPaths(options, (paths) => {
205532
205615
  const args = [
205533
205616
  `-p`,
205534
205617
  options.projectPath,
@@ -205555,14 +205638,17 @@ class WorkflowCompilerTool extends ProjectTool {
205555
205638
  if (options.policyFileType) {
205556
205639
  args.push(`--policy-file-type`, `${options.policyFileType}`);
205557
205640
  }
205558
- if (nuGetConfigPath) {
205559
- args.push(`--nuget-config-file`, nuGetConfigPath);
205641
+ if (paths.orchestratorFeedsJsonPath) {
205642
+ args.push(`--nuget-config-file`, paths.orchestratorFeedsJsonPath);
205643
+ }
205644
+ if (paths.userNugetConfigPath) {
205645
+ args.push(`--nuget-config`, paths.userNugetConfigPath);
205560
205646
  }
205561
205647
  return this.executor.executeAsync("validate", args, cancellationToken);
205562
205648
  });
205563
205649
  }
205564
205650
  async buildAsync(options, cancellationToken) {
205565
- return this.withNuGetConfig(options, (nuGetConfigPath) => {
205651
+ return this.withFeedPaths(options, (paths) => {
205566
205652
  const args = [
205567
205653
  `-p`,
205568
205654
  options.projectPath,
@@ -205592,14 +205678,17 @@ class WorkflowCompilerTool extends ProjectTool {
205592
205678
  const outputType = this.mapOutputType(options.outputType);
205593
205679
  args.push(`--output-type`, outputType);
205594
205680
  }
205595
- if (nuGetConfigPath) {
205596
- args.push(`--nuget-config-file`, nuGetConfigPath);
205681
+ if (paths.orchestratorFeedsJsonPath) {
205682
+ args.push(`--nuget-config-file`, paths.orchestratorFeedsJsonPath);
205683
+ }
205684
+ if (paths.userNugetConfigPath) {
205685
+ args.push(`--nuget-config`, paths.userNugetConfigPath);
205597
205686
  }
205598
205687
  return this.executor.executeAsync("build", args, cancellationToken);
205599
205688
  });
205600
205689
  }
205601
205690
  async packAsync(options, cancellationToken) {
205602
- return this.withNuGetConfig(options, async (nuGetConfigPath) => {
205691
+ return this.withFeedPaths(options, async (paths) => {
205603
205692
  const args = [
205604
205693
  `-p`,
205605
205694
  options.projectPath,
@@ -205642,15 +205731,92 @@ class WorkflowCompilerTool extends ProjectTool {
205642
205731
  const outputType = this.mapOutputType(options.outputType);
205643
205732
  args.push(`--output-type`, outputType);
205644
205733
  }
205645
- if (nuGetConfigPath) {
205646
- args.push(`--nuget-config-file`, nuGetConfigPath);
205734
+ if (paths.orchestratorFeedsJsonPath) {
205735
+ args.push(`--nuget-config-file`, paths.orchestratorFeedsJsonPath);
205647
205736
  }
205648
- return this.executor.executeAsync("build", args, cancellationToken);
205737
+ if (paths.userNugetConfigPath) {
205738
+ args.push(`--nuget-config`, paths.userNugetConfigPath);
205739
+ }
205740
+ const result = await this.executor.executeAsync("build", args, cancellationToken);
205741
+ return this.recoverPackagePathsAsync(result, options.outputPath);
205742
+ });
205743
+ }
205744
+ async cleanupAsync(options, cancellationToken) {
205745
+ return this.withFeedPaths(options, async (paths) => {
205746
+ const args = [
205747
+ `-p`,
205748
+ options.projectPath,
205749
+ `--log-level`,
205750
+ String(options.logLevel ?? LogLevel.Info),
205751
+ `--format-logs`,
205752
+ `true`,
205753
+ `--exclude-configured-sources`,
205754
+ `${options.excludeConfiguredSources}`
205755
+ ];
205756
+ if (options.dryRun) {
205757
+ args.push(`--dry-run`);
205758
+ }
205759
+ if (options.skipImports) {
205760
+ args.push(`--skip-imports`);
205761
+ }
205762
+ if (paths.orchestratorFeedsJsonPath) {
205763
+ args.push(`--nuget-config-file`, paths.orchestratorFeedsJsonPath);
205764
+ }
205765
+ if (paths.userNugetConfigPath) {
205766
+ args.push(`--nuget-config`, paths.userNugetConfigPath);
205767
+ }
205768
+ const result = await this.executor.executeAsync("remove-unused-dependencies", args, cancellationToken);
205769
+ return this.toProjectCleanupResult(result);
205649
205770
  });
205650
205771
  }
205772
+ toProjectCleanupResult(result) {
205773
+ const raw = result.details?.removeUnusedDependencies;
205774
+ if (!raw) {
205775
+ return result;
205776
+ }
205777
+ const details = { ...result.details };
205778
+ delete details.removeUnusedDependencies;
205779
+ details.projectCleanup = toProjectCleanupInfo(raw);
205780
+ result.details = details;
205781
+ return result;
205782
+ }
205651
205783
  mapOutputType(outputType) {
205652
205784
  return outputType === "WebApp" ? "Process" : outputType;
205653
205785
  }
205786
+ async recoverPackagePathsAsync(result, outputPath) {
205787
+ if (!result.isSuccess) {
205788
+ return result;
205789
+ }
205790
+ const alreadyHasNupkgPaths = result.packages.length > 0 && result.packages.every((p2) => p2.toLowerCase().endsWith(".nupkg"));
205791
+ if (alreadyHasNupkgPaths) {
205792
+ return result;
205793
+ }
205794
+ const recovered = await this.findNupkgFilesAsync(outputPath);
205795
+ if (recovered.length > 0) {
205796
+ this.logger.warn(`[WorkflowCompiler] pack result did not include .nupkg paths; recovered ${recovered.length} package(s) by scanning the output folder (UV-15007 workaround).`);
205797
+ result.packages = recovered;
205798
+ }
205799
+ return result;
205800
+ }
205801
+ async findNupkgFilesAsync(dir3) {
205802
+ const results = [];
205803
+ let entries;
205804
+ try {
205805
+ entries = await this.fileSystem.readdir(dir3);
205806
+ } catch {
205807
+ return results;
205808
+ }
205809
+ for (const entry of entries) {
205810
+ const fullPath = this.fileSystem.path.join(dir3, entry);
205811
+ const stats = await this.fileSystem.stat(fullPath);
205812
+ if (stats?.isDirectory()) {
205813
+ results.push(...await this.findNupkgFilesAsync(fullPath));
205814
+ } else if (entry.toLowerCase().endsWith(".nupkg")) {
205815
+ results.push(fullPath);
205816
+ }
205817
+ }
205818
+ return results;
205819
+ }
205654
205820
  }
205655
205821
 
205656
205822
  // ../packager/packager-tool-workflowcompiler/src/workflow-compiler-tool-factory.ts
@@ -212330,6 +212496,7 @@ function getLogFilePath() {
212330
212496
  // ../common/src/output-format-context.ts
212331
212497
  var formatSlot = singleton2("OutputFormat");
212332
212498
  var formatExplicitSlot = singleton2("OutputFormatExplicit");
212499
+ var helpRequestedSlot = singleton2("HelpRequested");
212333
212500
  var filterSlot = singleton2("OutputFilter");
212334
212501
  function getOutputFormat() {
212335
212502
  return formatSlot.get("json");
@@ -213397,6 +213564,9 @@ var OutputFormatter;
213397
213564
  if (opts?.warning) {
213398
213565
  data.Warning = opts.warning;
213399
213566
  }
213567
+ if (opts?.pagination) {
213568
+ data.Pagination = opts.pagination;
213569
+ }
213400
213570
  success5(data);
213401
213571
  }
213402
213572
  OutputFormatter.emitList = emitList;
@@ -213841,6 +214011,7 @@ function isGuid(value) {
213841
214011
  }
213842
214012
  // ../common/src/interactivity-context.ts
213843
214013
  var modeSlot = singleton2("InteractivityMode");
214014
+ var interactiveFlagSlot = singleton2("InteractiveFlag");
213844
214015
  // ../common/src/polling/types.ts
213845
214016
  var PollOutcome = {
213846
214017
  Completed: "completed",
@@ -214006,7 +214177,7 @@ var de_default12 = {
214006
214177
  projectLoader: {
214007
214178
  errors: {
214008
214179
  pathRequired: "Project directory path is required",
214009
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214180
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214010
214181
  readFailed: "Failed to read project file: {path}",
214011
214182
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214012
214183
  }
@@ -214087,7 +214258,7 @@ var en7 = {
214087
214258
  projectLoader: {
214088
214259
  errors: {
214089
214260
  pathRequired: "Project directory path is required",
214090
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214261
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214091
214262
  readFailed: "Failed to read project file: {path}",
214092
214263
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214093
214264
  }
@@ -214168,7 +214339,7 @@ var es_default12 = {
214168
214339
  projectLoader: {
214169
214340
  errors: {
214170
214341
  pathRequired: "Project directory path is required",
214171
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214342
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214172
214343
  readFailed: "Failed to read project file: {path}",
214173
214344
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214174
214345
  }
@@ -214249,7 +214420,7 @@ var es_MX_default8 = {
214249
214420
  projectLoader: {
214250
214421
  errors: {
214251
214422
  pathRequired: "Project directory path is required",
214252
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214423
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214253
214424
  readFailed: "Failed to read project file: {path}",
214254
214425
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214255
214426
  }
@@ -214330,7 +214501,7 @@ var fr_default12 = {
214330
214501
  projectLoader: {
214331
214502
  errors: {
214332
214503
  pathRequired: "Project directory path is required",
214333
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214504
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214334
214505
  readFailed: "Failed to read project file: {path}",
214335
214506
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214336
214507
  }
@@ -214411,7 +214582,7 @@ var ja_default12 = {
214411
214582
  projectLoader: {
214412
214583
  errors: {
214413
214584
  pathRequired: "Project directory path is required",
214414
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214585
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214415
214586
  readFailed: "Failed to read project file: {path}",
214416
214587
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214417
214588
  }
@@ -214492,7 +214663,7 @@ var ko_default12 = {
214492
214663
  projectLoader: {
214493
214664
  errors: {
214494
214665
  pathRequired: "Project directory path is required",
214495
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214666
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214496
214667
  readFailed: "Failed to read project file: {path}",
214497
214668
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214498
214669
  }
@@ -214573,7 +214744,7 @@ var pt_default12 = {
214573
214744
  projectLoader: {
214574
214745
  errors: {
214575
214746
  pathRequired: "Project directory path is required",
214576
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214747
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214577
214748
  readFailed: "Failed to read project file: {path}",
214578
214749
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214579
214750
  }
@@ -214654,7 +214825,7 @@ var pt_BR_default8 = {
214654
214825
  projectLoader: {
214655
214826
  errors: {
214656
214827
  pathRequired: "Project directory path is required",
214657
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214828
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214658
214829
  readFailed: "Failed to read project file: {path}",
214659
214830
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214660
214831
  }
@@ -214735,7 +214906,7 @@ var ro_default9 = {
214735
214906
  projectLoader: {
214736
214907
  errors: {
214737
214908
  pathRequired: "Project directory path is required",
214738
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214909
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214739
214910
  readFailed: "Failed to read project file: {path}",
214740
214911
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214741
214912
  }
@@ -214816,7 +214987,7 @@ var ru_default12 = {
214816
214987
  projectLoader: {
214817
214988
  errors: {
214818
214989
  pathRequired: "Project directory path is required",
214819
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
214990
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214820
214991
  readFailed: "Failed to read project file: {path}",
214821
214992
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214822
214993
  }
@@ -214897,7 +215068,7 @@ var tr_default12 = {
214897
215068
  projectLoader: {
214898
215069
  errors: {
214899
215070
  pathRequired: "Project directory path is required",
214900
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
215071
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214901
215072
  readFailed: "Failed to read project file: {path}",
214902
215073
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214903
215074
  }
@@ -214978,7 +215149,7 @@ var zh_CN_default12 = {
214978
215149
  projectLoader: {
214979
215150
  errors: {
214980
215151
  pathRequired: "Project directory path is required",
214981
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
215152
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
214982
215153
  readFailed: "Failed to read project file: {path}",
214983
215154
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
214984
215155
  }
@@ -215059,7 +215230,7 @@ var zh_TW_default12 = {
215059
215230
  projectLoader: {
215060
215231
  errors: {
215061
215232
  pathRequired: "Project directory path is required",
215062
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
215233
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
215063
215234
  readFailed: "Failed to read project file: {path}",
215064
215235
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
215065
215236
  }
@@ -215140,7 +215311,7 @@ var zu_default3 = {
215140
215311
  projectLoader: {
215141
215312
  errors: {
215142
215313
  pathRequired: "Project directory path is required",
215143
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
215314
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
215144
215315
  readFailed: "Failed to read project file: {path}",
215145
215316
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
215146
215317
  }
@@ -236475,6 +236646,7 @@ var loggerSingleton2 = singleton4(SimpleLogger2);
236475
236646
  var logger3 = SimpleLogger2.getInstance();
236476
236647
  var formatSlot2 = singleton4("OutputFormat");
236477
236648
  var formatExplicitSlot2 = singleton4("OutputFormatExplicit");
236649
+ var helpRequestedSlot2 = singleton4("HelpRequested");
236478
236650
  var filterSlot2 = singleton4("OutputFilter");
236479
236651
  var PollOutcome2 = {
236480
236652
  Completed: "completed",
@@ -236669,6 +236841,7 @@ var RulesConfigFileType;
236669
236841
  class PackagerParameters {
236670
236842
  inputPath;
236671
236843
  downloadUrl;
236844
+ projectId;
236672
236845
  logLevel = LogLevel.Warn;
236673
236846
  outputPath;
236674
236847
  targetFramework;
@@ -236763,10 +236936,40 @@ class ToolLogger {
236763
236936
  globalLogHandler(message);
236764
236937
  }
236765
236938
  }
236939
+ var PREFIX22 = "@uipath/common/";
236940
+ var _g22 = globalThis;
236941
+ function singleton22(ctorOrName) {
236942
+ const name2 = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
236943
+ const key = Symbol.for(PREFIX22 + name2);
236944
+ return {
236945
+ get(fallback) {
236946
+ return _g22[key] ?? fallback;
236947
+ },
236948
+ set(value) {
236949
+ _g22[key] = value;
236950
+ },
236951
+ clear() {
236952
+ delete _g22[key];
236953
+ },
236954
+ getOrInit(factory, guard) {
236955
+ const existing = _g22[key];
236956
+ if (existing != null && typeof existing === "object") {
236957
+ if (!guard || guard(existing)) {
236958
+ return existing;
236959
+ }
236960
+ }
236961
+ const instance3 = factory();
236962
+ _g22[key] = instance3;
236963
+ return instance3;
236964
+ }
236965
+ };
236966
+ }
236967
+ var telemetryPropsSlot22 = singleton22("TelemetryDefaultProps");
236968
+ var sdkUserAgentHostToken22 = singleton22("SdkUserAgentHostToken");
236766
236969
  var package_default3 = {
236767
236970
  name: "@uipath/project-packager",
236768
236971
  license: "MIT",
236769
- version: "1.197.0",
236972
+ version: "1.198.0-preview.81",
236770
236973
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
236771
236974
  type: "module",
236772
236975
  main: "./dist/index.js",
@@ -237099,10 +237302,12 @@ var TelemetryNames;
237099
237302
  TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
237100
237303
  TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
237101
237304
  TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
237305
+ TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
237102
237306
  TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
237103
237307
  TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
237104
237308
  TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
237105
237309
  TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
237310
+ TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
237106
237311
  TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
237107
237312
  })(TelemetryNames ||= {});
237108
237313
  class ProjectToolExecutor {
@@ -237136,6 +237341,12 @@ class ProjectToolExecutor {
237136
237341
  projectType: project.Type
237137
237342
  }));
237138
237343
  }
237344
+ async cleanupAsync(options, project, context, cancellationToken) {
237345
+ return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup", project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
237346
+ projectId: project.Id,
237347
+ projectType: project.Type
237348
+ }));
237349
+ }
237139
237350
  async executeToolOperationAsync(project, context, operation) {
237140
237351
  try {
237141
237352
  const tool = await this.toolsFactory.createProjectToolAsync(project, context);
@@ -237246,7 +237457,7 @@ var de_default13 = {
237246
237457
  projectLoader: {
237247
237458
  errors: {
237248
237459
  pathRequired: "Project directory path is required",
237249
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237460
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237250
237461
  readFailed: "Failed to read project file: {path}",
237251
237462
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237252
237463
  }
@@ -237327,7 +237538,7 @@ var en8 = {
237327
237538
  projectLoader: {
237328
237539
  errors: {
237329
237540
  pathRequired: "Project directory path is required",
237330
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237541
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237331
237542
  readFailed: "Failed to read project file: {path}",
237332
237543
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237333
237544
  }
@@ -237408,7 +237619,7 @@ var es_default13 = {
237408
237619
  projectLoader: {
237409
237620
  errors: {
237410
237621
  pathRequired: "Project directory path is required",
237411
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237622
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237412
237623
  readFailed: "Failed to read project file: {path}",
237413
237624
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237414
237625
  }
@@ -237489,7 +237700,7 @@ var es_MX_default9 = {
237489
237700
  projectLoader: {
237490
237701
  errors: {
237491
237702
  pathRequired: "Project directory path is required",
237492
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237703
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237493
237704
  readFailed: "Failed to read project file: {path}",
237494
237705
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237495
237706
  }
@@ -237570,7 +237781,7 @@ var fr_default13 = {
237570
237781
  projectLoader: {
237571
237782
  errors: {
237572
237783
  pathRequired: "Project directory path is required",
237573
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237784
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237574
237785
  readFailed: "Failed to read project file: {path}",
237575
237786
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237576
237787
  }
@@ -237651,7 +237862,7 @@ var ja_default13 = {
237651
237862
  projectLoader: {
237652
237863
  errors: {
237653
237864
  pathRequired: "Project directory path is required",
237654
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237865
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237655
237866
  readFailed: "Failed to read project file: {path}",
237656
237867
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237657
237868
  }
@@ -237732,7 +237943,7 @@ var ko_default13 = {
237732
237943
  projectLoader: {
237733
237944
  errors: {
237734
237945
  pathRequired: "Project directory path is required",
237735
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
237946
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237736
237947
  readFailed: "Failed to read project file: {path}",
237737
237948
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237738
237949
  }
@@ -237813,7 +238024,7 @@ var pt_default13 = {
237813
238024
  projectLoader: {
237814
238025
  errors: {
237815
238026
  pathRequired: "Project directory path is required",
237816
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238027
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237817
238028
  readFailed: "Failed to read project file: {path}",
237818
238029
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237819
238030
  }
@@ -237894,7 +238105,7 @@ var pt_BR_default9 = {
237894
238105
  projectLoader: {
237895
238106
  errors: {
237896
238107
  pathRequired: "Project directory path is required",
237897
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238108
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237898
238109
  readFailed: "Failed to read project file: {path}",
237899
238110
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237900
238111
  }
@@ -237975,7 +238186,7 @@ var ro_default10 = {
237975
238186
  projectLoader: {
237976
238187
  errors: {
237977
238188
  pathRequired: "Project directory path is required",
237978
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238189
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
237979
238190
  readFailed: "Failed to read project file: {path}",
237980
238191
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
237981
238192
  }
@@ -238056,7 +238267,7 @@ var ru_default13 = {
238056
238267
  projectLoader: {
238057
238268
  errors: {
238058
238269
  pathRequired: "Project directory path is required",
238059
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238270
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
238060
238271
  readFailed: "Failed to read project file: {path}",
238061
238272
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
238062
238273
  }
@@ -238137,7 +238348,7 @@ var tr_default13 = {
238137
238348
  projectLoader: {
238138
238349
  errors: {
238139
238350
  pathRequired: "Project directory path is required",
238140
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238351
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
238141
238352
  readFailed: "Failed to read project file: {path}",
238142
238353
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
238143
238354
  }
@@ -238218,7 +238429,7 @@ var zh_CN_default13 = {
238218
238429
  projectLoader: {
238219
238430
  errors: {
238220
238431
  pathRequired: "Project directory path is required",
238221
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238432
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
238222
238433
  readFailed: "Failed to read project file: {path}",
238223
238434
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
238224
238435
  }
@@ -238299,7 +238510,7 @@ var zh_TW_default13 = {
238299
238510
  projectLoader: {
238300
238511
  errors: {
238301
238512
  pathRequired: "Project directory path is required",
238302
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238513
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
238303
238514
  readFailed: "Failed to read project file: {path}",
238304
238515
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
238305
238516
  }
@@ -238380,7 +238591,7 @@ var zu_default4 = {
238380
238591
  projectLoader: {
238381
238592
  errors: {
238382
238593
  pathRequired: "Project directory path is required",
238383
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
238594
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
238384
238595
  readFailed: "Failed to read project file: {path}",
238385
238596
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
238386
238597
  }
@@ -246378,6 +246589,7 @@ function getLogFilePath2() {
246378
246589
  }
246379
246590
  var formatSlot3 = singleton5("OutputFormat");
246380
246591
  var formatExplicitSlot3 = singleton5("OutputFormatExplicit");
246592
+ var helpRequestedSlot3 = singleton5("HelpRequested");
246381
246593
  var filterSlot3 = singleton5("OutputFilter");
246382
246594
  function getOutputFormat2() {
246383
246595
  return formatSlot3.get("json");
@@ -247441,6 +247653,9 @@ var OutputFormatter2;
247441
247653
  if (opts?.warning) {
247442
247654
  data.Warning = opts.warning;
247443
247655
  }
247656
+ if (opts?.pagination) {
247657
+ data.Pagination = opts.pagination;
247658
+ }
247444
247659
  success5(data);
247445
247660
  }
247446
247661
  OutputFormatter22.emitList = emitList;
@@ -247871,6 +248086,7 @@ var guardInstalledSlot3 = singleton5("ConsoleGuardInstalled");
247871
248086
  var savedOriginalsSlot3 = singleton5("ConsoleGuardOriginals");
247872
248087
  var DEFAULT_AUTH_TIMEOUT_MS3 = 5 * 60 * 1000;
247873
248088
  var modeSlot2 = singleton5("InteractivityMode");
248089
+ var interactiveFlagSlot2 = singleton5("InteractiveFlag");
247874
248090
  var PollOutcome3 = {
247875
248091
  Completed: "completed",
247876
248092
  Timeout: "timeout",
@@ -248049,6 +248265,7 @@ var RulesConfigFileType2;
248049
248265
  class PackagerParameters2 {
248050
248266
  inputPath;
248051
248267
  downloadUrl;
248268
+ projectId;
248052
248269
  logLevel = LogLevel.Warn;
248053
248270
  outputPath;
248054
248271
  targetFramework;
@@ -248147,10 +248364,12 @@ var TelemetryNames2;
248147
248364
  TelemetryNames22["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
248148
248365
  TelemetryNames22["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
248149
248366
  TelemetryNames22["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
248367
+ TelemetryNames22["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
248150
248368
  TelemetryNames22["ProjectPackagerPack"] = "ProjectPackager.Pack";
248151
248369
  TelemetryNames22["ProjectPackagerRestore"] = "ProjectPackager.Restore";
248152
248370
  TelemetryNames22["ProjectPackagerValidate"] = "ProjectPackager.Validate";
248153
248371
  TelemetryNames22["ProjectPackagerBuild"] = "ProjectPackager.Build";
248372
+ TelemetryNames22["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
248154
248373
  TelemetryNames22["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
248155
248374
  })(TelemetryNames2 ||= {});
248156
248375
  var LICENSE_TYPES2 = {
@@ -248304,10 +248523,40 @@ var PublishDestinationKind2;
248304
248523
  PublishDestinationKind22["OrchestratorSharedLibraries"] = "OrchestratorSharedLibraries";
248305
248524
  PublishDestinationKind22["OrchestratorCustom"] = "OrchestratorCustom";
248306
248525
  })(PublishDestinationKind2 ||= {});
248526
+ var PREFIX23 = "@uipath/common/";
248527
+ var _g23 = globalThis;
248528
+ function singleton23(ctorOrName) {
248529
+ const name2 = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
248530
+ const key = Symbol.for(PREFIX23 + name2);
248531
+ return {
248532
+ get(fallback) {
248533
+ return _g23[key] ?? fallback;
248534
+ },
248535
+ set(value) {
248536
+ _g23[key] = value;
248537
+ },
248538
+ clear() {
248539
+ delete _g23[key];
248540
+ },
248541
+ getOrInit(factory, guard) {
248542
+ const existing = _g23[key];
248543
+ if (existing != null && typeof existing === "object") {
248544
+ if (!guard || guard(existing)) {
248545
+ return existing;
248546
+ }
248547
+ }
248548
+ const instance3 = factory();
248549
+ _g23[key] = instance3;
248550
+ return instance3;
248551
+ }
248552
+ };
248553
+ }
248554
+ var telemetryPropsSlot23 = singleton23("TelemetryDefaultProps");
248555
+ var sdkUserAgentHostToken23 = singleton23("SdkUserAgentHostToken");
248307
248556
  var package_default4 = {
248308
248557
  name: "@uipath/project-packager",
248309
248558
  license: "MIT",
248310
- version: "1.197.0",
248559
+ version: "1.198.0-preview.81",
248311
248560
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
248312
248561
  type: "module",
248313
248562
  main: "./dist/index.js",
@@ -248386,6 +248635,7 @@ init_dist();
248386
248635
  init_dist();
248387
248636
  init_dist();
248388
248637
  init_dist();
248638
+ init_dist();
248389
248639
  var de_default14 = {
248390
248640
  solutionpackager: {
248391
248641
  solutionLoader: {
@@ -248760,6 +249010,11 @@ class SolutionPackOptions extends PackagerParameters {
248760
249010
  signingInfo;
248761
249011
  packOptions;
248762
249012
  publishInfo;
249013
+ cleanupOptions = {
249014
+ dryRun: false,
249015
+ skipImports: false
249016
+ };
249017
+ lockKey;
248763
249018
  }
248764
249019
 
248765
249020
  class OptionsBuilder {
@@ -248852,6 +249107,16 @@ class OptionsBuilder {
248852
249107
  outputPath: await this.buildProjectOutputPath(solutionOptions.outputPath, project)
248853
249108
  };
248854
249109
  }
249110
+ buildProjectCleanupOptions(solutionOptions, project) {
249111
+ return {
249112
+ projectPath: this.resolveProjectPath(solutionOptions, project),
249113
+ excludeConfiguredSources: solutionOptions.excludeConfiguredSources ?? false,
249114
+ nuGetSourcesConfigPath: solutionOptions.nuGetSourcesConfigPath,
249115
+ logLevel: solutionOptions.logLevel,
249116
+ dryRun: solutionOptions.cleanupOptions.dryRun,
249117
+ skipImports: solutionOptions.cleanupOptions.skipImports
249118
+ };
249119
+ }
248855
249120
  resolveProjectPath(solutionOptions, project) {
248856
249121
  return Path.join(solutionOptions.inputPath, Path.dirname(project.ProjectRelativePath));
248857
249122
  }
@@ -248955,7 +249220,7 @@ class PackageIdReader {
248955
249220
  const resource = resources.find((r2) => {
248956
249221
  const projectKey = this.getProperty(r2, "projectKey");
248957
249222
  const kind = this.getProperty(r2, "kind");
248958
- return projectKey === project.Id && kind?.toLowerCase() === "process";
249223
+ return projectKey === project.Id && typeof kind === "string" && kind.toLowerCase() === "process";
248959
249224
  });
248960
249225
  if (!resource) {
248961
249226
  return null;
@@ -248996,9 +249261,9 @@ class PackageIdReader {
248996
249261
  const projectKey = this.getProperty(resource, "projectKey");
248997
249262
  if (projectKey === project.Id) {
248998
249263
  const spec = this.getProperty(resource, "spec");
248999
- let packageName = this.getProperty(spec, "packageName");
249000
- if (!packageName || typeof packageName !== "string" || packageName.trim() === "") {
249001
- packageName = null;
249264
+ const packageName = this.getProperty(spec, "packageName");
249265
+ if (typeof packageName !== "string" || packageName.trim() === "") {
249266
+ return null;
249002
249267
  }
249003
249268
  return packageName;
249004
249269
  }
@@ -249018,6 +249283,72 @@ class PackageIdReader {
249018
249283
  }
249019
249284
  }
249020
249285
 
249286
+ class SolutionCleanupService {
249287
+ optionsBuilder;
249288
+ projectExecutor;
249289
+ telemetry;
249290
+ constructor(optionsBuilder, projectExecutor, telemetry3) {
249291
+ this.optionsBuilder = optionsBuilder;
249292
+ this.projectExecutor = projectExecutor;
249293
+ this.telemetry = telemetry3;
249294
+ }
249295
+ async cleanupAsync(parameters, solution, context, cancellationToken) {
249296
+ return await this.telemetry.trackDependencyOperation("SolutionPackager.Solution.Cleanup", "cleanup", async () => {
249297
+ const projectResults = await Promise.all(solution.Projects.map(async (project) => {
249298
+ if (project.ProjectPath == null) {
249299
+ return {
249300
+ project,
249301
+ result: ToolResult.error(ToolErrorCodes.InternalError, `Project '${project.Id}' has no ProjectPath; the solution loader must populate it before cleanup.`)
249302
+ };
249303
+ }
249304
+ const result2 = await this.projectExecutor.cleanupAsync(this.optionsBuilder.buildProjectCleanupOptions(parameters, project), project, context, cancellationToken);
249305
+ return { project, result: result2 };
249306
+ }));
249307
+ const failed = projectResults.find((r2) => !r2.result.isSuccess);
249308
+ if (failed) {
249309
+ return failed.result;
249310
+ }
249311
+ const result = ToolResult.success();
249312
+ const details = {};
249313
+ const changedFilesByProject = this.mergeChangedFiles(projectResults.map((r2) => r2.result));
249314
+ if (Object.keys(changedFilesByProject).length > 0) {
249315
+ details.changedFilesByProject = changedFilesByProject;
249316
+ }
249317
+ const cleanupByProject = this.collectProjectCleanups(projectResults);
249318
+ if (Object.keys(cleanupByProject).length > 0) {
249319
+ details.cleanupByProject = cleanupByProject;
249320
+ }
249321
+ if (Object.keys(details).length > 0) {
249322
+ result.details = details;
249323
+ }
249324
+ return result;
249325
+ }, { solutionId: solution.SolutionId });
249326
+ }
249327
+ mergeChangedFiles(results) {
249328
+ const merged = {};
249329
+ for (const result of results) {
249330
+ const changed = result.details?.changedFilesByProject;
249331
+ if (!changed) {
249332
+ continue;
249333
+ }
249334
+ for (const [projectId, files] of Object.entries(changed)) {
249335
+ merged[projectId] = files;
249336
+ }
249337
+ }
249338
+ return merged;
249339
+ }
249340
+ collectProjectCleanups(results) {
249341
+ const byProject = {};
249342
+ for (const { project, result } of results) {
249343
+ const info = result.details?.projectCleanup;
249344
+ if (info) {
249345
+ byProject[project.Id] = info;
249346
+ }
249347
+ }
249348
+ return byProject;
249349
+ }
249350
+ }
249351
+
249021
249352
  class SolutionLoader {
249022
249353
  fileSystem;
249023
249354
  static SolutionStorageFileName = "SolutionStorage.json";
@@ -249340,6 +249671,7 @@ class SolutionPackager {
249340
249671
  solutionPackService;
249341
249672
  solutionRestoreService;
249342
249673
  solutionValidateService;
249674
+ solutionCleanupService;
249343
249675
  packOptionsValidator;
249344
249676
  validateOptionsValidator;
249345
249677
  governancePolicyService;
@@ -249363,6 +249695,7 @@ class SolutionPackager {
249363
249695
  this.solutionPackService = new SolutionPackService(this.optionsBuilder, this.toolsFactory, this.projectExecutor, this.zipService, this.fileSystem, this.telemetryService, this.packageSignService);
249364
249696
  this.solutionRestoreService = new SolutionRestoreService(this.optionsBuilder, this.toolsFactory, this.projectExecutor, this.telemetryService);
249365
249697
  this.solutionValidateService = new SolutionValidateService(this.optionsBuilder, this.projectExecutor, this.telemetryService);
249698
+ this.solutionCleanupService = new SolutionCleanupService(this.optionsBuilder, this.projectExecutor, this.telemetryService);
249366
249699
  }
249367
249700
  async setupAsync(input2, operationId) {
249368
249701
  this.telemetryService.setOperationId(operationId);
@@ -249477,6 +249810,28 @@ class SolutionPackager {
249477
249810
  }
249478
249811
  });
249479
249812
  }
249813
+ async cleanupSolutionAsync(options, cancellationToken) {
249814
+ return await this.telemetryService.trackRequest("SolutionPackager.CleanupSolution", async () => {
249815
+ try {
249816
+ const loadedSolution = await this.solutionLoader.loadSolution(options.inputPath);
249817
+ const solution = this.filterSolutionProjects(loadedSolution, options.projectDesignIds);
249818
+ const context = this.createOperationContext(options, solution);
249819
+ const result = await this.solutionCleanupService.cleanupAsync(options, solution, context, cancellationToken);
249820
+ if (result.isSuccess) {
249821
+ this.logger.info("Solution cleanup completed successfully.");
249822
+ } else {
249823
+ this.logger.error(`Solution cleanup failed with error code ${result.errorCode}: ${result.message}`);
249824
+ }
249825
+ return result;
249826
+ } catch (error95) {
249827
+ const errorMessage3 = error95 instanceof Error ? error95.message : String(error95);
249828
+ this.logger.error(`Processing error: ${errorMessage3}`);
249829
+ return ToolResult.error(ToolErrorCodes.InternalError, `Solution cleanup failed: ${errorMessage3}`);
249830
+ } finally {
249831
+ await this.temporaryStorage.cleanup();
249832
+ }
249833
+ });
249834
+ }
249480
249835
  filterSolutionProjects(solution, projectDesignIds) {
249481
249836
  if (!projectDesignIds?.length)
249482
249837
  return solution;
@@ -249496,11 +249851,13 @@ class SolutionPackager {
249496
249851
  id: crypto.randomUUID(),
249497
249852
  projects: solution.Projects,
249498
249853
  downloadUrl: options.downloadUrl,
249854
+ solutionId: solution.SolutionId,
249499
249855
  configuration: options.configuration,
249500
249856
  targetFramework: options.targetFramework ?? TargetFramework.Portable,
249501
249857
  connection: options.connection,
249502
249858
  logger: this.logger,
249503
- workflowCompilerVersion: options.workflowCompilerVersion
249859
+ workflowCompilerVersion: options.workflowCompilerVersion,
249860
+ lockKey: options.lockKey
249504
249861
  };
249505
249862
  }
249506
249863
  async getPackageStreamsAsync(result) {
@@ -263464,6 +263821,10 @@ var getAuthContext = async (options = {}) => {
263464
263821
  tenantName
263465
263822
  };
263466
263823
  };
263824
+
263825
+ // ../auth/src/index.ts
263826
+ init_constants();
263827
+
263467
263828
  // ../auth/src/interactive.ts
263468
263829
  init_src();
263469
263830
 
@@ -263733,7 +264094,7 @@ class VoidApiResponse {
263733
264094
  var package_default5 = {
263734
264095
  name: "@uipath/orchestrator-sdk",
263735
264096
  license: "MIT",
263736
- version: "1.197.0",
264097
+ version: "1.198.0",
263737
264098
  repository: {
263738
264099
  type: "git",
263739
264100
  url: "https://github.com/UiPath/cli.git",
@@ -266449,4 +266810,4 @@ export {
266449
266810
  packSolutionAsync
266450
266811
  };
266451
266812
 
266452
- //# debugId=8C02D5FAF142110B64756E2164756E21
266813
+ //# debugId=CA38C24B935306F764756E2164756E21