@uipath/flow-tool 1.202.2 → 1.203.0-preview.180
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/THIRD-PARTY-NOTICES.md +48 -49
- package/dist/{authoring-cyybnqy9.js → authoring-tv4dh80p.js} +31 -9
- package/dist/{binding-service-xq110a7q.js → binding-service-1hjkvp7f.js} +37 -29
- package/dist/{connector-service-1jp3gvb1.js → connector-service-f50vt5ar.js} +225 -57
- package/dist/{conversion-FQTRFHRX-j8vsrk1c.js → conversion-FQTRFHRX-5bww6cg9.js} +11 -10
- package/dist/de-FGHEJRCI-gn4cf5gh.js +2697 -0
- package/dist/de-MUJPA4EB-dpg7t2rw.js +173 -0
- package/dist/{debug-conversation-trigger-q5jwq1x7.js → debug-conversation-trigger-nmd9v41y.js} +21 -18
- package/dist/{debug-http-client-4ev9xna7.js → debug-http-client-53qk6pc5.js} +2 -2
- package/dist/{debug-service-2skv6t3q.js → debug-service-nyk0s6mc.js} +3 -3
- package/dist/{edge-service-crgn8x3q.js → edge-service-qs0fmj4c.js} +19 -16
- package/dist/{index-4b8634za.js → embedded-file-reader-0sjt4nkj.js} +96 -16641
- package/dist/{en-TBNO2WUV-rfe87pgh.js → en-BWGKA5OE-1qkvb9rn.js} +2 -2
- package/dist/en-FBPVNKFN-dqt573xn.js +138 -0
- package/dist/en-TBNO2WUV-9nan43e5.js +1936 -0
- package/dist/es-7SE7HX2X-8yh1aj2y.js +173 -0
- package/dist/es-KR3ZSNMP-0cszm2n3.js +2697 -0
- package/dist/es-MX-2MYFZU7X-3rek4r73.js +173 -0
- package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +2697 -0
- package/dist/first-party-service-srxaftkn.js +27 -0
- package/dist/{flow-api-p1jy8t6k.js → flow-api-f49qbvf6.js} +8 -8
- package/dist/{flow-debug-service-gtz48pcs.js → flow-debug-service-nvx6c5fm.js} +65 -40
- package/dist/{flow-eval-node-target-d4q72qzz.js → flow-eval-node-target-rv41h6g2.js} +24 -17
- package/dist/flow-eval-run-api-1bw5e0k4.js +13 -0
- package/dist/{flow-eval-run-service-bteardyh.js → flow-eval-run-service-bnpf0zhb.js} +105 -220
- package/dist/{flow-eval-service-8wn40enf.js → flow-eval-service-p0fbctsk.js} +350 -306
- package/dist/flow-init-service-6c5tj22g.js +42 -0
- package/dist/{flow-io-91tv36v5.js → flow-io-c05c9hc7.js} +18 -15
- package/dist/{flow-migrate-service-4mxge029.js → flow-migrate-service-6dky7rrg.js} +27 -23
- package/dist/{flow-pack-service-9s7wmwpf.js → flow-pack-service-3ms1t8nv.js} +44 -36
- package/dist/flow-validate-service-hq93ye0w.js +65 -0
- package/dist/fr-MDFKNZ4C-h4a122k9.js +173 -0
- package/dist/fr-Y6NPVODW-q5ef3htr.js +2697 -0
- package/dist/{governance-fetcher-kn29e4eb.js → governance-fetcher-7b0a301w.js} +6 -5
- package/dist/{headless-my7j1typ.js → headless-rkxtgwts.js} +42909 -1756
- package/dist/{hitl-service-fmrkamr4.js → hitl-service-fpdb3tf5.js} +18 -15
- package/dist/{index-1kgxzh8x.js → index-3ts7y9d3.js} +15 -3
- package/dist/{index-gbfvfhkw.js → index-4hhb8jhe.js} +6 -4
- package/dist/{index-apf8q9y0.js → index-51z10z84.js} +4 -4
- package/dist/{index-d1yqqk6q.js → index-55cym5j7.js} +6 -4
- package/dist/index-kmp9fmhb.js +25 -0
- package/dist/index-sc7ddh21.js +16742 -0
- package/dist/{index-acd6bpqc.js → index-ymsd3pyx.js} +12 -15
- package/dist/index.js +13 -24
- package/dist/init.js +23 -19
- package/dist/{input-reader-mm2ydeh5.js → input-reader-tw0j373f.js} +1 -1
- package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +2697 -0
- package/dist/ja-UTQEAP34-8e0q6swp.js +173 -0
- package/dist/known-types-8dhhqk35.js +19 -0
- package/dist/ko-AXCHW2OK-askct7f6.js +173 -0
- package/dist/ko-AYBDSRZG-am0h0m2r.js +2697 -0
- package/dist/{maestro-automate-entry-6bxz7zxn.js → maestro-automate-entry-pqy9xqm3.js} +2 -2
- package/dist/{node-2ja52fbg.js → node-98psr4wc.js} +2344 -376
- package/dist/{node-service-1ygyqaed.js → node-service-yfyzjg1s.js} +37 -29
- package/dist/{node-sync-service-a4grwf1e.js → node-sync-service-zq2ptsep.js} +15 -15
- package/dist/{packager-tool-nnm6kw3x.js → packager-tool-0egkaa38.js} +1 -1
- package/dist/{packager-tool-0hrz9qfd.js → packager-tool-10t52r3c.js} +7 -7
- package/dist/{packager-tool-eb48j42f.js → packager-tool-13xbv18n.js} +100 -127
- package/dist/{packager-tool-nq4rcqqg.js → packager-tool-1frs4sr4.js} +32 -2
- package/dist/{packager-tool-bddj2zb4.js → packager-tool-1r5dnt9q.js} +1 -1
- package/dist/{packager-tool-f0kd5kq4.js → packager-tool-26ydwf12.js} +130 -15
- package/dist/{packager-tool-9ydywwp2.js → packager-tool-321a1806.js} +1 -1
- package/dist/packager-tool-35hg551a.js +1889 -0
- package/dist/{packager-tool-2csx1z2z.js → packager-tool-3j8sdsc2.js} +31 -30
- package/dist/{packager-tool-kscf0zaz.js → packager-tool-4rvnss1x.js} +15 -56
- package/dist/{packager-tool-t6exvxxr.js → packager-tool-5060zp48.js} +2 -2
- package/dist/packager-tool-53w8skv5.js +262 -0
- package/dist/{packager-tool-rew0hp2h.js → packager-tool-6k8s7pt9.js} +269 -23
- package/dist/{packager-tool-29eg86w6.js → packager-tool-6rsegsby.js} +6 -7
- package/dist/packager-tool-795gzq9k.js +208 -0
- package/dist/packager-tool-7q6z6npd.js +1937 -0
- package/dist/{packager-tool-h1mds3r4.js → packager-tool-8dj442ex.js} +5 -4
- package/dist/packager-tool-8qp60s20.js +12 -0
- package/dist/{packager-tool-114a3x6s.js → packager-tool-9kx94sj5.js} +16 -6
- package/dist/packager-tool-asvprb1k.js +3513 -0
- package/dist/{packager-tool-0d7tcvg1.js → packager-tool-b1xs6aty.js} +4 -1
- package/dist/{packager-tool-nmqwgqp7.js → packager-tool-bzry3t7v.js} +9 -9
- package/dist/{packager-tool-nt7g81h7.js → packager-tool-carzh1jy.js} +10 -10
- package/dist/packager-tool-d88rqwk8.js +135 -0
- package/dist/{packager-tool-pm3qh1hy.js → packager-tool-dh5nppv4.js} +1 -1
- package/dist/{packager-tool-r87gxwqa.js → packager-tool-e87tzg4y.js} +2 -2
- package/dist/{packager-tool-d0w3423x.js → packager-tool-e9yc5m6b.js} +1 -1
- package/dist/packager-tool-fvm2dddf.js +6297 -0
- package/dist/{packager-tool-3bra2c4j.js → packager-tool-gctpkdzs.js} +1 -1
- package/dist/packager-tool-gdtpsdn7.js +342 -0
- package/dist/{packager-tool-aa481g36.js → packager-tool-gpwec9sp.js} +6 -6
- package/dist/{packager-tool-a1hbfmws.js → packager-tool-gzpvdcnw.js} +124 -2
- package/dist/{packager-tool-03hjxcd7.js → packager-tool-h9d8c9rf.js} +1 -1
- package/dist/packager-tool-j78fwwhq.js +16 -0
- package/dist/packager-tool-jysvpt8p.js +11 -0
- package/dist/{packager-tool-5kd7msdf.js → packager-tool-nsmy7aap.js} +5 -5
- package/dist/packager-tool-paq9c70w.js +1332 -0
- package/dist/{packager-tool-tv33t02p.js → packager-tool-pszx10r5.js} +310 -13
- package/dist/{packager-tool-7qzyj26r.js → packager-tool-r45r9gk6.js} +209 -199
- package/dist/{packager-tool-sc5tddfj.js → packager-tool-s0mzv3sx.js} +1 -1
- package/dist/{packager-tool-pdg7hwvw.js → packager-tool-t9c77psy.js} +3098 -3179
- package/dist/{packager-tool-0880myh2.js → packager-tool-v31s32s4.js} +23 -5
- package/dist/{packager-tool-vfb74f9p.js → packager-tool-vbser1d9.js} +7 -7
- package/dist/packager-tool-vcjq9xkc.js +1895 -0
- package/dist/{packager-tool-w20r6n9v.js → packager-tool-vck7ct1e.js} +2877 -2221
- package/dist/{packager-tool-e8td7b01.js → packager-tool-vdc8r21p.js} +10328 -16610
- package/dist/{packager-tool-yr3bws42.js → packager-tool-vqcnvaae.js} +15 -15
- package/dist/{packager-tool-n7x6kxph.js → packager-tool-w22107ex.js} +8 -8
- package/dist/packager-tool-w5a1hhyj.js +13 -0
- package/dist/{packager-tool-rmh1jea6.js → packager-tool-xsta8jfz.js} +4 -3
- package/dist/packager-tool-yvva2vc5.js +261 -0
- package/dist/{packager-tool-9y5am147.js → packager-tool-z185rq2a.js} +4 -4
- package/dist/{packager-tool-gbzpz3qn.js → packager-tool-z894s8rx.js} +10 -13
- package/dist/packager-tool.js +17 -14
- package/dist/pt-3DIO5QWG-59b3f4bc.js +173 -0
- package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +2697 -0
- package/dist/pt-BR-Y6K6XHXK-mp3hwhw1.js +173 -0
- package/dist/pt-ROXU257Y-yd80gx6s.js +2697 -0
- package/dist/ro-AVAWPKOO-42m6am1w.js +2697 -0
- package/dist/ro-BWR3ONRR-vzx3hy8a.js +173 -0
- package/dist/ru-GSCT4ARZ-jrxwev63.js +10 -0
- package/dist/ru-WBLQ5B2U-s4em88p0.js +10 -0
- package/dist/{serialization-BXU6AKAN-n5b0v0kd.js → serialization-BXU6AKAN-z0vcrhpz.js} +13 -12
- package/dist/services/connector-binding-validator.d.ts +10 -1
- package/dist/services/definitions-lookup.d.ts +27 -0
- package/dist/services/flow-debug-service.d.ts +290 -0
- package/dist/services/flow-eval-types.d.ts +2 -2
- package/dist/services/flow-eval-utils.d.ts +29 -0
- package/dist/services/flow-validate-service.d.ts +39 -0
- package/dist/services/node-validators/connector-validator.d.ts +8 -0
- package/dist/services/vars-reference-rule.d.ts +113 -13
- package/dist/{shared-utils-ka4xn0nn.js → shared-utils-wv356cvj.js} +1 -1
- package/dist/tidy-service-cxpm6pcy.js +39 -0
- package/dist/tool.js +13 -24
- package/dist/tr-5IIHSFW5-hw4cewew.js +173 -0
- package/dist/tr-JMIP7ZSL-fb67ft9w.js +2696 -0
- package/dist/utils/handle-expansion.d.ts +34 -0
- package/dist/utils/write-resolved-flow.d.ts +7 -0
- package/dist/validation.js +46 -39
- package/dist/{variable-service-caa9axmz.js → variable-service-c1f91388.js} +22 -19
- package/dist/{wait-for-flow-job-xtnb6zfc.js → wait-for-flow-job-yp3mhy43.js} +8 -8
- package/dist/zh-CN-IFFXSEJS-tke4mzty.js +2697 -0
- package/dist/zh-CN-R2KU4U5L-tc1hat59.js +173 -0
- package/dist/zh-TW-GNKMELBF-j674515r.js +173 -0
- package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +2697 -0
- package/package.json +3 -2
- package/dist/flow-init-service-a4td40wm.js +0 -38
- package/dist/flow-validate-service-bd4zxhfx.js +0 -59
- package/dist/known-types-eq32py2n.js +0 -20
- package/dist/packager-tool-2wefykg9.js +0 -106
- package/dist/packager-tool-7t3rgb7f.js +0 -4945
- package/dist/packager-tool-8j92afwp.js +0 -58
- package/dist/packager-tool-jjpc0yka.js +0 -304
- package/dist/tidy-service-44n8x2mn.js +0 -36
- /package/dist/{localization-w8ada88j.js → localization-y790z9vm.js} +0 -0
|
@@ -49,6 +49,36 @@ function deriveOutcomeHandleIds(node) {
|
|
|
49
49
|
return [];
|
|
50
50
|
return outcomes.filter((o) => o != null && typeof o === "object" && typeof o.id === "string").map((o) => `outcome-${o.id}`);
|
|
51
51
|
}
|
|
52
|
+
function deriveHandleCustomizationSourceOverride(node) {
|
|
53
|
+
const customization = node.handleCustomization;
|
|
54
|
+
if (!customization || typeof customization !== "object")
|
|
55
|
+
return null;
|
|
56
|
+
const groups = customization.groups;
|
|
57
|
+
if (!Array.isArray(groups))
|
|
58
|
+
return null;
|
|
59
|
+
const positions = [];
|
|
60
|
+
const ids = [];
|
|
61
|
+
for (const group of groups) {
|
|
62
|
+
if (!group || typeof group !== "object")
|
|
63
|
+
continue;
|
|
64
|
+
const g = group;
|
|
65
|
+
if (typeof g.position === "string") {
|
|
66
|
+
positions.push(g.position);
|
|
67
|
+
}
|
|
68
|
+
const handles = g.handles;
|
|
69
|
+
if (!Array.isArray(handles))
|
|
70
|
+
continue;
|
|
71
|
+
for (const handle of handles) {
|
|
72
|
+
if (!handle || typeof handle !== "object")
|
|
73
|
+
continue;
|
|
74
|
+
const h = handle;
|
|
75
|
+
if (h.type === "source" && typeof h.id === "string") {
|
|
76
|
+
ids.push(h.id);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return ids.length > 0 ? { positions, sourceHandleIds: ids } : null;
|
|
81
|
+
}
|
|
52
82
|
function expandHandleIds(handle, node) {
|
|
53
83
|
if (!handle.repeat) {
|
|
54
84
|
return [handle.id];
|
|
@@ -82,6 +112,6 @@ function portMatchesTemplate(requestedPort, templateId) {
|
|
|
82
112
|
return pattern.test(requestedPort);
|
|
83
113
|
}
|
|
84
114
|
|
|
85
|
-
export { ERROR_SOURCE_PORT, enableErrorHandlingForErrorEdges, parseVisibleInputKey, isHandleVisible, deriveOutcomeHandleIds, expandHandleIds, isTemplatedHandleId, portMatchesTemplate };
|
|
115
|
+
export { ERROR_SOURCE_PORT, enableErrorHandlingForErrorEdges, parseVisibleInputKey, isHandleVisible, deriveOutcomeHandleIds, deriveHandleCustomizationSourceOverride, expandHandleIds, isTemplatedHandleId, portMatchesTemplate };
|
|
86
116
|
|
|
87
|
-
//# debugId=
|
|
117
|
+
//# debugId=338F9DF71F4BCE8C64756E2164756E21
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError
|
|
3
|
+
} from "./packager-tool-qa9gftnj.js";
|
|
1
4
|
import {
|
|
2
5
|
getGlobalThis,
|
|
3
6
|
isBrowser
|
|
4
7
|
} from "./packager-tool-0gctz400.js";
|
|
5
|
-
import {
|
|
6
|
-
catchError
|
|
7
|
-
} from "./packager-tool-qa9gftnj.js";
|
|
8
8
|
import {
|
|
9
9
|
AUTH_FILENAME,
|
|
10
10
|
DEFAULT_BASE_URL,
|
|
@@ -568,6 +568,63 @@ function getActiveAuthProfileFilePath() {
|
|
|
568
568
|
const profile = getActiveAuthProfile();
|
|
569
569
|
return profile ? resolveAuthProfileFilePath(profile) : undefined;
|
|
570
570
|
}
|
|
571
|
+
function getAuthProfilesRootPath() {
|
|
572
|
+
const fs = getFileSystem();
|
|
573
|
+
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR);
|
|
574
|
+
}
|
|
575
|
+
function resolveAuthProfileDirPath(profile) {
|
|
576
|
+
const normalized = normalizeAuthProfileName(profile);
|
|
577
|
+
if (normalized === undefined) {
|
|
578
|
+
throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile directory.`);
|
|
579
|
+
}
|
|
580
|
+
const fs = getFileSystem();
|
|
581
|
+
return fs.path.join(getAuthProfilesRootPath(), normalized);
|
|
582
|
+
}
|
|
583
|
+
async function listAuthProfileNamesAsync() {
|
|
584
|
+
const fs = getFileSystem();
|
|
585
|
+
const root = getAuthProfilesRootPath();
|
|
586
|
+
if (!await fs.exists(root)) {
|
|
587
|
+
return [];
|
|
588
|
+
}
|
|
589
|
+
const [readError, entries] = await catchError(fs.readdir(root));
|
|
590
|
+
if (readError || !entries) {
|
|
591
|
+
return [];
|
|
592
|
+
}
|
|
593
|
+
const names = [];
|
|
594
|
+
for (const entry of entries) {
|
|
595
|
+
if (!PROFILE_NAME_RE.test(entry) || entry === DEFAULT_AUTH_PROFILE) {
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
const stats = await fs.stat(fs.path.join(root, entry));
|
|
599
|
+
if (stats?.isDirectory()) {
|
|
600
|
+
names.push(entry);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return names.sort((a, b) => a.localeCompare(b));
|
|
604
|
+
}
|
|
605
|
+
async function authProfileExistsAsync(profile) {
|
|
606
|
+
const fs = getFileSystem();
|
|
607
|
+
const [pathError, dir] = catchError(() => resolveAuthProfileDirPath(profile));
|
|
608
|
+
if (pathError || dir === undefined) {
|
|
609
|
+
return false;
|
|
610
|
+
}
|
|
611
|
+
const stats = await fs.stat(dir);
|
|
612
|
+
return stats?.isDirectory() === true;
|
|
613
|
+
}
|
|
614
|
+
async function deleteAuthProfileAsync(profile) {
|
|
615
|
+
const dir = resolveAuthProfileDirPath(profile);
|
|
616
|
+
const fs = getFileSystem();
|
|
617
|
+
const relativeToRoot = fs.path.relative(getAuthProfilesRootPath(), dir);
|
|
618
|
+
if (relativeToRoot === "" || relativeToRoot.startsWith("..") || fs.path.isAbsolute(relativeToRoot)) {
|
|
619
|
+
throw new AuthProfileValidationError(`Refusing to delete "${profile}": resolved path escapes the profiles directory.`);
|
|
620
|
+
}
|
|
621
|
+
const stats = await fs.stat(dir);
|
|
622
|
+
if (stats?.isDirectory() !== true) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
await fs.rm(dir);
|
|
626
|
+
return dir;
|
|
627
|
+
}
|
|
571
628
|
|
|
572
629
|
// ../auth/src/utils/jwt.ts
|
|
573
630
|
class InvalidIssuerError extends Error {
|
|
@@ -1136,16 +1193,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
1136
1193
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
1137
1194
|
};
|
|
1138
1195
|
};
|
|
1139
|
-
var
|
|
1140
|
-
const fs = getFileSystem();
|
|
1141
|
-
const absolutePath = fs.path.isAbsolute(envPath) ? envPath : fs.path.join(fs.env.cwd(), envPath);
|
|
1142
|
-
if (!await fs.exists(absolutePath)) {
|
|
1143
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
1144
|
-
}
|
|
1145
|
-
const content = await fs.readFile(absolutePath, "utf-8");
|
|
1146
|
-
if (content === null) {
|
|
1147
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
1148
|
-
}
|
|
1196
|
+
var parseEnvContent = (content) => {
|
|
1149
1197
|
const env = {};
|
|
1150
1198
|
for (const line of content.split(`
|
|
1151
1199
|
`)) {
|
|
@@ -1166,6 +1214,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
1166
1214
|
}
|
|
1167
1215
|
return env;
|
|
1168
1216
|
};
|
|
1217
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
1218
|
+
const fs = getFileSystem();
|
|
1219
|
+
const absolutePath = fs.path.isAbsolute(envPath) ? envPath : fs.path.join(fs.env.cwd(), envPath);
|
|
1220
|
+
if (!await fs.exists(absolutePath)) {
|
|
1221
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
1222
|
+
}
|
|
1223
|
+
const content = await fs.readFile(absolutePath, "utf-8");
|
|
1224
|
+
if (content === null) {
|
|
1225
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
1226
|
+
}
|
|
1227
|
+
return parseEnvContent(content);
|
|
1228
|
+
};
|
|
1169
1229
|
var saveEnvFileAsync = async ({
|
|
1170
1230
|
envPath,
|
|
1171
1231
|
data,
|
|
@@ -1740,6 +1800,61 @@ var getAuthEnv = async (options = {}) => {
|
|
|
1740
1800
|
}
|
|
1741
1801
|
return { authEnv, loginStatus: status };
|
|
1742
1802
|
};
|
|
1803
|
+
// ../auth/src/authProfileDetails.ts
|
|
1804
|
+
var ORGANIZATION_NAME_KEY = "UIPATH_ORGANIZATION_NAME";
|
|
1805
|
+
var TENANT_NAME_KEY = "UIPATH_TENANT_NAME";
|
|
1806
|
+
var URL_KEY = "UIPATH_URL";
|
|
1807
|
+
var ACCESS_TOKEN_KEY = "UIPATH_ACCESS_TOKEN";
|
|
1808
|
+
function statusFromToken(accessToken) {
|
|
1809
|
+
if (!accessToken) {
|
|
1810
|
+
return { status: "Not logged in" };
|
|
1811
|
+
}
|
|
1812
|
+
const expiration = getTokenExpiration(accessToken);
|
|
1813
|
+
if (expiration === undefined) {
|
|
1814
|
+
return { status: "Logged in" };
|
|
1815
|
+
}
|
|
1816
|
+
return {
|
|
1817
|
+
status: expiration.getTime() <= Date.now() ? "Expired" : "Logged in",
|
|
1818
|
+
expiresAt: expiration.toISOString()
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
async function describeAuthProfileAsync(name, filePath, active) {
|
|
1822
|
+
const base = {
|
|
1823
|
+
name,
|
|
1824
|
+
active,
|
|
1825
|
+
...filePath ? { path: filePath } : {}
|
|
1826
|
+
};
|
|
1827
|
+
if (!filePath) {
|
|
1828
|
+
return { ...base, status: "Not logged in" };
|
|
1829
|
+
}
|
|
1830
|
+
const fs = getFileSystem();
|
|
1831
|
+
const [readError, content] = await catchError(fs.readFile(filePath, "utf-8"));
|
|
1832
|
+
if (readError) {
|
|
1833
|
+
return { ...base, status: "Unreadable" };
|
|
1834
|
+
}
|
|
1835
|
+
if (content === null || content === undefined) {
|
|
1836
|
+
return { ...base, status: "Not logged in" };
|
|
1837
|
+
}
|
|
1838
|
+
const values = parseEnvContent(content);
|
|
1839
|
+
return {
|
|
1840
|
+
...base,
|
|
1841
|
+
...values[ORGANIZATION_NAME_KEY] ? { organizationName: values[ORGANIZATION_NAME_KEY] } : {},
|
|
1842
|
+
...values[TENANT_NAME_KEY] ? { tenantName: values[TENANT_NAME_KEY] } : {},
|
|
1843
|
+
...values[URL_KEY] ? { url: values[URL_KEY] } : {},
|
|
1844
|
+
...statusFromToken(values[ACCESS_TOKEN_KEY])
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
async function describeAuthProfilesAsync() {
|
|
1848
|
+
const activeProfile = getActiveAuthProfile();
|
|
1849
|
+
const [defaultPathError, defaultLocation] = await catchError(resolveEnvFilePathAsync());
|
|
1850
|
+
const rows = [
|
|
1851
|
+
await describeAuthProfileAsync(DEFAULT_AUTH_PROFILE, defaultPathError ? undefined : defaultLocation?.absolutePath, activeProfile === undefined)
|
|
1852
|
+
];
|
|
1853
|
+
for (const name of await listAuthProfileNamesAsync()) {
|
|
1854
|
+
rows.push(await describeAuthProfileAsync(name, resolveAuthProfileFilePath(name), activeProfile === name));
|
|
1855
|
+
}
|
|
1856
|
+
return rows;
|
|
1857
|
+
}
|
|
1743
1858
|
// ../auth/src/tokenGrant.ts
|
|
1744
1859
|
var requestClientCredentialsToken = async ({
|
|
1745
1860
|
tokenEndpoint,
|
|
@@ -2322,6 +2437,6 @@ var authenticate = async ({
|
|
|
2322
2437
|
});
|
|
2323
2438
|
};
|
|
2324
2439
|
|
|
2325
|
-
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, parseJWT, parseAuthFlow, resolveSessionIdentity, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, AUTH_FLOW_ENV_VAR, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync, CredentialSource, getLoginStatusAsync, getLoginStatusWithDeps, getAuthContext, getAuthEnv, ClientCredentialsAuthenticationError, clientCredentialsLogin, JWT_BEARER_ASSERTION_TYPE, FederatedCredentialsAuthenticationError, federatedCredentialsLogin, fetchTenantsAndOrganizations, TENANT_SELECTION_REQUIRED_CODE, INVALID_TENANT_CODE, TenantSelectionError, TenantSelectionRequiredError, InvalidTenantError, isTenantSelectionError, selectTenantWithDeps, interactiveLoginWithDeps, interactiveLogin, logoutWithDeps, logout, authenticate };
|
|
2440
|
+
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, getAuthProfilesRootPath, resolveAuthProfileDirPath, listAuthProfileNamesAsync, authProfileExistsAsync, deleteAuthProfileAsync, parseJWT, parseAuthFlow, resolveSessionIdentity, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, AUTH_FLOW_ENV_VAR, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync, CredentialSource, getLoginStatusAsync, getLoginStatusWithDeps, getAuthContext, getAuthEnv, describeAuthProfilesAsync, ClientCredentialsAuthenticationError, clientCredentialsLogin, JWT_BEARER_ASSERTION_TYPE, FederatedCredentialsAuthenticationError, federatedCredentialsLogin, fetchTenantsAndOrganizations, TENANT_SELECTION_REQUIRED_CODE, INVALID_TENANT_CODE, TenantSelectionError, TenantSelectionRequiredError, InvalidTenantError, isTenantSelectionError, selectTenantWithDeps, interactiveLoginWithDeps, interactiveLogin, logoutWithDeps, logout, authenticate };
|
|
2326
2441
|
|
|
2327
|
-
//# debugId=
|
|
2442
|
+
//# debugId=DD235729704777A964756E2164756E21
|