@uipath/solution-tool 1.205.0-preview.281 → 1.206.0-preview.282

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 (132) hide show
  1. package/dist/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
  2. package/dist/{cleanup-command-service-je9d70vv.js → cleanup-command-service-kadmvyk4.js} +34 -31
  3. package/dist/deploy-delete-service-xa25k94p.js +23 -0
  4. package/dist/deploy-run-service-rsedb9hr.js +23 -0
  5. package/dist/{deploy-status-service-919yn8wn.js → deploy-status-service-nmm8k9fa.js} +72 -62
  6. package/dist/deploy.js +35 -37
  7. package/dist/deployment-search-wtbye8v6.js +54 -0
  8. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  9. package/dist/feed-resolver-28pfxmky.js +27 -0
  10. package/dist/feed-scope-failure-d4avsc7j.js +20 -0
  11. package/dist/feed-session-4skrr620.js +23 -0
  12. package/dist/first-party-service-n3vva2m4.js +8 -0
  13. package/dist/governance-options-bevmhh1z.js +19 -0
  14. package/dist/index-aspmac9f.js +24 -0
  15. package/dist/index-md8d2ttf.js +60 -0
  16. package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
  17. package/dist/index-qq4kre7a.js +93 -0
  18. package/dist/index-t262f2xv.js +16 -0
  19. package/dist/index.js +33 -34
  20. package/dist/init.js +18 -21
  21. package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
  22. package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
  23. package/dist/{list-5fke71jn.js → list-pnggwekk.js} +23 -23
  24. package/dist/models/pack-command-types.d.ts +3 -1
  25. package/dist/node-z9c03k2q.js +25 -0
  26. package/dist/pack-command-service-2txx876d.js +29 -0
  27. package/dist/{pack-project-ha0pxw3h.js → pack-project-ngwtfgge.js} +33 -40
  28. package/dist/pack.js +26 -30
  29. package/dist/package-id-350pep6r.js +11 -0
  30. package/dist/{packager-tool-5qzgdb66.js → packager-tool-0k205evy.js} +13 -15
  31. package/dist/{packager-tool-wm0jaz7p.js → packager-tool-0vz19vhv.js} +305 -657
  32. package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
  33. package/dist/{packager-tool-h1tq7bqf.js → packager-tool-41a5axkd.js} +65 -35
  34. package/dist/packager-tool-8097ps72.js +2307 -0
  35. package/dist/{packager-tool-1ybnxbp9.js → packager-tool-85f75be3.js} +18 -18
  36. package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
  37. package/dist/{packager-tool-pbmqk39a.js → packager-tool-a7s0gbxs.js} +33 -28
  38. package/dist/{packager-tool-47wzvqw0.js → packager-tool-aws5w512.js} +6 -6
  39. package/dist/packager-tool-c64hqa8n.js +106 -0
  40. package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
  41. package/dist/{packager-tool-d78ww4hb.js → packager-tool-cp66jc40.js} +51 -48
  42. package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
  43. package/dist/{packager-tool-cvf46scg.js → packager-tool-daphtc6e.js} +122 -89
  44. package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
  45. package/dist/packager-tool-f84z7nds.js +130 -0
  46. package/dist/{packager-tool-45a8fkw0.js → packager-tool-fgk0fkm5.js} +37 -39
  47. package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
  48. package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
  49. package/dist/{packager-tool-4pa108k7.js → packager-tool-g8ghm6wk.js} +11 -11
  50. package/dist/{packager-tool-2t72aez8.js → packager-tool-gpcr8zxf.js} +15 -15
  51. package/dist/packager-tool-gqb9ytg9.js +290 -0
  52. package/dist/packager-tool-hrkvdw31.js +280 -0
  53. package/dist/{packager-tool-056k8w2f.js → packager-tool-hs1kjv0c.js} +75 -9
  54. package/dist/{packager-tool-2vmz56qh.js → packager-tool-jatbb6c5.js} +184 -33
  55. package/dist/{packager-tool-f23a485e.js → packager-tool-jfp5mvqm.js} +176 -196
  56. package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
  57. package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
  58. package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
  59. package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
  60. package/dist/packager-tool-rb06drad.js +1178 -0
  61. package/dist/packager-tool-resolver-td3bhccd.js +20 -0
  62. package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
  63. package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
  64. package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
  65. package/dist/{packager-tool-gyqfs04e.js → packager-tool-vq5fwggb.js} +273 -255
  66. package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
  67. package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
  68. package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
  69. package/dist/{packager-tool-97rcgwvv.js → packager-tool-x461tgwy.js} +331 -55
  70. package/dist/{packager-tool-dnrk1gg6.js → packager-tool-y6efv1f8.js} +356 -298
  71. package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
  72. package/dist/packager-tool-z45eej6s.js +74 -0
  73. package/dist/packager-tool.js +6 -7
  74. package/dist/prepare-solution-resources-pwnyvtza.js +26 -0
  75. package/dist/{project-command-utils-t6pmpvq3.js → project-command-utils-zcmbecfy.js} +23 -26
  76. package/dist/project-contributions-kh9yftvg.js +27 -0
  77. package/dist/publish.js +17 -17
  78. package/dist/resource-mutations-mfn5k1hb.js +27 -0
  79. package/dist/{resource-version-lookup-0e3e2j58.js → resource-version-lookup-6ejh1hwd.js} +20 -23
  80. package/dist/resource.js +13 -16
  81. package/dist/{restore-command-service-pzpet021.js → restore-command-service-r7t52t25.js} +37 -34
  82. package/dist/{run-service-hk8w2h31.js → run-service-xrhg0z2a.js} +144 -66
  83. package/dist/services/deploy-activate-service.d.ts +2 -1
  84. package/dist/services/deployment-search-client.d.ts +2 -1
  85. package/dist/services/deployment-search.d.ts +39 -0
  86. package/dist/services/feed-resolver.d.ts +13 -1
  87. package/dist/services/feed-selection.d.ts +8 -5
  88. package/dist/services/feed-session.d.ts +34 -0
  89. package/dist/services/install-run.d.ts +92 -0
  90. package/dist/services/prepare-solution-resources.d.ts +11 -2
  91. package/dist/services/project-contributions.d.ts +2 -0
  92. package/dist/services/project-identity-telemetry.d.ts +3 -0
  93. package/dist/services/publish-service.d.ts +20 -3
  94. package/dist/services/solution-identity.d.ts +18 -0
  95. package/dist/ship-telemetry-bkf3800w.js +16 -0
  96. package/dist/solution-auth-jxcgd2m0.js +10 -0
  97. package/dist/solution-identity-92h2fbpa.js +19 -0
  98. package/dist/templates/AGENTS.md +27 -29
  99. package/dist/tool.js +32 -33
  100. package/package.json +2 -2
  101. package/dist/deploy-delete-service-0tm600d1.js +0 -25
  102. package/dist/deploy-run-service-hne5w17k.js +0 -25
  103. package/dist/deployment-search-32zvxn35.js +0 -55
  104. package/dist/feed-resolver-pdeb4wkq.js +0 -28
  105. package/dist/feed-scope-failure-4baame72.js +0 -19
  106. package/dist/feed-session-7xqphdrg.js +0 -17
  107. package/dist/first-party-service-sd8yaf73.js +0 -27
  108. package/dist/governance-options-bqgv5fte.js +0 -32
  109. package/dist/index-dqa169gp.js +0 -25
  110. package/dist/index-prm27bvm.js +0 -138
  111. package/dist/index-wdndcwab.js +0 -667
  112. package/dist/node-v7xhqwe2.js +0 -86
  113. package/dist/pack-command-service-b1v9c8cw.js +0 -35
  114. package/dist/package-id-rpzgy31w.js +0 -13
  115. package/dist/packager-tool-53w8skv5.js +0 -262
  116. package/dist/packager-tool-5edvzz80.js +0 -543
  117. package/dist/packager-tool-99jaqabz.js +0 -171
  118. package/dist/packager-tool-9hsmn8th.js +0 -418
  119. package/dist/packager-tool-azre7mm1.js +0 -182
  120. package/dist/packager-tool-fn13r8e1.js +0 -188
  121. package/dist/packager-tool-gdtpsdn7.js +0 -342
  122. package/dist/packager-tool-qw47eyw7.js +0 -43
  123. package/dist/packager-tool-resolver-994z3jkj.js +0 -23
  124. package/dist/packager-tool-tedbebpq.js +0 -5367
  125. package/dist/packager-tool-x1ah4eez.js +0 -68
  126. package/dist/prepare-solution-resources-m1djfj62.js +0 -29
  127. package/dist/project-contributions-79ndycrx.js +0 -32
  128. package/dist/resource-mutations-c3krjqze.js +0 -36
  129. package/dist/ship-telemetry-myes7ak5.js +0 -21
  130. package/dist/solution-auth-aead70sw.js +0 -11
  131. /package/dist/{packager-tool-act5r386.js → packager-tool-2pxe2r4j.js} +0 -0
  132. /package/dist/{packager-tool-kkfb5kgn.js → packager-tool-vrqbbh01.js} +0 -0
