@uipath/solution-tool 1.200.0-preview.120 → 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 (37) hide show
  1. package/dist/{browser-strategy-brs3w53e.js → browser-strategy-yccf8mtd.js} +1 -1
  2. package/dist/deploy.js +8 -6
  3. package/dist/index-2fj08e7n.js +2058 -0
  4. package/dist/index-w03qc9m8.js +634 -0
  5. package/dist/index.js +15 -12
  6. package/dist/init.d.ts +6 -8
  7. package/dist/init.js +7 -6
  8. package/dist/js-yaml-4ypbq2tt.js +3145 -0
  9. package/dist/list-kbscmb2k.js +378 -0
  10. package/dist/node-strategy-12qfy0nv.js +348 -0
  11. package/dist/pack.js +9 -20
  12. package/dist/{packager-tool-v3bmxrve.js → packager-tool-112c30jx.js} +806 -93
  13. package/dist/{packager-tool-9j8d0ts5.js → packager-tool-550smwcc.js} +431 -1645
  14. package/dist/{packager-tool-1ps2qeqg.js → packager-tool-5arsyj36.js} +3 -2
  15. package/dist/{packager-tool-kfzzznjr.js → packager-tool-67ssxgph.js} +2 -2
  16. package/dist/packager-tool-7eva0peq.js +265 -0
  17. package/dist/{packager-tool-r1hk3s30.js → packager-tool-95fz7yd0.js} +72 -11
  18. package/dist/{packager-tool-sdhdmkt8.js → packager-tool-9vehmnke.js} +2 -1
  19. package/dist/packager-tool-bcpknnr8.js +6724 -0
  20. package/dist/packager-tool-fzwxq48d.js +4225 -0
  21. package/dist/{packager-tool-37g19zk3.js → packager-tool-krd5v2r5.js} +8 -6
  22. package/dist/{packager-tool-epwm26av.js → packager-tool-nkgvv7yh.js} +6249 -5847
  23. package/dist/{packager-tool-dmdgqh56.js → packager-tool-v33bpncw.js} +87 -31
  24. package/dist/packager-tool-va301fjh.js +1477 -0
  25. package/dist/packager-tool-yktm4v4r.js +67 -0
  26. package/dist/packager-tool.js +1 -1
  27. package/dist/publish.js +8 -6
  28. package/dist/resource.d.ts +2 -3
  29. package/dist/resource.js +6 -5
  30. package/dist/services/deployment-search.d.ts +1 -1
  31. package/dist/services/feed-resolver.d.ts +4 -5
  32. package/dist/templates/AGENTS.md +2 -1
  33. package/dist/tool.js +15 -12
  34. package/package.json +2 -2
  35. package/dist/node-strategy-a4n0d6dx.js +0 -63
  36. package/dist/packager-tool-q90kqh83.js +0 -1161
  37. package/dist/packager-tool-y4wacqkp.js +0 -15811
@@ -0,0 +1,67 @@
1
+ import {
2
+ catchError,
3
+ getAuthContext
4
+ } from "./packager-tool-bcpknnr8.js";
5
+
6
+ // src/services/studio-web-auth-middleware.ts
7
+ var studioWebAuthByCommand = new WeakMap;
8
+ function useStudioWebAuth(command, options = {}) {
9
+ const { shouldResolve, ...authOptions } = options;
10
+ return command.hook("preAction", async (thisCommand, actionCommand) => {
11
+ if (shouldResolve && !shouldResolve(thisCommand, actionCommand)) {
12
+ return;
13
+ }
14
+ const commandOptions = actionCommand.opts();
15
+ const [error, auth] = await catchError(resolveStudioWebAuthContext({
16
+ ...authOptions,
17
+ loginValidity: commandOptions.loginValidity,
18
+ tenant: commandOptions.tenant
19
+ }));
20
+ studioWebAuthByCommand.set(actionCommand, error ? { error } : { auth });
21
+ });
22
+ }
23
+ function getStudioWebAuth(command) {
24
+ const state = studioWebAuthByCommand.get(command);
25
+ if (!state) {
26
+ throw new Error("Studio Web auth middleware was not registered for this command.");
27
+ }
28
+ if (state.error) {
29
+ throw state.error;
30
+ }
31
+ return state.auth;
32
+ }
33
+ function getStudioWebAuthWithOrganizationId(command) {
34
+ const auth = getStudioWebAuth(command);
35
+ if (!auth.organizationId) {
36
+ throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
37
+ }
38
+ return {
39
+ ...auth,
40
+ organizationId: auth.organizationId
41
+ };
42
+ }
43
+ async function resolveStudioWebAuthContext(options) {
44
+ if (Number.isNaN(options.loginValidity)) {
45
+ throw new Error(`Invalid --login-validity value: ${options.loginValidity}`);
46
+ }
47
+ const ctx = await getAuthContext({
48
+ tenant: options.tenant,
49
+ ensureTokenValidityMinutes: options.loginValidity,
50
+ requireOrganizationId: options.requireOrganizationId,
51
+ requireOrganizationName: options.requireOrganizationName,
52
+ requireTenantId: options.requireTenantId,
53
+ requireTenantName: options.requireTenantName
54
+ });
55
+ return {
56
+ accessToken: ctx.accessToken,
57
+ baseUrl: ctx.baseUrl,
58
+ organizationId: ctx.organizationId,
59
+ organizationName: ctx.organizationName,
60
+ tenantId: ctx.tenantId,
61
+ tenantName: ctx.tenantName
62
+ };
63
+ }
64
+
65
+ export { useStudioWebAuth, getStudioWebAuth, getStudioWebAuthWithOrganizationId };
66
+
67
+ //# debugId=704B27897C03B52964756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerPackagerFactories
3
- } from "./packager-tool-sdhdmkt8.js";
3
+ } from "./packager-tool-9vehmnke.js";
4
4
  import"./packager-tool-vpr77gre.js";
