@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.
Files changed (60) hide show
  1. package/README.md +80 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +1617 -369
  3. package/dist/createSdk-2f9x47em.js +12 -0
  4. package/dist/deploy-jobs-3k87fkwz.js +23 -0
  5. package/dist/deploy-service-qaykt7er.js +1779 -0
  6. package/dist/deployment-search-arbm2z06.js +2649 -0
  7. package/dist/embedded-file-reader-r66242ey.js +114 -0
  8. package/dist/first-party-service-srxaftkn.js +27 -0
  9. package/dist/index-7a3eqtxv.js +3174 -0
  10. package/dist/index-8s9dxpj4.js +18812 -0
  11. package/dist/index-fyc0k5dd.js +51405 -0
  12. package/dist/index-h43sj8at.js +23075 -0
  13. package/dist/index-kmp9fmhb.js +25 -0
  14. package/dist/index-ngs0a2he.js +15 -0
  15. package/dist/index.js +14 -3
  16. package/dist/index.umd.min-fqefd9kn.js +7814 -0
  17. package/dist/job-commands-azgbrbdb.js +23 -0
  18. package/dist/job-output-t43hzj1f.js +36 -0
  19. package/dist/prompts-dtgt183n.js +260 -0
  20. package/dist/resume-service-mqfnnzb5.js +344 -0
  21. package/dist/seed-service-2d1f7zaz.js +2014 -0
  22. package/dist/seed-templates-sqqqratr.js +14 -0
  23. package/dist/service-errors-jzbq3z7p.js +22 -0
  24. package/dist/solution-auth-zq6gyxsv.js +11 -0
  25. package/dist/solution-deployments-m44fyb88.js +33 -0
  26. package/dist/templates-85yrztpk.js +15 -0
  27. package/dist/tool-342sz3hm.js +439 -0
  28. package/dist/tool-38ad77wd.js +1472 -0
  29. package/dist/tool-4z1dy1rn.js +260 -0
  30. package/dist/tool-53w8skv5.js +262 -0
  31. package/dist/tool-67587985.js +554 -0
  32. package/dist/tool-87e2ps7f.js +13 -0
  33. package/dist/tool-cag2z2d6.js +30 -0
  34. package/dist/tool-e4qgwf9h.js +2281 -0
  35. package/dist/tool-gdtpsdn7.js +342 -0
  36. package/dist/tool-gvmshnq9.js +555 -0
  37. package/dist/tool-h4f967yd.js +73 -0
  38. package/dist/tool-hdxtgckw.js +249 -0
  39. package/dist/tool-jjxbj28g.js +17067 -0
  40. package/dist/tool-keqjsxdx.js +28 -0
  41. package/dist/tool-maw0g02p.js +24 -0
  42. package/dist/tool-mn1wkbhw.js +113 -0
  43. package/dist/tool-n35nrs32.js +4949 -0
  44. package/dist/tool-p589v2r5.js +114 -0
  45. package/dist/tool-pz9qm3dv.js +6723 -0
  46. package/dist/tool-r1ewa0tf.js +5645 -0
  47. package/dist/tool-r2epw08s.js +164 -0
  48. package/dist/tool-rr9fensp.js +12 -0
  49. package/dist/tool-s04z9t80.js +19 -0
  50. package/dist/tool-s9qbxa2g.js +638 -0
  51. package/dist/tool-tjhwq0ez.js +261 -0
  52. package/dist/tool-v15vxc4x.js +183 -0
  53. package/dist/tool-vf2mgth0.js +14286 -0
  54. package/dist/tool-vp7rjr2q.js +22083 -0
  55. package/dist/tool-xd2ejt3h.js +103 -0
  56. package/dist/tool-yx29vb63.js +672 -0
  57. package/dist/tool.js +12 -2
  58. package/dist/watch-job-wh6m7xzq.js +31 -0
  59. package/package.json +3 -3
  60. package/dist/tool-xymb3dsq.js +0 -45085
