@uipath/tasks-tool 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.
- package/dist/browser-strategy-brs3w53e.js +99 -0
- package/dist/getMachineId-bsd-wfkxpxjv.js +38 -0
- package/dist/getMachineId-darwin-9asn4zy6.js +38 -0
- package/dist/getMachineId-linux-62t6m027.js +31 -0
- package/dist/getMachineId-unsupported-dfrzeqc3.js +21 -0
- package/dist/getMachineId-win-zgvrp5q3.js +40 -0
- package/dist/index.js +14 -2148
- package/dist/node-strategy-a4n0d6dx.js +63 -0
- package/dist/tool-0v6na3yp.js +37 -0
- package/dist/tool-1ps2qeqg.js +10 -0
- package/dist/tool-9qecd4wb.js +14 -0
- package/dist/tool-a88d298x.js +26222 -0
- package/dist/tool-h1k9mjs9.js +17 -0
- package/dist/tool-q90kqh83.js +1161 -0
- package/dist/tool-r6rhp5ep.js +1487 -0
- package/dist/tool.js +10 -46878
- package/package.json +2 -2
- package/src/commands/tasks.ts +3 -2
- package/tests/assign.e2e.test.ts +166 -0
- package/tests/assignable-users.e2e.test.ts +113 -0
- package/tests/complete.e2e.test.ts +207 -0
- package/tests/get.e2e.test.ts +101 -0
- package/tests/list.e2e.test.ts +124 -0
- package/tests/performance.e2e.test.ts +9 -5
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError,
|
|
3
|
+
getFileSystem,
|
|
4
|
+
startServer
|
|
5
|
+
} from "./tool-q90kqh83.js";
|
|
6
|
+
import"./tool-1ps2qeqg.js";
|
|
7
|
+
import"./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
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
for (let key of __getOwnPropNames(mod))
|
|
23
|
+
if (!__hasOwnProp.call(to, key))
|
|
24
|
+
__defProp(to, key, {
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
26
|
+
enumerable: true
|
|
27
|
+
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
|
+
|
|
35
|
+
export { __toESM, __commonJS, __require };
|
|
36
|
+
|
|
37
|
+
//# debugId=C61B9583F8C9819B64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// ../auth/src/constants.ts
|
|
2
|
+
var UIPATH_HOME_DIR = ".uipath";
|
|
3
|
+
var AUTH_FILENAME = ".auth";
|
|
4
|
+
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
5
|
+
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
6
|
+
var AUTH_CANCELLED_ERROR_CODE = "EAUTHCANCELLED";
|
|
7
|
+
|
|
8
|
+
export { UIPATH_HOME_DIR, AUTH_FILENAME, DEFAULT_BASE_URL, DEFAULT_AUTH_TIMEOUT_MS, AUTH_CANCELLED_ERROR_CODE };
|
|
9
|
+
|
|
10
|
+
//# debugId=6DCB1840782D2B3E64756E2164756E21
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// ../auth/src/utils/platform.ts
|
|
2
|
+
function isBrowser() {
|
|
3
|
+
return typeof globalThis !== "undefined" && "window" in globalThis && "document" in globalThis;
|
|
4
|
+
}
|
|
5
|
+
function getGlobalThis() {
|
|
6
|
+
if (typeof globalThis !== "undefined") {
|
|
7
|
+
return globalThis;
|
|
8
|
+
}
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { isBrowser, getGlobalThis };
|
|
13
|
+
|
|
14
|
+
//# debugId=718223FBC10121D064756E2164756E21
|