@uipath/solution-tool 1.202.0-preview.138 → 1.202.0-preview.140

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/deploy.js CHANGED
@@ -5,11 +5,11 @@ import {
5
5
  listPackagesAsync,
6
6
  uninstallDeploymentAsync,
7
7
  upgradeDeploymentAsync
8
- } from "./packager-tool-k2tj5mv2.js";
9
- import"./packager-tool-vmskhsbr.js";
10
- import"./packager-tool-zwvkjsmc.js";
11
- import"./packager-tool-fjr8yn4g.js";
12
- import"./packager-tool-sba5cptt.js";
8
+ } from "./packager-tool-3n5e7fkr.js";
9
+ import"./packager-tool-x907fvkz.js";
10
+ import"./packager-tool-40vamz9y.js";
11
+ import"./packager-tool-29bj4s4t.js";
12
+ import"./packager-tool-1x1cc4qh.js";
13
13
  import"./packager-tool-dfrk01gn.js";
14
14
  import"./packager-tool-1de529jm.js";
15
15
  export {
package/dist/index.js CHANGED
@@ -2,21 +2,21 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-htp0xd7c.js";
6
- import"./packager-tool-vxthsps3.js";
7
- import"./packager-tool-k2tj5mv2.js";
8
- import"./packager-tool-xfg2cveb.js";
9
- import"./packager-tool-p4kjbrrp.js";
10
- import"./packager-tool-9dx65z2d.js";
11
- import"./packager-tool-af5hm3yv.js";
12
- import"./packager-tool-vmskhsbr.js";
13
- import"./packager-tool-zwvkjsmc.js";
14
- import"./packager-tool-72345dw7.js";
5
+ } from "./packager-tool-kpybyt0p.js";
6
+ import"./packager-tool-6bhx9vfz.js";
7
+ import"./packager-tool-3n5e7fkr.js";
8
+ import"./packager-tool-8t3sjyk9.js";
9
+ import"./packager-tool-2t1tzvbv.js";
10
+ import"./packager-tool-3bewrpq4.js";
11
+ import"./packager-tool-ah6zzb55.js";
12
+ import"./packager-tool-x907fvkz.js";
13
+ import"./packager-tool-40vamz9y.js";
14
+ import"./packager-tool-pc4hb3pv.js";
15
15
  import"./packager-tool-nzghfa48.js";
16
- import"./packager-tool-fjr8yn4g.js";
16
+ import"./packager-tool-29bj4s4t.js";
17
17
  import {
18
18
  Command
19
- } from "./packager-tool-sba5cptt.js";
19
+ } from "./packager-tool-1x1cc4qh.js";
20
20
  import"./packager-tool-dfrk01gn.js";
21
21
  import"./packager-tool-1de529jm.js";
22
22
 
package/dist/init.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  SolutionInitError,
3
3
  solutionInitAsync
4
- } from "./packager-tool-xfg2cveb.js";
4
+ } from "./packager-tool-8t3sjyk9.js";
5
5
  import {
6
6
  addProjectArtifactsToSolutionAsync
7
- } from "./packager-tool-72345dw7.js";
7
+ } from "./packager-tool-pc4hb3pv.js";
8
8
  import"./packager-tool-nzghfa48.js";
9
- import"./packager-tool-fjr8yn4g.js";
10
- import"./packager-tool-sba5cptt.js";
9
+ import"./packager-tool-29bj4s4t.js";
10
+ import"./packager-tool-1x1cc4qh.js";
11
11
  import"./packager-tool-dfrk01gn.js";
12
12
  import"./packager-tool-1de529jm.js";
13
13
  export {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getStudioWebAuth,
3
3
  useStudioWebAuth
4
- } from "./packager-tool-vxthsps3.js";
4
+ } from "./packager-tool-6bhx9vfz.js";
5
5
  import {
6
6
  getStudioWebSolutionProjects,
7
7
  listStudioWebSolutions
8
- } from "./packager-tool-zwvkjsmc.js";
8
+ } from "./packager-tool-40vamz9y.js";
9
9
  import {
10
10
  DEFAULT_PAGE_SIZE,
11
11
  OutputFormatter,
@@ -16,7 +16,7 @@ import {
16
16
  parseBoundedInt,
17
17
  parseOffset,
18
18
  processContext
19
- } from "./packager-tool-sba5cptt.js";
19
+ } from "./packager-tool-1x1cc4qh.js";
20
20
  import"./packager-tool-dfrk01gn.js";
21
21
  import"./packager-tool-1de529jm.js";
22
22
 
package/dist/pack.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  packSolutionAsync
3
- } from "./packager-tool-p4kjbrrp.js";
4
- import"./packager-tool-9dx65z2d.js";
5
- import"./packager-tool-72345dw7.js";
3
+ } from "./packager-tool-2t1tzvbv.js";
4
+ import"./packager-tool-3bewrpq4.js";
5
+ import"./packager-tool-pc4hb3pv.js";
6
6
  import"./packager-tool-nzghfa48.js";
7
- import"./packager-tool-fjr8yn4g.js";
8
- import"./packager-tool-sba5cptt.js";
7
+ import"./packager-tool-29bj4s4t.js";
8
+ import"./packager-tool-1x1cc4qh.js";
9
9
  import"./packager-tool-dfrk01gn.js";
10
10
  import"./packager-tool-1de529jm.js";
11
11
  export {
@@ -5436,6 +5436,12 @@ async function extractErrorMessage(error, options) {
5436
5436
  const { message } = await extractErrorDetails(error, options);
5437
5437
  return message;
5438
5438
  }
5439
+ // ../common/src/classified-failure.ts
5440
+ var MAX_QUOTED_BODY_CHARS = 200;
5441
+ function summarizePlatformBody(body) {
5442
+ const trimmed = body.trim().replace(/\s+/g, " ");
5443
+ return trimmed.length > MAX_QUOTED_BODY_CHARS ? `${trimmed.slice(0, MAX_QUOTED_BODY_CHARS)}…` : trimmed;
5444
+ }
5439
5445
  // ../common/src/command-examples.ts
5440
5446
  var examplesByCommand = new WeakMap;
5441
5447
  Command.prototype.examples = function(examples) {
@@ -7817,6 +7823,6 @@ async function findSolutionFileUpward(fs2, startDir) {
7817
7823
  }
7818
7824
  }
7819
7825
 
7820
- export { getFileSystem, catchError, carriedInstructions, extractErrorDetails, extractErrorMessage, logger, telemetry, RESULTS, Pagination, OutputFormatter, Command, Option, isPreviewBuild, processContext, withCompleter, requireConfirmation, DEFAULT_PAGE_SIZE, resolveEnvReference, isGuid, createHiddenDeprecatedTenantOption, parseLimit, parseOffset, parseBoundedInt, registerPackageMetadataOptions, mapPackageMetadataOptions, PollOutcome, mapPollFailure, pollUntil, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, unsupportedSolutionProjectType, trackShipSucceeded, ensurePackagerFactory, getLoginStatusAsync, getAuthContext, normalizeProjectType, toPortableRelativePath, readUipxFile, resolveSolutionDir, updateUipxSolutionId, findSolutionFileUpward };
7826
+ export { getFileSystem, catchError, carriedInstructions, extractErrorDetails, extractErrorMessage, logger, telemetry, RESULTS, Pagination, OutputFormatter, summarizePlatformBody, Command, Option, isPreviewBuild, processContext, withCompleter, requireConfirmation, DEFAULT_PAGE_SIZE, resolveEnvReference, isGuid, createHiddenDeprecatedTenantOption, parseLimit, parseOffset, parseBoundedInt, registerPackageMetadataOptions, mapPackageMetadataOptions, PollOutcome, mapPollFailure, pollUntil, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, unsupportedSolutionProjectType, trackShipSucceeded, ensurePackagerFactory, getLoginStatusAsync, getAuthContext, normalizeProjectType, toPortableRelativePath, readUipxFile, resolveSolutionDir, updateUipxSolutionId, findSolutionFileUpward };
7821
7827
 
7822
- //# debugId=62C28FF18B08C6A164756E2164756E21
7828
+ //# debugId=A770E41AF763C8F264756E2164756E21
@@ -3,7 +3,7 @@ import {
3
3
  getAuthContext,
4
4
  getSdkUserAgentToken,
5
5
  installSdkUserAgentHeader
6
- } from "./packager-tool-sba5cptt.js";
6
+ } from "./packager-tool-1x1cc4qh.js";
7
7
 
