@uipath/vertical-solutions-tool 1.204.0 → 1.205.0-preview.258

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +80 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +1617 -369
  3. package/dist/createSdk-2f9x47em.js +12 -0
  4. package/dist/deploy-jobs-3k87fkwz.js +23 -0
  5. package/dist/deploy-service-qaykt7er.js +1779 -0
  6. package/dist/deployment-search-arbm2z06.js +2649 -0
  7. package/dist/embedded-file-reader-r66242ey.js +114 -0
  8. package/dist/first-party-service-srxaftkn.js +27 -0
  9. package/dist/index-7a3eqtxv.js +3174 -0
  10. package/dist/index-8s9dxpj4.js +18812 -0
  11. package/dist/index-fyc0k5dd.js +51405 -0
  12. package/dist/index-h43sj8at.js +23075 -0
  13. package/dist/index-kmp9fmhb.js +25 -0
  14. package/dist/index-ngs0a2he.js +15 -0
  15. package/dist/index.js +14 -3
  16. package/dist/index.umd.min-fqefd9kn.js +7814 -0
  17. package/dist/job-commands-azgbrbdb.js +23 -0
  18. package/dist/job-output-t43hzj1f.js +36 -0
  19. package/dist/prompts-dtgt183n.js +260 -0
  20. package/dist/resume-service-mqfnnzb5.js +344 -0
  21. package/dist/seed-service-2d1f7zaz.js +2014 -0
  22. package/dist/seed-templates-sqqqratr.js +14 -0
  23. package/dist/service-errors-jzbq3z7p.js +22 -0
  24. package/dist/solution-auth-zq6gyxsv.js +11 -0
  25. package/dist/solution-deployments-m44fyb88.js +33 -0
  26. package/dist/templates-85yrztpk.js +15 -0
  27. package/dist/tool-342sz3hm.js +439 -0
  28. package/dist/tool-38ad77wd.js +1472 -0
  29. package/dist/tool-4z1dy1rn.js +260 -0
  30. package/dist/tool-53w8skv5.js +262 -0
  31. package/dist/tool-67587985.js +554 -0
  32. package/dist/tool-87e2ps7f.js +13 -0
  33. package/dist/tool-cag2z2d6.js +30 -0
  34. package/dist/tool-e4qgwf9h.js +2281 -0
  35. package/dist/tool-gdtpsdn7.js +342 -0
  36. package/dist/tool-gvmshnq9.js +555 -0
  37. package/dist/tool-h4f967yd.js +73 -0
  38. package/dist/tool-hdxtgckw.js +249 -0
  39. package/dist/tool-jjxbj28g.js +17067 -0
  40. package/dist/tool-keqjsxdx.js +28 -0
  41. package/dist/tool-maw0g02p.js +24 -0
  42. package/dist/tool-mn1wkbhw.js +113 -0
  43. package/dist/tool-n35nrs32.js +4949 -0
  44. package/dist/tool-p589v2r5.js +114 -0
  45. package/dist/tool-pz9qm3dv.js +6723 -0
  46. package/dist/tool-r1ewa0tf.js +5645 -0
  47. package/dist/tool-r2epw08s.js +164 -0
  48. package/dist/tool-rr9fensp.js +12 -0
  49. package/dist/tool-s04z9t80.js +19 -0
  50. package/dist/tool-s9qbxa2g.js +638 -0
  51. package/dist/tool-tjhwq0ez.js +261 -0
  52. package/dist/tool-v15vxc4x.js +183 -0
  53. package/dist/tool-vf2mgth0.js +14286 -0
  54. package/dist/tool-vp7rjr2q.js +22083 -0
  55. package/dist/tool-xd2ejt3h.js +103 -0
  56. package/dist/tool-yx29vb63.js +672 -0
  57. package/dist/tool.js +12 -2
  58. package/dist/watch-job-wh6m7xzq.js +31 -0
  59. package/package.json +3 -3
  60. package/dist/tool-xymb3dsq.js +0 -45085