5
5
  import"./packager-tool-129wn232.js";
6
6
  import"./packager-tool-0v6na3yp.js";
package/dist/publish.js CHANGED
@@ -1,15 +1,17 @@
1
1
  import {
2
2
  publishSolutionAsync
3
- } from "./packager-tool-r1hk3s30.js";
4
- import"./packager-tool-9j8d0ts5.js";
5
- import"./packager-tool-y4wacqkp.js";
3
+ } from "./packager-tool-95fz7yd0.js";
4
+ import"./packager-tool-va301fjh.js";
5
+ import"./packager-tool-550smwcc.js";
6
+ import"./packager-tool-fzwxq48d.js";
7
+ import"./packager-tool-bcpknnr8.js";
6
8
  import"./packager-tool-9qecd4wb.js";
7
- import"./packager-tool-q90kqh83.js";
8
- import"./packager-tool-1ps2qeqg.js";
9
+ import"./packager-tool-7eva0peq.js";
10
+ import"./packager-tool-5arsyj36.js";
9
11
  import"./packager-tool-129wn232.js";
10
12
  import"./packager-tool-0v6na3yp.js";
11
13
  export {
12
14
  publishSolutionAsync
13
15
  };
14
16
 
15
- //# debugId=C6A6B2A4D9E3236B64756E2164756E21
17
+ //# debugId=DA463E68D9A9E64264756E2164756E21
@@ -3,9 +3,8 @@
3
3
  * SDK consumers (the VS Code extension's deploy/upload prep). Returns a tagged
4
4
  * `ResourceRefreshResult`. Mirrors `./init` / `./pack` / `./publish` / `./deploy`.
5
5
  *
6
- * Runtime contract: flow-tool's debug path loads this entry through
7
- * `ensureToolModule` (`@uipath/common`) instead of bundling it — renaming this
8
- * entry or its exports breaks it with no compile error.
6
+ * Peer tools do not go through here they import the engine straight from
7
+ * `@uipath/solution-sdk/resources`, which is where it lives.
9
8
  */
10
9
  export type { ResourceRefreshFailure, ResourceRefreshFailureReason, ResourceRefreshOptions, ResourceRefreshResult, ResourceRefreshSuccess, } from "@uipath/solution-sdk/resources";
11
10
  export { resourceRefreshAsync } from "@uipath/solution-sdk/resources";
package/dist/resource.js CHANGED
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  resourceRefreshAsync
3
- } from "./packager-tool-37g19zk3.js";
3
+ } from "./packager-tool-krd5v2r5.js";
4
4
  import"./packager-tool-vpr77gre.js";
5
- import"./packager-tool-y4wacqkp.js";
5
+ import"./packager-tool-fzwxq48d.js";
6
+ import"./packager-tool-bcpknnr8.js";
6
7
  import"./packager-tool-9qecd4wb.js";
7
- import"./packager-tool-q90kqh83.js";
8
- import"./packager-tool-1ps2qeqg.js";
8
+ import"./packager-tool-7eva0peq.js";
9
+ import"./packager-tool-5arsyj36.js";
9
10
  import"./packager-tool-129wn232.js";
10
11
  import"./packager-tool-0v6na3yp.js";
11
12
  export {
12
13
  resourceRefreshAsync
13
14
  };
14
15
 
