@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.
- package/dist/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
- package/dist/{cleanup-command-service-je9d70vv.js → cleanup-command-service-kadmvyk4.js} +34 -31
- package/dist/deploy-delete-service-xa25k94p.js +23 -0
- package/dist/deploy-run-service-rsedb9hr.js +23 -0
- package/dist/{deploy-status-service-919yn8wn.js → deploy-status-service-nmm8k9fa.js} +72 -62
- package/dist/deploy.js +35 -37
- package/dist/deployment-search-wtbye8v6.js +54 -0
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/feed-resolver-28pfxmky.js +27 -0
- package/dist/feed-scope-failure-d4avsc7j.js +20 -0
- package/dist/feed-session-4skrr620.js +23 -0
- package/dist/first-party-service-n3vva2m4.js +8 -0
- package/dist/governance-options-bevmhh1z.js +19 -0
- package/dist/index-aspmac9f.js +24 -0
- package/dist/index-md8d2ttf.js +60 -0
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-qq4kre7a.js +93 -0
- package/dist/index-t262f2xv.js +16 -0
- package/dist/index.js +33 -34
- package/dist/init.js +18 -21
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{list-5fke71jn.js → list-pnggwekk.js} +23 -23
- package/dist/models/pack-command-types.d.ts +3 -1
- package/dist/node-z9c03k2q.js +25 -0
- package/dist/pack-command-service-2txx876d.js +29 -0
- package/dist/{pack-project-ha0pxw3h.js → pack-project-ngwtfgge.js} +33 -40
- package/dist/pack.js +26 -30
- package/dist/package-id-350pep6r.js +11 -0
- package/dist/{packager-tool-5qzgdb66.js → packager-tool-0k205evy.js} +13 -15
- package/dist/{packager-tool-wm0jaz7p.js → packager-tool-0vz19vhv.js} +305 -657
- package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
- package/dist/{packager-tool-h1tq7bqf.js → packager-tool-41a5axkd.js} +65 -35
- package/dist/packager-tool-8097ps72.js +2307 -0
- package/dist/{packager-tool-1ybnxbp9.js → packager-tool-85f75be3.js} +18 -18
- package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
- package/dist/{packager-tool-pbmqk39a.js → packager-tool-a7s0gbxs.js} +33 -28
- package/dist/{packager-tool-47wzvqw0.js → packager-tool-aws5w512.js} +6 -6
- package/dist/packager-tool-c64hqa8n.js +106 -0
- package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
- package/dist/{packager-tool-d78ww4hb.js → packager-tool-cp66jc40.js} +51 -48
- package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
- package/dist/{packager-tool-cvf46scg.js → packager-tool-daphtc6e.js} +122 -89
- package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
- package/dist/packager-tool-f84z7nds.js +130 -0
- package/dist/{packager-tool-45a8fkw0.js → packager-tool-fgk0fkm5.js} +37 -39
- package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
- package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
- package/dist/{packager-tool-4pa108k7.js → packager-tool-g8ghm6wk.js} +11 -11
- package/dist/{packager-tool-2t72aez8.js → packager-tool-gpcr8zxf.js} +15 -15
- package/dist/packager-tool-gqb9ytg9.js +290 -0
- package/dist/packager-tool-hrkvdw31.js +280 -0
- package/dist/{packager-tool-056k8w2f.js → packager-tool-hs1kjv0c.js} +75 -9
- package/dist/{packager-tool-2vmz56qh.js → packager-tool-jatbb6c5.js} +184 -33
- package/dist/{packager-tool-f23a485e.js → packager-tool-jfp5mvqm.js} +176 -196
- package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
- package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
- package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
- package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
- package/dist/packager-tool-rb06drad.js +1178 -0
- package/dist/packager-tool-resolver-td3bhccd.js +20 -0
- package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
- package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
- package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/{packager-tool-gyqfs04e.js → packager-tool-vq5fwggb.js} +273 -255
- package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
- package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
- package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
- package/dist/{packager-tool-97rcgwvv.js → packager-tool-x461tgwy.js} +331 -55
- package/dist/{packager-tool-dnrk1gg6.js → packager-tool-y6efv1f8.js} +356 -298
- package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
- package/dist/packager-tool-z45eej6s.js +74 -0
- package/dist/packager-tool.js +6 -7
- package/dist/prepare-solution-resources-pwnyvtza.js +26 -0
- package/dist/{project-command-utils-t6pmpvq3.js → project-command-utils-zcmbecfy.js} +23 -26
- package/dist/project-contributions-kh9yftvg.js +27 -0
- package/dist/publish.js +17 -17
- package/dist/resource-mutations-mfn5k1hb.js +27 -0
- package/dist/{resource-version-lookup-0e3e2j58.js → resource-version-lookup-6ejh1hwd.js} +20 -23
- package/dist/resource.js +13 -16
- package/dist/{restore-command-service-pzpet021.js → restore-command-service-r7t52t25.js} +37 -34
- package/dist/{run-service-hk8w2h31.js → run-service-xrhg0z2a.js} +144 -66
- package/dist/services/deploy-activate-service.d.ts +2 -1
- package/dist/services/deployment-search-client.d.ts +2 -1
- package/dist/services/deployment-search.d.ts +39 -0
- package/dist/services/feed-resolver.d.ts +13 -1
- package/dist/services/feed-selection.d.ts +8 -5
- package/dist/services/feed-session.d.ts +34 -0
- package/dist/services/install-run.d.ts +92 -0
- package/dist/services/prepare-solution-resources.d.ts +11 -2
- package/dist/services/project-contributions.d.ts +2 -0
- package/dist/services/project-identity-telemetry.d.ts +3 -0
- package/dist/services/publish-service.d.ts +20 -3
- package/dist/services/solution-identity.d.ts +18 -0
- package/dist/ship-telemetry-bkf3800w.js +16 -0
- package/dist/solution-auth-jxcgd2m0.js +10 -0
- package/dist/solution-identity-92h2fbpa.js +19 -0
- package/dist/templates/AGENTS.md +27 -29
- package/dist/tool.js +32 -33
- package/package.json +2 -2
- package/dist/deploy-delete-service-0tm600d1.js +0 -25
- package/dist/deploy-run-service-hne5w17k.js +0 -25
- package/dist/deployment-search-32zvxn35.js +0 -55
- package/dist/feed-resolver-pdeb4wkq.js +0 -28
- package/dist/feed-scope-failure-4baame72.js +0 -19
- package/dist/feed-session-7xqphdrg.js +0 -17
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/governance-options-bqgv5fte.js +0 -32
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-prm27bvm.js +0 -138
- package/dist/index-wdndcwab.js +0 -667
- package/dist/node-v7xhqwe2.js +0 -86
- package/dist/pack-command-service-b1v9c8cw.js +0 -35
- package/dist/package-id-rpzgy31w.js +0 -13
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-5edvzz80.js +0 -543
- package/dist/packager-tool-99jaqabz.js +0 -171
- package/dist/packager-tool-9hsmn8th.js +0 -418
- package/dist/packager-tool-azre7mm1.js +0 -182
- package/dist/packager-tool-fn13r8e1.js +0 -188
- package/dist/packager-tool-gdtpsdn7.js +0 -342
- package/dist/packager-tool-qw47eyw7.js +0 -43
- package/dist/packager-tool-resolver-994z3jkj.js +0 -23
- package/dist/packager-tool-tedbebpq.js +0 -5367
- package/dist/packager-tool-x1ah4eez.js +0 -68
- package/dist/prepare-solution-resources-m1djfj62.js +0 -29
- package/dist/project-contributions-79ndycrx.js +0 -32
- package/dist/resource-mutations-c3krjqze.js +0 -36
- package/dist/ship-telemetry-myes7ak5.js +0 -21
- package/dist/solution-auth-aead70sw.js +0 -11
- /package/dist/{packager-tool-act5r386.js → packager-tool-2pxe2r4j.js} +0 -0
- /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-
|
|
3
|
+
} from "./packager-tool-t39pjz7n.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-m07vyk89.js";
|
|
7
7
|
|
|
8
8
|
// src/services/studio-web-auth-middleware.ts
|
|
9
9
|
var studioWebAuthByCommand = new WeakMap;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./packager-tool-60af1hw2.js";
|
|
2
|
+
catchError
|
|
3
|
+
} from "./packager-tool-m07vyk89.js";
|
|
5
4
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
logger,
|
|
6
|
+
unsupportedSolutionProjectType,
|
|
7
|
+
ensurePackagerFactory
|
|
8
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
8
9
|
import {
|
|
9
10
|
toolsFactoryRepository
|
|
10
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-a7s0gbxs.js";
|
|
11
12
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
unsupportedSolutionProjectType
|
|
15
|
-
} from "./packager-tool-tx834spe.js";
|
|
13
|
+
registerPackagerFactories2
|
|
14
|
+
} from "./packager-tool-ca5ngmqv.js";
|
|
16
15
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
toolVerbForProjectType2,
|
|
17
|
+
toolOwnedProjectTypes
|
|
18
|
+
} from "./packager-tool-qzcd5c9s.js";
|
|
19
19
|
|
|
20
20
|
// src/services/packager-tool-resolver.ts
|
|
21
21
|
var PACKAGER_OWNED_TYPES = ["Connector"];
|
|
@@ -30,7 +30,7 @@ class UnpackableProjectTypeError extends Error {
|
|
|
30
30
|
this.instructions = buildUnpackableInstructions(projectType);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function isUnpackableProjectTypeError2(error) {
|
|
34
34
|
return !!error && typeof error === "object" && error.__unpackableType === true;
|
|
35
35
|
}
|
|
36
36
|
function buildUnpackableInstructions(projectType) {
|
|
@@ -73,8 +73,8 @@ function packableProjectTypes() {
|
|
|
73
73
|
types.delete("processOrchestration");
|
|
74
74
|
return [...types].sort((a, b) => a.localeCompare(b));
|
|
75
75
|
}
|
|
76
|
-
async function
|
|
77
|
-
|
|
76
|
+
async function ensurePackagerTools2(solutionDir, fs, options) {
|
|
77
|
+
registerPackagerFactories2();
|
|
78
78
|
const only = options?.onlyProjectRelativePath;
|
|
79
79
|
const projects = (await readSolutionProjects(solutionDir, fs)).filter((project) => only === undefined || project.path === only);
|
|
80
80
|
if (projects.length === 0)
|
|
@@ -91,7 +91,7 @@ async function ensurePackagerTools(solutionDir, fs, options) {
|
|
|
91
91
|
}
|
|
92
92
|
if (toolsFactoryRepository.canHandleProject(type))
|
|
93
93
|
continue;
|
|
94
|
-
const toolVerb =
|
|
94
|
+
const toolVerb = toolVerbForProjectType2(type);
|
|
95
95
|
if (toolVerb) {
|
|
96
96
|
neededTools.add(toolVerb);
|
|
97
97
|
continue;
|
|
@@ -104,6 +104,6 @@ async function ensurePackagerTools(solutionDir, fs, options) {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
export {
|
|
107
|
+
export { isUnpackableProjectTypeError2, ensurePackagerTools2 };
|
|
108
108
|
|
|
109
|
-
//# debugId=
|
|
109
|
+
//# debugId=ADCB9B72454672F864756E2164756E21
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./packager-tool-tx834spe.js";
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
5
4
|
import {
|
|
6
5
|
ShipDimensions,
|
|
7
6
|
catchError
|
|
8
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-m07vyk89.js";
|
|
9
8
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
logger,
|
|
10
|
+
trackShipSucceeded
|
|
11
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
} from "./packager-tool-
|
|
13
|
+
unzip2
|
|
14
|
+
} from "./packager-tool-rj2d1g0w.js";
|
|
15
15
|
|
|
16
16
|
// src/services/ship-telemetry.ts
|
|
17
17
|
var PROJECT_TYPE_MAP = {
|
|
@@ -31,7 +31,7 @@ function isRecord(value) {
|
|
|
31
31
|
function normalizeShipProjectType(projectType) {
|
|
32
32
|
return PROJECT_TYPE_MAP[projectType] ?? projectType.trim().toLowerCase();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function summarizeShipProjectTypes2(projectTypes) {
|
|
35
35
|
const normalized = [
|
|
36
36
|
...new Set(projectTypes.map((projectType) => projectType.trim()).filter(Boolean).map(normalizeShipProjectType))
|
|
37
37
|
];
|
|
@@ -66,7 +66,7 @@ function isProjectManifestEntry(name) {
|
|
|
66
66
|
}
|
|
67
67
|
function unzipProjectManifests(archive) {
|
|
68
68
|
return new Promise((resolve, reject) => {
|
|
69
|
-
|
|
69
|
+
unzip2(archive, { filter: (file) => isProjectManifestEntry(file.name) }, (error, entries) => {
|
|
70
70
|
if (error) {
|
|
71
71
|
reject(error);
|
|
72
72
|
return;
|
|
@@ -75,7 +75,7 @@ function unzipProjectManifests(archive) {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
async function
|
|
78
|
+
async function inspectSolutionPackageProjectTypes2(packagePath) {
|
|
79
79
|
const fs = getFileSystem();
|
|
80
80
|
const [statError, stats] = await catchError(fs.stat(packagePath));
|
|
81
81
|
if (statError || !stats) {
|
|
@@ -109,17 +109,17 @@ async function inspectSolutionPackageProjectTypes(packagePath) {
|
|
|
109
109
|
}
|
|
110
110
|
projectTypes.push(...parsedTypes);
|
|
111
111
|
}
|
|
112
|
-
return
|
|
112
|
+
return summarizeShipProjectTypes2(projectTypes);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function trackSolutionShipSucceeded2(payload, capture) {
|
|
115
115
|
const { projectTypeSummary, ...rest } = payload;
|
|
116
116
|
return trackShipSucceeded({
|
|
117
117
|
...rest,
|
|
118
118
|
[ShipDimensions.ProjectType]: projectTypeSummary.projectType,
|
|
119
119
|
[ShipDimensions.ProjectTypes]: projectTypeSummary.projectTypes
|
|
120
|
-
});
|
|
120
|
+
}, capture);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export {
|
|
123
|
+
export { summarizeShipProjectTypes2, inspectSolutionPackageProjectTypes2, trackSolutionShipSucceeded2 };
|
|
124
124
|
|
|
125
|
-
//# debugId=
|
|
125
|
+
//# debugId=7DA95614C728292C64756E2164756E21
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
+
resolveSessionIdentity
|
|
3
|
+
} from "./packager-tool-t39pjz7n.js";
|
|
4
|
+
import {
|
|
5
|
+
catchError,
|
|
6
|
+
httpStatusOf2,
|
|
2
7
|
getSdkUserAgentToken,
|
|
3
8
|
installSdkUserAgentHeader
|
|
4
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-m07vyk89.js";
|
|
10
|
+
import {
|
|
11
|
+
logger
|
|
12
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
13
|
+
import {
|
|
14
|
+
Configuration3,
|
|
15
|
+
DeploymentSearchItemDto2FromJSON,
|
|
16
|
+
SearchApi
|
|
17
|
+
} from "./packager-tool-rb06drad.js";
|
|
5
18
|
|
|
6
19
|
// ../pipelines-sdk/generated/src/runtime.ts
|
|
7
20
|
var BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
8
21
|
|
|
9
|
-
class
|
|
22
|
+
class Configuration2 {
|
|
10
23
|
configuration;
|
|
11
24
|
constructor(configuration = {}) {
|
|
12
25
|
this.configuration = configuration;
|
|
@@ -53,7 +66,7 @@ class Configuration {
|
|
|
53
66
|
return this.configuration.credentials;
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
|
-
var DefaultConfig = new
|
|
69
|
+
var DefaultConfig = new Configuration2;
|
|
57
70
|
|
|
58
71
|
class BaseAPI {
|
|
59
72
|
configuration;
|
|
@@ -272,7 +285,61 @@ class TextApiResponse {
|
|
|
272
285
|
return await this.raw.text();
|
|
273
286
|
}
|
|
274
287
|
}
|
|
288
|
+
// ../pipelines-sdk/package.json
|
|
289
|
+
var package_default = {
|
|
290
|
+
name: "@uipath/pipelines-sdk",
|
|
291
|
+
author: "UiPath",
|
|
292
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
293
|
+
version: "1.206.0",
|
|
294
|
+
description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
|
|
295
|
+
repository: {
|
|
296
|
+
type: "git",
|
|
297
|
+
url: "https://github.com/UiPath/cli.git",
|
|
298
|
+
directory: "packages/pipelines-sdk"
|
|
299
|
+
},
|
|
300
|
+
publishConfig: {
|
|
301
|
+
registry: "https://npm.pkg.github.com/@uipath"
|
|
302
|
+
},
|
|
303
|
+
keywords: [
|
|
304
|
+
"uipath",
|
|
305
|
+
"pipelines",
|
|
306
|
+
"sdk"
|
|
307
|
+
],
|
|
308
|
+
type: "module",
|
|
309
|
+
main: "./dist/index.js",
|
|
310
|
+
types: "./dist/src/index.d.ts",
|
|
311
|
+
exports: {
|
|
312
|
+
".": {
|
|
313
|
+
types: "./dist/src/index.d.ts",
|
|
314
|
+
default: "./dist/index.js"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
bin: {
|
|
318
|
+
"generate-pipelines-sdk": "./dist/scripts/generate-sdk.js"
|
|
319
|
+
},
|
|
320
|
+
files: [
|
|
321
|
+
"dist"
|
|
322
|
+
],
|
|
323
|
+
private: true,
|
|
324
|
+
scripts: {
|
|
325
|
+
build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
|
|
326
|
+
generate: "bun run src/scripts/generate-sdk.ts",
|
|
327
|
+
lint: "biome check .",
|
|
328
|
+
test: "vitest run",
|
|
329
|
+
"test:coverage": "vitest run --coverage",
|
|
330
|
+
typecheck: "tsc --noEmit"
|
|
331
|
+
},
|
|
332
|
+
devDependencies: {
|
|
333
|
+
"@openapitools/openapi-generator-cli": "^2.31.1",
|
|
334
|
+
"@types/node": "^25.5.2",
|
|
335
|
+
"@uipath/common": "workspace:*",
|
|
336
|
+
typescript: "^7.0.2"
|
|
337
|
+
}
|
|
338
|
+
};
|
|
275
339
|
|
|
340
|
+
// ../pipelines-sdk/src/user-agent.ts
|
|
341
|
+
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
342
|
+
installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
|
|
276
343
|
// ../pipelines-sdk/generated/src/models/BaseResourceIdentifier.ts
|
|
277
344
|
function BaseResourceIdentifierFromJSON(json) {
|
|
278
345
|
return BaseResourceIdentifierFromJSONTyped(json, false);
|
|
@@ -1808,60 +1875,269 @@ class PipelinesApi extends BaseAPI {
|
|
|
1808
1875
|
return await response.value();
|
|
1809
1876
|
}
|
|
1810
1877
|
}
|
|
1811
|
-
// ../
|
|
1812
|
-
var
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1878
|
+
// ../solution-sdk/src/legacy-deployment-search-v3.ts
|
|
1879
|
+
var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
|
|
1880
|
+
async function searchDeploymentsLegacyV3(auth, query, scope) {
|
|
1881
|
+
const api = new SearchApi(new Configuration3({
|
|
1882
|
+
basePath: auth.basePath,
|
|
1883
|
+
accessToken: auth.accessToken
|
|
1884
|
+
}));
|
|
1885
|
+
const response = await api.searchSearchDeployments22Raw({ deploymentsSearchRequest2: toLegacyV3Request(query) }, scope);
|
|
1886
|
+
return response.raw.json();
|
|
1887
|
+
}
|
|
1888
|
+
function toLegacyV3Request(query) {
|
|
1889
|
+
return {
|
|
1890
|
+
searchTerm: query.searchTerm ?? query.deploymentName ?? query.packageName,
|
|
1891
|
+
packageName: query.packageName,
|
|
1892
|
+
...query.targetFolderName ? { targetFolderName: query.targetFolderName } : {},
|
|
1893
|
+
take: query.take,
|
|
1894
|
+
skip: query.skip,
|
|
1895
|
+
orderByColumn: query.orderByColumn,
|
|
1896
|
+
orderByDirection: query.orderByDirection,
|
|
1897
|
+
operationStatuses: query.operationStatuses ?? [],
|
|
1898
|
+
activationStatuses: query.activationStatuses ?? []
|
|
1899
|
+
};
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
// ../solution-sdk/src/pipelines-route.ts
|
|
1903
|
+
async function isMissingPipelinesRoute(error) {
|
|
1904
|
+
const status = httpStatusOf2(error);
|
|
1905
|
+
if (status === 405) {
|
|
1906
|
+
return true;
|
|
1907
|
+
}
|
|
1908
|
+
if (status !== 404 || !error || typeof error !== "object") {
|
|
1909
|
+
return false;
|
|
1910
|
+
}
|
|
1911
|
+
if (!("response" in error)) {
|
|
1912
|
+
return true;
|
|
1913
|
+
}
|
|
1914
|
+
const response = error.response;
|
|
1915
|
+
if (!(response instanceof Response)) {
|
|
1916
|
+
return false;
|
|
1917
|
+
}
|
|
1918
|
+
const [readError, body] = await catchError((async () => response.clone().text())());
|
|
1919
|
+
if (readError) {
|
|
1920
|
+
return false;
|
|
1921
|
+
}
|
|
1922
|
+
return body.trim() === "";
|
|
1923
|
+
}
|
|
1924
|
+
function isApplicationSession(auth) {
|
|
1925
|
+
const identity = auth.identity ?? resolveSessionIdentity(auth.accessToken);
|
|
1926
|
+
return identity?.type === "Application";
|
|
1927
|
+
}
|
|
1928
|
+
function notAPage(route, what, options) {
|
|
1929
|
+
return new Error(`${route} answered with ${what}.`, options);
|
|
1930
|
+
}
|
|
1931
|
+
function parseSearchPage(body, route, kind) {
|
|
1932
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
1933
|
+
throw notAPage(route, `a body that is not a page of ${kind.plural}`);
|
|
1934
|
+
}
|
|
1935
|
+
const values = "values" in body ? body.values : undefined;
|
|
1936
|
+
if (values !== undefined && values !== null && !Array.isArray(values)) {
|
|
1937
|
+
throw notAPage(route, `\`values\` that is not a list of ${kind.plural}`);
|
|
1938
|
+
}
|
|
1939
|
+
const rows = Array.isArray(values) ? values : [];
|
|
1940
|
+
const count = "count" in body && typeof body.count === "number" && body.count >= 0 ? body.count : undefined;
|
|
1941
|
+
return { count, values: rows.map((row) => parseRow(row, route, kind)) };
|
|
1942
|
+
}
|
|
1943
|
+
function parseRow(row, route, kind) {
|
|
1944
|
+
const what = `a row that is not a ${kind.singular}`;
|
|
1945
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) {
|
|
1946
|
+
throw notAPage(route, what);
|
|
1947
|
+
}
|
|
1948
|
+
if (kind.isRow && !kind.isRow(row)) {
|
|
1949
|
+
throw notAPage(route, what);
|
|
1950
|
+
}
|
|
1951
|
+
const [error, parsed] = catchError(() => kind.fromJSON(row));
|
|
1952
|
+
if (error) {
|
|
1953
|
+
throw notAPage(route, what, { cause: error });
|
|
1954
|
+
}
|
|
1955
|
+
return parsed;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
// ../solution-sdk/src/deployment-search.ts
|
|
1959
|
+
var PIPELINES_SEARCH_ROUTE = "POST /v1/pipelines/deployments/search";
|
|
1960
|
+
|
|
1961
|
+
class DeploymentSearchNeedsUserSessionError extends Error {
|
|
1962
|
+
constructor() {
|
|
1963
|
+
super("This server's deployment search reads user sessions only; an application (client-credentials) login cannot read it. Sign in with 'uip login' to use it.");
|
|
1964
|
+
this.name = "DeploymentSearchNeedsUserSessionError";
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
function truncationMessage(rowsRead, reason) {
|
|
1968
|
+
switch (reason) {
|
|
1969
|
+
case "page-cap":
|
|
1970
|
+
return `The deployment search read ${rowsRead} rows and more rows remain. Narrow the search (for example by package or folder) so it fits.`;
|
|
1971
|
+
case "skip-ignored":
|
|
1972
|
+
return `The deployment search stopped after ${rowsRead} rows: the server returned the same page again, so the search cannot page past it.`;
|
|
1973
|
+
case "short-page":
|
|
1974
|
+
return `The deployment search read ${rowsRead} rows, but the server counted more and then returned a short page, so the rest cannot be read. Retry the search; if it keeps happening, narrow it (for example by package or folder).`;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
class DeploymentSearchTruncatedError extends Error {
|
|
1979
|
+
rowsRead;
|
|
1980
|
+
reason;
|
|
1981
|
+
constructor(rowsRead, reason) {
|
|
1982
|
+
super(truncationMessage(rowsRead, reason));
|
|
1983
|
+
this.rowsRead = rowsRead;
|
|
1984
|
+
this.reason = reason;
|
|
1985
|
+
this.name = "DeploymentSearchTruncatedError";
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
var serversWithoutPipelinesSearch = new Set;
|
|
1989
|
+
var DEPLOYMENT_ROWS = {
|
|
1990
|
+
singular: "deployment",
|
|
1991
|
+
plural: "deployments",
|
|
1992
|
+
fromJSON: DeploymentSearchItemDto2FromJSON
|
|
1993
|
+
};
|
|
1994
|
+
async function searchDeploymentsPage(auth, query, scope) {
|
|
1995
|
+
if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
|
|
1996
|
+
const [error, body] = await catchError(searchViaPipelines(auth, query, scope));
|
|
1997
|
+
if (!error) {
|
|
1998
|
+
return {
|
|
1999
|
+
...parseSearchPage(body, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
|
|
2000
|
+
source: "pipelines"
|
|
2001
|
+
};
|
|
1838
2002
|
}
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
scripts: {
|
|
1848
|
-
build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
|
|
1849
|
-
generate: "bun run src/scripts/generate-sdk.ts",
|
|
1850
|
-
lint: "biome check .",
|
|
1851
|
-
test: "vitest run",
|
|
1852
|
-
"test:coverage": "vitest run --coverage"
|
|
1853
|
-
},
|
|
1854
|
-
devDependencies: {
|
|
1855
|
-
"@openapitools/openapi-generator-cli": "^2.31.1",
|
|
1856
|
-
"@types/node": "^25.5.2",
|
|
1857
|
-
"@uipath/common": "workspace:*",
|
|
1858
|
-
typescript: "^7.0.2"
|
|
2003
|
+
if (!await isMissingPipelinesRoute(error)) {
|
|
2004
|
+
throw error;
|
|
2005
|
+
}
|
|
2006
|
+
serversWithoutPipelinesSearch.add(auth.basePath);
|
|
2007
|
+
logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated ${LEGACY_V3_SEARCH_ROUTE}.`);
|
|
2008
|
+
}
|
|
2009
|
+
if (isApplicationSession(auth)) {
|
|
2010
|
+
throw new DeploymentSearchNeedsUserSessionError;
|
|
1859
2011
|
}
|
|
2012
|
+
const body = await searchDeploymentsLegacyV3(auth, query, scope);
|
|
2013
|
+
return {
|
|
2014
|
+
...parseSearchPage(body, LEGACY_V3_SEARCH_ROUTE, DEPLOYMENT_ROWS),
|
|
2015
|
+
source: "legacy-v3"
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
async function searchViaPipelines(auth, query, scope) {
|
|
2019
|
+
const api = new PipelinesApi(new Configuration2({
|
|
2020
|
+
basePath: auth.basePath,
|
|
2021
|
+
accessToken: auth.accessToken
|
|
2022
|
+
}));
|
|
2023
|
+
const response = await api.pipelinesSearchDeploymentsRaw({
|
|
2024
|
+
pipelineDeploymentsSearchRequest: {
|
|
2025
|
+
take: query.take,
|
|
2026
|
+
skip: query.skip,
|
|
2027
|
+
deploymentName: query.deploymentName,
|
|
2028
|
+
packageName: query.packageName,
|
|
2029
|
+
targetFolderName: query.targetFolderName,
|
|
2030
|
+
searchTerm: query.searchTerm,
|
|
2031
|
+
orderByColumn: query.orderByColumn,
|
|
2032
|
+
orderByDirection: query.orderByDirection,
|
|
2033
|
+
operationStatuses: query.operationStatuses,
|
|
2034
|
+
activationStatuses: query.activationStatuses
|
|
2035
|
+
}
|
|
2036
|
+
}, scope);
|
|
2037
|
+
return response.raw.json();
|
|
2038
|
+
}
|
|
2039
|
+
var APPLIED_FEED_HEADER = "X-UIPATH-FolderKey";
|
|
2040
|
+
var feedHeaderProbes = new Map;
|
|
2041
|
+
async function probeFeedHeaderAsync(auth, folderKey, route = "deployments") {
|
|
2042
|
+
const cacheKey = `${auth.basePath}|${await sessionDigest(auth.accessToken)}|${route}|${folderKey.toLowerCase()}`;
|
|
2043
|
+
const cached = feedHeaderProbes.get(cacheKey);
|
|
2044
|
+
if (cached) {
|
|
2045
|
+
return cached;
|
|
2046
|
+
}
|
|
2047
|
+
const api = new PipelinesApi(new Configuration2({
|
|
2048
|
+
basePath: auth.basePath,
|
|
2049
|
+
accessToken: auth.accessToken
|
|
2050
|
+
}));
|
|
2051
|
+
const withFeed = async ({ init }) => ({
|
|
2052
|
+
headers: { ...init.headers, "X-UIPATH-FolderKey": folderKey }
|
|
2053
|
+
});
|
|
2054
|
+
const search = route === "packages" ? api.pipelinesSearchPackagesRaw({ pipelinePackagesSearchRequest: { take: 1, skip: 0 } }, withFeed) : api.pipelinesSearchDeploymentsRaw({ pipelineDeploymentsSearchRequest: { take: 1, skip: 0 } }, withFeed);
|
|
2055
|
+
const [error, response] = await catchError(search);
|
|
2056
|
+
if (error && !await isMissingPipelinesRoute(error)) {
|
|
2057
|
+
throw error;
|
|
2058
|
+
}
|
|
2059
|
+
const echoed = response?.raw.headers.get(APPLIED_FEED_HEADER);
|
|
2060
|
+
const result = echoed?.toLowerCase() === folderKey.toLowerCase() ? "applied" : "ignored";
|
|
2061
|
+
feedHeaderProbes.set(cacheKey, result);
|
|
2062
|
+
return result;
|
|
2063
|
+
}
|
|
2064
|
+
async function sessionDigest(accessToken) {
|
|
2065
|
+
const hash = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(accessToken));
|
|
2066
|
+
return Array.from(new Uint8Array(hash).slice(0, 8), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
2067
|
+
}
|
|
2068
|
+
// src/services/http-status.ts
|
|
2069
|
+
function isAuthRefusal(error) {
|
|
2070
|
+
const status = httpStatusOf2(error);
|
|
2071
|
+
return status === 401 || status === 403;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
// src/services/feed-session.ts
|
|
2075
|
+
function classifyFeedSession2(session) {
|
|
2076
|
+
const type = (session.identity ?? resolveSessionIdentity(session.accessToken))?.type;
|
|
2077
|
+
if (type === "User") {
|
|
2078
|
+
return "user";
|
|
2079
|
+
}
|
|
2080
|
+
return type === "Application" ? "application" : "unknown";
|
|
2081
|
+
}
|
|
2082
|
+
function feedSessionRefusal2(verdict, action, alternative) {
|
|
2083
|
+
if (verdict === "application") {
|
|
2084
|
+
return {
|
|
2085
|
+
message: `${action} needs a user session; this session is an external app.`,
|
|
2086
|
+
instructions: `The server does not apply X-UIPATH-FolderKey to client-credentials requests, so the request would run against the tenant feed instead. Run it with a user session ('uip login'), or ${alternative}.`
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
return {
|
|
2090
|
+
message: `${action} needs a user session, and this session's kind could not be read from its token.`,
|
|
2091
|
+
instructions: `The server applies X-UIPATH-FolderKey to user-token requests only, and a session that cannot be shown to be a user's is not allowed to act on a feed — guessing wrong would run the request against the tenant feed. Refresh the session with 'uip login' (an interactive login is recorded as a user session), or ${alternative}.`
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
function feedReadRefusalForApplication2(session, action) {
|
|
2095
|
+
if (classifyFeedSession2(session) !== "application") {
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
return feedSessionRefusal2("application", action, "drop the feed flag to read the tenant feed");
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
class FeedReadRefusedError2 extends Error {
|
|
2102
|
+
refusal;
|
|
2103
|
+
constructor(refusal) {
|
|
2104
|
+
super(refusal.message);
|
|
2105
|
+
this.refusal = refusal;
|
|
2106
|
+
this.name = "FeedReadRefusedError";
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
function applicationFeedRefusal(action, alternative, route, probeError) {
|
|
2110
|
+
const why = probeError === undefined ? `its answer to a feed-scoped read did not echo ${APPLIED_FEED_HEADER} back, so it ignored that header and the request would run against the tenant feed instead` : isAuthRefusal(probeError) ? `the check itself was refused (HTTP ${String(httpStatusOf2(probeError))}). It is a single-row ${route} search, which needs the ${PROBE_READ_SCOPE[route]} scope next to the scope the command uses — give the application ${PROBE_READ_SCOPE[route]} — and a request the server might run against the tenant feed is not sent on a guess` : `checking it failed (${probeError instanceof Error ? probeError.message : String(probeError)}), and a request it might run against the tenant feed is not sent on a guess`;
|
|
2111
|
+
return {
|
|
2112
|
+
message: `${action} with an external app needs a server that applies the feed to client-credentials requests, and this server could not be shown to.`,
|
|
2113
|
+
instructions: `The server was asked whether it runs this app's requests in that feed: ${why}. Run it with a user session ('uip login'), or ${alternative}.`
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
var PROBE_READ_SCOPE = {
|
|
2117
|
+
deployments: "Solutions.Deployments.Read",
|
|
2118
|
+
packages: "Solutions.Packages.Read"
|
|
1860
2119
|
};
|
|
2120
|
+
async function feedSessionRefusalAsync2(session, folderKey, kind, action, alternative, route = "deployments") {
|
|
2121
|
+
const verdict = classifyFeedSession2(session);
|
|
2122
|
+
if (verdict === "user") {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
if (verdict === "unknown") {
|
|
2126
|
+
return kind === "read" ? undefined : feedSessionRefusal2("unknown", action, alternative);
|
|
2127
|
+
}
|
|
2128
|
+
const [probeError, probe] = await catchError(probeFeedHeaderAsync(session, folderKey, route));
|
|
2129
|
+
if (probeError) {
|
|
2130
|
+
return applicationFeedRefusal(action, alternative, route, probeError);
|
|
2131
|
+
}
|
|
2132
|
+
return probe === "applied" ? undefined : applicationFeedRefusal(action, alternative, route);
|
|
2133
|
+
}
|
|
2134
|
+
async function feedReadRefusalAsync2(session, folderKey, action, route = "deployments") {
|
|
2135
|
+
if (!folderKey) {
|
|
2136
|
+
return feedReadRefusalForApplication2(session, action);
|
|
2137
|
+
}
|
|
2138
|
+
return feedSessionRefusalAsync2(session, folderKey, "read", action, "drop the feed flag to read the tenant feed", route);
|
|
2139
|
+
}
|
|
1861
2140
|
|
|
1862
|
-
|
|
1863
|
-
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
1864
|
-
installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
|
|
1865
|
-
export { Configuration, DeploymentOperation, DeploymentStatus, PipelinesApi };
|
|
2141
|
+
export { Configuration2, DeploymentOperation, DeploymentStatus, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage, DeploymentSearchNeedsUserSessionError, DeploymentSearchTruncatedError, searchDeploymentsPage, isAuthRefusal, classifyFeedSession2, feedSessionRefusal2, feedReadRefusalForApplication2, FeedReadRefusedError2, feedSessionRefusalAsync2, feedReadRefusalAsync2 };
|
|
1866
2142
|
|
|
1867
|
-
//# debugId=
|
|
2143
|
+
//# debugId=E529544362FCB9D064756E2164756E21
|