@uipath/packager-tool-codedapps-browser 0.0.0-stage → 1.205.0-preview.258

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 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 CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # @uipath/packager-tool-codedapps-browser
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Browser packager tool for `ProjectType.AppV2` (coded web and action apps). It builds and packs coded app projects through the UiPath Remote Agent, in the same Orchestrator job as the solution's RPA and Function projects.
4
+
5
+ ## Why
6
+
7
+ The local `WebAppTool` (`@uipath/packager-tool-webapp`) runs in the browser, but it can only pack the bundle already at the manifest's `bundlePath` (`source/dist` in a solution): whatever `uip codedapp push` last uploaded. Building the app from its sources needs Node, npm and a real disk. When the bundle is stale, the pack still succeeds, but the deployed app does not match its sources. The Remote Agent can build it.
8
+
9
+ ## Usage
10
+
11
+ Register it **instead of** `WebAppToolFactory`. Both claim `AppV2`, and the first registration of a type wins:
12
+
13
+ ```ts
14
+ import { RemoteCodedAppsToolFactory } from "@uipath/packager-tool-codedapps-browser";
15
+ import { RemoteFunctionsToolFactory } from "@uipath/packager-tool-functions-browser";
16
+ import { WorkflowCompilerToolFactory } from "@uipath/packager-tool-workflowcompiler-browser";
17
+
18
+ toolsFactoryRepository.registerProjectToolFactory(new RemoteCodedAppsToolFactory());
19
+ toolsFactoryRepository.registerProjectToolFactory(new RemoteFunctionsToolFactory());
20
+ toolsFactoryRepository.registerProjectToolFactory(new WorkflowCompilerToolFactory());
21
+ ```
22
+
23
+ All three factories use the shared executor from `@uipath/packager-remote-agent-browser`, so the projects pack in one agent job. Set `codedAppsPackagerVersion` on the pack options to pin the `@uipath/codedapp-tool` version the agent installs.
24
+
25
+ ## What the agent does
26
+
27
+ For each coded app project, the agent:
28
+
29
+ 1. Reads `webAppManifest.json` and, for the `Coded` variant, finds the sources: the nearest folder above the bundle folder with a `package.json`, where `uip codedapp push` puts it. A `JS` app packs its `.app` folder as is.
30
+ 2. If that `package.json` has a `build` script, installs the dependencies (`npm ci --ignore-scripts`, or `npm install` without a lock file), removes the pushed bundle and runs `npm run build`. A build that does not write the bundle back at `bundlePath` fails the pack rather than shipping a stale app. Without a build script it packs the bundle in the snapshot as is.
31
+ 3. Packs the project with the `AppV2` factory that `@uipath/codedapp-tool/packager-tool` registers, the same one `uip solution pack` uses.
32
+
33
+ The package's `operate.json` `projectId` is the manifest's `projectId`, as when the local `WebAppTool` packs. This tool reads it, or mints one and saves it to the manifest, and sends it as the project's `ProjectStorageId`, so every pack gives the package the same id.
34
+
35
+ ## Validate and cleanup
36
+
37
+ Only pack goes to the agent:
38
+
39
+ - Validate runs the local `WebAppTool` checks: the manifest is present and readable, and its variant is known. It then tells the shared executor to skip the project (`skipAsync`).
40
+ - Cleanup has nothing to do and skips the project.
41
+
42
+ The other projects' job does not wait for a skipped project and carries no `CodedAppProjects`. A solution with only coded apps starts no job for validate or cleanup. Restore and build are local no-ops.
43
+
44
+ ## Requirements
45
+
46
+ - A Remote Agent that packs `CodedAppProjects`. An older one ignores the list and packs the rest; each coded app project then fails with "The remote agent returned no package for …" when the result arrives.
47
+ - Node.js and npm on the robot. The app's build runs there, with the dependencies its lock file names.
48
+ - The same pack options remote RPA packing needs: `connection` (`cloudUrl`, `accessToken`, `folderId`) and `downloadUrl`.
@@ -0,0 +1,8 @@
1
+ # Third-party notices for @uipath/packager-tool-codedapps-browser
2
+
3
+ This package is distributed as a bundle: the dependencies below are
4
+ compiled into its `dist/` output rather than installed alongside it.
5
+ Their licences and copyright notices are reproduced here in full, as
6
+ those licences require.
7
+
8
+ No third-party code is bundled into this package.
@@ -0,0 +1 @@
1
+ export { RemoteCodedAppsToolFactory } from "./remote-coded-apps-tool-factory.js";
package/dist/index.js ADDED
@@ -0,0 +1,50 @@
1
+ // src/remote-coded-apps-tool-factory.ts
2
+ import {
3
+ RemoteAgentProjectToolFactory
4
+ } from "@uipath/packager-remote-agent-browser";
5
+ import {
6
+ ProjectTypes
7
+ } from "@uipath/solutionpackager-tool-core";
8
+
9
+ // src/remote-coded-apps-tool.ts
10
+ import { RemoteAgentProjectTool } from "@uipath/packager-remote-agent-browser";
11
+ import {
12
+ ensureWebAppProjectId,
13
+ WebAppTool
14
+ } from "@uipath/packager-tool-webapp";
15
+ import {
16
+ ToolResult
17
+ } from "@uipath/solutionpackager-tool-core";
18
+
19
+ class RemoteCodedAppsTool extends RemoteAgentProjectTool {
20
+ async validateAsync(options, cancellationToken) {
21
+ if (!this.context) {
22
+ return super.validateAsync(options, cancellationToken);
23
+ }
24
+ try {
25
+ const result = await new WebAppTool(this.fileSystem, this.logger).validateAsync(options, cancellationToken);
26
+ if (!result.isSuccess) {
27
+ return result;
28
+ }
29
+ } finally {
30
+ await super.validateAsync(options, cancellationToken);
31
+ }
32
+ return ToolResult.success();
33
+ }
34
+ resolveProjectIdAsync(options) {
35
+ return ensureWebAppProjectId(this.fileSystem, options.projectPath);
36
+ }
37
+ }
38
+
39
+ // src/remote-coded-apps-tool-factory.ts
40
+ class RemoteCodedAppsToolFactory extends RemoteAgentProjectToolFactory {
41
+ supportedTypes = [ProjectTypes.AppV2];
42
+ createTool(fileSystem, logger, bundleExecutor, context) {
43
+ return new RemoteCodedAppsTool(fileSystem, logger, bundleExecutor, context);
44
+ }
45
+ }
46
+ export {
47
+ RemoteCodedAppsToolFactory
48
+ };
49
+
50
+ //# debugId=C0515844FC3135B764756E2164756E21
@@ -0,0 +1,23 @@
1
+ import { type IRemoteAgentBundleExecutor, RemoteAgentProjectToolFactory } from "@uipath/packager-remote-agent-browser";
2
+ import { type IFileSystem, type IToolLogger, type ProjectOperationContext, type ProjectTool, type ProjectType } from "@uipath/solutionpackager-tool-core";
3
+ /**
4
+ * Factory for the browser coded app tool that builds and packs through the
5
+ * Remote Agent. Handles projects with projectType "AppV2".
6
+ *
7
+ * It claims the same type as `WebAppToolFactory` from
8
+ * `@uipath/packager-tool-webapp`, and the first registration of a type wins,
9
+ * so a consumer registers one or the other. Its tools share the remote agent
10
+ * bundle executor with the other remote tool factories, so a solution's coded
11
+ * app, Function and RPA projects pack in one agent job.
12
+ *
13
+ * Opt-in: a consumer that registers the local `WebAppToolFactory` instead
14
+ * keeps packing coded apps in the browser, from the bundle in the snapshot.
15
+ *
16
+ * Needs a Remote Agent that packs `CodedAppProjects`. An older one ignores
17
+ * that list; each coded app project then fails when the result arrives
18
+ * without its package.
19
+ */
20
+ export declare class RemoteCodedAppsToolFactory extends RemoteAgentProjectToolFactory {
21
+ readonly supportedTypes: readonly ProjectType[];
22
+ protected createTool(fileSystem: IFileSystem, logger: IToolLogger, bundleExecutor: IRemoteAgentBundleExecutor, context?: ProjectOperationContext): ProjectTool;
23
+ }
@@ -0,0 +1,23 @@
1
+ import { RemoteAgentProjectTool } from "@uipath/packager-remote-agent-browser";
2
+ import { type IProjectPackOptions, type IProjectValidateOptions, ToolResult } from "@uipath/solutionpackager-tool-core";
3
+ /**
4
+ * Browser coded app (AppV2) tool that builds and packs through the Remote
5
+ * Agent.
6
+ *
7
+ * The local `WebAppTool` packs the bundle already at the manifest's
8
+ * `bundlePath`, which is whatever `uip codedapp push` last uploaded; it cannot
9
+ * build the app from its sources, which needs Node, npm and a real disk. This
10
+ * tool hands the project to the shared remote-agent bundle executor instead:
11
+ * the agent builds the app when it has a build script, packs it with the same
12
+ * factory `uip solution pack` uses, in the same Orchestrator job as the
13
+ * solution's other remote projects, and the package comes back through the
14
+ * same bucket.
15
+ *
16
+ * Only pack goes to the agent. Validate runs the local `WebAppTool` checks
17
+ * (manifest present and readable, a known variant), as without this tool,
18
+ * then skips the project in the bundle like cleanup does.
19
+ */
20
+ export declare class RemoteCodedAppsTool extends RemoteAgentProjectTool {
21
+ validateAsync(options: IProjectValidateOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
22
+ protected resolveProjectIdAsync(options: IProjectPackOptions): Promise<string>;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,29 @@
1
1
  {
2
- "name": "@uipath/packager-tool-codedapps-browser",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@uipath/packager-tool-codedapps-browser",
3
+ "version": "1.205.0-preview.258",
4
+ "description": "UiPath coded apps (AppV2) tool - browser implementation that builds and packs through the Remote Agent",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./dist/index.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/UiPath/cli.git",
12
+ "directory": "packages/packager/packager-tool-codedapps-browser"
13
+ },
14
+ "publishConfig": {
15
+ "registry": "https://registry.npmjs.org/"
16
+ },
17
+ "types": "./dist/index.d.ts",
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "author": "UiPath",
22
+ "license": "SEE LICENSE IN LICENSE.txt",
23
+ "peerDependencies": {
24
+ "@uipath/packager-remote-agent-browser": "1.205.0",
25
+ "@uipath/packager-tool-webapp": "1.205.0",
26
+ "@uipath/solutionpackager-tool-core": "1.205.0"
27
+ },
28
+ "gitHead": "8f629ee9fa89abf94f197436a60cb3b9620f8b27"
29
+ }