15
- //# debugId=BF621D20913BD7F464756E2164756E21
16
+ //# debugId=EF371AE5DDFD388A64756E2164756E21
@@ -8,7 +8,7 @@ import type { DeploymentOperationStatus, DeploymentSearchItemDto2, InitOverrideF
8
8
  * Throws on transport / server errors. Use {@link findDeploymentBestEffort}
9
9
  * when you want a best-effort lookup that swallows failures.
10
10
  */
11
- export declare function findDeploymentByName(auth: SolutionAuthContext, deploymentName: string): Promise<DeploymentSearchItemDto2 | undefined>;
11
+ export declare function findDeploymentByName(auth: SolutionAuthContext, deploymentName: string, scope?: InitOverrideFunction): Promise<DeploymentSearchItemDto2 | undefined>;
12
12
  /**
13
13
  * Best-effort lookup of the deployment that blocks a redeploy of `packageName`.
14
14
  * Pages `searchSearchDeployments22` by substring like {@link findDeploymentByName},
@@ -1,3 +1,4 @@
1
+ import type { InitOverrideFunction } from "@uipath/solution-sdk";
1
2
  /** Which feed a publish/deploy/query is scoped to. */
2
3
  export type FeedKind = "tenant" | "personal" | "folder";
3
4
  export interface FeedScope {
@@ -17,11 +18,8 @@ export interface FeedScope {
17
18
  * header — the default that keeps folders-with-own-feed visible in tenant
18
19
  * queries). Merges with the SDK's computed headers so Authorization survives.
19
20
  */
20
- export declare function feedScopeInitOverride(scope: FeedScope): ((context: {
21
- init: RequestInit;
22
- }) => {
23
- headers: HeadersInit;
24
- }) | undefined;
21
+ export declare function folderKeyInitOverride(folderKey: string): InitOverrideFunction;
22
+ export declare function feedScopeInitOverride(scope: FeedScope): InitOverrideFunction | undefined;
25
23
  export interface ResolveFeedScopeOptions {
26
24
  /** Target the caller's own Personal Workspace feed. */
27
25
  personalWorkspace?: boolean;
@@ -31,6 +29,7 @@ export interface ResolveFeedScopeOptions {
31
29
  loginValidity?: number;
32
30
  envFilePath?: string;
33
31
  }
32
+ export declare function feedResolutionFailureInstructions(options: Pick<ResolveFeedScopeOptions, "personalWorkspace" | "feed">): string;
34
33
  /**
35
34
  * Turn the CLI feed flags into a validated {@link FeedScope} — the single
36
35
  * choke point every feed-aware command uses.
@@ -58,7 +58,6 @@ A solution can contain multiple projects of different types. The table below lis
58
58
  | Type | Description | Scaffold with | Skill |
59
59
  |---|---|---|---|
60
60
  | `Process` | RPA process — Studio workflow (XAML, Coded C#, or Hybrid) | `uip rpa create-project --name <name>` | `uipath-rpa` |
61
- | `Library` | Reusable RPA library | `uip rpa create-project --template-id LibraryProcessTemplate --name <name>` | `uipath-rpa` |
62
61
  | `Tests` | Test Automation project | `uip rpa create-project --template-id TestAutomationProjectTemplate --name <name>` | `uipath-rpa` |
63
62
  | `Flow` | Maestro Flow — long-running orchestrated workflow | `uip maestro flow init <name>` | `uipath-maestro-flow` |
64
63
  | `CaseManagement` | Maestro Case — stateful business process (SLA, approvals, HITL) | `uip maestro case init <name>` | `uipath-maestro-case` |
@@ -72,6 +71,8 @@ A solution can contain multiple projects of different types. The table below lis
72
71
 
73
72
  All skill should be installed by running the command: `uip skills install`. The general-purpose `uipath-platform` skill covers what isn't in a type-specific skill.
74
73
 
74
+ **`Library` is not a project type here.** A library is a reusable `.nupkg` consumed as a NuGet dependency, so `projects add` / `import` reject it and auto-registration returns `SolutionRegistration.Status: "Skipped"`. Publish it on its own (`uip rpa pack <project-dir> <output-path>`, then `uip or libraries upload --file <nupkg-path>`) and either reference it from a project's dependencies or attach it to this solution as a resource: `uip solution resources add --source remote --kind Library --name <library-name>`.
75
+
75
76
  The type lives in either `project.uiproj` (top-level `ProjectType`) or `project.json` (`designOptions.outputType`, falling back to top-level `ProjectType` when `outputType` is absent — read or write either field). The `init` scaffolders above auto-register when run inside a solution directory (unless `--skip-solution-registration` is passed). For other scaffolders, register the project with the solution after scaffolding: use `uip solution projects add <project-path> [<solution-file>]` when the project already lives inside the solution directory (registers in place, no copy), or `uip solution projects import <path>` to copy a project from outside the solution dir into it and register it. If you pass an unknown type to those commands, they reject with the exhaustive accepted list — trust that error over this table.
76
77
 
77
78
  ## End-to-End Lifecycle
package/dist/tool.js CHANGED
@@ -1,19 +1,22 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-v3bmxrve.js";
5
- import"./packager-tool-dmdgqh56.js";
6
- import"./packager-tool-kfzzznjr.js";
7
- import"./packager-tool-epwm26av.js";
8
- import"./packager-tool-sdhdmkt8.js";
9
- import"./packager-tool-r1hk3s30.js";
10
- import"./packager-tool-9j8d0ts5.js";
11
- import"./packager-tool-37g19zk3.js";
4
+ } from "./packager-tool-112c30jx.js";
5
+ import"./packager-tool-yktm4v4r.js";
6
+ import"./packager-tool-v33bpncw.js";
7
+ import"./packager-tool-67ssxgph.js";
8
+ import"./packager-tool-nkgvv7yh.js";
9
+ import"./packager-tool-9vehmnke.js";
10
+ import"./packager-tool-95fz7yd0.js";
11
+ import"./packager-tool-va301fjh.js";
12
+ import"./packager-tool-550smwcc.js";
13
+ import"./packager-tool-krd5v2r5.js";
12
14
  import"./packager-tool-vpr77gre.js";
13
- import"./packager-tool-y4wacqkp.js";
15
+ import"./packager-tool-fzwxq48d.js";
16
+ import"./packager-tool-bcpknnr8.js";
14
17
  import"./packager-tool-9qecd4wb.js";
15
- import"./packager-tool-q90kqh83.js";
16
- import"./packager-tool-1ps2qeqg.js";
18
+ import"./packager-tool-7eva0peq.js";
19
+ import"./packager-tool-5arsyj36.js";
17
20
  import"./packager-tool-129wn232.js";
18
21
  import"./packager-tool-0v6na3yp.js";
19
22
  export {
@@ -21,4 +24,4 @@ export {
21
24
  metadata
22
25
  };
23
26
 
24
- //# debugId=6F2BFE1781B2F93B64756E2164756E21
27
+ //# debugId=DF4E0430A569A00964756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/solution-tool",
3
3
  "license": "MIT",
4
- "version": "1.200.0-preview.120",
4
+ "version": "1.201.0-preview.121",
5
5
  "description": "Create, pack, publish, and deploy UiPath Automation Solutions.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,5 +47,5 @@
47
47
  "dist"
48
48
  ],
49
49
  "private": false,
50
- "gitHead": "173ad4b4930bd3e17a493b32e9f1c3c616ea1c10"
50
+ "gitHead": "c70ccfc0b12e637441d67df1d212b71d7784b5f8"
51
51
  }
@@ -1,63 +0,0 @@
1
- import {
2
- catchError,
3
- getFileSystem,
4
- startServer
5
- } from "./packager-tool-q90kqh83.js";
6
- import"./packager-tool-1ps2qeqg.js";
7
- import"./packager-tool-0v6na3yp.js";
8
-
9
- // ../auth/src/strategies/node-strategy.ts
10
- class NodeAuthStrategy {
11
- async execute(url, redirectUri, expectedState, opts) {
12
- const fs = getFileSystem();
13
- const callbackUrl = await startServer({
14
- redirectUri,
15
- timeoutMs: opts?.timeoutMs,
16
- signal: opts?.signal,
17
- onListening: async () => {
18
- let safeUrl = "";
19
- for (const ch of url) {
20
- const c = ch.charCodeAt(0);
21
- if (c > 31 && (c < 128 || c > 159))
22
- safeUrl += ch;
23
- }
24
- if (opts?.noBrowser) {
25
- if (!opts.onAuthUrl) {
26
- throw new Error("Headless login (noBrowser) requires an onAuthUrl handler " + "to surface the authorize URL, but none was provided.");
27
- }
28
- opts.onAuthUrl(safeUrl);
29
- return;
30
- }
31
- const [openError] = await catchError(fs.utils.open(url));
32
- if (!openError)
33
- return;
34
- const isSpawnError = "code" in openError && openError.code === "ENOENT";
35
- if (isSpawnError) {
36
- throw new Error("Could not open a browser. No supported browser launcher was found. " + `On a headless or minimal system, use non-interactive login instead:
37
-
38
- ` + ` uip login --client-id <id> --client-secret <secret> -t <tenant>
39
-
40
- ` + "Or install a browser opener for your OS (e.g. xdg-utils on Linux).", { cause: openError });
41
- }
42
- throw new Error("Could not open the browser automatically. " + `Visit this URL to authenticate:
43
-
44
- ${safeUrl}
45
- `, { cause: openError });
46
- }
47
- });
48
- const returnedState = callbackUrl.searchParams.get("state");
49
- if (returnedState !== expectedState) {
50
- throw new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again.");
51
- }
52
- const code = callbackUrl.searchParams.get("code");
53
- if (!code) {
54
- throw new Error("No authorization code received");
55
- }
56
- return code;
57
- }
58
- }
59
- export {
60
- NodeAuthStrategy
61
- };
62
-
63
- //# debugId=E5B2BD2B3B179D3D64756E2164756E21