@uipath/flow-tool 1.203.0-preview.205 → 1.204.0-preview.206
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 +4 -0
- package/dist/THIRD-PARTY-NOTICES.md +237 -2
- package/dist/authoring-4kyzh1tf.js +23 -0
- package/dist/{binding-service-ft8mabkr.js → binding-service-815skxfx.js} +28 -30
- package/dist/{connector-service-qnpnwzpv.js → connector-service-xw4f8a7v.js} +34 -31
- package/dist/{conversion-FQTRFHRX-xh98wp2q.js → conversion-FQTRFHRX-1q7rk0te.js} +5 -5
- package/dist/{debug-conversation-trigger-fy19ygsm.js → debug-conversation-trigger-qdgvrekh.js} +14 -16
- package/dist/{debug-http-client-53qk6pc5.js → debug-http-client-s78gbtbn.js} +3 -3
- package/dist/{debug-service-nyk0s6mc.js → debug-service-0ppdzgzv.js} +4 -4
- package/dist/{edge-service-an71q4ry.js → edge-service-ttzfnxkf.js} +13 -14
- package/dist/{embedded-file-reader-0sjt4nkj.js → embedded-file-reader-v8c2yj2a.js} +2 -2
- package/dist/{flow-api-2phdajnk.js → flow-api-b7k5dtpm.js} +8 -8
- package/dist/{flow-debug-service-bnzgj53b.js → flow-debug-service-4we602jx.js} +38 -35
- package/dist/{flow-eval-node-target-2mjben3g.js → flow-eval-node-target-331vzbkw.js} +14 -15
- package/dist/{flow-eval-run-api-1bw5e0k4.js → flow-eval-run-api-yq18x5rb.js} +4 -4
- package/dist/{flow-eval-run-service-qv8j8fd1.js → flow-eval-run-service-36h1bnm8.js} +40 -37
- package/dist/{flow-eval-service-amd02ctw.js → flow-eval-service-ndtk9f9j.js} +19 -20
- package/dist/flow-init-sdk-source-9fy9p8ap.js +58 -0
- package/dist/{flow-init-service-rnygj5f8.js → flow-init-service-kwhbdtpc.js} +19 -18
- package/dist/{flow-io-hddhkve5.js → flow-io-pt392xct.js} +13 -14
- package/dist/{flow-migrate-service-e3hm99gp.js → flow-migrate-service-xvz8pbmp.js} +14 -15
- package/dist/{flow-pack-service-g8jebcts.js → flow-pack-service-wg1kt2bt.js} +72 -39
- package/dist/flow-validate-service-xbhrj47n.js +64 -0
- package/dist/{governance-fetcher-cswx2cw7.js → governance-fetcher-5yy89pfd.js} +6 -5
- package/dist/{headless-mmnrkzve.js → headless-1pdmae01.js} +2 -2
- package/dist/{hitl-service-a4fmjrzh.js → hitl-service-q2d39v5s.js} +13 -14
- package/dist/{index-3ts7y9d3.js → index-2s8rmmw6.js} +5 -3
- package/dist/index-3jpjaq1g.js +26 -0
- package/dist/{index-t5zedby6.js → index-41vyzws2.js} +59 -27
- package/dist/{index-b46bavh7.js → index-5yw15y73.js} +2 -2
- package/dist/{index-212q16sv.js → index-7qw3ttge.js} +416 -87
- package/dist/{index-t8e0ft8r.js → index-c1q6mnw1.js} +3 -3
- package/dist/{index-xa7gm52r.js → index-dqqg54v6.js} +601 -61
- package/dist/index.js +10 -10
- package/dist/init.d.ts +1 -1
- package/dist/init.js +19 -18
- package/dist/{input-reader-tw0j373f.js → input-reader-bv7kt19c.js} +2 -2
- package/dist/{known-types-b64as10y.js → known-types-jhyhnkt6.js} +4 -4
- package/dist/{maestro-automate-entry-pqy9xqm3.js → maestro-automate-entry-qak46eg0.js} +2 -2
- package/dist/node-2whm5wkf.js +4823 -0
- package/dist/{node-service-qnny15cm.js → node-service-js01ft95.js} +31 -30
- package/dist/{node-strategy-gc4sg6a2.js → node-strategy-fdnkvq4a.js} +1 -1
- package/dist/{node-sync-service-f1x1ak6q.js → node-sync-service-pb3m4dp2.js} +9 -9
- package/dist/{packager-tool-et7wj8kr.js → packager-tool-0w4es6rz.js} +2 -2
- package/dist/{packager-tool-dph5p2f5.js → packager-tool-1mnq1c97.js} +1 -1
- package/dist/packager-tool-225z77w9.js +52 -0
- package/dist/{packager-tool-de2txaxx.js → packager-tool-2hzsf1rc.js} +5 -5
- package/dist/{packager-tool-vbser1d9.js → packager-tool-2qr8z5ke.js} +4 -4
- package/dist/{packager-tool-0egkaa38.js → packager-tool-32czz9mq.js} +2 -2
- package/dist/{packager-tool-0v3s8r01.js → packager-tool-3h2ktz6q.js} +2 -2
- package/dist/{packager-tool-h9d8c9rf.js → packager-tool-4zdhy0c3.js} +2 -2
- package/dist/{packager-tool-afd1wwf2.js → packager-tool-53c81nnr.js} +440 -29
- package/dist/{packager-tool-2c688mdj.js → packager-tool-57fak54h.js} +4 -4
- package/dist/{packager-tool-qa2xzxez.js → packager-tool-59s95scr.js} +1 -1
- package/dist/{packager-tool-n8p9cay6.js → packager-tool-6azk3rex.js} +1 -1
- package/dist/{packager-tool-26ydwf12.js → packager-tool-6h69pd2a.js} +23 -8
- package/dist/{packager-tool-mnrbdn6a.js → packager-tool-6scjsgh6.js} +55 -17
- package/dist/{packager-tool-xzf4xc65.js → packager-tool-70cta0be.js} +4 -4
- package/dist/{packager-tool-tw3j5h3z.js → packager-tool-8hj7w7em.js} +5 -5
- package/dist/{packager-tool-795gzq9k.js → packager-tool-8pmgk4f6.js} +1 -1
- package/dist/{packager-tool-321a1806.js → packager-tool-8vmx4j2w.js} +1 -1
- package/dist/{packager-tool-cnftzx4c.js → packager-tool-a6ph7149.js} +40 -11
- package/dist/{packager-tool-s0mzv3sx.js → packager-tool-aw60v0et.js} +1 -1
- package/dist/{packager-tool-e89k4pjj.js → packager-tool-c0rtxezv.js} +1 -1
- package/dist/{packager-tool-1w4f09cq.js → packager-tool-d0ny3x3b.js} +141 -96
- package/dist/{packager-tool-gzpvdcnw.js → packager-tool-da1cmt0q.js} +2 -2
- package/dist/{packager-tool-p8j4zvrq.js → packager-tool-dp8vjby4.js} +4829 -1364
- package/dist/packager-tool-e5hj89zm.js +6 -0
- package/dist/{packager-tool-fwp34rqp.js → packager-tool-ev80vk13.js} +8 -8
- package/dist/{packager-tool-gctpkdzs.js → packager-tool-hhy1gr2k.js} +1 -1
- package/dist/{packager-tool-sf9f6jft.js → packager-tool-hygq2wy6.js} +1 -1
- package/dist/{packager-tool-0v3tzseq.js → packager-tool-jeb6xmgw.js} +2 -2
- package/dist/packager-tool-krzxg3ga.js +804 -0
- package/dist/{packager-tool-1r5dnt9q.js → packager-tool-mv4jav1h.js} +1 -1
- package/dist/{packager-tool-pppzgwfw.js → packager-tool-n4vdjmjx.js} +18079 -18079
- package/dist/{packager-tool-t9c77psy.js → packager-tool-p1tb6d4f.js} +955 -150
- package/dist/{packager-tool-gs28y1eq.js → packager-tool-qhhrq12s.js} +2 -2
- package/dist/{packager-tool-6k8s7pt9.js → packager-tool-r7xy9sew.js} +1090 -545
- package/dist/{packager-tool-b1xs6aty.js → packager-tool-stq8800d.js} +902 -897
- package/dist/{packager-tool-61r38k4d.js → packager-tool-t57d6pzz.js} +320 -200
- package/dist/{packager-tool-a7t9v5ss.js → packager-tool-v9v9ch04.js} +2 -2
- package/dist/{packager-tool-cdn59g60.js → packager-tool-ve5t7317.js} +2 -2
- package/dist/{packager-tool-yxv9mm8s.js → packager-tool-vtaqtf7f.js} +10 -10
- package/dist/{packager-tool-t39edv0g.js → packager-tool-w3dy6vnj.js} +184 -193
- package/dist/{packager-tool-9kx94sj5.js → packager-tool-x5qafkb7.js} +2 -2
- package/dist/{packager-tool-s841bbkr.js → packager-tool-yednpbbw.js} +2 -2
- package/dist/{packager-tool-yxnepq2j.js → packager-tool-ysbskrta.js} +1 -1
- package/dist/packager-tool-zgsvggdr.js +50 -0
- package/dist/packager-tool.js +12 -13
- package/dist/{serialization-BXU6AKAN-rhgmwp06.js → serialization-BXU6AKAN-c2ge8yvb.js} +5 -5
- package/dist/services/flow-init-sdk-source.d.ts +28 -0
- package/dist/services/flow-init-service.d.ts +25 -0
- package/dist/services/inline-activity-service.d.ts +135 -0
- package/dist/services/node-service.d.ts +14 -0
- package/dist/services/node-validators/index.d.ts +2 -0
- package/dist/services/node-validators/inline-activity-validator.d.ts +18 -0
- package/dist/services/node-validators/types.d.ts +6 -0
- package/dist/services/node-validators/unresolved-binding-placeholder-validator.d.ts +2 -0
- package/dist/services/preview-id-rule.d.ts +33 -0
- package/dist/services/ui-only-node-types.d.ts +1 -0
- package/dist/{shared-utils-wv356cvj.js → shared-utils-9vfmrxtx.js} +2 -2
- package/dist/{packager-tool-es0a755k.js → tidy-service-q2wwwans.js} +33 -7
- package/dist/tool.js +10 -10
- package/dist/utils/flow-io.d.ts +3 -16
- package/dist/validation.js +35 -36
- package/dist/{variable-service-bc7920kx.js → variable-service-nm9fdwsw.js} +13 -14
- package/dist/{wait-for-flow-job-v0njb0dk.js → wait-for-flow-job-yzyamptd.js} +8 -8
- package/package.json +2 -2
- package/dist/authoring-tv4dh80p.js +0 -360
- package/dist/flow-validate-service-x9dtdrc7.js +0 -65
- package/dist/node-xdgxafqs.js +0 -15600
- package/dist/packager-tool-2513jrxr.js +0 -898
- package/dist/packager-tool-5kt8tsq4.js +0 -85
- package/dist/packager-tool-w0kr4mbc.js +0 -996
- package/dist/services/tidy-service.d.ts +0 -26
- package/dist/tidy-service-8y2tjmb5.js +0 -39
- /package/dist/{localization-y790z9vm.js → localization-xecwjpe2.js} +0 -0
|
@@ -10,12 +10,11 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
UsersApi,
|
|
12
12
|
createApiClient
|
|
13
|
-
} from "./packager-tool-
|
|
14
|
-
import"./packager-tool-w0kr4mbc.js";
|
|
13
|
+
} from "./packager-tool-dp8vjby4.js";
|
|
15
14
|
import {
|
|
16
15
|
getAuthContext,
|
|
17
16
|
getLoginStatusAsync
|
|
18
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-6h69pd2a.js";
|
|
19
18
|
import"./packager-tool-qa9gftnj.js";
|
|
20
19
|
import"./packager-tool-0gctz400.js";
|
|
21
20
|
import"./packager-tool-yc4kw997.js";
|
|
@@ -23,17 +22,18 @@ import {
|
|
|
23
22
|
findSolutionFileUpward,
|
|
24
23
|
normalizeProjectType,
|
|
25
24
|
toPortableRelativePath
|
|
26
|
-
} from "./packager-tool-
|
|
25
|
+
} from "./packager-tool-8vmx4j2w.js";
|
|
26
|
+
import"./packager-tool-stq8800d.js";
|
|
27
27
|
import"./packager-tool-nkrmjr3a.js";
|
|
28
28
|
import {
|
|
29
29
|
catchError,
|
|
30
30
|
extractErrorMessage,
|
|
31
31
|
isGuid,
|
|
32
32
|
logger
|
|
33
|
-
} from "./packager-tool-
|
|
33
|
+
} from "./packager-tool-r7xy9sew.js";
|
|
34
34
|
import {
|
|
35
35
|
getFileSystem
|
|
36
|
-
} from "./packager-tool-
|
|
36
|
+
} from "./packager-tool-3h2ktz6q.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__require,
|
|
@@ -2401,7 +2401,6 @@ var require_cjs = __commonJS(function(exports) {
|
|
|
2401
2401
|
return dependency_container_1.instance;
|
|
2402
2402
|
} });
|
|
2403
2403
|
});
|
|
2404
|
-
|
|
2405
2404
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/file-storage-provider.js
|
|
2406
2405
|
function isFileNotFoundError(error) {
|
|
2407
2406
|
if (!error || typeof error != "object")
|
|
@@ -2453,7 +2452,6 @@ class InMemoryCacheProvider {
|
|
|
2453
2452
|
this._defaultTtlMs = defaultTtlMs;
|
|
2454
2453
|
}
|
|
2455
2454
|
}
|
|
2456
|
-
|
|
2457
2455
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/ip-range-bypass-secret-provider.js
|
|
2458
2456
|
class NullIpRangeBypassSecretProvider {
|
|
2459
2457
|
async getIpRangeBypassSecretAsync(_cancellationToken) {
|
|
@@ -2474,6 +2472,183 @@ class NullSecretsProvider {
|
|
|
2474
2472
|
}
|
|
2475
2473
|
}
|
|
2476
2474
|
|
|
2475
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/timeout-exception.js
|
|
2476
|
+
class TimeoutException extends Error {
|
|
2477
|
+
constructor(message, timeoutMs) {
|
|
2478
|
+
super(message);
|
|
2479
|
+
this.name = "TimeoutException";
|
|
2480
|
+
this.timeoutMs = timeoutMs;
|
|
2481
|
+
if (Error.captureStackTrace)
|
|
2482
|
+
Error.captureStackTrace(this, TimeoutException);
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/helpers/timeout.js
|
|
2487
|
+
function createTimeoutSignal(timeoutMs, description, linkedSignal) {
|
|
2488
|
+
const controller = new AbortController;
|
|
2489
|
+
let timeoutId;
|
|
2490
|
+
const dispose = () => {
|
|
2491
|
+
if (timeoutId !== undefined) {
|
|
2492
|
+
clearTimeout(timeoutId);
|
|
2493
|
+
timeoutId = undefined;
|
|
2494
|
+
}
|
|
2495
|
+
linkedSignal?.removeEventListener("abort", onLinkedAbort);
|
|
2496
|
+
};
|
|
2497
|
+
const onLinkedAbort = () => {
|
|
2498
|
+
dispose();
|
|
2499
|
+
controller.abort(linkedSignal?.reason);
|
|
2500
|
+
};
|
|
2501
|
+
if (linkedSignal?.aborted) {
|
|
2502
|
+
controller.abort(linkedSignal.reason);
|
|
2503
|
+
return {
|
|
2504
|
+
signal: controller.signal,
|
|
2505
|
+
dispose
|
|
2506
|
+
};
|
|
2507
|
+
}
|
|
2508
|
+
timeoutId = setTimeout(() => {
|
|
2509
|
+
dispose();
|
|
2510
|
+
controller.abort(new TimeoutException(`${description} timed out after ${timeoutMs}ms`, timeoutMs));
|
|
2511
|
+
}, timeoutMs);
|
|
2512
|
+
linkedSignal?.addEventListener("abort", onLinkedAbort, {
|
|
2513
|
+
once: true
|
|
2514
|
+
});
|
|
2515
|
+
return {
|
|
2516
|
+
signal: controller.signal,
|
|
2517
|
+
dispose
|
|
2518
|
+
};
|
|
2519
|
+
}
|
|
2520
|
+
var MAX_TIMEOUT_MS = 2147483647;
|
|
2521
|
+
function isValidTimeoutMs(value) {
|
|
2522
|
+
return typeof value == "number" && Number.isFinite(value) && value > 0 && value <= MAX_TIMEOUT_MS;
|
|
2523
|
+
}
|
|
2524
|
+
function readTimeoutOverrideMs(storageKey) {
|
|
2525
|
+
try {
|
|
2526
|
+
if ("u" < typeof localStorage)
|
|
2527
|
+
return;
|
|
2528
|
+
const raw = localStorage.getItem(storageKey);
|
|
2529
|
+
if (raw === null || raw.trim() === "")
|
|
2530
|
+
return;
|
|
2531
|
+
const parsed = Number(raw);
|
|
2532
|
+
return isValidTimeoutMs(parsed) ? parsed : undefined;
|
|
2533
|
+
} catch {
|
|
2534
|
+
return;
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/operation-cancelled-exception.js
|
|
2539
|
+
class OperationCancelledException extends Error {
|
|
2540
|
+
constructor(message, operationName) {
|
|
2541
|
+
super(message ?? "The operation was cancelled");
|
|
2542
|
+
this.name = "OperationCancelledException";
|
|
2543
|
+
this.operationName = operationName;
|
|
2544
|
+
if (Error.captureStackTrace)
|
|
2545
|
+
Error.captureStackTrace(this, OperationCancelledException);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/timeout-file-storage-provider.js
|
|
2550
|
+
class TimeoutFileStorageProvider2 {
|
|
2551
|
+
fileExistsAsync(path, cancellationToken) {
|
|
2552
|
+
return this.guard(`fileExists(${path})`, cancellationToken, (signal) => this.inner.fileExistsAsync(path, signal));
|
|
2553
|
+
}
|
|
2554
|
+
async openFileAsync(path, cancellationToken) {
|
|
2555
|
+
const stream = await this.guard(`openFile(${path})`, cancellationToken, (signal) => this.inner.openFileAsync(path, signal));
|
|
2556
|
+
return this.bindReadsToTimeout(stream, `read(${path})`, cancellationToken);
|
|
2557
|
+
}
|
|
2558
|
+
bindReadsToTimeout(stream, description, cancellationToken) {
|
|
2559
|
+
const reader = stream.getReader();
|
|
2560
|
+
return new ReadableStream({
|
|
2561
|
+
pull: async (controller) => {
|
|
2562
|
+
let result;
|
|
2563
|
+
try {
|
|
2564
|
+
result = await this.guard(description, cancellationToken, () => reader.read());
|
|
2565
|
+
} catch (error) {
|
|
2566
|
+
reader.cancel(error).catch(() => {});
|
|
2567
|
+
throw error;
|
|
2568
|
+
}
|
|
2569
|
+
if (result.done)
|
|
2570
|
+
controller.close();
|
|
2571
|
+
else
|
|
2572
|
+
controller.enqueue(result.value);
|
|
2573
|
+
},
|
|
2574
|
+
cancel: (reason) => reader.cancel(reason)
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
readFileToEndAsync(path, cancellationToken) {
|
|
2578
|
+
return this.guard(`readFileToEnd(${path})`, cancellationToken, (signal) => this.inner.readFileToEndAsync(path, signal));
|
|
2579
|
+
}
|
|
2580
|
+
writeFileAsync(path, content, cancellationToken) {
|
|
2581
|
+
return this.guard(`writeFile(${path})`, cancellationToken, (signal) => this.inner.writeFileAsync(path, content, signal));
|
|
2582
|
+
}
|
|
2583
|
+
deleteFileAsync(path, cancellationToken) {
|
|
2584
|
+
return this.guard(`deleteFile(${path})`, cancellationToken, (signal) => this.inner.deleteFileAsync(path, signal));
|
|
2585
|
+
}
|
|
2586
|
+
getFilesAsync(path, searchPattern, cancellationToken) {
|
|
2587
|
+
return this.guard(`getFiles(${path ?? ""}, ${searchPattern ?? ""})`, cancellationToken, (signal) => this.inner.getFilesAsync(path, searchPattern, signal));
|
|
2588
|
+
}
|
|
2589
|
+
async guard(description, cancellationToken, operation) {
|
|
2590
|
+
const timeout = createTimeoutSignal(this.timeoutMs, `File storage operation ${description}`, cancellationToken);
|
|
2591
|
+
try {
|
|
2592
|
+
return await Promise.race([
|
|
2593
|
+
operation(timeout.signal),
|
|
2594
|
+
rejectOnAbort(timeout.signal)
|
|
2595
|
+
]);
|
|
2596
|
+
} catch (error) {
|
|
2597
|
+
if (cancellationToken?.aborted)
|
|
2598
|
+
throw cancellationToken.reason instanceof OperationCancelledException ? cancellationToken.reason : new OperationCancelledException(undefined, description);
|
|
2599
|
+
if (timeout.signal.aborted && timeout.signal.reason instanceof TimeoutException)
|
|
2600
|
+
throw timeout.signal.reason;
|
|
2601
|
+
throw error;
|
|
2602
|
+
} finally {
|
|
2603
|
+
timeout.dispose();
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
constructor(inner, timeoutMs) {
|
|
2607
|
+
this.inner = inner;
|
|
2608
|
+
this.timeoutMs = timeoutMs;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
function rejectOnAbort(signal) {
|
|
2612
|
+
return new Promise((_, reject) => {
|
|
2613
|
+
if (signal.aborted)
|
|
2614
|
+
return void reject(signal.reason);
|
|
2615
|
+
signal.addEventListener("abort", () => reject(signal.reason), {
|
|
2616
|
+
once: true
|
|
2617
|
+
});
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2620
|
+
function withFileOperationTimeout2(provider, timeoutMs) {
|
|
2621
|
+
if (!isValidTimeoutMs(timeoutMs) || provider instanceof TimeoutFileStorageProvider2)
|
|
2622
|
+
return provider;
|
|
2623
|
+
return new TimeoutFileStorageProvider2(provider, timeoutMs);
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/solution-context-options.js
|
|
2627
|
+
var DEFAULT_SOLUTION_CONTEXT_OPTIONS = {
|
|
2628
|
+
lockTimeoutMs: 30000,
|
|
2629
|
+
fileOperationTimeoutMs: 30000
|
|
2630
|
+
};
|
|
2631
|
+
var SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY = "SOL_RB_SOLUTION_CONTEXT_TIMEOUT_MS";
|
|
2632
|
+
var FILE_OPERATION_TIMEOUT_STORAGE_KEY = "SOL_RB_FILE_OPERATION_TIMEOUT_MS";
|
|
2633
|
+
function resolveTimeoutMs(storageKey, configured, fallback) {
|
|
2634
|
+
const override = readTimeoutOverrideMs(storageKey);
|
|
2635
|
+
if (override !== undefined)
|
|
2636
|
+
return override;
|
|
2637
|
+
return isValidTimeoutMs(configured) ? configured : fallback;
|
|
2638
|
+
}
|
|
2639
|
+
function resolveLockTimeoutMs(options) {
|
|
2640
|
+
return resolveTimeoutMs(SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY, options?.lockTimeoutMs, DEFAULT_SOLUTION_CONTEXT_OPTIONS.lockTimeoutMs);
|
|
2641
|
+
}
|
|
2642
|
+
function resolveFileOperationTimeoutMs(options) {
|
|
2643
|
+
return resolveTimeoutMs(FILE_OPERATION_TIMEOUT_STORAGE_KEY, options?.fileOperationTimeoutMs, DEFAULT_SOLUTION_CONTEXT_OPTIONS.fileOperationTimeoutMs);
|
|
2644
|
+
}
|
|
2645
|
+
function mergeSolutionContextOptions(options) {
|
|
2646
|
+
return {
|
|
2647
|
+
lockTimeoutMs: isValidTimeoutMs(options?.lockTimeoutMs) ? options.lockTimeoutMs : DEFAULT_SOLUTION_CONTEXT_OPTIONS.lockTimeoutMs,
|
|
2648
|
+
fileOperationTimeoutMs: isValidTimeoutMs(options?.fileOperationTimeoutMs) ? options.fileOperationTimeoutMs : DEFAULT_SOLUTION_CONTEXT_OPTIONS.fileOperationTimeoutMs
|
|
2649
|
+
};
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2477
2652
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/models.js
|
|
2478
2653
|
var SolutionConstants = {
|
|
2479
2654
|
RESOURCE_FILES_FOLDER_NAME: "resources",
|
|
@@ -2608,17 +2783,6 @@ class DisconnectedException extends Error {
|
|
|
2608
2783
|
}
|
|
2609
2784
|
}
|
|
2610
2785
|
|
|
2611
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/operation-cancelled-exception.js
|
|
2612
|
-
class OperationCancelledException extends Error {
|
|
2613
|
-
constructor(message, operationName) {
|
|
2614
|
-
super(message ?? "The operation was cancelled");
|
|
2615
|
-
this.name = "OperationCancelledException";
|
|
2616
|
-
this.operationName = operationName;
|
|
2617
|
-
if (Error.captureStackTrace)
|
|
2618
|
-
Error.captureStackTrace(this, OperationCancelledException);
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
2786
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/invalid-operation-exception.js
|
|
2623
2787
|
class InvalidOperationException extends Error {
|
|
2624
2788
|
constructor(message) {
|
|
@@ -3283,10 +3447,14 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3283
3447
|
this._jsonSerializer = this.jsonSerializerFactory.getByName(JsonSerializerNames.CamelCaseIndented);
|
|
3284
3448
|
return this._jsonSerializer;
|
|
3285
3449
|
}
|
|
3450
|
+
async getFileStorageProviderAsync(context, cancellationToken) {
|
|
3451
|
+
const provider = await this.fileStorageProviderFactory.getProviderAsync(context, cancellationToken);
|
|
3452
|
+
return withFileOperationTimeout2(provider, resolveFileOperationTimeoutMs(this.options));
|
|
3453
|
+
}
|
|
3286
3454
|
async readAsync(context, cancellationToken) {
|
|
3287
3455
|
this.logger.info("Reading multi-file solution definition for solution %s", context.path);
|
|
3288
3456
|
const solutionKey = this.getSolutionKey(context);
|
|
3289
|
-
const fileStorageProvider = await this.
|
|
3457
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3290
3458
|
const resources = [];
|
|
3291
3459
|
const solutionFiles = [];
|
|
3292
3460
|
let hashes;
|
|
@@ -3362,6 +3530,12 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3362
3530
|
invalidFiles.push(resourceFile);
|
|
3363
3531
|
}
|
|
3364
3532
|
} catch (ex) {
|
|
3533
|
+
if (ex instanceof OperationCancelledException || cancellationToken?.aborted) {
|
|
3534
|
+
this.logger.warn("Operation cancelled while reading file %s for solution %s", resourceFile, context.path);
|
|
3535
|
+
throw ex instanceof OperationCancelledException ? ex : new OperationCancelledException;
|
|
3536
|
+
}
|
|
3537
|
+
if (ex instanceof TimeoutException)
|
|
3538
|
+
throw new TimeoutException(`Reading resource file ${resourceFile} for solution ${context.path} timed out: ${ex.message}`, ex.timeoutMs);
|
|
3365
3539
|
if (isFileNotFoundError(ex)) {
|
|
3366
3540
|
this.logger.warn("Resource file listed but missing in storage for solution %s: %s", resourceFile, context.path);
|
|
3367
3541
|
missingFiles.push(resourceFile);
|
|
@@ -3414,7 +3588,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3414
3588
|
async writeAsync(context, solution, cancellationToken) {
|
|
3415
3589
|
if (context.isReadOnly)
|
|
3416
3590
|
return;
|
|
3417
|
-
const fileStorageProvider = await this.
|
|
3591
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3418
3592
|
const existingHashes = this.getHashes(context);
|
|
3419
3593
|
const existingPaths = this.getPaths(context);
|
|
3420
3594
|
const existingTree = this.getTree(context);
|
|
@@ -3489,7 +3663,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3489
3663
|
async deleteFilesAsync(context, filesToDelete, cancellationToken) {
|
|
3490
3664
|
if (!filesToDelete || filesToDelete.length === 0 || context.isReadOnly)
|
|
3491
3665
|
return;
|
|
3492
|
-
const fileStorageProvider = await this.
|
|
3666
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3493
3667
|
for (const file of filesToDelete)
|
|
3494
3668
|
try {
|
|
3495
3669
|
const outputPath = this.joinPath("resourceFiles", file.name);
|
|
@@ -3686,7 +3860,8 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3686
3860
|
const hex = Math.abs(hash).toString(16).padStart(8, "0");
|
|
3687
3861
|
return `${hex.slice(0, 8)}-${hex.slice(0, 4)}-4${hex.slice(1, 4)}-8${hex.slice(1, 4)}-${hex.slice(0, 12).padEnd(12, "0")}`;
|
|
3688
3862
|
}
|
|
3689
|
-
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory) {
|
|
3863
|
+
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory, options) {
|
|
3864
|
+
this.options = options;
|
|
3690
3865
|
this._caseInsensitiveSerializer = null;
|
|
3691
3866
|
this._jsonSerializer = null;
|
|
3692
3867
|
this.fileStorageProviderFactory = fileStorageProviderFactory;
|
|
@@ -3699,12 +3874,13 @@ MultiFileSolutionDefinitionProvider.INVALID_FILE_NAME_CHARS = /[<>:"/\\|?*\x00-\
|
|
|
3699
3874
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/multi-file-solution-definition-factory.js
|
|
3700
3875
|
class MultiFileSolutionDefinitionFactory {
|
|
3701
3876
|
async getProviderAsync(cancellationToken) {
|
|
3702
|
-
return new MultiFileSolutionDefinitionProvider(this.fileStorageProviderFactory, this.jsonSerializerFactory, this.loggerFactory);
|
|
3877
|
+
return new MultiFileSolutionDefinitionProvider(this.fileStorageProviderFactory, this.jsonSerializerFactory, this.loggerFactory, this.options);
|
|
3703
3878
|
}
|
|
3704
|
-
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory) {
|
|
3879
|
+
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory, options) {
|
|
3705
3880
|
this.fileStorageProviderFactory = fileStorageProviderFactory;
|
|
3706
3881
|
this.jsonSerializerFactory = jsonSerializerFactory;
|
|
3707
3882
|
this.loggerFactory = loggerFactory;
|
|
3883
|
+
this.options = options;
|
|
3708
3884
|
this.logger = loggerFactory.create("MultiFileSolutionDefinitionFactory");
|
|
3709
3885
|
}
|
|
3710
3886
|
}
|
|
@@ -3712,7 +3888,7 @@ class MultiFileSolutionDefinitionFactory {
|
|
|
3712
3888
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/embedded-files-default.js
|
|
3713
3889
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
3714
3890
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory: JsonSerializerFactory2 }] = await Promise.all([
|
|
3715
|
-
import("./embedded-file-reader-
|
|
3891
|
+
import("./embedded-file-reader-v8c2yj2a.js"),
|
|
3716
3892
|
import("./index-kmp9fmhb.js")
|
|
3717
3893
|
]);
|
|
3718
3894
|
return new EmbeddedFileReader(new JsonSerializerFactory2);
|
|
@@ -3745,7 +3921,8 @@ var ServiceTokens = {
|
|
|
3745
3921
|
JsonSerializerFactory: "IJsonSerializerFactory",
|
|
3746
3922
|
SerializerProxy: "ISerializerProxy",
|
|
3747
3923
|
StreamSerializer: "IStreamSerializer",
|
|
3748
|
-
HttpReaderOptions: "HttpReaderOptions"
|
|
3924
|
+
HttpReaderOptions: "HttpReaderOptions",
|
|
3925
|
+
SolutionContextOptions: "SolutionContextOptions"
|
|
3749
3926
|
};
|
|
3750
3927
|
var Tokens = {
|
|
3751
3928
|
IMediator: "IMediator",
|
|
@@ -4311,7 +4488,8 @@ class BindingOverwritesHandler {
|
|
|
4311
4488
|
[BindingsKnownKeys.FolderKeyPropertyName]: resourceOverwrite.folderKey ?? ""
|
|
4312
4489
|
};
|
|
4313
4490
|
else {
|
|
4314
|
-
const
|
|
4491
|
+
const isBusinessRule = bindingResource.binding.resourceType === models_BindingsResourceType.BusinessRule;
|
|
4492
|
+
const folderPath = bindingResource.isArtefactResource && !isBusinessRule ? "" : resourceOverwrite.folderFullyQualifiedName ?? "";
|
|
4315
4493
|
overwrite = {
|
|
4316
4494
|
[BindingsKnownKeys.FolderPathPropertyName]: folderPath,
|
|
4317
4495
|
[BindingsKnownKeys.NamePropertyName]: resourceOverwrite.resourceName
|
|
@@ -4469,42 +4647,6 @@ class AsyncSemaphore {
|
|
|
4469
4647
|
this._permits = permits;
|
|
4470
4648
|
}
|
|
4471
4649
|
}
|
|
4472
|
-
function createTimeoutSignal(timeoutMs, linkedSignal) {
|
|
4473
|
-
const controller = new AbortController;
|
|
4474
|
-
const timeoutId = setTimeout(() => {
|
|
4475
|
-
controller.abort(new Error(`Operation timed out after ${timeoutMs}ms`));
|
|
4476
|
-
}, timeoutMs);
|
|
4477
|
-
if (linkedSignal)
|
|
4478
|
-
if (linkedSignal.aborted) {
|
|
4479
|
-
clearTimeout(timeoutId);
|
|
4480
|
-
controller.abort(linkedSignal.reason);
|
|
4481
|
-
} else
|
|
4482
|
-
linkedSignal.addEventListener("abort", () => {
|
|
4483
|
-
clearTimeout(timeoutId);
|
|
4484
|
-
controller.abort(linkedSignal.reason);
|
|
4485
|
-
}, {
|
|
4486
|
-
signal: controller.signal
|
|
4487
|
-
});
|
|
4488
|
-
controller.signal.addEventListener("abort", () => {
|
|
4489
|
-
clearTimeout(timeoutId);
|
|
4490
|
-
});
|
|
4491
|
-
return controller.signal;
|
|
4492
|
-
}
|
|
4493
|
-
var DEFAULT_TIMEOUT_MS = 5000;
|
|
4494
|
-
var SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY = "SOL_RB_SOLUTION_CONTEXT_TIMEOUT_MS";
|
|
4495
|
-
function getLockTimeoutMs() {
|
|
4496
|
-
try {
|
|
4497
|
-
if ("u" < typeof localStorage)
|
|
4498
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4499
|
-
const raw = localStorage.getItem(SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY);
|
|
4500
|
-
if (raw === null || raw.trim() === "")
|
|
4501
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4502
|
-
const parsed = Number(raw);
|
|
4503
|
-
return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_TIMEOUT_MS;
|
|
4504
|
-
} catch {
|
|
4505
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4506
|
-
}
|
|
4507
|
-
}
|
|
4508
4650
|
|
|
4509
4651
|
class SolutionContext {
|
|
4510
4652
|
get isLoaded() {
|
|
@@ -4632,30 +4774,42 @@ class SolutionContext {
|
|
|
4632
4774
|
throw new FileDependencyNotFoundException(missingFileDependencies);
|
|
4633
4775
|
}
|
|
4634
4776
|
async doWithLockAsync(doWork, cancellationToken) {
|
|
4635
|
-
const
|
|
4636
|
-
|
|
4777
|
+
const lockTimeoutMs = resolveLockTimeoutMs(this._options);
|
|
4778
|
+
const lockTimeout = createTimeoutSignal(lockTimeoutMs, `Waiting for the lock on solution ${this.path}`, cancellationToken);
|
|
4637
4779
|
try {
|
|
4638
|
-
|
|
4780
|
+
await this._semaphore.acquire(lockTimeout.signal);
|
|
4781
|
+
} catch (error) {
|
|
4782
|
+
if (!cancellationToken?.aborted && lockTimeout.signal.reason instanceof TimeoutException)
|
|
4783
|
+
throw lockTimeout.signal.reason;
|
|
4784
|
+
throw error;
|
|
4785
|
+
} finally {
|
|
4786
|
+
lockTimeout.dispose();
|
|
4787
|
+
}
|
|
4788
|
+
try {
|
|
4789
|
+
return await doWork(cancellationToken);
|
|
4639
4790
|
} finally {
|
|
4640
4791
|
this._semaphore.release();
|
|
4641
4792
|
}
|
|
4642
4793
|
}
|
|
4643
|
-
constructor(path, isReadOnlyOrProvider,
|
|
4794
|
+
constructor(path, isReadOnlyOrProvider, definitionProviderOrOptions, options) {
|
|
4644
4795
|
this._definition = null;
|
|
4645
4796
|
this._semaphore = new AsyncSemaphore(1);
|
|
4646
4797
|
this._items = {};
|
|
4647
4798
|
this._persistChanges = true;
|
|
4648
4799
|
ArgumentException.throwIfNullOrEmpty(path, "path");
|
|
4649
4800
|
if (typeof isReadOnlyOrProvider == "boolean") {
|
|
4801
|
+
const definitionProvider = definitionProviderOrOptions;
|
|
4650
4802
|
ArgumentException.throwIfNull(definitionProvider, "definitionProvider");
|
|
4651
4803
|
this.path = path;
|
|
4652
4804
|
this.isReadOnly = isReadOnlyOrProvider;
|
|
4653
4805
|
this._definitionProvider = definitionProvider;
|
|
4806
|
+
this._options = options;
|
|
4654
4807
|
} else {
|
|
4655
4808
|
ArgumentException.throwIfNull(isReadOnlyOrProvider, "definitionProvider");
|
|
4656
4809
|
this.path = path;
|
|
4657
4810
|
this.isReadOnly = false;
|
|
4658
4811
|
this._definitionProvider = isReadOnlyOrProvider;
|
|
4812
|
+
this._options = definitionProviderOrOptions;
|
|
4659
4813
|
}
|
|
4660
4814
|
}
|
|
4661
4815
|
}
|
|
@@ -4666,7 +4820,8 @@ class SolutionContextFactory {
|
|
|
4666
4820
|
ArgumentException.throwIfNullOrEmpty(path, "path");
|
|
4667
4821
|
const solutionDefinitionFactory = this._container.resolve(Tokens.ISolutionDefinitionFactory);
|
|
4668
4822
|
const solutionDefinitionProvider = await solutionDefinitionFactory.getProviderAsync(cancellationToken);
|
|
4669
|
-
|
|
4823
|
+
const options = this._container.isRegistered(ServiceTokens.SolutionContextOptions, true) ? this._container.resolve(ServiceTokens.SolutionContextOptions) : undefined;
|
|
4824
|
+
return new SolutionContext(path, isReadOnly, solutionDefinitionProvider, options);
|
|
4670
4825
|
}
|
|
4671
4826
|
constructor(_container) {
|
|
4672
4827
|
this._container = _container;
|
|
@@ -5688,7 +5843,13 @@ var solutionsSubtypesMap = {
|
|
|
5688
5843
|
Api: "api",
|
|
5689
5844
|
Function: "function",
|
|
5690
5845
|
McpServer: "mcpserver",
|
|
5691
|
-
BusinessRule: "businessRule"
|
|
5846
|
+
BusinessRule: "businessRule",
|
|
5847
|
+
Native: "native",
|
|
5848
|
+
Federated: "federated",
|
|
5849
|
+
Case: "case",
|
|
5850
|
+
CaseMain: "caseMain",
|
|
5851
|
+
CaseComment: "caseComment",
|
|
5852
|
+
CaseDocument: "caseDocument"
|
|
5692
5853
|
};
|
|
5693
5854
|
function mapResourceToSolutionSubtype(entitySubtype) {
|
|
5694
5855
|
if (!entitySubtype)
|
|
@@ -14119,9 +14280,9 @@ class UnconfiguredEmbeddedFileReader {
|
|
|
14119
14280
|
}
|
|
14120
14281
|
|
|
14121
14282
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/container.js
|
|
14122
|
-
function createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, embeddedFileReader) {
|
|
14283
|
+
function createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, embeddedFileReader, solutionContextOptions) {
|
|
14123
14284
|
const childContainer = import_tsyringe6.container.createChildContainer();
|
|
14124
|
-
registerProviders(childContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory);
|
|
14285
|
+
registerProviders(childContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, solutionContextOptions);
|
|
14125
14286
|
registerServices(childContainer, embeddedFileReader);
|
|
14126
14287
|
registerHandlers(childContainer);
|
|
14127
14288
|
childContainer.register(ServiceTokens.Mediator, {
|
|
@@ -14145,7 +14306,7 @@ function registerProvider(diContainer, token, provider) {
|
|
|
14145
14306
|
break;
|
|
14146
14307
|
}
|
|
14147
14308
|
}
|
|
14148
|
-
function registerProviders(diContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory) {
|
|
14309
|
+
function registerProviders(diContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, solutionContextOptions) {
|
|
14149
14310
|
registerProvider(diContainer, ServiceTokens.AccessProvider, accessProvider);
|
|
14150
14311
|
registerProvider(diContainer, ServiceTokens.CacheProvider, cacheProvider);
|
|
14151
14312
|
registerProvider(diContainer, ServiceTokens.SecretsProvider, secretsProvider);
|
|
@@ -14160,6 +14321,7 @@ function registerProviders(diContainer, accessProvider, cacheProvider, secretsPr
|
|
|
14160
14321
|
...httpReaderOptions
|
|
14161
14322
|
};
|
|
14162
14323
|
diContainer.registerInstance(ServiceTokens.HttpReaderOptions, mergedOptions);
|
|
14324
|
+
diContainer.registerInstance(ServiceTokens.SolutionContextOptions, mergeSolutionContextOptions(solutionContextOptions));
|
|
14163
14325
|
}
|
|
14164
14326
|
function registerServices(diContainer, embeddedFileReader) {
|
|
14165
14327
|
diContainer.register(ServiceTokens.AutomationSolutionsClientProxy, {
|
|
@@ -14894,6 +15056,10 @@ class ResourceBuilderConfiguration {
|
|
|
14894
15056
|
this._httpReaderOptions = options;
|
|
14895
15057
|
return this;
|
|
14896
15058
|
}
|
|
15059
|
+
addSolutionContextOptions(options) {
|
|
15060
|
+
this._solutionContextOptions = options;
|
|
15061
|
+
return this;
|
|
15062
|
+
}
|
|
14897
15063
|
addLoggerFactory(factoryProvider, lifetime = service_tokens_ServiceLifetime.Singleton) {
|
|
14898
15064
|
this._loggerFactoryProvider = factoryProvider;
|
|
14899
15065
|
this._loggerFactoryLifetime = lifetime;
|
|
@@ -14958,7 +15124,7 @@ class ResourceBuilderConfiguration {
|
|
|
14958
15124
|
};
|
|
14959
15125
|
} else if (!solutionDefinitionProvider && fileStorageProviderFactory)
|
|
14960
15126
|
solutionDefinitionFactory = {
|
|
14961
|
-
instance: new MultiFileSolutionDefinitionFactory(fileStorageProviderFactory.instance, new JsonSerializerFactory, loggerFactoryInstance),
|
|
15127
|
+
instance: new MultiFileSolutionDefinitionFactory(fileStorageProviderFactory.instance, new JsonSerializerFactory, loggerFactoryInstance, this._solutionContextOptions),
|
|
14962
15128
|
lifetime: service_tokens_ServiceLifetime.Scoped
|
|
14963
15129
|
};
|
|
14964
15130
|
const artifactResourceSpecEnhancerInstance = this._artifactResourceSpecEnhancerProvider ? await this.resolveGenericProvider(this._artifactResourceSpecEnhancerProvider) : new DefaultArtifactResourceSpecEnhancer;
|
|
@@ -14967,7 +15133,7 @@ class ResourceBuilderConfiguration {
|
|
|
14967
15133
|
lifetime: this._artifactResourceSpecEnhancerLifetime
|
|
14968
15134
|
};
|
|
14969
15135
|
const embeddedFileReader = await createDefaultEmbeddedFileReaderAsync();
|
|
14970
|
-
const container3 = createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, this._httpReaderOptions, loggerFactory, embeddedFileReader);
|
|
15136
|
+
const container3 = createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, this._httpReaderOptions, loggerFactory, embeddedFileReader, this._solutionContextOptions);
|
|
14971
15137
|
return new ResourceBuilderServices(container3);
|
|
14972
15138
|
}
|
|
14973
15139
|
async buildServices() {
|
|
@@ -14988,7 +15154,6 @@ class ResourceBuilderConfiguration {
|
|
|
14988
15154
|
function createResourceBuilderConfiguration() {
|
|
14989
15155
|
return new ResourceBuilderConfiguration;
|
|
14990
15156
|
}
|
|
14991
|
-
|
|
14992
15157
|
// ../solution-sdk/src/resources/services/solution-manifest.ts
|
|
14993
15158
|
async function assertSolutionManifest(dir) {
|
|
14994
15159
|
const fs = getFileSystem();
|
|
@@ -15657,6 +15822,81 @@ function hasAnyTemplateRow(projectType) {
|
|
|
15657
15822
|
return key === wanted || key.startsWith(`${wanted}_`);
|
|
15658
15823
|
});
|
|
15659
15824
|
}
|
|
15825
|
+
// ../solution-sdk/src/resources/services/remote-resources.ts
|
|
15826
|
+
function getRemoteResourceClients(services) {
|
|
15827
|
+
return {
|
|
15828
|
+
catalog: services.container.resolve(Tokens.IResourceCatalogClientProxy),
|
|
15829
|
+
importer: services.container.resolve(Tokens.IImportResourceHelper)
|
|
15830
|
+
};
|
|
15831
|
+
}
|
|
15832
|
+
async function findCatalogEntityAsync(catalog, query, match) {
|
|
15833
|
+
let pageCursor;
|
|
15834
|
+
do {
|
|
15835
|
+
const page = await catalog.searchFolderEntities({
|
|
15836
|
+
...query,
|
|
15837
|
+
pageSize: 100,
|
|
15838
|
+
pageCursor
|
|
15839
|
+
});
|
|
15840
|
+
const found = (page.items ?? []).find(match);
|
|
15841
|
+
if (found) {
|
|
15842
|
+
return found;
|
|
15843
|
+
}
|
|
15844
|
+
pageCursor = page.nextPage ?? undefined;
|
|
15845
|
+
} while (pageCursor);
|
|
15846
|
+
return;
|
|
15847
|
+
}
|
|
15848
|
+
function toResourceReference(entity) {
|
|
15849
|
+
return toCatalogReference({
|
|
15850
|
+
kind: entity.entityType ?? "",
|
|
15851
|
+
type: entity.entitySubType ?? undefined,
|
|
15852
|
+
key: entity.entityKey ?? "",
|
|
15853
|
+
name: entity.entityName ?? undefined,
|
|
15854
|
+
folderPath: entity.fullyQualifiedName ?? undefined,
|
|
15855
|
+
folderKey: entity.folderKey ?? undefined
|
|
15856
|
+
});
|
|
15857
|
+
}
|
|
15858
|
+
function toCatalogReference(reference) {
|
|
15859
|
+
const { folderPath, folderKey, ...rest } = reference;
|
|
15860
|
+
return {
|
|
15861
|
+
...rest,
|
|
15862
|
+
folder: folderPath ? { fullyQualifiedName: folderPath, folderKey } : undefined
|
|
15863
|
+
};
|
|
15864
|
+
}
|
|
15865
|
+
async function exportResourceDefinitionAsync(importer, reference) {
|
|
15866
|
+
const payload = await importer.exportResourceAsync(reference);
|
|
15867
|
+
return payload.resourceDefinitions.find((d) => d.key === reference.key);
|
|
15868
|
+
}
|
|
15869
|
+
function readSpecProperty(spec, name) {
|
|
15870
|
+
if (!spec) {
|
|
15871
|
+
return;
|
|
15872
|
+
}
|
|
15873
|
+
if (spec[name] !== undefined) {
|
|
15874
|
+
return spec[name];
|
|
15875
|
+
}
|
|
15876
|
+
const lower = name.toLowerCase();
|
|
15877
|
+
const key = Object.keys(spec).find((k) => k.toLowerCase() === lower);
|
|
15878
|
+
return key === undefined ? undefined : spec[key];
|
|
15879
|
+
}
|
|
15880
|
+
function readSpecEntryPoints(spec) {
|
|
15881
|
+
const entryPoints = parseJsonString(readSpecProperty(spec, "entryPoints"));
|
|
15882
|
+
if (!Array.isArray(entryPoints) || !entryPoints.every((entry) => entry !== null && typeof entry === "object")) {
|
|
15883
|
+
return;
|
|
15884
|
+
}
|
|
15885
|
+
return entryPoints.map((entry) => ({
|
|
15886
|
+
UniqueId: String(readSpecProperty(entry, "uniqueId") ?? ""),
|
|
15887
|
+
Path: String(readSpecProperty(entry, "path") ?? ""),
|
|
15888
|
+
DisplayName: String(readSpecProperty(entry, "displayName") ?? ""),
|
|
15889
|
+
InputArguments: readSpecProperty(entry, "inputArguments"),
|
|
15890
|
+
OutputArguments: readSpecProperty(entry, "outputArguments")
|
|
15891
|
+
}));
|
|
15892
|
+
}
|
|
15893
|
+
function parseJsonString(raw) {
|
|
15894
|
+
if (typeof raw !== "string") {
|
|
15895
|
+
return raw;
|
|
15896
|
+
}
|
|
15897
|
+
const [error, parsed] = catchError(() => JSON.parse(raw));
|
|
15898
|
+
return error ? undefined : parsed;
|
|
15899
|
+
}
|
|
15660
15900
|
// ../solution-sdk/src/resources/services/resource-casing.ts
|
|
15661
15901
|
var RESOURCE_FILES_FOLDER_NAME = "resources";
|
|
15662
15902
|
function lowerFirstChar(value) {
|
|
@@ -15814,6 +16054,47 @@ function parseResourceHeader(content) {
|
|
|
15814
16054
|
return null;
|
|
15815
16055
|
}
|
|
15816
16056
|
}
|
|
16057
|
+
// ../solution-sdk/src/resources/services/resource-name.ts
|
|
16058
|
+
var MAX_RESOURCE_NAME_LENGTH = 256;
|
|
16059
|
+
var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
|
|
16060
|
+
function hasControlChar(value) {
|
|
16061
|
+
for (let i = 0;i < value.length; i++) {
|
|
16062
|
+
if (value.charCodeAt(i) < 32)
|
|
16063
|
+
return true;
|
|
16064
|
+
}
|
|
16065
|
+
return false;
|
|
16066
|
+
}
|
|
16067
|
+
function validateResourceName(name, options = {}) {
|
|
16068
|
+
const optionName = options.optionName ?? "--name";
|
|
16069
|
+
if (name.trim() === "") {
|
|
16070
|
+
return {
|
|
16071
|
+
ok: false,
|
|
16072
|
+
message: `${optionName} must not be blank`,
|
|
16073
|
+
instructions: "Pass a non-empty resource name."
|
|
16074
|
+
};
|
|
16075
|
+
}
|
|
16076
|
+
if (name.length > MAX_RESOURCE_NAME_LENGTH) {
|
|
16077
|
+
return {
|
|
16078
|
+
ok: false,
|
|
16079
|
+
message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH}-character limit (got ${name.length})`,
|
|
16080
|
+
instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
|
|
16081
|
+
};
|
|
16082
|
+
}
|
|
16083
|
+
if (UNSAFE_NAME_CHARS.test(name) || hasControlChar(name)) {
|
|
16084
|
+
return {
|
|
16085
|
+
ok: false,
|
|
16086
|
+
message: `${optionName} contains unsafe characters`,
|
|
16087
|
+
instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
|
|
16088
|
+
};
|
|
16089
|
+
}
|
|
16090
|
+
return { ok: true };
|
|
16091
|
+
}
|
|
16092
|
+
function assertValidResourceName(name, options = {}) {
|
|
16093
|
+
const result = validateResourceName(name, options);
|
|
16094
|
+
if (!result.ok) {
|
|
16095
|
+
throw new Error(`${result.message}. ${result.instructions}`);
|
|
16096
|
+
}
|
|
16097
|
+
}
|
|
15817
16098
|
// ../solution-sdk/src/solution-auth.ts
|
|
15818
16099
|
async function getSolutionAuthContext(options) {
|
|
15819
16100
|
const ctx = await getAuthContext({
|
|
@@ -15830,11 +16111,15 @@ async function getSolutionAuthContext(options) {
|
|
|
15830
16111
|
accessToken: ctx.accessToken,
|
|
15831
16112
|
basePath,
|
|
15832
16113
|
organizationId,
|
|
15833
|
-
tenantName
|
|
16114
|
+
tenantName,
|
|
16115
|
+
identity: ctx.identity
|
|
15834
16116
|
};
|
|
15835
16117
|
}
|
|
15836
|
-
|
|
15837
16118
|
// ../solution-sdk/src/resources/services/sync-resources-from-bindings.ts
|
|
16119
|
+
var TYPE_IS_IDENTITY_REPLACE_OPTIONS = new Set([
|
|
16120
|
+
"SameType",
|
|
16121
|
+
"SameNameAndType"
|
|
16122
|
+
]);
|
|
15838
16123
|
var BINDINGS_JSON_FALLBACK_TYPES = new Set(["agent", "function"]);
|
|
15839
16124
|
function placeholderForType(type) {
|
|
15840
16125
|
switch ((type ?? "string").toLowerCase()) {
|
|
@@ -15864,7 +16149,7 @@ async function buildKindResolver(metadataReader) {
|
|
|
15864
16149
|
byKind.set(key, list);
|
|
15865
16150
|
}
|
|
15866
16151
|
return async (kind, type) => {
|
|
15867
|
-
const cacheKey = `${kind}|${type
|
|
16152
|
+
const cacheKey = (type === undefined ? kind : `${kind}|${type}`).toLowerCase();
|
|
15868
16153
|
if (cache.has(cacheKey))
|
|
15869
16154
|
return cache.get(cacheKey);
|
|
15870
16155
|
const list = byKind.get(kind.toLowerCase());
|
|
@@ -15872,7 +16157,9 @@ async function buildKindResolver(metadataReader) {
|
|
|
15872
16157
|
cache.set(cacheKey, undefined);
|
|
15873
16158
|
return;
|
|
15874
16159
|
}
|
|
15875
|
-
const
|
|
16160
|
+
const subtypes = list.flatMap((r) => r.type ? [r.type] : []);
|
|
16161
|
+
const matched = type === undefined ? undefined : findSubtypeEntry(list, type);
|
|
16162
|
+
const entry = matched ?? list[0];
|
|
15876
16163
|
const version = entry.versions?.[0];
|
|
15877
16164
|
const requiredDefaults = [];
|
|
15878
16165
|
for (const prop of version?.spec ?? []) {
|
|
@@ -15891,16 +16178,35 @@ async function buildKindResolver(metadataReader) {
|
|
|
15891
16178
|
}
|
|
15892
16179
|
}
|
|
15893
16180
|
}
|
|
16181
|
+
const takesFreeFormType = type !== undefined && type.trim() !== "" && subtypes.length === 0 && TYPE_IS_IDENTITY_REPLACE_OPTIONS.has(String(version?.replaceOption));
|
|
15894
16182
|
const resolved = {
|
|
15895
16183
|
type: entry.type,
|
|
15896
16184
|
virtualizable: version?.supportsInLineCreation ?? false,
|
|
15897
16185
|
requiredDefaults,
|
|
15898
|
-
specProperties
|
|
16186
|
+
specProperties,
|
|
16187
|
+
subtypes,
|
|
16188
|
+
typeMatched: type === undefined || matched !== undefined || takesFreeFormType
|
|
15899
16189
|
};
|
|
15900
16190
|
cache.set(cacheKey, resolved);
|
|
15901
16191
|
return resolved;
|
|
15902
16192
|
};
|
|
15903
16193
|
}
|
|
16194
|
+
function formatResourceSubtypes(subtypes) {
|
|
16195
|
+
return subtypes.map((subtype) => {
|
|
16196
|
+
const alias = mapSolutionToResourceSubtype(subtype);
|
|
16197
|
+
return alias && alias.toLowerCase() !== subtype.toLowerCase() ? `${subtype} (${alias})` : subtype;
|
|
16198
|
+
}).join(", ");
|
|
16199
|
+
}
|
|
16200
|
+
function sameResourceSubtype(a, b) {
|
|
16201
|
+
if (a === undefined || b === undefined)
|
|
16202
|
+
return false;
|
|
16203
|
+
if (a.toLowerCase() === b.toLowerCase())
|
|
16204
|
+
return true;
|
|
16205
|
+
return mapSolutionToResourceSubtype(a)?.toLowerCase() === mapSolutionToResourceSubtype(b)?.toLowerCase();
|
|
16206
|
+
}
|
|
16207
|
+
function findSubtypeEntry(list, type) {
|
|
16208
|
+
return list.find((r) => !!r.type && sameResourceSubtype(r.type, type));
|
|
16209
|
+
}
|
|
15904
16210
|
function resolveBindingResourceIdentity(binding) {
|
|
15905
16211
|
switch (binding.resourceType) {
|
|
15906
16212
|
case models_BindingsResourceType.TimeTrigger:
|
|
@@ -16213,14 +16519,18 @@ async function findResourceByKeyInRcs(builder, kind, expectedKey, folderPath, pr
|
|
|
16213
16519
|
return;
|
|
16214
16520
|
}
|
|
16215
16521
|
async function searchRcsResources(builder, kind, name) {
|
|
16522
|
+
const [searchError, matches] = await catchError(searchRcsResourcesStrict(builder, kind, name));
|
|
16523
|
+
if (searchError) {
|
|
16524
|
+
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
16525
|
+
return [];
|
|
16526
|
+
}
|
|
16527
|
+
return matches;
|
|
16528
|
+
}
|
|
16529
|
+
async function searchRcsResourcesStrict(builder, kind, name) {
|
|
16216
16530
|
let pageCursor;
|
|
16217
16531
|
const allMatches = [];
|
|
16218
16532
|
do {
|
|
16219
|
-
const
|
|
16220
|
-
if (searchError) {
|
|
16221
|
-
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
16222
|
-
return [];
|
|
16223
|
-
}
|
|
16533
|
+
const result = await builder.searchResourcesAsync(kind, undefined, name, pageCursor, 50, undefined, false);
|
|
16224
16534
|
for (const folderResources of result.availableResources) {
|
|
16225
16535
|
const matches = folderResources.resources.filter((r) => r.name.toLowerCase() === name.toLowerCase());
|
|
16226
16536
|
for (const match of matches) {
|
|
@@ -16274,7 +16584,13 @@ async function resolveResourceKindMetadata(services, kind, type) {
|
|
|
16274
16584
|
}
|
|
16275
16585
|
async function createLocalResource(params) {
|
|
16276
16586
|
const { builder, services, kind, type, name } = params;
|
|
16587
|
+
if (type !== undefined && type.trim() === "") {
|
|
16588
|
+
throw new Error(`Type for kind ${kind} is empty.`);
|
|
16589
|
+
}
|
|
16277
16590
|
const metadata = await resolveResourceKindMetadata(services, kind, type);
|
|
16591
|
+
if (type !== undefined && metadata && !metadata.typeMatched) {
|
|
16592
|
+
throw new Error(metadata.subtypes.length > 0 ? `Unknown type "${type}" for kind ${kind}. Use one of: ${formatResourceSubtypes(metadata.subtypes)}` : `Kind ${kind} has no subtypes, so type "${type}" does not apply.`);
|
|
16593
|
+
}
|
|
16278
16594
|
const minted = await mintVirtualResource(builder, kind, metadata?.type ?? type, name, metadata);
|
|
16279
16595
|
if (!minted?.resource)
|
|
16280
16596
|
return;
|
|
@@ -16699,21 +17015,27 @@ function sortKeysDeep(value) {
|
|
|
16699
17015
|
}
|
|
16700
17016
|
export {
|
|
16701
17017
|
EntryPointSpecEnhancer,
|
|
17018
|
+
MAX_RESOURCE_NAME_LENGTH,
|
|
16702
17019
|
ProjectManifestError,
|
|
16703
17020
|
addProjectArtifactsToSolutionAsync,
|
|
16704
17021
|
applyEntryPointEnhancementAsync,
|
|
16705
17022
|
assertSolutionManifest,
|
|
17023
|
+
assertValidResourceName,
|
|
16706
17024
|
computeEntryPointSpec,
|
|
16707
17025
|
createLocalResource,
|
|
16708
17026
|
createProjectInSolutionBuilder,
|
|
16709
17027
|
createResourceBuilderServices,
|
|
16710
17028
|
createResourceKindMetadataResolver,
|
|
17029
|
+
exportResourceDefinitionAsync,
|
|
17030
|
+
findCatalogEntityAsync,
|
|
16711
17031
|
findMatchingLocalResource,
|
|
16712
17032
|
findMatchingMemberResource,
|
|
16713
17033
|
findMemberCloneResources,
|
|
16714
17034
|
findProjectFile,
|
|
16715
17035
|
findResourceByKeyInRcs,
|
|
16716
17036
|
findResourceInRcs,
|
|
17037
|
+
formatResourceSubtypes,
|
|
17038
|
+
getRemoteResourceClients,
|
|
16717
17039
|
hasAnyTemplateRow,
|
|
16718
17040
|
hasBareTemplateRow,
|
|
16719
17041
|
isMissingProjectTypeError,
|
|
@@ -16724,6 +17046,8 @@ export {
|
|
|
16724
17046
|
readProjectFile,
|
|
16725
17047
|
readSolutionFile,
|
|
16726
17048
|
readSolutionManifest,
|
|
17049
|
+
readSpecEntryPoints,
|
|
17050
|
+
readSpecProperty,
|
|
16727
17051
|
readUipxProjects,
|
|
16728
17052
|
resolveProjectDirFromManifest,
|
|
16729
17053
|
resolveResourceKindMetadata,
|
|
@@ -16731,12 +17055,17 @@ export {
|
|
|
16731
17055
|
resourceRefreshAsync,
|
|
16732
17056
|
resourceRemoteSyncAsync,
|
|
16733
17057
|
restoreSolutionFile,
|
|
17058
|
+
sameResourceSubtype,
|
|
16734
17059
|
saveCasingNormalized,
|
|
16735
17060
|
searchRcsResources,
|
|
17061
|
+
searchRcsResourcesStrict,
|
|
16736
17062
|
syncAndLog,
|
|
16737
17063
|
syncResourcesFromBindings,
|
|
17064
|
+
toCatalogReference,
|
|
17065
|
+
toResourceReference,
|
|
16738
17066
|
uniqueNameForResource,
|
|
17067
|
+
validateResourceName,
|
|
16739
17068
|
writeSolutionFile
|
|
16740
17069
|
};
|
|
16741
17070
|
|
|
16742
|
-
//# debugId=
|
|
17071
|
+
//# debugId=DA962E676CABC24464756E2164756E21
|