@@ -0,0 +1,164 @@
1
+ import {
2
+ VssApiError,
3
+ VssInputError,
4
+ VssResponseError,
5
+ errorCodeOf,
6
+ requiredVersionOf
7
+ } from "./tool-4z1dy1rn.js";
8
+ import {
9
+ checkBeforeResubmitting,
10
+ routingFlags,
11
+ shellQuote
12
+ } from "./tool-cag2z2d6.js";
13
+ import {
14
+ failure
15
+ } from "./tool-h4f967yd.js";
16
+ import {
17
+ JOB_STATUSES
18
+ } from "./tool-s04z9t80.js";
19
+ import {
20
+ exports_external
21
+ } from "./tool-vf2mgth0.js";
22
+ import {
23
+ RESULTS
24
+ } from "./tool-pz9qm3dv.js";
25
+
26
+ // src/services/service-errors.ts
27
+ var JobFinishedDetailsSchema = exports_external.object({ status: exports_external.string() });
28
+ function finishedJobConflict(error, attempting) {
29
+ if (!(error instanceof VssApiError) || error.status !== 409) {
30
+ return;
31
+ }
32
+ const match = /cannot (cancel|resume) a job in status '([a-z_]+)'/i.exec(error.message);
33
+ if (error.code !== "JobFinished" && !match)
34
+ return;
35
+ const status = JobFinishedDetailsSchema.safeParse(error.details).data?.status ?? match?.[2] ?? "finished";
36
+ const verb = attempting ?? (match?.[1].toLowerCase() === "resume" ? "resume" : "cancel");
37
+ return { verb, status };
38
+ }
39
+ function knownJobStatus(status) {
40
+ return JOB_STATUSES.find((known) => known === status);
41
+ }
42
+ function jobLabel(options) {
43
+ const job = options.jobId === undefined ? "<job-id>" : shellQuote(options.jobId);
44
+ return `${job}${routingFlags(options.routing)}`;
45
+ }
46
+ function responseErrorInstructions(options, transient) {
47
+ const { attempting } = options;
48
+ if (attempting === "submit") {
49
+ return "The submit reached the service, so a deploy job may exist. " + checkBeforeResubmitting(options.routing);
50
+ }
51
+ const job = jobLabel(options);
52
+ if (attempting === "cancel" || attempting === "resume") {
53
+ return `The ${attempting} reached the service, so it may have taken effect: ` + `check the job with: uip vss deploy status ${job} — before trying again.`;
54
+ }
55
+ if (attempting === "read" || options.jobId !== undefined) {
56
+ return "The job is running server-side and is checkpointed; deploying again " + `would submit a second one. Read it with: uip vss deploy status ${job} ` + `— and pick it up with: uip vss deploy resume ${job}`;
57
+ }
58
+ return transient ? "Run the command again; if it keeps answering this way, check the service status." : "The service's answer cannot be read, and asking again returns the same one. Check the service status.";
59
+ }
60
+ function toDeployFailure(error, context, options = {}) {
61
+ if (error instanceof VssInputError) {
62
+ return failure("invalid-option", error.message, `Pass a ${error.kind} containing only letters, numbers, dots, underscores, or hyphens.`, {
63
+ result: RESULTS.ValidationError,
64
+ errorCode: "invalid_argument"
65
+ });
66
+ }
67
+ if (error instanceof VssResponseError) {
68
+ return failure("service-error", `${context}: ${error.message}`, responseErrorInstructions(options, error.transient), {
69
+ errorCode: "server_error",
70
+ retry: error.transient ? "RetryLater" : "RetryWillNotFix"
71
+ });
72
+ }
73
+ if (!(error instanceof VssApiError)) {
74
+ return transportFailure(error, context, options);
75
+ }
76
+ return capacityOrAuthFailure(error, context, options) ?? conflictFailure(error, context, options) ?? notFoundFailure(error, context, options) ?? entitlementCheckFailure(error, context, options) ?? otherServiceFailure(error, context, options);
77
+ }
78
+ function transportFailure(error, context, options) {
79
+ const message = error instanceof Error ? error.message : String(error);
80
+ return failure("service-error", `${context}: ${message}`, "Check the network path to the service and retry. If it keeps failing, run " + "'uip login' again — a stale session shows up here too." + knownJobNextStep(options), { errorCode: "network_error", retry: "RetryLater" });
81
+ }
82
+ function knownJobNextStep(options) {
83
+ if (options.jobId === undefined)
84
+ return "";
85
+ return ` The job itself is not lost: read it with: uip vss deploy status ` + `${jobLabel(options)} — starting a new deploy would submit a second ` + "job rather than pick this one up.";
86
+ }
87
+ function capacityOrAuthFailure(error, context, options) {
88
+ const correlationId = error.correlationId;
89
+ if (error.status === 429) {
90
+ return failure("capacity", `${context}: the service is at deploy capacity.`, "Wait a few seconds and try again — the load balancer spreads retries across instances." + knownJobNextStep(options), {
91
+ correlationId,
92
+ errorCode: "rate_limited",
93
+ retry: "RetryAfter10Seconds"
94
+ });
95
+ }
96
+ if (error.status === 403) {
97
+ return failure("not-entitled", `${context}: ${error.message}`, "This organization needs the Vertical.Unlimited entitlement. Contact your UiPath account team." + knownJobNextStep(options), {
98
+ correlationId,
99
+ errorCode: "permission_denied",
100
+ retry: "RetryWillNotFix"
101
+ });
102
+ }
103
+ if (error.status === 401) {
104
+ return failure("service-error", `${context}: ${error.message}`, "Run 'uip login' to re-authenticate, then try again." + knownJobNextStep(options), {
105
+ result: RESULTS.AuthenticationError,
106
+ correlationId,
107
+ errorCode: "authentication_required"
108
+ });
109
+ }
110
+ return;
111
+ }
112
+ function conflictFailure(error, context, options) {
113
+ const correlationId = error.correlationId;
114
+ if (errorCodeOf(error) === "MajorUpgradeConflict") {
115
+ const required = requiredVersionOf(error);
116
+ return failure("blocked-major-upgrade", `${context}: ${error.message}`, required ? `Majors are breaking changes and cannot be skipped. Deploy ${required} first, ` + `then upgrade again: --package-version ${required}` : "Majors are breaking changes and cannot be skipped. Deploy the next published major first.", { correlationId });
117
+ }
118
+ if (error.status !== 409)
119
+ return;
120
+ const finished = finishedJobConflict(error, options.attempting === "cancel" || options.attempting === "resume" ? options.attempting : undefined);
121
+ if (finished) {
122
+ const done = finished.status === "succeeded" || finished.status === "canceled";
123
+ const job = jobLabel(options);
124
+ return failure("service-error", `${context}: ${error.message}`, done ? `The job is already ${finished.status}; there is nothing to ${finished.verb}. ` + `Check it with: uip vss deploy status ${job}` : `The job is ${finished.status}, which the service will not ${finished.verb} ` + `from. Check it with: uip vss deploy status ${job} — then try again.`, {
125
+ correlationId,
126
+ retry: done ? "RetryWillNotFix" : "RetryAfter10Seconds"
127
+ });
128
+ }
129
+ return failure("service-error", `${context}: ${error.message}`, "Another job may already hold this tenant or folder. Check the " + "conflicting job with: uip vss deploy status <job-id>" + `${routingFlags(options.routing)} — or wait for it to finish.`, { correlationId, retry: "RetryAfter30Seconds" });
130
+ }
131
+ function notFoundFailure(error, context, options) {
132
+ if (error.status !== 404)
133
+ return;
134
+ const correlationId = error.correlationId;
135
+ if (options.notFound === "job") {
136
+ const flags = routingFlags(options.routing);
137
+ return failure("unknown-job", `${context}: ${error.message}`, flags === "" ? "Check the job id: 'uip vss deploy' prints it when it submits, and a job belongs " + "to the tenant it was submitted from, so make sure the login points at that tenant." : `Check the job id, and that${flags} names where it was submitted: 'uip vss deploy' ` + "prints the id when it submits, and a job belongs to the service and tenant it " + "came from — this read went to the ones those flags name, not to the login's.", { correlationId, errorCode: "not_found" });
138
+ }
139
+ return failure("unknown-version", `${context}: ${error.message}`, "Check the package name and version against what has been published.", { correlationId, errorCode: "not_found" });
140
+ }
141
+ function entitlementCheckFailure(error, context, options) {
142
+ if (options.attempting !== "submit" || error.status !== 502 && error.status !== 504) {
143
+ return;
144
+ }
145
+ return failure("entitlement-check-failed", `${context}: ${error.message}`, "The entitlement check could not be completed, so the deploy was refused rather " + "than run unverified. Retry shortly; if it persists, contact UiPath support " + "with the correlation id.", {
146
+ correlationId: error.correlationId,
147
+ errorCode: "server_error",
148
+ retry: "RetryAfter30Seconds"
149
+ });
150
+ }
151
+ function otherServiceFailure(error, context, options) {
152
+ const serverSide = error.status >= 500;
153
+ return failure("service-error", `${context}: ${error.message}`, (serverSide ? "The service failed on its side. Retry shortly; if it persists, report the " + "correlation id above to the service team." : "The service rejected the request as sent. Check the values passed, then retry.") + knownJobNextStep(options), {
154
+ correlationId: error.correlationId,
155
+ ...serverSide ? {
156
+ errorCode: "server_error",
157
+ retry: "RetryLater"
158
+ } : {}
159
+ });
160
+ }
161
+
162
+ export { finishedJobConflict, knownJobStatus, toDeployFailure };
163
+
164
+ //# debugId=678E900AEEC6FC9864756E2164756E21
@@ -0,0 +1,12 @@
1
+ // src/services/display-text.ts
2
+ var CONTROL_BYTES = /[\u0000-\u0008\u000B-\u001F\u007F-\u009F]/g;
3
+ function forDisplay(text) {
4
+ return text.replace(CONTROL_BYTES, "");
5
+ }
6
+ function forDisplayIfSet(text) {
7
+ return typeof text === "string" ? forDisplay(text) : undefined;
8
+ }
9
+
10
+ export { forDisplay, forDisplayIfSet };
11
+
12
+ //# debugId=906BC04B5341BFBB64756E2164756E21
@@ -0,0 +1,19 @@
1
+ // src/api/types.ts
2
+ var DEPLOY_ACTIONS = ["install", "upgrade", "downgrade"];
3
+ var JOB_STATUSES = [
4
+ "queued",
5
+ "running",
6
+ "action_required",
7
+ "succeeded",
8
+ "failed",
9
+ "canceled"
10
+ ];
11
+ var TERMINAL_JOB_STATUSES = new Set([
12
+ "succeeded",
13
+ "failed",
14
+ "canceled"
15
+ ]);
16
+
17
+ export { DEPLOY_ACTIONS, JOB_STATUSES, TERMINAL_JOB_STATUSES };
18
+
19
+ //# debugId=992DC22732095AF864756E2164756E21