8
8
  // ../solution-sdk/src/solution-auth.ts
9
9
  async function getSolutionAuthContext(options) {
@@ -4,6 +4,8 @@ import {
4
4
  LogLevel,
5
5
  LogMessage,
6
6
  Path,
7
+ ProjectTool,
8
+ ProjectTypes,
7
9
  TargetFramework,
8
10
  TemporaryStorageService,
9
11
  ToolErrorCodes,
@@ -12,7 +14,7 @@ import {
12
14
  registerPackagerFactories,
13
15
  toolsFactoryRepository,
14
16
  translate
15
- } from "./packager-tool-9dx65z2d.js";
17
+ } from "./packager-tool-3bewrpq4.js";
16
18
  import {
17
19
  Tokens,
18
20
  createResourceBuilderServices,
@@ -23,7 +25,7 @@ import {
23
25
  models_BindingsResourceType,
24
26
  readUipxProjects,
25
27
  syncAndLog
26
- } from "./packager-tool-72345dw7.js";
28
+ } from "./packager-tool-pc4hb3pv.js";
27
29
  import {
28
30
  ToolResult as ToolResult2,
29
31
  toolsFactoryRepository as toolsFactoryRepository2
@@ -39,7 +41,7 @@ import {
39
41
  logger,
40
42
  telemetry,
41
43
  unsupportedSolutionProjectType
42
- } from "./packager-tool-sba5cptt.js";
44
+ } from "./packager-tool-1x1cc4qh.js";
43
45
 
44
46
  // ../filesystem/dist/index.js
45
47
  import fs from "node:fs";
@@ -24191,7 +24193,7 @@ var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
24191
24193
  var package_default = {
24192
24194
  name: "@uipath/project-packager",
24193
24195
  license: "MIT",
24194
- version: "1.202.0-preview.138",
24196
+ version: "1.202.0-preview.140",
24195
24197
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
24196
24198
  type: "module",
24197
24199
  main: "./dist/index.js",
@@ -24556,6 +24558,77 @@ class PackagerParametersValidator {
24556
24558
  return ToolResult.success();
24557
24559
  }
24558
24560
  }
24561
+ class ProjectLoader {
24562
+ fileSystem;
24563
+ static WebAppManifestFileName = "webAppManifest.json";
24564
+ static ProjectJsonFileName = "project.json";
24565
+ constructor(fileSystem) {
24566
+ this.fileSystem = fileSystem;
24567
+ }
24568
+ async loadProject(projectPath) {
24569
+ if (!projectPath) {
24570
+ throw new Error(translate.t("solutionpackager.projectLoader.errors.pathRequired"));
24571
+ }
24572
+ const projectFilePath = Path.join(projectPath, ProjectTool.ProjectFileName);
24573
+ const projectFileExists = await this.fileSystem.exists(projectFilePath);
24574
+ if (projectFileExists) {
24575
+ return await this.loadFromProjectFile(projectPath, projectFilePath);
24576
+ }
24577
+ const projectJsonPath = Path.join(projectPath, ProjectLoader.ProjectJsonFileName);
24578
+ if (await this.fileSystem.exists(projectJsonPath)) {
24579
+ return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
24580
+ }
24581
+ const webAppManifestPath = Path.join(projectPath, ProjectLoader.WebAppManifestFileName);
24582
+ const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
24583
+ if (webAppManifestExists) {
24584
+ return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
24585
+ }
24586
+ throw new Error(translate.t("solutionpackager.projectLoader.errors.noProjectFile", {
24587
+ projectFile: ProjectTool.ProjectFileName,
24588
+ projectJsonFile: ProjectLoader.ProjectJsonFileName,
24589
+ manifestFile: ProjectLoader.WebAppManifestFileName,
24590
+ path: projectPath
24591
+ }));
24592
+ }
24593
+ async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
24594
+ const fileContent = await this.fileSystem.readFile(projectFilePath);
24595
+ if (!fileContent) {
24596
+ throw new Error(translate.t("solutionpackager.projectLoader.errors.readFailed", {
24597
+ path: projectFilePath
24598
+ }));
24599
+ }
24600
+ const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
24601
+ const projectData = JSON.parse(json);
24602
+ const projectJson = useProjectJson ? projectData : undefined;
24603
+ const outputType = projectJson?.designOptions?.outputType;
24604
+ const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
24605
+ if (!projectData || !projectType) {
24606
+ throw new Error(translate.t("solutionpackager.projectLoader.errors.invalidProject", {
24607
+ path: projectFilePath
24608
+ }));
24609
+ }
24610
+ const declaredName = projectJson?.name?.trim() || projectData.Name;
24611
+ const declaredDescription = projectJson?.description?.trim() || projectData.Description?.trim() || undefined;
24612
+ const declaredAuthor = projectJson?.author?.trim() || projectData.Author?.trim() || undefined;
24613
+ return {
24614
+ type: projectType,
24615
+ name: declaredName || Path.basename(projectPath),
24616
+ projectPath,
24617
+ projectFilePath,
24618
+ description: declaredDescription,
24619
+ author: declaredAuthor
24620
+ };
24621
+ }
24622
+ loadFromWebAppManifest(projectPath, webAppManifestPath) {
24623
+ const folderName = Path.basename(projectPath);
24624
+ return {
24625
+ type: ProjectTypes.AppV2,
24626
+ name: folderName,
24627
+ projectPath,
24628
+ projectFilePath: webAppManifestPath
24629
+ };
24630
+ }
24631
+ }
24559
24632
  var TelemetryNames;
