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

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-ejakyhea.js} +34 -31
  3. package/dist/deploy-delete-service-r7abfh28.js +23 -0
  4. package/dist/deploy-run-service-rnthz10q.js +23 -0
  5. package/dist/{deploy-status-service-919yn8wn.js → deploy-status-service-6my5vm61.js} +72 -62
  6. package/dist/deploy.js +35 -37
  7. package/dist/deployment-search-gfm907tx.js +54 -0
  8. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  9. package/dist/feed-resolver-14crsx5y.js +27 -0
  10. package/dist/feed-scope-failure-67cyybn0.js +20 -0
  11. package/dist/feed-session-g94q2bjc.js +23 -0
  12. package/dist/first-party-service-n3vva2m4.js +8 -0
  13. package/dist/governance-options-t20vsznh.js +19 -0
  14. package/dist/index-aspmac9f.js +24 -0
  15. package/dist/index-ddk6v1ej.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-jntan9tx.js} +23 -23
  24. package/dist/models/pack-command-types.d.ts +3 -1
  25. package/dist/node-kwzcw5ex.js +25 -0
  26. package/dist/pack-command-service-pwaeha7y.js +29 -0
  27. package/dist/{pack-project-ha0pxw3h.js → pack-project-ztt1hfrs.js} +33 -40
  28. package/dist/pack.js +26 -30
  29. package/dist/package-id-4tsg5jsb.js +11 -0
  30. package/dist/{packager-tool-4pa108k7.js → packager-tool-1bz9h5ca.js} +11 -11
  31. package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
  32. package/dist/{packager-tool-f23a485e.js → packager-tool-55ztfccd.js} +176 -196
  33. package/dist/{packager-tool-45a8fkw0.js → packager-tool-95y24705.js} +37 -39
  34. package/dist/{packager-tool-2vmz56qh.js → packager-tool-9j8e5q1z.js} +184 -33
  35. package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
  36. package/dist/packager-tool-a6va4gc5.js +1178 -0
  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-97rcgwvv.js → packager-tool-bs1jn1yn.js} +331 -55
  40. package/dist/packager-tool-c64hqa8n.js +106 -0
  41. package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
  42. package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
  43. package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
  44. package/dist/packager-tool-f84z7nds.js +130 -0
  45. package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
  46. package/dist/packager-tool-fqs6hdcy.js +290 -0
  47. package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
  48. package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
  49. package/dist/{packager-tool-gyqfs04e.js → packager-tool-nrhqgr4z.js} +273 -255
  50. package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
  51. package/dist/{packager-tool-d78ww4hb.js → packager-tool-pyt9fvty.js} +51 -48
  52. package/dist/packager-tool-q5d9df2q.js +74 -0
  53. package/dist/{packager-tool-cvf46scg.js → packager-tool-q8ryk6q9.js} +122 -89
  54. package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
  55. package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
  56. package/dist/packager-tool-resolver-td3bhccd.js +20 -0
  57. package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
  58. package/dist/{packager-tool-2t72aez8.js → packager-tool-snm6s7b5.js} +15 -15
  59. package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
  60. package/dist/{packager-tool-wm0jaz7p.js → packager-tool-t3a48ys5.js} +305 -657
  61. package/dist/{packager-tool-dnrk1gg6.js → packager-tool-t3ahzjh1.js} +356 -298
  62. package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
  63. package/dist/packager-tool-vrtabg73.js +2307 -0
  64. package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
  65. package/dist/{packager-tool-h1tq7bqf.js → packager-tool-vx39dhvn.js} +65 -35
  66. package/dist/{packager-tool-5qzgdb66.js → packager-tool-w34wyhwf.js} +13 -15
  67. package/dist/packager-tool-w8bcwfd3.js +280 -0
  68. package/dist/{packager-tool-1ybnxbp9.js → packager-tool-wm0h0wa1.js} +18 -18
  69. package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
  70. package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
  71. package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
  72. package/dist/{packager-tool-056k8w2f.js → packager-tool-z5r49ky9.js} +75 -9
  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-n880dxre.js} +37 -34
  82. package/dist/{run-service-hk8w2h31.js → run-service-4vhn6mtb.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,9 +1,9 @@
1
1
  import {
2
2
  getAuthContext
3
- } from "./packager-tool-43ahv5mn.js";
3
+ } from "./packager-tool-t39pjz7n.js";
4
4
 
