@uipath/vertical-solutions-tool 1.204.0 → 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/README.md +80 -0
- package/dist/THIRD-PARTY-NOTICES.md +1617 -369
- package/dist/createSdk-2f9x47em.js +12 -0
- package/dist/deploy-jobs-3k87fkwz.js +23 -0
- package/dist/deploy-service-qaykt7er.js +1779 -0
- package/dist/deployment-search-arbm2z06.js +2649 -0
- package/dist/embedded-file-reader-r66242ey.js +114 -0
- package/dist/first-party-service-srxaftkn.js +27 -0
- package/dist/index-7a3eqtxv.js +3174 -0
- package/dist/index-8s9dxpj4.js +18812 -0
- package/dist/index-fyc0k5dd.js +51405 -0
- package/dist/index-h43sj8at.js +23075 -0
- package/dist/index-kmp9fmhb.js +25 -0
- package/dist/index-ngs0a2he.js +15 -0
- package/dist/index.js +14 -3
- package/dist/index.umd.min-fqefd9kn.js +7814 -0
- package/dist/job-commands-azgbrbdb.js +23 -0
- package/dist/job-output-t43hzj1f.js +36 -0
- package/dist/prompts-dtgt183n.js +260 -0
- package/dist/resume-service-mqfnnzb5.js +344 -0
- package/dist/seed-service-2d1f7zaz.js +2014 -0
- package/dist/seed-templates-sqqqratr.js +14 -0
- package/dist/service-errors-jzbq3z7p.js +22 -0
- package/dist/solution-auth-zq6gyxsv.js +11 -0
- package/dist/solution-deployments-m44fyb88.js +33 -0
- package/dist/templates-85yrztpk.js +15 -0
- package/dist/tool-342sz3hm.js +439 -0
- package/dist/tool-38ad77wd.js +1472 -0
- package/dist/tool-4z1dy1rn.js +260 -0
- package/dist/tool-53w8skv5.js +262 -0
- package/dist/tool-67587985.js +554 -0
- package/dist/tool-87e2ps7f.js +13 -0
- package/dist/tool-cag2z2d6.js +30 -0
- package/dist/tool-e4qgwf9h.js +2281 -0
- package/dist/tool-gdtpsdn7.js +342 -0
- package/dist/tool-gvmshnq9.js +555 -0
- package/dist/tool-h4f967yd.js +73 -0
- package/dist/tool-hdxtgckw.js +249 -0
- package/dist/tool-jjxbj28g.js +17067 -0
- package/dist/tool-keqjsxdx.js +28 -0
- package/dist/tool-maw0g02p.js +24 -0
- package/dist/tool-mn1wkbhw.js +113 -0
- package/dist/tool-n35nrs32.js +4949 -0
- package/dist/tool-p589v2r5.js +114 -0
- package/dist/tool-pz9qm3dv.js +6723 -0
- package/dist/tool-r1ewa0tf.js +5645 -0
- package/dist/tool-r2epw08s.js +164 -0
- package/dist/tool-rr9fensp.js +12 -0
- package/dist/tool-s04z9t80.js +19 -0
- package/dist/tool-s9qbxa2g.js +638 -0
- package/dist/tool-tjhwq0ez.js +261 -0
- package/dist/tool-v15vxc4x.js +183 -0
- package/dist/tool-vf2mgth0.js +14286 -0
- package/dist/tool-vp7rjr2q.js +22083 -0
- package/dist/tool-xd2ejt3h.js +103 -0
- package/dist/tool-yx29vb63.js +672 -0
- package/dist/tool.js +12 -2
- package/dist/watch-job-wh6m7xzq.js +31 -0
- package/package.json +3 -3
- package/dist/tool-xymb3dsq.js +0 -45085
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getAuthContext,
|
|
3
|
+
getLoginStatusAsync
|
|
4
|
+
} from "./tool-38ad77wd.js";
|
|
5
|
+
import {
|
|
6
|
+
catchError
|
|
7
|
+
} from "./tool-pz9qm3dv.js";
|
|
8
|
+
|
|
9
|
+
// src/api/vss-config.ts
|
|
10
|
+
var API_PREFIX = "deployment-manager";
|
|
11
|
+
var SERVICE_PATH_SEGMENT = "verticalsolution_";
|
|
12
|
+
var LOCAL_SERVICE_URL = "http://localhost:8080";
|
|
13
|
+
function isLoopbackHost(url) {
|
|
14
|
+
return url.hostname === "localhost" || url.hostname === "127.0.0.1";
|
|
15
|
+
}
|
|
16
|
+
function isUiPathHost(url) {
|
|
17
|
+
const host = url.hostname.toLowerCase();
|
|
18
|
+
return host === "uipath.com" || host.endsWith(".uipath.com");
|
|
19
|
+
}
|
|
20
|
+
function withoutTrailingSlashes(url) {
|
|
21
|
+
return url.replace(/\/+$/, "");
|
|
22
|
+
}
|
|
23
|
+
function validateServiceUrl(raw) {
|
|
24
|
+
const trimmed = withoutTrailingSlashes(raw.trim());
|
|
25
|
+
if (trimmed === "local")
|
|
26
|
+
return LOCAL_SERVICE_URL;
|
|
27
|
+
const [parseError, url] = catchError(() => new URL(trimmed));
|
|
28
|
+
if (parseError || !url) {
|
|
29
|
+
throw new Error("Invalid --service-url: expected an absolute URL.");
|
|
30
|
+
}
|
|
31
|
+
if (url.search || url.hash || url.username || url.password) {
|
|
32
|
+
throw new Error(`Invalid --service-url for ${url.host}: a query, fragment or credentials are not ` + "allowed — give the service's origin and base path only.");
|
|
33
|
+
}
|
|
34
|
+
const secure = url.protocol === "https:";
|
|
35
|
+
if (isLoopbackHost(url) && (secure || url.protocol === "http:")) {
|
|
36
|
+
return trimmed;
|
|
37
|
+
}
|
|
38
|
+
if (secure && isUiPathHost(url))
|
|
39
|
+
return trimmed;
|
|
40
|
+
throw new Error(`Refusing to send credentials to ${url.host}: --service-url must be http(s) on ` + "localhost/127.0.0.1, or https on a uipath.com host.");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class VssConfigError extends Error {
|
|
44
|
+
instructions;
|
|
45
|
+
name = "VssConfigError";
|
|
46
|
+
constructor(message, instructions) {
|
|
47
|
+
super(message);
|
|
48
|
+
this.instructions = instructions;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async function createVssConfig(options = {}) {
|
|
52
|
+
const ctx = await getAuthContext({
|
|
53
|
+
tenant: options.tenant,
|
|
54
|
+
ensureTokenValidityMinutes: options.loginValidity ?? 10,
|
|
55
|
+
requireOrganizationName: options.serviceUrl === undefined,
|
|
56
|
+
requireTenantName: options.serviceUrl === undefined
|
|
57
|
+
});
|
|
58
|
+
if (options.serviceUrl !== undefined) {
|
|
59
|
+
const missing = [
|
|
60
|
+
ctx.organizationId ? undefined : "organization id",
|
|
61
|
+
ctx.tenantId ? undefined : "tenant id"
|
|
62
|
+
].filter((name) => name !== undefined);
|
|
63
|
+
if (missing.length > 0) {
|
|
64
|
+
throw new VssConfigError(`--service-url needs the login's ${missing.join(" and ")}, which this ` + "session does not carry.", "Run 'uip login' again, or drop --service-url to go through the platform gateway.");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const baseUrl = withoutTrailingSlashes(ctx.baseUrl);
|
|
68
|
+
const basePath = options.serviceUrl !== undefined ? `${options.serviceUrl}/${API_PREFIX}` : gatewayBasePath(baseUrl, ctx);
|
|
69
|
+
return {
|
|
70
|
+
basePath,
|
|
71
|
+
baseUrl,
|
|
72
|
+
accessToken: ctx.accessToken,
|
|
73
|
+
organizationName: ctx.organizationName,
|
|
74
|
+
tenantName: ctx.tenantName,
|
|
75
|
+
...await resolveActor(),
|
|
76
|
+
sendScopeIds: options.serviceUrl !== undefined,
|
|
77
|
+
organizationId: ctx.organizationId,
|
|
78
|
+
tenantId: options.tenant === undefined ? ctx.tenantId : undefined
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function gatewayBasePath(baseUrl, ctx) {
|
|
82
|
+
if (ctx.organizationName === undefined || ctx.tenantName === undefined) {
|
|
83
|
+
throw new VssConfigError("The login carries no organization or tenant name to route the request by.", "Run 'uip login' again and select a tenant.");
|
|
84
|
+
}
|
|
85
|
+
const org = encodeURIComponent(ctx.organizationName);
|
|
86
|
+
const tenant = encodeURIComponent(ctx.tenantName);
|
|
87
|
+
return `${baseUrl}/${org}/${tenant}/${SERVICE_PATH_SEGMENT}/${API_PREFIX}`;
|
|
88
|
+
}
|
|
89
|
+
async function resolveActor() {
|
|
90
|
+
const [, status] = await catchError(getLoginStatusAsync());
|
|
91
|
+
const identity = status?.identity;
|
|
92
|
+
const actor = identity?.userEmail;
|
|
93
|
+
return {
|
|
94
|
+
...identity?.type ? { actorType: identity.type } : {},
|
|
95
|
+
...identity?.subType ? { actorSubType: identity.subType } : {},
|
|
96
|
+
...identity?.authFlow ? { authFlow: identity.authFlow } : {},
|
|
97
|
+
...actor ? { actor } : {}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { isLoopbackHost, validateServiceUrl, VssConfigError, createVssConfig };
|
|
102
|
+
|
|
103
|
+
//# debugId=880AAEEA4DE38D1064756E2164756E21
|