@uipath/agent-tool 1.202.0-preview.137 → 1.202.0-preview.138

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentTool
3
- } from "./packager-tool-vkv0j95b.js";
3
+ } from "./packager-tool-pst3whq5.js";
4
4
  import"./packager-tool-0srzfhdr.js";
5
5
  import"./packager-tool-b098y4a2.js";
6
6
  import"./packager-tool-1yh8g550.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AgentDebugCancelledError,
3
3
  AgentDebugService
4
- } from "./packager-tool-cm3tggtv.js";
4
+ } from "./packager-tool-093sw7vs.js";
5
5
  import"./packager-tool-d1dzjvm7.js";
6
6
  import"./packager-tool-b098y4a2.js";
7
7
  import"./packager-tool-1yh8g550.js";
@@ -3232,8 +3232,7 @@ class ToolsFactoryRepository {
3232
3232
  getProjectToolFactory(projectType) {
3233
3233
  const factory = this.projectFactoryMap.get(projectType);
3234
3234
  if (!factory) {
3235
- const known = [...this.projectFactoryMap.keys()].join(", ");
3236
- throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it. ` + `Project types that can be packed: ${known || "none"}.`);
3235
+ throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it.`);
3237
3236
  }
3238
3237
  return factory;
3239
3238
  }
@@ -16538,6 +16537,26 @@ async function findProjectFile(projectDir) {
16538
16537
  null
16539
16538
  ];
16540
16539
  }
16540
+
16541
+ class ProjectManifestError extends Error {
16542
+ __projectManifestError = true;
16543
+ reason;
16544
+ constructor(message, reason) {
16545
+ super(message);
16546
+ this.name = "ProjectManifestError";
16547
+ this.reason = reason;
16548
+ }
16549
+ }
16550
+ function isProjectManifestError(error) {
16551
+ return !!error && typeof error === "object" && error.__projectManifestError === true;
16552
+ }
16553
+ function isMissingProjectTypeError(error) {
16554
+ return isProjectManifestError(error) && error.reason === "no-project-type";
16555
+ }
16556
+ function lastPathSegment(filePath) {
16557
+ const parts = filePath.split(/[/\\]/);
16558
+ return parts[parts.length - 1] ?? filePath;
16559
+ }
16541
16560
  async function readProjectFile(filePath, useProjectJson) {
16542
16561
  const fs = getFileSystem();
16543
16562
  const [readError, rawContent] = await catchError(fs.readFile(filePath, "utf-8"));
@@ -16547,7 +16566,7 @@ async function readProjectFile(filePath, useProjectJson) {
16547
16566
  const [parseError, content] = catchError(() => JSON.parse(rawContent));
16548
16567
  if (parseError) {
16549
16568
  return [
16550
- new Error(`Invalid JSON in project file: ${parseError.message}`),
16569
+ new ProjectManifestError(`Invalid JSON in project file: ${parseError.message}`, "invalid-json"),
16551
16570
  null
16552
16571
  ];
16553
16572
  }
@@ -16562,7 +16581,16 @@ async function readProjectFile(filePath, useProjectJson) {
16562
16581
  }
16563
16582
  ];
16564
16583
  }
16565
- return [new Error(`ProjectType not found in ${filePath}`), null];
16584
+ if (lastPathSegment(filePath) === "uipath.json") {
16585
+ return [
16586
+ new ProjectManifestError(`${filePath} has no 'ProjectType'. A uipath.json is only read as a code-first Functions project, which also needs a 'functions' entry. Other project types are registered from project.uiproj or project.json, not from uipath.json.`, "no-project-type"),
16587
+ null
16588
+ ];
16589
+ }
16590
+ return [
16591
+ new ProjectManifestError(`ProjectType not found in ${filePath}`, "no-project-type"),
16592
+ null
16593
+ ];
16566
16594
  }
16567
16595
  return [null, { content, projectType: normalizeProjectType(projectType) }];
16568
16596
  }
@@ -17400,6 +17428,7 @@ async function resourceRefreshAsync(solutionPath = ".", options = {}) {
17400
17428
  }
