@uipath/solution-tool 1.203.0-preview.212 → 1.204.0-preview.211
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 +2 -2
- package/dist/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/deploy-delete-service-gg00vadc.js +22 -0
- package/dist/deploy-status-service-cqfrvxpz.js +256 -0
- package/dist/deploy.d.ts +11 -4
- package/dist/deploy.js +19 -7
- package/dist/deployment-search-j34w33b2.js +49 -0
- package/dist/{embedded-file-reader-xxqe8vs8.js → embedded-file-reader-rf2g1kfj.js} +2 -2
- package/dist/feed-resolver-31gcvnnk.js +27 -0
- package/dist/feed-scope-failure-fwtdvvrh.js +18 -0
- package/dist/feed-session-sxga31vn.js +17 -0
- package/dist/index.js +27 -18
- package/dist/init.js +10 -7
- package/dist/{list-xjdnbyka.js → list-q4dzkv45.js} +9 -6
- package/dist/pack.js +14 -11
- package/dist/{packager-tool-7qmx64kz.js → packager-tool-00vh1ktg.js} +1022 -1342
- package/dist/packager-tool-1phh2rfx.js +37 -0
- package/dist/{packager-tool-vas0xg5h.js → packager-tool-2cntqvdv.js} +5 -3
- package/dist/{packager-tool-1haahq17.js → packager-tool-3enm2h28.js} +5 -5
- package/dist/{packager-tool-2syrt51a.js → packager-tool-3fv6zc86.js} +1062 -825
- package/dist/{packager-tool-grtmkd54.js → packager-tool-3m36mxn7.js} +16 -74
- package/dist/packager-tool-40vcj4wv.js +172 -0
- package/dist/packager-tool-482eg22x.js +322 -0
- package/dist/{packager-tool-k4mskzww.js → packager-tool-5dzjsw5q.js} +3 -3
- package/dist/{packager-tool-0f0wt9vh.js → packager-tool-5fjp60dk.js} +3071 -2794
- package/dist/{packager-tool-bkwnetqn.js → packager-tool-83rzavkx.js} +383 -88
- package/dist/{packager-tool-f423v35w.js → packager-tool-9hj0cfd0.js} +756 -359
- package/dist/{packager-tool-7znqtw3f.js → packager-tool-9vvdgbay.js} +8 -6
- package/dist/packager-tool-bqre28m1.js +43 -0
- package/dist/packager-tool-f5gq77m5.js +28 -0
- package/dist/{packager-tool-nzghfa48.js → packager-tool-fv7xyzg2.js} +550 -2
- package/dist/{packager-tool-3jrq7smt.js → packager-tool-gb35b4qs.js} +206 -289
- package/dist/{packager-tool-4kdt8mys.js → packager-tool-j30xck4w.js} +1008 -647
- package/dist/packager-tool-ks8spnq8.js +166 -0
- package/dist/packager-tool-q3tgpemc.js +113 -0
- package/dist/packager-tool-qdtjywsk.js +173 -0
- package/dist/{packager-tool-2p5yh1q9.js → packager-tool-qgaqqq41.js} +320 -151
- package/dist/packager-tool-qm24rbae.js +5889 -0
- package/dist/{packager-tool-resolver-fmjr60x8.js → packager-tool-resolver-2cbxyq6k.js} +6 -5
- package/dist/{packager-tool-znakt6yw.js → packager-tool-vh4ng74p.js} +8 -6
- package/dist/packager-tool-vmsxq1pc.js +104 -0
- package/dist/packager-tool-zf3929se.js +237 -0
- package/dist/packager-tool-zns6n8zp.js +837 -0
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-p3gzdecy.js +25 -0
- package/dist/{project-contributions-cvttys34.js → project-contributions-txe8v6sm.js} +12 -9
- package/dist/publish.js +12 -7
- package/dist/resource.js +9 -6
- package/dist/services/activation.d.ts +17 -2
- package/dist/services/deploy-activate-service.d.ts +10 -0
- package/dist/services/deploy-delete-service.d.ts +82 -0
- package/dist/services/deploy-list-service.d.ts +15 -45
- package/dist/services/deploy-run-service.d.ts +36 -23
- package/dist/services/deploy-upgrade-service.d.ts +198 -39
- package/dist/services/deployment-feed-locator.d.ts +50 -12
- package/dist/services/deployment-search-client.d.ts +55 -0
- package/dist/services/deployment-search.d.ts +87 -34
- package/dist/services/deployment-state.d.ts +119 -0
- package/dist/services/feed-resolver.d.ts +31 -0
- package/dist/services/feed-session.d.ts +70 -0
- package/dist/services/folder-helper.d.ts +4 -27
- package/dist/services/http-status.d.ts +9 -0
- package/dist/services/incomplete-feed-sweep.d.ts +77 -0
- package/dist/services/legacy-deployment-search-v3.d.ts +23 -0
- package/dist/services/packages-list-service.d.ts +5 -0
- package/dist/services/pipeline-deploy-poll.d.ts +69 -0
- package/dist/services/publish-service.d.ts +14 -16
- package/dist/services/search-failure.d.ts +27 -0
- package/dist/templates/AGENTS.md +60 -20
- package/dist/tool.js +27 -18
- package/dist/utils/deployment-errors.d.ts +57 -0
- package/package.json +2 -2
- package/dist/packager-tool-jz2wbfjz.js +0 -2275
- package/dist/packager-tool-wtpe9285.js +0 -51960
- package/dist/prepare-solution-resources-wds3r8bq.js +0 -22
- package/dist/services/personal-workspace-deploy.d.ts +0 -49
|
@@ -8,23 +8,29 @@ import {
|
|
|
8
8
|
FirstPartyServiceApi
|
|
9
9
|
} from "./packager-tool-53w8skv5.js";
|
|
10
10
|
import {
|
|
11
|
-
UsersApi,
|
|
12
|
-
createApiClient,
|
|
13
11
|
getSolutionAuthContext
|
|
14
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-f5gq77m5.js";
|
|
13
|
+
import {
|
|
14
|
+
UsersApi,
|
|
15
|
+
createApiClient
|
|
16
|
+
} from "./packager-tool-3fv6zc86.js";
|
|
15
17
|
import {
|
|
16
18
|
findSolutionFileUpward,
|
|
17
|
-
getLoginStatusAsync,
|
|
18
19
|
normalizeProjectType,
|
|
19
20
|
toPortableRelativePath
|
|
20
|
-
} from "./packager-tool-
|
|
21
|
+
} from "./packager-tool-vmsxq1pc.js";
|
|
21
22
|
import {
|
|
22
23
|
catchError,
|
|
23
24
|
extractErrorMessage,
|
|
24
|
-
getFileSystem,
|
|
25
25
|
isGuid,
|
|
26
26
|
logger
|
|
27
|
-
} from "./packager-tool-
|
|
27
|
+
} from "./packager-tool-5fjp60dk.js";
|
|
28
|
+
import {
|
|
29
|
+
getLoginStatusAsync
|
|
30
|
+
} from "./packager-tool-gb35b4qs.js";
|
|
31
|
+
import {
|
|
32
|
+
getFileSystem
|
|
33
|
+
} from "./packager-tool-zf3929se.js";
|
|
28
34
|
import {
|
|
29
35
|
__commonJS,
|
|
30
36
|
__require,
|
|
@@ -2489,7 +2495,6 @@ async function applyEntryPointEnhancementAsync(context, resource, spec) {
|
|
|
2489
2495
|
await enhancer.enhanceSpecAsync(context, resource, new Map, specMap);
|
|
2490
2496
|
return Object.fromEntries(specMap.entries());
|
|
2491
2497
|
}
|
|
2492
|
-
|
|
2493
2498
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/file-storage-provider.js
|
|
2494
2499
|
function isFileNotFoundError(error) {
|
|
2495
2500
|
if (!error || typeof error != "object")
|
|
@@ -2541,7 +2546,6 @@ class InMemoryCacheProvider {
|
|
|
2541
2546
|
this._defaultTtlMs = defaultTtlMs;
|
|
2542
2547
|
}
|
|
2543
2548
|
}
|
|
2544
|
-
|
|
2545
2549
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/ip-range-bypass-secret-provider.js
|
|
2546
2550
|
class NullIpRangeBypassSecretProvider {
|
|
2547
2551
|
async getIpRangeBypassSecretAsync(_cancellationToken) {
|
|
@@ -2562,6 +2566,183 @@ class NullSecretsProvider {
|
|
|
2562
2566
|
}
|
|
2563
2567
|
}
|
|
2564
2568
|
|
|
2569
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/timeout-exception.js
|
|
2570
|
+
class TimeoutException extends Error {
|
|
2571
|
+
constructor(message, timeoutMs) {
|
|
2572
|
+
super(message);
|
|
2573
|
+
this.name = "TimeoutException";
|
|
2574
|
+
this.timeoutMs = timeoutMs;
|
|
2575
|
+
if (Error.captureStackTrace)
|
|
2576
|
+
Error.captureStackTrace(this, TimeoutException);
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/helpers/timeout.js
|
|
2581
|
+
function createTimeoutSignal(timeoutMs, description, linkedSignal) {
|
|
2582
|
+
const controller = new AbortController;
|
|
2583
|
+
let timeoutId;
|
|
2584
|
+
const dispose = () => {
|
|
2585
|
+
if (timeoutId !== undefined) {
|
|
2586
|
+
clearTimeout(timeoutId);
|
|
2587
|
+
timeoutId = undefined;
|
|
2588
|
+
}
|
|
2589
|
+
linkedSignal?.removeEventListener("abort", onLinkedAbort);
|
|
2590
|
+
};
|
|
2591
|
+
const onLinkedAbort = () => {
|
|
2592
|
+
dispose();
|
|
2593
|
+
controller.abort(linkedSignal?.reason);
|
|
2594
|
+
};
|
|
2595
|
+
if (linkedSignal?.aborted) {
|
|
2596
|
+
controller.abort(linkedSignal.reason);
|
|
2597
|
+
return {
|
|
2598
|
+
signal: controller.signal,
|
|
2599
|
+
dispose
|
|
2600
|
+
};
|
|
2601
|
+
}
|
|
2602
|
+
timeoutId = setTimeout(() => {
|
|
2603
|
+
dispose();
|
|
2604
|
+
controller.abort(new TimeoutException(`${description} timed out after ${timeoutMs}ms`, timeoutMs));
|
|
2605
|
+
}, timeoutMs);
|
|
2606
|
+
linkedSignal?.addEventListener("abort", onLinkedAbort, {
|
|
2607
|
+
once: true
|
|
2608
|
+
});
|
|
2609
|
+
return {
|
|
2610
|
+
signal: controller.signal,
|
|
2611
|
+
dispose
|
|
2612
|
+
};
|
|
2613
|
+
}
|
|
2614
|
+
var MAX_TIMEOUT_MS = 2147483647;
|
|
2615
|
+
function isValidTimeoutMs(value) {
|
|
2616
|
+
return typeof value == "number" && Number.isFinite(value) && value > 0 && value <= MAX_TIMEOUT_MS;
|
|
2617
|
+
}
|
|
2618
|
+
function readTimeoutOverrideMs(storageKey) {
|
|
2619
|
+
try {
|
|
2620
|
+
if ("u" < typeof localStorage)
|
|
2621
|
+
return;
|
|
2622
|
+
const raw = localStorage.getItem(storageKey);
|
|
2623
|
+
if (raw === null || raw.trim() === "")
|
|
2624
|
+
return;
|
|
2625
|
+
const parsed = Number(raw);
|
|
2626
|
+
return isValidTimeoutMs(parsed) ? parsed : undefined;
|
|
2627
|
+
} catch {
|
|
2628
|
+
return;
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/operation-cancelled-exception.js
|
|
2633
|
+
class OperationCancelledException extends Error {
|
|
2634
|
+
constructor(message, operationName) {
|
|
2635
|
+
super(message ?? "The operation was cancelled");
|
|
2636
|
+
this.name = "OperationCancelledException";
|
|
2637
|
+
this.operationName = operationName;
|
|
2638
|
+
if (Error.captureStackTrace)
|
|
2639
|
+
Error.captureStackTrace(this, OperationCancelledException);
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/providers/timeout-file-storage-provider.js
|
|
2644
|
+
class TimeoutFileStorageProvider2 {
|
|
2645
|
+
fileExistsAsync(path, cancellationToken) {
|
|
2646
|
+
return this.guard(`fileExists(${path})`, cancellationToken, (signal) => this.inner.fileExistsAsync(path, signal));
|
|
2647
|
+
}
|
|
2648
|
+
async openFileAsync(path, cancellationToken) {
|
|
2649
|
+
const stream = await this.guard(`openFile(${path})`, cancellationToken, (signal) => this.inner.openFileAsync(path, signal));
|
|
2650
|
+
return this.bindReadsToTimeout(stream, `read(${path})`, cancellationToken);
|
|
2651
|
+
}
|
|
2652
|
+
bindReadsToTimeout(stream, description, cancellationToken) {
|
|
2653
|
+
const reader = stream.getReader();
|
|
2654
|
+
return new ReadableStream({
|
|
2655
|
+
pull: async (controller) => {
|
|
2656
|
+
let result;
|
|
2657
|
+
try {
|
|
2658
|
+
result = await this.guard(description, cancellationToken, () => reader.read());
|
|
2659
|
+
} catch (error) {
|
|
2660
|
+
reader.cancel(error).catch(() => {});
|
|
2661
|
+
throw error;
|
|
2662
|
+
}
|
|
2663
|
+
if (result.done)
|
|
2664
|
+
controller.close();
|
|
2665
|
+
else
|
|
2666
|
+
controller.enqueue(result.value);
|
|
2667
|
+
},
|
|
2668
|
+
cancel: (reason) => reader.cancel(reason)
|
|
2669
|
+
});
|
|
2670
|
+
}
|
|
2671
|
+
readFileToEndAsync(path, cancellationToken) {
|
|
2672
|
+
return this.guard(`readFileToEnd(${path})`, cancellationToken, (signal) => this.inner.readFileToEndAsync(path, signal));
|
|
2673
|
+
}
|
|
2674
|
+
writeFileAsync(path, content, cancellationToken) {
|
|
2675
|
+
return this.guard(`writeFile(${path})`, cancellationToken, (signal) => this.inner.writeFileAsync(path, content, signal));
|
|
2676
|
+
}
|
|
2677
|
+
deleteFileAsync(path, cancellationToken) {
|
|
2678
|
+
return this.guard(`deleteFile(${path})`, cancellationToken, (signal) => this.inner.deleteFileAsync(path, signal));
|
|
2679
|
+
}
|
|
2680
|
+
getFilesAsync(path, searchPattern, cancellationToken) {
|
|
2681
|
+
return this.guard(`getFiles(${path ?? ""}, ${searchPattern ?? ""})`, cancellationToken, (signal) => this.inner.getFilesAsync(path, searchPattern, signal));
|
|
2682
|
+
}
|
|
2683
|
+
async guard(description, cancellationToken, operation) {
|
|
2684
|
+
const timeout = createTimeoutSignal(this.timeoutMs, `File storage operation ${description}`, cancellationToken);
|
|
2685
|
+
try {
|
|
2686
|
+
return await Promise.race([
|
|
2687
|
+
operation(timeout.signal),
|
|
2688
|
+
rejectOnAbort(timeout.signal)
|
|
2689
|
+
]);
|
|
2690
|
+
} catch (error) {
|
|
2691
|
+
if (cancellationToken?.aborted)
|
|
2692
|
+
throw cancellationToken.reason instanceof OperationCancelledException ? cancellationToken.reason : new OperationCancelledException(undefined, description);
|
|
2693
|
+
if (timeout.signal.aborted && timeout.signal.reason instanceof TimeoutException)
|
|
2694
|
+
throw timeout.signal.reason;
|
|
2695
|
+
throw error;
|
|
2696
|
+
} finally {
|
|
2697
|
+
timeout.dispose();
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
constructor(inner, timeoutMs) {
|
|
2701
|
+
this.inner = inner;
|
|
2702
|
+
this.timeoutMs = timeoutMs;
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
function rejectOnAbort(signal) {
|
|
2706
|
+
return new Promise((_, reject) => {
|
|
2707
|
+
if (signal.aborted)
|
|
2708
|
+
return void reject(signal.reason);
|
|
2709
|
+
signal.addEventListener("abort", () => reject(signal.reason), {
|
|
2710
|
+
once: true
|
|
2711
|
+
});
|
|
2712
|
+
});
|
|
2713
|
+
}
|
|
2714
|
+
function withFileOperationTimeout2(provider, timeoutMs) {
|
|
2715
|
+
if (!isValidTimeoutMs(timeoutMs) || provider instanceof TimeoutFileStorageProvider2)
|
|
2716
|
+
return provider;
|
|
2717
|
+
return new TimeoutFileStorageProvider2(provider, timeoutMs);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/solution-context-options.js
|
|
2721
|
+
var DEFAULT_SOLUTION_CONTEXT_OPTIONS = {
|
|
2722
|
+
lockTimeoutMs: 30000,
|
|
2723
|
+
fileOperationTimeoutMs: 30000
|
|
2724
|
+
};
|
|
2725
|
+
var SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY = "SOL_RB_SOLUTION_CONTEXT_TIMEOUT_MS";
|
|
2726
|
+
var FILE_OPERATION_TIMEOUT_STORAGE_KEY = "SOL_RB_FILE_OPERATION_TIMEOUT_MS";
|
|
2727
|
+
function resolveTimeoutMs(storageKey, configured, fallback) {
|
|
2728
|
+
const override = readTimeoutOverrideMs(storageKey);
|
|
2729
|
+
if (override !== undefined)
|
|
2730
|
+
return override;
|
|
2731
|
+
return isValidTimeoutMs(configured) ? configured : fallback;
|
|
2732
|
+
}
|
|
2733
|
+
function resolveLockTimeoutMs(options) {
|
|
2734
|
+
return resolveTimeoutMs(SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY, options?.lockTimeoutMs, DEFAULT_SOLUTION_CONTEXT_OPTIONS.lockTimeoutMs);
|
|
2735
|
+
}
|
|
2736
|
+
function resolveFileOperationTimeoutMs(options) {
|
|
2737
|
+
return resolveTimeoutMs(FILE_OPERATION_TIMEOUT_STORAGE_KEY, options?.fileOperationTimeoutMs, DEFAULT_SOLUTION_CONTEXT_OPTIONS.fileOperationTimeoutMs);
|
|
2738
|
+
}
|
|
2739
|
+
function mergeSolutionContextOptions(options) {
|
|
2740
|
+
return {
|
|
2741
|
+
lockTimeoutMs: isValidTimeoutMs(options?.lockTimeoutMs) ? options.lockTimeoutMs : DEFAULT_SOLUTION_CONTEXT_OPTIONS.lockTimeoutMs,
|
|
2742
|
+
fileOperationTimeoutMs: isValidTimeoutMs(options?.fileOperationTimeoutMs) ? options.fileOperationTimeoutMs : DEFAULT_SOLUTION_CONTEXT_OPTIONS.fileOperationTimeoutMs
|
|
2743
|
+
};
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2565
2746
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/models.js
|
|
2566
2747
|
var SolutionConstants = {
|
|
2567
2748
|
RESOURCE_FILES_FOLDER_NAME: "resources",
|
|
@@ -2696,17 +2877,6 @@ class DisconnectedException extends Error {
|
|
|
2696
2877
|
}
|
|
2697
2878
|
}
|
|
2698
2879
|
|
|
2699
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/operation-cancelled-exception.js
|
|
2700
|
-
class OperationCancelledException extends Error {
|
|
2701
|
-
constructor(message, operationName) {
|
|
2702
|
-
super(message ?? "The operation was cancelled");
|
|
2703
|
-
this.name = "OperationCancelledException";
|
|
2704
|
-
this.operationName = operationName;
|
|
2705
|
-
if (Error.captureStackTrace)
|
|
2706
|
-
Error.captureStackTrace(this, OperationCancelledException);
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
2880
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/exceptions/invalid-operation-exception.js
|
|
2711
2881
|
class InvalidOperationException extends Error {
|
|
2712
2882
|
constructor(message) {
|
|
@@ -3371,10 +3541,14 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3371
3541
|
this._jsonSerializer = this.jsonSerializerFactory.getByName(JsonSerializerNames.CamelCaseIndented);
|
|
3372
3542
|
return this._jsonSerializer;
|
|
3373
3543
|
}
|
|
3544
|
+
async getFileStorageProviderAsync(context, cancellationToken) {
|
|
3545
|
+
const provider = await this.fileStorageProviderFactory.getProviderAsync(context, cancellationToken);
|
|
3546
|
+
return withFileOperationTimeout2(provider, resolveFileOperationTimeoutMs(this.options));
|
|
3547
|
+
}
|
|
3374
3548
|
async readAsync(context, cancellationToken) {
|
|
3375
3549
|
this.logger.info("Reading multi-file solution definition for solution %s", context.path);
|
|
3376
3550
|
const solutionKey = this.getSolutionKey(context);
|
|
3377
|
-
const fileStorageProvider = await this.
|
|
3551
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3378
3552
|
const resources = [];
|
|
3379
3553
|
const solutionFiles = [];
|
|
3380
3554
|
let hashes;
|
|
@@ -3450,6 +3624,12 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3450
3624
|
invalidFiles.push(resourceFile);
|
|
3451
3625
|
}
|
|
3452
3626
|
} catch (ex) {
|
|
3627
|
+
if (ex instanceof OperationCancelledException || cancellationToken?.aborted) {
|
|
3628
|
+
this.logger.warn("Operation cancelled while reading file %s for solution %s", resourceFile, context.path);
|
|
3629
|
+
throw ex instanceof OperationCancelledException ? ex : new OperationCancelledException;
|
|
3630
|
+
}
|
|
3631
|
+
if (ex instanceof TimeoutException)
|
|
3632
|
+
throw new TimeoutException(`Reading resource file ${resourceFile} for solution ${context.path} timed out: ${ex.message}`, ex.timeoutMs);
|
|
3453
3633
|
if (isFileNotFoundError(ex)) {
|
|
3454
3634
|
this.logger.warn("Resource file listed but missing in storage for solution %s: %s", resourceFile, context.path);
|
|
3455
3635
|
missingFiles.push(resourceFile);
|
|
@@ -3502,7 +3682,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3502
3682
|
async writeAsync(context, solution, cancellationToken) {
|
|
3503
3683
|
if (context.isReadOnly)
|
|
3504
3684
|
return;
|
|
3505
|
-
const fileStorageProvider = await this.
|
|
3685
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3506
3686
|
const existingHashes = this.getHashes(context);
|
|
3507
3687
|
const existingPaths = this.getPaths(context);
|
|
3508
3688
|
const existingTree = this.getTree(context);
|
|
@@ -3577,7 +3757,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3577
3757
|
async deleteFilesAsync(context, filesToDelete, cancellationToken) {
|
|
3578
3758
|
if (!filesToDelete || filesToDelete.length === 0 || context.isReadOnly)
|
|
3579
3759
|
return;
|
|
3580
|
-
const fileStorageProvider = await this.
|
|
3760
|
+
const fileStorageProvider = await this.getFileStorageProviderAsync(context, cancellationToken);
|
|
3581
3761
|
for (const file of filesToDelete)
|
|
3582
3762
|
try {
|
|
3583
3763
|
const outputPath = this.joinPath("resourceFiles", file.name);
|
|
@@ -3774,7 +3954,8 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3774
3954
|
const hex = Math.abs(hash).toString(16).padStart(8, "0");
|
|
3775
3955
|
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")}`;
|
|
3776
3956
|
}
|
|
3777
|
-
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory) {
|
|
3957
|
+
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory, options) {
|
|
3958
|
+
this.options = options;
|
|
3778
3959
|
this._caseInsensitiveSerializer = null;
|
|
3779
3960
|
this._jsonSerializer = null;
|
|
3780
3961
|
this.fileStorageProviderFactory = fileStorageProviderFactory;
|
|
@@ -3787,12 +3968,13 @@ MultiFileSolutionDefinitionProvider.INVALID_FILE_NAME_CHARS = /[<>:"/\\|?*\x00-\
|
|
|
3787
3968
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/solution/multi-file-solution-definition-factory.js
|
|
3788
3969
|
class MultiFileSolutionDefinitionFactory {
|
|
3789
3970
|
async getProviderAsync(cancellationToken) {
|
|
3790
|
-
return new MultiFileSolutionDefinitionProvider(this.fileStorageProviderFactory, this.jsonSerializerFactory, this.loggerFactory);
|
|
3971
|
+
return new MultiFileSolutionDefinitionProvider(this.fileStorageProviderFactory, this.jsonSerializerFactory, this.loggerFactory, this.options);
|
|
3791
3972
|
}
|
|
3792
|
-
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory) {
|
|
3973
|
+
constructor(fileStorageProviderFactory, jsonSerializerFactory, loggerFactory, options) {
|
|
3793
3974
|
this.fileStorageProviderFactory = fileStorageProviderFactory;
|
|
3794
3975
|
this.jsonSerializerFactory = jsonSerializerFactory;
|
|
3795
3976
|
this.loggerFactory = loggerFactory;
|
|
3977
|
+
this.options = options;
|
|
3796
3978
|
this.logger = loggerFactory.create("MultiFileSolutionDefinitionFactory");
|
|
3797
3979
|
}
|
|
3798
3980
|
}
|
|
@@ -3800,7 +3982,7 @@ class MultiFileSolutionDefinitionFactory {
|
|
|
3800
3982
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/embedded-files-default.js
|
|
3801
3983
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
3802
3984
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory: JsonSerializerFactory2 }] = await Promise.all([
|
|
3803
|
-
import("./embedded-file-reader-
|
|
3985
|
+
import("./embedded-file-reader-rf2g1kfj.js"),
|
|
3804
3986
|
import("./index-dqa169gp.js")
|
|
3805
3987
|
]);
|
|
3806
3988
|
return new EmbeddedFileReader(new JsonSerializerFactory2);
|
|
@@ -3833,7 +4015,8 @@ var ServiceTokens = {
|
|
|
3833
4015
|
JsonSerializerFactory: "IJsonSerializerFactory",
|
|
3834
4016
|
SerializerProxy: "ISerializerProxy",
|
|
3835
4017
|
StreamSerializer: "IStreamSerializer",
|
|
3836
|
-
HttpReaderOptions: "HttpReaderOptions"
|
|
4018
|
+
HttpReaderOptions: "HttpReaderOptions",
|
|
4019
|
+
SolutionContextOptions: "SolutionContextOptions"
|
|
3837
4020
|
};
|
|
3838
4021
|
var Tokens = {
|
|
3839
4022
|
IMediator: "IMediator",
|
|
@@ -4399,7 +4582,8 @@ class BindingOverwritesHandler {
|
|
|
4399
4582
|
[BindingsKnownKeys.FolderKeyPropertyName]: resourceOverwrite.folderKey ?? ""
|
|
4400
4583
|
};
|
|
4401
4584
|
else {
|
|
4402
|
-
const
|
|
4585
|
+
const isBusinessRule = bindingResource.binding.resourceType === models_BindingsResourceType.BusinessRule;
|
|
4586
|
+
const folderPath = bindingResource.isArtefactResource && !isBusinessRule ? "" : resourceOverwrite.folderFullyQualifiedName ?? "";
|
|
4403
4587
|
overwrite = {
|
|
4404
4588
|
[BindingsKnownKeys.FolderPathPropertyName]: folderPath,
|
|
4405
4589
|
[BindingsKnownKeys.NamePropertyName]: resourceOverwrite.resourceName
|
|
@@ -4557,42 +4741,6 @@ class AsyncSemaphore {
|
|
|
4557
4741
|
this._permits = permits;
|
|
4558
4742
|
}
|
|
4559
4743
|
}
|
|
4560
|
-
function createTimeoutSignal(timeoutMs, linkedSignal) {
|
|
4561
|
-
const controller = new AbortController;
|
|
4562
|
-
const timeoutId = setTimeout(() => {
|
|
4563
|
-
controller.abort(new Error(`Operation timed out after ${timeoutMs}ms`));
|
|
4564
|
-
}, timeoutMs);
|
|
4565
|
-
if (linkedSignal)
|
|
4566
|
-
if (linkedSignal.aborted) {
|
|
4567
|
-
clearTimeout(timeoutId);
|
|
4568
|
-
controller.abort(linkedSignal.reason);
|
|
4569
|
-
} else
|
|
4570
|
-
linkedSignal.addEventListener("abort", () => {
|
|
4571
|
-
clearTimeout(timeoutId);
|
|
4572
|
-
controller.abort(linkedSignal.reason);
|
|
4573
|
-
}, {
|
|
4574
|
-
signal: controller.signal
|
|
4575
|
-
});
|
|
4576
|
-
controller.signal.addEventListener("abort", () => {
|
|
4577
|
-
clearTimeout(timeoutId);
|
|
4578
|
-
});
|
|
4579
|
-
return controller.signal;
|
|
4580
|
-
}
|
|
4581
|
-
var DEFAULT_TIMEOUT_MS = 5000;
|
|
4582
|
-
var SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY = "SOL_RB_SOLUTION_CONTEXT_TIMEOUT_MS";
|
|
4583
|
-
function getLockTimeoutMs() {
|
|
4584
|
-
try {
|
|
4585
|
-
if ("u" < typeof localStorage)
|
|
4586
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4587
|
-
const raw = localStorage.getItem(SOLUTION_CONTEXT_TIMEOUT_STORAGE_KEY);
|
|
4588
|
-
if (raw === null || raw.trim() === "")
|
|
4589
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4590
|
-
const parsed = Number(raw);
|
|
4591
|
-
return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_TIMEOUT_MS;
|
|
4592
|
-
} catch {
|
|
4593
|
-
return DEFAULT_TIMEOUT_MS;
|
|
4594
|
-
}
|
|
4595
|
-
}
|
|
4596
4744
|
|
|
4597
4745
|
class SolutionContext {
|
|
4598
4746
|
get isLoaded() {
|
|
@@ -4720,30 +4868,42 @@ class SolutionContext {
|
|
|
4720
4868
|
throw new FileDependencyNotFoundException(missingFileDependencies);
|
|
4721
4869
|
}
|
|
4722
4870
|
async doWithLockAsync(doWork, cancellationToken) {
|
|
4723
|
-
const
|
|
4724
|
-
|
|
4871
|
+
const lockTimeoutMs = resolveLockTimeoutMs(this._options);
|
|
4872
|
+
const lockTimeout = createTimeoutSignal(lockTimeoutMs, `Waiting for the lock on solution ${this.path}`, cancellationToken);
|
|
4725
4873
|
try {
|
|
4726
|
-
|
|
4874
|
+
await this._semaphore.acquire(lockTimeout.signal);
|
|
4875
|
+
} catch (error) {
|
|
4876
|
+
if (!cancellationToken?.aborted && lockTimeout.signal.reason instanceof TimeoutException)
|
|
4877
|
+
throw lockTimeout.signal.reason;
|
|
4878
|
+
throw error;
|
|
4879
|
+
} finally {
|
|
4880
|
+
lockTimeout.dispose();
|
|
4881
|
+
}
|
|
4882
|
+
try {
|
|
4883
|
+
return await doWork(cancellationToken);
|
|
4727
4884
|
} finally {
|
|
4728
4885
|
this._semaphore.release();
|
|
4729
4886
|
}
|
|
4730
4887
|
}
|
|
4731
|
-
constructor(path, isReadOnlyOrProvider,
|
|
4888
|
+
constructor(path, isReadOnlyOrProvider, definitionProviderOrOptions, options) {
|
|
4732
4889
|
this._definition = null;
|
|
4733
4890
|
this._semaphore = new AsyncSemaphore(1);
|
|
4734
4891
|
this._items = {};
|
|
4735
4892
|
this._persistChanges = true;
|
|
4736
4893
|
ArgumentException.throwIfNullOrEmpty(path, "path");
|
|
4737
4894
|
if (typeof isReadOnlyOrProvider == "boolean") {
|
|
4895
|
+
const definitionProvider = definitionProviderOrOptions;
|
|
4738
4896
|
ArgumentException.throwIfNull(definitionProvider, "definitionProvider");
|
|
4739
4897
|
this.path = path;
|
|
4740
4898
|
this.isReadOnly = isReadOnlyOrProvider;
|
|
4741
4899
|
this._definitionProvider = definitionProvider;
|
|
4900
|
+
this._options = options;
|
|
4742
4901
|
} else {
|
|
4743
4902
|
ArgumentException.throwIfNull(isReadOnlyOrProvider, "definitionProvider");
|
|
4744
4903
|
this.path = path;
|
|
4745
4904
|
this.isReadOnly = false;
|
|
4746
4905
|
this._definitionProvider = isReadOnlyOrProvider;
|
|
4906
|
+
this._options = definitionProviderOrOptions;
|
|
4747
4907
|
}
|
|
4748
4908
|
}
|
|
4749
4909
|
}
|
|
@@ -4754,7 +4914,8 @@ class SolutionContextFactory {
|
|
|
4754
4914
|
ArgumentException.throwIfNullOrEmpty(path, "path");
|
|
4755
4915
|
const solutionDefinitionFactory = this._container.resolve(Tokens.ISolutionDefinitionFactory);
|
|
4756
4916
|
const solutionDefinitionProvider = await solutionDefinitionFactory.getProviderAsync(cancellationToken);
|
|
4757
|
-
|
|
4917
|
+
const options = this._container.isRegistered(ServiceTokens.SolutionContextOptions, true) ? this._container.resolve(ServiceTokens.SolutionContextOptions) : undefined;
|
|
4918
|
+
return new SolutionContext(path, isReadOnly, solutionDefinitionProvider, options);
|
|
4758
4919
|
}
|
|
4759
4920
|
constructor(_container) {
|
|
4760
4921
|
this._container = _container;
|
|
@@ -5776,7 +5937,13 @@ var solutionsSubtypesMap = {
|
|
|
5776
5937
|
Api: "api",
|
|
5777
5938
|
Function: "function",
|
|
5778
5939
|
McpServer: "mcpserver",
|
|
5779
|
-
BusinessRule: "businessRule"
|
|
5940
|
+
BusinessRule: "businessRule",
|
|
5941
|
+
Native: "native",
|
|
5942
|
+
Federated: "federated",
|
|
5943
|
+
Case: "case",
|
|
5944
|
+
CaseMain: "caseMain",
|
|
5945
|
+
CaseComment: "caseComment",
|
|
5946
|
+
CaseDocument: "caseDocument"
|
|
5780
5947
|
};
|
|
5781
5948
|
function mapResourceToSolutionSubtype(entitySubtype) {
|
|
5782
5949
|
if (!entitySubtype)
|
|
@@ -14207,9 +14374,9 @@ class UnconfiguredEmbeddedFileReader {
|
|
|
14207
14374
|
}
|
|
14208
14375
|
|
|
14209
14376
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/container.js
|
|
14210
|
-
function createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, embeddedFileReader) {
|
|
14377
|
+
function createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, embeddedFileReader, solutionContextOptions) {
|
|
14211
14378
|
const childContainer = import_tsyringe6.container.createChildContainer();
|
|
14212
|
-
registerProviders(childContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory);
|
|
14379
|
+
registerProviders(childContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, solutionContextOptions);
|
|
14213
14380
|
registerServices(childContainer, embeddedFileReader);
|
|
14214
14381
|
registerHandlers(childContainer);
|
|
14215
14382
|
childContainer.register(ServiceTokens.Mediator, {
|
|
@@ -14233,7 +14400,7 @@ function registerProvider(diContainer, token, provider) {
|
|
|
14233
14400
|
break;
|
|
14234
14401
|
}
|
|
14235
14402
|
}
|
|
14236
|
-
function registerProviders(diContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory) {
|
|
14403
|
+
function registerProviders(diContainer, accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, httpReaderOptions, loggerFactory, solutionContextOptions) {
|
|
14237
14404
|
registerProvider(diContainer, ServiceTokens.AccessProvider, accessProvider);
|
|
14238
14405
|
registerProvider(diContainer, ServiceTokens.CacheProvider, cacheProvider);
|
|
14239
14406
|
registerProvider(diContainer, ServiceTokens.SecretsProvider, secretsProvider);
|
|
@@ -14248,6 +14415,7 @@ function registerProviders(diContainer, accessProvider, cacheProvider, secretsPr
|
|
|
14248
14415
|
...httpReaderOptions
|
|
14249
14416
|
};
|
|
14250
14417
|
diContainer.registerInstance(ServiceTokens.HttpReaderOptions, mergedOptions);
|
|
14418
|
+
diContainer.registerInstance(ServiceTokens.SolutionContextOptions, mergeSolutionContextOptions(solutionContextOptions));
|
|
14251
14419
|
}
|
|
14252
14420
|
function registerServices(diContainer, embeddedFileReader) {
|
|
14253
14421
|
diContainer.register(ServiceTokens.AutomationSolutionsClientProxy, {
|
|
@@ -14982,6 +15150,10 @@ class ResourceBuilderConfiguration {
|
|
|
14982
15150
|
this._httpReaderOptions = options;
|
|
14983
15151
|
return this;
|
|
14984
15152
|
}
|
|
15153
|
+
addSolutionContextOptions(options) {
|
|
15154
|
+
this._solutionContextOptions = options;
|
|
15155
|
+
return this;
|
|
15156
|
+
}
|
|
14985
15157
|
addLoggerFactory(factoryProvider, lifetime = service_tokens_ServiceLifetime.Singleton) {
|
|
14986
15158
|
this._loggerFactoryProvider = factoryProvider;
|
|
14987
15159
|
this._loggerFactoryLifetime = lifetime;
|
|
@@ -15046,7 +15218,7 @@ class ResourceBuilderConfiguration {
|
|
|
15046
15218
|
};
|
|
15047
15219
|
} else if (!solutionDefinitionProvider && fileStorageProviderFactory)
|
|
15048
15220
|
solutionDefinitionFactory = {
|
|
15049
|
-
instance: new MultiFileSolutionDefinitionFactory(fileStorageProviderFactory.instance, new JsonSerializerFactory, loggerFactoryInstance),
|
|
15221
|
+
instance: new MultiFileSolutionDefinitionFactory(fileStorageProviderFactory.instance, new JsonSerializerFactory, loggerFactoryInstance, this._solutionContextOptions),
|
|
15050
15222
|
lifetime: service_tokens_ServiceLifetime.Scoped
|
|
15051
15223
|
};
|
|
15052
15224
|
const artifactResourceSpecEnhancerInstance = this._artifactResourceSpecEnhancerProvider ? await this.resolveGenericProvider(this._artifactResourceSpecEnhancerProvider) : new DefaultArtifactResourceSpecEnhancer;
|
|
@@ -15055,7 +15227,7 @@ class ResourceBuilderConfiguration {
|
|
|
15055
15227
|
lifetime: this._artifactResourceSpecEnhancerLifetime
|
|
15056
15228
|
};
|
|
15057
15229
|
const embeddedFileReader = await createDefaultEmbeddedFileReaderAsync();
|
|
15058
|
-
const container3 = createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, this._httpReaderOptions, loggerFactory, embeddedFileReader);
|
|
15230
|
+
const container3 = createContainer(accessProvider, cacheProvider, secretsProvider, fileStorageProviderFactory, ipRangeBypassSecretProvider, solutionDefinitionProvider, solutionDefinitionFactory, artifactResourceSpecEnhancer, this._httpReaderOptions, loggerFactory, embeddedFileReader, this._solutionContextOptions);
|
|
15059
15231
|
return new ResourceBuilderServices(container3);
|
|
15060
15232
|
}
|
|
15061
15233
|
async buildServices() {
|
|
@@ -15076,7 +15248,6 @@ class ResourceBuilderConfiguration {
|
|
|
15076
15248
|
function createResourceBuilderConfiguration() {
|
|
15077
15249
|
return new ResourceBuilderConfiguration;
|
|
15078
15250
|
}
|
|
15079
|
-
|
|
15080
15251
|
// ../solution-sdk/src/resources/providers/artefact-pair-binding-provider.ts
|
|
15081
15252
|
var ARTEFACT_KIND_APP = "app";
|
|
15082
15253
|
var ARTEFACT_KIND_APP_VERSION = "appversion";
|
|
@@ -15591,7 +15762,6 @@ function hasAnyTemplateRow(projectType) {
|
|
|
15591
15762
|
return key === wanted || key.startsWith(`${wanted}_`);
|
|
15592
15763
|
});
|
|
15593
15764
|
}
|
|
15594
|
-
|
|
15595
15765
|
// ../solution-sdk/src/resources/services/local-resource-matcher.ts
|
|
15596
15766
|
function normalizeFolderPath(path) {
|
|
15597
15767
|
if (!path)
|
|
@@ -15811,6 +15981,10 @@ function parseResourceHeader(content) {
|
|
|
15811
15981
|
}
|
|
15812
15982
|
|
|
15813
15983
|
// ../solution-sdk/src/resources/services/sync-resources-from-bindings.ts
|
|
15984
|
+
var TYPE_IS_IDENTITY_REPLACE_OPTIONS = new Set([
|
|
15985
|
+
"SameType",
|
|
15986
|
+
"SameNameAndType"
|
|
15987
|
+
]);
|
|
15814
15988
|
var BINDINGS_JSON_FALLBACK_TYPES = new Set(["agent", "function"]);
|
|
15815
15989
|
function placeholderForType(type) {
|
|
15816
15990
|
switch ((type ?? "string").toLowerCase()) {
|
|
@@ -15840,7 +16014,7 @@ async function buildKindResolver(metadataReader) {
|
|
|
15840
16014
|
byKind.set(key, list);
|
|
15841
16015
|
}
|
|
15842
16016
|
return async (kind, type) => {
|
|
15843
|
-
const cacheKey = `${kind}|${type
|
|
16017
|
+
const cacheKey = (type === undefined ? kind : `${kind}|${type}`).toLowerCase();
|
|
15844
16018
|
if (cache.has(cacheKey))
|
|
15845
16019
|
return cache.get(cacheKey);
|
|
15846
16020
|
const list = byKind.get(kind.toLowerCase());
|
|
@@ -15848,7 +16022,9 @@ async function buildKindResolver(metadataReader) {
|
|
|
15848
16022
|
cache.set(cacheKey, undefined);
|
|
15849
16023
|
return;
|
|
15850
16024
|
}
|
|
15851
|
-
const
|
|
16025
|
+
const subtypes = list.flatMap((r) => r.type ? [r.type] : []);
|
|
16026
|
+
const matched = type === undefined ? undefined : findSubtypeEntry(list, type);
|
|
16027
|
+
const entry = matched ?? list[0];
|
|
15852
16028
|
const version = entry.versions?.[0];
|
|
15853
16029
|
const requiredDefaults = [];
|
|
15854
16030
|
for (const prop of version?.spec ?? []) {
|
|
@@ -15867,16 +16043,35 @@ async function buildKindResolver(metadataReader) {
|
|
|
15867
16043
|
}
|
|
15868
16044
|
}
|
|
15869
16045
|
}
|
|
16046
|
+
const takesFreeFormType = type !== undefined && type.trim() !== "" && subtypes.length === 0 && TYPE_IS_IDENTITY_REPLACE_OPTIONS.has(String(version?.replaceOption));
|
|
15870
16047
|
const resolved = {
|
|
15871
16048
|
type: entry.type,
|
|
15872
16049
|
virtualizable: version?.supportsInLineCreation ?? false,
|
|
15873
16050
|
requiredDefaults,
|
|
15874
|
-
specProperties
|
|
16051
|
+
specProperties,
|
|
16052
|
+
subtypes,
|
|
16053
|
+
typeMatched: type === undefined || matched !== undefined || takesFreeFormType
|
|
15875
16054
|
};
|
|
15876
16055
|
cache.set(cacheKey, resolved);
|
|
15877
16056
|
return resolved;
|
|
15878
16057
|
};
|
|
15879
16058
|
}
|
|
16059
|
+
function formatResourceSubtypes(subtypes) {
|
|
16060
|
+
return subtypes.map((subtype) => {
|
|
16061
|
+
const alias = mapSolutionToResourceSubtype(subtype);
|
|
16062
|
+
return alias && alias.toLowerCase() !== subtype.toLowerCase() ? `${subtype} (${alias})` : subtype;
|
|
16063
|
+
}).join(", ");
|
|
16064
|
+
}
|
|
16065
|
+
function sameResourceSubtype(a, b) {
|
|
16066
|
+
if (a === undefined || b === undefined)
|
|
16067
|
+
return false;
|
|
16068
|
+
if (a.toLowerCase() === b.toLowerCase())
|
|
16069
|
+
return true;
|
|
16070
|
+
return mapSolutionToResourceSubtype(a)?.toLowerCase() === mapSolutionToResourceSubtype(b)?.toLowerCase();
|
|
16071
|
+
}
|
|
16072
|
+
function findSubtypeEntry(list, type) {
|
|
16073
|
+
return list.find((r) => !!r.type && sameResourceSubtype(r.type, type));
|
|
16074
|
+
}
|
|
15880
16075
|
function resolveBindingResourceIdentity(binding) {
|
|
15881
16076
|
switch (binding.resourceType) {
|
|
15882
16077
|
case models_BindingsResourceType.TimeTrigger:
|
|
@@ -16189,14 +16384,18 @@ async function findResourceByKeyInRcs(builder, kind, expectedKey, folderPath, pr
|
|
|
16189
16384
|
return;
|
|
16190
16385
|
}
|
|
16191
16386
|
async function searchRcsResources(builder, kind, name) {
|
|
16387
|
+
const [searchError, matches] = await catchError(searchRcsResourcesStrict(builder, kind, name));
|
|
16388
|
+
if (searchError) {
|
|
16389
|
+
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
16390
|
+
return [];
|
|
16391
|
+
}
|
|
16392
|
+
return matches;
|
|
16393
|
+
}
|
|
16394
|
+
async function searchRcsResourcesStrict(builder, kind, name) {
|
|
16192
16395
|
let pageCursor;
|
|
16193
16396
|
const allMatches = [];
|
|
16194
16397
|
do {
|
|
16195
|
-
const
|
|
16196
|
-
if (searchError) {
|
|
16197
|
-
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
16198
|
-
return [];
|
|
16199
|
-
}
|
|
16398
|
+
const result = await builder.searchResourcesAsync(kind, undefined, name, pageCursor, 50, undefined, false);
|
|
16200
16399
|
for (const folderResources of result.availableResources) {
|
|
16201
16400
|
const matches = folderResources.resources.filter((r) => r.name.toLowerCase() === name.toLowerCase());
|
|
16202
16401
|
for (const match of matches) {
|
|
@@ -16250,7 +16449,13 @@ async function resolveResourceKindMetadata(services, kind, type) {
|
|
|
16250
16449
|
}
|
|
16251
16450
|
async function createLocalResource(params) {
|
|
16252
16451
|
const { builder, services, kind, type, name } = params;
|
|
16452
|
+
if (type !== undefined && type.trim() === "") {
|
|
16453
|
+
throw new Error(`Type for kind ${kind} is empty.`);
|
|
16454
|
+
}
|
|
16253
16455
|
const metadata = await resolveResourceKindMetadata(services, kind, type);
|
|
16456
|
+
if (type !== undefined && metadata && !metadata.typeMatched) {
|
|
16457
|
+
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.`);
|
|
16458
|
+
}
|
|
16254
16459
|
const minted = await mintVirtualResource(builder, kind, metadata?.type ?? type, name, metadata);
|
|
16255
16460
|
if (!minted?.resource)
|
|
16256
16461
|
return;
|
|
@@ -16496,6 +16701,96 @@ async function resourceRefreshAsync(solutionPath = ".", options = {}) {
|
|
|
16496
16701
|
warnings: [...resolverWarnings, ...result.warnings]
|
|
16497
16702
|
};
|
|
16498
16703
|
}
|
|
16704
|
+
// ../solution-sdk/src/resources/services/remote-resources.ts
|
|
16705
|
+
function getRemoteResourceClients(services) {
|
|
16706
|
+
return {
|
|
16707
|
+
catalog: services.container.resolve(Tokens.IResourceCatalogClientProxy),
|
|
16708
|
+
importer: services.container.resolve(Tokens.IImportResourceHelper)
|
|
16709
|
+
};
|
|
16710
|
+
}
|
|
16711
|
+
async function findCatalogEntityAsync(catalog, query, match) {
|
|
16712
|
+
let pageCursor;
|
|
16713
|
+
do {
|
|
16714
|
+
const page = await catalog.searchFolderEntities({
|
|
16715
|
+
...query,
|
|
16716
|
+
pageSize: 100,
|
|
16717
|
+
pageCursor
|
|
16718
|
+
});
|
|
16719
|
+
const found = (page.items ?? []).find(match);
|
|
16720
|
+
if (found) {
|
|
16721
|
+
return found;
|
|
16722
|
+
}
|
|
16723
|
+
pageCursor = page.nextPage ?? undefined;
|
|
16724
|
+
} while (pageCursor);
|
|
16725
|
+
return;
|
|
16726
|
+
}
|
|
16727
|
+
function toResourceReference(entity) {
|
|
16728
|
+
return toCatalogReference({
|
|
16729
|
+
kind: entity.entityType ?? "",
|
|
16730
|
+
type: entity.entitySubType ?? undefined,
|
|
16731
|
+
key: entity.entityKey ?? "",
|
|
16732
|
+
name: entity.entityName ?? undefined,
|
|
16733
|
+
folderPath: entity.fullyQualifiedName ?? undefined,
|
|
16734
|
+
folderKey: entity.folderKey ?? undefined
|
|
16735
|
+
});
|
|
16736
|
+
}
|
|
16737
|
+
function toCatalogReference(reference) {
|
|
16738
|
+
const { folderPath, folderKey, ...rest } = reference;
|
|
16739
|
+
return {
|
|
16740
|
+
...rest,
|
|
16741
|
+
folder: folderPath ? { fullyQualifiedName: folderPath, folderKey } : undefined
|
|
16742
|
+
};
|
|
16743
|
+
}
|
|
16744
|
+
async function exportResourceDefinitionAsync(importer, reference) {
|
|
16745
|
+
const payload = await importer.exportResourceAsync(reference);
|
|
16746
|
+
return payload.resourceDefinitions.find((d) => d.key === reference.key);
|
|
16747
|
+
}
|
|
16748
|
+
function readSpecProperty(spec, name) {
|
|
16749
|
+
if (!spec) {
|
|
16750
|
+
return;
|
|
16751
|
+
}
|
|
16752
|
+
if (spec[name] !== undefined) {
|
|
16753
|
+
return spec[name];
|
|
16754
|
+
}
|
|
16755
|
+
const lower = name.toLowerCase();
|
|
16756
|
+
const key = Object.keys(spec).find((k) => k.toLowerCase() === lower);
|
|
16757
|
+
return key === undefined ? undefined : spec[key];
|
|
16758
|
+
}
|
|
16759
|
+
// ../solution-sdk/src/resources/services/resource-name.ts
|
|
16760
|
+
var MAX_RESOURCE_NAME_LENGTH = 256;
|
|
16761
|
+
var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
|
|
16762
|
+
function hasControlChar(value) {
|
|
16763
|
+
for (let i = 0;i < value.length; i++) {
|
|
16764
|
+
if (value.charCodeAt(i) < 32)
|
|
16765
|
+
return true;
|
|
16766
|
+
}
|
|
16767
|
+
return false;
|
|
16768
|
+
}
|
|
16769
|
+
function validateResourceName(name, options = {}) {
|
|
16770
|
+
const optionName = options.optionName ?? "--name";
|
|
16771
|
+
if (name.trim() === "") {
|
|
16772
|
+
return {
|
|
16773
|
+
ok: false,
|
|
16774
|
+
message: `${optionName} must not be blank`,
|
|
16775
|
+
instructions: "Pass a non-empty resource name."
|
|
16776
|
+
};
|
|
16777
|
+
}
|
|
16778
|
+
if (name.length > MAX_RESOURCE_NAME_LENGTH) {
|
|
16779
|
+
return {
|
|
16780
|
+
ok: false,
|
|
16781
|
+
message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH}-character limit (got ${name.length})`,
|
|
16782
|
+
instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
|
|
16783
|
+
};
|
|
16784
|
+
}
|
|
16785
|
+
if (UNSAFE_NAME_CHARS.test(name) || hasControlChar(name)) {
|
|
16786
|
+
return {
|
|
16787
|
+
ok: false,
|
|
16788
|
+
message: `${optionName} contains unsafe characters`,
|
|
16789
|
+
instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
|
|
16790
|
+
};
|
|
16791
|
+
}
|
|
16792
|
+
return { ok: true };
|
|
16793
|
+
}
|
|
16499
16794
|
// ../solution-sdk/src/resources/services/resource-remote-sync.ts
|
|
16500
16795
|
var NOT_FOUND_PATTERN = /not found/i;
|
|
16501
16796
|
async function resourceRemoteSyncAsync(solutionPath = ".", resourceKey, options = {}) {
|
|
@@ -16673,6 +16968,6 @@ function sortKeysDeep(value) {
|
|
|
16673
16968
|
}
|
|
16674
16969
|
return sorted;
|
|
16675
16970
|
}
|
|
16676
|
-
export { Tokens, models_BindingsResourceType, getResourceName, getFolderPathProperty, getResourceKindForBinding, assertSolutionManifest, computeEntryPointSpec, applyEntryPointEnhancementAsync, createResourceBuilderServices, findProjectFile, isProjectManifestError, isMissingProjectTypeError, readProjectFile, readSolutionFile, resolveSolutionFilePath, writeSolutionFile, restoreSolutionFile, createProjectInSolutionBuilder, normalizeFolderPath, findMatchingLocalResource, addProjectArtifactsToSolutionAsync, hasBareTemplateRow, hasAnyTemplateRow, saveCasingNormalized, normalizeResourceFileCasing, syncResourcesFromBindings, findResourceByKeyInRcs, searchRcsResources, findResourceInRcs, createResourceKindMetadataResolver, createLocalResource, readUipxProjects, syncAndLog, resourceRefreshAsync, resourceRemoteSyncAsync };
|
|
16971
|
+
export { Tokens, models_BindingsResourceType, getResourceName, getFolderPathProperty, getResourceKindForBinding, assertSolutionManifest, computeEntryPointSpec, applyEntryPointEnhancementAsync, createResourceBuilderServices, findProjectFile, isProjectManifestError, isMissingProjectTypeError, readProjectFile, readSolutionFile, resolveSolutionFilePath, writeSolutionFile, restoreSolutionFile, createProjectInSolutionBuilder, normalizeFolderPath, findMatchingLocalResource, addProjectArtifactsToSolutionAsync, hasBareTemplateRow, hasAnyTemplateRow, getRemoteResourceClients, findCatalogEntityAsync, toResourceReference, exportResourceDefinitionAsync, readSpecProperty, saveCasingNormalized, normalizeResourceFileCasing, validateResourceName, formatResourceSubtypes, sameResourceSubtype, syncResourcesFromBindings, findResourceByKeyInRcs, searchRcsResources, findResourceInRcs, createResourceKindMetadataResolver, resolveResourceKindMetadata, createLocalResource, readUipxProjects, syncAndLog, resourceRefreshAsync, resourceRemoteSyncAsync };
|
|
16677
16972
|
|
|
16678
|
-
//# debugId=
|
|
16973
|
+
//# debugId=904D1D8AE5997B9964756E2164756E21
|