@uipath/auth 1.199.0 → 1.200.0-preview.117

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.
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Minimal structural view of `@uipath/robot-client` — covers only the two
3
- * methods we consume. Defined locally so that this file compiles even when
4
- * the package is absent (it is loaded via dynamic `import()` at runtime).
3
+ * methods we consume. Defined locally so this file compiles without the
4
+ * package present: auth never imports robot-client, it only shapes the value
5
+ * returned by the host-registered loader (see {@link registerRobotClientLoader}).
5
6
  */
6
7
  interface IInteractiveConnectFlow {
7
8
  IsEnabled(): Promise<boolean>;
@@ -42,6 +43,19 @@ export interface RobotClientFallbackOptions {
42
43
  */
43
44
  force?: boolean;
44
45
  }
46
+ /** Host-provided loader for `@uipath/robot-client`. See {@link registerRobotClientLoader}. */
47
+ export type RobotClientModuleLoader = () => Promise<unknown>;
48
+ /**
49
+ * Register the host's loader for `@uipath/robot-client` (a private GitHub
50
+ * Package Registry package). The CLI host bundles robot-client once and calls
51
+ * this at startup with `() => import("@uipath/robot-client")`; auth's Robot
52
+ * credential fallback then loads the module through the host instead of every
53
+ * tool bundle inlining its own ~720KB copy. When no loader is registered (or it
54
+ * fails), the fallback resolves to `undefined` and callers degrade to the
55
+ * standard "Not logged in" path — the same behaviour as when the Robot service
56
+ * is absent.
57
+ */
58
+ export declare const registerRobotClientLoader: (loader: RobotClientModuleLoader) => void;
45
59
  /**
46
60
  * Read credentials from the running UiPath Robot/Assistant via its local IPC.
47
61
  *
@@ -52,7 +66,8 @@ export interface RobotClientFallbackOptions {
52
66
  * `options.force === true`
53
67
  * - the process looks like a CI runner (`CI`/`GITHUB_ACTIONS` set) — unless
54
68
  * `options.force === true`
55
- * - `@uipath/robot-client` is not installed or fails to load
69
+ * - no robot-client loader is registered (see `registerRobotClientLoader`),
70
+ * or the registered loader fails
56
71
  * - Robot is not running, or sign-in is disabled
57
72
  * - an IPC call exceeds the timeout
58
73
  * - the returned resource URL or access token is malformed/empty
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/auth",
3
3
  "license": "MIT",
4
- "version": "1.199.0",
4
+ "version": "1.200.0-preview.117",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -37,5 +37,5 @@
37
37
  "mihaigirleanu",
38
38
  "vlad-uipath"
39
39
  ],
40
- "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
40
+ "gitHead": "5ba432ca14252784a1e20c03f5a858a5ae39746e"
41
41
  }