@uipath/solution-tool 1.204.0-preview.254 → 1.205.0-preview.256

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 (122) hide show
  1. package/README.md +3 -3
  2. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  3. package/dist/archive-extract-x35t9ktj.js +120 -0
  4. package/dist/cleanup-command-service-n4e7vxnw.js +149 -0
  5. package/dist/deploy-delete-service-cag0q8yx.js +25 -0
  6. package/dist/deploy-run-service-f0h8wb9w.js +25 -0
  7. package/dist/{deploy-status-service-sa302ab9.js → deploy-status-service-yh6xn6e0.js} +41 -33
  8. package/dist/deploy.js +23 -17
  9. package/dist/{deployment-search-692d15j3.js → deployment-search-mnywd9nc.js} +16 -10
  10. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  11. package/dist/{feed-resolver-yybwzmh6.js → feed-resolver-fve33dxq.js} +10 -9
  12. package/dist/feed-scope-failure-jmg4t1r1.js +19 -0
  13. package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
  14. package/dist/governance-options-4vxz7ekn.js +32 -0
  15. package/dist/index-g8c8nf1c.js +667 -0
  16. package/dist/index-prm27bvm.js +138 -0
  17. package/dist/index.js +27 -29
  18. package/dist/init.js +11 -10
  19. package/dist/{list-0qrxqrfn.js → list-50mepbed.js} +10 -8
  20. package/dist/models/pack-command-types.d.ts +15 -0
  21. package/dist/node-7jm7ksqa.js +86 -0
  22. package/dist/pack-command-service-dewf5vsq.js +35 -0
  23. package/dist/pack-project-xwd1rbaa.js +97 -0
  24. package/dist/pack.js +24 -14
  25. package/dist/package-id-1wr3cy9c.js +13 -0
  26. package/dist/packager-tool-09swr9cp.js +171 -0
  27. package/dist/{packager-tool-dapys0dd.js → packager-tool-2vmsh5pt.js} +196 -1519
  28. package/dist/{packager-tool-px1j9kre.js → packager-tool-3bwnkjdq.js} +2 -2
  29. package/dist/{packager-tool-gb35b4qs.js → packager-tool-43ahv5mn.js} +192 -96
  30. package/dist/{packager-tool-5v92rtp2.js → packager-tool-47by487p.js} +6 -4
  31. package/dist/packager-tool-47wzvqw0.js +86 -0
  32. package/dist/{packager-tool-zns6n8zp.js → packager-tool-5ddtwzva.js} +1 -1
  33. package/dist/packager-tool-5edvzz80.js +543 -0
  34. package/dist/{packager-tool-13dsb9e6.js → packager-tool-5n6jsn41.js} +104 -14
  35. package/dist/packager-tool-60af1hw2.js +26 -0
  36. package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
  37. package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
  38. package/dist/packager-tool-6ybywxxn.js +1809 -0
  39. package/dist/packager-tool-8ptbmmmp.js +2132 -0
  40. package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
  41. package/dist/{packager-tool-9z1yxjme.js → packager-tool-9t26kde1.js} +3556 -1646
  42. package/dist/packager-tool-act5r386.js +239 -0
  43. package/dist/packager-tool-amhyxzz6.js +125 -0
  44. package/dist/packager-tool-b03rva43.js +188 -0
  45. package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
  46. package/dist/{packager-tool-v8rseyfk.js → packager-tool-d6rrfd46.js} +149 -53
  47. package/dist/packager-tool-frr2xmkr.js +445 -0
  48. package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
  49. package/dist/packager-tool-gs3f3tf7.js +103 -0
  50. package/dist/packager-tool-jg692f13.js +517 -0
  51. package/dist/packager-tool-jmpb786m.js +109 -0
  52. package/dist/{packager-tool-4ytxbjez.js → packager-tool-kds8ytzw.js} +74 -23
  53. package/dist/packager-tool-kkfb5kgn.js +182 -0
  54. package/dist/packager-tool-kvcxg0zv.js +1510 -0
  55. package/dist/packager-tool-n3jfjn5r.js +42 -0
  56. package/dist/{packager-tool-8sx1w3h1.js → packager-tool-n5d5dx5j.js} +2196 -3455
  57. package/dist/{packager-tool-97w8aw8y.js → packager-tool-nsya65z1.js} +357 -1370
  58. package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
  59. package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
  60. package/dist/{packager-tool-erp9bv22.js → packager-tool-rc3hwn4b.js} +25 -4
  61. package/dist/packager-tool-resolver-994z3jkj.js +23 -0
  62. package/dist/{packager-tool-d9ethrmn.js → packager-tool-rvt68c1t.js} +17 -8
  63. package/dist/{packager-tool-gab9y5ct.js → packager-tool-t8gh825q.js} +37 -13
  64. package/dist/{packager-tool-kswwd3hp.js → packager-tool-tx834spe.js} +2376 -4077
  65. package/dist/{packager-tool-zf3929se.js → packager-tool-v1f5e8t9.js} +11 -1
  66. package/dist/{packager-tool-wjk91v0q.js → packager-tool-w77d72a7.js} +13 -11
  67. package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
  68. package/dist/packager-tool-wz34ma3s.js +1333 -0
  69. package/dist/packager-tool-zq16e1xv.js +68 -0
  70. package/dist/packager-tool.js +2 -2
  71. package/dist/prepare-solution-resources-m1djfj62.js +29 -0
  72. package/dist/project-command-utils-t6pmpvq3.js +90 -0
  73. package/dist/project-contributions-79ndycrx.js +32 -0
  74. package/dist/publish.js +13 -12
  75. package/dist/resource-mutations-c3krjqze.js +36 -0
  76. package/dist/resource-version-lookup-0e3e2j58.js +99 -0
  77. package/dist/resource.js +10 -9
  78. package/dist/restore-command-service-5v0b9363.js +155 -0
  79. package/dist/run-service-tg6b67wp.js +428 -0
  80. package/dist/services/deploy-activate-service.d.ts +10 -5
  81. package/dist/services/deploy-delete-service.d.ts +8 -4
  82. package/dist/services/deploy-run-service.d.ts +34 -1
  83. package/dist/services/deploy-uninstall-service.d.ts +21 -3
  84. package/dist/services/deploy-upgrade-service.d.ts +35 -1
  85. package/dist/services/deployment-feed-locator.d.ts +15 -4
  86. package/dist/services/deployment-search-client.d.ts +5 -53
  87. package/dist/services/deployment-search.d.ts +58 -3
  88. package/dist/services/deployment-state.d.ts +84 -24
  89. package/dist/services/deployment-validation.d.ts +5 -0
  90. package/dist/services/emit-runtime-dependencies.d.ts +2 -1
  91. package/dist/services/feed-resolver.d.ts +6 -4
  92. package/dist/services/feed-selection.d.ts +47 -0
  93. package/dist/services/http-status.d.ts +2 -7
  94. package/dist/services/pack-command-service.d.ts +9 -0
  95. package/dist/services/pack-project-selection.d.ts +51 -0
  96. package/dist/services/pack-project.d.ts +26 -0
  97. package/dist/services/pack-service.d.ts +7 -3
  98. package/dist/services/package-search-client.d.ts +7 -0
  99. package/dist/services/packager-tool-resolver.d.ts +7 -1
  100. package/dist/services/packages-list-service.d.ts +1 -1
  101. package/dist/services/permanent-deletion-consent.d.ts +110 -0
  102. package/dist/services/pipeline-deploy-poll.d.ts +7 -0
  103. package/dist/services/prepare-solution-resources.d.ts +12 -2
  104. package/dist/services/project-contributions.d.ts +5 -4
  105. package/dist/services/search-failure.d.ts +9 -13
  106. package/dist/services/solution-packager-helpers.d.ts +5 -2
  107. package/dist/services/solution-path.d.ts +1 -1
  108. package/dist/services/uninstall-consent.d.ts +82 -0
  109. package/dist/ship-telemetry-myes7ak5.js +21 -0
  110. package/dist/solution-auth-aead70sw.js +11 -0
  111. package/dist/templates/AGENTS.md +125 -12
  112. package/dist/tool.js +27 -29
  113. package/dist/utils/deployment-errors.d.ts +9 -1
  114. package/package.json +2 -2
  115. package/dist/deploy-delete-service-7fms6rrp.js +0 -22
  116. package/dist/feed-scope-failure-kf94beem.js +0 -18
  117. package/dist/packager-tool-f2e9rzxk.js +0 -104
  118. package/dist/packager-tool-resolver-6zwhec62.js +0 -20
  119. package/dist/packager-tool-zdfn32bc.js +0 -4465
  120. package/dist/prepare-solution-resources-jpb5as2s.js +0 -25
  121. package/dist/project-contributions-6wpff2hm.js +0 -30
  122. package/dist/services/legacy-deployment-search-v3.d.ts +0 -23
