@salesforce/lds-runtime-mobile 1.434.0 → 1.435.0
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/main.js +102 -31
- package/package.json +34 -34
- package/sfdc/main.js +102 -31
package/dist/main.js
CHANGED
|
@@ -272,7 +272,11 @@ function buildAndDispatchGetRecordAggregateUi(recordId, req, params) {
|
|
|
272
272
|
queryParams: {},
|
|
273
273
|
headers: {},
|
|
274
274
|
};
|
|
275
|
-
|
|
275
|
+
// Re-enter the composed adapter (when registered) so routing and interceptors
|
|
276
|
+
// apply to the synthesized aggregate-ui sub-request. Fall back to the base
|
|
277
|
+
// adapter when unregistered (e.g. in lds-network-adapter unit tests).
|
|
278
|
+
const subRequestAdapter = networkAdapter;
|
|
279
|
+
return dispatchSplitRecordAggregateUiAction(recordId, subRequestAdapter, aggregateUiResourceRequest, resourceRequestContext);
|
|
276
280
|
}
|
|
277
281
|
const getRecordDispatcher = (req) => {
|
|
278
282
|
const { resourceRequest, networkAdapter, resourceRequestContext } = req;
|
|
@@ -333,7 +337,6 @@ function matchRecordsHandlers(path, resourceRequest) {
|
|
|
333
337
|
}
|
|
334
338
|
return null;
|
|
335
339
|
}
|
|
336
|
-
|
|
337
340
|
const defaultDispatcher = (req) => {
|
|
338
341
|
const { networkAdapter, resourceRequest, resourceRequestContext } = req;
|
|
339
342
|
return networkAdapter(resourceRequest, resourceRequestContext);
|
|
@@ -59001,7 +59004,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59001
59004
|
},
|
|
59002
59005
|
};
|
|
59003
59006
|
}
|
|
59004
|
-
// version: 1.
|
|
59007
|
+
// version: 1.435.0-5818ce3c48
|
|
59005
59008
|
|
|
59006
59009
|
/**
|
|
59007
59010
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59027,7 +59030,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59027
59030
|
},
|
|
59028
59031
|
};
|
|
59029
59032
|
}
|
|
59030
|
-
// version: 1.
|
|
59033
|
+
// version: 1.435.0-5818ce3c48
|
|
59031
59034
|
|
|
59032
59035
|
/*!
|
|
59033
59036
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59512,6 +59515,9 @@ function invalidSchemaResponseWithError(error) {
|
|
|
59512
59515
|
return err$1([error]);
|
|
59513
59516
|
}
|
|
59514
59517
|
function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
59518
|
+
return validateJsonSchemaInternal(data, schema, path, document, /* @__PURE__ */ new Map());
|
|
59519
|
+
}
|
|
59520
|
+
function validateJsonSchemaInternal(data, schema, path, document, visited) {
|
|
59515
59521
|
if (schema === true) return validSchemaResponse();
|
|
59516
59522
|
if (schema === false)
|
|
59517
59523
|
return invalidSchemaResponseWithError(
|
|
@@ -59520,22 +59526,22 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59520
59526
|
const dataType = data === null ? "null" : Array.isArray(data) ? "array" : typeof data;
|
|
59521
59527
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59522
59528
|
if ("anyOf" in schema) {
|
|
59523
|
-
errorCollector.append(validateAnyOf(data, schema, path, document));
|
|
59529
|
+
errorCollector.append(validateAnyOf(data, schema, path, document, visited));
|
|
59524
59530
|
} else if ("oneOf" in schema) {
|
|
59525
|
-
errorCollector.append(validateOneOf(data, schema, path, document));
|
|
59531
|
+
errorCollector.append(validateOneOf(data, schema, path, document, visited));
|
|
59526
59532
|
} else if ("allOf" in schema) {
|
|
59527
|
-
errorCollector.append(validateAllOf(data, schema, path, document));
|
|
59533
|
+
errorCollector.append(validateAllOf(data, schema, path, document, visited));
|
|
59528
59534
|
} else if ("not" in schema) {
|
|
59529
|
-
errorCollector.append(validateNot(data, schema, path, document));
|
|
59535
|
+
errorCollector.append(validateNot(data, schema, path, document, visited));
|
|
59530
59536
|
} else if ("$ref" in schema) {
|
|
59531
|
-
errorCollector.append(validateRef(data, schema, path, document));
|
|
59537
|
+
errorCollector.append(validateRef(data, schema, path, document, visited));
|
|
59532
59538
|
} else if ("type" in schema) {
|
|
59533
59539
|
if (schema.type === "object") {
|
|
59534
59540
|
if (dataType !== "object") {
|
|
59535
59541
|
errorCollector.add(incorrectTypeError("object", dataType, path));
|
|
59536
59542
|
} else {
|
|
59537
59543
|
errorCollector.append(
|
|
59538
|
-
validateObject(data, schema, path, document)
|
|
59544
|
+
validateObject(data, schema, path, document, visited)
|
|
59539
59545
|
);
|
|
59540
59546
|
}
|
|
59541
59547
|
} else if (schema.type === "array") {
|
|
@@ -59543,7 +59549,7 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59543
59549
|
errorCollector.add(incorrectTypeError("array", dataType, path));
|
|
59544
59550
|
} else {
|
|
59545
59551
|
errorCollector.append(
|
|
59546
|
-
validateArray(data, schema, path, document)
|
|
59552
|
+
validateArray(data, schema, path, document, visited)
|
|
59547
59553
|
);
|
|
59548
59554
|
}
|
|
59549
59555
|
} else {
|
|
@@ -59560,16 +59566,17 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59560
59566
|
}
|
|
59561
59567
|
return errorCollector.toValidationResponse();
|
|
59562
59568
|
}
|
|
59563
|
-
function validateAnyOf(data, schema, path, document) {
|
|
59569
|
+
function validateAnyOf(data, schema, path, document, visited) {
|
|
59564
59570
|
let isValid = false;
|
|
59565
59571
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59566
59572
|
for (let i = 0, { length } = schema.anyOf; i < length; i++) {
|
|
59567
59573
|
const element = schema.anyOf[i];
|
|
59568
|
-
const validationResponse =
|
|
59574
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59569
59575
|
data,
|
|
59570
59576
|
element,
|
|
59571
59577
|
`${path}.anyOf[${i}]`,
|
|
59572
|
-
document
|
|
59578
|
+
document,
|
|
59579
|
+
visited
|
|
59573
59580
|
);
|
|
59574
59581
|
if (validationResponse.isOk()) {
|
|
59575
59582
|
isValid = true;
|
|
@@ -59586,13 +59593,22 @@ function validateAnyOf(data, schema, path, document) {
|
|
|
59586
59593
|
}
|
|
59587
59594
|
return validSchemaResponse();
|
|
59588
59595
|
}
|
|
59589
|
-
function validateOneOf(data, schema, path, document) {
|
|
59596
|
+
function validateOneOf(data, schema, path, document, visited) {
|
|
59597
|
+
if (schema.discriminator !== void 0) {
|
|
59598
|
+
return validateDiscriminatedOneOf(data, schema.discriminator, path, document, visited);
|
|
59599
|
+
}
|
|
59590
59600
|
let validSubShemaPaths = [];
|
|
59591
59601
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59592
59602
|
for (let i = 0, { length } = schema.oneOf; i < length; i++) {
|
|
59593
59603
|
const element = schema.oneOf[i];
|
|
59594
59604
|
const oneOfPath = `${path}.oneOf[${i}]`;
|
|
59595
|
-
const validationResponse =
|
|
59605
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59606
|
+
data,
|
|
59607
|
+
element,
|
|
59608
|
+
oneOfPath,
|
|
59609
|
+
document,
|
|
59610
|
+
visited
|
|
59611
|
+
);
|
|
59596
59612
|
if (validationResponse.isOk()) {
|
|
59597
59613
|
validSubShemaPaths.push(oneOfPath);
|
|
59598
59614
|
} else {
|
|
@@ -59614,16 +59630,45 @@ function validateOneOf(data, schema, path, document) {
|
|
|
59614
59630
|
}
|
|
59615
59631
|
return validSchemaResponse();
|
|
59616
59632
|
}
|
|
59617
|
-
function
|
|
59633
|
+
function validateDiscriminatedOneOf(data, discriminator, path, document, visited) {
|
|
59634
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
59635
|
+
return invalidSchemaResponseWithError(incorrectTypeError("object", typeof data, path));
|
|
59636
|
+
}
|
|
59637
|
+
const { propertyName, mapping } = discriminator;
|
|
59638
|
+
const discriminatorValue = data[propertyName];
|
|
59639
|
+
if (discriminatorValue === void 0) {
|
|
59640
|
+
return invalidSchemaResponseWithError(
|
|
59641
|
+
new MissingRequiredPropertyError(
|
|
59642
|
+
`Object at path '${path}' is missing required discriminator property '${propertyName}'.`
|
|
59643
|
+
)
|
|
59644
|
+
);
|
|
59645
|
+
}
|
|
59646
|
+
if (typeof discriminatorValue !== "string") {
|
|
59647
|
+
return invalidSchemaResponseWithError(
|
|
59648
|
+
incorrectTypeError("string", typeof discriminatorValue, `${path}.${propertyName}`)
|
|
59649
|
+
);
|
|
59650
|
+
}
|
|
59651
|
+
const targetRef = mapping[discriminatorValue];
|
|
59652
|
+
if (targetRef === void 0) {
|
|
59653
|
+
return invalidSchemaResponseWithError(
|
|
59654
|
+
new JsonSchemaViolationError(
|
|
59655
|
+
`Discriminator value '${discriminatorValue}' at '${path}.${propertyName}' is not in the mapping. Expected one of: [${Object.keys(mapping).join(", ")}].`
|
|
59656
|
+
)
|
|
59657
|
+
);
|
|
59658
|
+
}
|
|
59659
|
+
return validateJsonSchemaInternal(data, { $ref: targetRef }, path, document, visited);
|
|
59660
|
+
}
|
|
59661
|
+
function validateAllOf(data, schema, path, document, visited) {
|
|
59618
59662
|
let isValid = true;
|
|
59619
59663
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59620
59664
|
for (let i = 0, { length } = schema.allOf; i < length; i++) {
|
|
59621
59665
|
const element = schema.allOf[i];
|
|
59622
|
-
const validationResponse =
|
|
59666
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59623
59667
|
data,
|
|
59624
59668
|
element,
|
|
59625
59669
|
`${path}.allOf[${i}]`,
|
|
59626
|
-
document
|
|
59670
|
+
document,
|
|
59671
|
+
visited
|
|
59627
59672
|
);
|
|
59628
59673
|
if (!validationResponse.isOk()) {
|
|
59629
59674
|
errorCollector.append(validationResponse);
|
|
@@ -59637,8 +59682,14 @@ function validateAllOf(data, schema, path, document) {
|
|
|
59637
59682
|
}
|
|
59638
59683
|
return errorCollector.toValidationResponse();
|
|
59639
59684
|
}
|
|
59640
|
-
function validateNot(data, schema, path, document) {
|
|
59641
|
-
const validationResponse =
|
|
59685
|
+
function validateNot(data, schema, path, document, visited) {
|
|
59686
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59687
|
+
data,
|
|
59688
|
+
schema.not,
|
|
59689
|
+
path,
|
|
59690
|
+
document,
|
|
59691
|
+
visited
|
|
59692
|
+
);
|
|
59642
59693
|
if (validationResponse.isOk()) {
|
|
59643
59694
|
return invalidSchemaResponseWithError(
|
|
59644
59695
|
new JsonSchemaViolationError(
|
|
@@ -59648,7 +59699,7 @@ function validateNot(data, schema, path, document) {
|
|
|
59648
59699
|
}
|
|
59649
59700
|
return validSchemaResponse();
|
|
59650
59701
|
}
|
|
59651
|
-
function validateObject(data, schema, path, document) {
|
|
59702
|
+
function validateObject(data, schema, path, document, visited) {
|
|
59652
59703
|
const schemaKeys = Object.keys(schema.properties);
|
|
59653
59704
|
const requiredKeys = new Set(schema.required);
|
|
59654
59705
|
const schemaKeySet = new Set(schemaKeys);
|
|
@@ -59656,11 +59707,12 @@ function validateObject(data, schema, path, document) {
|
|
|
59656
59707
|
Object.keys(data).forEach((key) => {
|
|
59657
59708
|
if (!schemaKeySet.has(key)) {
|
|
59658
59709
|
errorCollector.append(
|
|
59659
|
-
|
|
59710
|
+
validateJsonSchemaInternal(
|
|
59660
59711
|
data[key],
|
|
59661
59712
|
schema.additionalProperties,
|
|
59662
59713
|
`${path}.additionalProperties[${key}]`,
|
|
59663
|
-
document
|
|
59714
|
+
document,
|
|
59715
|
+
visited
|
|
59664
59716
|
)
|
|
59665
59717
|
);
|
|
59666
59718
|
}
|
|
@@ -59677,18 +59729,19 @@ function validateObject(data, schema, path, document) {
|
|
|
59677
59729
|
}
|
|
59678
59730
|
if (keyInData) {
|
|
59679
59731
|
errorCollector.append(
|
|
59680
|
-
|
|
59732
|
+
validateJsonSchemaInternal(
|
|
59681
59733
|
data[key],
|
|
59682
59734
|
schema.properties[key],
|
|
59683
59735
|
`${path}.${key}`,
|
|
59684
|
-
document
|
|
59736
|
+
document,
|
|
59737
|
+
visited
|
|
59685
59738
|
)
|
|
59686
59739
|
);
|
|
59687
59740
|
}
|
|
59688
59741
|
}
|
|
59689
59742
|
return errorCollector.toValidationResponse();
|
|
59690
59743
|
}
|
|
59691
|
-
function validateArray(data, schema, path, document) {
|
|
59744
|
+
function validateArray(data, schema, path, document, visited) {
|
|
59692
59745
|
if (schema.minItems !== void 0 && data.length < schema.minItems) {
|
|
59693
59746
|
return invalidSchemaResponseWithError(
|
|
59694
59747
|
new MinItemsViolationError(
|
|
@@ -59706,7 +59759,13 @@ function validateArray(data, schema, path, document) {
|
|
|
59706
59759
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59707
59760
|
data.forEach(
|
|
59708
59761
|
(element, index) => errorCollector.append(
|
|
59709
|
-
|
|
59762
|
+
validateJsonSchemaInternal(
|
|
59763
|
+
element,
|
|
59764
|
+
schema.items,
|
|
59765
|
+
`${path}[${index}]`,
|
|
59766
|
+
document,
|
|
59767
|
+
visited
|
|
59768
|
+
)
|
|
59710
59769
|
)
|
|
59711
59770
|
);
|
|
59712
59771
|
return errorCollector.toValidationResponse();
|
|
@@ -59741,7 +59800,7 @@ function validateScalar(data, schema, path) {
|
|
|
59741
59800
|
}
|
|
59742
59801
|
return validSchemaResponse();
|
|
59743
59802
|
}
|
|
59744
|
-
function validateRef(data, schema, path, document) {
|
|
59803
|
+
function validateRef(data, schema, path, document, visited) {
|
|
59745
59804
|
if (!schema.$ref.startsWith("#")) {
|
|
59746
59805
|
return invalidSchemaResponseWithError(
|
|
59747
59806
|
new InvalidRefError(
|
|
@@ -59749,11 +59808,23 @@ function validateRef(data, schema, path, document) {
|
|
|
59749
59808
|
)
|
|
59750
59809
|
);
|
|
59751
59810
|
}
|
|
59811
|
+
let refsForData = visited.get(data);
|
|
59812
|
+
if (refsForData !== void 0 && refsForData.has(schema.$ref)) {
|
|
59813
|
+
return validSchemaResponse();
|
|
59814
|
+
}
|
|
59815
|
+
if (refsForData === void 0) {
|
|
59816
|
+
refsForData = /* @__PURE__ */ new Set();
|
|
59817
|
+
visited.set(data, refsForData);
|
|
59818
|
+
}
|
|
59819
|
+
refsForData.add(schema.$ref);
|
|
59752
59820
|
try {
|
|
59753
59821
|
const schemaToValidate = findSchemaAtPath(document, schema.$ref);
|
|
59754
|
-
return
|
|
59822
|
+
return validateJsonSchemaInternal(data, schemaToValidate, path, document, visited);
|
|
59755
59823
|
} catch (e) {
|
|
59756
59824
|
return invalidSchemaResponseWithError(e);
|
|
59825
|
+
} finally {
|
|
59826
|
+
refsForData.delete(schema.$ref);
|
|
59827
|
+
if (refsForData.size === 0) visited.delete(data);
|
|
59757
59828
|
}
|
|
59758
59829
|
}
|
|
59759
59830
|
function validateEnum(data, enumValue, path) {
|
|
@@ -61690,4 +61761,4 @@ register({
|
|
|
61690
61761
|
});
|
|
61691
61762
|
|
|
61692
61763
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61693
|
-
// version: 1.
|
|
61764
|
+
// version: 1.435.0-5818ce3c48
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.435.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,44 +32,44 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@conduit-client/service-bindings-imperative": "3.19.
|
|
36
|
-
"@conduit-client/service-bindings-lwc": "3.19.
|
|
37
|
-
"@conduit-client/service-provisioner": "3.19.
|
|
38
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
39
|
-
"@salesforce/lds-bindings": "^1.
|
|
40
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
41
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
42
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
35
|
+
"@conduit-client/service-bindings-imperative": "3.19.5",
|
|
36
|
+
"@conduit-client/service-bindings-lwc": "3.19.5",
|
|
37
|
+
"@conduit-client/service-provisioner": "3.19.5",
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "^1.435.0",
|
|
39
|
+
"@salesforce/lds-bindings": "^1.435.0",
|
|
40
|
+
"@salesforce/lds-instrumentation": "^1.435.0",
|
|
41
|
+
"@salesforce/lds-luvio-service": "^1.435.0",
|
|
42
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.435.0",
|
|
43
43
|
"@salesforce/user": "0.0.21",
|
|
44
44
|
"o11y": "250.7.0",
|
|
45
45
|
"o11y_schema": "256.126.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@conduit-client/command-aura-network": "3.19.
|
|
49
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.19.
|
|
50
|
-
"@conduit-client/command-aura-resource-cache-control": "3.19.
|
|
51
|
-
"@conduit-client/command-fetch-network": "3.19.
|
|
52
|
-
"@conduit-client/command-http-normalized-cache-control": "3.19.
|
|
53
|
-
"@conduit-client/command-network": "3.19.
|
|
54
|
-
"@conduit-client/service-cache": "3.19.
|
|
55
|
-
"@conduit-client/service-cache-control": "3.19.
|
|
56
|
-
"@conduit-client/service-cache-inclusion-policy": "3.19.
|
|
57
|
-
"@conduit-client/service-fetch-network": "3.19.
|
|
58
|
-
"@conduit-client/service-instrument-command": "3.19.
|
|
59
|
-
"@conduit-client/service-instrumentation": "3.19.
|
|
60
|
-
"@conduit-client/service-pubsub": "3.19.
|
|
61
|
-
"@conduit-client/service-store": "3.19.
|
|
62
|
-
"@conduit-client/utils": "3.19.
|
|
63
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
64
|
-
"@salesforce/lds-drafts": "^1.
|
|
65
|
-
"@salesforce/lds-durable-records": "^1.
|
|
66
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
67
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
68
|
-
"@salesforce/lds-store-binary": "^1.
|
|
69
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
70
|
-
"@salesforce/lds-store-sql": "^1.
|
|
71
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
72
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
48
|
+
"@conduit-client/command-aura-network": "3.19.5",
|
|
49
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.19.5",
|
|
50
|
+
"@conduit-client/command-aura-resource-cache-control": "3.19.5",
|
|
51
|
+
"@conduit-client/command-fetch-network": "3.19.5",
|
|
52
|
+
"@conduit-client/command-http-normalized-cache-control": "3.19.5",
|
|
53
|
+
"@conduit-client/command-network": "3.19.5",
|
|
54
|
+
"@conduit-client/service-cache": "3.19.5",
|
|
55
|
+
"@conduit-client/service-cache-control": "3.19.5",
|
|
56
|
+
"@conduit-client/service-cache-inclusion-policy": "3.19.5",
|
|
57
|
+
"@conduit-client/service-fetch-network": "3.19.5",
|
|
58
|
+
"@conduit-client/service-instrument-command": "3.19.5",
|
|
59
|
+
"@conduit-client/service-instrumentation": "3.19.5",
|
|
60
|
+
"@conduit-client/service-pubsub": "3.19.5",
|
|
61
|
+
"@conduit-client/service-store": "3.19.5",
|
|
62
|
+
"@conduit-client/utils": "3.19.5",
|
|
63
|
+
"@salesforce/lds-adapters-graphql": "^1.435.0",
|
|
64
|
+
"@salesforce/lds-drafts": "^1.435.0",
|
|
65
|
+
"@salesforce/lds-durable-records": "^1.435.0",
|
|
66
|
+
"@salesforce/lds-network-adapter": "^1.435.0",
|
|
67
|
+
"@salesforce/lds-network-nimbus": "^1.435.0",
|
|
68
|
+
"@salesforce/lds-store-binary": "^1.435.0",
|
|
69
|
+
"@salesforce/lds-store-nimbus": "^1.435.0",
|
|
70
|
+
"@salesforce/lds-store-sql": "^1.435.0",
|
|
71
|
+
"@salesforce/lds-utils-adapters": "^1.435.0",
|
|
72
|
+
"@salesforce/nimbus-plugin-lds": "^1.435.0",
|
|
73
73
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
74
74
|
"wait-for-expect": "^3.0.2"
|
|
75
75
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -272,7 +272,11 @@ function buildAndDispatchGetRecordAggregateUi(recordId, req, params) {
|
|
|
272
272
|
queryParams: {},
|
|
273
273
|
headers: {},
|
|
274
274
|
};
|
|
275
|
-
|
|
275
|
+
// Re-enter the composed adapter (when registered) so routing and interceptors
|
|
276
|
+
// apply to the synthesized aggregate-ui sub-request. Fall back to the base
|
|
277
|
+
// adapter when unregistered (e.g. in lds-network-adapter unit tests).
|
|
278
|
+
const subRequestAdapter = networkAdapter;
|
|
279
|
+
return dispatchSplitRecordAggregateUiAction(recordId, subRequestAdapter, aggregateUiResourceRequest, resourceRequestContext);
|
|
276
280
|
}
|
|
277
281
|
const getRecordDispatcher = (req) => {
|
|
278
282
|
const { resourceRequest, networkAdapter, resourceRequestContext } = req;
|
|
@@ -333,7 +337,6 @@ function matchRecordsHandlers(path, resourceRequest) {
|
|
|
333
337
|
}
|
|
334
338
|
return null;
|
|
335
339
|
}
|
|
336
|
-
|
|
337
340
|
const defaultDispatcher = (req) => {
|
|
338
341
|
const { networkAdapter, resourceRequest, resourceRequestContext } = req;
|
|
339
342
|
return networkAdapter(resourceRequest, resourceRequestContext);
|
|
@@ -59001,7 +59004,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59001
59004
|
},
|
|
59002
59005
|
};
|
|
59003
59006
|
}
|
|
59004
|
-
// version: 1.
|
|
59007
|
+
// version: 1.435.0-5818ce3c48
|
|
59005
59008
|
|
|
59006
59009
|
/**
|
|
59007
59010
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59027,7 +59030,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59027
59030
|
},
|
|
59028
59031
|
};
|
|
59029
59032
|
}
|
|
59030
|
-
// version: 1.
|
|
59033
|
+
// version: 1.435.0-5818ce3c48
|
|
59031
59034
|
|
|
59032
59035
|
/*!
|
|
59033
59036
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59512,6 +59515,9 @@ function invalidSchemaResponseWithError(error) {
|
|
|
59512
59515
|
return err$1([error]);
|
|
59513
59516
|
}
|
|
59514
59517
|
function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
59518
|
+
return validateJsonSchemaInternal(data, schema, path, document, /* @__PURE__ */ new Map());
|
|
59519
|
+
}
|
|
59520
|
+
function validateJsonSchemaInternal(data, schema, path, document, visited) {
|
|
59515
59521
|
if (schema === true) return validSchemaResponse();
|
|
59516
59522
|
if (schema === false)
|
|
59517
59523
|
return invalidSchemaResponseWithError(
|
|
@@ -59520,22 +59526,22 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59520
59526
|
const dataType = data === null ? "null" : Array.isArray(data) ? "array" : typeof data;
|
|
59521
59527
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59522
59528
|
if ("anyOf" in schema) {
|
|
59523
|
-
errorCollector.append(validateAnyOf(data, schema, path, document));
|
|
59529
|
+
errorCollector.append(validateAnyOf(data, schema, path, document, visited));
|
|
59524
59530
|
} else if ("oneOf" in schema) {
|
|
59525
|
-
errorCollector.append(validateOneOf(data, schema, path, document));
|
|
59531
|
+
errorCollector.append(validateOneOf(data, schema, path, document, visited));
|
|
59526
59532
|
} else if ("allOf" in schema) {
|
|
59527
|
-
errorCollector.append(validateAllOf(data, schema, path, document));
|
|
59533
|
+
errorCollector.append(validateAllOf(data, schema, path, document, visited));
|
|
59528
59534
|
} else if ("not" in schema) {
|
|
59529
|
-
errorCollector.append(validateNot(data, schema, path, document));
|
|
59535
|
+
errorCollector.append(validateNot(data, schema, path, document, visited));
|
|
59530
59536
|
} else if ("$ref" in schema) {
|
|
59531
|
-
errorCollector.append(validateRef(data, schema, path, document));
|
|
59537
|
+
errorCollector.append(validateRef(data, schema, path, document, visited));
|
|
59532
59538
|
} else if ("type" in schema) {
|
|
59533
59539
|
if (schema.type === "object") {
|
|
59534
59540
|
if (dataType !== "object") {
|
|
59535
59541
|
errorCollector.add(incorrectTypeError("object", dataType, path));
|
|
59536
59542
|
} else {
|
|
59537
59543
|
errorCollector.append(
|
|
59538
|
-
validateObject(data, schema, path, document)
|
|
59544
|
+
validateObject(data, schema, path, document, visited)
|
|
59539
59545
|
);
|
|
59540
59546
|
}
|
|
59541
59547
|
} else if (schema.type === "array") {
|
|
@@ -59543,7 +59549,7 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59543
59549
|
errorCollector.add(incorrectTypeError("array", dataType, path));
|
|
59544
59550
|
} else {
|
|
59545
59551
|
errorCollector.append(
|
|
59546
|
-
validateArray(data, schema, path, document)
|
|
59552
|
+
validateArray(data, schema, path, document, visited)
|
|
59547
59553
|
);
|
|
59548
59554
|
}
|
|
59549
59555
|
} else {
|
|
@@ -59560,16 +59566,17 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59560
59566
|
}
|
|
59561
59567
|
return errorCollector.toValidationResponse();
|
|
59562
59568
|
}
|
|
59563
|
-
function validateAnyOf(data, schema, path, document) {
|
|
59569
|
+
function validateAnyOf(data, schema, path, document, visited) {
|
|
59564
59570
|
let isValid = false;
|
|
59565
59571
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59566
59572
|
for (let i = 0, { length } = schema.anyOf; i < length; i++) {
|
|
59567
59573
|
const element = schema.anyOf[i];
|
|
59568
|
-
const validationResponse =
|
|
59574
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59569
59575
|
data,
|
|
59570
59576
|
element,
|
|
59571
59577
|
`${path}.anyOf[${i}]`,
|
|
59572
|
-
document
|
|
59578
|
+
document,
|
|
59579
|
+
visited
|
|
59573
59580
|
);
|
|
59574
59581
|
if (validationResponse.isOk()) {
|
|
59575
59582
|
isValid = true;
|
|
@@ -59586,13 +59593,22 @@ function validateAnyOf(data, schema, path, document) {
|
|
|
59586
59593
|
}
|
|
59587
59594
|
return validSchemaResponse();
|
|
59588
59595
|
}
|
|
59589
|
-
function validateOneOf(data, schema, path, document) {
|
|
59596
|
+
function validateOneOf(data, schema, path, document, visited) {
|
|
59597
|
+
if (schema.discriminator !== void 0) {
|
|
59598
|
+
return validateDiscriminatedOneOf(data, schema.discriminator, path, document, visited);
|
|
59599
|
+
}
|
|
59590
59600
|
let validSubShemaPaths = [];
|
|
59591
59601
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59592
59602
|
for (let i = 0, { length } = schema.oneOf; i < length; i++) {
|
|
59593
59603
|
const element = schema.oneOf[i];
|
|
59594
59604
|
const oneOfPath = `${path}.oneOf[${i}]`;
|
|
59595
|
-
const validationResponse =
|
|
59605
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59606
|
+
data,
|
|
59607
|
+
element,
|
|
59608
|
+
oneOfPath,
|
|
59609
|
+
document,
|
|
59610
|
+
visited
|
|
59611
|
+
);
|
|
59596
59612
|
if (validationResponse.isOk()) {
|
|
59597
59613
|
validSubShemaPaths.push(oneOfPath);
|
|
59598
59614
|
} else {
|
|
@@ -59614,16 +59630,45 @@ function validateOneOf(data, schema, path, document) {
|
|
|
59614
59630
|
}
|
|
59615
59631
|
return validSchemaResponse();
|
|
59616
59632
|
}
|
|
59617
|
-
function
|
|
59633
|
+
function validateDiscriminatedOneOf(data, discriminator, path, document, visited) {
|
|
59634
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
59635
|
+
return invalidSchemaResponseWithError(incorrectTypeError("object", typeof data, path));
|
|
59636
|
+
}
|
|
59637
|
+
const { propertyName, mapping } = discriminator;
|
|
59638
|
+
const discriminatorValue = data[propertyName];
|
|
59639
|
+
if (discriminatorValue === void 0) {
|
|
59640
|
+
return invalidSchemaResponseWithError(
|
|
59641
|
+
new MissingRequiredPropertyError(
|
|
59642
|
+
`Object at path '${path}' is missing required discriminator property '${propertyName}'.`
|
|
59643
|
+
)
|
|
59644
|
+
);
|
|
59645
|
+
}
|
|
59646
|
+
if (typeof discriminatorValue !== "string") {
|
|
59647
|
+
return invalidSchemaResponseWithError(
|
|
59648
|
+
incorrectTypeError("string", typeof discriminatorValue, `${path}.${propertyName}`)
|
|
59649
|
+
);
|
|
59650
|
+
}
|
|
59651
|
+
const targetRef = mapping[discriminatorValue];
|
|
59652
|
+
if (targetRef === void 0) {
|
|
59653
|
+
return invalidSchemaResponseWithError(
|
|
59654
|
+
new JsonSchemaViolationError(
|
|
59655
|
+
`Discriminator value '${discriminatorValue}' at '${path}.${propertyName}' is not in the mapping. Expected one of: [${Object.keys(mapping).join(", ")}].`
|
|
59656
|
+
)
|
|
59657
|
+
);
|
|
59658
|
+
}
|
|
59659
|
+
return validateJsonSchemaInternal(data, { $ref: targetRef }, path, document, visited);
|
|
59660
|
+
}
|
|
59661
|
+
function validateAllOf(data, schema, path, document, visited) {
|
|
59618
59662
|
let isValid = true;
|
|
59619
59663
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59620
59664
|
for (let i = 0, { length } = schema.allOf; i < length; i++) {
|
|
59621
59665
|
const element = schema.allOf[i];
|
|
59622
|
-
const validationResponse =
|
|
59666
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59623
59667
|
data,
|
|
59624
59668
|
element,
|
|
59625
59669
|
`${path}.allOf[${i}]`,
|
|
59626
|
-
document
|
|
59670
|
+
document,
|
|
59671
|
+
visited
|
|
59627
59672
|
);
|
|
59628
59673
|
if (!validationResponse.isOk()) {
|
|
59629
59674
|
errorCollector.append(validationResponse);
|
|
@@ -59637,8 +59682,14 @@ function validateAllOf(data, schema, path, document) {
|
|
|
59637
59682
|
}
|
|
59638
59683
|
return errorCollector.toValidationResponse();
|
|
59639
59684
|
}
|
|
59640
|
-
function validateNot(data, schema, path, document) {
|
|
59641
|
-
const validationResponse =
|
|
59685
|
+
function validateNot(data, schema, path, document, visited) {
|
|
59686
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59687
|
+
data,
|
|
59688
|
+
schema.not,
|
|
59689
|
+
path,
|
|
59690
|
+
document,
|
|
59691
|
+
visited
|
|
59692
|
+
);
|
|
59642
59693
|
if (validationResponse.isOk()) {
|
|
59643
59694
|
return invalidSchemaResponseWithError(
|
|
59644
59695
|
new JsonSchemaViolationError(
|
|
@@ -59648,7 +59699,7 @@ function validateNot(data, schema, path, document) {
|
|
|
59648
59699
|
}
|
|
59649
59700
|
return validSchemaResponse();
|
|
59650
59701
|
}
|
|
59651
|
-
function validateObject(data, schema, path, document) {
|
|
59702
|
+
function validateObject(data, schema, path, document, visited) {
|
|
59652
59703
|
const schemaKeys = Object.keys(schema.properties);
|
|
59653
59704
|
const requiredKeys = new Set(schema.required);
|
|
59654
59705
|
const schemaKeySet = new Set(schemaKeys);
|
|
@@ -59656,11 +59707,12 @@ function validateObject(data, schema, path, document) {
|
|
|
59656
59707
|
Object.keys(data).forEach((key) => {
|
|
59657
59708
|
if (!schemaKeySet.has(key)) {
|
|
59658
59709
|
errorCollector.append(
|
|
59659
|
-
|
|
59710
|
+
validateJsonSchemaInternal(
|
|
59660
59711
|
data[key],
|
|
59661
59712
|
schema.additionalProperties,
|
|
59662
59713
|
`${path}.additionalProperties[${key}]`,
|
|
59663
|
-
document
|
|
59714
|
+
document,
|
|
59715
|
+
visited
|
|
59664
59716
|
)
|
|
59665
59717
|
);
|
|
59666
59718
|
}
|
|
@@ -59677,18 +59729,19 @@ function validateObject(data, schema, path, document) {
|
|
|
59677
59729
|
}
|
|
59678
59730
|
if (keyInData) {
|
|
59679
59731
|
errorCollector.append(
|
|
59680
|
-
|
|
59732
|
+
validateJsonSchemaInternal(
|
|
59681
59733
|
data[key],
|
|
59682
59734
|
schema.properties[key],
|
|
59683
59735
|
`${path}.${key}`,
|
|
59684
|
-
document
|
|
59736
|
+
document,
|
|
59737
|
+
visited
|
|
59685
59738
|
)
|
|
59686
59739
|
);
|
|
59687
59740
|
}
|
|
59688
59741
|
}
|
|
59689
59742
|
return errorCollector.toValidationResponse();
|
|
59690
59743
|
}
|
|
59691
|
-
function validateArray(data, schema, path, document) {
|
|
59744
|
+
function validateArray(data, schema, path, document, visited) {
|
|
59692
59745
|
if (schema.minItems !== void 0 && data.length < schema.minItems) {
|
|
59693
59746
|
return invalidSchemaResponseWithError(
|
|
59694
59747
|
new MinItemsViolationError(
|
|
@@ -59706,7 +59759,13 @@ function validateArray(data, schema, path, document) {
|
|
|
59706
59759
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59707
59760
|
data.forEach(
|
|
59708
59761
|
(element, index) => errorCollector.append(
|
|
59709
|
-
|
|
59762
|
+
validateJsonSchemaInternal(
|
|
59763
|
+
element,
|
|
59764
|
+
schema.items,
|
|
59765
|
+
`${path}[${index}]`,
|
|
59766
|
+
document,
|
|
59767
|
+
visited
|
|
59768
|
+
)
|
|
59710
59769
|
)
|
|
59711
59770
|
);
|
|
59712
59771
|
return errorCollector.toValidationResponse();
|
|
@@ -59741,7 +59800,7 @@ function validateScalar(data, schema, path) {
|
|
|
59741
59800
|
}
|
|
59742
59801
|
return validSchemaResponse();
|
|
59743
59802
|
}
|
|
59744
|
-
function validateRef(data, schema, path, document) {
|
|
59803
|
+
function validateRef(data, schema, path, document, visited) {
|
|
59745
59804
|
if (!schema.$ref.startsWith("#")) {
|
|
59746
59805
|
return invalidSchemaResponseWithError(
|
|
59747
59806
|
new InvalidRefError(
|
|
@@ -59749,11 +59808,23 @@ function validateRef(data, schema, path, document) {
|
|
|
59749
59808
|
)
|
|
59750
59809
|
);
|
|
59751
59810
|
}
|
|
59811
|
+
let refsForData = visited.get(data);
|
|
59812
|
+
if (refsForData !== void 0 && refsForData.has(schema.$ref)) {
|
|
59813
|
+
return validSchemaResponse();
|
|
59814
|
+
}
|
|
59815
|
+
if (refsForData === void 0) {
|
|
59816
|
+
refsForData = /* @__PURE__ */ new Set();
|
|
59817
|
+
visited.set(data, refsForData);
|
|
59818
|
+
}
|
|
59819
|
+
refsForData.add(schema.$ref);
|
|
59752
59820
|
try {
|
|
59753
59821
|
const schemaToValidate = findSchemaAtPath(document, schema.$ref);
|
|
59754
|
-
return
|
|
59822
|
+
return validateJsonSchemaInternal(data, schemaToValidate, path, document, visited);
|
|
59755
59823
|
} catch (e) {
|
|
59756
59824
|
return invalidSchemaResponseWithError(e);
|
|
59825
|
+
} finally {
|
|
59826
|
+
refsForData.delete(schema.$ref);
|
|
59827
|
+
if (refsForData.size === 0) visited.delete(data);
|
|
59757
59828
|
}
|
|
59758
59829
|
}
|
|
59759
59830
|
function validateEnum(data, enumValue, path) {
|
|
@@ -61690,4 +61761,4 @@ register({
|
|
|
61690
61761
|
});
|
|
61691
61762
|
|
|
61692
61763
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61693
|
-
// version: 1.
|
|
61764
|
+
// version: 1.435.0-5818ce3c48
|