5
5
  // ../solution-sdk/src/solution-auth.ts
6
- async function getSolutionAuthContext(options) {
6
+ async function getSolutionAuthContext2(options) {
7
7
  const ctx = await getAuthContext({
8
8
  tenant: options.tenant,
9
9
  ensureTokenValidityMinutes: options.loginValidity ?? 10,
@@ -11,9 +11,8 @@ async function getSolutionAuthContext(options) {
11
11
  requireOrganizationId: true,
12
12
  requireTenantName: true
13
13
  });
14
- const organizationId = ctx.organizationId;
15
- const tenantName = ctx.tenantName;
16
- const basePath = `${ctx.baseUrl}/${organizationId}/${tenantName}/automationsolutions_`;
14
+ const { organizationId, tenantName } = ctx;
15
+ const basePath = `${ctx.baseUrl}/${encodeURIComponent(organizationId)}/${encodeURIComponent(tenantName)}/automationsolutions_`;
17
16
  return {
18
17
  accessToken: ctx.accessToken,
19
18
  basePath,
@@ -23,6 +22,6 @@ async function getSolutionAuthContext(options) {
23
22
  };
24
23
  }
25
24
 
26
- export { getSolutionAuthContext };
25
+ export { getSolutionAuthContext2 };
27
26
 
28
- //# debugId=F76D3832B86881B164756E2164756E21
27
+ //# debugId=720557DFC760A35C64756E2164756E21
@@ -1,53 +1,54 @@
1
1
  import {
2
- prepareSolutionResources
3
- } from "./packager-tool-t8gh825q.js";
2
+ getFileSystem
3
+ } from "./packager-tool-vgrswa8p.js";
4
4
  import {
5
- resolveGovernanceFileTypeAsync,
6
- validateGovernanceOptions
7
- } from "./packager-tool-47wzvqw0.js";
5
+ catchError,
6
+ carriedErrorCode,
7
+ carriedRetry,
8
+ carriedInstructions
9
+ } from "./packager-tool-m07vyk89.js";
8
10
  import {
9
- SOLUTION_PATH_INSTRUCTIONS,
10
- applyAuthConnection,
11
- checkSolutionPathAsync,
12
- createSolutionPackager,
13
- readSolutionFileAsUint8Array,
14
- resolveSdkLogLevel
15
- } from "./packager-tool-056k8w2f.js";
11
+ RESULTS,
12
+ logger,
13
+ OutputFormatter
14
+ } from "./packager-tool-9vrwpgt3.js";
16
15
  import {
17
- ensurePackagerTools,
18
- isUnpackableProjectTypeError
19
- } from "./packager-tool-b2nhscfk.js";
16
+ ToolResult
17
+ } from "./packager-tool-a7s0gbxs.js";
20
18
  import {
21
- INVALID_PACKAGE_ID,
22
- SolutionPackOptions
23
- } from "./packager-tool-2vmz56qh.js";
19
+ SolutionPackOptions,
20
+ INVALID_PACKAGE_ID
21
+ } from "./packager-tool-9j8e5q1z.js";
24
22
  import {
25
- PackProjectError,
26
- validatePackProjectOptions
27
- } from "./packager-tool-gs3f3tf7.js";
23
+ validateGovernanceOptions2,
24
+ resolveGovernanceFileTypeAsync2
25
+ } from "./packager-tool-aws5w512.js";
28
26
  import {
29
- ToolResult
30
- } from "./packager-tool-pbmqk39a.js";
27
+ isUnpackableProjectTypeError2,
28
+ ensurePackagerTools2
29
+ } from "./packager-tool-wm8nj6e9.js";
31
30
  import {
32
- OutputFormatter,
33
- RESULTS,
34
- carriedErrorCode,
35
- carriedRetry,
36
- logger
37
- } from "./packager-tool-tx834spe.js";
31
+ prepareSolutionResources2
32
+ } from "./packager-tool-qf8753ee.js";
38
33
  import {
39
- carriedInstructions,
40
- catchError
41
- } from "./packager-tool-6ybywxxn.js";
34
+ captureExtractedSolution2
35
+ } from "./packager-tool-f84z7nds.js";
42
36
  import {
43
- getFileSystem
44
- } from "./packager-tool-v1f5e8t9.js";
37
+ createProjectActivityObserver,
38
+ createSolutionPackager,
39
+ readSolutionFileAsUint8Array,
40
+ resolveSdkLogLevel,
41
+ applyAuthConnection,
42
+ SOLUTION_PATH_INSTRUCTIONS,
43
+ checkSolutionPathAsync
44
+ } from "./packager-tool-z5r49ky9.js";
45
45
  import {
46
- __require
47
- } from "./packager-tool-1de529jm.js";
46
+ validatePackProjectOptions,
47
+ PackProjectError
48
+ } from "./packager-tool-1ctvbx0h.js";
48
49
 