@@ -0,0 +1,14 @@
1
+ import {
2
+ downloadSeedTemplates
3
+ } from "./tool-maw0g02p.js";
4
+ import"./tool-4z1dy1rn.js";
5
+ import"./tool-87e2ps7f.js";
6
+ import"./tool-vf2mgth0.js";
7
+ import"./tool-pz9qm3dv.js";
8
+ import"./tool-hdxtgckw.js";
9
+ import"./tool-1yh8g550.js";
10
+ export {
11
+ downloadSeedTemplates
12
+ };
13
+
14
+ //# debugId=EE62DC99F6B090D264756E2164756E21
@@ -0,0 +1,22 @@
1
+ import {
2
+ finishedJobConflict,
3
+ knownJobStatus,
4
+ toDeployFailure
5
+ } from "./tool-r2epw08s.js";
6
+ import"./tool-4z1dy1rn.js";
7
+ import"./tool-87e2ps7f.js";
8
+ import"./tool-cag2z2d6.js";
9
+ import"./tool-h4f967yd.js";
10
+ import"./tool-rr9fensp.js";
11
+ import"./tool-s04z9t80.js";
12
+ import"./tool-vf2mgth0.js";
13
+ import"./tool-pz9qm3dv.js";
14
+ import"./tool-hdxtgckw.js";
15
+ import"./tool-1yh8g550.js";
16
+ export {
17
+ finishedJobConflict,
18
+ knownJobStatus,
19
+ toDeployFailure
20
+ };
21
+
22
+ //# debugId=D3C5F4A4D99C441E64756E2164756E21
@@ -0,0 +1,11 @@
1
+ import {
2
+ getSolutionAuthContext
3
+ } from "./tool-keqjsxdx.js";
4
+ import"./tool-38ad77wd.js";
5
+ import"./tool-hdxtgckw.js";
6
+ import"./tool-1yh8g550.js";
7
+ export {
8
+ getSolutionAuthContext
9
+ };
10
+
11
+ //# debugId=4D0CD43FE95C1EC164756E2164756E21
@@ -0,0 +1,33 @@
1
+ import {
2
+ DEPLOYMENT_PAGE_SIZE,
3
+ MAX_DEPLOYMENT_PAGES,
4
+ NAMED_DEPLOYMENT_PAGE_SIZE,
5
+ SolutionDeploymentsError,
6
+ isCompletedUninstall,
7
+ isInstalledDeployment,
8
+ listDeploymentsNamed,
9
+ listDeploymentsOfSolution,
10
+ listSolutionDeployments,
11
+ newestDeployment,
12
+ resolveInstalledFolder,
13
+ solutionNameFromManifest
14
+ } from "./tool-tjhwq0ez.js";
15
+ import"./tool-pz9qm3dv.js";
16
+ import"./tool-hdxtgckw.js";
17
+ import"./tool-1yh8g550.js";
18
+ export {
19
+ DEPLOYMENT_PAGE_SIZE,
20
+ MAX_DEPLOYMENT_PAGES,
21
+ NAMED_DEPLOYMENT_PAGE_SIZE,
22
+ SolutionDeploymentsError,
23
+ isCompletedUninstall,
24
+ isInstalledDeployment,
25
+ listDeploymentsNamed,
26
+ listDeploymentsOfSolution,
27
+ listSolutionDeployments,
28
+ newestDeployment,
29
+ resolveInstalledFolder,
30
+ solutionNameFromManifest
31
+ };
32
+
33
+ //# debugId=A05C45CFE3EAA2DB64756E2164756E21
@@ -0,0 +1,15 @@
1
+ import {
2
+ refreshSeedTemplates
3
+ } from "./tool-yx29vb63.js";
4
+ import"./tool-67587985.js";
5
+ import"./tool-s9qbxa2g.js";
6
+ import"./tool-87e2ps7f.js";
7
+ import"./tool-vf2mgth0.js";
8
+ import"./tool-pz9qm3dv.js";
9
+ import"./tool-hdxtgckw.js";
10
+ import"./tool-1yh8g550.js";
11
+ export {
12
+ refreshSeedTemplates
13
+ };
14
+
15
+ //# debugId=E7B03CFCD570558E64756E2164756E21
@@ -0,0 +1,439 @@
1
+ import {
2
+ findFolderPath,
3
+ readSeedFile,
4
+ readStrategy,
5
+ removeSeedContext
6
+ } from "./tool-e4qgwf9h.js";
7
+ import {
8
+ acquireSeedWorkspaceLock,
9
+ entityNameProblem,
10
+ insideSeedRoot,
11
+ isPreservedWorkspaceFile,
12
+ namesSeedRoot,
13
+ packageDir
14
+ } from "./tool-s9qbxa2g.js";
15
+ import {
16
+ writeProgress,
17
+ writeWarning
18
+ } from "./tool-v15vxc4x.js";
19
+ import {
20
+ routingFlags,
21
+ shellQuote
22
+ } from "./tool-cag2z2d6.js";
23
+ import {
24
+ failure,
25
+ invalidOption
26
+ } from "./tool-h4f967yd.js";
27
+ import {
28
+ RESULTS,
29
+ canPrompt,
30
+ catchError
31
+ } from "./tool-pz9qm3dv.js";
32
+ import {
33
+ getFileSystem
34
+ } from "./tool-hdxtgckw.js";
35
+ import {
36
+ __require
37
+ } from "./tool-1yh8g550.js";
38
+
39
+ // src/services/pause-kinds.ts
40
+ function describePauseKind(kind) {
41
+ switch (kind) {
42
+ case "activation_setup":
43
+ return "activation setup";
44
+ case "connection_setup":
45
+ return "its connections authorized";
46
+ case "configuration_setup":
47
+ return "the portal's configuration wizard";
48
+ case "token_expired":
49
+ return "a fresh login";
50
+ default:
51
+ return "attention";
52
+ }
53
+ }
54
+ function pauseInstructions(kind, resume) {
55
+ return kind === "token_expired" ? `Run 'uip login' (the job's token expired), then run: ${resume}` : `Complete that step, then run: ${resume}`;
56
+ }
57
+ function pauseRetry(kind) {
58
+ return kind === "token_expired" ? "RetryWillNotFix" : "RetryLater";
59
+ }
60
+ function pauseErrorCode(kind) {
61
+ return kind === "token_expired" ? "authentication_required" : undefined;
62
+ }
63
+
64
+ // src/services/post-deploy/seed-commands.ts
65
+ function namedJob(job) {
66
+ const { packageName, packageVersion } = job;
67
+ if (!packageName || !packageVersion)
68
+ return;
69
+ return { ...job, packageName, packageVersion };
70
+ }
71
+ var FOLDER_SCOPE_UNKNOWN_NOTE = ". Pass --folder-key <key of the folder the solution installed into> only if " + "the package's entities are folder-scoped.";
72
+ var FOLDER_PLACEHOLDER = " --folder-key <key of the folder the solution installed into>";
73
+ function seedCommandFor(job, folderKey, routing, unknownFolder) {
74
+ return seedCommand(job, folderKey, routing, undefined, unknownFolder);
75
+ }
76
+ function seedCommand(job, folderKey, routing, dir, unknownFolder) {
77
+ const where = dir !== undefined ? ` --dir ${shellQuote(dir)}` : "";
78
+ const folder = folderKey ? ` --folder-key ${shellQuote(folderKey)}` : unknownFolder ? FOLDER_PLACEHOLDER : "";
79
+ return `uip vss deploy seed${where} --package-name ${shellQuote(job.packageName)} ` + `--package-version ${shellQuote(job.packageVersion)}${folder}${routingFlags(routing)}`;
80
+ }
81
+ function seedYesFlag(options) {
82
+ return options.seed === true && options.yes === true ? " --yes" : "";
83
+ }
84
+ function rejectSeedWithoutWait(options) {
85
+ if (options.seed !== true || options.wait !== false)
86
+ return;
87
+ const routing = routingFlags(options);
88
+ return invalidOption("--seed cannot be combined with --no-wait: seeding runs after the job succeeds, " + "and --no-wait returns before that.", "Drop --no-wait to watch the job and seed when it succeeds, or drop --seed and, once " + `uip vss deploy status <job-id>${routing} shows it succeeded, run: ` + `uip vss deploy seed --package-name <name> --package-version <version>${routing}` + seedYesFlag(options));
89
+ }
90
+ function linkedOutHint(job, installedFolderKey, options, target, folderFlag = "") {
91
+ const command = seedCommand(job, installedFolderKey, options, target) + `${folderFlag} --refresh${seedYesFlag(options)}`;
92
+ if (target === undefined) {
93
+ return `Remove the link, then seed with: ${command}`;
94
+ }
95
+ return "Replace the link with a real folder, or seed that folder on purpose with: " + command;
96
+ }
97
+
98
+ // src/services/post-deploy/workspace.ts
99
+ function deploymentNameOf(input) {
100
+ return input.job.deploymentName ?? input.deploymentName;
101
+ }
102
+ async function prepareSeedWorkspace(input, installedFolderKey, folderUnknown = false, folderAdvice = FOLDER_PLACEHOLDER) {
103
+ const { job, options } = input;
104
+ const showPlaceholder = folderUnknown && folderAdvice === FOLDER_PLACEHOLDER;
105
+ const folder = showPlaceholder ? FOLDER_PLACEHOLDER : "";
106
+ const commandKey = folderUnknown ? undefined : installedFolderKey;
107
+ const base = seedCommandFor(job, commandKey, options, showPlaceholder);
108
+ const retry = `${base} --refresh${seedYesFlag(options)}`;
109
+ const usable = await usableWorkspaceDir(input, commandKey, retry, folder);
110
+ if (usable.dir === undefined)
111
+ return usable;
112
+ const workspaceDir = usable.dir;
113
+ const fs = getFileSystem();
114
+ const [mkdirError] = typeof fs.mkdir === "function" ? await catchError(fs.mkdir(workspaceDir)) : [undefined];
115
+ if (mkdirError) {
116
+ writeWarning(`Could not create the seed workspace ${workspaceDir}: ${mkdirError.message}. Try again with: ${retry}`);
117
+ return refreshHint(retry);
118
+ }
119
+ const [checkError, checked] = await catchError(insideSeedRoot(workspaceDir));
120
+ if (checkError) {
121
+ writeWarning(`Could not check the seed workspace: ${checkError.message}. Try again with: ${retry}`);
122
+ return refreshHint(retry);
123
+ }
124
+ if (!checked.ok) {
125
+ writeWarning(`Could not create a safe seed workspace: ${checked.message} ${checked.instructions}`);
126
+ return refreshHint(retry);
127
+ }
128
+ const [lockError, release] = await catchError(acquireSeedWorkspaceLock(workspaceDir));
129
+ if (lockError || !release) {
130
+ writeWarning(`Could not lock the seed workspace while refreshing it: ${lockError?.message ?? "no lock"}. Try again with: ${retry}`);
131
+ return refreshHint(retry);
132
+ }
133
+ try {
134
+ return await writeTemplates(input, {
135
+ workspaceDir,
136
+ installedFolderKey,
137
+ retry,
138
+ folder
139
+ });
140
+ } finally {
141
+ await catchError(release());
142
+ }
143
+ }
144
+ async function writeTemplates(input, target) {
145
+ const { job, config, options } = input;
146
+ const { retry } = target;
147
+ const { downloadSeedTemplates } = await import("./seed-templates-sqqqratr.js");
148
+ const { refreshSeedTemplates } = await import("./templates-85yrztpk.js");
149
+ const [downloadError, download] = await catchError(downloadSeedTemplates(config, job.packageName, job.packageVersion, options.signal));
150
+ if (downloadError || !download) {
151
+ writeWarning(`Could not download the seed templates: ${downloadError?.message ?? "unknown error"}. Try again with: ${retry}`);
152
+ return refreshHint(retry);
153
+ }
154
+ const replacing = await holdsUserFiles(target.workspaceDir);
155
+ const [extractError, extracted] = await catchError(() => refreshSeedTemplates({
156
+ dir: target.workspaceDir,
157
+ zip: download.zip,
158
+ lockHeld: true
159
+ }));
160
+ if (extractError || !extracted) {
161
+ writeWarning(`Could not write the seed templates: ${extractError?.message ?? "unknown error"}. Try again with: ${retry}`);
162
+ return refreshHint(retry);
163
+ }
164
+ for (const warning of extracted.warnings)
165
+ writeWarning(warning);
166
+ const recorded = await recordDeployContext(input, target.installedFolderKey, extracted.dir, retry);
167
+ const next = recorded ? `uip vss deploy seed${routingFlags(options)}${target.folder}${seedYesFlag(options)}` : retry;
168
+ const written = `Seed templates: ${extracted.written.length} file(s) written to ${extracted.dir}` + (replacing ? " (previous files replaced)" : "");
169
+ writeProgress(recorded ? `${written} — fill them in, then run: ${next}` : `${written}. The seed context could not be written, so run ${next} FIRST, before you` + " fill them in — it replaces the files, and without it a later run refuses them" + " as an unknown version.");
170
+ return recorded ? { dir: extracted.dir } : {
171
+ dir: extracted.dir,
172
+ seedHint: `Seed Data Fabric data with: ${retry}`,
173
+ pushWith: retry,
174
+ refreshFirst: true
175
+ };
176
+ }
177
+ async function holdsUserFiles(dir) {
178
+ const [error, entries] = await catchError(getFileSystem().readdir(dir));
179
+ if (error || !entries)
180
+ return false;
181
+ return entries.some((name) => !isPreservedWorkspaceFile(name));
182
+ }
183
+ function refreshHint(retry) {
184
+ return { seedHint: `Seed Data Fabric data with: ${retry}` };
185
+ }
186
+ async function usableWorkspaceDir(input, installedFolderKey, retry, folderFlag) {
187
+ const [error, linked] = await catchError(() => linkedOutWorkspace(input.job.packageName));
188
+ if (error) {
189
+ writeWarning(`Could not write the seed templates: ${error.message}. Try again with: ${retry}`);
190
+ return refreshHint(retry);
191
+ }
192
+ if (linked) {
193
+ const seedHint = linkedOutHint(input.job, installedFolderKey, input.options, linked.target, folderFlag);
194
+ writeWarning(`Not writing the seed templates: ${linked.message} ${seedHint}`);
195
+ return { seedHint };
196
+ }
197
+ return { dir: packageDir(input.job.packageName) };
198
+ }
199
+ async function linkedOutWorkspace(packageName) {
200
+ const dir = packageDir(packageName);
201
+ const located = await insideSeedRoot(dir);
202
+ if (located.ok)
203
+ return;
204
+ const target = await getFileSystem().realpath(dir);
205
+ const offerable = target !== dir && !await namesSeedRoot(target);
206
+ return {
207
+ message: located.message,
208
+ ...offerable ? { target } : {}
209
+ };
210
+ }
211
+ async function recordDeployContext(input, installedFolderKey, workspaceDir, command) {
212
+ const { job, config } = input;
213
+ const { recordSeedContext } = await import("./seed-service-2d1f7zaz.js");
214
+ const [contextError] = await catchError(recordSeedContext({
215
+ packageName: job.packageName,
216
+ packageVersion: job.packageVersion,
217
+ serviceUrl: input.serviceUrl,
218
+ organizationId: config.organizationId,
219
+ organizationName: config.organizationName,
220
+ tenantId: config.tenantId,
221
+ tenantName: config.tenantName,
222
+ folderKey: installedFolderKey,
223
+ deploymentName: deploymentNameOf(input)
224
+ }));
225
+ if (!contextError)
226
+ return true;
227
+ const [removeError] = await catchError(removeSeedContext(workspaceDir));
228
+ const stale = removeError ? ` The previous .seed-context.json could not be removed either (${removeError.message}), so do not run 'uip vss deploy seed' without arguments.` : "";
229
+ writeWarning(`Could not write the seed context: ${contextError.message}.${stale} Seed with: ${command} — run it before filling the CSVs in, since it replaces them.`);
230
+ return false;
231
+ }
232
+
233
+ // src/services/post-deploy/installed-folder.ts
234
+ async function resolveInstalledFolder(input) {
235
+ if (input.job.installedFolderKey) {
236
+ const key = input.job.installedFolderKey;
237
+ const [, path2] = await catchError(findFolderPath(input.config, key, input.options.signal));
238
+ writeProgress(` Data Fabric entities live in folder ${path2 ?? key} (${key}).`);
239
+ return { key, path: path2 };
240
+ }
241
+ const {
242
+ listDeploymentsOfSolution,
243
+ resolveInstalledFolder: resolveFromDeployments,
244
+ solutionNameFromManifest
245
+ } = await import("./solution-deployments-m44fyb88.js");
246
+ const solutionName = solutionNameFromManifest(input.manifest);
247
+ if (!solutionName)
248
+ return;
249
+ const [listError, deployments] = await catchError(listDeploymentsOfSolution(input.config, solutionName, input.options.signal, deploymentNameOf(input)));
250
+ if (listError || !deployments) {
251
+ writeWarning(`Could not read the installed solution's folder: ${listError?.message ?? "unknown error"}. Seeding may need --folder-key.`);
252
+ return;
253
+ }
254
+ const resolved = resolveFromDeployments({
255
+ deployments,
256
+ deploymentName: deploymentNameOf(input),
257
+ solutionName,
258
+ packageVersion: input.job.packageVersion,
259
+ preferNewest: false
260
+ });
261
+ if (resolved.kind !== "resolved")
262
+ return;
263
+ const [, ownPath] = await catchError(findFolderPath(input.config, resolved.folderKey, input.options.signal));
264
+ const path = ownPath ?? undefined;
265
+ writeProgress(` Data Fabric entities live in folder ${path ?? resolved.folderKey} (${resolved.folderKey}).`);
266
+ return { key: resolved.folderKey, path };
267
+ }
268
+
269
+ // src/services/post-deploy/offer.ts
270
+ async function describeSeedOffer(workspaceDir, manifest, config, folderKey, folderPath) {
271
+ const fs = getFileSystem();
272
+ const seeding = manifest.dataFabric?.seeding ?? {};
273
+ const entities = [];
274
+ for (const [name, declared] of Object.entries(seeding)) {
275
+ const read = await readSeedFile(fs, workspaceDir, name);
276
+ if (read.kind === "invalid") {
277
+ writeWarning(`${name}.csv could not be read — ${read.why}. Fix it before seeding.`);
278
+ }
279
+ if (read.kind === "absent") {
280
+ writeWarning(`No seed file for "${name}" at ${read.path}. It will be skipped.`);
281
+ }
282
+ entities.push({
283
+ name,
284
+ rows: read.kind === "table" ? read.table.rows.length : 0,
285
+ strategy: readStrategy(declared.strategy).strategy
286
+ });
287
+ }
288
+ return {
289
+ workspaceDir,
290
+ organizationName: config.organizationName,
291
+ tenantName: config.tenantName,
292
+ scope: folderKey ? `solution folder ${folderPath ?? folderKey}` : "tenant-level entities",
293
+ entities
294
+ };
295
+ }
296
+ async function wantsSeeding(options, offer, deps, pushWith, refreshFirst) {
297
+ if (options.seed === true)
298
+ return true;
299
+ if (options.seed === false)
300
+ return false;
301
+ if (!canPrompt())
302
+ return false;
303
+ if (await deps.confirmSeed(offer))
304
+ return true;
305
+ writeProgress(refreshFirst ? `Skipped. Run ${pushWith} before editing the files under ${offer.workspaceDir} — it replaces them.` : `Skipped. Edit the files under ${offer.workspaceDir}, then push with: ${pushWith}`);
306
+ return false;
307
+ }
308
+ async function runOfferedSeed(input, folderKey, workspaceDir, hint, templatesAreCurrent = false) {
309
+ const { job, options, deps } = input;
310
+ const yes = options.seed === true ? options.yes : undefined;
311
+ const retry = seedCommandFor(job, folderKey, options) + (templatesAreCurrent ? " --refresh" : "") + (yes ? " --yes" : "");
312
+ const { runSeed } = await import("./seed-service-2d1f7zaz.js");
313
+ const [seedError, seeded] = await catchError(runSeed({
314
+ packageName: job.packageName,
315
+ packageVersion: job.packageVersion,
316
+ folderKey,
317
+ yes,
318
+ serviceUrl: options.serviceUrl,
319
+ loginValidity: options.loginValidity,
320
+ tenant: options.tenant,
321
+ signal: options.signal,
322
+ ...templatesAreCurrent ? { templatesAreCurrent: true } : {}
323
+ }, deps.seed));
324
+ if (seedError || !seeded) {
325
+ writeWarning(`Seeding did not complete: ${seedError instanceof Error ? seedError.message : String(seedError)}. Retry with: ${retry}`);
326
+ return { seedWorkspace: workspaceDir, seedHint: hint };
327
+ }
328
+ if (!seeded.ok) {
329
+ writeWarning(`Seeding did not complete — fix the reported issue, then retry with: ${retry}`);
330
+ if (seeded.instructions)
331
+ writeWarning(seeded.instructions);
332
+ return {
333
+ seedWorkspace: workspaceDir,
334
+ seedHint: hint,
335
+ ...seeded.summaries ? { seeded: seeded.summaries } : {}
336
+ };
337
+ }
338
+ return {
339
+ seedWorkspace: seeded.workspaceDir,
340
+ seeded: seeded.summaries,
341
+ ...templatesAreCurrent ? { seedHint: hint } : {}
342
+ };
343
+ }
344
+
345
+ // src/services/post-deploy.ts
346
+ async function prepareWorkspaceWithoutManifest(input) {
347
+ const job = namedJob(input.job);
348
+ if (!job) {
349
+ return {
350
+ seedHint: "The job carries no package name or version, so no seed workspace was " + "prepared. If the package seeds Data Fabric data, seed it with: " + "uip vss deploy seed --package-name <name> --package-version <version>" + routingFlags(input.options) + seedYesFlag(input.options) + FOLDER_SCOPE_UNKNOWN_NOTE
351
+ };
352
+ }
353
+ const prepared = await prepareSeedWorkspace({ ...input, job }, job.installedFolderKey, true, FOLDER_SCOPE_UNKNOWN_NOTE);
354
+ const seedHint = (prepared.seedHint ?? `Seed Data Fabric data with: ${seedCommandFor(job, undefined, input.options, false)}` + seedYesFlag(input.options)) + FOLDER_SCOPE_UNKNOWN_NOTE;
355
+ return prepared.dir === undefined ? { seedHint } : { seedWorkspace: prepared.dir, seedHint };
356
+ }
357
+ async function finalizeSucceededJob(input) {
358
+ const { manifest, options } = input;
359
+ const seedingEntities = Object.keys(manifest.dataFabric?.seeding ?? {});
360
+ if (seedingEntities.length === 0)
361
+ return {};
362
+ const job = namedJob(input.job);
363
+ if (!job) {
364
+ const folder = manifest.dataFabric?.schemaFilename ? "" : FOLDER_PLACEHOLDER;
365
+ return {
366
+ seedHint: "This package seeds Data Fabric data, but the job the service answered with " + "carries no package name or version, so no seed workspace was prepared. Seed " + "it with: uip vss deploy seed --package-name <name> --package-version <version>" + `${folder}${routingFlags(options)}${seedYesFlag(options)}`
367
+ };
368
+ }
369
+ const unusable = seedingEntities.filter((name) => entityNameProblem(name));
370
+ if (unusable.length > 0)
371
+ return withholdForUnusableNames(unusable);
372
+ return prepareAndOffer({ ...input, job });
373
+ }
374
+ async function prepareAndOffer(input) {
375
+ const { job, manifest, options } = input;
376
+ const tenantLevel = Boolean(manifest.dataFabric?.schemaFilename);
377
+ const installed = tenantLevel ? undefined : await resolveInstalledFolder(input);
378
+ const folderUnknown = !tenantLevel && !installed;
379
+ const prepared = await prepareSeedWorkspace(input, installed?.key, folderUnknown);
380
+ const workspaceDir = prepared.dir;
381
+ const hint = prepared.seedHint ?? `Seed Data Fabric data with: ${seedCommandFor(job, installed?.key, options)}` + (folderUnknown ? FOLDER_PLACEHOLDER : "") + seedYesFlag(options);
382
+ if (workspaceDir === undefined)
383
+ return { seedHint: hint };
384
+ if (folderUnknown) {
385
+ writeWarning("Not offering to seed: the folder the solution installed into is not known. " + "Find it in Orchestrator (the Solution folder under the deploy target) and pass it as --folder-key.");
386
+ return { seedWorkspace: workspaceDir, seedHint: hint };
387
+ }
388
+ const folderKey = installed?.key;
389
+ const offer = await describeSeedOffer(workspaceDir, manifest, input.config, folderKey, installed?.path);
390
+ const [askError, wanted] = await catchError(wantsSeeding(options, offer, input.deps, prepared.pushWith ?? `uip vss deploy seed${routingFlags(options)}`, prepared.refreshFirst === true));
391
+ if (askError || !wanted) {
392
+ if (askError) {
393
+ writeProgress(`Not seeding. Push the data later with: ${seedCommandFor(job, folderKey, options)}`);
394
+ }
395
+ return { seedWorkspace: workspaceDir, seedHint: hint };
396
+ }
397
+ return runOfferedSeed(input, folderKey, workspaceDir, hint, prepared.pushWith !== undefined);
398
+ }
399
+ function withholdForUnusableNames(unusable) {
400
+ const names = unusable.map((name) => JSON.stringify(name)).join(", ");
401
+ writeWarning(`Not seeding: the package manifest names seeding entities that cannot be seed file names: ${names}. ` + "'uip vss deploy seed' refuses the package until they are fixed.");
402
+ return {
403
+ seedHint: "Fix the entity names under dataFabric.seeding in the package manifest and republish the package, " + "then deploy the new version to seed it."
404
+ };
405
+ }
406
+
407
+ // src/services/watch/stopped.ts
408
+ function stoppedWatching(outcome, jobId, timeoutSeconds, routing) {
409
+ const flags = routingFlags(routing);
410
+ switch (outcome.kind) {
411
+ case "detached":
412
+ return {
413
+ ok: true,
414
+ outcome: "detached",
415
+ jobId,
416
+ ...outcome.job ? { status: outcome.job.status } : {}
417
+ };
418
+ case "timeout":
419
+ return failure("poll-timeout", `Stopped watching job ${jobId} after the ${timeoutSeconds}s timeout. ${jobStateAtTimeout(outcome.job)}`, `Check on it with: uip vss deploy status ${jobId}${flags}`, { result: RESULTS.TimeoutError });
420
+ default:
421
+ return failure("lost-contact", `Lost contact with job ${jobId}: ${outcome.error.message}`, `The job keeps running server-side. Re-attach with: uip vss deploy resume ${jobId}${flags}`);
422
+ }
423
+ }
424
+ function jobStateAtTimeout(job) {
425
+ if (job?.status === "action_required") {
426
+ return "The job is paused server-side, waiting for the step it needs.";
427
+ }
428
+ if (job?.status === "failed") {
429
+ return "The job failed and stays checkpointed server-side.";
430
+ }
431
+ if (!job) {
432
+ return "Where the job got to is not known: the last answer the watch was waiting for never arrived.";
433
+ }
434
+ return "The job is still running.";
435
+ }
436
+
437
+ export { describePauseKind, pauseInstructions, pauseRetry, pauseErrorCode, namedJob, FOLDER_SCOPE_UNKNOWN_NOTE, FOLDER_PLACEHOLDER, seedCommandFor, seedYesFlag, rejectSeedWithoutWait, linkedOutHint, linkedOutWorkspace, prepareWorkspaceWithoutManifest, finalizeSucceededJob, stoppedWatching };
438
+
439
+ //# debugId=A19FD87D70E0449664756E2164756E21