@uipath/case-tool 1.201.0-preview.115 → 1.201.0-preview.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/{authoring-k4xzp7fh.js → authoring-aaaqwck3.js} +64 -20
  3. package/dist/case-pack-service-96tjknaz.js +119 -0
  4. package/dist/{de-3RMZHIP6-1na18a74.js → de-K6MLR24N-00fjz82b.js} +474 -51
  5. package/dist/{de-LVBY3VVG-tc58p3x6.js → de-WMKOGI7B-r1821wpe.js} +16 -7
  6. package/dist/{en-JGJNQYMG-xq29xvhk.js → en-ILA4HPE5-fhwvq92r.js} +264 -4
  7. package/dist/{en-4UFXRW7N-mqabr9tf.js → en-X4DLPKLJ-dt1wtdm7.js} +17 -5
  8. package/dist/{es-CI4AE5B5-55sgqk64.js → es-BVPGJUWA-9gk2g9yb.js} +16 -7
  9. package/dist/{es-EYHYM5C4-3bajghda.js → es-HTQSD352-m9rr3f0g.js} +468 -45
  10. package/dist/{es-MX-QSQP2KWV-qvgkwvz2.js → es-MX-FOX525CG-87g500gr.js} +474 -51
  11. package/dist/{es-MX-OLZNAYY5-30cmv1dx.js → es-MX-U6YL5KQX-ynwxdjr8.js} +16 -7
  12. package/dist/{fr-FXFJQRD3-rfztd3e5.js → fr-54THJ4QH-d6ezjbhw.js} +473 -50
  13. package/dist/{fr-CCN6ZO5E-x2akzsjt.js → fr-EKTTDR7Z-bmpwp31r.js} +16 -7
  14. package/dist/{index-mrht9sxd.js → index-8bsngk9y.js} +101787 -90880
  15. package/dist/index-cncq089f.js +16491 -0
  16. package/dist/{index-w23k88b5.js → index-p50kx6jv.js} +202 -64
  17. package/dist/index.js +10 -6
  18. package/dist/{ja-G7NJYQ42-ve4gadd7.js → ja-MHUPLSWO-3qwy4jc0.js} +470 -47
  19. package/dist/{ja-O2NEV5D6-nt9rhd8c.js → ja-Y2YBTXNN-96cvy5av.js} +16 -7
  20. package/dist/{ko-7XWV2SEQ-chk3y7aj.js → ko-S33XAV26-cxf4dn2t.js} +16 -7
  21. package/dist/{ko-QDHECDTM-zmbqs9pr.js → ko-XPJTXIKK-w1hs4px7.js} +467 -44
  22. package/dist/{packager-tool-973f0r2g.js → packager-tool-1yy9x4vk.js} +17 -5
  23. package/dist/{packager-tool-pj8j9a59.js → packager-tool-8f28ypk9.js} +72533 -91227
  24. package/dist/packager-tool-b098y4a2.js +646 -0
  25. package/dist/{packager-tool-kvgt1s4z.js → packager-tool-cqrsre00.js} +282 -22
  26. package/dist/packager-tool-nhnf1ap2.js +13607 -0
  27. package/dist/packager-tool-w3h8xrnv.js +472 -0
  28. package/dist/packager-tool-we1phz71.js +41 -0
  29. package/dist/{packager-tool-8eennarq.js → packager-tool-wvqz81mx.js} +52 -690
  30. package/dist/packager-tool-zqa5k9f7.js +8774 -0
  31. package/dist/{packager-tool-pcd0vhvd.js → packager-tool-zx48pq4v.js} +646 -565
  32. package/dist/packager-tool.js +5 -3
  33. package/dist/{pt-VXJT4WUJ-nwkc9k2p.js → pt-4JEPEAST-40npwxyw.js} +471 -48
  34. package/dist/{pt-BR-Z4J3LEEO-cf33d2zv.js → pt-BR-JO45SCNI-4kbfnzc4.js} +16 -7
  35. package/dist/{pt-BR-SADBLGXA-yd89fdy2.js → pt-BR-TV7NR3ID-vgd26pj1.js} +470 -47
  36. package/dist/{pt-CRSN3TCU-txxbbcxm.js → pt-W3NA4LIZ-f02gapvs.js} +16 -7
  37. package/dist/{ro-7JHKFGCH-hbtkeqdr.js → ro-RKJ74FV3-qn0ey39v.js} +473 -50
  38. package/dist/{ro-WMQEVD7D-6mtq0e6b.js → ro-WLKX6HF5-fcbe2zz8.js} +16 -7
  39. package/dist/tool.js +10 -6
  40. package/dist/{tr-UCMB7W3T-xmxp2naq.js → tr-3U2W2XCA-zg3zcmq3.js} +15 -6
  41. package/dist/{tr-Q6IHBFK7-zs9rsm1b.js → tr-X7R6GQNB-shwv16dz.js} +482 -59
  42. package/dist/{zh-CN-3BPA3WIX-c5ts2m5v.js → zh-CN-FEZ24J4A-q5b5x20w.js} +470 -47
  43. package/dist/{zh-CN-2QOHEFC5-ryjb2byk.js → zh-CN-IPZYQR3P-1h76csc4.js} +16 -7
  44. package/dist/{zh-TW-QCJEQC5S-b1v637hd.js → zh-TW-GKSCT6NW-4n1yfre0.js} +464 -41
  45. package/dist/{zh-TW-Q5QSSTS6-6y7yjbbn.js → zh-TW-YPVSQVGT-wbybwpwt.js} +16 -7
  46. package/package.json +2 -2