@@ -1,103 +1,98 @@
1
1
  import {
2
- resolveFeedSelectionAsync
3
- } from "./packager-tool-x1ah4eez.js";
2
+ catchError,
3
+ extractErrorDetails
4
+ } from "./packager-tool-m07vyk89.js";
4
5
  import {
5
- INCOMPLETE_SWEEP_ADVICE,
6
- findDeploymentAcrossFeeds,
7
- isNameOrFeedRefusal,
8
- reportIncompleteSweepAsync,
9
- retryAdvice
10
- } from "./packager-tool-1ybnxbp9.js";
6
+ logger,
7
+ DEFAULT_PAGE_SIZE,
8
+ PollOutcome,
9
+ mapPollFailure,
10
+ pollUntil,
11
+ quoteForShell
12
+ } from "./packager-tool-9vrwpgt3.js";
13
+ import {
14
+ getSolutionAuthContext2
15
+ } from "./packager-tool-ppj5f4y7.js";
16
+ import {
17
+ Configuration2,
18
+ DeploymentOperation,
19
+ DeploymentStatus,
20
+ PipelinesApi,
21
+ isMissingPipelinesRoute,
22
+ isApplicationSession,
23
+ parseSearchPage,
24
+ DeploymentSearchNeedsUserSessionError,
25
+ searchDeploymentsPage,
26
+ isAuthRefusal,
27
+ classifyFeedSession2,
28
+ feedSessionRefusal2,
29
+ feedReadRefusalForApplication2,
30
+ feedSessionRefusalAsync2,
31
+ feedReadRefusalAsync2
32
+ } from "./packager-tool-x461tgwy.js";
33
+ import {
34
+ Configuration3,
35
+ WorkflowAction2,
36
+ PackageInfoFromJSON,
37
+ SolutionDeploymentAction2,
38
+ DeploymentsApi2,
39
+ SearchApi
40
+ } from "./packager-tool-rb06drad.js";
41
+ import {
42
+ readDeploymentByKeyAsync2,
43
+ findDeploymentByName2,
44
+ isCompletedUninstall2,
45
+ findDeploymentsByName2,
46
+ newestDeploymentRow2
47
+ } from "./packager-tool-hrkvdw31.js";
11
48
  import {
12
- ACKNOWLEDGE_PERMANENT_DELETION_FLAG,
13
- NO_SERVER_REASON,
14
- acknowledgedButNotRunHint,
15
49
  activateDeployment,
50
+ NO_SERVER_REASON,
16
51
  describeValidationFailureAsync,
17
- formatPermanentDeletionResources,
18
- isPermanentDeletionRefusal,
19
52
  listPermanentDeletionResourcesAsync,
20
- pollPipelineDeploymentAsync,
21
- remainingTimeoutMs,
53
+ ACKNOWLEDGE_PERMANENT_DELETION_FLAG,
54
+ finiteOr,
55
+ runInstallToOutcomeAsync
56
+ } from "./packager-tool-daphtc6e.js";
57
+ import {
58
+ resolvePersonalWorkspace,
22
59
  resolveParentFolder,
23
- settlePermanentDeletionRefusalAsync,
24
- stillRequiresConfirmation
25
- } from "./packager-tool-cvf46scg.js";
60
+ folderKeyInitOverride2,
61
+ feedScopeInitOverride2,
62
+ feedSelectorFlag2,
63
+ describeFeedResolutionFailureAsync2,
64
+ resolveFeedScope2
65
+ } from "./packager-tool-gqb9ytg9.js";
26
66
  import {
27
- deploymentNextSteps,
28
- explainRefusal,
29
- isCurrentRecordAsync,
30
- needsPendingResources,
31
67
  pendingResourceApis,
68
+ reportedActivationStatus,
32
69
  readPendingResourcesAsync,
33
- reportedActivationStatus
34
- } from "./packager-tool-2t72aez8.js";
70
+ isCurrentRecordAsync,
71
+ explainRefusal,
72
+ needsPendingResources,
73
+ deploymentNextSteps
74
+ } from "./packager-tool-gpcr8zxf.js";
75
+ import {
76
+ resolveFeedSelectionAsync
77
+ } from "./packager-tool-z45eej6s.js";
35
78
  import {
36
- DRAFT_VERSION_MISMATCH_CODE,
37
79
  coerceWorkflowErrorMessages,
38
- explainPipelineStatusAfterInstall,
39
- formatDeploymentFailureDetails,
40
80
  formatServiceErrors,
81
+ formatDeploymentFailureDetails,
41
82
  hasServerErrorCode,
42
- installLandedDespiteStatus,
43
83
  isBareResponse,
44
- leavesPendingDraft
45
- } from "./packager-tool-act5r386.js";
46
- import {
47
- DeploymentSearchNeedsUserSessionError,
48
- findDeploymentByName,
49
- findDeploymentsByName,
50
- isApplicationSession,
51
- isAuthRefusal,
52
- isCompletedUninstall,
53
- isMissingPipelinesRoute,
54
- newestDeploymentRow,
55
- parseSearchPage,
56
- readDeploymentByKeyAsync,
57
- searchDeploymentsPage
58
- } from "./packager-tool-9hsmn8th.js";
59
- import {
60
- describeFeedResolutionFailureAsync,
61
- feedScopeInitOverride,
62
- feedSelectorFlag,
63
- folderKeyInitOverride,
64
- resolveFeedScope,
65
- resolvePersonalWorkspace
66
- } from "./packager-tool-azre7mm1.js";
67
- import {
68
- Configuration,
69
- DeploymentOperation,
70
- DeploymentStatus,
71
- PipelinesApi
72
- } from "./packager-tool-97rcgwvv.js";
73
- import {
74
- Configuration as Configuration2,
75
- DeploymentsApi,
76
- PackageInfoFromJSON,
77
- SearchApi,
78
- SolutionDeploymentAction,
79
- WorkflowAction
80
- } from "./packager-tool-tedbebpq.js";
81
- import {
82
- classifyFeedSession,
83
- feedReadRefusalForApplication,
84
- feedSessionRefusal
85
- } from "./packager-tool-qw47eyw7.js";
86
- import {
87
- getSolutionAuthContext
88
- } from "./packager-tool-61pwb567.js";
89
- import {
90
- DEFAULT_PAGE_SIZE,
91
- PollOutcome,
92
- logger,
93
- mapPollFailure,
94
- pollUntil,
95
- quoteForShell
96
- } from "./packager-tool-tx834spe.js";
84
+ DRAFT_VERSION_MISMATCH_CODE,
85
+ leavesPendingDraft,
86
+ installLandedDespiteStatus,
87
+ explainPipelineStatusAfterInstall
88
+ } from "./packager-tool-2pxe2r4j.js";
97
89
  import {
98
- catchError,
99
- extractErrorDetails
100
- } from "./packager-tool-6ybywxxn.js";
90
+ findDeploymentAcrossFeeds,
91
+ isNameOrFeedRefusal,
92
+ INCOMPLETE_SWEEP_ADVICE,
93
+ retryAdvice,
94
+ reportIncompleteSweepAsync
95
+ } from "./packager-tool-85f75be3.js";
101
96
 