24560
24633
  ((TelemetryNames2) => {
24561
24634
  TelemetryNames2["ProjectToolPack"] = "ProjectPackager.Tool.Pack";
@@ -37334,7 +37407,7 @@ var sdkUserAgentHostToken22 = singleton22("SdkUserAgentHostToken");
37334
37407
  var package_default2 = {
37335
37408
  name: "@uipath/project-packager",
37336
37409
  license: "MIT",
37337
- version: "1.202.0-preview.138",
37410
+ version: "1.202.0-preview.140",
37338
37411
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
37339
37412
  type: "module",
37340
37413
  main: "./dist/index.js",
@@ -37799,6 +37872,8 @@ class OptionsBuilder {
37799
37872
  this.fileSystem = fileSystem;
37800
37873
  }
37801
37874
  static FILES_DIRECTORY_NAME = "files";
37875
+ static DEFAULT_AUTHOR = "UiPath";
37876
+ static DEFAULT_DESCRIPTION = "Created by UiPath";
37802
37877
  async buildSolutionPackOptions(parameters, solution) {
37803
37878
  if (!parameters.outputPath) {
37804
37879
  throw new Error(translate.t("solutionpackager.optionsBuilder.errors.outputPathRequired"));
@@ -37817,16 +37892,34 @@ class OptionsBuilder {
37817
37892
  projectsToBuild: solution.Projects.map((p) => p.Id)
37818
37893
  };
37819
37894
  }
37895
+ async resolveMemberMetadataAsync(solutionOptions, projectPath) {
37896
+ const declared = await this.loadDeclaredMetadataAsync(projectPath);
37897
+ return {
37898
+ author: solutionOptions.package.author?.trim() || declared?.author || OptionsBuilder.DEFAULT_AUTHOR,
37899
+ description: solutionOptions.package.description?.trim() || declared?.description || OptionsBuilder.DEFAULT_DESCRIPTION
37900
+ };
37901
+ }
37902
+ async loadDeclaredMetadataAsync(projectPath) {
37903
+ try {
37904
+ const loaded = await new ProjectLoader(this.fileSystem).loadProject(projectPath);
37905
+ return {
37906
+ author: loaded.author,
37907
+ description: loaded.description
37908
+ };
37909
+ } catch {
37910
+ return;
37911
+ }
37912
+ }
37820
37913
  async createOutputFilesDirectoryAsync(outputPath) {
37821
37914
  const filesDir = Path.join(outputPath, OptionsBuilder.FILES_DIRECTORY_NAME);
37822
37915
  await this.fileSystem.mkdir(filesDir);
37823
37916
  }
37824
- async buildProjectPackOptions(solutionOptions, project) {
37917
+ async buildProjectPackOptions(solutionOptions, project, solutionName) {
37825
37918
  const projectPath = this.resolveProjectPath(solutionOptions, project);
37826
- const solutionName = solutionOptions.package.id || undefined;
37827
37919
  const packageInfo = {
37828
37920
  ...solutionOptions.package,
37829
- id: await this.packageIdReader.read(project, solutionOptions.inputPath, solutionName) || ""
37921
+ id: await this.packageIdReader.read(project, solutionOptions.inputPath, solutionName) || "",
37922
+ ...await this.resolveMemberMetadataAsync(solutionOptions, projectPath)
37830
37923
  };
37831
37924
  if (!solutionOptions.outputPath) {
37832
37925
  throw new Error(translate.t("solutionpackager.optionsBuilder.errors.outputPathRequired"));
@@ -38269,7 +38362,7 @@ class SolutionPackService {
38269
38362
  return await this.telemetry.trackDependencyOperation("SolutionPackager.Solution.Pack", "pack", async () => {
38270
38363
  const [restoreResult, ...projectResults] = await Promise.all([
38271
38364
  solutionTool.restoreAsync(solutionOptions, cancellationToken),
38272
- ...this.packAllProjectsAsync(parameters, solution.Projects, context, cancellationToken)
38365
+ ...this.packAllProjectsAsync(parameters, solution.Projects, solution.Name, context, cancellationToken)
38273
38366
  ]);
38274
38367
  const restoreAndPackResults = [
38275
38368
  restoreResult,
@@ -38301,12 +38394,12 @@ class SolutionPackService {
38301
38394
  }
38302
38395
  }
38303
38396
  }
38304
- packAllProjectsAsync(parameters, projects, context, cancellationToken) {
38305
- return projects.map((project) => this.packSingleProjectAsync(parameters, project, context, cancellationToken));
38397
+ packAllProjectsAsync(parameters, projects, solutionName, context, cancellationToken) {
38398
+ return projects.map((project) => this.packSingleProjectAsync(parameters, project, solutionName, context, cancellationToken));
38306
38399
  }
38307
- async packSingleProjectAsync(parameters, project, context, cancellationToken) {
38400
+ async packSingleProjectAsync(parameters, project, solutionName, context, cancellationToken) {
38308
38401
  try {
38309
- const projectOptions = await this.optionsBuilder.buildProjectPackOptions(parameters, project);
38402
+ const projectOptions = await this.optionsBuilder.buildProjectPackOptions(parameters, project, solutionName);
38310
38403
  return await this.projectExecutor.packAsync(projectOptions, project, context, cancellationToken);
38311
38404
  } catch (error) {
38312
38405
  const errorMessage2 = error instanceof Error ? error.message : String(error);
@@ -39415,8 +39508,8 @@ Packing solution...
39415
39508
  packOptions.package = {
39416
39509
  id: packageName,
39417
39510
  version: options.version || "1.0.0",
39418
- author: options.author?.trim() || "UiPath",
39419
- description: options.description?.trim() || "Created by UiPath",
39511
+ author: options.author?.trim() || undefined,
39512
+ description: options.description?.trim() || undefined,
39420
39513
  releaseNotes: options.releaseNotes,
39421
39514
  projectUrl: options.projectUrl,
39422
39515
  repositoryType: options.repositoryType,
@@ -39490,4 +39583,4 @@ async function packSolutionAsync(solutionPath, options) {
39490
39583
 
39491
39584
  export { SolutionPackOptions, isUnpackableProjectTypeError, ensurePackagerTools, createSolutionPackager, readSolutionFileAsUint8Array, resolveSdkLogLevel, applyAuthConnection, SOLUTION_PATH_INSTRUCTIONS, checkSolutionPathAsync, GOVERNANCE_OPTION_INSTRUCTIONS, validateGovernanceOptions, PackCommandService, packSolutionAsync };
39492
39585
 
39493
- //# debugId=2C5DDB7BE97361C764756E2164756E21
39586
+ //# debugId=53B4FC3C36728CC064756E2164756E21
@@ -2267,6 +2267,6 @@ function registerPackagerFactories() {
2267
2267
  toolsFactoryRepository.registerProjectToolFactory(new ConnectorToolFactory);
2268
2268
  }
2269
2269
 
2270
- export { Path, TemporaryStorageService, ZipService, I18nManager, translate, BuildConfiguration, LogLevel, LogMessage, TargetFramework, ToolErrorCodes, ToolResult, toolsFactoryRepository2 as toolsFactoryRepository, registerPackagerFactories };
2270
+ export { Path, TemporaryStorageService, ZipService, I18nManager, translate, BuildConfiguration, LogLevel, LogMessage, ProjectTypes, TargetFramework, ToolErrorCodes, ToolResult, ProjectTool, toolsFactoryRepository2 as toolsFactoryRepository, registerPackagerFactories };
2271
2271
 
2272
- //# debugId=1698A45CAE5F631764756E2164756E21
2272
+ //# debugId=380EC26ADC903B4F64756E2164756E21
@@ -7,7 +7,7 @@ import {
7
7
  listSelectablePublishLocations,
8
8
  resolveFeedScope,
9
9
  resolvePersonalWorkspace
10
- } from "./packager-tool-vmskhsbr.js";
10
+ } from "./packager-tool-x907fvkz.js";
11
11
  import {
12
12
  Configuration as Configuration2,
13
13
  DeploymentOperationStatus,
@@ -16,11 +16,11 @@ import {
16
16
  SolutionDeploymentAction,
17
17
  deploymentsAutoInstall,
18
18
  searchPackageVersions
19
- } from "./packager-tool-zwvkjsmc.js";
19
+ } from "./packager-tool-40vamz9y.js";
20
20
  import {
21
21
  getSolutionAuthContext,
22
22
  resolveFolder
23
- } from "./packager-tool-fjr8yn4g.js";
23
+ } from "./packager-tool-29bj4s4t.js";
24
24
  import {
25
25
  DEFAULT_PAGE_SIZE,
26
26
  PollOutcome,
@@ -31,7 +31,7 @@ import {
31
31
  mapPollFailure,
32
32
  pollUntil,
33
33
  processContext
34
- } from "./packager-tool-sba5cptt.js";
34
+ } from "./packager-tool-1x1cc4qh.js";
35
35
  import {
36
36
  __commonJS,
37
37
  __require
@@ -1,11 +1,13 @@
1
1
  import {
2
+ RESULTS,
2
3
  addSdkUserAgentHeader,
3
4
  catchError,
4
5
  getSdkUserAgentToken,
5
6
  installSdkUserAgentHeader,
6
7
  logger,
7
- readUipxFile
8
- } from "./packager-tool-sba5cptt.js";
8
+ readUipxFile,
9
+ summarizePlatformBody
10
+ } from "./packager-tool-1x1cc4qh.js";
9
11
  import {
10
12
  zipSync
11
13
  } from "./packager-tool-dfrk01gn.js";
@@ -3103,7 +3105,7 @@ async function listStudioWebSolutions(config, organizationName, options = {}) {
3103
3105
  var package_default = {
3104
3106
  name: "@uipath/solution-sdk",
3105
3107
  license: "MIT",
3106
- version: "1.202.0-preview.138",
3108
+ version: "1.202.0-preview.140",
3107
3109
  repository: {
3108
3110
  type: "git",
3109
3111
  url: "https://github.com/UiPath/cli.git",
@@ -3170,9 +3172,11 @@ installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
3170
3172
  // ../solution-sdk/src/upload-service.ts
3171
3173
  class HttpError extends Error {
3172
3174
  status;
3173
- constructor(status, message) {
3175
+ authChallenge;
3176
+ constructor(status, message, authChallenge) {
3174
3177
  super(message);
3175
3178
  this.status = status;
3179
+ this.authChallenge = authChallenge;
3176
3180
  }
3177
3181
  }
3178
3182
 
@@ -3186,6 +3190,7 @@ class SolutionUploadHttpError extends Error {
3186
3190
  solutionId;
3187
3191
  parsedErrorCode;
3188
3192
  parsedErrorMessage;
3193
+ authChallenge;
3189
3194
  constructor(details) {
3190
3195
  super(details.message);
3191
3196
  this.name = "SolutionUploadHttpError";
@@ -3198,6 +3203,7 @@ class SolutionUploadHttpError extends Error {
3198
3203
  if (details.operation === "overwrite") {
3199
3204
  this.solutionId = details.solutionId;
3200
3205
  }
3206
+ this.authChallenge = details.authChallenge;
3201
3207
  const parsed = parseUploadErrorBody(details.body);
3202
3208
  this.parsedErrorCode = parsed.code;
3203
3209
  this.parsedErrorMessage = parsed.message;
@@ -3214,10 +3220,101 @@ function parseUploadErrorBody(body) {
3214
3220
  message: typeof rawMessage === "string" && rawMessage.trim() ? rawMessage : undefined
3215
3221
  };
3216
3222
  }
3223
+ function isSolutionUploadHttpError(error) {
3224
+ return error instanceof Error && error.name === "SolutionUploadHttpError" && "operation" in error && (error.operation === "import" || error.operation === "overwrite") && "status" in error && typeof error.status === "number" && "body" in error && typeof error.body === "string";
3225
+ }
3217
3226
  function requestPath(url) {
3218
3227
  const [, parsed] = catchError(() => new URL(url));
3219
3228
  return parsed ? `${parsed.pathname}${parsed.search}` : url;
3220
3229
  }
3230
+ var TOKEN_SHAPED = /\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]*)?|\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi;
3231
+ function redactTokens(text) {
3232
+ return text.replace(TOKEN_SHAPED, "[REDACTED]");
3233
+ }
3234
+ var MAX_CHALLENGE_DESCRIPTION = 200;
3235
+ function parseAuthChallenge(header) {
3236
+ if (!header)
3237
+ return {};
3238
+ const code = /\berror="([^"]*)"/.exec(header)?.[1]?.trim();
3239
+ const raw = /\berror_description="([^"]*)"/.exec(header)?.[1]?.trim();
3240
+ const description = raw ? redactTokens(raw).slice(0, MAX_CHALLENGE_DESCRIPTION) : undefined;
3241
+ return {
3242
+ error: code || undefined,
3243
+ description: description || undefined
3244
+ };
3245
+ }
3246
+ function summarizeAuthRefusalBody(body) {
3247
+ return summarizePlatformBody(redactTokens(body));
3248
+ }
3249
+ function isAuthRefusal(status) {
3250
+ return status === 401 || status === 403;
3251
+ }
3252
+ function buildAuthRefusalInstructions({
3253
+ err,
3254
+ subject,
3255
+ target,
3256
+ bodySuffix,
3257
+ identityType,
3258
+ clientId
3259
+ }) {
3260
+ const refusal = err.status === 401 ? "rejected the call as unauthorized (401)" : "forbade the call (403)";
3261
+ const what = err.operation === "overwrite" ? `replacing the contents of solution ${target}` : "importing the solution package";
3262
+ const actor = identityType === "Application" ? `This session acts as external application ${clientId ?? "(client id unknown)"}, so ` + `check what that application is allowed to do: it needs the Studio ` + `Web scopes that cover writing a solution (the StudioWebS2S grants ` + `on the external application), not just the Orchestrator or ` + `Solutions ones. ` : identityType === "User" ? `This session acts as a user, so check that your account has ` + `Studio Web access in this tenant. ` : `Check what this session is allowed to do in Studio Web — an ` + `external application needs the StudioWebS2S grants that cover ` + `writing a solution, a user needs Studio Web access in the tenant. `;
3263
+ const tenant = err.operation === "overwrite" ? `Also confirm that ${target} is the solution this project should ` + `publish to, and that it lives in the organization and tenant ` + `this session logged into — the id comes from the SolutionId ` + `recorded in the enclosing solution file. An id this session ` + `cannot see at all is reported separately, as nothing to ` + `overwrite, so a refusal here points at the grants first. ` : `Also confirm you are logged into the organization and tenant the ` + `solution should land in. `;
3264
+ const challenge = parseAuthChallenge(err.authChallenge);
3265
+ const quoted = challenge.description ? ` ("${challenge.description}")` : "";
3266
+ if (challenge.error === "invalid_token") {
3267
+ return `Studio Web ${refusal} while ${what}, and rejected the credential ` + `itself with the reason \`invalid_token\`${quoted}. That is the ` + `platform refusing this token rather than the permissions behind ` + `it, so unlike a grants refusal this one is worth a fresh ` + `\`uip login\` — or, in a pipeline, a newly minted ` + `client-credentials token. Check too that the token was issued for ` + `the organization being called: one minted against a different ` + `environment or audience is refused this way. Nothing was uploaded ` + `and nothing ran, so the ${subject} is not the cause.${bodySuffix}`;
3268
+ }
3269
+ const authenticated = `The session is authenticated — the token was issued and had not ` + `expired when the call went out — so re-running \`uip login\` mints ` + `the same token and fails the same way. `;
3270
+ const diagnosis = challenge.error === "insufficient_scope" ? `Studio Web reported \`insufficient_scope\`${quoted}, so the ` + `token is valid and simply not allowed to do this: logging in ` + `again will not change it. ` : challenge.error ? `${authenticated}Studio Web gave the reason ` + `\`${challenge.error}\`${quoted}. ` : authenticated;
3271
+ const closing = bodySuffix ? `If the grants and the tenant are already right, report the platform ` + `response, including its traceId.${bodySuffix}` : challenge.error ? `If the grants and the tenant are already right, report that reason ` + `together with the request path and status above.` : `If the grants and the tenant are already right, report the request ` + `path and status above — Studio Web returned no response body and ` + `no authentication challenge, so there is nothing further to quote.`;
3272
+ return `Studio Web ${refusal} while ${what}. ${diagnosis}${actor}${tenant}` + `Nothing was uploaded and nothing ran, so the ${subject} is not the ` + `cause. ${closing}`;
3273
+ }
3274
+ function buildSolutionUploadFailureOutput(err, options = {}) {
3275
+ const stage = err.operation === "overwrite" ? "overwrite-solution" : "import-solution";
3276
+ const authRefusal = isAuthRefusal(err.status);
3277
+ const parsedMessage = authRefusal && err.parsedErrorMessage ? redactTokens(err.parsedErrorMessage) : err.parsedErrorMessage;
3278
+ const detail = parsedMessage ? ` — ${parsedMessage}` : "";
3279
+ const Message = `Failed during ${stage}: HTTP ${err.status} on ${err.method} ` + `${err.endpoint}${detail}`;
3280
+ const quote = authRefusal ? summarizeAuthRefusalBody : summarizePlatformBody;
3281
+ const body = err.parsedErrorMessage ? "" : quote(err.body);
3282
+ const bodySuffix = body ? ` Platform response: "${body}".` : "";
3283
+ const importHint = options.importCheckHint ? ` ${options.importCheckHint}` : "";
3284
+ const subject = options.subject ?? "project";
3285
+ const target = err.solutionId ?? `the solution at ${err.endpoint}`;
3286
+ const authInstructions = isAuthRefusal(err.status) ? buildAuthRefusalInstructions({
3287
+ err,
3288
+ subject,
3289
+ target,
3290
+ bodySuffix,
3291
+ identityType: options.identityType,
3292
+ clientId: options.clientId
3293
+ }) : undefined;
3294
+ const Instructions = authInstructions ?? (err.operation === "overwrite" ? `Studio Web refused to replace the contents of solution ` + `${target}. Nothing was uploaded and nothing ran, so the ` + `${subject} is not the cause: do not re-author it, and do not ` + `copy the project into another solution. Confirm that ${target} ` + `is a solution you can still write to, and that it is the one ` + `this project should publish to — it comes from the SolutionId ` + `recorded in the enclosing solution file. If it is right, report ` + `the platform response.${bodySuffix}` : `Studio Web refused to import the solution package. Nothing was ` + `uploaded and nothing ran, so no part of the ${subject} executed ` + `— but the package itself may be what was rejected.${importHint} ` + `Report the platform response if the ${subject} is ` + `well-formed.${bodySuffix}`);
3295
+ const Context = {
3296
+ httpStatus: err.status,
3297
+ stage,
3298
+ endpoint: err.endpoint,
3299
+ method: err.method
3300
+ };
3301
+ if (err.parsedErrorCode !== undefined) {
3302
+ Context.errorCode = err.parsedErrorCode;
3303
+ }
3304
+ const output = {
3305
+ Result: RESULTS.Failure,
3306
+ Message,
3307
+ Instructions,
3308
+ Context
3309
+ };
3310
+ if (err.status === 401 && options.identityType === "Application") {
3311
+ output.ErrorCode = "permission_denied";
3312
+ }
3313
+ if (err.operation === "overwrite" && err.status >= 500 && err.status < 600) {
3314
+ output.Retry = "RetryAfter30Seconds";
3315
+ }
3316
+ return output;
3317
+ }
3221
3318
  var DEFAULT_UPLOAD_TIMEOUT_MS = 120000;
3222
3319
  function resolveUploadTimeoutMs() {
3223
3320
  const raw = Number(process.env?.UIPATH_SOLUTION_UPLOAD_TIMEOUT_MS);
@@ -3263,8 +3360,10 @@ async function solutionExistsOnStudioWeb(config, organizationName, solutionId) {
3263
3360
  if (error.response.status === 404) {
3264
3361
  return false;
3265
3362
  }
3363
+ const status = error.response.status;
3266
3364
  const text = await error.response.text().catch(() => "");
3267
- throw new HttpError(error.response.status, `Studio Web solution existence probe failed (${error.response.status}): ${text}`);
3365
+ const body = isAuthRefusal(status) ? summarizeAuthRefusalBody(text) : text;
3366
+ throw new HttpError(status, `Studio Web solution existence probe failed (${status}): ${body}`, parseAuthChallenge(error.response.headers?.get("www-authenticate") ?? undefined));
3268
3367
  }
3269
3368
  throw error;
3270
3369
  }
@@ -3293,6 +3392,7 @@ async function importSolution(config, organizationName, fileBuffer, fileName) {
3293
3392
  endpoint: requestPath(importUrl),
3294
3393
  url: importUrl,
3295
3394
  body: text,
3395
+ authChallenge: response.headers?.get("www-authenticate") ?? undefined,
3296
3396
  message: `Import failed (${response.status}): ${text}`
3297
3397
  });
3298
3398
  }
@@ -3324,6 +3424,7 @@ async function overwriteSolution(config, organizationName, fileBuffer, fileName,
3324
3424
  endpoint: requestPath(overwriteUrl),
3325
3425
  url: overwriteUrl,
3326
3426
  body: text,
3427
+ authChallenge: response.headers?.get("www-authenticate") ?? undefined,
3327
3428
  message: `Overwrite failed (${response.status}): ${text}`,
3328
3429
  solutionId
3329
3430
  });
@@ -3392,6 +3493,6 @@ async function searchPackageVersions(config, packageKey, filter, feedFolderKey)
3392
3493
  const raw = await response.json();
3393
3494
  return { count: raw.count, values: raw.values ?? [] };
3394
3495
  }
3395
- export { Configuration, getAvailablePublishLocationsV2, DeploymentActivationStatus, DeploymentOperationStatus, SolutionDeploymentAction, DeploymentsApi, PackagesApi, SearchApi, StudioWebIncompatibleProjectError, bundleSolution, deploymentsAutoInstall, isDebugProvisioningTerminal, isDebugProvisioningSucceeded, getProjectDebugStatus, searchPackageVersions, getStudioWebSolutionProjects, listStudioWebSolutions, solutionExistsOnStudioWeb, importSolution, overwriteSolution };
3496
+ export { Configuration, getAvailablePublishLocationsV2, DeploymentActivationStatus, DeploymentOperationStatus, SolutionDeploymentAction, DeploymentsApi, PackagesApi, SearchApi, StudioWebIncompatibleProjectError, bundleSolution, deploymentsAutoInstall, isDebugProvisioningTerminal, isDebugProvisioningSucceeded, getProjectDebugStatus, searchPackageVersions, getStudioWebSolutionProjects, listStudioWebSolutions, isSolutionUploadHttpError, buildSolutionUploadFailureOutput, solutionExistsOnStudioWeb, importSolution, overwriteSolution };
3396
3497
 
3397
- //# debugId=E7F2A66862D9247664756E2164756E21
3498
+ //# debugId=C2B9C3D9E8E0D45A64756E2164756E21
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  catchError,
3
3
  getAuthContext
4
- } from "./packager-tool-sba5cptt.js";
4
+ } from "./packager-tool-1x1cc4qh.js";
5
5
 
6
6
  // src/services/studio-web-auth-middleware.ts
7
7
  var studioWebAuthByCommand = new WeakMap;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  catchError,
3
3
  getFileSystem
4
- } from "./packager-tool-sba5cptt.js";
4
+ } from "./packager-tool-1x1cc4qh.js";
5
5
 
6
6
  // src/services/solution-init-service.ts
7
7
  var AGENTS_FILENAME = "AGENTS.md";
@@ -3,14 +3,14 @@ import {
3
3
  PipelinesApi,
4
4
  feedScopeInitOverride,
5
5
  resolveFeedScope
6
- } from "./packager-tool-vmskhsbr.js";
6
+ } from "./packager-tool-x907fvkz.js";
7
7
  import {
8
8
  Configuration as Configuration2,
9
9
  PackagesApi
10
- } from "./packager-tool-zwvkjsmc.js";
10
+ } from "./packager-tool-40vamz9y.js";
11
11
  import {
12
12
  getSolutionAuthContext
13
- } from "./packager-tool-fjr8yn4g.js";
13
+ } from "./packager-tool-29bj4s4t.js";
14
14
  import {
15
15
  PollOutcome,
16
16
  catchError,
@@ -19,7 +19,7 @@ import {
19
19
  logger,
20
20
  mapPollFailure,
21
21
  pollUntil
22
- } from "./packager-tool-sba5cptt.js";
22
+ } from "./packager-tool-1x1cc4qh.js";
23
23
  import {
24
24
  strFromU8,
25
25
  strToU8,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getStudioWebAuthWithOrganizationId,
3
3
  useStudioWebAuth
4
- } from "./packager-tool-vxthsps3.js";
4
+ } from "./packager-tool-6bhx9vfz.js";
5
5
  import {
6
6
  activateDeploymentAsync,
7
7
  deployRunAsync,
@@ -11,11 +11,11 @@ import {
11
11
  listPackagesAsync,
12
12
  uninstallDeploymentAsync,
13
13
  upgradeDeploymentAsync
14
- } from "./packager-tool-k2tj5mv2.js";
14
+ } from "./packager-tool-3n5e7fkr.js";
15
15
  import {
16
16
  SolutionInitError,
17
17
  solutionInitAsync
18
- } from "./packager-tool-xfg2cveb.js";
18
+ } from "./packager-tool-8t3sjyk9.js";
19
19
  import {
20
20
  GOVERNANCE_OPTION_INSTRUCTIONS,
21
21
  PackCommandService,
@@ -30,10 +30,10 @@ import {
30
30
  readSolutionFileAsUint8Array,
31
31
  resolveSdkLogLevel,
32
32
  validateGovernanceOptions
33
- } from "./packager-tool-p4kjbrrp.js";
33
+ } from "./packager-tool-2t1tzvbv.js";
34
34
  import {
35
35
  publishSolutionAsync
36
- } from "./packager-tool-af5hm3yv.js";
36
+ } from "./packager-tool-ah6zzb55.js";
37
37
  import {
38
38
  Configuration,
39
39
  PipelinesApi,
@@ -41,7 +41,7 @@ import {
41
41
  feedScopeInitOverride,
42
42
  listSelectablePublishLocations,
43
43
  resolveFeedScope
44
- } from "./packager-tool-vmskhsbr.js";
44
+ } from "./packager-tool-x907fvkz.js";
45
45
  import {
46
46
  Configuration as Configuration2,
47
47
  DeploymentActivationStatus,
@@ -49,15 +49,17 @@ import {
49
49
  PackagesApi,
50
50
  SearchApi,
51
51
  StudioWebIncompatibleProjectError,
52
+ buildSolutionUploadFailureOutput,
52
53
  bundleSolution,
53
54
  getProjectDebugStatus,
54
55
  importSolution,
55
56
  isDebugProvisioningSucceeded,
56
57
  isDebugProvisioningTerminal,
58
+ isSolutionUploadHttpError,
57
59
  overwriteSolution,
58
60
  searchPackageVersions,
59
61
  solutionExistsOnStudioWeb
60
- } from "./packager-tool-zwvkjsmc.js";
62
+ } from "./packager-tool-40vamz9y.js";
61
63
  import {
62
64
  Tokens,
63
65
  applyEntryPointEnhancementAsync,
@@ -81,13 +83,13 @@ import {
81
83
  syncAndLog,
82
84
  syncResourcesFromBindings,
83
85
  writeSolutionFile
84
- } from "./packager-tool-72345dw7.js";
86
+ } from "./packager-tool-pc4hb3pv.js";
85
87
  import {
86
88
  ToolResult
87
89
  } from "./packager-tool-nzghfa48.js";