package/README.md CHANGED
@@ -96,7 +96,7 @@ field:in=value1|value2 field matches any of the values
96
96
  field1=v1,field2=v2 multiple conditions (AND logic)
97
97
  ```
98
98
 
99
- Filterable fields: `name`, `description`, `category`, `tags`
99
+ Filterable fields: `name`, `title`, `description`, `category`, `connectorKey`, `systemName`, `tags`
100
100
 
101
101
  **Examples:**
102
102
 
@@ -1,10 +1,13 @@
1
+ import {
2
+ resolveMaestroRegistry
3
+ } from "./packager-tool-we1phz71.js";
1
4
  import {
2
5
  OutputFormatter,
3
6
  RESULTS,
4
7
  getOutputFormat,
5
8
  getOutputFormatExplicit,
6
9
  processContext
7
- } from "./packager-tool-pcd0vhvd.js";
10
+ } from "./packager-tool-zx48pq4v.js";
8
11
  import {
9
12
  getFileSystem
10
13
  } from "./packager-tool-1cb0d5e0.js";
@@ -74,37 +77,70 @@ async function runChild(cliPath, args, cwd, label) {
74
77
  });
75
78
  });
76
79
  }
77
- async function delegateToFlowSdk({
78
- family,
79
- commandVerb,
80
- sdkVerb = commandVerb,
81
- argv,
82
- cwd
83
- }) {
80
+ async function resolveFlowSdk(workspace, label) {
84
81
  const fs = getFileSystem();
85
- const workspace = cwd ?? fs.env.cwd();
86
- const label = commandLabel(family, commandVerb);
87
82
  let packagePath;
88
83
  try {
89
84
  packagePath = createRequire(import.meta.url).resolve("@uipath/flow-sdk/package.json", { paths: [workspace] });
90
85
  } catch {
91
- return fail(`${label}: @uipath/flow-sdk is not installed in this workspace.`, "Add it to this project's dependencies: npm install --save-dev @uipath/flow-sdk (requires an .npmrc routing @uipath to https://npm.pkg.github.com/).");
86
+ return {
87
+ ok: false,
88
+ message: `${label}: @uipath/flow-sdk is not installed in this workspace.`,
89
+ instructions: "Add it to this project's dependencies: npm install --save-dev @uipath/flow-sdk (requires an .npmrc routing @uipath to https://npm.pkg.github.com/)."
90
+ };
92
91
  }
93
92
  const packageText = await fs.readFile(packagePath, "utf-8");
94
93
  if (packageText === null) {
95
- return fail(`${label}: could not read ${packagePath}.`, "Reinstall @uipath/flow-sdk, then retry.");
94
+ return {
95
+ ok: false,
96
+ message: `${label}: could not read ${packagePath}.`,
97
+ instructions: "Reinstall @uipath/flow-sdk, then retry."
98
+ };
96
99
  }
97
- let version;
100
+ let version = "";
101
+ let bin = {};
98
102
  try {
99
103
  const parsed = JSON.parse(packageText);
100
104
  version = typeof parsed.version === "string" ? parsed.version : "";
105
+ if (parsed.bin && typeof parsed.bin === "object") {
106
+ for (const [name, target] of Object.entries(parsed.bin)) {
107
+ if (typeof target === "string")
108
+ bin[name] = target;
109
+ }
110
+ }
101
111
  } catch {
102
112
  version = "";
113
+ bin = {};
103
114
  }
104
115
  if (!versionMeetsFloor(version, MINIMUM_FLOW_SDK_VERSION)) {
105
- return fail(`${label}: found @uipath/flow-sdk ${version || "with no valid version"}; need >= ${MINIMUM_FLOW_SDK_VERSION}.`, "Run: npm install --save-dev @uipath/flow-sdk@latest.");
116
+ return {
117
+ ok: false,
118
+ message: `${label}: found @uipath/flow-sdk ${version || "with no valid version"}; need >= ${MINIMUM_FLOW_SDK_VERSION}.`,
119
+ instructions: "Run: npm install --save-dev @uipath/flow-sdk@latest."
120
+ };
121
+ }
122
+ return {
123
+ ok: true,
124
+ packageDir: fs.path.dirname(packagePath),
125
+ version,
126
+ bin
127
+ };
128
+ }
129
+ async function delegateToFlowSdk({
130
+ family,
131
+ commandVerb,
132
+ sdkVerb = commandVerb,
133
+ argv,
134
+ cwd
135
+ }) {
136
+ const fs = getFileSystem();
137
+ const workspace = cwd ?? fs.env.cwd();
138
+ const label = commandLabel(family, commandVerb);
139
+ const resolution = await resolveFlowSdk(workspace, label);
140
+ if (!resolution.ok) {
141
+ return fail(resolution.message, resolution.instructions);
106
142
  }
107
- const cliPath = fs.path.join(fs.path.dirname(packagePath), "dist", "cli", "index.js");
143
+ const cliPath = fs.path.join(resolution.packageDir, "dist", "cli", "index.js");
108
144
  return await runChild(cliPath, [family, sdkVerb, ...argv], workspace, label);
109
145
  }
110
146
 
@@ -122,6 +158,14 @@ function sdkCliExample(description, command, message) {
122
158
  ];
123
159
  }
124
160
 
161
+ // ../builder-sdk/src/library-option.ts
162
+ async function resolveLibraryOption(explicit) {
163
+ if (explicit !== undefined)
164
+ return explicit;
165
+ const registry = await resolveMaestroRegistry();
166
+ return registry?.libraryJson;
167
+ }
168
+
125
169
  // ../builder-sdk/src/commands/check.ts
126
170
  var CHECK_EXAMPLES = {
127
171
  flow: { input: "Order.flow.ts", message: "✓ no issues" },
@@ -131,7 +175,7 @@ var CHECK_EXAMPLES = {
131
175
  var registerCheckCommand = (program, family) => {
132
176
  const command = program.previewCommand("check <input>").description("Run the authoring-time SDK analyzer on source or an artifact.").option("--source", "Check authored TypeScript").option("--compiled", "Check the compiled artifact");
133
177
  if (family === "flow") {
134
- command.option("--library <dir>", "Connector library directory (source checks also honor $FLOW_SDK_LIBRARY_JSON)").option("--json", "Print compiled-check diagnostics as JSON").option("--uip", "Resolve missing schemas with the UiPath CLI").option("--max-errors <count>", "Stop after this many compiled-check errors").option("--script-determinism", "Check script blocks for non-deterministic calls").option("--quiet", "Suppress warnings and information");
178
+ command.option("--library <dir>", "Connector library directory (defaults to the pulled registry; source checks also honor $FLOW_SDK_LIBRARY_JSON)").option("--json", "Print compiled-check diagnostics as JSON").option("--uip", "Resolve missing schemas with the UiPath CLI").option("--max-errors <count>", "Stop after this many compiled-check errors").option("--script-determinism", "Check script blocks for non-deterministic calls").option("--quiet", "Suppress warnings and information");
135
179
  }
136
180
  const example = CHECK_EXAMPLES[family];
137
181
  command.examples(sdkCliExample(`Check a ${family} source file before compiling it`, `uip maestro ${family} check ${example.input} --source`, example.message)).trackedAction(processContext, async (input, options) => {
@@ -140,7 +184,7 @@ var registerCheckCommand = (program, family) => {
140
184
  argv.push("--source");
141
185
  if (options.compiled)
142
186
  argv.push("--compiled");
143
- addValue(argv, "--library", options.library);
187
+ addValue(argv, "--library", await resolveLibraryOption(options.library));
144
188
  if (options.json || getOutputFormatExplicit() && getOutputFormat() === "json")
145
189
  argv.push("--json");
146
190
  if (options.uip)
@@ -178,7 +222,7 @@ var COMPILE_EXAMPLES = {
178
222
  }
179
223
  };
180
224
  var registerCompileCommand = (program, family) => {
181
- const command = program.previewCommand("compile <source>").description(`Compile authored TypeScript to a ${family} artifact.`).option("-o, --output <file>", "Output artifact path").option("--library <dir>", "Connector library directory").option("--bindings <file>", "bindings.json path");
225
+ const command = program.previewCommand("compile <source>").description(`Compile authored TypeScript to a ${family} artifact.`).option("-o, --output <file>", "Output artifact path").option("--library <dir>", "Connector library directory (defaults to the pulled registry)").option("--bindings <file>", "bindings.json path");
182
226
  if (family !== "bpmn") {
183
227
  command.option("--connectors-local <dir>", "Connection-resolved connector overlay");
184
228
  }
@@ -189,7 +233,7 @@ var registerCompileCommand = (program, family) => {
189
233
  command.examples(sdkCliExample(`Compile a ${family} source file to an artifact`, `uip maestro ${family} compile ${example.source} --output ${example.output}`, example.message)).trackedAction(processContext, async (source, options) => {
190
234
  const argv = [source];
191
235
  addValue(argv, "-o", options.output);
192
- addValue(argv, "--library", options.library);
236
+ addValue(argv, "--library", await resolveLibraryOption(options.library));
193
237
  addValue(argv, "--bindings", options.bindings);
194
238
  addValue(argv, "--connectors-local", options.connectorsLocal);
195
239
  if (options.check === false)
@@ -249,4 +293,4 @@ export {
249
293
  registerCaseAuthoringCommands
250
294
  };
251
295
 
252
- //# debugId=15A8978EA34C2B0F64756E2164756E21
296
+ //# debugId=847E8056C2AECFF464756E2164756E21
@@ -0,0 +1,119 @@
1
+ import {
2
+ NugetPackager,
3
+ ensureProjectId
4
+ } from "./packager-tool-wvqz81mx.js";
5
+ import {
6
+ VALID_PACKAGE_NAME_REGEX,
7
+ loadCaseSchemaAsync
8
+ } from "./packager-tool-8f28ypk9.js";
9
+ import"./packager-tool-we1phz71.js";
10
+ import"./packager-tool-zqa5k9f7.js";
11
+ import {
12
+ catchError,
13
+ logger,
14
+ mapPackageMetadataOptions
15
+ } from "./packager-tool-zx48pq4v.js";
16
+ import"./packager-tool-cqrsre00.js";
17
+ import"./packager-tool-sc961w0q.js";
18
+ import"./packager-tool-1yy9x4vk.js";
19
+ import"./packager-tool-c23zrhj8.js";
20
+ import"./packager-tool-b098y4a2.js";
21
+ import"./packager-tool-9qecd4wb.js";
22
+ import"./packager-tool-qa9gftnj.js";
23
+ import {
24
+ getFileSystem
25
+ } from "./packager-tool-1cb0d5e0.js";
26
+ import"./packager-tool-5arsyj36.js";
27
+ import"./packager-tool-wckvcay0.js";
28
+
29
+ // src/services/case-pack-service.ts
30
+ class CasePackService {
31
+ fs;
32
+ constructor() {
33
+ this.fs = getFileSystem();
34
+ }
35
+ async execute(projectPath, options) {
36
+ const absoluteProjectPath = this.fs.path.resolve(projectPath);
37
+ const absoluteOutputPath = this.fs.path.resolve(options.output);
38
+ const packageName = options.name || this.fs.path.basename(projectPath);
39
+ if (!VALID_PACKAGE_NAME_REGEX.test(packageName)) {
40
+ throw new Error(`Invalid package name "${packageName}". Package name can only contain letters, numbers, dots (.), underscores (_), and hyphens (-).`);
41
+ }
42
+ logger.info(`
43
+ Packing Case project...
44
+ `);
45
+ logger.info("Details:");
46
+ logger.info(` Project: ${absoluteProjectPath}`);
47
+ logger.info(` Package: ${packageName}@${options.version}`);
48
+ logger.info(` Output: ${absoluteOutputPath}`);
49
+ logger.info("");
50
+ await this.validate(absoluteProjectPath);
51
+ await this.convertCaseToBpmnIfNeeded(absoluteProjectPath);
52
+ await ensureProjectId(absoluteProjectPath, this.fs);
53
+ await this.fs.mkdir(absoluteOutputPath);
54
+ let tempDir;
55
+ try {
56
+ tempDir = await this.fs.getTempDir();
57
+ const stagingDir = this.fs.path.join(tempDir, "case-pack-staging");
58
+ await this.fs.mkdir(stagingDir);
59
+ await this.fs.copyDirectory(absoluteProjectPath, this.fs.path.join(stagingDir, "content"));
60
+ const packageId = `${packageName}.case.Case`;
61
+ const version = options.version || "1.0.0";
62
+ const nupkgPath = this.fs.path.join(absoluteOutputPath, `${packageId}.${version}.nupkg`);
63
+ const packager = new NugetPackager(this.fs);
64
+ const result = await packager.packAsync(stagingDir, {
65
+ id: packageId,
66
+ version,
67
+ tags: "Case",
68
+ ...mapPackageMetadataOptions(options)
69
+ }, nupkgPath);
70
+ return {
71
+ packageName: `${packageName}@${options.version}`,
72
+ outputPath: result.outputPath
73
+ };
74
+ } finally {
75
+ if (tempDir) {
76
+ await catchError((async () => {
77
+ if (await this.fs.exists(tempDir)) {
78
+ await this.fs.rm(tempDir);
79
+ }
80
+ })());
81
+ }
82
+ }
83
+ }
84
+ async convertCaseToBpmnIfNeeded(projectPath) {
85
+ const caseFilePath = this.fs.path.join(projectPath, "caseplan.json");
86
+ if (!await this.fs.exists(caseFilePath)) {
87
+ return;
88
+ }
89
+ logger.info("Converting case JSON to BPMN...");
90
+ const caseContent = String(await this.fs.readFile(caseFilePath, "utf-8"));
91
+ const { serializeCaseDiskJsonToBpmnAndRulesJson } = await loadCaseSchemaAsync();
92
+ const { bpmnXml: bpmn } = await serializeCaseDiskJsonToBpmnAndRulesJson(caseContent);
93
+ const bpmnFilePath = this.fs.path.join(projectPath, "caseplan.json.bpmn");
94
+ await this.fs.writeFile(bpmnFilePath, bpmn);
95
+ logger.info(`BPMN file written to ${bpmnFilePath}`);
96
+ }
97
+ async validate(projectPath) {
98
+ if (!await this.fs.exists(projectPath)) {
99
+ throw new Error(`Project path does not exist: ${projectPath}`);
100
+ }
101
+ const stats = await this.fs.stat(projectPath);
102
+ if (!stats?.isDirectory()) {
103
+ throw new Error(`Project path must be a directory: ${projectPath}`);
104
+ }
105
+ const descriptorPath = this.fs.path.join(projectPath, "package-descriptor.json");
106
+ if (!await this.fs.exists(descriptorPath)) {
107
+ throw new Error(`Missing package-descriptor.json in: ${projectPath}`);
108
+ }
109
+ const operatePath = this.fs.path.join(projectPath, "operate.json");
110
+ if (!await this.fs.exists(operatePath)) {
111
+ throw new Error(`Missing operate.json in: ${projectPath}`);
112
+ }
113
+ }
114
+ }
115
+ export {
116
+ CasePackService
117
+ };
118
+
119
+ //# debugId=3F3DF77D1086226264756E2164756E21