@@ -1,44 +1,36 @@
1
1
  import {
2
- Configuration as Configuration2,
2
+ Configuration,
3
3
  PipelinesApi
4
- } from "./packager-tool-7gr2nphb.js";
4
+ } from "./packager-tool-97rcgwvv.js";
5
5
  import {
6
- Configuration,
6
+ Configuration as Configuration2,
7
7
  DeploymentSearchItemDto2FromJSON,
8
+ DeploymentsApi,
8
9
  SearchApi
9
- } from "./packager-tool-9z1yxjme.js";
10
+ } from "./packager-tool-9t26kde1.js";
10
11
  import {
11
12
  classifyFeedSession
12
- } from "./packager-tool-bqre28m1.js";
13
+ } from "./packager-tool-qw47eyw7.js";
14
+ import {
15
+ resolveSessionIdentity
16
+ } from "./packager-tool-43ahv5mn.js";
13
17
  import {
14
- catchError,
18
+ httpStatusOf,
15
19
  logger
16
- } from "./packager-tool-kswwd3hp.js";
17
-
18
- // src/services/http-status.ts
19
- function httpStatusOf(error) {
20
- if (!error || typeof error !== "object") {
21
- return;
22
- }
23
- const response = error.response;
24
- const fromResponse = response && typeof response === "object" ? response.status : undefined;
25
- const status = typeof fromResponse === "number" ? fromResponse : error.status;
26
- return typeof status === "number" ? status : undefined;
27
- }
28
- function isAuthRefusal(error) {
29
- const status = httpStatusOf(error);
30
- return status === 401 || status === 403;
31
- }
20
+ } from "./packager-tool-tx834spe.js";
21
+ import {
22
+ catchError
23
+ } from "./packager-tool-6ybywxxn.js";
32
24
 