88
90
  import {
89
91
  getSolutionAuthContext
90
- } from "./packager-tool-fjr8yn4g.js";
92
+ } from "./packager-tool-29bj4s4t.js";
91
93
  import {
92
94
  DEFAULT_PAGE_SIZE,
93
95
  Option,
@@ -120,7 +122,7 @@ import {
120
122
  unsupportedSolutionProjectType,
121
123
  updateUipxSolutionId,
122
124
  withCompleter
123
- } from "./packager-tool-sba5cptt.js";
125
+ } from "./packager-tool-1x1cc4qh.js";
124
126
  import {
125
127
  strFromU8,
126
128
  unzip,
@@ -133,7 +135,7 @@ import {
133
135
  var package_default = {
134
136
  name: "@uipath/solution-tool",
135
137
  license: "MIT",
136
- version: "1.202.0-preview.138",
138
+ version: "1.202.0-preview.140",
137
139
  description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
138
140
  repository: {
139
141
  type: "git",
@@ -5947,12 +5949,7 @@ var registerUploadCommand = (program) => {
5947
5949
  } else if (solutionId) {
5948
5950
  const [probeError, exists] = await catchError(solutionExistsOnStudioWeb(studioWebConfig, organizationName, solutionId));
5949
5951
  if (probeError) {
5950
- const errorMessage = await extractErrorMessage(probeError);
5951
- OutputFormatter.error({
5952
- Result: RESULTS.Failure,
5953
- Message: `Failed to check whether solution ${solutionId} exists on Studio Web: ${errorMessage}`,
5954
- Instructions: "Verify your login (uip login) and tenant access, then retry. If the problem persists, contact your UiPath administrator."
5955
- });
5952
+ OutputFormatter.error(await buildProbeFailureOutput(probeError, solutionId, loginStatus.identity));
5956
5953
  processContext.exit(1);
5957
5954
  return;
5958
5955
  }
@@ -5973,6 +5970,16 @@ var registerUploadCommand = (program) => {
5973
5970
  processContext.exit(1);
5974
5971
  return;
5975
5972
  }
5973
+ if (isSolutionUploadHttpError(uploadError)) {
5974
+ OutputFormatter.error(buildSolutionUploadFailureOutput(uploadError, {
5975
+ subject: "solution",
5976
+ importCheckHint: "Run 'uip solution pack' to confirm the solution packs cleanly.",
5977
+ identityType: loginStatus.identity?.type,
5978
+ clientId: loginStatus.identity?.clientId
5979
+ }));
5980
+ processContext.exit(1);
5981
+ return;
5982
+ }
5976
5983
  const errorMessage = await extractErrorMessage(uploadError);
5977
5984
  OutputFormatter.error({
5978
5985
  Result: RESULTS.Failure,
@@ -6033,8 +6040,56 @@ async function updateLocalSolutionId(fs, result, solutionId, uipxPath) {
6033
6040
  }
6034
6041
  return { returnedSolutionId, rewroteLocalSolutionId };
6035
6042
  }
6043
+ function httpStatusOf(error) {
6044
+ if (error instanceof Error && "status" in error) {
6045
+ const status = error.status;
6046
+ if (typeof status === "number")
6047
+ return status;
6048
+ }
6049
+ return;
6050
+ }
6051
+ function probeAuthChallengeOf(error) {
6052
+ if (error instanceof Error && "authChallenge" in error) {
6053
+ const challenge = error.authChallenge;
6054
+ if (challenge && typeof challenge === "object") {
6055
+ return challenge;
6056
+ }
6057
+ }
6058
+ return {};
6059
+ }
6036
6060
  function isSolutionNotFoundError(error) {
6037
- return error instanceof Error && "status" in error && error.status === 404;
6061
+ return httpStatusOf(error) === 404;
6062
+ }
6063
+ async function buildProbeFailureOutput(probeError, solutionId, identity) {
6064
+ const status = httpStatusOf(probeError);
6065
+ const isAuthRefusal = status === 401 || status === 403;
6066
+ const challenge = probeAuthChallengeOf(probeError);
6067
+ const message = isAuthRefusal ? probeError.message : await extractErrorMessage(probeError);
6068
+ const output = {
6069
+ Result: RESULTS.Failure,
6070
+ Message: `Failed to check whether solution ${solutionId} exists on Studio Web: ${message}`,
6071
+ Instructions: isAuthRefusal ? probeAuthInstructions(solutionId, identity, challenge) : "Verify your login (uip login) and tenant access, then retry. If the problem persists, contact your UiPath administrator."
6072
+ };
6073
+ if (status !== undefined) {
6074
+ output.Context = {
6075
+ httpStatus: status,
6076
+ stage: "probe-solution",
6077
+ method: "GET"
6078
+ };
6079
+ }
6080
+ if (status === 401 && identity?.type === "Application" && challenge.error !== "invalid_token") {
6081
+ output.ErrorCode = "permission_denied";
6082
+ }
6083
+ return output;
6084
+ }
6085
+ function probeAuthInstructions(solutionId, identity, challenge) {
6086
+ const quoted = challenge.description ? ` ("${challenge.description}")` : "";
6087
+ if (challenge.error === "invalid_token") {
6088
+ return `Studio Web rejected the credential itself with the reason ` + `\`invalid_token\`${quoted} while checking whether solution ` + `${solutionId} exists. That is the platform refusing this token ` + `rather than the grants behind it, so unlike a grants refusal this ` + `one is worth a fresh 'uip login' — or, in a pipeline, a newly ` + `minted client-credentials token. Check too that the token was ` + `issued for the organization and tenant being called. Nothing was ` + `uploaded.`;
6089
+ }
6090
+ const actor = identity?.type === "Application" ? `This session acts as external application ${identity.clientId ?? "(client id unknown)"}: it needs a Studio Web grant that can read a solution.` : identity?.type === "User" ? "This session acts as a user: check that your account has Studio Web access in this tenant." : "Check that this session may read a solution in Studio Web — an external application needs a StudioWebS2S grant, a user needs Studio Web access in the tenant.";
6091
+ const reported = challenge.error === "insufficient_scope" ? `Studio Web reported \`insufficient_scope\`${quoted}, so the token is good and its grants are not. ` : "";
6092
+ return `Studio Web refused the read, and the session is authenticated, so ` + `re-running 'uip login' mints the same token and fails the same way. ` + `${reported}${actor} Also confirm solution ${solutionId} lives in the organization ` + `and tenant this session logged into. Nothing was uploaded.`;
6038
6093
  }
6039
6094
  function outputError(message) {
6040
6095
  OutputFormatter.error({
@@ -6067,7 +6122,7 @@ var registerCommands = async (program) => {
6067
6122
  registerResourceCommand(program);
6068
6123
  registerDeleteCommand(program);
6069
6124
  if (isPreviewBuild()) {
6070
- const { registerListCommand } = await import("./list-4dbar53b.js");
6125
+ const { registerListCommand } = await import("./list-jqq1w9h5.js");
6071
6126
  registerListCommand(program);
6072
6127
  }
6073
6128
  registerFeedsCommand(program);
@@ -6075,4 +6130,4 @@ var registerCommands = async (program) => {
6075
6130
 
6076
6131
  export { metadata, registerCommands };
6077
6132
 
6078
- //# debugId=1EE3E1E687A49ED364756E2164756E21
6133
+ //# debugId=D3FFC293E996FA3164756E2164756E21
@@ -2,7 +2,7 @@ import {
2
2
  UsersApi,
3
3
  createApiClient,
4
4
  getSolutionAuthContext
5
- } from "./packager-tool-fjr8yn4g.js";
5
+ } from "./packager-tool-29bj4s4t.js";
6
6
  import {
7
7
  catchError,
8
8
  extractErrorMessage,
@@ -12,7 +12,7 @@ import {
12
12
  isGuid,
13
13
  logger,
14
14
  normalizeProjectType
15
- } from "./packager-tool-sba5cptt.js";
15
+ } from "./packager-tool-1x1cc4qh.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __toESM
@@ -15558,6 +15558,59 @@ class FileSystemFileStorageProviderFactory {
15558
15558
  }
15559
15559
  }
15560
15560
 
15561
+ // ../solution-sdk/src/resources/providers/resource-builder-logger.ts
15562
+ var PLACEHOLDER = /\{(\w+)\}|%[sdifoOj]/g;
15563
+ function render(value) {
15564
+ if (typeof value === "string")
15565
+ return value;
15566
+ if (value === null || value === undefined)
15567
+ return String(value);
15568
+ if (typeof value !== "object")
15569
+ return String(value);
15570
+ try {
15571
+ return JSON.stringify(value) ?? String(value);
15572
+ } catch {
15573
+ return String(value);
15574
+ }
15575
+ }
15576
+ function interpolate(message, args) {
15577
+ const fields = args[0] !== null && typeof args[0] === "object" && !Array.isArray(args[0]) ? args[0] : undefined;
15578
+ const consumed = new Set;
15579
+ let positional = 0;
15580
+ const filled = message.replace(PLACEHOLDER, (match, name) => {
15581
+ if (name !== undefined) {
15582
+ if (fields && name in fields) {
15583
+ consumed.add(0);
15584
+ return render(fields[name]);
15585
+ }
15586
+ return match;
15587
+ }
15588
+ const index = positional;
15589
+ positional += 1;
15590
+ if (index >= args.length)
15591
+ return match;
15592
+ consumed.add(index);
15593
+ return render(args[index]);
15594
+ });
15595
+ const extra = args.filter((_, index) => !consumed.has(index)).map(render).filter((text) => text.length > 0);
15596
+ return extra.length > 0 ? `${filled} ${extra.join(" ")}` : filled;
15597
+ }
15598
+
15599
+ class CliResourceBuilderLoggerFactory {
15600
+ create(target) {
15601
+ const name = typeof target === "string" ? target : target.name;
15602
+ const line = (message, args) => `[${name}] ${interpolate(message, args)}`;
15603
+ return {
15604
+ trace: (message, ...args) => logger.debug(line(message, args)),
15605
+ debug: (message, ...args) => logger.debug(line(message, args)),
15606
+ info: (message, ...args) => logger.info(line(message, args)),
15607
+ warn: (message, ...args) => logger.warn(line(message, args)),
15608
+ error: (message, error, ...args) => logger.error(error ? `${line(message, args)}: ${error.message}` : line(message, args)),
15609
+ fatal: (message, ...args) => logger.error(line(message, args))
15610
+ };
15611
+ }
15612
+ }
15613
+
15561
15614
  // ../solution-sdk/src/resources/providers/solution-access-provider.ts
15562
15615
  var ORG_SCOPED_SERVICES = new Set(["apps", "authz"]);
15563
15616
 
@@ -15626,7 +15679,7 @@ class SolutionAccessProvider {
15626
15679
 
15627
15680
  // ../solution-sdk/src/resources/providers/resource-builder-init.ts
15628
15681
  async function createResourceBuilderServices() {
15629
- return await createResourceBuilderConfiguration().addAccessProvider(new SolutionAccessProvider).addFileStorageProviderFactory(new FileSystemFileStorageProviderFactory).addArtifactResourceSpecEnhancer(new EntryPointSpecEnhancer).build();
15682
+ return await createResourceBuilderConfiguration().addAccessProvider(new SolutionAccessProvider).addFileStorageProviderFactory(new FileSystemFileStorageProviderFactory).addArtifactResourceSpecEnhancer(new EntryPointSpecEnhancer).addLoggerFactory(new CliResourceBuilderLoggerFactory).build();
15630
15683
  }
15631
15684
 
15632
15685
  // ../solution-sdk/src/resources/commands/project-utils.ts
@@ -16544,4 +16597,4 @@ async function resourceRefreshAsync(solutionPath = ".", options = {}) {
16544
16597
  }
16545
16598
  export { Tokens, models_BindingsResourceType, getResourceName, getFolderPathProperty, getResourceKindForBinding, applyEntryPointEnhancementAsync, createResourceBuilderServices, findProjectFile, isProjectManifestError, isMissingProjectTypeError, readProjectFile, readSolutionFile, resolveSolutionFilePath, writeSolutionFile, restoreSolutionFile, createProjectInSolutionBuilder, normalizeFolderPath, findMatchingLocalResource, addProjectArtifactsToSolutionAsync, assertSolutionManifest, syncResourcesFromBindings, findResourceByKeyInRcs, searchRcsResources, findResourceInRcs, createResourceKindMetadataResolver, createLocalResource, readUipxProjects, syncAndLog, resourceRefreshAsync };
16546
16599
 
16547
- //# debugId=C2523648CDA094EE64756E2164756E21
16600
+ //# debugId=1B68275F5B7B34D164756E2164756E21
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getAvailablePublishLocationsV2
3
- } from "./packager-tool-zwvkjsmc.js";
3
+ } from "./packager-tool-40vamz9y.js";
4
4
  import {
5
5
  PersonalWorkspacesApi,
6
6
  createOrchestratorConfig
7
- } from "./packager-tool-fjr8yn4g.js";
7
+ } from "./packager-tool-29bj4s4t.js";
8
8
  import {
9
9
  getLoginStatusAsync,
10
10
  getSdkUserAgentToken,
11
11
  installSdkUserAgentHeader
12
- } from "./packager-tool-sba5cptt.js";
12
+ } from "./packager-tool-1x1cc4qh.js";
13
13
 
14
14
  // ../pipelines-sdk/generated/src/runtime.ts
15
15
  var BASE_PATH = "https://alpha.uipath.com/uipattycyrhx/abizon_1/automationsolutions_".replace(/\/+$/, "");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerPackagerFactories
3
- } from "./packager-tool-9dx65z2d.js";
3
+ } from "./packager-tool-3bewrpq4.js";
4
4
  import"./packager-tool-nzghfa48.js";
5
5
  import"./packager-tool-dfrk01gn.js";
6
6
  import"./packager-tool-1de529jm.js";
package/dist/publish.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  publishSolutionAsync
3
- } from "./packager-tool-af5hm3yv.js";
4
- import"./packager-tool-vmskhsbr.js";
5
- import"./packager-tool-zwvkjsmc.js";
6
- import"./packager-tool-fjr8yn4g.js";
7
- import"./packager-tool-sba5cptt.js";
3
+ } from "./packager-tool-ah6zzb55.js";
4
+ import"./packager-tool-x907fvkz.js";
5
+ import"./packager-tool-40vamz9y.js";
6
+ import"./packager-tool-29bj4s4t.js";
7
+ import"./packager-tool-1x1cc4qh.js";
8
8
  import"./packager-tool-dfrk01gn.js";
9
9
  import"./packager-tool-1de529jm.js";
10
10
  export {
package/dist/resource.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resourceRefreshAsync
3
- } from "./packager-tool-72345dw7.js";
3
+ } from "./packager-tool-pc4hb3pv.js";
4
4
  import"./packager-tool-nzghfa48.js";
5
- import"./packager-tool-fjr8yn4g.js";
6
- import"./packager-tool-sba5cptt.js";
5
+ import"./packager-tool-29bj4s4t.js";
6
+ import"./packager-tool-1x1cc4qh.js";
7
7
  import"./packager-tool-dfrk01gn.js";
8
8
  import"./packager-tool-1de529jm.js";
9
9
  export {
@@ -212,6 +212,10 @@ By default dependencies resolve against every tenant feed the session can see.
212
212
 
213
213
  `pack` also takes `-n, --name <name>` to override the package name (it defaults to the solution folder or `.uis` file name) and `-v, --version <version>` (defaults to `1.0.0`).
214
214
 
215
+ `--name` names the **solution archive only**. Each member project keeps its own NuGet id, anchored on the solution's `.uipx` name, so packing one solution twice under two names produces two archives holding members with the same ids — which is what lets an upgrade land on the same feed entries. Renaming the solution *directory* does not move member ids either; the `.uipx` travels with a checkout.
216
+
217
+ `--author` and `--description` apply to every member that declares neither. A project that declares its own `Description` / `Author` in its project file keeps them, so per-project provenance survives a solution pack; only when nothing declares either do the `UiPath` / `Created by UiPath` defaults apply.
218
+
215
219
  `publish` goes to the tenant feed by default:
216
220
 
217
221
  ```bash
@@ -263,6 +267,8 @@ uip solution delete <solution-id> --yes # remove a solution from Studio Web (
263
267
 
264
268
  `Data.Action` is `Imported` or `Overwritten`, so you can tell which ran. `--force` skips the existence check and overwrites directly; it is not normally needed, it fails rather than importing if that solution is gone, and it has no effect when no `SolutionId` is bundled (the upload imports as new). To upload a copy as an unrelated cloud solution instead of updating, scaffold a fresh solution with `uip solution init`, or replace the `SolutionId` in the local `.uipx` with a fresh GUID and re-run upload (removing the field entirely fails `.uipx` validation).
265
269
 
270
+ If Studio Web refuses the upload with 401 or 403, read `Instructions` before you do anything — the answer is one of two, and they are opposites. In almost every case do **not** re-run `uip login`: the CLI checks the session and its token expiry before it calls, so the token was valid and re-authenticating produces the same one. The failure is then about what the acting identity may do in Studio Web (for a CI pipeline: the external application's `StudioWebS2S` grants) or about the tenant the bundled `SolutionId` belongs to, and an application 401 is reported as `ErrorCode: permission_denied` rather than `authentication_required`. The exception is when `Instructions` quote `invalid_token`: that is Studio Web rejecting the credential itself rather than the permissions behind it, so a fresh `uip login` — or a newly minted client-credentials token — is worth trying, and the error code stays `authentication_required`.
271
+
266
272
  `download` writes the `.uis` archive and nothing else — extraction is opt-in. Pass `--extract` to also unzip it into a sibling directory named after the archive; that directory is a working solution tree, with the `.uipx` manifest at its root. `--extract` also drops `AGENTS.md` and `CLAUDE.md` there so an agent picking the solution up has the same briefing `uip solution init` writes. It only fills gaps: a file the archive already carried is left alone, and the paths actually written come back in `Data.BriefingFiles`. Without `--extract` you get the zip only, and no briefing files — there is no solution directory to put them in.
267
273
 
268
274
  Two more verbs act on a **cloud** solution project rather than the local tree — do not confuse them with the local `projects add` / `import` / `remove` / `list` membership commands above:
@@ -447,6 +453,8 @@ Adjacent groups commonly used alongside solutions:
447
453
  | Symptom | First thing to check |
448
454
  |---|---|
449
455
  | `Not authenticated` / 401 | `uip login`, then re-run |
456
+ | `upload` fails with 401/403 and `ErrorCode: permission_denied` | Not a login problem — the token was valid when the call went out, so `uip login` mints the same one. Read `Instructions`: for a session on an external application, check that the app has the Studio Web (`StudioWebS2S`) grants, not only the Orchestrator and Solutions ones; for a user, check Studio Web access in the tenant. Then confirm the `SolutionId` in the `.uipx` belongs to the tenant you are logged into — an id this session cannot see at all is reported separately, as nothing to overwrite, so a refusal here points at the grants first |
457
+ | `upload` fails with 401 and `Instructions` quote `invalid_token` | The opposite case: Studio Web rejected the credential itself, not the grants behind it. Re-run `uip login`, or mint a fresh client-credentials token in a pipeline. Check too that the token was issued for the organization and tenant being called — one minted against another environment or audience is refused this way. The error code stays `authentication_required` |
450
458
  | Command targets the wrong tenant | `uip login tenant set <tenant>`; verify with `uip login status` |
451
459
  | Pack succeeds but publish 409s | Version conflict — bump the version (`uip solution pack . ./out -v <new-version>`) or delete the colliding version with `uip solution packages delete <package-name> <version> --yes` (only if intentional; `--yes` required) |
452
460
  | `deploy run` stops because the package is already deployed | Upgrade it in place with `uip solution deploy upgrade <deployment-key>` (running `deploy run` again does not upgrade it), or `uip solution deploy uninstall <name> --yes` first, or pass `--yes` to create a second, separate deployment |
package/dist/tool.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-htp0xd7c.js";
5
- import"./packager-tool-vxthsps3.js";
6
- import"./packager-tool-k2tj5mv2.js";
7
- import"./packager-tool-xfg2cveb.js";
8
- import"./packager-tool-p4kjbrrp.js";
9
- import"./packager-tool-9dx65z2d.js";
10
- import"./packager-tool-af5hm3yv.js";
11
- import"./packager-tool-vmskhsbr.js";
12
- import"./packager-tool-zwvkjsmc.js";
13
- import"./packager-tool-72345dw7.js";
4
+ } from "./packager-tool-kpybyt0p.js";
5
+ import"./packager-tool-6bhx9vfz.js";
6
+ import"./packager-tool-3n5e7fkr.js";
7
+ import"./packager-tool-8t3sjyk9.js";
8
+ import"./packager-tool-2t1tzvbv.js";
9
+ import"./packager-tool-3bewrpq4.js";
10
+ import"./packager-tool-ah6zzb55.js";
11
+ import"./packager-tool-x907fvkz.js";
12
+ import"./packager-tool-40vamz9y.js";
13
+ import"./packager-tool-pc4hb3pv.js";
14
14
  import"./packager-tool-nzghfa48.js";
15
- import"./packager-tool-fjr8yn4g.js";
16
- import"./packager-tool-sba5cptt.js";
15
+ import"./packager-tool-29bj4s4t.js";
16
+ import"./packager-tool-1x1cc4qh.js";
17
17
  import"./packager-tool-dfrk01gn.js";
18
18
  import"./packager-tool-1de529jm.js";
19
19
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/solution-tool",
3
3
  "license": "MIT",
4
- "version": "1.202.0-preview.138",
4
+ "version": "1.202.0-preview.140",
5
5
  "description": "Create, pack, publish, and deploy UiPath Automation Solutions.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,5 +47,5 @@
47
47
  "dist"
48
48
  ],
49
49
  "private": false,
50
- "gitHead": "46372d5c4c4ae9352e9457a99e9d5efc1890cb48"
50
+ "gitHead": "1861498d8a158a710a718c04614523ba59c93781"
51
51
  }