@uipath/vertical-solutions-tool 1.205.0-preview.285 → 1.205.0-preview.293
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/{deploy-service-sw07r91b.js → deploy-service-y6b0xktz.js} +2 -2
- package/dist/{deployment-search-nagn1x54.js → deployment-search-pjmncg9m.js} +3 -3
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-hcyf111w.js} +16 -16
- package/dist/{index-8s9dxpj4.js → index-8n8hqn9w.js} +219 -70
- package/dist/{index-kmp9fmhb.js → index-dztdhj14.js} +1 -1
- package/dist/{index-mm28mn6q.js → index-v8j56yh4.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{resume-service-3g7zrgfb.js → resume-service-0cpq09nq.js} +1 -1
- package/dist/{seed-service-nn7c7mza.js → seed-service-e70g9ncd.js} +2 -2
- package/dist/{solution-deployments-ncsf4rx9.js → solution-deployments-wgjagvaq.js} +1 -1
- package/dist/{tool-t3h5sykq.js → tool-9yq7et75.js} +3 -3
- package/dist/{tool-n9tdp599.js → tool-fw2kxtq9.js} +5 -5
- package/dist/{tool-gdtpsdn7.js → tool-j98qvwdt.js} +8 -2
- package/dist/{tool-t3s8y8s5.js → tool-kkx89tyx.js} +3 -3
- package/dist/tool.js +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
JsonSerializerNames,
|
|
12
12
|
JsonSerializerProxy,
|
|
13
13
|
StreamSerializer
|
|
14
|
-
} from "./tool-
|
|
14
|
+
} from "./tool-j98qvwdt.js";
|
|
15
15
|
import {
|
|
16
16
|
FirstPartyServiceApi
|
|
17
17
|
} from "./tool-53w8skv5.js";
|
|
@@ -3639,6 +3639,7 @@ var ErrorCodes = {
|
|
|
3639
3639
|
ResourceAttributeMismatch: "2023",
|
|
3640
3640
|
AppSystemNameConflict: "2024",
|
|
3641
3641
|
InvalidResourceFile: "2025",
|
|
3642
|
+
DuplicatePackageName: "2026",
|
|
3642
3643
|
ResourceNotFound: "1000",
|
|
3643
3644
|
ResourceAlreadyExists: "Resources.ResourceAlreadyExists",
|
|
3644
3645
|
ResourceDependencyNotFound: "Resources.ResourceDependencyNotFound",
|
|
@@ -4167,6 +4168,30 @@ function getPackageType(processResourceType) {
|
|
|
4167
4168
|
return processResourceType;
|
|
4168
4169
|
return processTypeToPackageTypeMap[processResourceType.toLowerCase()] ?? processResourceType;
|
|
4169
4170
|
}
|
|
4171
|
+
function generatePackageName(solutionName, projectName, processResourceType) {
|
|
4172
|
+
const packageType = getPackageType(processResourceType) ?? "";
|
|
4173
|
+
const truncateCharsNo = Math.floor((PACKAGE_NAME_MAX_LENGTH - PACKAGE_NAME_SEPARATION_CHARS - packageType.length) / 2);
|
|
4174
|
+
return sanitizeNuGetPackageName(`${truncate(solutionName, truncateCharsNo)}.${packageType}.${truncate(projectName, truncateCharsNo)}`);
|
|
4175
|
+
}
|
|
4176
|
+
function resolvePackageNameAfterRename(processResource, solutionName, projectName, oldSolutionName, oldProjectName) {
|
|
4177
|
+
const currentPackageName = processResource.spec?.[WellKnownPropertyNames.PackageName];
|
|
4178
|
+
if (!solutionName)
|
|
4179
|
+
return currentPackageName ?? undefined;
|
|
4180
|
+
const oldGeneratedPackageName = generatePackageName(oldSolutionName ?? "", oldProjectName ?? processResource.name, processResource.type);
|
|
4181
|
+
return currentPackageName && currentPackageName.toLowerCase() !== oldGeneratedPackageName.toLowerCase() ? currentPackageName : generatePackageName(solutionName, projectName, processResource.type);
|
|
4182
|
+
}
|
|
4183
|
+
function findPackageNameConflict(solution, projectKey, solutionName, packageName) {
|
|
4184
|
+
if (!packageName)
|
|
4185
|
+
return;
|
|
4186
|
+
const wanted = packageName.toLowerCase();
|
|
4187
|
+
return solution.resources.find((resource) => resource.projectKey !== undefined && resource.projectKey !== projectKey && resource.kind.toLowerCase() === WellKnownProjectType.Process.toLowerCase() && effectivePackageName(resource, solutionName)?.toLowerCase() === wanted);
|
|
4188
|
+
}
|
|
4189
|
+
function effectivePackageName(processResource, solutionName) {
|
|
4190
|
+
const packageName = processResource.spec?.[WellKnownPropertyNames.PackageName];
|
|
4191
|
+
if (packageName)
|
|
4192
|
+
return packageName;
|
|
4193
|
+
return solutionName ? generatePackageName(solutionName, processResource.name, processResource.type) : undefined;
|
|
4194
|
+
}
|
|
4170
4195
|
function changePackageName(processResource, solutionName, projectName, oldSolutionName, oldProjectName) {
|
|
4171
4196
|
if (!solutionName)
|
|
4172
4197
|
return false;
|
|
@@ -4175,11 +4200,9 @@ function changePackageName(processResource, solutionName, projectName, oldSoluti
|
|
|
4175
4200
|
spec[WellKnownPropertyNames.PackageName] = null;
|
|
4176
4201
|
processResource.spec = spec;
|
|
4177
4202
|
const currentPackageName = spec[WellKnownPropertyNames.PackageName];
|
|
4178
|
-
const
|
|
4179
|
-
const truncateCharsNo = Math.floor((PACKAGE_NAME_MAX_LENGTH - PACKAGE_NAME_SEPARATION_CHARS - packageType.length) / 2);
|
|
4180
|
-
const newPackageName = sanitizeNuGetPackageName(`${truncate(solutionName, truncateCharsNo)}.${packageType}.${truncate(projectName, truncateCharsNo)}`);
|
|
4203
|
+
const newPackageName = generatePackageName(solutionName, projectName, processResource.type);
|
|
4181
4204
|
const projectNameForOldPackage = oldProjectName ?? processResource.name;
|
|
4182
|
-
const oldGeneratedPackageName =
|
|
4205
|
+
const oldGeneratedPackageName = generatePackageName(oldSolutionName ?? "", projectNameForOldPackage, processResource.type);
|
|
4183
4206
|
if (!currentPackageName || currentPackageName.toLowerCase() === oldGeneratedPackageName.toLowerCase()) {
|
|
4184
4207
|
spec[WellKnownPropertyNames.PackageName] = newPackageName;
|
|
4185
4208
|
renamePackageDependencies(processResource, projectNameForOldPackage, projectName);
|
|
@@ -4390,8 +4413,15 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
4390
4413
|
return withFileOperationTimeout2(provider, resolveFileOperationTimeoutMs(this.options));
|
|
4391
4414
|
}
|
|
4392
4415
|
async readAsync(context, cancellationToken) {
|
|
4416
|
+
return this.readWithKindsAsync(context, undefined, cancellationToken);
|
|
4417
|
+
}
|
|
4418
|
+
async readKindsAsync(context, kinds, cancellationToken) {
|
|
4419
|
+
return this.readWithKindsAsync(context, context.isReadOnly ? kinds : undefined, cancellationToken);
|
|
4420
|
+
}
|
|
4421
|
+
async readWithKindsAsync(context, kinds, cancellationToken) {
|
|
4393
4422
|
this.logger.info("Reading multi-file solution definition for solution %s", context.path);
|
|
4394
4423
|
const loadStarted = nowMs();
|
|
4424
|
+
let listedFileCount = 0;
|
|
4395
4425
|
let fileCount = 0;
|
|
4396
4426
|
let listMs = 0;
|
|
4397
4427
|
let readStarted = loadStarted;
|
|
@@ -4429,9 +4459,11 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
4429
4459
|
loaded: loadedCount,
|
|
4430
4460
|
missing: missingFiles.length,
|
|
4431
4461
|
invalid: invalidFiles.length,
|
|
4432
|
-
parseErrors: parseErrors.length
|
|
4462
|
+
parseErrors: parseErrors.length,
|
|
4463
|
+
kinds: kinds?.join(",") ?? "*",
|
|
4464
|
+
listedFileCount
|
|
4433
4465
|
};
|
|
4434
|
-
const message = `Solution read ${outcome} for solution ${context.path}: ${metrics.fileCount} files in ${metrics.totalMs} ms (list ${metrics.listMs} ms, read ${metrics.readWallMs} ms wall, io ${metrics.ioMs} ms summed, max file io ${metrics.maxFileIoMs} ms, parse ${metrics.parseMs} ms, hash ${metrics.hashMs} ms, merge ${metrics.mergeMs} ms); ${metrics.chars} chars; parallelism ${metrics.degreeOfParallelism}; readOnly ${metrics.isReadOnly}; loaded ${metrics.loaded}, missing ${metrics.missing}, invalid ${metrics.invalid}, parseErrors ${metrics.parseErrors}`;
|
|
4466
|
+
const message = `Solution read ${outcome} for solution ${context.path}: ${metrics.fileCount} files in ${metrics.totalMs} ms (list ${metrics.listMs} ms, read ${metrics.readWallMs} ms wall, io ${metrics.ioMs} ms summed, max file io ${metrics.maxFileIoMs} ms, parse ${metrics.parseMs} ms, hash ${metrics.hashMs} ms, merge ${metrics.mergeMs} ms); ${metrics.chars} chars; parallelism ${metrics.degreeOfParallelism}; readOnly ${metrics.isReadOnly}; loaded ${metrics.loaded}, missing ${metrics.missing}, invalid ${metrics.invalid}, parseErrors ${metrics.parseErrors}; kinds ${metrics.kinds}, listed ${metrics.listedFileCount}`;
|
|
4435
4467
|
if (outcome === "Success")
|
|
4436
4468
|
this.logger.info(message, metrics);
|
|
4437
4469
|
else
|
|
@@ -4457,8 +4489,11 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
4457
4489
|
tree.length = 0;
|
|
4458
4490
|
}
|
|
4459
4491
|
const listStarted = nowMs();
|
|
4460
|
-
const
|
|
4492
|
+
const listedFiles = await fileStorageProvider.getFilesAsync(SolutionConstants.RESOURCE_FILES_FOLDER_NAME, "*.json", cancellationToken);
|
|
4461
4493
|
listMs = nowMs() - listStarted;
|
|
4494
|
+
listedFileCount = listedFiles.length;
|
|
4495
|
+
const wantedKinds = kinds && new Set(kinds.map((k) => k.toLowerCase()));
|
|
4496
|
+
const resourceFiles = wantedKinds === undefined ? listedFiles : listedFiles.filter((resourceFile) => MultiFileSolutionDefinitionProvider.mayHoldAnyKind(resourceFile, wantedKinds));
|
|
4462
4497
|
fileCount = resourceFiles.length;
|
|
4463
4498
|
readStarted = nowMs();
|
|
4464
4499
|
const readResults = await this.readResourceFilesAsync(context, fileStorageProvider, resourceFiles, cancellationToken);
|
|
@@ -4701,6 +4736,10 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
4701
4736
|
};
|
|
4702
4737
|
}
|
|
4703
4738
|
}
|
|
4739
|
+
static mayHoldAnyKind(resourceFile, lowerCaseKinds) {
|
|
4740
|
+
const segments = resourceFile.replace(/\\/g, "/").split("/").filter((s) => s.length > 0);
|
|
4741
|
+
return segments.slice(0, -1).some((segment) => lowerCaseKinds.has(segment.toLowerCase()));
|
|
4742
|
+
}
|
|
4704
4743
|
applyFolders(resource, resourceFile) {
|
|
4705
4744
|
const relPath = resourceFile.replace(/\\/g, "/");
|
|
4706
4745
|
const segments = relPath.split("/").filter((s) => s.length > 0);
|
|
@@ -4804,6 +4843,8 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
4804
4843
|
newPaths.forEach((value, key) => {
|
|
4805
4844
|
existingPaths.set(key, value);
|
|
4806
4845
|
});
|
|
4846
|
+
existingTree.length = 0;
|
|
4847
|
+
existingTree.push(...orderedResourceKeys);
|
|
4807
4848
|
}
|
|
4808
4849
|
async deleteFilesAsync(context, filesToDelete, cancellationToken) {
|
|
4809
4850
|
if (!filesToDelete || filesToDelete.length === 0 || context.isReadOnly)
|
|
@@ -5033,8 +5074,8 @@ class MultiFileSolutionDefinitionFactory {
|
|
|
5033
5074
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/embedded-files-default.js
|
|
5034
5075
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
5035
5076
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory: JsonSerializerFactory2 }] = await Promise.all([
|
|
5036
|
-
import("./embedded-file-reader-
|
|
5037
|
-
import("./index-
|
|
5077
|
+
import("./embedded-file-reader-hcyf111w.js"),
|
|
5078
|
+
import("./index-dztdhj14.js")
|
|
5038
5079
|
]);
|
|
5039
5080
|
return new EmbeddedFileReader(new JsonSerializerFactory2);
|
|
5040
5081
|
}
|
|
@@ -5648,7 +5689,103 @@ class BindingOverwritesMappingRequest {
|
|
|
5648
5689
|
}
|
|
5649
5690
|
}
|
|
5650
5691
|
|
|
5692
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/bindings/jit-debug-project-types.js
|
|
5693
|
+
var JIT_DEBUG_PROJECT_TYPES_FEATURE_FLAG = "FE.JitDebugProjectTypes";
|
|
5694
|
+
var PROCESS_KIND = "process";
|
|
5695
|
+
var BUSINESS_RULE_KIND = "businessrule";
|
|
5696
|
+
var APP_KIND = "app";
|
|
5697
|
+
var LOW_CODE_APP_PROJECT_TYPE = "webapp";
|
|
5698
|
+
var LOW_CODE_APP_TYPES = new Set([
|
|
5699
|
+
"workflow action"
|
|
5700
|
+
]);
|
|
5701
|
+
var CODED_APP_PROJECT_TYPE = "appv2";
|
|
5702
|
+
var CODED_APP_TYPES = new Set([
|
|
5703
|
+
"coded",
|
|
5704
|
+
"codedaction"
|
|
5705
|
+
]);
|
|
5706
|
+
var DEFAULT_PROCESS_PROJECT_TYPE = "process";
|
|
5707
|
+
var KNOWN_PROCESS_PROJECT_TYPES = new Set([
|
|
5708
|
+
DEFAULT_PROCESS_PROJECT_TYPE,
|
|
5709
|
+
"processorchestration",
|
|
5710
|
+
"agent",
|
|
5711
|
+
"api",
|
|
5712
|
+
"flow",
|
|
5713
|
+
"function",
|
|
5714
|
+
"casemanagement",
|
|
5715
|
+
"webapp",
|
|
5716
|
+
"businessrules"
|
|
5717
|
+
]);
|
|
5718
|
+
var BUSINESS_RULE_PROJECT_TYPE = "businessrules";
|
|
5719
|
+
function parseJitDebugProjectTypes(flagValue) {
|
|
5720
|
+
if (!flagValue || !flagValue.trim())
|
|
5721
|
+
return [];
|
|
5722
|
+
return flagValue.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
5723
|
+
}
|
|
5724
|
+
function solutionSupportsJitDebug(solution, flagValue) {
|
|
5725
|
+
const enabledProjectTypes = parseJitDebugProjectTypes(flagValue).map((t) => t.toLowerCase());
|
|
5726
|
+
if (enabledProjectTypes.length === 0)
|
|
5727
|
+
return false;
|
|
5728
|
+
return (solution.resources ?? []).filter((r) => (r.projectKey != null || r.isArtefactResource === true) && isDecisionKind(r.kind)).every((r) => enabledProjectTypes.some((projectType) => matches(projectType, r)));
|
|
5729
|
+
}
|
|
5730
|
+
function isDecisionKind(kind) {
|
|
5731
|
+
const normalized = (kind ?? "").toLowerCase();
|
|
5732
|
+
return normalized === PROCESS_KIND || normalized === BUSINESS_RULE_KIND || normalized === APP_KIND;
|
|
5733
|
+
}
|
|
5734
|
+
function matches(projectType, resource) {
|
|
5735
|
+
if ((resource.kind ?? "").toLowerCase() === BUSINESS_RULE_KIND)
|
|
5736
|
+
return projectType === BUSINESS_RULE_PROJECT_TYPE;
|
|
5737
|
+
if ((resource.kind ?? "").toLowerCase() === APP_KIND) {
|
|
5738
|
+
const appType = (resource.type ?? "").toLowerCase();
|
|
5739
|
+
if (appType === "" || LOW_CODE_APP_TYPES.has(appType))
|
|
5740
|
+
return projectType === LOW_CODE_APP_PROJECT_TYPE;
|
|
5741
|
+
return CODED_APP_TYPES.has(appType) && projectType === CODED_APP_PROJECT_TYPE;
|
|
5742
|
+
}
|
|
5743
|
+
const resourceType = (resource.type ?? "").toLowerCase();
|
|
5744
|
+
const processType = resourceType === "" ? DEFAULT_PROCESS_PROJECT_TYPE : resourceType;
|
|
5745
|
+
return !KNOWN_PROCESS_PROJECT_TYPES.has(processType) || projectType === processType;
|
|
5746
|
+
}
|
|
5747
|
+
|
|
5748
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/services/overwrites/models.js
|
|
5749
|
+
var models_ValidationSeverity = /* @__PURE__ */ function(ValidationSeverity) {
|
|
5750
|
+
ValidationSeverity["Warning"] = "Warning";
|
|
5751
|
+
ValidationSeverity["Critical"] = "Critical";
|
|
5752
|
+
return ValidationSeverity;
|
|
5753
|
+
}({});
|
|
5754
|
+
var models_OverwriteType = /* @__PURE__ */ function(OverwriteType) {
|
|
5755
|
+
OverwriteType["Install"] = "Install";
|
|
5756
|
+
OverwriteType["Reference"] = "Reference";
|
|
5757
|
+
return OverwriteType;
|
|
5758
|
+
}({});
|
|
5759
|
+
function createLocalizableMessage(key, ...args) {
|
|
5760
|
+
return {
|
|
5761
|
+
key,
|
|
5762
|
+
args: args.length > 0 ? args : undefined
|
|
5763
|
+
};
|
|
5764
|
+
}
|
|
5765
|
+
function createMissingRcsResources(missingKeys, error) {
|
|
5766
|
+
return {
|
|
5767
|
+
missingResourceKeys: missingKeys instanceof Set ? missingKeys : new Set(missingKeys),
|
|
5768
|
+
error
|
|
5769
|
+
};
|
|
5770
|
+
}
|
|
5771
|
+
function setValidationError(errors, resourceKey, dto) {
|
|
5772
|
+
const error = errors.get(resourceKey);
|
|
5773
|
+
if (error)
|
|
5774
|
+
dto.validationError = error;
|
|
5775
|
+
}
|
|
5776
|
+
var DebugOverwritesConstants = {
|
|
5777
|
+
ResourceOverwritesFileName: "debug_overwrites.json",
|
|
5778
|
+
CurrentOverwritesDocVersion: "1.0"
|
|
5779
|
+
};
|
|
5780
|
+
|
|
5651
5781
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/bindings/binding-overwrites-handler.js
|
|
5782
|
+
var FOLDER_KEY_RESOURCE_TYPES = new Set([
|
|
5783
|
+
models_BindingsResourceType.Entity,
|
|
5784
|
+
models_BindingsResourceType.Asset,
|
|
5785
|
+
models_BindingsResourceType.Queue,
|
|
5786
|
+
models_BindingsResourceType.Process
|
|
5787
|
+
]);
|
|
5788
|
+
|
|
5652
5789
|
class BindingOverwritesHandler {
|
|
5653
5790
|
async handleAsync(request, cancellationToken) {
|
|
5654
5791
|
if (request instanceof BindingOverwritesValidationCommand)
|
|
@@ -5663,6 +5800,10 @@ class BindingOverwritesHandler {
|
|
|
5663
5800
|
if (bindingResources.length === 0)
|
|
5664
5801
|
return {};
|
|
5665
5802
|
const result = {};
|
|
5803
|
+
const solution = await request.context.loadAsync(cancellationToken);
|
|
5804
|
+
const jitDebugProjectTypes = this.featureFlagProvider.getString(JIT_DEBUG_PROJECT_TYPES_FEATURE_FLAG, "");
|
|
5805
|
+
const emptyFolderPathForArtefacts = solutionSupportsJitDebug(solution, jitDebugProjectTypes);
|
|
5806
|
+
this.logger.info(`Binding overwrites for solution ${request.context.path}: JIT debug ${emptyFolderPathForArtefacts ? "on" : "off"} (FE.JitDebugProjectTypes = '${jitDebugProjectTypes}')`);
|
|
5666
5807
|
const resourceOverwrites = await this.resourceOverwritesService.getResourceOverwritesAsync(request.context, cancellationToken);
|
|
5667
5808
|
for (const bindingResource of bindingResources) {
|
|
5668
5809
|
const resourceOverwrite = resourceOverwrites.get(bindingResource.resourceKey.toLowerCase());
|
|
@@ -5675,13 +5816,15 @@ class BindingOverwritesHandler {
|
|
|
5675
5816
|
[BindingsKnownKeys.FolderKeyPropertyName]: resourceOverwrite.folderKey ?? ""
|
|
5676
5817
|
};
|
|
5677
5818
|
else {
|
|
5678
|
-
const
|
|
5819
|
+
const resolvesInDebugFolder = emptyFolderPathForArtefacts && bindingResource.isArtefactResource;
|
|
5820
|
+
const folderPath = resolvesInDebugFolder ? "" : resourceOverwrite.folderFullyQualifiedName ?? "";
|
|
5821
|
+
const name = resourceOverwrite.type === models_OverwriteType.Install && bindingResource.isArtefactResource && bindingResource.resourceName ? bindingResource.resourceName : resourceOverwrite.resourceName;
|
|
5679
5822
|
overwrite = {
|
|
5680
5823
|
[BindingsKnownKeys.FolderPathPropertyName]: folderPath,
|
|
5681
|
-
[BindingsKnownKeys.NamePropertyName]:
|
|
5824
|
+
[BindingsKnownKeys.NamePropertyName]: name
|
|
5682
5825
|
};
|
|
5683
|
-
if (bindingResource.binding.resourceType
|
|
5684
|
-
overwrite[BindingsKnownKeys.FolderKeyPropertyName] = resourceOverwrite.folderKey ?? "";
|
|
5826
|
+
if (FOLDER_KEY_RESOURCE_TYPES.has(bindingResource.binding.resourceType))
|
|
5827
|
+
overwrite[BindingsKnownKeys.FolderKeyPropertyName] = resolvesInDebugFolder ? "" : resourceOverwrite.folderKey ?? "";
|
|
5685
5828
|
}
|
|
5686
5829
|
const key = getOverrideKey(bindingResource.binding);
|
|
5687
5830
|
result[key] = overwrite;
|
|
@@ -5697,9 +5840,10 @@ class BindingOverwritesHandler {
|
|
|
5697
5840
|
throw new BadRequestException("Bindings.ValidationFailed", `Binding validation failed: ${failureMessages}`);
|
|
5698
5841
|
}
|
|
5699
5842
|
}
|
|
5700
|
-
constructor(mediator, resourceOverwritesService, loggerFactory) {
|
|
5843
|
+
constructor(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider) {
|
|
5701
5844
|
this.mediator = mediator;
|
|
5702
5845
|
this.resourceOverwritesService = resourceOverwritesService;
|
|
5846
|
+
this.featureFlagProvider = featureFlagProvider;
|
|
5703
5847
|
this.logger = loggerFactory.create("BindingOverwritesHandler");
|
|
5704
5848
|
}
|
|
5705
5849
|
}
|
|
@@ -5739,7 +5883,8 @@ class BindingOverwritesMappingRequestHandler {
|
|
|
5739
5883
|
binding: bindingsResource,
|
|
5740
5884
|
resourceKey: resource.key,
|
|
5741
5885
|
isArtefactResource: resource.projectKey != null,
|
|
5742
|
-
isCodedApp: bindingsResource.resourceType === models_BindingsResourceType.App && isCodedAppType(resource.type)
|
|
5886
|
+
isCodedApp: bindingsResource.resourceType === models_BindingsResourceType.App && isCodedAppType(resource.type),
|
|
5887
|
+
resourceName: resource.name
|
|
5743
5888
|
});
|
|
5744
5889
|
} else {
|
|
5745
5890
|
this.logger.error(`Solution does not contain binding resource of type ${models_BindingsResourceType[bindingsResource.resourceType]}.`);
|
|
@@ -5862,6 +6007,9 @@ class SolutionContext {
|
|
|
5862
6007
|
signal = forceOrSignal;
|
|
5863
6008
|
return this.doWithLockAsync((token) => this.internalLoadAsync(force, token), signal);
|
|
5864
6009
|
}
|
|
6010
|
+
async loadKindsAsync(kinds, cancellationToken) {
|
|
6011
|
+
return this.doWithLockAsync((token) => this.isReadOnly && this._definition === null && this._definitionProvider.readKindsAsync ? this._definitionProvider.readKindsAsync(this, kinds, token) : this.internalLoadAsync(false, token), cancellationToken);
|
|
6012
|
+
}
|
|
5865
6013
|
async getSolutionDefinitionAsync(cancellationToken) {
|
|
5866
6014
|
return this._definitionProvider.readAsync(this, cancellationToken);
|
|
5867
6015
|
}
|
|
@@ -5879,20 +6027,17 @@ class SolutionContext {
|
|
|
5879
6027
|
this.validateResourceDependencies(this._definition);
|
|
5880
6028
|
await this.deleteSavedFilesAsync(filesToDelete, token);
|
|
5881
6029
|
await this.internalSaveChanges(this._definition, token);
|
|
5882
|
-
this._definition = null;
|
|
5883
6030
|
}, signal);
|
|
5884
6031
|
else
|
|
5885
6032
|
await this.doWithLockAsync(async (token) => {
|
|
5886
6033
|
this.validateResourceDependencies(this._definition);
|
|
5887
6034
|
await this.internalSaveChanges(this._definition, token);
|
|
5888
|
-
this._definition = null;
|
|
5889
6035
|
}, signal);
|
|
5890
6036
|
}
|
|
5891
6037
|
async forceSaveChangesAsync(cancellationToken) {
|
|
5892
6038
|
await this.doWithLockAsync(async (token) => {
|
|
5893
6039
|
this.validateResourceDependencies(this._definition);
|
|
5894
6040
|
await this.internalSaveChanges(this._definition, token);
|
|
5895
|
-
this._definition = null;
|
|
5896
6041
|
}, cancellationToken);
|
|
5897
6042
|
}
|
|
5898
6043
|
async saveAsync(solution, cancellationToken) {
|
|
@@ -5903,7 +6048,7 @@ class SolutionContext {
|
|
|
5903
6048
|
this.validateResourceDependencies(solution);
|
|
5904
6049
|
await this.internalLoadAsync(false, token);
|
|
5905
6050
|
await this.internalSaveChanges(solution, token);
|
|
5906
|
-
this._definition =
|
|
6051
|
+
this._definition = solution;
|
|
5907
6052
|
}, cancellationToken);
|
|
5908
6053
|
}
|
|
5909
6054
|
toString() {
|
|
@@ -6984,39 +7129,6 @@ SettingsRequestHandler = _ts_decorate4([
|
|
|
6984
7129
|
])
|
|
6985
7130
|
], SettingsRequestHandler);
|
|
6986
7131
|
|
|
6987
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/services/overwrites/models.js
|
|
6988
|
-
var models_ValidationSeverity = /* @__PURE__ */ function(ValidationSeverity) {
|
|
6989
|
-
ValidationSeverity["Warning"] = "Warning";
|
|
6990
|
-
ValidationSeverity["Critical"] = "Critical";
|
|
6991
|
-
return ValidationSeverity;
|
|
6992
|
-
}({});
|
|
6993
|
-
var models_OverwriteType = /* @__PURE__ */ function(OverwriteType) {
|
|
6994
|
-
OverwriteType["Install"] = "Install";
|
|
6995
|
-
OverwriteType["Reference"] = "Reference";
|
|
6996
|
-
return OverwriteType;
|
|
6997
|
-
}({});
|
|
6998
|
-
function createLocalizableMessage(key, ...args) {
|
|
6999
|
-
return {
|
|
7000
|
-
key,
|
|
7001
|
-
args: args.length > 0 ? args : undefined
|
|
7002
|
-
};
|
|
7003
|
-
}
|
|
7004
|
-
function createMissingRcsResources(missingKeys, error) {
|
|
7005
|
-
return {
|
|
7006
|
-
missingResourceKeys: missingKeys instanceof Set ? missingKeys : new Set(missingKeys),
|
|
7007
|
-
error
|
|
7008
|
-
};
|
|
7009
|
-
}
|
|
7010
|
-
function setValidationError(errors, resourceKey, dto) {
|
|
7011
|
-
const error = errors.get(resourceKey);
|
|
7012
|
-
if (error)
|
|
7013
|
-
dto.validationError = error;
|
|
7014
|
-
}
|
|
7015
|
-
var DebugOverwritesConstants = {
|
|
7016
|
-
ResourceOverwritesFileName: "debug_overwrites.json",
|
|
7017
|
-
CurrentOverwritesDocVersion: "1.0"
|
|
7018
|
-
};
|
|
7019
|
-
|
|
7020
7132
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/mappings/resource-subtype-mapper.js
|
|
7021
7133
|
var solutionsSubtypesMap = {
|
|
7022
7134
|
Text: "stringAsset",
|
|
@@ -8357,8 +8469,8 @@ class SolutionDefinitionHelper {
|
|
|
8357
8469
|
if (references.length === 0)
|
|
8358
8470
|
continue;
|
|
8359
8471
|
const referenceKind = refProp["referenceKind"];
|
|
8360
|
-
const
|
|
8361
|
-
const filtered = references.filter((r) => !
|
|
8472
|
+
const matches2 = (ref) => ref.name != null && invariantEquals(resource.name, ref.name) && referenceKind != null && invariantEquals(referenceKind, resource.kind);
|
|
8473
|
+
const filtered = references.filter((r) => !matches2(r));
|
|
8362
8474
|
if (filtered.length !== references.length)
|
|
8363
8475
|
spec[refProp.property] = isSingleReferenceProperty(refProp) ? filtered[0] ?? null : filtered;
|
|
8364
8476
|
}
|
|
@@ -8505,7 +8617,9 @@ class ResourcesSearchRequestHandler {
|
|
|
8505
8617
|
async getSolutionResourcesAsync(request, cancellationToken) {
|
|
8506
8618
|
if (request.pageSize <= 0 || !request.includeSolutionResources)
|
|
8507
8619
|
return null;
|
|
8508
|
-
const solution = await request.context.
|
|
8620
|
+
const solution = await (request.context.loadKindsAsync?.([
|
|
8621
|
+
request.kind
|
|
8622
|
+
], cancellationToken) ?? request.context.loadAsync(cancellationToken));
|
|
8509
8623
|
let resources = solution.resources.filter((x) => !x.projectKey || request.projectKey && x.projectKey !== request.projectKey).filter((x) => x.kind.toLowerCase() === request.kind.toLowerCase()).filter((x) => !request.types || request.types.some((t) => t.toLowerCase() === x.type?.toLowerCase())).filter((x) => !request.searchTerm || x.name.toLowerCase().includes(request.searchTerm.toLowerCase()));
|
|
8510
8624
|
if (request.cursor?.pageDirection === internal_InternalPageDirection.Previous) {
|
|
8511
8625
|
if (request.cursor.name) {
|
|
@@ -10004,6 +10118,7 @@ class GenerateArtefactResourcesCommandHandler {
|
|
|
10004
10118
|
apiVersion: metadataVersion.version.uri,
|
|
10005
10119
|
name: command.projectName,
|
|
10006
10120
|
projectKey: command.projectKey,
|
|
10121
|
+
isArtefactResource: !!command.projectKey,
|
|
10007
10122
|
folders: [],
|
|
10008
10123
|
files: []
|
|
10009
10124
|
};
|
|
@@ -13693,7 +13808,7 @@ class ProjectCreateCommandHandler {
|
|
|
13693
13808
|
const solution = await command.context.loadAsync(cancellationToken);
|
|
13694
13809
|
const resourceIdentifiers = new Set(this.projectConfigurationReader.getTemplateResourcesByType(command.type, command.subType, true).map((r) => JSON.stringify(r)));
|
|
13695
13810
|
const projectResources = solution.resources.filter((x) => x.projectKey === command.projectKey);
|
|
13696
|
-
const duplicateProject = solution.resources.find((r) => r.
|
|
13811
|
+
const duplicateProject = solution.resources.find((r) => r.projectKey !== undefined && r.projectKey !== command.projectKey && r.name.toLowerCase() === command.name.toLowerCase());
|
|
13697
13812
|
if (duplicateProject) {
|
|
13698
13813
|
this.logger.error("Project name already exists", undefined, {
|
|
13699
13814
|
projectName: command.name,
|
|
@@ -13702,15 +13817,16 @@ class ProjectCreateCommandHandler {
|
|
|
13702
13817
|
throw new BadRequestException("Project.DuplicateProjectName", "Project name already exists");
|
|
13703
13818
|
}
|
|
13704
13819
|
if (projectResources.length === 0)
|
|
13705
|
-
await this.
|
|
13820
|
+
this.addArtefacts(command, solution, await this.generateAndValidateArtefacts(command, solution, cancellationToken));
|
|
13706
13821
|
else {
|
|
13707
13822
|
const existingResourceIdentifiers = new Set(projectResources.map((x) => JSON.stringify(toResourceIdentifier2(x))));
|
|
13708
13823
|
const needsRegeneration = existingResourceIdentifiers.size !== resourceIdentifiers.size || [
|
|
13709
13824
|
...resourceIdentifiers
|
|
13710
13825
|
].some((id) => !existingResourceIdentifiers.has(id));
|
|
13711
13826
|
if (needsRegeneration) {
|
|
13827
|
+
const artefacts = await this.generateAndValidateArtefacts(command, solution, cancellationToken);
|
|
13712
13828
|
await this.removeExistingProjectResources(command, cancellationToken);
|
|
13713
|
-
|
|
13829
|
+
this.addArtefacts(command, solution, artefacts);
|
|
13714
13830
|
} else if (projectResources.some((x) => x.name !== command.name))
|
|
13715
13831
|
await this.mediator.sendCommandAsync(new ProjectEditCommand(command.context, command.projectKey, {
|
|
13716
13832
|
name: command.name,
|
|
@@ -13720,13 +13836,13 @@ class ProjectCreateCommandHandler {
|
|
|
13720
13836
|
}
|
|
13721
13837
|
await command.context.saveChangesAsync(cancellationToken);
|
|
13722
13838
|
}
|
|
13723
|
-
async
|
|
13839
|
+
async generateAndValidateArtefacts(command, solution, cancellationToken) {
|
|
13724
13840
|
this.logger.info("Generate artefact resources for project", {
|
|
13725
13841
|
projectName: command.name,
|
|
13726
13842
|
projectKey: command.projectKey
|
|
13727
13843
|
});
|
|
13728
13844
|
const artefactResources = await this.mediator.sendCommandAsync(new GenerateArtefactResourcesCommand(command.context, command.name, command.type, command.projectKey, command.subType), cancellationToken);
|
|
13729
|
-
const existingConflictResource = solution.resources.find((r) =>
|
|
13845
|
+
const existingConflictResource = solution.resources.find((r) => r.projectKey === undefined && r.name.toLowerCase() === command.name.toLowerCase() && artefactResources.some((pr) => r.kind.toLowerCase() === pr.kind.toLowerCase()));
|
|
13730
13846
|
if (existingConflictResource) {
|
|
13731
13847
|
this.logger.error("Resource name conflict", undefined, {
|
|
13732
13848
|
context: command.context,
|
|
@@ -13735,6 +13851,23 @@ class ProjectCreateCommandHandler {
|
|
|
13735
13851
|
});
|
|
13736
13852
|
throw new BadRequestException("Resources.DuplicateResourceName", `Solution already contains a ${existingConflictResource.kind} resource named "${existingConflictResource.name}"`);
|
|
13737
13853
|
}
|
|
13854
|
+
for (const artefact of artefactResources) {
|
|
13855
|
+
if (artefact.kind.toLowerCase() !== WellKnownProjectType.Process.toLowerCase())
|
|
13856
|
+
continue;
|
|
13857
|
+
const packageName = resolvePackageNameAfterRename(artefact, command.solutionName, command.name, command.solutionName);
|
|
13858
|
+
const conflictingProject = findPackageNameConflict(solution, command.projectKey, command.solutionName, packageName);
|
|
13859
|
+
if (conflictingProject) {
|
|
13860
|
+
this.logger.error("Package name conflict", undefined, {
|
|
13861
|
+
context: command.context,
|
|
13862
|
+
packageName,
|
|
13863
|
+
conflictingProject: conflictingProject.name
|
|
13864
|
+
});
|
|
13865
|
+
throw new BadRequestException(ErrorCodes.Resources.DuplicatePackageName, `The name '${command.name}' would publish under the same package name as project '${conflictingProject.name}': '${packageName}'. Long names are shortened when the package name is composed, so choose a name that differs earlier.`);
|
|
13866
|
+
}
|
|
13867
|
+
}
|
|
13868
|
+
return artefactResources;
|
|
13869
|
+
}
|
|
13870
|
+
addArtefacts(command, solution, artefactResources) {
|
|
13738
13871
|
for (const artefact of artefactResources) {
|
|
13739
13872
|
if (artefact.kind.toLowerCase() === WellKnownProjectType.Process.toLowerCase())
|
|
13740
13873
|
changePackageName(artefact, command.solutionName, command.name, command.solutionName);
|
|
@@ -13775,18 +13908,32 @@ class ProjectEditCommandHandler {
|
|
|
13775
13908
|
const newProjectName = command.projectDetails.name.trim();
|
|
13776
13909
|
const projectDescription = command.projectDetails.description;
|
|
13777
13910
|
const solutionName = command.projectDetails.solutionName;
|
|
13778
|
-
const duplicateProject = solution.resources.find((r) => r.
|
|
13911
|
+
const duplicateProject = solution.resources.find((r) => r.projectKey !== undefined && r.projectKey !== command.projectKey && r.name.toLowerCase() === newProjectName.toLowerCase());
|
|
13779
13912
|
if (duplicateProject) {
|
|
13780
13913
|
this.logger.error("Project name already exists");
|
|
13781
13914
|
throw new BadRequestException(ErrorCodes.Resources.DuplicateResourceName, "Project name already exists");
|
|
13782
13915
|
}
|
|
13783
|
-
const existingConflictResource = solution.resources.find((r) =>
|
|
13916
|
+
const existingConflictResource = solution.resources.find((r) => r.projectKey === undefined && r.name.toLowerCase() === newProjectName.toLowerCase() && projectResources.some((pr) => r.kind.toLowerCase() === pr.kind.toLowerCase()));
|
|
13784
13917
|
if (existingConflictResource) {
|
|
13785
13918
|
this.logger.error("Solution already contains resource of kind with same name");
|
|
13786
13919
|
throw new BadRequestException(ErrorCodes.Resources.DuplicateResourceName, `Solution already contains a ${existingConflictResource.kind} resource named "${existingConflictResource.name}"`);
|
|
13787
13920
|
}
|
|
13788
13921
|
const firstProjectResource = projectResources[0];
|
|
13789
13922
|
const oldProjectName = firstProjectResource ? firstProjectResource.name : "";
|
|
13923
|
+
for (const resource of projectResources) {
|
|
13924
|
+
if (resource.kind.toLowerCase() !== WellKnownProjectType.Process.toLowerCase())
|
|
13925
|
+
continue;
|
|
13926
|
+
const packageName = resolvePackageNameAfterRename(resource, solutionName, newProjectName, solutionName, oldProjectName);
|
|
13927
|
+
const conflictingProject = findPackageNameConflict(solution, command.projectKey, solutionName, packageName);
|
|
13928
|
+
if (conflictingProject) {
|
|
13929
|
+
this.logger.error("Package name conflict", undefined, {
|
|
13930
|
+
context: command.context,
|
|
13931
|
+
packageName,
|
|
13932
|
+
conflictingProject: conflictingProject.name
|
|
13933
|
+
});
|
|
13934
|
+
throw new BadRequestException(ErrorCodes.Resources.DuplicatePackageName, `The name '${newProjectName}' would publish under the same package name as project '${conflictingProject.name}': '${packageName}'. Long names are shortened when the package name is composed, so choose a name that differs earlier.`);
|
|
13935
|
+
}
|
|
13936
|
+
}
|
|
13790
13937
|
const dependencyMapper = new Map;
|
|
13791
13938
|
for (const resource of projectResources) {
|
|
13792
13939
|
const depKey = `${oldProjectName.toLowerCase()}|${resource.kind.toLowerCase()}`;
|
|
@@ -16021,7 +16168,8 @@ function registerHandlers(diContainer) {
|
|
|
16021
16168
|
const mediator = c.resolve(ServiceTokens.Mediator);
|
|
16022
16169
|
const resourceOverwritesService = c.resolve(Tokens.IResourceOverwritesService);
|
|
16023
16170
|
const loggerFactory = c.resolve(ServiceTokens.LoggerFactory);
|
|
16024
|
-
|
|
16171
|
+
const featureFlagProvider = c.resolve(ServiceTokens.FeatureFlagProvider);
|
|
16172
|
+
return new BindingOverwritesHandler(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider);
|
|
16025
16173
|
}
|
|
16026
16174
|
});
|
|
16027
16175
|
diContainer.register(createCommandHandlerToken(BindingOverwritesValidationCommand.name), {
|
|
@@ -16029,7 +16177,8 @@ function registerHandlers(diContainer) {
|
|
|
16029
16177
|
const mediator = c.resolve(ServiceTokens.Mediator);
|
|
16030
16178
|
const resourceOverwritesService = c.resolve(Tokens.IResourceOverwritesService);
|
|
16031
16179
|
const loggerFactory = c.resolve(ServiceTokens.LoggerFactory);
|
|
16032
|
-
|
|
16180
|
+
const featureFlagProvider = c.resolve(ServiceTokens.FeatureFlagProvider);
|
|
16181
|
+
return new BindingOverwritesHandler(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider);
|
|
16033
16182
|
}
|
|
16034
16183
|
});
|
|
16035
16184
|
diContainer.register(createRequestHandlerToken(BindingOverwritesMappingRequest.name), {
|
|
@@ -18190,12 +18339,12 @@ async function findResourceByKeyInRcs(builder, kind, expectedKey, folderPath, pr
|
|
|
18190
18339
|
return;
|
|
18191
18340
|
}
|
|
18192
18341
|
async function searchRcsResources(builder, kind, name) {
|
|
18193
|
-
const [searchError,
|
|
18342
|
+
const [searchError, matches2] = await catchError(searchRcsResourcesStrict(builder, kind, name));
|
|
18194
18343
|
if (searchError) {
|
|
18195
18344
|
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
18196
18345
|
return [];
|
|
18197
18346
|
}
|
|
18198
|
-
return
|
|
18347
|
+
return matches2;
|
|
18199
18348
|
}
|
|
18200
18349
|
async function searchRcsResourcesStrict(builder, kind, name) {
|
|
18201
18350
|
let pageCursor;
|
|
@@ -18203,8 +18352,8 @@ async function searchRcsResourcesStrict(builder, kind, name) {
|
|
|
18203
18352
|
do {
|
|
18204
18353
|
const result = await builder.searchResourcesAsync(kind, undefined, name, pageCursor, 50, undefined, false);
|
|
18205
18354
|
for (const folderResources of result.availableResources) {
|
|
18206
|
-
const
|
|
18207
|
-
for (const match of
|
|
18355
|
+
const matches2 = folderResources.resources.filter((r) => r.name.toLowerCase() === name.toLowerCase());
|
|
18356
|
+
for (const match of matches2) {
|
|
18208
18357
|
allMatches.push({
|
|
18209
18358
|
key: match.key,
|
|
18210
18359
|
name: match.name,
|
|
@@ -18809,4 +18958,4 @@ export {
|
|
|
18809
18958
|
writeSolutionFile
|
|
18810
18959
|
};
|
|
18811
18960
|
|
|
18812
|
-
//# debugId=
|
|
18961
|
+
//# debugId=BBAA641DCDC0EC7064756E2164756E21
|
|
@@ -585,7 +585,7 @@ var package_default = {
|
|
|
585
585
|
name: "@uipath/integrationservice-sdk",
|
|
586
586
|
author: "UiPath",
|
|
587
587
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
588
|
-
version: "1.205.0-preview.
|
|
588
|
+
version: "1.205.0-preview.293",
|
|
589
589
|
repository: {
|
|
590
590
|
type: "git",
|
|
591
591
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -20395,7 +20395,7 @@ async function openSolution(solutionDir) {
|
|
|
20395
20395
|
const [error, solution] = await catchError((async () => {
|
|
20396
20396
|
const { getSolutionAuthContext } = await import("./solution-auth-zq6gyxsv.js");
|
|
20397
20397
|
await getSolutionAuthContext({});
|
|
20398
|
-
const resources = await import("./index-
|
|
20398
|
+
const resources = await import("./index-8n8hqn9w.js");
|
|
20399
20399
|
await resources.normalizeResourceFileCasing(solutionDir);
|
|
20400
20400
|
const services = await resources.createResourceBuilderServices();
|
|
20401
20401
|
return {
|
|
@@ -20498,7 +20498,7 @@ function createSolutionResourceConfigurationsProvider(solutionDir, namesByKey =
|
|
|
20498
20498
|
async function openEngine() {
|
|
20499
20499
|
const { getSolutionAuthContext } = await import("./solution-auth-zq6gyxsv.js");
|
|
20500
20500
|
await getSolutionAuthContext({});
|
|
20501
|
-
const resources = await import("./index-
|
|
20501
|
+
const resources = await import("./index-8n8hqn9w.js");
|
|
20502
20502
|
return {
|
|
20503
20503
|
resources,
|
|
20504
20504
|
services: await resources.createResourceBuilderServices()
|
|
@@ -23072,4 +23072,4 @@ export {
|
|
|
23072
23072
|
validateRequiredParameters
|
|
23073
23073
|
};
|
|
23074
23074
|
|
|
23075
|
-
//# debugId=
|
|
23075
|
+
//# debugId=DD64F190FD3C6AEF64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
listDeploymentsOfSolution,
|
|
3
3
|
resolveInstalledFolder,
|
|
4
4
|
solutionNameFromManifest
|
|
5
|
-
} from "./tool-
|
|
5
|
+
} from "./tool-kkx89tyx.js";
|
|
6
6
|
import {
|
|
7
7
|
BatchResponseSchema,
|
|
8
8
|
FailureRecordSchema,
|
|
@@ -466,7 +466,7 @@ async function readConnections(config, folderKey, signal) {
|
|
|
466
466
|
createConnectionsConfig,
|
|
467
467
|
folderOverride,
|
|
468
468
|
normalizeConnectionStatus
|
|
469
|
-
} = await import("./index-
|
|
469
|
+
} = await import("./index-v8j56yh4.js");
|
|
470
470
|
const api = new ConnectionsApi(await createConnectionsConfig({ tenant: config.tenantName }));
|
|
471
471
|
const scoped = folderOverride(folderKey);
|
|
472
472
|
const connections = [];
|