@uipath/maestro-builder-sdk 6.15.0 → 6.15.1
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/bpmn/decompile-cli.js +3 -3
- package/dist/case/decompile-cli.js +2 -2
- package/dist/decompile-cli.js +2 -2
- package/dist/workdir.d.ts +10 -0
- package/dist/workdir.js +14 -1
- package/package.json +2 -2
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { reportResult } from '../cli-result.js';
|
|
25
25
|
import { typeStripDecision } from '../node-runtime.js';
|
|
26
|
-
import { readFileSync
|
|
26
|
+
import { readFileSync } from 'node:fs';
|
|
27
27
|
import { basename, resolve } from 'node:path';
|
|
28
|
-
import { defaultSourceOut } from '../workdir.js';
|
|
28
|
+
import { defaultSourceOut, writeSource } from '../workdir.js';
|
|
29
29
|
import { runWhenInvokedDirectly } from '../cli-run.js';
|
|
30
30
|
import { decompile } from './decompile.js';
|
|
31
31
|
import { sameGraph } from './lift-verify.js';
|
|
@@ -104,7 +104,7 @@ export async function run(argv) {
|
|
|
104
104
|
}
|
|
105
105
|
const base = basename(input).replace(/\.bpmn$/, '');
|
|
106
106
|
const out = opt(argv, '-o') ?? defaultSourceOut(`${base}.bpmn.ts`);
|
|
107
|
-
|
|
107
|
+
writeSource(out, source);
|
|
108
108
|
console.log(`decompile: wrote ${out}`);
|
|
109
109
|
if (pruned.length) {
|
|
110
110
|
// Never silent: these are declarations the source had and the output does not.
|
|
@@ -19,7 +19,7 @@ import { reportResult } from '../cli-result.js';
|
|
|
19
19
|
import { mkdirSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
20
20
|
import { resolveLibraryDir } from '../registry/cache.js';
|
|
21
21
|
import { basename, join, resolve } from 'node:path';
|
|
22
|
-
import { defaultSourceOut, workDirBeside } from '../workdir.js';
|
|
22
|
+
import { defaultSourceOut, workDirBeside, writeSource } from '../workdir.js';
|
|
23
23
|
import { runWhenInvokedDirectly } from '../cli-run.js';
|
|
24
24
|
import { Library } from '../core/library.js';
|
|
25
25
|
import { decompileWithDiagnostics } from './decompile.js';
|
|
@@ -66,7 +66,7 @@ export function run(argv) {
|
|
|
66
66
|
bestEffort,
|
|
67
67
|
});
|
|
68
68
|
const out = opt(argv, '-o') ?? defaultSourceOut(`${baseName(plan)}.case.ts`);
|
|
69
|
-
|
|
69
|
+
writeSource(out, result.source);
|
|
70
70
|
console.log(`decompile: wrote ${basename(out)}`);
|
|
71
71
|
reportResult({ path: resolve(out), diagnostics: result.diagnostics.map((d) => ({ code: d.code, location: d.location, message: d.message })) });
|
|
72
72
|
for (const diagnostic of result.diagnostics) {
|
package/dist/decompile-cli.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { reportResult } from './cli-result.js';
|
|
21
21
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
22
22
|
import { basename, join, resolve } from 'node:path';
|
|
23
|
-
import { defaultSourceOut, workDirBeside } from './workdir.js';
|
|
23
|
+
import { defaultSourceOut, workDirBeside, writeSource } from './workdir.js';
|
|
24
24
|
import { decompile } from './decompile.js';
|
|
25
25
|
import { resolveFlowRefs } from './ref-resolve.js';
|
|
26
26
|
import { runWhenInvokedDirectly } from './cli-run.js';
|
|
@@ -67,7 +67,7 @@ export function run(argv) {
|
|
|
67
67
|
warn: (message) => console.error(`flow-decompile: warning: ${message}`),
|
|
68
68
|
});
|
|
69
69
|
const out = opt(argv, '-o') ?? defaultSourceOut(`${baseName(flow)}.flow.ts`);
|
|
70
|
-
|
|
70
|
+
writeSource(out, ts);
|
|
71
71
|
console.log(`flow-decompile: wrote ${basename(out)}`);
|
|
72
72
|
reportResult({ path: resolve(out) });
|
|
73
73
|
if (!argv.includes('--no-pipeline')) {
|
package/dist/workdir.d.ts
CHANGED
|
@@ -33,3 +33,13 @@ export declare function ensureWorkDir(cwd?: string): void;
|
|
|
33
33
|
export declare function workDirBeside(path: string): string;
|
|
34
34
|
/** The default path of a decompiled source named `file`, creating the work directory. */
|
|
35
35
|
export declare function defaultSourceOut(file: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Write a decompiled source to `path`, creating its folder first if it is
|
|
38
|
+
* missing (`recursive: true`: an existing folder is not an error).
|
|
39
|
+
*
|
|
40
|
+
* `-o .flow-sdk/Order.flow.ts` on a fresh workspace has no `.flow-sdk/` yet;
|
|
41
|
+
* only the default path ({@link defaultSourceOut}) used to create it, so the
|
|
42
|
+
* documented explicit form failed with ENOENT and the author had to
|
|
43
|
+
* `mkdir -p` and retry.
|
|
44
|
+
*/
|
|
45
|
+
export declare function writeSource(path: string, text: string): void;
|
package/dist/workdir.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* rather than split across two places. When both exist, `.flow-sdk/` wins and
|
|
25
25
|
* stderr says the root one is ignored.
|
|
26
26
|
*/
|
|
27
|
-
import { existsSync, mkdirSync } from 'node:fs';
|
|
27
|
+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
28
28
|
import { basename, dirname, join } from 'node:path';
|
|
29
29
|
/** The hidden directory, relative to the current directory. */
|
|
30
30
|
export const WORK_DIR = '.flow-sdk';
|
|
@@ -94,3 +94,16 @@ export function defaultSourceOut(file) {
|
|
|
94
94
|
ensureWorkDir();
|
|
95
95
|
return inWorkDir(file);
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Write a decompiled source to `path`, creating its folder first if it is
|
|
99
|
+
* missing (`recursive: true`: an existing folder is not an error).
|
|
100
|
+
*
|
|
101
|
+
* `-o .flow-sdk/Order.flow.ts` on a fresh workspace has no `.flow-sdk/` yet;
|
|
102
|
+
* only the default path ({@link defaultSourceOut}) used to create it, so the
|
|
103
|
+
* documented explicit form failed with ENOENT and the author had to
|
|
104
|
+
* `mkdir -p` and retry.
|
|
105
|
+
*/
|
|
106
|
+
export function writeSource(path, text) {
|
|
107
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
108
|
+
writeFileSync(path, text);
|
|
109
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.1",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "a3707b159a49ed3b6611c55bed66622cb6dd1972"
|
|
96
96
|
}
|