33
- // src/services/legacy-deployment-search-v3.ts
25
+ // ../solution-sdk/src/legacy-deployment-search-v3.ts
26
+ var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
34
27
  async function searchDeploymentsLegacyV3(auth, query, scope) {
35
- const api = new SearchApi(new Configuration({
28
+ const api = new SearchApi(new Configuration2({
36
29
  basePath: auth.basePath,
37
30
  accessToken: auth.accessToken
38
31
  }));
39
- const result = await api.searchSearchDeployments22({ deploymentsSearchRequest2: toLegacyV3Request(query) }, scope);
40
- const values = result.values ?? [];
41
- return { count: result.count, values };
32
+ const response = await api.searchSearchDeployments22Raw({ deploymentsSearchRequest2: toLegacyV3Request(query) }, scope);
33
+ return response.raw.json();
42
34
  }
43
35
  function toLegacyV3Request(query) {
44
36
  return {
@@ -54,7 +46,63 @@ function toLegacyV3Request(query) {
54
46
  };
55
47
  }
56
48
 
57
- // src/services/deployment-search-client.ts
49
+ // ../solution-sdk/src/pipelines-route.ts
50
+ async function isMissingPipelinesRoute(error) {
51
+ const status = httpStatusOf(error);
52
+ if (status === 405) {
53
+ return true;
54
+ }
55
+ if (status !== 404 || !error || typeof error !== "object") {
56
+ return false;
57
+ }
58
+ if (!("response" in error)) {
59
+ return true;
60
+ }
61
+ const response = error.response;
62
+ if (!(response instanceof Response)) {
63
+ return false;
64
+ }
65
+ const [readError, body] = await catchError((async () => response.clone().text())());
66
+ if (readError) {
67
+ return false;
68
+ }
69
+ return body.trim() === "";
70
+ }
71
+ function isApplicationSession(auth) {
72
+ const identity = auth.identity ?? resolveSessionIdentity(auth.accessToken);
73
+ return identity?.type === "Application";
74
+ }
75
+ function notAPage(route, what, options) {
76
+ return new Error(`${route} answered with ${what}.`, options);
77
+ }
78
+ function parseSearchPage(body, route, kind) {
79
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
80
+ throw notAPage(route, `a body that is not a page of ${kind.plural}`);
81
+ }
82
+ const values = "values" in body ? body.values : undefined;
83
+ if (values !== undefined && values !== null && !Array.isArray(values)) {
84
+ throw notAPage(route, `\`values\` that is not a list of ${kind.plural}`);
85
+ }
86
+ const rows = Array.isArray(values) ? values : [];
87
+ const count = "count" in body && typeof body.count === "number" && body.count >= 0 ? body.count : undefined;
88
+ return { count, values: rows.map((row) => parseRow(row, route, kind)) };
89
+ }
90
+ function parseRow(row, route, kind) {
91
+ const what = `a row that is not a ${kind.singular}`;
92
+ if (!row || typeof row !== "object" || Array.isArray(row)) {
93
+ throw notAPage(route, what);
94
+ }
95
+ if (kind.isRow && !kind.isRow(row)) {
96
+ throw notAPage(route, what);
97
+ }
98
+ const [error, parsed] = catchError(() => kind.fromJSON(row));
99
+ if (error) {
100
+ throw notAPage(route, what, { cause: error });
101
+ }
102
+ return parsed;
103
+ }
104
+
105
+ // ../solution-sdk/src/deployment-search.ts
58
106
  var PIPELINES_SEARCH_ROUTE = "POST /v1/pipelines/deployments/search";
59
107
 
60
108
  class DeploymentSearchNeedsUserSessionError extends Error {
@@ -64,38 +112,37 @@ class DeploymentSearchNeedsUserSessionError extends Error {
64
112
  }
65
113
  }
66
114
  var serversWithoutPipelinesSearch = new Set;
67
- async function isMissingPipelinesSearchRoute(error) {
68
- const status = httpStatusOf(error);
69
- if (status === 405) {
70
- return true;
71
- }
72
- if (status !== 404) {
73
- return false;
74
- }
75
- const response = error.response;
76
- const [, body] = await catchError(response ? response.clone().text() : Promise.resolve(""));
77
- return (body ?? "").trim() === "";
78
- }
115
+ var DEPLOYMENT_ROWS = {
116
+ singular: "deployment",
117
+ plural: "deployments",
118
+ fromJSON: DeploymentSearchItemDto2FromJSON
119
+ };
79
120
  async function searchDeploymentsPage(auth, query, scope) {
80
121
  if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
81
- const [error, page2] = await catchError(searchViaPipelines(auth, query, scope));
122
+ const [error, body2] = await catchError(searchViaPipelines(auth, query, scope));
82
123
  if (!error) {
83
- return { ...page2, source: "pipelines" };
124
+ return {
125
+ ...parseSearchPage(body2, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
126
+ source: "pipelines"
127
+ };
84
128
  }
85
- if (!await isMissingPipelinesSearchRoute(error)) {
129
+ if (!await isMissingPipelinesRoute(error)) {
86
130
  throw error;
87
131
  }
88
132
  serversWithoutPipelinesSearch.add(auth.basePath);
89
- logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated POST /api/v3/search/deployments.`);
133
+ logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated ${LEGACY_V3_SEARCH_ROUTE}.`);
90
134
  }
91
- if (classifyFeedSession(auth) === "application") {
135
+ if (isApplicationSession(auth)) {
92
136
  throw new DeploymentSearchNeedsUserSessionError;
93
137
  }
94
- const page = await searchDeploymentsLegacyV3(auth, query, scope);
95
- return { ...page, source: "legacy-v3" };
138
+ const body = await searchDeploymentsLegacyV3(auth, query, scope);
139
+ return {
140
+ ...parseSearchPage(body, LEGACY_V3_SEARCH_ROUTE, DEPLOYMENT_ROWS),
141
+ source: "legacy-v3"
142
+ };
96
143
  }
97
144
  async function searchViaPipelines(auth, query, scope) {
98
- const api = new PipelinesApi(new Configuration2({
145
+ const api = new PipelinesApi(new Configuration({
99
146
  basePath: auth.basePath,
100
147
  accessToken: auth.accessToken
101
148
  }));
@@ -113,12 +160,61 @@ async function searchViaPipelines(auth, query, scope) {
113
160
  activationStatuses: query.activationStatuses
114
161
  }
115
162
  }, scope);
116
- const body = await response.raw.json();
117
- const values = (body.values ?? []).map((row) => DeploymentSearchItemDto2FromJSON(row));
118
- return { count: body.count, values };
163
+ return response.raw.json();
164
+ }
165
+ // src/services/http-status.ts
166
+ function isAuthRefusal(error) {
167
+ const status = httpStatusOf(error);
168
+ return status === 401 || status === 403;
119
169
  }
120
170
 
121
171
  // src/services/deployment-search.ts
172
+ async function readDeploymentByKeyAsync(auth, deploymentKey, options = {}) {
173
+ if (!options.solutionsOnly) {
174
+ const api = new PipelinesApi(new Configuration({
175
+ basePath: auth.basePath,
176
+ accessToken: auth.accessToken
177
+ }));
178
+ const [error, info] = await catchError(api.pipelinesGetDeploymentByKey({ key: deploymentKey }));
179
+ if (!error) {
180
+ return info ? fromPipelinesRecord(info) : undefined;
181
+ }
182
+ if (httpStatusOf(error) !== 404) {
183
+ throw error;
184
+ }
185
+ }
186
+ if (classifyFeedSession(auth) !== "user") {
187
+ return;
188
+ }
189
+ return readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, options.scope);
190
+ }
191
+ function fromPipelinesRecord(info) {
192
+ return {
193
+ deploymentKey: info.deploymentKey,
194
+ operationStatus: info.operationStatus,
195
+ installedRootFolderKey: info.installedRootFolderKey,
196
+ source: "pipelines"
197
+ };
198
+ }
199
+ async function readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, scope) {
200
+ const api = new DeploymentsApi(new Configuration2({
201
+ basePath: auth.basePath,
202
+ accessToken: auth.accessToken
203
+ }));
204
+ const [error, row] = await catchError(api.deploymentsGetByKey({ deploymentKey }, scope));
205
+ if (error) {
206
+ if (httpStatusOf(error) === 404) {
207
+ return;
208
+ }
209
+ throw error;
210
+ }
211
+ return row ? {
212
+ deploymentKey: row.key,
213
+ operationStatus: row.operationStatus,
214
+ installedRootFolderKey: row.installedRootFolderKey,
215
+ source: "solutions"
216
+ } : undefined;
217
+ }
122
218
  async function findDeploymentByName(auth, deploymentName, scope) {
123
219
  return newestDeploymentRow(await findDeploymentsByName(auth, deploymentName, scope));
124
220
  }
@@ -317,6 +413,6 @@ async function resolveInstalledFolder(deployment, requested, resolveFolderByKey)
317
413
  return fallback;
318
414
  }
319
415
 
320
- export { httpStatusOf, isAuthRefusal, DeploymentSearchNeedsUserSessionError, searchDeploymentsPage, findDeploymentByName, findLiveDeploymentByName, isCompletedUninstall, findDeploymentsByPackageName, findCurrentDeploymentAsync, blocksRedeploy, MAX_LISTED_DEPLOYMENTS, formatExistingDeployments, findDeploymentsByName, findDeploymentBestEffort, newestDeploymentRow, isPipelineDeploymentNotFoundError, interpretFailedDeployPoll, mapOperationStatusToPipelineStatus, deploymentToTerminalPipelineResult, resolveInstalledFolder };
416
+ export { isMissingPipelinesRoute, isApplicationSession, parseSearchPage, DeploymentSearchNeedsUserSessionError, searchDeploymentsPage, isAuthRefusal, readDeploymentByKeyAsync, readDeploymentByKeyViaSolutionsAsync, findDeploymentByName, findLiveDeploymentByName, isCompletedUninstall, findDeploymentsByPackageName, findCurrentDeploymentAsync, blocksRedeploy, MAX_LISTED_DEPLOYMENTS, formatExistingDeployments, findDeploymentsByName, findDeploymentBestEffort, newestDeploymentRow, isPipelineDeploymentNotFoundError, interpretFailedDeployPoll, mapOperationStatusToPipelineStatus, deploymentToTerminalPipelineResult, resolveInstalledFolder };
321
417
 
322
- //# debugId=982982E1F13E2BA464756E2164756E21
418
+ //# debugId=FCF9A6B25A39008364756E2164756E21