@uipath/solution-sdk 1.205.0-preview.277 → 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.
- package/dist/deployment-search.js +49 -19
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/{index-y4vgqz1w.js → index-0b3srjv7.js} +98 -8
- package/dist/{index-78paj2kz.js → index-0drvtcm4.js} +12 -11
- package/dist/{index-hkexw5er.js → index-bpn15jyk.js} +35 -20
- package/dist/{index-gdtpsdn7.js → index-mm1x18d6.js} +223 -28
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/{index-qq5t2dkg.js → index-t1e17c6h.js} +582 -577
- package/dist/{index-enc2hqq5.js → index-tdffhvfs.js} +931 -502
- package/dist/index-txd1grjc.js +541 -0
- package/dist/{index-cs3g624n.js → index-xnrbg4x3.js} +6 -7
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +1310 -669
- package/dist/{jmespath-231m3hyn.js → jmespath-x4na7sj8.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/package-search.js +18 -19
- package/dist/project-context.js +75 -0
- package/dist/resources/index.js +265 -237
- package/dist/scripts/generate-sdk.js +2 -2
- package/dist/solution-auth.js +6 -7
- package/dist/src/deployment-search.d.ts +30 -0
- package/dist/src/project-context.d.ts +9 -0
- package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +8 -2
- package/dist/src/resources/services/sync-resources-from-bindings.d.ts +14 -1
- package/package.json +6 -2
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/index-1de529jm.js +0 -39
- package/dist/index-53w8skv5.js +0 -262
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-zmneg45c.js +0 -1184
|
@@ -1,27 +1,26 @@
|
|
|
1
|
+
import"./index-0b3srjv7.js";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
+
catchError,
|
|
4
|
+
logger
|
|
5
|
+
} from "./index-tdffhvfs.js";
|
|
6
|
+
import {
|
|
7
|
+
Configuration2,
|
|
3
8
|
PipelinesApi,
|
|
4
|
-
isApplicationSession,
|
|
5
9
|
isMissingPipelinesRoute,
|
|
10
|
+
isApplicationSession,
|
|
6
11
|
parseSearchPage
|
|
7
|
-
} from "./index-
|
|
8
|
-
import {
|
|
9
|
-
Configuration,
|
|
10
|
-
DeploymentSearchItemDto2FromJSON,
|
|
11
|
-
SearchApi
|
|
12
|
-
} from "./index-qq5t2dkg.js";
|
|
12
|
+
} from "./index-0drvtcm4.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-1de529jm.js";
|
|
14
|
+
Configuration3,
|
|
15
|
+
DeploymentSearchItemDto2FromJSON2,
|
|
16
|
+
SearchApi2
|
|
17
|
+
} from "./index-t1e17c6h.js";
|
|
18
|
+
import"./index-bpn15jyk.js";
|
|
20
19
|
|
|
21
20
|
// src/legacy-deployment-search-v3.ts
|
|
22
21
|
var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
|
|
23
22
|
async function searchDeploymentsLegacyV3(auth, query, scope) {
|
|
24
|
-
const api = new
|
|
23
|
+
const api = new SearchApi2(new Configuration3({
|
|
25
24
|
basePath: auth.basePath,
|
|
26
25
|
accessToken: auth.accessToken
|
|
27
26
|
}));
|
|
@@ -76,14 +75,14 @@ var serversWithoutPipelinesSearch = new Set;
|
|
|
76
75
|
var DEPLOYMENT_ROWS = {
|
|
77
76
|
singular: "deployment",
|
|
78
77
|
plural: "deployments",
|
|
79
|
-
fromJSON:
|
|
78
|
+
fromJSON: DeploymentSearchItemDto2FromJSON2
|
|
80
79
|
};
|
|
81
80
|
async function searchDeploymentsPage(auth, query, scope) {
|
|
82
81
|
if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
|
|
83
|
-
const [error,
|
|
82
|
+
const [error, body] = await catchError(searchViaPipelines(auth, query, scope));
|
|
84
83
|
if (!error) {
|
|
85
84
|
return {
|
|
86
|
-
...parseSearchPage(
|
|
85
|
+
...parseSearchPage(body, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
|
|
87
86
|
source: "pipelines"
|
|
88
87
|
};
|
|
89
88
|
}
|
|
@@ -123,6 +122,35 @@ async function searchViaPipelines(auth, query, scope) {
|
|
|
123
122
|
}, scope);
|
|
124
123
|
return response.raw.json();
|
|
125
124
|
}
|
|
125
|
+
var APPLIED_FEED_HEADER = "X-UIPATH-FolderKey";
|
|
126
|
+
var feedHeaderProbes = new Map;
|
|
127
|
+
async function probeFeedHeaderAsync(auth, folderKey, route = "deployments") {
|
|
128
|
+
const cacheKey = `${auth.basePath}|${await sessionDigest(auth.accessToken)}|${route}|${folderKey.toLowerCase()}`;
|
|
129
|
+
const cached = feedHeaderProbes.get(cacheKey);
|
|
130
|
+
if (cached) {
|
|
131
|
+
return cached;
|
|
132
|
+
}
|
|
133
|
+
const api = new PipelinesApi(new Configuration2({
|
|
134
|
+
basePath: auth.basePath,
|
|
135
|
+
accessToken: auth.accessToken
|
|
136
|
+
}));
|
|
137
|
+
const withFeed = async ({ init }) => ({
|
|
138
|
+
headers: { ...init.headers, "X-UIPATH-FolderKey": folderKey }
|
|
139
|
+
});
|
|
140
|
+
const search = route === "packages" ? api.pipelinesSearchPackagesRaw({ pipelinePackagesSearchRequest: { take: 1, skip: 0 } }, withFeed) : api.pipelinesSearchDeploymentsRaw({ pipelineDeploymentsSearchRequest: { take: 1, skip: 0 } }, withFeed);
|
|
141
|
+
const [error, response] = await catchError(search);
|
|
142
|
+
if (error && !await isMissingPipelinesRoute(error)) {
|
|
143
|
+
throw error;
|
|
144
|
+
}
|
|
145
|
+
const echoed = response?.raw.headers.get(APPLIED_FEED_HEADER);
|
|
146
|
+
const result = echoed?.toLowerCase() === folderKey.toLowerCase() ? "applied" : "ignored";
|
|
147
|
+
feedHeaderProbes.set(cacheKey, result);
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
async function sessionDigest(accessToken) {
|
|
151
|
+
const hash = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(accessToken));
|
|
152
|
+
return Array.from(new Uint8Array(hash).slice(0, 8), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
153
|
+
}
|
|
126
154
|
var DEFAULT_PAGE_SIZE = 50;
|
|
127
155
|
var DEFAULT_MAX_PAGES = 20;
|
|
128
156
|
async function searchDeployments(auth, options = {}) {
|
|
@@ -173,10 +201,12 @@ function atLeastOne(option, value) {
|
|
|
173
201
|
return value;
|
|
174
202
|
}
|
|
175
203
|
export {
|
|
204
|
+
APPLIED_FEED_HEADER,
|
|
176
205
|
DeploymentSearchNeedsUserSessionError,
|
|
177
206
|
DeploymentSearchTruncatedError,
|
|
207
|
+
probeFeedHeaderAsync,
|
|
178
208
|
searchDeployments,
|
|
179
209
|
searchDeploymentsPage
|
|
180
210
|
};
|
|
181
211
|
|
|
182
|
-
//# debugId=
|
|
212
|
+
//# debugId=95941B97BB459AA864756E2164756E21
|