@uipath/codedapp-tool 1.205.0-preview.290 → 1.205.0-preview.300
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/{embedded-file-reader-r66242ey.js → embedded-file-reader-hcyf111w.js} +16 -16
- package/dist/{index-0k30knwv.js → index-cyp57dfe.js} +219 -70
- package/dist/{index-kmp9fmhb.js → index-dztdhj14.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{packager-tool-wa087j5w.js → packager-tool-egcmv13w.js} +5 -5
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-j98qvwdt.js} +8 -2
- package/dist/tool.js +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
JsonSerializerNames,
|
|
8
8
|
JsonSerializerProxy,
|
|
9
9
|
StreamSerializer
|
|
10
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-j98qvwdt.js";
|
|
11
11
|
import {
|
|
12
12
|
FirstPartyServiceApi
|
|
13
13
|
} from "./packager-tool-53w8skv5.js";
|
|
@@ -2748,6 +2748,7 @@ var ErrorCodes = {
|
|
|
2748
2748
|
ResourceAttributeMismatch: "2023",
|
|
2749
2749
|
AppSystemNameConflict: "2024",
|
|
2750
2750
|
InvalidResourceFile: "2025",
|
|
2751
|
+
DuplicatePackageName: "2026",
|
|
2751
2752
|
ResourceNotFound: "1000",
|
|
2752
2753
|
ResourceAlreadyExists: "Resources.ResourceAlreadyExists",
|
|
2753
2754
|
ResourceDependencyNotFound: "Resources.ResourceDependencyNotFound",
|
|
@@ -3276,6 +3277,30 @@ function getPackageType(processResourceType) {
|
|
|
3276
3277
|
return processResourceType;
|
|
3277
3278
|
return processTypeToPackageTypeMap[processResourceType.toLowerCase()] ?? processResourceType;
|
|
3278
3279
|
}
|
|
3280
|
+
function generatePackageName(solutionName, projectName, processResourceType) {
|
|
3281
|
+
const packageType = getPackageType(processResourceType) ?? "";
|
|
3282
|
+
const truncateCharsNo = Math.floor((PACKAGE_NAME_MAX_LENGTH - PACKAGE_NAME_SEPARATION_CHARS - packageType.length) / 2);
|
|
3283
|
+
return sanitizeNuGetPackageName(`${truncate(solutionName, truncateCharsNo)}.${packageType}.${truncate(projectName, truncateCharsNo)}`);
|
|
3284
|
+
}
|
|
3285
|
+
function resolvePackageNameAfterRename(processResource, solutionName, projectName, oldSolutionName, oldProjectName) {
|
|
3286
|
+
const currentPackageName = processResource.spec?.[WellKnownPropertyNames.PackageName];
|
|
3287
|
+
if (!solutionName)
|
|
3288
|
+
return currentPackageName ?? undefined;
|
|
3289
|
+
const oldGeneratedPackageName = generatePackageName(oldSolutionName ?? "", oldProjectName ?? processResource.name, processResource.type);
|
|
3290
|
+
return currentPackageName && currentPackageName.toLowerCase() !== oldGeneratedPackageName.toLowerCase() ? currentPackageName : generatePackageName(solutionName, projectName, processResource.type);
|
|
3291
|
+
}
|
|
3292
|
+
function findPackageNameConflict(solution, projectKey, solutionName, packageName) {
|
|
3293
|
+
if (!packageName)
|
|
3294
|
+
return;
|
|
3295
|
+
const wanted = packageName.toLowerCase();
|
|
3296
|
+
return solution.resources.find((resource) => resource.projectKey !== undefined && resource.projectKey !== projectKey && resource.kind.toLowerCase() === WellKnownProjectType.Process.toLowerCase() && effectivePackageName(resource, solutionName)?.toLowerCase() === wanted);
|
|
3297
|
+
}
|
|
3298
|
+
function effectivePackageName(processResource, solutionName) {
|
|
3299
|
+
const packageName = processResource.spec?.[WellKnownPropertyNames.PackageName];
|
|
3300
|
+
if (packageName)
|
|
3301
|
+
return packageName;
|
|
3302
|
+
return solutionName ? generatePackageName(solutionName, processResource.name, processResource.type) : undefined;
|
|
3303
|
+
}
|
|
3279
3304
|
function changePackageName(processResource, solutionName, projectName, oldSolutionName, oldProjectName) {
|
|
3280
3305
|
if (!solutionName)
|
|
3281
3306
|
return false;
|
|
@@ -3284,11 +3309,9 @@ function changePackageName(processResource, solutionName, projectName, oldSoluti
|
|
|
3284
3309
|
spec[WellKnownPropertyNames.PackageName] = null;
|
|
3285
3310
|
processResource.spec = spec;
|
|
3286
3311
|
const currentPackageName = spec[WellKnownPropertyNames.PackageName];
|
|
3287
|
-
const
|
|
3288
|
-
const truncateCharsNo = Math.floor((PACKAGE_NAME_MAX_LENGTH - PACKAGE_NAME_SEPARATION_CHARS - packageType.length) / 2);
|
|
3289
|
-
const newPackageName = sanitizeNuGetPackageName(`${truncate(solutionName, truncateCharsNo)}.${packageType}.${truncate(projectName, truncateCharsNo)}`);
|
|
3312
|
+
const newPackageName = generatePackageName(solutionName, projectName, processResource.type);
|
|
3290
3313
|
const projectNameForOldPackage = oldProjectName ?? processResource.name;
|
|
3291
|
-
const oldGeneratedPackageName =
|
|
3314
|
+
const oldGeneratedPackageName = generatePackageName(oldSolutionName ?? "", projectNameForOldPackage, processResource.type);
|
|
3292
3315
|
if (!currentPackageName || currentPackageName.toLowerCase() === oldGeneratedPackageName.toLowerCase()) {
|
|
3293
3316
|
spec[WellKnownPropertyNames.PackageName] = newPackageName;
|
|
3294
3317
|
renamePackageDependencies(processResource, projectNameForOldPackage, projectName);
|
|
@@ -3499,8 +3522,15 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3499
3522
|
return withFileOperationTimeout2(provider, resolveFileOperationTimeoutMs(this.options));
|
|
3500
3523
|
}
|
|
3501
3524
|
async readAsync(context, cancellationToken) {
|
|
3525
|
+
return this.readWithKindsAsync(context, undefined, cancellationToken);
|
|
3526
|
+
}
|
|
3527
|
+
async readKindsAsync(context, kinds, cancellationToken) {
|
|
3528
|
+
return this.readWithKindsAsync(context, context.isReadOnly ? kinds : undefined, cancellationToken);
|
|
3529
|
+
}
|
|
3530
|
+
async readWithKindsAsync(context, kinds, cancellationToken) {
|
|
3502
3531
|
this.logger.info("Reading multi-file solution definition for solution %s", context.path);
|
|
3503
3532
|
const loadStarted = nowMs();
|
|
3533
|
+
let listedFileCount = 0;
|
|
3504
3534
|
let fileCount = 0;
|
|
3505
3535
|
let listMs = 0;
|
|
3506
3536
|
let readStarted = loadStarted;
|
|
@@ -3538,9 +3568,11 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3538
3568
|
loaded: loadedCount,
|
|
3539
3569
|
missing: missingFiles.length,
|
|
3540
3570
|
invalid: invalidFiles.length,
|
|
3541
|
-
parseErrors: parseErrors.length
|
|
3571
|
+
parseErrors: parseErrors.length,
|
|
3572
|
+
kinds: kinds?.join(",") ?? "*",
|
|
3573
|
+
listedFileCount
|
|
3542
3574
|
};
|
|
3543
|
-
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}`;
|
|
3575
|
+
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}`;
|
|
3544
3576
|
if (outcome === "Success")
|
|
3545
3577
|
this.logger.info(message, metrics);
|
|
3546
3578
|
else
|
|
@@ -3566,8 +3598,11 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3566
3598
|
tree.length = 0;
|
|
3567
3599
|
}
|
|
3568
3600
|
const listStarted = nowMs();
|
|
3569
|
-
const
|
|
3601
|
+
const listedFiles = await fileStorageProvider.getFilesAsync(SolutionConstants.RESOURCE_FILES_FOLDER_NAME, "*.json", cancellationToken);
|
|
3570
3602
|
listMs = nowMs() - listStarted;
|
|
3603
|
+
listedFileCount = listedFiles.length;
|
|
3604
|
+
const wantedKinds = kinds && new Set(kinds.map((k) => k.toLowerCase()));
|
|
3605
|
+
const resourceFiles = wantedKinds === undefined ? listedFiles : listedFiles.filter((resourceFile) => MultiFileSolutionDefinitionProvider.mayHoldAnyKind(resourceFile, wantedKinds));
|
|
3571
3606
|
fileCount = resourceFiles.length;
|
|
3572
3607
|
readStarted = nowMs();
|
|
3573
3608
|
const readResults = await this.readResourceFilesAsync(context, fileStorageProvider, resourceFiles, cancellationToken);
|
|
@@ -3810,6 +3845,10 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3810
3845
|
};
|
|
3811
3846
|
}
|
|
3812
3847
|
}
|
|
3848
|
+
static mayHoldAnyKind(resourceFile, lowerCaseKinds) {
|
|
3849
|
+
const segments = resourceFile.replace(/\\/g, "/").split("/").filter((s) => s.length > 0);
|
|
3850
|
+
return segments.slice(0, -1).some((segment) => lowerCaseKinds.has(segment.toLowerCase()));
|
|
3851
|
+
}
|
|
3813
3852
|
applyFolders(resource, resourceFile) {
|
|
3814
3853
|
const relPath = resourceFile.replace(/\\/g, "/");
|
|
3815
3854
|
const segments = relPath.split("/").filter((s) => s.length > 0);
|
|
@@ -3913,6 +3952,8 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
3913
3952
|
newPaths.forEach((value, key) => {
|
|
3914
3953
|
existingPaths.set(key, value);
|
|
3915
3954
|
});
|
|
3955
|
+
existingTree.length = 0;
|
|
3956
|
+
existingTree.push(...orderedResourceKeys);
|
|
3916
3957
|
}
|
|
3917
3958
|
async deleteFilesAsync(context, filesToDelete, cancellationToken) {
|
|
3918
3959
|
if (!filesToDelete || filesToDelete.length === 0 || context.isReadOnly)
|
|
@@ -4142,8 +4183,8 @@ class MultiFileSolutionDefinitionFactory {
|
|
|
4142
4183
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/embedded-files-default.js
|
|
4143
4184
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
4144
4185
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory: JsonSerializerFactory2 }] = await Promise.all([
|
|
4145
|
-
import("./embedded-file-reader-
|
|
4146
|
-
import("./index-
|
|
4186
|
+
import("./embedded-file-reader-hcyf111w.js"),
|
|
4187
|
+
import("./index-dztdhj14.js")
|
|
4147
4188
|
]);
|
|
4148
4189
|
return new EmbeddedFileReader(new JsonSerializerFactory2);
|
|
4149
4190
|
}
|
|
@@ -4757,7 +4798,103 @@ class BindingOverwritesMappingRequest {
|
|
|
4757
4798
|
}
|
|
4758
4799
|
}
|
|
4759
4800
|
|
|
4801
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/bindings/jit-debug-project-types.js
|
|
4802
|
+
var JIT_DEBUG_PROJECT_TYPES_FEATURE_FLAG = "FE.JitDebugProjectTypes";
|
|
4803
|
+
var PROCESS_KIND = "process";
|
|
4804
|
+
var BUSINESS_RULE_KIND = "businessrule";
|
|
4805
|
+
var APP_KIND = "app";
|
|
4806
|
+
var LOW_CODE_APP_PROJECT_TYPE = "webapp";
|
|
4807
|
+
var LOW_CODE_APP_TYPES = new Set([
|
|
4808
|
+
"workflow action"
|
|
4809
|
+
]);
|
|
4810
|
+
var CODED_APP_PROJECT_TYPE = "appv2";
|
|
4811
|
+
var CODED_APP_TYPES = new Set([
|
|
4812
|
+
"coded",
|
|
4813
|
+
"codedaction"
|
|
4814
|
+
]);
|
|
4815
|
+
var DEFAULT_PROCESS_PROJECT_TYPE = "process";
|
|
4816
|
+
var KNOWN_PROCESS_PROJECT_TYPES = new Set([
|
|
4817
|
+
DEFAULT_PROCESS_PROJECT_TYPE,
|
|
4818
|
+
"processorchestration",
|
|
4819
|
+
"agent",
|
|
4820
|
+
"api",
|
|
4821
|
+
"flow",
|
|
4822
|
+
"function",
|
|
4823
|
+
"casemanagement",
|
|
4824
|
+
"webapp",
|
|
4825
|
+
"businessrules"
|
|
4826
|
+
]);
|
|
4827
|
+
var BUSINESS_RULE_PROJECT_TYPE = "businessrules";
|
|
4828
|
+
function parseJitDebugProjectTypes(flagValue) {
|
|
4829
|
+
if (!flagValue || !flagValue.trim())
|
|
4830
|
+
return [];
|
|
4831
|
+
return flagValue.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
4832
|
+
}
|
|
4833
|
+
function solutionSupportsJitDebug(solution, flagValue) {
|
|
4834
|
+
const enabledProjectTypes = parseJitDebugProjectTypes(flagValue).map((t) => t.toLowerCase());
|
|
4835
|
+
if (enabledProjectTypes.length === 0)
|
|
4836
|
+
return false;
|
|
4837
|
+
return (solution.resources ?? []).filter((r) => (r.projectKey != null || r.isArtefactResource === true) && isDecisionKind(r.kind)).every((r) => enabledProjectTypes.some((projectType) => matches(projectType, r)));
|
|
4838
|
+
}
|
|
4839
|
+
function isDecisionKind(kind) {
|
|
4840
|
+
const normalized = (kind ?? "").toLowerCase();
|
|
4841
|
+
return normalized === PROCESS_KIND || normalized === BUSINESS_RULE_KIND || normalized === APP_KIND;
|
|
4842
|
+
}
|
|
4843
|
+
function matches(projectType, resource) {
|
|
4844
|
+
if ((resource.kind ?? "").toLowerCase() === BUSINESS_RULE_KIND)
|
|
4845
|
+
return projectType === BUSINESS_RULE_PROJECT_TYPE;
|
|
4846
|
+
if ((resource.kind ?? "").toLowerCase() === APP_KIND) {
|
|
4847
|
+
const appType = (resource.type ?? "").toLowerCase();
|
|
4848
|
+
if (appType === "" || LOW_CODE_APP_TYPES.has(appType))
|
|
4849
|
+
return projectType === LOW_CODE_APP_PROJECT_TYPE;
|
|
4850
|
+
return CODED_APP_TYPES.has(appType) && projectType === CODED_APP_PROJECT_TYPE;
|
|
4851
|
+
}
|
|
4852
|
+
const resourceType = (resource.type ?? "").toLowerCase();
|
|
4853
|
+
const processType = resourceType === "" ? DEFAULT_PROCESS_PROJECT_TYPE : resourceType;
|
|
4854
|
+
return !KNOWN_PROCESS_PROJECT_TYPES.has(processType) || projectType === processType;
|
|
4855
|
+
}
|
|
4856
|
+
|
|
4857
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/services/overwrites/models.js
|
|
4858
|
+
var models_ValidationSeverity = /* @__PURE__ */ function(ValidationSeverity) {
|
|
4859
|
+
ValidationSeverity["Warning"] = "Warning";
|
|
4860
|
+
ValidationSeverity["Critical"] = "Critical";
|
|
4861
|
+
return ValidationSeverity;
|
|
4862
|
+
}({});
|
|
4863
|
+
var models_OverwriteType = /* @__PURE__ */ function(OverwriteType) {
|
|
4864
|
+
OverwriteType["Install"] = "Install";
|
|
4865
|
+
OverwriteType["Reference"] = "Reference";
|
|
4866
|
+
return OverwriteType;
|
|
4867
|
+
}({});
|
|
4868
|
+
function createLocalizableMessage(key, ...args) {
|
|
4869
|
+
return {
|
|
4870
|
+
key,
|
|
4871
|
+
args: args.length > 0 ? args : undefined
|
|
4872
|
+
};
|
|
4873
|
+
}
|
|
4874
|
+
function createMissingRcsResources(missingKeys, error) {
|
|
4875
|
+
return {
|
|
4876
|
+
missingResourceKeys: missingKeys instanceof Set ? missingKeys : new Set(missingKeys),
|
|
4877
|
+
error
|
|
4878
|
+
};
|
|
4879
|
+
}
|
|
4880
|
+
function setValidationError(errors, resourceKey, dto) {
|
|
4881
|
+
const error = errors.get(resourceKey);
|
|
4882
|
+
if (error)
|
|
4883
|
+
dto.validationError = error;
|
|
4884
|
+
}
|
|
4885
|
+
var DebugOverwritesConstants = {
|
|
4886
|
+
ResourceOverwritesFileName: "debug_overwrites.json",
|
|
4887
|
+
CurrentOverwritesDocVersion: "1.0"
|
|
4888
|
+
};
|
|
4889
|
+
|
|
4760
4890
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/bindings/binding-overwrites-handler.js
|
|
4891
|
+
var FOLDER_KEY_RESOURCE_TYPES = new Set([
|
|
4892
|
+
models_BindingsResourceType.Entity,
|
|
4893
|
+
models_BindingsResourceType.Asset,
|
|
4894
|
+
models_BindingsResourceType.Queue,
|
|
4895
|
+
models_BindingsResourceType.Process
|
|
4896
|
+
]);
|
|
4897
|
+
|
|
4761
4898
|
class BindingOverwritesHandler {
|
|
4762
4899
|
async handleAsync(request, cancellationToken) {
|
|
4763
4900
|
if (request instanceof BindingOverwritesValidationCommand)
|
|
@@ -4772,6 +4909,10 @@ class BindingOverwritesHandler {
|
|
|
4772
4909
|
if (bindingResources.length === 0)
|
|
4773
4910
|
return {};
|
|
4774
4911
|
const result = {};
|
|
4912
|
+
const solution = await request.context.loadAsync(cancellationToken);
|
|
4913
|
+
const jitDebugProjectTypes = this.featureFlagProvider.getString(JIT_DEBUG_PROJECT_TYPES_FEATURE_FLAG, "");
|
|
4914
|
+
const emptyFolderPathForArtefacts = solutionSupportsJitDebug(solution, jitDebugProjectTypes);
|
|
4915
|
+
this.logger.info(`Binding overwrites for solution ${request.context.path}: JIT debug ${emptyFolderPathForArtefacts ? "on" : "off"} (FE.JitDebugProjectTypes = '${jitDebugProjectTypes}')`);
|
|
4775
4916
|
const resourceOverwrites = await this.resourceOverwritesService.getResourceOverwritesAsync(request.context, cancellationToken);
|
|
4776
4917
|
for (const bindingResource of bindingResources) {
|
|
4777
4918
|
const resourceOverwrite = resourceOverwrites.get(bindingResource.resourceKey.toLowerCase());
|
|
@@ -4784,13 +4925,15 @@ class BindingOverwritesHandler {
|
|
|
4784
4925
|
[BindingsKnownKeys.FolderKeyPropertyName]: resourceOverwrite.folderKey ?? ""
|
|
4785
4926
|
};
|
|
4786
4927
|
else {
|
|
4787
|
-
const
|
|
4928
|
+
const resolvesInDebugFolder = emptyFolderPathForArtefacts && bindingResource.isArtefactResource;
|
|
4929
|
+
const folderPath = resolvesInDebugFolder ? "" : resourceOverwrite.folderFullyQualifiedName ?? "";
|
|
4930
|
+
const name = resourceOverwrite.type === models_OverwriteType.Install && bindingResource.isArtefactResource && bindingResource.resourceName ? bindingResource.resourceName : resourceOverwrite.resourceName;
|
|
4788
4931
|
overwrite = {
|
|
4789
4932
|
[BindingsKnownKeys.FolderPathPropertyName]: folderPath,
|
|
4790
|
-
[BindingsKnownKeys.NamePropertyName]:
|
|
4933
|
+
[BindingsKnownKeys.NamePropertyName]: name
|
|
4791
4934
|
};
|
|
4792
|
-
if (bindingResource.binding.resourceType
|
|
4793
|
-
overwrite[BindingsKnownKeys.FolderKeyPropertyName] = resourceOverwrite.folderKey ?? "";
|
|
4935
|
+
if (FOLDER_KEY_RESOURCE_TYPES.has(bindingResource.binding.resourceType))
|
|
4936
|
+
overwrite[BindingsKnownKeys.FolderKeyPropertyName] = resolvesInDebugFolder ? "" : resourceOverwrite.folderKey ?? "";
|
|
4794
4937
|
}
|
|
4795
4938
|
const key = getOverrideKey(bindingResource.binding);
|
|
4796
4939
|
result[key] = overwrite;
|
|
@@ -4806,9 +4949,10 @@ class BindingOverwritesHandler {
|
|
|
4806
4949
|
throw new BadRequestException("Bindings.ValidationFailed", `Binding validation failed: ${failureMessages}`);
|
|
4807
4950
|
}
|
|
4808
4951
|
}
|
|
4809
|
-
constructor(mediator, resourceOverwritesService, loggerFactory) {
|
|
4952
|
+
constructor(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider) {
|
|
4810
4953
|
this.mediator = mediator;
|
|
4811
4954
|
this.resourceOverwritesService = resourceOverwritesService;
|
|
4955
|
+
this.featureFlagProvider = featureFlagProvider;
|
|
4812
4956
|
this.logger = loggerFactory.create("BindingOverwritesHandler");
|
|
4813
4957
|
}
|
|
4814
4958
|
}
|
|
@@ -4848,7 +4992,8 @@ class BindingOverwritesMappingRequestHandler {
|
|
|
4848
4992
|
binding: bindingsResource,
|
|
4849
4993
|
resourceKey: resource.key,
|
|
4850
4994
|
isArtefactResource: resource.projectKey != null,
|
|
4851
|
-
isCodedApp: bindingsResource.resourceType === models_BindingsResourceType.App && isCodedAppType(resource.type)
|
|
4995
|
+
isCodedApp: bindingsResource.resourceType === models_BindingsResourceType.App && isCodedAppType(resource.type),
|
|
4996
|
+
resourceName: resource.name
|
|
4852
4997
|
});
|
|
4853
4998
|
} else {
|
|
4854
4999
|
this.logger.error(`Solution does not contain binding resource of type ${models_BindingsResourceType[bindingsResource.resourceType]}.`);
|
|
@@ -4971,6 +5116,9 @@ class SolutionContext {
|
|
|
4971
5116
|
signal = forceOrSignal;
|
|
4972
5117
|
return this.doWithLockAsync((token) => this.internalLoadAsync(force, token), signal);
|
|
4973
5118
|
}
|
|
5119
|
+
async loadKindsAsync(kinds, cancellationToken) {
|
|
5120
|
+
return this.doWithLockAsync((token) => this.isReadOnly && this._definition === null && this._definitionProvider.readKindsAsync ? this._definitionProvider.readKindsAsync(this, kinds, token) : this.internalLoadAsync(false, token), cancellationToken);
|
|
5121
|
+
}
|
|
4974
5122
|
async getSolutionDefinitionAsync(cancellationToken) {
|
|
4975
5123
|
return this._definitionProvider.readAsync(this, cancellationToken);
|
|
4976
5124
|
}
|
|
@@ -4988,20 +5136,17 @@ class SolutionContext {
|
|
|
4988
5136
|
this.validateResourceDependencies(this._definition);
|
|
4989
5137
|
await this.deleteSavedFilesAsync(filesToDelete, token);
|
|
4990
5138
|
await this.internalSaveChanges(this._definition, token);
|
|
4991
|
-
this._definition = null;
|
|
4992
5139
|
}, signal);
|
|
4993
5140
|
else
|
|
4994
5141
|
await this.doWithLockAsync(async (token) => {
|
|
4995
5142
|
this.validateResourceDependencies(this._definition);
|
|
4996
5143
|
await this.internalSaveChanges(this._definition, token);
|
|
4997
|
-
this._definition = null;
|
|
4998
5144
|
}, signal);
|
|
4999
5145
|
}
|
|
5000
5146
|
async forceSaveChangesAsync(cancellationToken) {
|
|
5001
5147
|
await this.doWithLockAsync(async (token) => {
|
|
5002
5148
|
this.validateResourceDependencies(this._definition);
|
|
5003
5149
|
await this.internalSaveChanges(this._definition, token);
|
|
5004
|
-
this._definition = null;
|
|
5005
5150
|
}, cancellationToken);
|
|
5006
5151
|
}
|
|
5007
5152
|
async saveAsync(solution, cancellationToken) {
|
|
@@ -5012,7 +5157,7 @@ class SolutionContext {
|
|
|
5012
5157
|
this.validateResourceDependencies(solution);
|
|
5013
5158
|
await this.internalLoadAsync(false, token);
|
|
5014
5159
|
await this.internalSaveChanges(solution, token);
|
|
5015
|
-
this._definition =
|
|
5160
|
+
this._definition = solution;
|
|
5016
5161
|
}, cancellationToken);
|
|
5017
5162
|
}
|
|
5018
5163
|
toString() {
|
|
@@ -6093,39 +6238,6 @@ SettingsRequestHandler = _ts_decorate4([
|
|
|
6093
6238
|
])
|
|
6094
6239
|
], SettingsRequestHandler);
|
|
6095
6240
|
|
|
6096
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/services/overwrites/models.js
|
|
6097
|
-
var models_ValidationSeverity = /* @__PURE__ */ function(ValidationSeverity) {
|
|
6098
|
-
ValidationSeverity["Warning"] = "Warning";
|
|
6099
|
-
ValidationSeverity["Critical"] = "Critical";
|
|
6100
|
-
return ValidationSeverity;
|
|
6101
|
-
}({});
|
|
6102
|
-
var models_OverwriteType = /* @__PURE__ */ function(OverwriteType) {
|
|
6103
|
-
OverwriteType["Install"] = "Install";
|
|
6104
|
-
OverwriteType["Reference"] = "Reference";
|
|
6105
|
-
return OverwriteType;
|
|
6106
|
-
}({});
|
|
6107
|
-
function createLocalizableMessage(key, ...args) {
|
|
6108
|
-
return {
|
|
6109
|
-
key,
|
|
6110
|
-
args: args.length > 0 ? args : undefined
|
|
6111
|
-
};
|
|
6112
|
-
}
|
|
6113
|
-
function createMissingRcsResources(missingKeys, error) {
|
|
6114
|
-
return {
|
|
6115
|
-
missingResourceKeys: missingKeys instanceof Set ? missingKeys : new Set(missingKeys),
|
|
6116
|
-
error
|
|
6117
|
-
};
|
|
6118
|
-
}
|
|
6119
|
-
function setValidationError(errors, resourceKey, dto) {
|
|
6120
|
-
const error = errors.get(resourceKey);
|
|
6121
|
-
if (error)
|
|
6122
|
-
dto.validationError = error;
|
|
6123
|
-
}
|
|
6124
|
-
var DebugOverwritesConstants = {
|
|
6125
|
-
ResourceOverwritesFileName: "debug_overwrites.json",
|
|
6126
|
-
CurrentOverwritesDocVersion: "1.0"
|
|
6127
|
-
};
|
|
6128
|
-
|
|
6129
6241
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/mappings/resource-subtype-mapper.js
|
|
6130
6242
|
var solutionsSubtypesMap = {
|
|
6131
6243
|
Text: "stringAsset",
|
|
@@ -7466,8 +7578,8 @@ class SolutionDefinitionHelper {
|
|
|
7466
7578
|
if (references.length === 0)
|
|
7467
7579
|
continue;
|
|
7468
7580
|
const referenceKind = refProp["referenceKind"];
|
|
7469
|
-
const
|
|
7470
|
-
const filtered = references.filter((r) => !
|
|
7581
|
+
const matches2 = (ref) => ref.name != null && invariantEquals(resource.name, ref.name) && referenceKind != null && invariantEquals(referenceKind, resource.kind);
|
|
7582
|
+
const filtered = references.filter((r) => !matches2(r));
|
|
7471
7583
|
if (filtered.length !== references.length)
|
|
7472
7584
|
spec[refProp.property] = isSingleReferenceProperty(refProp) ? filtered[0] ?? null : filtered;
|
|
7473
7585
|
}
|
|
@@ -7614,7 +7726,9 @@ class ResourcesSearchRequestHandler {
|
|
|
7614
7726
|
async getSolutionResourcesAsync(request, cancellationToken) {
|
|
7615
7727
|
if (request.pageSize <= 0 || !request.includeSolutionResources)
|
|
7616
7728
|
return null;
|
|
7617
|
-
const solution = await request.context.
|
|
7729
|
+
const solution = await (request.context.loadKindsAsync?.([
|
|
7730
|
+
request.kind
|
|
7731
|
+
], cancellationToken) ?? request.context.loadAsync(cancellationToken));
|
|
7618
7732
|
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()));
|
|
7619
7733
|
if (request.cursor?.pageDirection === internal_InternalPageDirection.Previous) {
|
|
7620
7734
|
if (request.cursor.name) {
|
|
@@ -9113,6 +9227,7 @@ class GenerateArtefactResourcesCommandHandler {
|
|
|
9113
9227
|
apiVersion: metadataVersion.version.uri,
|
|
9114
9228
|
name: command.projectName,
|
|
9115
9229
|
projectKey: command.projectKey,
|
|
9230
|
+
isArtefactResource: !!command.projectKey,
|
|
9116
9231
|
folders: [],
|
|
9117
9232
|
files: []
|
|
9118
9233
|
};
|
|
@@ -12802,7 +12917,7 @@ class ProjectCreateCommandHandler {
|
|
|
12802
12917
|
const solution = await command.context.loadAsync(cancellationToken);
|
|
12803
12918
|
const resourceIdentifiers = new Set(this.projectConfigurationReader.getTemplateResourcesByType(command.type, command.subType, true).map((r) => JSON.stringify(r)));
|
|
12804
12919
|
const projectResources = solution.resources.filter((x) => x.projectKey === command.projectKey);
|
|
12805
|
-
const duplicateProject = solution.resources.find((r) => r.
|
|
12920
|
+
const duplicateProject = solution.resources.find((r) => r.projectKey !== undefined && r.projectKey !== command.projectKey && r.name.toLowerCase() === command.name.toLowerCase());
|
|
12806
12921
|
if (duplicateProject) {
|
|
12807
12922
|
this.logger.error("Project name already exists", undefined, {
|
|
12808
12923
|
projectName: command.name,
|
|
@@ -12811,15 +12926,16 @@ class ProjectCreateCommandHandler {
|
|
|
12811
12926
|
throw new BadRequestException("Project.DuplicateProjectName", "Project name already exists");
|
|
12812
12927
|
}
|
|
12813
12928
|
if (projectResources.length === 0)
|
|
12814
|
-
await this.
|
|
12929
|
+
this.addArtefacts(command, solution, await this.generateAndValidateArtefacts(command, solution, cancellationToken));
|
|
12815
12930
|
else {
|
|
12816
12931
|
const existingResourceIdentifiers = new Set(projectResources.map((x) => JSON.stringify(toResourceIdentifier2(x))));
|
|
12817
12932
|
const needsRegeneration = existingResourceIdentifiers.size !== resourceIdentifiers.size || [
|
|
12818
12933
|
...resourceIdentifiers
|
|
12819
12934
|
].some((id) => !existingResourceIdentifiers.has(id));
|
|
12820
12935
|
if (needsRegeneration) {
|
|
12936
|
+
const artefacts = await this.generateAndValidateArtefacts(command, solution, cancellationToken);
|
|
12821
12937
|
await this.removeExistingProjectResources(command, cancellationToken);
|
|
12822
|
-
|
|
12938
|
+
this.addArtefacts(command, solution, artefacts);
|
|
12823
12939
|
} else if (projectResources.some((x) => x.name !== command.name))
|
|
12824
12940
|
await this.mediator.sendCommandAsync(new ProjectEditCommand(command.context, command.projectKey, {
|
|
12825
12941
|
name: command.name,
|
|
@@ -12829,13 +12945,13 @@ class ProjectCreateCommandHandler {
|
|
|
12829
12945
|
}
|
|
12830
12946
|
await command.context.saveChangesAsync(cancellationToken);
|
|
12831
12947
|
}
|
|
12832
|
-
async
|
|
12948
|
+
async generateAndValidateArtefacts(command, solution, cancellationToken) {
|
|
12833
12949
|
this.logger.info("Generate artefact resources for project", {
|
|
12834
12950
|
projectName: command.name,
|
|
12835
12951
|
projectKey: command.projectKey
|
|
12836
12952
|
});
|
|
12837
12953
|
const artefactResources = await this.mediator.sendCommandAsync(new GenerateArtefactResourcesCommand(command.context, command.name, command.type, command.projectKey, command.subType), cancellationToken);
|
|
12838
|
-
const existingConflictResource = solution.resources.find((r) =>
|
|
12954
|
+
const existingConflictResource = solution.resources.find((r) => r.projectKey === undefined && r.name.toLowerCase() === command.name.toLowerCase() && artefactResources.some((pr) => r.kind.toLowerCase() === pr.kind.toLowerCase()));
|
|
12839
12955
|
if (existingConflictResource) {
|
|
12840
12956
|
this.logger.error("Resource name conflict", undefined, {
|
|
12841
12957
|
context: command.context,
|
|
@@ -12844,6 +12960,23 @@ class ProjectCreateCommandHandler {
|
|
|
12844
12960
|
});
|
|
12845
12961
|
throw new BadRequestException("Resources.DuplicateResourceName", `Solution already contains a ${existingConflictResource.kind} resource named "${existingConflictResource.name}"`);
|
|
12846
12962
|
}
|
|
12963
|
+
for (const artefact of artefactResources) {
|
|
12964
|
+
if (artefact.kind.toLowerCase() !== WellKnownProjectType.Process.toLowerCase())
|
|
12965
|
+
continue;
|
|
12966
|
+
const packageName = resolvePackageNameAfterRename(artefact, command.solutionName, command.name, command.solutionName);
|
|
12967
|
+
const conflictingProject = findPackageNameConflict(solution, command.projectKey, command.solutionName, packageName);
|
|
12968
|
+
if (conflictingProject) {
|
|
12969
|
+
this.logger.error("Package name conflict", undefined, {
|
|
12970
|
+
context: command.context,
|
|
12971
|
+
packageName,
|
|
12972
|
+
conflictingProject: conflictingProject.name
|
|
12973
|
+
});
|
|
12974
|
+
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.`);
|
|
12975
|
+
}
|
|
12976
|
+
}
|
|
12977
|
+
return artefactResources;
|
|
12978
|
+
}
|
|
12979
|
+
addArtefacts(command, solution, artefactResources) {
|
|
12847
12980
|
for (const artefact of artefactResources) {
|
|
12848
12981
|
if (artefact.kind.toLowerCase() === WellKnownProjectType.Process.toLowerCase())
|
|
12849
12982
|
changePackageName(artefact, command.solutionName, command.name, command.solutionName);
|
|
@@ -12884,18 +13017,32 @@ class ProjectEditCommandHandler {
|
|
|
12884
13017
|
const newProjectName = command.projectDetails.name.trim();
|
|
12885
13018
|
const projectDescription = command.projectDetails.description;
|
|
12886
13019
|
const solutionName = command.projectDetails.solutionName;
|
|
12887
|
-
const duplicateProject = solution.resources.find((r) => r.
|
|
13020
|
+
const duplicateProject = solution.resources.find((r) => r.projectKey !== undefined && r.projectKey !== command.projectKey && r.name.toLowerCase() === newProjectName.toLowerCase());
|
|
12888
13021
|
if (duplicateProject) {
|
|
12889
13022
|
this.logger.error("Project name already exists");
|
|
12890
13023
|
throw new BadRequestException(ErrorCodes.Resources.DuplicateResourceName, "Project name already exists");
|
|
12891
13024
|
}
|
|
12892
|
-
const existingConflictResource = solution.resources.find((r) =>
|
|
13025
|
+
const existingConflictResource = solution.resources.find((r) => r.projectKey === undefined && r.name.toLowerCase() === newProjectName.toLowerCase() && projectResources.some((pr) => r.kind.toLowerCase() === pr.kind.toLowerCase()));
|
|
12893
13026
|
if (existingConflictResource) {
|
|
12894
13027
|
this.logger.error("Solution already contains resource of kind with same name");
|
|
12895
13028
|
throw new BadRequestException(ErrorCodes.Resources.DuplicateResourceName, `Solution already contains a ${existingConflictResource.kind} resource named "${existingConflictResource.name}"`);
|
|
12896
13029
|
}
|
|
12897
13030
|
const firstProjectResource = projectResources[0];
|
|
12898
13031
|
const oldProjectName = firstProjectResource ? firstProjectResource.name : "";
|
|
13032
|
+
for (const resource of projectResources) {
|
|
13033
|
+
if (resource.kind.toLowerCase() !== WellKnownProjectType.Process.toLowerCase())
|
|
13034
|
+
continue;
|
|
13035
|
+
const packageName = resolvePackageNameAfterRename(resource, solutionName, newProjectName, solutionName, oldProjectName);
|
|
13036
|
+
const conflictingProject = findPackageNameConflict(solution, command.projectKey, solutionName, packageName);
|
|
13037
|
+
if (conflictingProject) {
|
|
13038
|
+
this.logger.error("Package name conflict", undefined, {
|
|
13039
|
+
context: command.context,
|
|
13040
|
+
packageName,
|
|
13041
|
+
conflictingProject: conflictingProject.name
|
|
13042
|
+
});
|
|
13043
|
+
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.`);
|
|
13044
|
+
}
|
|
13045
|
+
}
|
|
12899
13046
|
const dependencyMapper = new Map;
|
|
12900
13047
|
for (const resource of projectResources) {
|
|
12901
13048
|
const depKey = `${oldProjectName.toLowerCase()}|${resource.kind.toLowerCase()}`;
|
|
@@ -15130,7 +15277,8 @@ function registerHandlers(diContainer) {
|
|
|
15130
15277
|
const mediator = c.resolve(ServiceTokens.Mediator);
|
|
15131
15278
|
const resourceOverwritesService = c.resolve(Tokens.IResourceOverwritesService);
|
|
15132
15279
|
const loggerFactory = c.resolve(ServiceTokens.LoggerFactory);
|
|
15133
|
-
|
|
15280
|
+
const featureFlagProvider = c.resolve(ServiceTokens.FeatureFlagProvider);
|
|
15281
|
+
return new BindingOverwritesHandler(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider);
|
|
15134
15282
|
}
|
|
15135
15283
|
});
|
|
15136
15284
|
diContainer.register(createCommandHandlerToken(BindingOverwritesValidationCommand.name), {
|
|
@@ -15138,7 +15286,8 @@ function registerHandlers(diContainer) {
|
|
|
15138
15286
|
const mediator = c.resolve(ServiceTokens.Mediator);
|
|
15139
15287
|
const resourceOverwritesService = c.resolve(Tokens.IResourceOverwritesService);
|
|
15140
15288
|
const loggerFactory = c.resolve(ServiceTokens.LoggerFactory);
|
|
15141
|
-
|
|
15289
|
+
const featureFlagProvider = c.resolve(ServiceTokens.FeatureFlagProvider);
|
|
15290
|
+
return new BindingOverwritesHandler(mediator, resourceOverwritesService, loggerFactory, featureFlagProvider);
|
|
15142
15291
|
}
|
|
15143
15292
|
});
|
|
15144
15293
|
diContainer.register(createRequestHandlerToken(BindingOverwritesMappingRequest.name), {
|
|
@@ -17319,12 +17468,12 @@ async function findResourceByKeyInRcs(builder, kind, expectedKey, folderPath, pr
|
|
|
17319
17468
|
return;
|
|
17320
17469
|
}
|
|
17321
17470
|
async function searchRcsResources(builder, kind, name) {
|
|
17322
|
-
const [searchError,
|
|
17471
|
+
const [searchError, matches2] = await catchError(searchRcsResourcesStrict(builder, kind, name));
|
|
17323
17472
|
if (searchError) {
|
|
17324
17473
|
logger.warn(`Failed to search ${kind} resources in RCS: ${searchError.message}`);
|
|
17325
17474
|
return [];
|
|
17326
17475
|
}
|
|
17327
|
-
return
|
|
17476
|
+
return matches2;
|
|
17328
17477
|
}
|
|
17329
17478
|
async function searchRcsResourcesStrict(builder, kind, name) {
|
|
17330
17479
|
let pageCursor;
|
|
@@ -17332,8 +17481,8 @@ async function searchRcsResourcesStrict(builder, kind, name) {
|
|
|
17332
17481
|
do {
|
|
17333
17482
|
const result = await builder.searchResourcesAsync(kind, undefined, name, pageCursor, 50, undefined, false);
|
|
17334
17483
|
for (const folderResources of result.availableResources) {
|
|
17335
|
-
const
|
|
17336
|
-
for (const match of
|
|
17484
|
+
const matches2 = folderResources.resources.filter((r) => r.name.toLowerCase() === name.toLowerCase());
|
|
17485
|
+
for (const match of matches2) {
|
|
17337
17486
|
allMatches.push({
|
|
17338
17487
|
key: match.key,
|
|
17339
17488
|
name: match.name,
|
|
@@ -17938,4 +18087,4 @@ export {
|
|
|
17938
18087
|
writeSolutionFile
|
|
17939
18088
|
};
|
|
17940
18089
|
|
|
17941
|
-
//# debugId=
|
|
18090
|
+
//# debugId=AB42F8201F1D46C864756E2164756E21
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES,
|
|
9
9
|
SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES,
|
|
10
10
|
StreamSerializer
|
|
11
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-j98qvwdt.js";
|
|
12
12
|
import"./packager-tool-1yh8g550.js";
|
|
13
13
|
export {
|
|
14
14
|
CAMEL_CASE_ENUM_PROPERTIES,
|
package/dist/index.js
CHANGED
|
@@ -20638,7 +20638,7 @@ var package_default = {
|
|
|
20638
20638
|
name: "@uipath/codedapp-tool",
|
|
20639
20639
|
author: "UiPath",
|
|
20640
20640
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
20641
|
-
version: "1.205.0-preview.
|
|
20641
|
+
version: "1.205.0-preview.300",
|
|
20642
20642
|
description: "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
|
|
20643
20643
|
keywords: [
|
|
20644
20644
|
"cli-tool",
|
|
@@ -30258,7 +30258,7 @@ var package_default2 = {
|
|
|
30258
30258
|
name: "@uipath/solution-sdk",
|
|
30259
30259
|
author: "UiPath",
|
|
30260
30260
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
30261
|
-
version: "1.205.0-preview.
|
|
30261
|
+
version: "1.205.0-preview.300",
|
|
30262
30262
|
repository: {
|
|
30263
30263
|
type: "git",
|
|
30264
30264
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -30318,7 +30318,7 @@ var package_default2 = {
|
|
|
30318
30318
|
"@uipath/filesystem": "workspace:*",
|
|
30319
30319
|
"@uipath/orchestrator-sdk": "workspace:*",
|
|
30320
30320
|
"@uipath/pipelines-sdk": "workspace:*",
|
|
30321
|
-
"@uipath/resource-builder-sdk": "
|
|
30321
|
+
"@uipath/resource-builder-sdk": "1.0.0-s205-17620",
|
|
30322
30322
|
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
30323
30323
|
"@uipath/studioweb-sdk": "workspace:*",
|
|
30324
30324
|
"@types/node": "^25.5.2",
|
|
@@ -30570,7 +30570,7 @@ var SUCCEEDED = "creationsucceeded";
|
|
|
30570
30570
|
var TERMINAL = new Set([SUCCEEDED, "creationfailed", "validationfailed"]);
|
|
30571
30571
|
// src/services/project-artifacts.ts
|
|
30572
30572
|
async function ensureProjectArtifacts(args) {
|
|
30573
|
-
const { addProjectArtifactsToSolutionAsync } = await import("./index-
|
|
30573
|
+
const { addProjectArtifactsToSolutionAsync } = await import("./index-cyp57dfe.js");
|
|
30574
30574
|
return addProjectArtifactsToSolutionAsync(args);
|
|
30575
30575
|
}
|
|
30576
30576
|
|
|
@@ -35685,4 +35685,4 @@ var registerCommands = async (program) => {
|
|
|
35685
35685
|
|
|
35686
35686
|
export { metadata, registerCommands };
|
|
35687
35687
|
|
|
35688
|
-
//# debugId=
|
|
35688
|
+
//# debugId=259E7A41B1CAAD7064756E2164756E21
|
|
@@ -21,6 +21,10 @@ var JsonSerializerNames = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer.js
|
|
24
|
+
var VERBATIM_VALUE_PROPERTIES = new Set([
|
|
25
|
+
"spec"
|
|
26
|
+
]);
|
|
27
|
+
|
|
24
28
|
class JsonSerializer {
|
|
25
29
|
serialize(value) {
|
|
26
30
|
if (value == null)
|
|
@@ -110,7 +114,9 @@ class JsonSerializer {
|
|
|
110
114
|
const result = {};
|
|
111
115
|
const currentClassName = obj.constructor?.name !== "Object" ? obj.constructor.name : className;
|
|
112
116
|
for (const [key, val] of Object.entries(obj))
|
|
113
|
-
if (
|
|
117
|
+
if (VERBATIM_VALUE_PROPERTIES.has(key))
|
|
118
|
+
result[key] = val;
|
|
119
|
+
else if (typeof val == "string")
|
|
114
120
|
result[key] = this.tryConvertEnumStringToCamelCase(val, currentClassName, key);
|
|
115
121
|
else if (Array.isArray(val))
|
|
116
122
|
result[key] = val.map((item) => {
|
|
@@ -339,4 +345,4 @@ class StreamSerializer {
|
|
|
339
345
|
}
|
|
340
346
|
export { JsonSerializerNames, JsonSerializer, CAMEL_CASE_ENUM_PROPERTIES, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES, PASCAL_CASE_ENUM_PROPERTIES, JsonSerializerFactory, JsonSerializerProxy, StreamSerializer };
|
|
341
347
|
|
|
342
|
-
//# debugId=
|
|
348
|
+
//# debugId=C9C96784831F2C9F64756E2164756E21
|