17401
17429
  export {
17402
17430
  EntryPointSpecEnhancer,
17431
+ ProjectManifestError,
17403
17432
  addProjectArtifactsToSolutionAsync,
17404
17433
  applyEntryPointEnhancementAsync,
17405
17434
  assertSolutionManifest,
@@ -17413,6 +17442,8 @@ export {
17413
17442
  findProjectFile,
17414
17443
  findResourceByKeyInRcs,
17415
17444
  findResourceInRcs,
17445
+ isMissingProjectTypeError,
17446
+ isProjectManifestError,
17416
17447
  normalizeFolderPath,
17417
17448
  readProjectFile,
17418
17449
  readSolutionFile,
@@ -17428,4 +17459,4 @@ export {
17428
17459
  writeSolutionFile
17429
17460
  };
17430
17461
 
17431
- //# debugId=7C2DE8A539AE06A564756E2164756E21
17462
+ //# debugId=D95D95BCB702789864756E2164756E21
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-r2h06hxm.js";
5
+ } from "./packager-tool-zr68gy0n.js";
6
6
  import"./packager-tool-a42jnpy5.js";
7
7
  import"./packager-tool-c23zrhj8.js";
8
- import"./packager-tool-cm3tggtv.js";
8
+ import"./packager-tool-093sw7vs.js";
9
9
  import {
10
10
  Command
11
11
  } from "./packager-tool-d1dzjvm7.js";
@@ -2971,7 +2971,7 @@ function querystringSingleKey2(key, value, keyPrefix = "") {
2971
2971
  var package_default = {
2972
2972
  name: "@uipath/solution-sdk",
2973
2973
  license: "MIT",
2974
- version: "1.202.0-preview.137",
2974
+ version: "1.202.0-preview.138",
2975
2975
  repository: {
2976
2976
  type: "git",
2977
2977
  url: "https://github.com/UiPath/cli.git",
@@ -4176,4 +4176,4 @@ function parseOutput(outputArguments) {
4176
4176
 
4177
4177
  export { StudioWebIncompatibleProjectError, isSolutionUploadHttpError, buildSolutionUploadFailureOutput, migrateLegacyToolGuardrailPolicies, AgentProjectService, resolveStudioWebConfig, AgentLocalWorkspaceEvalPreparer, AgentDebugCancelledError, AgentDebugService };
4178
4178
 
4179
- //# debugId=9C2CEDDB30519B5264756E2164756E21
4179
+ //# debugId=218744BFB32146DD64756E2164756E21
@@ -2956,8 +2956,7 @@ class ToolsFactoryRepository {
2956
2956
  getProjectToolFactory(projectType) {
2957
2957
  const factory = this.projectFactoryMap.get(projectType);
2958
2958
  if (!factory) {
2959
- const known = [...this.projectFactoryMap.keys()].join(", ");
2960
- throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it. ` + `Project types that can be packed: ${known || "none"}.`);
2959
+ throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it.`);
2961
2960
  }
2962
2961
  return factory;
2963
2962
  }
@@ -14676,4 +14675,4 @@ var AgentTool = class extends ProjectTool {
14676
14675
 
14677
14676
  export { ProjectTypes, toolsFactoryRepository, AgentTool };
14678
14677
 
14679
- //# debugId=FF872FB04A5F6BBD64756E2164756E21
14678
+ //# debugId=17A0B9112E989BBA64756E2164756E21
@@ -13,7 +13,7 @@ import {
13
13
  isSolutionUploadHttpError,
14
14
  migrateLegacyToolGuardrailPolicies,
15
15
  resolveStudioWebConfig
16
- } from "./packager-tool-cm3tggtv.js";
16
+ } from "./packager-tool-093sw7vs.js";
17
17
  import {
18
18
  OutputFormatter,
19
19
  RESULTS,
@@ -6989,7 +6989,7 @@ var require_index_cjs = __commonJS(function(exports, module) {
6989
6989
  var package_default = {
6990
6990
  name: "@uipath/agent-tool",
6991
6991
  license: "MIT",
6992
- version: "1.202.0-preview.137",
6992
+ version: "1.202.0-preview.138",
6993
6993
  description: "cli plugin for creating and managing UiPath low-code agents",
6994
6994
  private: false,
6995
6995
  repository: {
@@ -7432,7 +7432,7 @@ class VoidApiResponse {
7432
7432
  var package_default2 = {
7433
7433
  name: "@uipath/agent-sdk",
7434
7434
  license: "MIT",
7435
- version: "1.202.0-preview.137",
7435
+ version: "1.202.0-preview.138",
7436
7436
  description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
7437
7437
  repository: {
7438
7438
  type: "git",
@@ -12793,7 +12793,7 @@ var registerGuardrailCommands = (program) => {
12793
12793
 
12794
12794
  // src/services/project-artifacts.ts
12795
12795
  async function ensureProjectArtifacts(args) {
12796
- const { addProjectArtifactsToSolutionAsync } = await import("./index-tdjhvdzh.js");
12796
+ const { addProjectArtifactsToSolutionAsync } = await import("./index-ttrh2gr5.js");
12797
12797
  return addProjectArtifactsToSolutionAsync(args);
12798
12798
  }
12799
12799
 
@@ -35285,7 +35285,7 @@ class TextApiResponse {
35285
35285
  var package_default3 = {
35286
35286
  name: "@uipath/integrationservice-sdk",
35287
35287
  license: "MIT",
35288
- version: "1.202.0-preview.137",
35288
+ version: "1.202.0-preview.138",
35289
35289
  repository: {
35290
35290
  type: "git",
35291
35291
  url: "https://github.com/UiPath/cli.git",
@@ -45222,4 +45222,4 @@ var registerCommands = async (program) => {
45222
45222
 
45223
45223
  export { metadata, registerCommands };
45224
45224
 
45225
- //# debugId=09FFD106A6B32FAF64756E2164756E21
45225
+ //# debugId=669594ECC629ACED64756E2164756E21
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ProjectTypes,
3
3
  toolsFactoryRepository
4
- } from "./packager-tool-vkv0j95b.js";
4
+ } from "./packager-tool-pst3whq5.js";
5
5
  import"./packager-tool-0srzfhdr.js";
6
6
  import"./packager-tool-b098y4a2.js";
7
7
  import {
@@ -14,7 +14,7 @@ var AgentToolFactory = class {
14
14
  this.supportedTypes = [ProjectTypes.Agent];
15
15
  }
16
16
  async createAsync(logger, fileSystem) {
17
- const { AgentTool: AgentTool2 } = await import("./agent-tool-OK5DK57D-hw5d866f.js");
17
+ const { AgentTool: AgentTool2 } = await import("./agent-tool-OK5DK57D-zkbmhnmd.js");
18
18
  return new AgentTool2(fileSystem, logger);
19
19
  }
20
20
  };
package/dist/tool.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-r2h06hxm.js";
4
+ } from "./packager-tool-zr68gy0n.js";
5
5
  import"./packager-tool-a42jnpy5.js";
6
6
  import"./packager-tool-c23zrhj8.js";
7
- import"./packager-tool-cm3tggtv.js";
7
+ import"./packager-tool-093sw7vs.js";
8
8
  import"./packager-tool-d1dzjvm7.js";
9
9
  import"./packager-tool-0srzfhdr.js";
10
10
  import"./packager-tool-b098y4a2.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/agent-tool",
3
3
  "license": "MIT",
4
- "version": "1.202.0-preview.137",
4
+ "version": "1.202.0-preview.138",
5
5
  "description": "cli plugin for creating and managing UiPath low-code agents",
6
6
  "private": false,
7
7
  "repository": {
@@ -28,5 +28,5 @@
28
28
  "files": [
29
29
  "dist"
30
30
  ],
31
- "gitHead": "bbb20a6d3501afc3435a92af9ae2e9f7ab2e34f6"
31
+ "gitHead": "46372d5c4c4ae9352e9457a99e9d5efc1890cb48"
32
32
  }