@uipath/agent-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/README.md +51 -0
- package/dist/THIRD-PARTY-NOTICES.md +5 -5
- package/dist/agent-tool-OK5DK57D-bjevqt47.js +10 -0
- package/dist/{de-MUJPA4EB-209jpeqe.js → de-AI7ML6JM-km47f8k4.js} +47 -5
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-xe939kq1.js +254 -0
- package/dist/{es-MX-2MYFZU7X-6v0q5rbn.js → es-MX-7KJZPEQN-1fq0a9jr.js} +47 -5
- package/dist/{es-7SE7HX2X-qda7whn6.js → es-SPNKTD5Y-vw5cbgv5.js} +47 -5
- package/dist/executor-tool.js +8 -10
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/{fr-MDFKNZ4C-qmypp92m.js → fr-AXJGUT53-hdg3pmd4.js} +47 -5
- package/dist/index-0j2xw9tw.js +36 -0
- package/dist/{index-ar269vgy.js → index-js1wb4x0.js} +223 -199
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-ybw87d41.js +21 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +15 -19
- package/dist/{ja-UTQEAP34-hvyf683h.js → ja-C7GZV6YP-hvtbngr5.js} +47 -5
- package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{ko-AXCHW2OK-pkwdcbmx.js → ko-Q24HSSL4-5vn55pte.js} +47 -5
- package/dist/{memory-runtime-service-h9wdsd31.js → memory-runtime-service-h5bqa30b.js} +16 -27
- package/dist/{packager-tool-je2re4j6.js → packager-tool-0ajs8pnk.js} +53 -8
- package/dist/{packager-tool-fza8z686.js → packager-tool-21r3phhc.js} +984 -467
- package/dist/{packager-tool-mmvst1c0.js → packager-tool-258gazqz.js} +49 -60
- package/dist/{packager-tool-jd8cfevc.js → packager-tool-4j09ztk2.js} +10 -40
- package/dist/{packager-tool-22e4nhzm.js → packager-tool-4shqngrj.js} +2 -2
- package/dist/packager-tool-ayda10gw.js +1434 -0
- package/dist/packager-tool-bh92xy8d.js +17988 -0
- package/dist/{packager-tool-c8amhz3a.js → packager-tool-d2fvzzb1.js} +1533 -726
- package/dist/{packager-tool-1yh8g550.js → packager-tool-epsr41wx.js} +8 -12
- package/dist/packager-tool-fc08rcbk.js +253 -0
- package/dist/{packager-tool-xbzpm6s2.js → packager-tool-kawtadzm.js} +44 -38
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-vwsq85y7.js → packager-tool-qr8dtv3r.js} +35 -18
- package/dist/{packager-tool-7sbsrgd5.js → packager-tool-qvsazy59.js} +6 -7
- package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
- package/dist/packager-tool-z6a5nr2d.js +2342 -0
- package/dist/packager-tool.js +5 -9
- package/dist/{pt-BR-Y6K6XHXK-37a932vp.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +47 -5
- package/dist/{pt-3DIO5QWG-hb763vct.js → pt-MHX6JGAX-xfgvdqwg.js} +47 -5
- package/dist/{ro-BWR3ONRR-jmap5ajd.js → ro-3RKJNGJZ-xqj14e3d.js} +47 -5
- package/dist/{ru-WBLQ5B2U-8r3c7v6d.js → ru-WBLQ5B2U-bf20yr5y.js} +1 -4
- package/dist/solution-auth-wmeqt2hh.js +10 -0
- package/dist/tool.js +14 -18
- package/dist/{tr-5IIHSFW5-stsb3dar.js → tr-PQLUUHPC-qsb7btxn.js} +47 -5
- package/dist/{zh-CN-R2KU4U5L-q4yhc33t.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +47 -5
- package/dist/{zh-TW-GNKMELBF-r4ay2475.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +47 -5
- package/package.json +2 -2
- package/dist/agent-tool-OK5DK57D-1654w938.js +0 -12
- package/dist/en-GN2ZGWUE-03z2df4k.js +0 -136
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/index-3bq4shbm.js +0 -666
- package/dist/index-aa5b4rsq.js +0 -3174
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/packager-tool-4mna26cc.js +0 -133
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-607v4t05.js +0 -22083
- package/dist/packager-tool-c23zrhj8.js +0 -11
- package/dist/packager-tool-emspfs60.js +0 -31133
- package/dist/packager-tool-kjhqvfap.js +0 -5365
- package/dist/solution-auth-h0yjcbsy.js +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-names.js
|
|
2
|
-
var
|
|
2
|
+
var JsonSerializerNames2 = {
|
|
3
3
|
DefaultCaseInsensitive: "DefaultCaseInsensitive",
|
|
4
4
|
CaseInsensitive: "CaseInsensitive",
|
|
5
5
|
Indented: "Indented",
|
|
@@ -21,7 +21,7 @@ var JsonSerializerNames = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer.js
|
|
24
|
-
class
|
|
24
|
+
class JsonSerializer2 {
|
|
25
25
|
serialize(value) {
|
|
26
26
|
if (value == null)
|
|
27
27
|
return null;
|
|
@@ -154,16 +154,16 @@ class JsonSerializer {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/pascal-case-enum-properties.js
|
|
157
|
-
var
|
|
157
|
+
var CAMEL_CASE_ENUM_PROPERTIES2 = [
|
|
158
158
|
"scope",
|
|
159
159
|
"replaceOption",
|
|
160
160
|
"lookupStrategy",
|
|
161
161
|
"folderType"
|
|
162
162
|
];
|
|
163
|
-
var
|
|
163
|
+
var SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2 = [
|
|
164
164
|
"propertyCategory"
|
|
165
165
|
];
|
|
166
|
-
var
|
|
166
|
+
var RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2 = [
|
|
167
167
|
"ValidationState.errorSeverity",
|
|
168
168
|
"ValidationState.errorType",
|
|
169
169
|
"AddOrUpdateResourceToSolutionResponse.status",
|
|
@@ -171,13 +171,13 @@ var RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES = [
|
|
|
171
171
|
"OverwriteValidationError.severity",
|
|
172
172
|
"ProjectResourceDescriptor.provisionType"
|
|
173
173
|
];
|
|
174
|
-
var
|
|
175
|
-
...
|
|
176
|
-
...
|
|
174
|
+
var PASCAL_CASE_ENUM_PROPERTIES2 = [
|
|
175
|
+
...SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2,
|
|
176
|
+
...RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2
|
|
177
177
|
];
|
|
178
178
|
|
|
179
179
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-factory.js
|
|
180
|
-
class
|
|
180
|
+
class JsonSerializerFactory2 {
|
|
181
181
|
get() {
|
|
182
182
|
return this.defaultSerializer;
|
|
183
183
|
}
|
|
@@ -192,44 +192,44 @@ class JsonSerializerFactory {
|
|
|
192
192
|
return serializer;
|
|
193
193
|
}
|
|
194
194
|
initializePredefinedSerializers() {
|
|
195
|
-
for (const name of
|
|
195
|
+
for (const name of JsonSerializerNames2.AllNames)
|
|
196
196
|
this.namedSerializers.set(name, this.createNamedSerializer(name));
|
|
197
197
|
}
|
|
198
198
|
createNamedSerializer(name) {
|
|
199
199
|
const options = this.createOptionsForName(name);
|
|
200
|
-
return new
|
|
200
|
+
return new JsonSerializer2(options);
|
|
201
201
|
}
|
|
202
202
|
createOptionsForName(name) {
|
|
203
203
|
const options = {
|
|
204
204
|
...this.baseOptions
|
|
205
205
|
};
|
|
206
206
|
switch (name) {
|
|
207
|
-
case
|
|
207
|
+
case JsonSerializerNames2.DefaultCaseInsensitive:
|
|
208
208
|
return {
|
|
209
209
|
caseInsensitive: true
|
|
210
210
|
};
|
|
211
|
-
case
|
|
211
|
+
case JsonSerializerNames2.CaseInsensitive:
|
|
212
212
|
options.caseInsensitive = true;
|
|
213
213
|
break;
|
|
214
|
-
case
|
|
214
|
+
case JsonSerializerNames2.Indented:
|
|
215
215
|
options.indented = true;
|
|
216
216
|
break;
|
|
217
|
-
case
|
|
217
|
+
case JsonSerializerNames2.CamelCase:
|
|
218
218
|
options.camelCase = true;
|
|
219
219
|
break;
|
|
220
|
-
case
|
|
220
|
+
case JsonSerializerNames2.CaseInsensitiveIndented:
|
|
221
221
|
options.caseInsensitive = true;
|
|
222
222
|
options.indented = true;
|
|
223
223
|
break;
|
|
224
|
-
case
|
|
224
|
+
case JsonSerializerNames2.IndentedIgnoreNull:
|
|
225
225
|
options.indented = true;
|
|
226
226
|
options.ignoreNull = true;
|
|
227
227
|
break;
|
|
228
|
-
case
|
|
228
|
+
case JsonSerializerNames2.PreservePropertyNames:
|
|
229
229
|
options.preservePropertyNames = true;
|
|
230
230
|
options.camelCase = false;
|
|
231
231
|
break;
|
|
232
|
-
case
|
|
232
|
+
case JsonSerializerNames2.CamelCaseIndented:
|
|
233
233
|
options.indented = true;
|
|
234
234
|
options.camelCase = true;
|
|
235
235
|
options.ignoreNull = true;
|
|
@@ -243,21 +243,21 @@ class JsonSerializerFactory {
|
|
|
243
243
|
const defaults = {
|
|
244
244
|
camelCase: true,
|
|
245
245
|
enumCamelCase: true,
|
|
246
|
-
camelCaseEnumProperties:
|
|
247
|
-
pascalCaseEnumProperties:
|
|
246
|
+
camelCaseEnumProperties: CAMEL_CASE_ENUM_PROPERTIES2,
|
|
247
|
+
pascalCaseEnumProperties: PASCAL_CASE_ENUM_PROPERTIES2
|
|
248
248
|
};
|
|
249
249
|
this.baseOptions = options ? {
|
|
250
250
|
...defaults,
|
|
251
251
|
...options
|
|
252
252
|
} : defaults;
|
|
253
|
-
this.defaultSerializer = new
|
|
253
|
+
this.defaultSerializer = new JsonSerializer2(this.baseOptions);
|
|
254
254
|
this.namedSerializers = new Map;
|
|
255
255
|
this.initializePredefinedSerializers();
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/serializer-proxy.js
|
|
260
|
-
class
|
|
260
|
+
class JsonSerializerProxy2 {
|
|
261
261
|
serialize(value) {
|
|
262
262
|
return this.jsonSerializer.serialize(value);
|
|
263
263
|
}
|
|
@@ -302,16 +302,16 @@ class JsonSerializerProxy {
|
|
|
302
302
|
}
|
|
303
303
|
constructor(jsonSerializerFactory, loggerFactory) {
|
|
304
304
|
this.jsonSerializer = jsonSerializerFactory.get();
|
|
305
|
-
this.caseInsensitiveSerializer = jsonSerializerFactory.getByName(
|
|
305
|
+
this.caseInsensitiveSerializer = jsonSerializerFactory.getByName(JsonSerializerNames2.CaseInsensitive);
|
|
306
306
|
this.logger = loggerFactory.create("JsonSerializerProxy");
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/stream-serializer.js
|
|
311
|
-
class
|
|
311
|
+
class StreamSerializer2 {
|
|
312
312
|
async serializeAsync(data, cancellationToken) {
|
|
313
313
|
cancellationToken?.throwIfAborted?.();
|
|
314
|
-
const serializer = this.jsonSerializerFactory.getByName(
|
|
314
|
+
const serializer = this.jsonSerializerFactory.getByName(JsonSerializerNames2.PreservePropertyNames);
|
|
315
315
|
const serializedContent = serializer.serialize(data);
|
|
316
316
|
const encoder = new TextEncoder;
|
|
317
317
|
const bytes = serializedContent ? encoder.encode(serializedContent) : new Uint8Array(0);
|
|
@@ -337,6 +337,201 @@ class StreamSerializer {
|
|
|
337
337
|
this.disposeStream = disposeStream;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/clients/generated/first-party-service.js
|
|
341
|
+
class HttpClient {
|
|
342
|
+
encodeQueryParam(key, value) {
|
|
343
|
+
const encodedKey = encodeURIComponent(key);
|
|
344
|
+
return `${encodedKey}=${encodeURIComponent(typeof value == "number" ? value : `${value}`)}`;
|
|
345
|
+
}
|
|
346
|
+
addQueryParam(query, key) {
|
|
347
|
+
return this.encodeQueryParam(key, query[key]);
|
|
348
|
+
}
|
|
349
|
+
addArrayQueryParam(query, key) {
|
|
350
|
+
const value = query[key];
|
|
351
|
+
return value.map((v) => this.encodeQueryParam(key, v)).join("&");
|
|
352
|
+
}
|
|
353
|
+
toQueryString(rawQuery) {
|
|
354
|
+
const query = rawQuery || {};
|
|
355
|
+
const keys = Object.keys(query).filter((key) => query[key] !== undefined);
|
|
356
|
+
return keys.map((key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)).join("&");
|
|
357
|
+
}
|
|
358
|
+
addQueryParams(rawQuery) {
|
|
359
|
+
const queryString = this.toQueryString(rawQuery);
|
|
360
|
+
return queryString ? `?${queryString}` : "";
|
|
361
|
+
}
|
|
362
|
+
mergeRequestParams(params1, params2) {
|
|
363
|
+
return {
|
|
364
|
+
...this.baseApiParams,
|
|
365
|
+
...params1,
|
|
366
|
+
...params2 || {},
|
|
367
|
+
headers: {
|
|
368
|
+
...this.baseApiParams.headers || {},
|
|
369
|
+
...params1.headers || {},
|
|
370
|
+
...params2 && params2.headers || {}
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
constructor(apiConfig = {}) {
|
|
375
|
+
this.baseUrl = "https://localhost:7008";
|
|
376
|
+
this.securityData = null;
|
|
377
|
+
this.abortControllers = new Map;
|
|
378
|
+
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
379
|
+
this.baseApiParams = {
|
|
380
|
+
credentials: "same-origin",
|
|
381
|
+
headers: {},
|
|
382
|
+
redirect: "follow",
|
|
383
|
+
referrerPolicy: "no-referrer"
|
|
384
|
+
};
|
|
385
|
+
this.setSecurityData = (data) => {
|
|
386
|
+
this.securityData = data;
|
|
387
|
+
};
|
|
388
|
+
this.contentFormatters = {
|
|
389
|
+
["application/json"]: (input) => input !== null && (typeof input == "object" || typeof input == "string") ? JSON.stringify(input) : input,
|
|
390
|
+
["application/vnd.api+json"]: (input) => input !== null && (typeof input == "object" || typeof input == "string") ? JSON.stringify(input) : input,
|
|
391
|
+
["text/plain"]: (input) => input !== null && typeof input != "string" ? JSON.stringify(input) : input,
|
|
392
|
+
["multipart/form-data"]: (input) => {
|
|
393
|
+
if (input instanceof FormData)
|
|
394
|
+
return input;
|
|
395
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
396
|
+
const property = input[key];
|
|
397
|
+
formData.append(key, property instanceof Blob ? property : typeof property == "object" && property !== null ? JSON.stringify(property) : `${property}`);
|
|
398
|
+
return formData;
|
|
399
|
+
}, new FormData);
|
|
400
|
+
},
|
|
401
|
+
["application/x-www-form-urlencoded"]: (input) => this.toQueryString(input)
|
|
402
|
+
};
|
|
403
|
+
this.createAbortSignal = (cancelToken) => {
|
|
404
|
+
if (this.abortControllers.has(cancelToken)) {
|
|
405
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
406
|
+
if (abortController)
|
|
407
|
+
return abortController.signal;
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
const abortController = new AbortController;
|
|
411
|
+
this.abortControllers.set(cancelToken, abortController);
|
|
412
|
+
return abortController.signal;
|
|
413
|
+
};
|
|
414
|
+
this.abortRequest = (cancelToken) => {
|
|
415
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
416
|
+
if (abortController) {
|
|
417
|
+
abortController.abort();
|
|
418
|
+
this.abortControllers.delete(cancelToken);
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
|
|
422
|
+
const secureParams = (typeof secure == "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
|
|
423
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
424
|
+
const queryString = query && this.toQueryString(query);
|
|
425
|
+
const payloadFormatter = this.contentFormatters[type || "application/json"];
|
|
426
|
+
const responseFormat = format || requestParams.format;
|
|
427
|
+
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
|
|
428
|
+
...requestParams,
|
|
429
|
+
headers: {
|
|
430
|
+
...requestParams.headers || {},
|
|
431
|
+
...type && type !== "multipart/form-data" ? {
|
|
432
|
+
"Content-Type": type
|
|
433
|
+
} : {}
|
|
434
|
+
},
|
|
435
|
+
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
|
|
436
|
+
body: body == null ? null : payloadFormatter(body)
|
|
437
|
+
}).then(async (response) => {
|
|
438
|
+
const r = response;
|
|
439
|
+
r.data = null;
|
|
440
|
+
r.error = null;
|
|
441
|
+
const responseToParse = responseFormat ? response.clone() : response;
|
|
442
|
+
const data = responseFormat ? await responseToParse[responseFormat]().then((data) => {
|
|
443
|
+
if (r.ok)
|
|
444
|
+
r.data = data;
|
|
445
|
+
else
|
|
446
|
+
r.error = data;
|
|
447
|
+
return r;
|
|
448
|
+
}).catch((e) => {
|
|
449
|
+
r.error = e;
|
|
450
|
+
return r;
|
|
451
|
+
}) : r;
|
|
452
|
+
if (cancelToken)
|
|
453
|
+
this.abortControllers.delete(cancelToken);
|
|
454
|
+
if (!response.ok)
|
|
455
|
+
throw data;
|
|
456
|
+
return data.data;
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
Object.assign(this, apiConfig);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
class FirstPartyServiceApi2 extends HttpClient {
|
|
464
|
+
constructor(...args) {
|
|
465
|
+
super(...args), this.v2 = {
|
|
466
|
+
automationSolutionsGetMetadata: (params = {}) => this.request({
|
|
467
|
+
path: "/v2/automationsolutions/metadata",
|
|
468
|
+
method: "GET",
|
|
469
|
+
...params
|
|
470
|
+
}),
|
|
471
|
+
automationSolutionsHeadMetadata: (params = {}) => this.request({
|
|
472
|
+
path: "/v2/automationsolutions/metadata",
|
|
473
|
+
method: "HEAD",
|
|
474
|
+
...params
|
|
475
|
+
}),
|
|
476
|
+
automationSolutionsSetState: (data, query, params = {}) => this.request({
|
|
477
|
+
path: "/v2/automationsolutions",
|
|
478
|
+
method: "PATCH",
|
|
479
|
+
query,
|
|
480
|
+
body: data,
|
|
481
|
+
type: "application/json",
|
|
482
|
+
...params
|
|
483
|
+
}),
|
|
484
|
+
automationSolutionsInstall: (data, query, params = {}) => this.request({
|
|
485
|
+
path: "/v2/automationsolutions",
|
|
486
|
+
method: "PUT",
|
|
487
|
+
query,
|
|
488
|
+
body: data,
|
|
489
|
+
format: "json",
|
|
490
|
+
...params
|
|
491
|
+
}),
|
|
492
|
+
automationSolutionsUninstall: (data, query, params = {}) => this.request({
|
|
493
|
+
path: "/v2/automationsolutions",
|
|
494
|
+
method: "DELETE",
|
|
495
|
+
query,
|
|
496
|
+
body: data,
|
|
497
|
+
type: "application/json",
|
|
498
|
+
format: "json",
|
|
499
|
+
...params
|
|
500
|
+
}),
|
|
501
|
+
automationSolutionsExport: (data, params = {}) => this.request({
|
|
502
|
+
path: "/v2/automationsolutions/export",
|
|
503
|
+
method: "POST",
|
|
504
|
+
body: data,
|
|
505
|
+
type: "application/json",
|
|
506
|
+
format: "json",
|
|
507
|
+
...params
|
|
508
|
+
}),
|
|
509
|
+
automationSolutionsGetTranslations: (query, params = {}) => this.request({
|
|
510
|
+
path: "/v2/automationsolutions/translations",
|
|
511
|
+
method: "GET",
|
|
512
|
+
query,
|
|
513
|
+
format: "json",
|
|
514
|
+
...params
|
|
515
|
+
}),
|
|
516
|
+
automationSolutionsValidate: (data, query, params = {}) => this.request({
|
|
517
|
+
path: "/v2/automationsolutions/validate",
|
|
518
|
+
method: "POST",
|
|
519
|
+
query,
|
|
520
|
+
body: data,
|
|
521
|
+
type: "application/json",
|
|
522
|
+
format: "json",
|
|
523
|
+
...params
|
|
524
|
+
}),
|
|
525
|
+
automationSolutionsLookup: (query, params = {}) => this.request({
|
|
526
|
+
path: "/v2/automationsolutions/lookup",
|
|
527
|
+
method: "GET",
|
|
528
|
+
query,
|
|
529
|
+
format: "json",
|
|
530
|
+
...params
|
|
531
|
+
})
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
export { JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, FirstPartyServiceApi2 };
|
|
341
536
|
|
|
342
|
-
//# debugId=
|
|
537
|
+
//# debugId=81CFEEB04DD9F5EC64756E2164756E21
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-0ajs8pnk.js";
|
|
4
4
|
import {
|
|
5
5
|
__require
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-epsr41wx.js";
|
|
7
7
|
|
|
8
8
|
// ../auth/src/catch-error.ts
|
|
9
9
|
function isPromiseLike(value) {
|
|
@@ -366,6 +366,8 @@ var ENV_AUTH_VARS = {
|
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
class EnvAuthConfigError extends Error {
|
|
369
|
+
errorCode = "configuration_error";
|
|
370
|
+
retry = "RetryWillNotFix";
|
|
369
371
|
constructor(message) {
|
|
370
372
|
super(message);
|
|
371
373
|
this.name = "EnvAuthConfigError";
|
|
@@ -404,11 +406,11 @@ var readAuthFromEnv = () => {
|
|
|
404
406
|
if (!rawUrl) {
|
|
405
407
|
throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a JWT (treating it as an opaque token, ` + `e.g. a Personal Access Token). Set ${OPAQUE_TOKEN_BASE_URL_VAR} to the ` + `UiPath base URL if this is a PAT, or fix the token if it was meant to ` + `be a JWT (parse error: ${parseErrorMessage}).`);
|
|
406
408
|
}
|
|
407
|
-
const
|
|
409
|
+
const baseUrl = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
|
|
408
410
|
return {
|
|
409
411
|
loginStatus: "Logged in",
|
|
410
412
|
accessToken,
|
|
411
|
-
baseUrl
|
|
413
|
+
baseUrl,
|
|
412
414
|
organizationName,
|
|
413
415
|
organizationId,
|
|
414
416
|
tenantName,
|
|
@@ -708,9 +710,12 @@ var refreshAccessToken = async ({
|
|
|
708
710
|
body: tokenParams
|
|
709
711
|
});
|
|
710
712
|
const tokenData = await tokenResponse.json();
|
|
711
|
-
if (
|
|
713
|
+
if (tokenResponse.status === 400 || tokenResponse.status === 401) {
|
|
712
714
|
throw new TokenRefreshOAuthError;
|
|
713
715
|
}
|
|
716
|
+
if (!tokenResponse.ok) {
|
|
717
|
+
throw new Error(`Token refresh failed: HTTP ${tokenResponse.status}`);
|
|
718
|
+
}
|
|
714
719
|
const newAccessToken = tokenData.access_token;
|
|
715
720
|
const newRefreshToken = tokenData.refresh_token;
|
|
716
721
|
if (typeof newAccessToken !== "string" || typeof newRefreshToken !== "string") {
|
|
@@ -773,20 +778,20 @@ var probeAsync = async (fs, candidate) => {
|
|
|
773
778
|
var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
|
|
774
779
|
const fs = getFileSystem();
|
|
775
780
|
if (fs.path.isAbsolute(envFilePath)) {
|
|
776
|
-
const
|
|
777
|
-
return
|
|
781
|
+
const probe = await probeAsync(fs, envFilePath);
|
|
782
|
+
return probe.exists ? { exists: true, absolutePath: envFilePath, source: "absolute" } : {
|
|
778
783
|
exists: false,
|
|
779
784
|
absolutePath: envFilePath,
|
|
780
785
|
source: "absolute",
|
|
781
|
-
...
|
|
786
|
+
...probe.unusable ? { unusable: probe.unusable } : {}
|
|
782
787
|
};
|
|
783
788
|
}
|
|
784
789
|
const cwd = opts?.cwd ?? fs.env.cwd();
|
|
785
790
|
let searchDir = cwd;
|
|
786
791
|
while (true) {
|
|
787
792
|
const candidate = fs.path.join(searchDir, envFilePath);
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
793
|
+
const probe = await probeAsync(fs, candidate);
|
|
794
|
+
if (probe.exists) {
|
|
790
795
|
return {
|
|
791
796
|
exists: true,
|
|
792
797
|
absolutePath: candidate,
|
|
@@ -1429,26 +1434,38 @@ function errorMessage(error) {
|
|
|
1429
1434
|
}
|
|
1430
1435
|
|
|
1431
1436
|
// ../auth/src/authContext.ts
|
|
1437
|
+
class AuthContextUnavailableError extends Error {
|
|
1438
|
+
instructionContext;
|
|
1439
|
+
sessionHint;
|
|
1440
|
+
errorCode = "authentication_required";
|
|
1441
|
+
retry = "RetryWillNotFix";
|
|
1442
|
+
constructor(message, instructionContext = "auth", sessionHint) {
|
|
1443
|
+
super(message);
|
|
1444
|
+
this.instructionContext = instructionContext;
|
|
1445
|
+
this.sessionHint = sessionHint;
|
|
1446
|
+
this.name = "AuthContextUnavailableError";
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1432
1449
|
var getAuthContext = async (options = {}) => {
|
|
1433
1450
|
const status = await getLoginStatusAsync({
|
|
1434
1451
|
ensureTokenValidityMinutes: options.ensureTokenValidityMinutes,
|
|
1435
1452
|
envFilePath: options.envFilePath
|
|
1436
1453
|
});
|
|
1437
1454
|
if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
|
|
1438
|
-
throw new
|
|
1455
|
+
throw new AuthContextUnavailableError(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.", "auth", status.hint);
|
|
1439
1456
|
}
|
|
1440
|
-
const tenantName = options.tenant
|
|
1457
|
+
const tenantName = options.tenant || status.tenantName;
|
|
1441
1458
|
if (options.requireOrganizationId && !status.organizationId) {
|
|
1442
|
-
throw new
|
|
1459
|
+
throw new AuthContextUnavailableError("Organization ID not available. Ensure you are logged in with an organization context.", "identity");
|
|
1443
1460
|
}
|
|
1444
1461
|
if (options.requireOrganizationName && !status.organizationName) {
|
|
1445
|
-
throw new
|
|
1462
|
+
throw new AuthContextUnavailableError("Organization name not available. Ensure you are logged in with an organization context.", "identity");
|
|
1446
1463
|
}
|
|
1447
1464
|
if (options.requireTenantId && !status.tenantId) {
|
|
1448
|
-
throw new
|
|
1465
|
+
throw new AuthContextUnavailableError(`Tenant ID not available. Ensure UIPATH_TENANT_ID is set.${status.hint ? ` ${status.hint}` : ""}`, "identity", status.hint);
|
|
1449
1466
|
}
|
|
1450
|
-
if (options.requireTenantName && tenantName
|
|
1451
|
-
throw new
|
|
1467
|
+
if (options.requireTenantName && !tenantName) {
|
|
1468
|
+
throw new AuthContextUnavailableError("Tenant not provided and UIPATH_TENANT_NAME not set. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.", "identity");
|
|
1452
1469
|
}
|
|
1453
1470
|
return {
|
|
1454
1471
|
baseUrl: status.baseUrl,
|
|
@@ -1469,4 +1486,4 @@ var TENANT_SELECTION_CODES = new Set([
|
|
|
1469
1486
|
]);
|
|
1470
1487
|
export { parseJWT, resolveSessionIdentity, getLoginStatusAsync, getAuthContext };
|
|
1471
1488
|
|
|
1472
|
-
//# debugId=
|
|
1489
|
+
//# debugId=727098F7E81F378864756E2164756E21
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthContext
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-qr8dtv3r.js";
|
|
4
4
|
|
|
5
5
|
// ../solution-sdk/src/solution-auth.ts
|
|
6
|
-
async function
|
|
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
|
|
15
|
-
const
|
|
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 {
|
|
25
|
+
export { getSolutionAuthContext2 };
|
|
27
26
|
|
|
28
|
-
//# debugId=
|
|
27
|
+
//# debugId=720557DFC760A35C64756E2164756E21
|