102
97
  // src/services/deploy-activate-service.ts
103
98
  var fail = (reason, message, instructions, exitCode = 1) => ({
@@ -124,8 +119,8 @@ async function incompleteSweepRefusalAsync(deploymentName, skipped, result) {
124
119
  retry: report.retry
125
120
  };
126
121
  }
127
- async function activateDeploymentAsync(deploymentName, options = {}) {
128
- const [authError, auth] = await catchError(getSolutionAuthContext({
122
+ async function activateDeploymentAsync2(deploymentName, options = {}) {
123
+ const [authError, auth] = await catchError(getSolutionAuthContext2({
129
124
  tenant: options.tenant,
130
125
  loginValidity: options.loginValidity,
131
126
  envFilePath: options.envFilePath
@@ -149,7 +144,7 @@ async function activateDeploymentAsync(deploymentName, options = {}) {
149
144
  selectedFeed
150
145
  });
151
146
  const location = sweep.location;
152
- const scope = location?.scope ?? (selectedFeed ? feedScopeInitOverride(selectedFeed) : undefined);
147
+ const scope = location?.scope ?? (selectedFeed ? feedScopeInitOverride2(selectedFeed) : undefined);
153
148
  const result = await activateDeployment(auth, deploymentName, {
154
149
  timeoutSeconds: options.timeout ?? 360,
155
150
  pollIntervalMs: options.pollInterval ?? 5000,
@@ -163,7 +158,7 @@ async function activateDeploymentAsync(deploymentName, options = {}) {
163
158
  return incompleteSweepRefusalAsync(deploymentName, sweep.skipped, result);
164
159
  }
165
160
  const pendingResources = known && needsPendingResources(known) ? await readPendingResourcesAsync(pendingResourceApis(auth), known, scope) : undefined;
166
- const feedSelector = feedSelectorFlag(location?.feed ?? selectedFeed);
161
+ const feedSelector = feedSelectorFlag2(location?.feed ?? selectedFeed);
167
162
  const explanation = known ? explainRefusal(known, pendingResources, feedSelector) : undefined;
168
163
  const instructions = explanation ? [...explanation, details].join(`
169
164
  `) : known ? `Deployment '${known.name}' exists (Operation: ${known.operation}, OperationStatus: ${known.operationStatus}, ActivationStatus: ${known.activationStatus}) but the service refused to activate it. Check it with: uip solution deploy status ${known.key}${feedSelector}. ${details}` : selectedFeed ? `No deployment named '${deploymentName}' was found in the selected feed. Check the name with 'uip solution deploy list${feedSelector}', or drop the feed flag to search every feed you can reach. ${details}` : result.phase === "preActivateSteps" ? `Check deployment name. Deploy first with: uip solution deploy run. ${details}` : `Check deployment name matches an existing deployment. ${details}`;
@@ -177,8 +172,12 @@ async function activateDeploymentAsync(deploymentName, options = {}) {
177
172
  };
178
173
  }
179
174
  if (result.kind === "PollFailed") {
180
- const { reason, message, exitCode } = mapPollFailure(result.poll, "Activation");
181
- return fail(reason, message, "Activation may still be in progress.", exitCode);
175
+ const { reason, message, exitCode, errorCode, retry } = mapPollFailure(result.poll, "Activation");
176
+ return {
177
+ ...fail(reason, message, "Activation may still be in progress.", exitCode),
178
+ errorCode,
179
+ retry
180
+ };
182
181
  }
183
182
  if (result.kind === "ActivationFailed") {
184
183
  return fail("activation_failed", `Activation failed with status: ${result.status}`, result.errorMessage);
@@ -228,10 +227,10 @@ var refuseFeedRead = (refusal) => fail2("feed_requires_user_session", refusal.me
228
227
  errorCode: "permission_denied",
229
228
  retry: "RetryWillNotFix"
230
229
  });
231
- async function listDeploymentsAsync(options = {}) {
230
+ async function listDeploymentsAsync2(options = {}) {
232
231
  const limit = options.limit ?? DEFAULT_PAGE_SIZE;
233
232
  const offset = options.offset ?? 0;
234
- const [authError, auth] = await catchError(getSolutionAuthContext({
233
+ const [authError, auth] = await catchError(getSolutionAuthContext2({
235
234
  tenant: options.tenant,
236
235
  loginValidity: options.loginValidity,
237
236
  envFilePath: options.envFilePath
@@ -240,7 +239,7 @@ async function listDeploymentsAsync(options = {}) {
240
239
  return fail2("auth_failed", authError.message, authError.message);
241
240
  }
242
241
  if (options.personalWorkspace) {
243
- const refusal = feedReadRefusalForApplication(auth, "Listing the Personal Workspace's deployments");
242
+ const refusal = feedReadRefusalForApplication2(auth, "Listing the Personal Workspace's deployments");
244
243
  if (refusal) {
245
244
  return refuseFeedRead(refusal);
246
245
  }
@@ -255,7 +254,7 @@ async function listDeploymentsAsync(options = {}) {
255
254
  if (folderError) {
256
255
  return fail2("folder_resolution_failed", folderError.message, "Provide a valid --folder-path or --folder-key to filter by folder.");
257
256
  }
258
- const [scopeError, scope] = await catchError(resolveFeedScope({
257
+ const [scopeError, scope] = await catchError(resolveFeedScope2({
259
258
  personalWorkspace: options.personalWorkspace,
260
259
  feed: options.feed,
261
260
  tenant: options.tenant,
@@ -263,11 +262,11 @@ async function listDeploymentsAsync(options = {}) {
263
262
  envFilePath: options.envFilePath
264
263
  }));
265
264
  if (scopeError) {
266
- const { message, instructions, ...extras } = await describeFeedResolutionFailureAsync(scopeError, options, auth);
265
+ const { message, instructions, ...extras } = await describeFeedResolutionFailureAsync2(scopeError, options, auth);
267
266
  return fail2("feed_resolution_failed", message, instructions, extras);
268
267
  }
269
268
  if (scope.kind !== "tenant") {
270
- const refusal = feedReadRefusalForApplication(auth, `Listing the deployments of the feed '${scope.name ?? scope.folderKey}'`);
269
+ const refusal = await feedReadRefusalAsync2(auth, scope.folderKey, `Listing the deployments of the feed '${scope.name ?? scope.folderKey}'`);
271
270
  if (refusal) {
272
271
  return refuseFeedRead(refusal);
273
272
  }
@@ -280,7 +279,7 @@ async function listDeploymentsAsync(options = {}) {
280
279
  operationStatuses: options.operationStatuses ?? [],
281
280
  activationStatuses: options.activationStatuses ?? [],
282
281
  ...folderPathFilter ? { targetFolderName: folderPathFilter } : {}
283
- }, feedScopeInitOverride(scope)));
282
+ }, feedScopeInitOverride2(scope)));
284
283
  if (listError instanceof DeploymentSearchNeedsUserSessionError) {
285
284
  return fail2("list_request_failed", `Failed to list deployments: ${listError.message}`, "Run it with a user session ('uip login'). A client-credentials login cannot list deployments on this server.", { errorCode: "permission_denied", retry: "RetryWillNotFix" });
286
285
  }
@@ -506,7 +505,7 @@ function buildDeploymentStateInstructions(deployment, details, feedSelector = ""
506
505
  if (deployment.actions?.includes("Uninstall")) {
507
506
  return `Deployment '${deployment.name}' lists uninstall as available but Orchestrator rejected the request ${status}. Run 'uip solution deploy list${feedSelector}' to recheck its state, then retry. If it stays stuck, uninstall it from the Orchestrator Solutions UI. Details: ${details}`;
508
507
  }
509
- const removalAdvice = deployment.actions?.includes(WorkflowAction.Delete) ? `Delete it with: uip solution deploy delete ${quoteForShell(deployment.name)}${feedSelector} --yes.` : "Remove it from the Orchestrator Solutions UI.";
508
+ const removalAdvice = deployment.actions?.includes(WorkflowAction2.Delete) ? `Delete it with: uip solution deploy delete ${quoteForShell(deployment.name)}${feedSelector} --yes.` : "Remove it from the Orchestrator Solutions UI.";
510
509
  if (deployment.activationStatus === "Inactive") {
511
510
  return `Deployment '${deployment.name}' cannot be uninstalled in its current state ${status}. Available actions: ${availableActions}. Superseded or inactive deployments are never uninstallable. ${removalAdvice} Details: ${details}`;
512
511
  }
@@ -519,7 +518,7 @@ async function waitForOperationToFinishAsync(auth, deploymentName, opts) {
519
518
  let operationStatus;
520
519
  const readState = async () => {
521
520
  if (byKey && opts.deploymentKey) {
522
- const info = await readDeploymentByKeyAsync(auth, opts.deploymentKey, { scope: opts.scope, solutionsOnly });
521
+ const info = await readDeploymentByKeyAsync2(auth, opts.deploymentKey, { scope: opts.scope, solutionsOnly });
523
522
  if (info) {
524
523
  solutionsOnly = info.source === "solutions";
525
524
  operationStatus = info.operationStatus;
@@ -527,7 +526,7 @@ async function waitForOperationToFinishAsync(auth, deploymentName, opts) {
527
526
  }
528
527
  byKey = false;
529
528
  }
530
- last = await findDeploymentByName(auth, deploymentName, opts.scope);
529
+ last = await findDeploymentByName2(auth, deploymentName, opts.scope);
531
530
  operationStatus = last?.operationStatus;
532
531
  return last ? operationStatus : undefined;
533
532
  };
@@ -542,7 +541,7 @@ async function waitForOperationToFinishAsync(auth, deploymentName, opts) {
542
541
  signal: opts.signal
543
542
  });
544
543
  if (byKey) {
545
- const [, row] = await catchError(findDeploymentByName(auth, deploymentName, opts.scope));
544
+ const [, row] = await catchError(findDeploymentByName2(auth, deploymentName, opts.scope));
546
545
  const held = row ?? opts.known;
547
546
  last = row ?? (held && operationStatus ? { ...held, operationStatus } : held);
548
547
  }
@@ -552,7 +551,7 @@ async function requestUninstallAsync(api, auth, deploymentName, ctx) {
552
551
  const { options, sweep, scope, intervalMs, remainingMs } = ctx;
553
552
  const { location } = sweep;
554
553
  const sweepIncomplete = !location && !sweep.complete;
555
- const feedSelector = feedSelectorFlag(location?.feed ?? ctx.selectedFeed);
554
+ const feedSelector = feedSelectorFlag2(location?.feed ?? ctx.selectedFeed);
556
555
  let state = location?.deployment;
557
556
  let waited = false;
558
557
  let rechecked = false;
@@ -578,7 +577,7 @@ async function requestUninstallAsync(api, auth, deploymentName, ctx) {
578
577
  }
579
578
  if (!rechecked && !waited && state?.operationStatus !== "InProgress") {
580
579
  rechecked = true;
581
- const [readError, fresh] = await catchError(findDeploymentByName(auth, deploymentName, scope));
580
+ const [readError, fresh] = await catchError(findDeploymentByName2(auth, deploymentName, scope));
582
581
  if (!readError) {
583
582
  state = fresh;
584
583
  }
@@ -609,7 +608,7 @@ async function requestUninstallAsync(api, auth, deploymentName, ctx) {
609
608
  state = wait.state;
610
609
  continue;
611
610
  }
612
- if (sweepIncomplete && (!state || isCompletedUninstall(state))) {
611
+ if (sweepIncomplete && (!state || isCompletedUninstall2(state))) {
613
612
  if (isNameOrFeedRefusal(errorCode, context?.httpStatus)) {
614
613
  return incompleteSweepFailureAsync(deploymentName, sweep, details);
615
614
  }
@@ -626,8 +625,8 @@ async function incompleteSweepFailureAsync(deploymentName, sweep, refusalDetails
626
625
  const report = await reportIncompleteSweepAsync(deploymentName, sweep.skipped);
627
626
  return fail3("uninstall_request_failed", report.message, `${INCOMPLETE_SWEEP_ADVICE} Without its feed the uninstall request went to the tenant feed, which refused it. ${report.nextStep} Details: ${refusalDetails} (feed search: ${report.details})`, { errorCode: report.errorCode, retry: report.retry });
628
627
  }
629
- async function uninstallDeploymentAsync(deploymentName, options = {}) {
630
- const [authError, auth] = await catchError(getSolutionAuthContext({
628
+ async function uninstallDeploymentAsync2(deploymentName, options = {}) {
629
+ const [authError, auth] = await catchError(getSolutionAuthContext2({
631
630
  tenant: options.tenant,
632
631
  loginValidity: options.loginValidity,
633
632
  envFilePath: options.envFilePath
@@ -635,7 +634,7 @@ async function uninstallDeploymentAsync(deploymentName, options = {}) {
635
634
  if (authError) {
636
635
  return fail3("auth_failed", authError.message, authError.message);
637
636
  }
638
- const api = new PipelinesApi(new Configuration({
637
+ const api = new PipelinesApi(new Configuration2({
639
638
  basePath: auth.basePath,
640
639
  accessToken: auth.accessToken
641
640
  }));
@@ -655,7 +654,7 @@ async function uninstallDeploymentAsync(deploymentName, options = {}) {
655
654
  selectedFeed
656
655
  });
657
656
  const location = sweep.location;
658
- const scope = location?.scope ?? (selectedFeed ? feedScopeInitOverride(selectedFeed) : undefined);
657
+ const scope = location?.scope ?? (selectedFeed ? feedScopeInitOverride2(selectedFeed) : undefined);
659
658
  const [requestError, requested] = await catchError(requestUninstallAsync(api, auth, deploymentName, {
660
659
  options,
661
660
  sweep,
@@ -710,7 +709,7 @@ async function uninstallDeploymentAsync(deploymentName, options = {}) {
710
709
  const workflowErrors = coerceWorkflowErrorMessages(finalStatus.errorMessage).map((e) => e.errorMessage).join(", ");
711
710
  const serviceLines = formatServiceErrors(finalStatus.services);
712
711
  const errors = [workflowErrors, ...serviceLines].filter(Boolean).join("; ");
713
- const feedFlag = feedSelectorFlag(location?.feed ?? selectedFeed);
712
+ const feedFlag = feedSelectorFlag2(location?.feed ?? selectedFeed);
714
713
  if (!options.force) {
715
714
  const forceable = await forceableUninstallFailureAsync(api, deploymentName, {
716
715
  deploymentKey: finalStatus.deploymentKey,
@@ -778,13 +777,13 @@ var INVALID_TARGET = {
778
777
  };
779
778
  var GUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
780
779
  var UPGRADE_REFUSED_INSTRUCTIONS = "The server refused to start the upgrade. The deployment name may not exist, or may belong to a different package — check both with 'uip solution deploy list'. Another operation may still be running on it (wait, then retry), or it may be in a state the platform does not offer upgrades for.";
781
- async function upgradeDeploymentAsync(first, second) {
780
+ async function upgradeDeploymentAsync2(first, second) {
782
781
  const options = typeof first === "string" ? { ...second, deploymentKey: first } : first;
783
782
  const targetError = validateTarget(options);
784
783
  if (targetError) {
785
784
  return targetError;
786
785
  }
787
- const [authError, auth] = await catchError(getSolutionAuthContext({
786
+ const [authError, auth] = await catchError(getSolutionAuthContext2({
788
787
  tenant: options.tenant,
789
788
  loginValidity: options.loginValidity,
790
789
  envFilePath: options.envFilePath
@@ -792,7 +791,7 @@ async function upgradeDeploymentAsync(first, second) {
792
791
  if (authError) {
793
792
  return fail4("auth_failed", authError.message, AUTH_INSTRUCTIONS2);
794
793
  }
795
- const pipelinesApi = new PipelinesApi(new Configuration({
794
+ const pipelinesApi = new PipelinesApi(new Configuration2({
796
795
  basePath: auth.basePath,
797
796
  accessToken: auth.accessToken
798
797
  }));
@@ -833,10 +832,6 @@ async function upgradeDeploymentAsync(first, second) {
833
832
  pipelineDeploymentId: installResult.pipelineDeploymentId
834
833
  };
835
834
  };
836
- const installed = await installAsync();
837
- if (!installed.ok) {
838
- return installed;
839
- }
840
835
  const targetFields = {
841
836
  ...target.fromVersion !== undefined && {
842
837
  fromVersion: target.fromVersion
@@ -848,64 +843,49 @@ async function upgradeDeploymentAsync(first, second) {
848
843
  discardedDraftKey: target.discardedDraftKey
849
844
  }
850
845
  };
851
- if (options.noWait) {
846
+ const timeoutSeconds = finiteOr(options.timeout, DEFAULT_TIMEOUT_SECONDS);
847
+ const run = await runInstallToOutcomeAsync({
848
+ api: pipelinesApi,
849
+ auth,
850
+ deploymentName,
851
+ scope,
852
+ signal: options.signal,
853
+ timeoutSeconds,
854
+ pollIntervalMs: finiteOr(options.pollInterval, DEFAULT_POLL_INTERVAL_MS),
855
+ logPrefix: "deploy upgrade",
856
+ noWait: options.noWait,
857
+ acknowledge: options.acknowledgePermanentDeletion === true,
858
+ install: installAsync,
859
+ consentWording: (refused) => {
860
+ const refusedKey = refused.deploymentKey || undefined;
861
+ return {
862
+ verb: "Upgrading",
863
+ confirmHint: `re-run the same command with ${ACKNOWLEDGE_PERMANENT_DELETION_FLAG}: ${acknowledgeRetryCommand(options, target)}`,
864
+ keepCopiesHint: `discard the draft and upgrade without those links: ${discardRetryCommand(options, target, refusedKey)}, or remove the links from the deployment in Orchestrator first`
865
+ };
866
+ }
867
+ });
868
+ if (run.kind === "install_refused") {
869
+ return run.failure;
870
+ }
871
+ if (run.kind === "consent_refused") {
872
+ return failPermanentDeletion(run.refusal, run.pipelineDeploymentId, run.deploymentKey);
873
+ }
874
+ if (run.kind === "accepted") {
852
875
  return {
853
876
  ok: true,
854
877
  deploymentName,
855
878
  toVersion: targetVersion,
856
- pipelineDeploymentId: installed.pipelineDeploymentId,
879
+ pipelineDeploymentId: run.pipelineDeploymentId,
857
880
  ...targetFields,
858
881
  status: "Accepted"
859
882
  };
860
883
  }
861
- const timeoutSeconds = Number.isFinite(options.timeout) ? options.timeout : DEFAULT_TIMEOUT_SECONDS;
862
- const timeoutMs = timeoutSeconds * 1000;
863
- const deadline = Date.now() + timeoutMs;
864
- const pollAsync = (pipelineDeploymentId2) => pollPipelineDeploymentAsync(pipelinesApi, auth, {
865
- pipelineDeploymentId: pipelineDeploymentId2,
866
- deploymentName,
867
- scope,
868
- timeoutMs: remainingTimeoutMs(timeoutMs, deadline),
869
- intervalMs: Number.isFinite(options.pollInterval) ? options.pollInterval : DEFAULT_POLL_INTERVAL_MS,
870
- signal: options.signal,
871
- logPrefix: "deploy upgrade"
872
- });
873
- let pipelineDeploymentId = installed.pipelineDeploymentId;
874
- let poll = await pollAsync(pipelineDeploymentId);
875
- let permanentlyDeletedResources;
876
- if (poll.outcome === PollOutcome.Completed && isPermanentDeletionRefusal(poll.data)) {
877
- const refused = poll.data;
878
- const refusedKey = refused.deploymentKey || undefined;
879
- const keepCopiesHint = `discard the draft and upgrade without those links: ${discardRetryCommand(options, target, refusedKey)}, or remove the links from the deployment in Orchestrator first`;
880
- const consent = await settlePermanentDeletionRefusalAsync({
881
- api: pipelinesApi,
882
- deploymentName,
883
- scope,
884
- signal: options.signal,
885
- acknowledge: options.acknowledgePermanentDeletion === true,
886
- status: refused,
887
- verb: "Upgrading",
888
- confirmHint: `re-run the same command with ${ACKNOWLEDGE_PERMANENT_DELETION_FLAG}: ${acknowledgeRetryCommand(options, target)}`,
889
- keepCopiesHint
890
- });
891
- if (!consent.ok) {
892
- return failPermanentDeletion(consent, pipelineDeploymentId, refusedKey);
893
- }
894
- const reinstalled = await installAsync();
895
- if (!reinstalled.ok) {
896
- return {
897
- ...reinstalled,
898
- instructions: `${reinstalled.instructions} ${acknowledgedButNotRunHint(consent.resources, keepCopiesHint)}`
899
- };
900
- }
901
- pipelineDeploymentId = reinstalled.pipelineDeploymentId;
902
- poll = await pollAsync(pipelineDeploymentId);
903
- if (poll.outcome === PollOutcome.Completed && isPermanentDeletionRefusal(poll.data)) {
904
- const deploymentKey = poll.data?.deploymentKey || undefined;
905
- return failPermanentDeletion(stillRequiresConfirmation(deploymentName, consent.resources, deploymentKey), pipelineDeploymentId, deploymentKey);
906
- }
907
- permanentlyDeletedResources = consent.resources.map((resource) => formatPermanentDeletionResources([resource]));
908
- }
884
+ const {
885
+ pipelineDeploymentId,
886
+ pollResult: poll,
887
+ permanentlyDeletedResources
888
+ } = run;
909
889
  const base = {
910
890
  deploymentName,
911
891
  toVersion: targetVersion,
@@ -959,7 +939,7 @@ async function describeUpgradedDeploymentAsync(auth, deploymentName, finalStatus
959
939
  return { activationStatus: "Active" };
960
940
  }
961
941
  const reported = reportedActivationStatus(record);
962
- const [, rows] = reported ? [undefined, undefined] : await catchError(findDeploymentsByName(auth, deploymentName, scope));
942
+ const [, rows] = reported ? [undefined, undefined] : await catchError(findDeploymentsByName2(auth, deploymentName, scope));
963
943
  const row = rows?.find((candidate) => candidate.key === finalStatus.deploymentKey);
964
944
  const activationStatus = reported ?? row?.activationStatus ?? (actions.includes("SetupActivation") ? "NeedsSetupToActivate" : actions.includes("Activate") ? "ReadyToActivate" : undefined);
965
945
  if (!activationStatus) {
@@ -1073,9 +1053,9 @@ async function resolveTargetByNameAsync(pipelinesApi, auth, options) {
1073
1053
  const deploymentName = options.deploymentName;
1074
1054
  let scope;
1075
1055
  if (options.personalWorkspace) {
1076
- const verdict = classifyFeedSession(auth);
1056
+ const verdict = classifyFeedSession2(auth);
1077
1057
  if (verdict !== "user") {
1078
- const { message, instructions } = feedSessionRefusal(verdict, `Upgrading the Personal Workspace deployment '${deploymentName}'`, "address the deployment by key");
1058
+ const { message, instructions } = feedSessionRefusal2(verdict, `Upgrading the Personal Workspace deployment '${deploymentName}'`, "address the deployment by key");
1079
1059
  return fail4("feed_requires_user_session", message, instructions, {
1080
1060
  errorCode: "permission_denied",
1081
1061
  retry: "RetryWillNotFix"
@@ -1089,7 +1069,7 @@ async function resolveTargetByNameAsync(pipelinesApi, auth, options) {
1089
1069
  if (pwError || !pw) {
1090
1070
  return fail4("personal_workspace_failed", pwError?.message ?? "Personal Workspace could not be resolved.", "Ensure your user has a Personal Workspace, then retry.");
1091
1071
  }
1092
- scope = folderKeyInitOverride(pw.key);
1072
+ scope = folderKeyInitOverride2(pw.key);
1093
1073
  }
1094
1074
  const [existsError] = await catchError(pipelinesApi.pipelinesGetPreActivateSteps({ deploymentName }, scope));
1095
1075
  if (existsError) {
@@ -1100,15 +1080,15 @@ async function resolveTargetByNameAsync(pipelinesApi, auth, options) {
1100
1080
  }
1101
1081
  return fail4("lookup_failed", detail.details ? `${detail.message}: ${detail.details}` : detail.message, `The existence check for '${deploymentName}' failed before any upgrade was requested. Retry, or address the deployment by key: uip solution deploy upgrade <deployment-key>.`, { errorCode: detail.errorCode, retry: detail.retry });
1102
1082
  }
1103
- const [rowsError, rows] = await catchError(findDeploymentsByName(auth, deploymentName, scope));
1083
+ const [rowsError, rows] = await catchError(findDeploymentsByName2(auth, deploymentName, scope));
1104
1084
  if (rowsError) {
1105
- const unreadable = rowsError instanceof DeploymentSearchNeedsUserSessionError || classifyFeedSession(auth) === "application" && isAuthRefusal(rowsError);
1085
+ const unreadable = rowsError instanceof DeploymentSearchNeedsUserSessionError || classifyFeedSession2(auth) === "application" && isAuthRefusal(rowsError);
1106
1086
  if (!unreadable) {
1107
1087
  const detail = await extractErrorDetails(rowsError);
1108
1088
  return fail4("lookup_failed", `The status check for '${deploymentName}' failed: ${detail.message}`, "The deployment exists, but whether it is still installed could not be confirmed, and upgrading an uninstalled name would deploy the package afresh under it. Retry, or address the deployment by key: uip solution deploy upgrade <deployment-key>.", { errorCode: detail.errorCode, retry: detail.retry });
1109
1089
  }
1110
1090
  }
1111
- if (isCompletedUninstall(rows ? newestDeploymentRow(rows) : undefined)) {
1091
+ if (isCompletedUninstall2(rows ? newestDeploymentRow2(rows) : undefined)) {
1112
1092
  return fail4("deployment_uninstalled", `Deployment '${deploymentName}' has been uninstalled, so there is nothing to upgrade.`, "The install route would create a new deployment under that name rather than upgrade this one. Deploy the package afresh with 'uip solution deploy run', or pick a live deployment from 'uip solution deploy list'.", INVALID_TARGET);
1113
1093
  }
1114
1094
  const resolved = {
@@ -1117,7 +1097,7 @@ async function resolveTargetByNameAsync(pipelinesApi, auth, options) {
1117
1097
  listFlag: scope ? "--personal-workspace" : undefined
1118
1098
  };
1119
1099
  let discardedDraftKey;
1120
- const newest = rows ? newestDeploymentRow(rows) : undefined;
1100
+ const newest = rows ? newestDeploymentRow2(rows) : undefined;
1121
1101
  if (newest?.operationStatus === "Draft") {
1122
1102
  const draft = {
1123
1103
  key: newest.key,
@@ -1166,7 +1146,7 @@ async function resolveTargetByKeyAsync(pipelinesApi, auth, options, deploymentKe
1166
1146
  const [lookupError, info] = await catchError(pipelinesApi.pipelinesGetDeploymentByKey({ key: deploymentKey }));
1167
1147
  if (lookupError || !info) {
1168
1148
  const detail = lookupError ? await extractErrorDetails(lookupError) : undefined;
1169
- if (detail?.context?.httpStatus === 404 && classifyFeedSession(auth) === "user") {
1149
+ if (detail?.context?.httpStatus === 404 && classifyFeedSession2(auth) === "user") {
1170
1150
  return resolveTargetByKeyViaSolutionsAsync(pipelinesApi, auth, options, deploymentKey);
1171
1151
  }
1172
1152
  if (!detail || detail.context?.httpStatus === 404) {
@@ -1179,15 +1159,15 @@ async function resolveTargetByKeyAsync(pipelinesApi, auth, options, deploymentKe
1179
1159
  }
1180
1160
  let scope;
1181
1161
  if (info.locationKey) {
1182
- const verdict = classifyFeedSession(auth);
1183
- if (verdict !== "user") {
1184
- const { message, instructions } = feedSessionRefusal(verdict, `Upgrading deployment '${info.deploymentName}', which is in a Personal Workspace or folder feed (folder key ${info.locationKey}),`, "run the upgrade from the Orchestrator UI");
1162
+ const refusal = await feedSessionRefusalAsync2(auth, info.locationKey, "write", `Upgrading deployment '${info.deploymentName}', which is in a Personal Workspace or folder feed (folder key ${info.locationKey}),`, "run the upgrade from the Orchestrator UI");
1163
+ if (refusal) {
1164
+ const { message, instructions } = refusal;
1185
1165
  return fail4("feed_requires_user_session", message, instructions, {
1186
1166
  errorCode: "permission_denied",
1187
1167
  retry: "RetryWillNotFix"
1188
1168
  });
1189
1169
  }
1190
- scope = folderKeyInitOverride(info.locationKey);
1170
+ scope = folderKeyInitOverride2(info.locationKey);
1191
1171
  } else if (options.personalWorkspace) {
1192
1172
  return fail4("invalid_target", `Deployment '${info.deploymentName}' (${deploymentKey}) is on the tenant feed, not in a Personal Workspace.`, "Drop --personal-workspace: with a deployment key the feed is read from the deployment itself.", INVALID_TARGET);
1193
1173
  }
@@ -1269,9 +1249,9 @@ async function resolveTargetByKeyViaSolutionsAsync(pipelinesApi, auth, options,
1269
1249
  if (pwError || !pw) {
1270
1250
  return fail4("personal_workspace_failed", pwError?.message ?? "Personal Workspace could not be resolved.", "Ensure your user has a Personal Workspace, then retry.");
1271
1251
  }
1272
- scope = folderKeyInitOverride(pw.key);
1252
+ scope = folderKeyInitOverride2(pw.key);
1273
1253
  }
1274
- const deploymentsApi = new DeploymentsApi(new Configuration2({
1254
+ const deploymentsApi = new DeploymentsApi2(new Configuration3({
1275
1255
  basePath: auth.basePath,
1276
1256
  accessToken: auth.accessToken
1277
1257
  }));
@@ -1349,8 +1329,8 @@ async function describeUpgradeFailureAsync(basePath, accessToken, pipelineDeploy
1349
1329
  if (explained || !finalStatus.deploymentKey) {
1350
1330
  return fromPipeline;
1351
1331
  }
1352
- const deploymentsApi = new DeploymentsApi(new Configuration2({ basePath, accessToken }));
1353
- const reason = await describeValidationFailureAsync(deploymentsApi, finalStatus.deploymentKey, SolutionDeploymentAction.Upgrade, scope, signal);
1332
+ const deploymentsApi = new DeploymentsApi2(new Configuration3({ basePath, accessToken }));
1333
+ const reason = await describeValidationFailureAsync(deploymentsApi, finalStatus.deploymentKey, SolutionDeploymentAction2.Upgrade, scope, signal);
1354
1334
  return reason === NO_SERVER_REASON ? fromPipeline : `Validation: ${reason}
1355
1335
  ${fromPipeline}`;
1356
1336
  }
@@ -1358,7 +1338,7 @@ ${fromPipeline}`;
1358
1338
  // ../solution-sdk/src/legacy-package-search.ts
1359
1339
  var LEGACY_PACKAGE_SEARCH_ROUTE = "POST /api/search/packages";
1360
1340
  async function searchPackagesLegacy(auth, query, scope) {
1361
- const api = new SearchApi(new Configuration2({
1341
+ const api = new SearchApi(new Configuration3({
1362
1342
  basePath: auth.basePath,
1363
1343
  accessToken: auth.accessToken
1364
1344
  }));
@@ -1396,10 +1376,10 @@ function isNonEmptyString(row, field) {
1396
1376
  var serversWithoutPipelinesSearch = new Set;
1397
1377
  async function searchPackagesPage(auth, query, scope) {
1398
1378
  if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
1399
- const [error, body2] = await catchError(searchViaPipelines(auth, query, scope));
1379
+ const [error, body] = await catchError(searchViaPipelines(auth, query, scope));
1400
1380
  if (!error) {
1401
1381
  return {
1402
- ...parseSearchPage(body2, PIPELINES_SEARCH_ROUTE, PACKAGE_ROWS),
1382
+ ...parseSearchPage(body, PIPELINES_SEARCH_ROUTE, PACKAGE_ROWS),
1403
1383
  source: "pipelines"
1404
1384
  };
1405
1385
  }
@@ -1419,7 +1399,7 @@ async function searchPackagesPage(auth, query, scope) {
1419
1399
  };
1420
1400
  }
1421
1401
  async function searchViaPipelines(auth, query, scope) {
1422
- const api = new PipelinesApi(new Configuration({
1402
+ const api = new PipelinesApi(new Configuration2({
1423
1403
  basePath: auth.basePath,
1424
1404
  accessToken: auth.accessToken
1425
1405
  }));
@@ -1447,10 +1427,10 @@ var refuseFeedRead2 = (refusal) => fail5("feed_requires_user_session", refusal.m
1447
1427
  errorCode: "permission_denied",
1448
1428
  retry: "RetryWillNotFix"
1449
1429
  });
1450
- async function listPackagesAsync(options = {}) {
1430
+ async function listPackagesAsync2(options = {}) {
1451
1431
  const limit = options.limit ?? DEFAULT_PAGE_SIZE;
1452
1432
  const offset = options.offset ?? 0;
1453
- const [authError, auth] = await catchError(getSolutionAuthContext({
1433
+ const [authError, auth] = await catchError(getSolutionAuthContext2({
1454
1434
  tenant: options.tenant,
1455
1435
  loginValidity: options.loginValidity,
1456
1436
  envFilePath: options.envFilePath
@@ -1459,12 +1439,12 @@ async function listPackagesAsync(options = {}) {
1459
1439
  return fail5("auth_failed", authError.message, authError.message);
1460
1440
  }
1461
1441
  if (options.personalWorkspace) {
1462
- const refusal = feedReadRefusalForApplication(auth, "Listing the Personal Workspace's packages");
1442
+ const refusal = feedReadRefusalForApplication2(auth, "Listing the Personal Workspace's packages");
1463
1443
  if (refusal) {
1464
1444
  return refuseFeedRead2(refusal);
1465
1445
  }
1466
1446
  }
1467
- const [scopeError, scope] = await catchError(resolveFeedScope({
1447
+ const [scopeError, scope] = await catchError(resolveFeedScope2({
1468
1448
  personalWorkspace: options.personalWorkspace,
1469
1449
  feed: options.feed,
1470
1450
  tenant: options.tenant,
@@ -1472,11 +1452,11 @@ async function listPackagesAsync(options = {}) {
1472
1452
  envFilePath: options.envFilePath
1473
1453
  }));
1474
1454
  if (scopeError) {
1475
- const { message, instructions, ...extras } = await describeFeedResolutionFailureAsync(scopeError, options, auth);
1455
+ const { message, instructions, ...extras } = await describeFeedResolutionFailureAsync2(scopeError, options, auth);
1476
1456
  return fail5("feed_resolution_failed", message, instructions, extras);
1477
1457
  }
1478
1458
  if (scope.kind !== "tenant") {
1479
- const refusal = feedReadRefusalForApplication(auth, `Listing the packages of the feed '${scope.name ?? scope.folderKey}'`);
1459
+ const refusal = await feedReadRefusalAsync2(auth, scope.folderKey, `Listing the packages of the feed '${scope.name ?? scope.folderKey}'`, "packages");
1480
1460
  if (refusal) {
1481
1461
  return refuseFeedRead2(refusal);
1482
1462
  }
@@ -1487,7 +1467,7 @@ async function listPackagesAsync(options = {}) {
1487
1467
  orderByColumn: options.sortBy ?? "publishDate",
1488
1468
  orderByDirection: options.sortOrder ?? "Descending",
1489
1469
  searchTerm: options.name
1490
- }, feedScopeInitOverride(scope)));
1470
+ }, feedScopeInitOverride2(scope)));
1491
1471
  if (listError instanceof PackageSearchNeedsUserSessionError) {
1492
1472
  return fail5("list_request_failed", `Failed to list packages: ${listError.message}`, "Run it with a user session ('uip login'). A client-credentials login cannot list packages on this server.", { errorCode: "permission_denied", retry: "RetryWillNotFix" });
1493
1473
  }
@@ -1505,6 +1485,6 @@ async function listPackagesAsync(options = {}) {
1505
1485
  };
1506
1486
  }
1507
1487
 
1508
- export { activateDeploymentAsync, listDeploymentsAsync, uninstallDeploymentAsync, upgradeDeploymentAsync, listPackagesAsync };
1488
+ export { activateDeploymentAsync2, listDeploymentsAsync2, uninstallDeploymentAsync2, upgradeDeploymentAsync2, listPackagesAsync2 };
1509
1489
 
1510
- //# debugId=AC06BACB6D23A44764756E2164756E21
1490
+ //# debugId=A1C4A5D519F3025564756E2164756E21