49
50
  // src/services/pack-command-service.ts
50
- class PackCommandService {
51
+ class PackCommandService2 {
51
52
  packager = null;
52
53
  fs;
53
54
  constructor() {
@@ -55,7 +56,7 @@ class PackCommandService {
55
56
  }
56
57
  reportPackThrow(error, dryRun) {
57
58
  const msg = error instanceof Error ? error.message : String(error);
58
- const errorCode = carriedErrorCode(error) ?? (isUnpackableProjectTypeError(error) ? "invalid_argument" : undefined);
59
+ const errorCode = carriedErrorCode(error) ?? (isUnpackableProjectTypeError2(error) ? "invalid_argument" : undefined);
59
60
  const contributionCode = error?.contributionCode;
60
61
  const retry = carriedRetry(error);
61
62
  const dryRunHint = "Inspect the reported error, fix the underlying issue in the solution, then rerun: uip solution pack <solution-path> --dry-run";
@@ -160,7 +161,7 @@ Packing project...
160
161
  }
161
162
  let governanceFileType = options.governanceFileType;
162
163
  if (options.governanceFilePath !== undefined) {
163
- const resolved = await resolveGovernanceFileTypeAsync(this.fs, options.governanceFilePath);
164
+ const resolved = await resolveGovernanceFileTypeAsync2(this.fs, options.governanceFilePath);
164
165
  if (!resolved.ok) {
165
166
  OutputFormatter.error({
166
167
  Result: RESULTS.Failure,
@@ -229,7 +230,7 @@ Packing project...
229
230
  failure: new ToolResult("INTERNAL_ERROR" /* InternalError */, projectError, [])
230
231
  };
231
232
  }
232
- const governanceError = validateGovernanceOptions(options);
233
+ const governanceError = validateGovernanceOptions2(options);
233
234
  if (governanceError) {
234
235
  return {
235
236
  failure: new ToolResult("INTERNAL_ERROR" /* InternalError */, governanceError, [])
@@ -237,7 +238,7 @@ Packing project...
237
238
  }
238
239
  let resolvedOptions = options;
239
240
  if (options.governanceFilePath !== undefined && options.governanceFileType === undefined) {
240
- const resolved = await resolveGovernanceFileTypeAsync(this.fs, options.governanceFilePath);
241
+ const resolved = await resolveGovernanceFileTypeAsync2(this.fs, options.governanceFilePath);
241
242
  if (!resolved.ok) {
242
243
  return {
243
244
  failure: new ToolResult("INTERNAL_ERROR" /* InternalError */, `${resolved.message} ${resolved.instructions}`, [])
@@ -294,11 +295,12 @@ Packing project...
294
295
  if (isUisFile) {
295
296
  const uint8Array = await readSolutionFileAsUint8Array(this.fs, absoluteSolutionPath);
296
297
  inputPath = await packager.setupAsync(uint8Array);
298
+ await captureExtractedSolution2(options.telemetryCapture, inputPath);
297
299
  await this.prepareSolutionDirectoryForPack(inputPath);
298
300
  } else {
299
301
  inputPath = await packager.setupAsync(solutionRoot);
300
302
  }
301
- await ensurePackagerTools(inputPath, this.fs);
303
+ await ensurePackagerTools2(inputPath, this.fs);
302
304
  const packOptions = await this.createPackOptions(inputPath, absoluteOutputPath, absoluteSolutionPath, isUisFile, resolvedOptions);
303
305
  return packager.packSolutionAsync(packOptions);
304
306
  });
@@ -314,7 +316,7 @@ Packing project...
314
316
  throw new PackProjectError("--project packs a project out of a solution folder, not out of a .uis file.", "Pass the solution folder instead: uip solution pack <solution-folder> <output-path> --project <id-or-path>.");
315
317
  }
316
318
  const [error, result] = await catchError(async () => {
317
- const { prepareSolutionProjectAsync, packSolutionProjectAsync } = await import("./pack-project-ha0pxw3h.js");
319
+ const { prepareSolutionProjectAsync, packSolutionProjectAsync } = await import("./pack-project-ztt1hfrs.js");
318
320
  const { project, packageId } = await prepareSolutionProjectAsync(this.fs, solutionDir, selector, options.packageId);
319
321
  await this.fs.mkdir(outputPath);
320
322
  const packOptions = await this.createProjectPackOptions(project, packageId, outputPath, options);
@@ -384,7 +386,7 @@ Packing project...
384
386
  return dirs;
385
387
  }
386
388
  async prepareSolutionDirectoryForPack(solutionDir) {
387
- await prepareSolutionResources(solutionDir, this.fs, { gate: true });
389
+ await prepareSolutionResources2(solutionDir, this.fs, { gate: true });
388
390
  }
389
391
  async ensurePackagerAsync() {
390
392
  if (!this.packager) {
@@ -397,6 +399,7 @@ Packing project...
397
399
  }
398
400
  async createPackOptions(inputPath, outputPath, absoluteSolutionPath, isUisFile, options) {
399
401
  const packOptions = new SolutionPackOptions;
402
+ packOptions.projectActivity = createProjectActivityObserver("uip solution pack");
400
403
  packOptions.inputPath = inputPath;
401
404
  packOptions.destinationPath = outputPath;
402
405
  packOptions.configuration = "Release" /* Release */;
@@ -407,7 +410,7 @@ Packing project...
407
410
  return packOptions;
408
411
  }
409
412
  async createProjectPackOptions(project, packageId, outputPath, options) {
410
- const projectPackager = await import("./node-v7xhqwe2.js");
413
+ const projectPackager = await import("./node-kwzcw5ex.js");
411
414
  const packOptions = new projectPackager.ProjectPackOptions;
412
415
  packOptions.inputPath = project.ProjectPath ?? "";
413
416
  packOptions.destinationPath = outputPath;
@@ -453,7 +456,7 @@ async function applySharedPackOptions(packOptions, options) {
453
456
  packOptions.validateOptions.sessionIdentityType = session.identity?.type;
454
457
  }
455
458
  function toPackFailure(error) {
456
- if (isUnpackableProjectTypeError(error) || carriedErrorCode(error) !== undefined) {
459
+ if (isUnpackableProjectTypeError2(error) || carriedErrorCode(error) !== undefined) {
457
460
  throw error;
458
461
  }
459
462
  const message = error instanceof Error ? error.message : String(error);
@@ -512,6 +515,6 @@ function formatPackFailureInstructions(message, dryRun) {
512
515
  return dryRun ? `${packMessage}. Resolve the reported issue (resource bindings, variable references, mapping targets, or runtime dependencies) and rerun: uip solution pack <solution-path> --dry-run` : packMessage;
513
516
  }
514
517
 
515
- export { PackCommandService, packFailureEnvelope };
518
+ export { PackCommandService2 };
516
519
 
517
- //# debugId=878D6966283DBC2164756E2164756E21
520
+ //# debugId=6903421E4EB8397664756E2164756E21
@@ -0,0 +1,74 @@
1
+ import {
2
+ catchError
3
+ } from "./packager-tool-m07vyk89.js";
4
+ import {
5
+ classifyFeedSession2,
6
+ feedSessionRefusal2,
7
+ feedSessionRefusalAsync2
8
+ } from "./packager-tool-bs1jn1yn.js";
9
+ import {
10
+ describeFeedResolutionFailureAsync2,
11
+ resolveFeedScope2
12
+ } from "./packager-tool-fqs6hdcy.js";
13
+
14
+ // src/services/feed-selection.ts
15
+ async function resolveFeedSelectionAsync(auth, flags, action) {
16
+ if (!flags.personalWorkspace && flags.feed === undefined) {
17
+ return { ok: true };
18
+ }
19
+ if (flags.personalWorkspace) {
20
+ const refusal = refuseUnlessUser(auth, `${action} in a Personal Workspace`);
21
+ if (refusal) {
22
+ return refusal;
23
+ }
24
+ }
25
+ const [scopeError, scope] = await catchError(resolveFeedScope2({
26
+ personalWorkspace: flags.personalWorkspace,
27
+ feed: flags.feed,
28
+ tenant: flags.tenant,
29
+ loginValidity: flags.loginValidity,
30
+ envFilePath: flags.envFilePath
31
+ }));
32
+ if (scopeError) {
33
+ const failure = await describeFeedResolutionFailureAsync2(scopeError, flags, auth);
34
+ return {
35
+ ok: false,
36
+ reason: "feed_resolution_failed",
37
+ message: failure.message,
38
+ instructions: failure.instructions,
39
+ errorCode: failure.errorCode,
40
+ retry: failure.retry
41
+ };
42
+ }
43
+ if (scope.kind !== "tenant") {
44
+ const feedAction = `${action} in the feed '${scope.name ?? scope.folderKey}'`;
45
+ const refusal = scope.folderKey ? await feedSessionRefusalAsync2(auth, scope.folderKey, "write", feedAction, ALTERNATIVE) : feedSessionRefusalForUserOnly(auth, feedAction);
46
+ if (refusal) {
47
+ return toRefusal(refusal);
48
+ }
49
+ }
50
+ return { ok: true, selectedFeed: scope };
51
+ }
52
+ var ALTERNATIVE = "drop the feed flag to act on a tenant-feed deployment";
53
+ function toRefusal(refusal) {
54
+ return {
55
+ ok: false,
56
+ reason: "feed_requires_user_session",
57
+ message: refusal.message,
58
+ instructions: refusal.instructions,
59
+ errorCode: "permission_denied",
60
+ retry: "RetryWillNotFix"
61
+ };
62
+ }
63
+ function feedSessionRefusalForUserOnly(auth, action) {
64
+ const verdict = classifyFeedSession2(auth);
65
+ return verdict === "user" ? undefined : feedSessionRefusal2(verdict, action, ALTERNATIVE);
66
+ }
67
+ function refuseUnlessUser(auth, action) {
68
+ const refusal = feedSessionRefusalForUserOnly(auth, action);
69
+ return refusal ? toRefusal(refusal) : undefined;
70
+ }
71
+
72
+ export { resolveFeedSelectionAsync };
73
+
74
+ //# debugId=59EC4B0D37E3375A64756E2164756E21
@@ -1,40 +1,34 @@
1
1
  import {
2
- isCurrentRecordAsync
3
- } from "./packager-tool-2t72aez8.js";
4
- import {
5
- VALIDATION_CONFIRMATION_REQUIRED_CODE,
6
- coerceWorkflowErrorMessages
7
- } from "./packager-tool-act5r386.js";
8
- import {
9
- deploymentToTerminalPipelineResult,
10
- findDeploymentBestEffort,
11
- isPipelineDeploymentNotFoundError,
12
- mapOperationStatusToPipelineStatus
13
- } from "./packager-tool-9hsmn8th.js";
2
+ catchError,
3
+ extractErrorDetails
4
+ } from "./packager-tool-m07vyk89.js";
14
5
  import {
15
- resolvePersonalWorkspace
16
- } from "./packager-tool-azre7mm1.js";
6
+ logger,
7
+ processContext,
8
+ PollOutcome,
9
+ pollUntil
10
+ } from "./packager-tool-9vrwpgt3.js";
17
11
  import {
18
- Configuration,
12
+ Configuration2,
19
13
  PipelinesApi
20
- } from "./packager-tool-97rcgwvv.js";
14
+ } from "./packager-tool-bs1jn1yn.js";
21
15
  import {
22
- Configuration as Configuration2,
23
- DeploymentsApi
24
- } from "./packager-tool-tedbebpq.js";
16
+ Configuration3,
17
+ DeploymentsApi2
18
+ } from "./packager-tool-a6va4gc5.js";
25
19
  import {
26
- resolveFolder
27
- } from "./packager-tool-8ptbmmmp.js";
20
+ findDeploymentBestEffort2,
21
+ isPipelineDeploymentNotFoundError2,
22
+ mapOperationStatusToPipelineStatus2,
23
+ deploymentToTerminalPipelineResult2
24
+ } from "./packager-tool-w8bcwfd3.js";
28
25
  import {
29
- PollOutcome,
30
- logger,
31
- pollUntil,
32
- processContext
33
- } from "./packager-tool-tx834spe.js";
26
+ isCurrentRecordAsync
27
+ } from "./packager-tool-snm6s7b5.js";
34
28
  import {
35
- catchError,
36
- extractErrorDetails
37
- } from "./packager-tool-6ybywxxn.js";
29
+ coerceWorkflowErrorMessages,
30
+ VALIDATION_CONFIRMATION_REQUIRED_CODE
31
+ } from "./packager-tool-2pxe2r4j.js";
38
32
 
39
33
  // src/services/activation.ts
40
34
  var TERMINAL_STATUSES = new Set([
@@ -42,14 +36,14 @@ var TERMINAL_STATUSES = new Set([
42
36
  "FailedActivate"
43
37
  ]);
44
38
  async function activateDeployment(auth, deploymentName, options) {
45
- const api = new PipelinesApi(new Configuration({
39
+ const api = new PipelinesApi(new Configuration2({
46
40
  basePath: auth.basePath,
47
41
  accessToken: auth.accessToken
48
42
  }));
49
43
  const [stepsError, steps] = await catchError(api.pipelinesGetPreActivateSteps({ deploymentName }, options.scope));
50
44
  if (stepsError) {
51
45
  const { message, details, errorCode, retry, context } = await extractErrorDetails(stepsError);
52
- const deployment = await findDeploymentBestEffort(auth, deploymentName, options.scope);
46
+ const deployment = await findDeploymentBestEffort2(auth, deploymentName, options.scope);
53
47
  return {
54
48
  kind: "RequestFailed",
55
49
  phase: "preActivateSteps",
@@ -70,7 +64,7 @@ async function activateDeployment(auth, deploymentName, options) {
70
64
  const [activateError, activateResult] = await catchError(api.pipelinesActivate({ deploymentName }, options.scope));
71
65
  if (activateError) {
72
66
  const { message, details, errorCode, retry, context } = await extractErrorDetails(activateError);
73
- const deployment = await findDeploymentBestEffort(auth, deploymentName, options.scope);
67
+ const deployment = await findDeploymentBestEffort2(auth, deploymentName, options.scope);
74
68
  return {
75
69
  kind: "RequestFailed",
76
70
  phase: "activate",
@@ -116,56 +110,6 @@ async function activateDeployment(auth, deploymentName, options) {
116
110
  };
117
111
  }
118
112
 
119
- // src/services/folder-helper.ts
120
- async function resolveParentFolder(options) {
121
- if (!options.folderPath && !options.folderKey && !options.personalWorkspace) {
122
- return;
123
- }
124
- if (options.personalWorkspace) {
125
- const [pwError, pw] = await catchError(resolvePersonalWorkspace({
126
- tenant: options.tenant,
127
- loginValidity: options.loginValidity,
128
- envFilePath: options.envFilePath
129
- }));
130
- if (pwError) {
131
- throw new Error(`Failed to resolve Personal Workspace: ${pwError.message}`);
132
- }
133
- return pw.name;
134
- }
135
- if (options.folderPath) {
136
- return options.folderPath;
137
- }
138
- const [resolveError, resolved] = await catchError(resolveFolder({ folderKey: options.folderKey }, {
139
- tenant: options.tenant,
140
- loginValidity: options.loginValidity,
141
- envFilePath: options.envFilePath
142
- }));
143
- if (resolveError) {
144
- throw new Error(`Failed to resolve folder key '${options.folderKey}': ${resolveError.message}`);
145
- }
146
- if (!resolved) {
147
- throw new Error(`Folder not found for key '${options.folderKey}'.`);
148
- }
149
- return resolved.path;
150
- }
151
- async function resolveFolderInfo(options) {
152
- if (!options.folderPath && !options.folderKey) {
153
- return;
154
- }
155
- const [resolveError, resolved] = await catchError(resolveFolder({ folderPath: options.folderPath, folderKey: options.folderKey }, {
156
- tenant: options.tenant,
157
- loginValidity: options.loginValidity,
158
- envFilePath: options.envFilePath
159
- }));
160
- if (resolveError) {
161
- throw new Error(`Failed to resolve folder '${options.folderPath ?? options.folderKey}': ${resolveError.message}`);
162
- }
163
- if (!resolved) {
164
- throw new Error(`Folder not found: '${options.folderPath ?? options.folderKey}'.`);
165
- }
166
- return { key: resolved.key, path: resolved.path };
167
- }
168
-
169
113
  // src/services/deployment-validation.ts
170
114
  var NO_SERVER_REASON = "the server reported no reason.";
171
115
  var LOOKUP_TIMEOUT_MS = 15000;
@@ -189,7 +133,7 @@ async function describeValidationFailureAsync(deploymentsApi, deploymentKey, dep
189
133
  return messages.length > 0 ? messages.join("; ") : NO_SERVER_REASON;
190
134
  }
191
135
  async function describeDeploymentFailureAsync(auth, deployment, deploymentAction, scope, signal) {
192
- const deploymentsApi = new DeploymentsApi(new Configuration2({
136
+ const deploymentsApi = new DeploymentsApi2(new Configuration3({
193
137
  basePath: auth.basePath,
194
138
  accessToken: auth.accessToken
195
139
  }));
@@ -383,7 +327,7 @@ async function readOutcomeByKeyAsync(api, deploymentKey) {
383
327
  if (info.operation === "Uninstall" || info.operationStatus === "Draft") {
384
328
  return stillInFlight(deploymentKey);
385
329
  }
386
- const status = mapOperationStatusToPipelineStatus(info.operationStatus);
330
+ const status = mapOperationStatusToPipelineStatus2(info.operationStatus);
387
331
  if (!status) {
388
332
  return stillInFlight(deploymentKey);
389
333
  }
@@ -406,7 +350,7 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
406
350
  }
407
351
  return status;
408
352
  } catch (err) {
409
- if (!await isPipelineDeploymentNotFoundError(err)) {
353
+ if (!await isPipelineDeploymentNotFoundError2(err)) {
410
354
  throw err;
411
355
  }
412
356
  if (!observedDeploymentKey) {
@@ -416,11 +360,11 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
416
360
  if (byKey) {
417
361
  return byKey;
418
362
  }
419
- const deployment = await findDeploymentBestEffort(auth, options.deploymentName, options.scope, { deploymentKey: observedDeploymentKey });
363
+ const deployment = await findDeploymentBestEffort2(auth, options.deploymentName, options.scope, { deploymentKey: observedDeploymentKey });
420
364
  if (!deployment || deployment.operationStatus === "Draft") {
421
365
  return stillInFlight(observedDeploymentKey);
422
366
  }
423
- const synthesized = deploymentToTerminalPipelineResult(deployment);
367
+ const synthesized = deploymentToTerminalPipelineResult2(deployment);
424
368
  if (!synthesized) {
425
369
  return stillInFlight(observedDeploymentKey);
426
370
  }
@@ -440,6 +384,95 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
440
384
  });
441
385
  }
442
386
 
443
- export { activateDeployment, resolveParentFolder, resolveFolderInfo, NO_SERVER_REASON, describeValidationFailureAsync, describeDeploymentFailureAsync, isPermanentDeletionRefusal, listPermanentDeletionResourcesAsync, formatPermanentDeletionResources, ACKNOWLEDGE_PERMANENT_DELETION_FLAG, settlePermanentDeletionRefusalAsync, acknowledgedButNotRunHint, stillRequiresConfirmation, remainingTimeoutMs, pollPipelineDeploymentAsync };
387
+ // src/services/install-run.ts
388
+ function finiteOr(value, fallback) {
389
+ return typeof value === "number" && Number.isFinite(value) ? value : fallback;
390
+ }
391
+ async function runInstallToOutcomeAsync(request) {
392
+ const timeoutMs = request.timeoutSeconds * 1000;
393
+ let deadline;
394
+ const installAndPollAsync = async () => {
395
+ const installed = await request.install();
396
+ if (!installed.ok) {
397
+ return { failure: installed };
398
+ }
399
+ const { pipelineDeploymentId } = installed;
400
+ deadline ??= Date.now() + timeoutMs;
401
+ const pollResult = await pollPipelineDeploymentAsync(request.api, request.auth, {
402
+ pipelineDeploymentId,
403
+ deploymentName: request.deploymentName,
404
+ scope: request.scope,
405
+ timeoutMs: remainingTimeoutMs(timeoutMs, deadline),
406
+ intervalMs: request.pollIntervalMs,
407
+ signal: request.signal,
408
+ logPrefix: request.logPrefix
409
+ });
410
+ return { pipelineDeploymentId, pollResult };
411
+ };
412
+ const refusedByServer = (pollResult) => pollResult.outcome === PollOutcome.Completed && isPermanentDeletionRefusal(pollResult.data);
413
+ if (request.noWait) {
414
+ const installed = await request.install();
415
+ return installed.ok ? {
416
+ kind: "accepted",
417
+ pipelineDeploymentId: installed.pipelineDeploymentId
418
+ } : { kind: "install_refused", failure: installed };
419
+ }
420
+ let attempt = await installAndPollAsync();
421
+ if ("failure" in attempt) {
422
+ return { kind: "install_refused", failure: attempt.failure };
423
+ }
424
+ if (!refusedByServer(attempt.pollResult)) {
425
+ return {
426
+ kind: "polled",
427
+ ...attempt,
428
+ permanentlyDeletedResources: undefined
429
+ };
430
+ }
431
+ const refused = attempt.pollResult.data;
432
+ const wording = request.consentWording(refused);
433
+ const consent = await settlePermanentDeletionRefusalAsync({
434
+ api: request.api,
435
+ deploymentName: request.deploymentName,
436
+ scope: request.scope,
437
+ signal: request.signal,
438
+ acknowledge: request.acknowledge,
439
+ status: refused,
440
+ ...wording
441
+ });
442
+ if (!consent.ok) {
443
+ return {
444
+ kind: "consent_refused",
445
+ refusal: consent,
446
+ pipelineDeploymentId: attempt.pipelineDeploymentId,
447
+ deploymentKey: refused.deploymentKey || undefined
448
+ };
449
+ }
450
+ attempt = await installAndPollAsync();
451
+ if ("failure" in attempt) {
452
+ return {
453
+ kind: "install_refused",
454
+ failure: {
455
+ ...attempt.failure,
456
+ instructions: `${attempt.failure.instructions} ${acknowledgedButNotRunHint(consent.resources, wording.keepCopiesHint)}`
457
+ }
458
+ };
459
+ }
460
+ if (refusedByServer(attempt.pollResult)) {
461
+ const deploymentKey = attempt.pollResult.data?.deploymentKey || undefined;
462
+ return {
463
+ kind: "consent_refused",
464
+ refusal: stillRequiresConfirmation(request.deploymentName, consent.resources, deploymentKey),
465
+ pipelineDeploymentId: attempt.pipelineDeploymentId,
466
+ deploymentKey
467
+ };
468
+ }
469
+ return {
470
+ kind: "polled",
471
+ ...attempt,
472
+ permanentlyDeletedResources: consent.resources.map((resource) => formatPermanentDeletionResources([resource]))
473
+ };
474
+ }
475
+
476
+ export { activateDeployment, NO_SERVER_REASON, describeValidationFailureAsync, describeDeploymentFailureAsync, listPermanentDeletionResourcesAsync, ACKNOWLEDGE_PERMANENT_DELETION_FLAG, finiteOr, runInstallToOutcomeAsync };
444
477
 
445
- //# debugId=0A59B0D65B5A781064756E2164756E21
478
+ //# debugId=ABDCBF019CB770C464756E2164756E21