@uipath/codedapp-convert-sdk 0.1.0-beta.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/LICENSE.txt +3 -0
- package/README.md +54 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +30770 -0
- package/dist/index.js.map +7 -0
- package/dist/roslyn-bridge/Microsoft.CodeAnalysis.VisualBasic.dll +0 -0
- package/dist/roslyn-bridge/Microsoft.CodeAnalysis.dll +0 -0
- package/dist/roslyn-bridge/Newtonsoft.Json.dll +0 -0
- package/dist/roslyn-bridge/cs/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/cs/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/de/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/de/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/es/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/es/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/fr/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/fr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/it/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/it/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/ja/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/ja/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/ko/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/ko/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/pl/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/pl/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/pt-BR/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/pt-BR/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/roslyn-bridge +0 -0
- package/dist/roslyn-bridge/roslyn-bridge.deps.json +157 -0
- package/dist/roslyn-bridge/roslyn-bridge.dll +0 -0
- package/dist/roslyn-bridge/roslyn-bridge.pdb +0 -0
- package/dist/roslyn-bridge/roslyn-bridge.runtimeconfig.json +14 -0
- package/dist/roslyn-bridge/ru/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/ru/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/tr/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/tr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/zh-Hans/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/zh-Hans/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/roslyn-bridge/zh-Hant/Microsoft.CodeAnalysis.VisualBasic.resources.dll +0 -0
- package/dist/roslyn-bridge/zh-Hant/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/skills/fix-converted-app/SKILL.md +333 -0
- package/package.json +39 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
© 2026 UiPath
|
|
2
|
+
Use of this product is subject (a) to the applicable licensing agreement available: https://www.uipath.com/legal/trust-and-security/legal-terms#content-1 and, (b) for paid products listed here https://licensing.uipath.com/: the licensing agreement agreed between you and UiPath.
|
|
3
|
+
(UiPath means UiPath SRL with headquarters at 4 Vasile Alecsandri Str. and 11 Constantin Daniel Str., Building A, floors 5 and 6, District 1, Bucharest 010639, Romania and UiPath Inc. with principal place of business: One Vanderbilt Avenue, 60th Floor, New York, NY 10017)
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @uipath/codedapp-convert-sdk
|
|
2
|
+
|
|
3
|
+
The converter behind `uip codedapp convert`: one exported UiPath Apps app in, a React +
|
|
4
|
+
TypeScript coded app out. This package is the published face of
|
|
5
|
+
`lowcode-to-procode-migration`; the pipeline itself lives in the sibling packages and is
|
|
6
|
+
bundled here.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { convertFile, detectAppKind, checkPrerequisites } from '@uipath/codedapp-convert-sdk';
|
|
10
|
+
|
|
11
|
+
detectAppKind('Expense.uiapp'); // 'uiapp' — 'uis' for a Solution, undefined otherwise
|
|
12
|
+
checkPrerequisites(); // { ok: true } or { ok: false, message, instructions }
|
|
13
|
+
const result = await convertFile({ input: 'Expense.uiapp', outDir: './expense' });
|
|
14
|
+
// result.report.path, result.pages, result.expressions, result.skill, …
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
What `convertFile` writes into `outDir`:
|
|
18
|
+
|
|
19
|
+
- the project (`src/`, `index.html`, `package.json`, `vite.config.ts`, `uipath.json`, …);
|
|
20
|
+
- `conversion-report.json` — what converted, what did not, and whose fault each gap is
|
|
21
|
+
(`converter`, `source-app`, `by-design`); read-only;
|
|
22
|
+
- `conversion-log.ndjson` — every note of the run;
|
|
23
|
+
- `.uipath/agent-skills/skills/fix-converted-app/SKILL.md` — the `fix-converted-app` skill
|
|
24
|
+
as a skill source, in the layout `uip skills install` reads. From the output directory,
|
|
25
|
+
`uip skills install --repo ./.uipath/agent-skills --path .` installs it for every coding
|
|
26
|
+
agent on the machine (Claude Code, Codex, Cursor, Copilot, …); then ask the agent to run
|
|
27
|
+
it. The converter installs the skill's source and runs no agent itself.
|
|
28
|
+
|
|
29
|
+
Re-converting into the same directory replaces the generated files and keeps `uipath.json`
|
|
30
|
+
(the user's OAuth client id) and `node_modules`.
|
|
31
|
+
|
|
32
|
+
## Requirements
|
|
33
|
+
|
|
34
|
+
- Node 20+.
|
|
35
|
+
- The **.NET 10 runtime** (`dotnet` on the PATH): VB expressions are bound with the Roslyn
|
|
36
|
+
compiler, which ships in this package under `dist/roslyn-bridge/`. `checkPrerequisites()`
|
|
37
|
+
says so in one line when it is missing; `UIAPP_CONVERT_BRIDGE` can name a bridge
|
|
38
|
+
elsewhere.
|
|
39
|
+
|
|
40
|
+
## Building
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run build:sdk # dotnet build -c Release packages/roslyn-bridge && bundle
|
|
44
|
+
npm run -w packages/sdk smoke
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`dist/index.js` is an ESM bundle of every workspace package; `typescript` and `decimal.js`
|
|
48
|
+
stay as dependencies. `dist/index.d.ts` is kept by hand (four exports) and checked against
|
|
49
|
+
the implementation by `packages/cli/test/convert-file.test.ts`.
|
|
50
|
+
|
|
51
|
+
## Not in this build
|
|
52
|
+
|
|
53
|
+
A `.uis` Solution (UB apps with XAML workflows) is recognised and refused with an
|
|
54
|
+
instruction; its reader arrives with the workflows package (apps-dev-tools #165).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-kept types for the published bundle: the surface is four names, and the source
|
|
3
|
+
* packages are workspace-internal, so a generated declaration would drag their paths in.
|
|
4
|
+
* `packages/sdk/test/surface.test.ts` holds this file to the implementation at the type
|
|
5
|
+
* level — a field added, removed or retyped on one side fails `tsc` there.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** What a file's extension says it is: a standalone VB app, or a Solution. */
|
|
9
|
+
export type AppKind = 'uiapp' | 'uis';
|
|
10
|
+
|
|
11
|
+
export interface ConvertFileOptions {
|
|
12
|
+
/** The `.uiapp` (or `.uis`) to convert. */
|
|
13
|
+
input: string;
|
|
14
|
+
/** Where the project is written. Created if missing; generated files inside are replaced. */
|
|
15
|
+
outDir: string;
|
|
16
|
+
/** For a `.uis` Solution holding several apps: which one, or `all`. */
|
|
17
|
+
app?: string;
|
|
18
|
+
/** Bind every expression afresh rather than reusing the bind cache in `outDir`. */
|
|
19
|
+
noCache?: boolean;
|
|
20
|
+
dumpRequest?: boolean;
|
|
21
|
+
/** Terminal verbosity for the run's notes; the diary and report carry everything regardless. */
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
quiet?: boolean;
|
|
24
|
+
/** Print the human summary to the terminal. */
|
|
25
|
+
print?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ConvertFileResult {
|
|
29
|
+
kind: AppKind;
|
|
30
|
+
input: string;
|
|
31
|
+
outDir: string;
|
|
32
|
+
files: number;
|
|
33
|
+
kept: string[];
|
|
34
|
+
media: number;
|
|
35
|
+
pages: number;
|
|
36
|
+
expressions: { referenced: number; emitted: number; unbound: number; noRule: number; exact: number; lenient: number };
|
|
37
|
+
unconverted: { expressions: number; eventHandlers: number };
|
|
38
|
+
viewGaps: number;
|
|
39
|
+
syntaxProblems: string[];
|
|
40
|
+
/** Diagnostics that stopped behaviour converting; non-zero means exit 2 is warranted. */
|
|
41
|
+
blocking: number;
|
|
42
|
+
report: {
|
|
43
|
+
path: string;
|
|
44
|
+
issues: number;
|
|
45
|
+
converter: number;
|
|
46
|
+
sourceApp: number;
|
|
47
|
+
byDesign: number;
|
|
48
|
+
};
|
|
49
|
+
diaryNotes: number;
|
|
50
|
+
/** The skill as a skill source in the output; `source` is what `uip skills install --repo` takes. */
|
|
51
|
+
skill: { path: string; source: string } | undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** A problem with WHAT was given to convert, as opposed to a failure while converting it. */
|
|
55
|
+
export declare class ConversionInputError extends Error {
|
|
56
|
+
readonly instructions?: string;
|
|
57
|
+
constructor(message: string, instructions?: string);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export declare function detectAppKind(path: string): AppKind | undefined;
|
|
61
|
+
export declare function checkPrerequisites(): { ok: true } | { ok: false; message: string; instructions: string };
|
|
62
|
+
export declare function convertFile(options: ConvertFileOptions): Promise<ConvertFileResult>;
|