@salesforce/lds-runtime-mobile 1.452.0 → 1.454.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 +25 -12
- package/dist/types/instrumentation/metrics.d.ts +1 -1
- package/package.json +33 -33
- package/sfdc/main.js +25 -12
- package/sfdc/types/instrumentation/metrics.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -42749,19 +42749,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
42749
42749
|
actionDataChanged = true;
|
|
42750
42750
|
}
|
|
42751
42751
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
42752
|
-
// Killswitch CLOSED (default) —
|
|
42752
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
42753
42753
|
// recognizable server error body) is retried with the SAME key, so the
|
|
42754
42754
|
// server can dedupe a write that may already have committed at the origin.
|
|
42755
|
-
//
|
|
42756
|
-
//
|
|
42757
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
42758
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
42759
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
42760
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
42761
|
-
// collision (new body), or when the user edits an errored draft
|
|
42762
|
-
// (mergeActions/handleReplaceAction).
|
|
42755
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
42756
|
+
// key is preserved.
|
|
42763
42757
|
shouldRetry = true;
|
|
42764
42758
|
}
|
|
42759
|
+
else {
|
|
42760
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
42761
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
42762
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
42763
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
42764
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
42765
|
+
//
|
|
42766
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
42767
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
42768
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
42769
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
42770
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
42771
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
42772
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
42773
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
42774
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
42775
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
42776
|
+
actionDataChanged = true;
|
|
42777
|
+
}
|
|
42765
42778
|
}
|
|
42766
42779
|
if (response.status === HttpStatusCode$1.BadRequest &&
|
|
42767
42780
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -59318,7 +59331,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59318
59331
|
},
|
|
59319
59332
|
};
|
|
59320
59333
|
}
|
|
59321
|
-
// version: 1.
|
|
59334
|
+
// version: 1.454.0-4223ab4365
|
|
59322
59335
|
|
|
59323
59336
|
/**
|
|
59324
59337
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59344,7 +59357,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59344
59357
|
},
|
|
59345
59358
|
};
|
|
59346
59359
|
}
|
|
59347
|
-
// version: 1.
|
|
59360
|
+
// version: 1.454.0-4223ab4365
|
|
59348
59361
|
|
|
59349
59362
|
function findExecutableOperation(input) {
|
|
59350
59363
|
const operations = input.query.definitions.filter(
|
|
@@ -62056,4 +62069,4 @@ register({
|
|
|
62056
62069
|
});
|
|
62057
62070
|
|
|
62058
62071
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
62059
|
-
// version: 1.
|
|
62072
|
+
// version: 1.454.0-4223ab4365
|
|
@@ -38,7 +38,7 @@ export declare function reportDraftQueueDurableOperation(op: string, segment: st
|
|
|
38
38
|
* the action's targetId/tag or any request body/field values.
|
|
39
39
|
*/
|
|
40
40
|
export declare function reportDraftActionUploadError(error: unknown, handlerId: string, attempt: number): void;
|
|
41
|
-
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'generic-400-killswitch';
|
|
41
|
+
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'server-validation-400' | 'generic-400-killswitch';
|
|
42
42
|
/**
|
|
43
43
|
* Emits a single greppable Splunk log line (and an o11y counter) every time a draft's
|
|
44
44
|
* Idempotency-Key is rotated — i.e. replaced with a fresh uuid rather than reused on
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.454.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,43 +32,43 @@
|
|
|
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.26.
|
|
36
|
-
"@conduit-client/service-bindings-lwc": "3.26.
|
|
37
|
-
"@conduit-client/service-provisioner": "3.26.
|
|
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.26.3",
|
|
36
|
+
"@conduit-client/service-bindings-lwc": "3.26.3",
|
|
37
|
+
"@conduit-client/service-provisioner": "3.26.3",
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "^1.454.0",
|
|
39
|
+
"@salesforce/lds-bindings": "^1.454.0",
|
|
40
|
+
"@salesforce/lds-instrumentation": "^1.454.0",
|
|
41
|
+
"@salesforce/lds-luvio-service": "^1.454.0",
|
|
42
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.454.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.26.
|
|
49
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.26.
|
|
50
|
-
"@conduit-client/command-fetch-network": "3.26.
|
|
51
|
-
"@conduit-client/command-http-normalized-cache-control": "3.26.
|
|
52
|
-
"@conduit-client/command-network": "3.26.
|
|
53
|
-
"@conduit-client/service-cache": "3.26.
|
|
54
|
-
"@conduit-client/service-cache-control": "3.26.
|
|
55
|
-
"@conduit-client/service-cache-inclusion-policy": "3.26.
|
|
56
|
-
"@conduit-client/service-fetch-network": "3.26.
|
|
57
|
-
"@conduit-client/service-instrument-command": "3.26.
|
|
58
|
-
"@conduit-client/service-instrumentation": "3.26.
|
|
59
|
-
"@conduit-client/service-pubsub": "3.26.
|
|
60
|
-
"@conduit-client/service-store": "3.26.
|
|
61
|
-
"@conduit-client/utils": "3.26.
|
|
62
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
63
|
-
"@salesforce/lds-drafts": "^1.
|
|
64
|
-
"@salesforce/lds-durable-records": "^1.
|
|
65
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
66
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
67
|
-
"@salesforce/lds-store-binary": "^1.
|
|
68
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
69
|
-
"@salesforce/lds-store-sql": "^1.
|
|
70
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
71
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
48
|
+
"@conduit-client/command-aura-network": "3.26.3",
|
|
49
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.26.3",
|
|
50
|
+
"@conduit-client/command-fetch-network": "3.26.3",
|
|
51
|
+
"@conduit-client/command-http-normalized-cache-control": "3.26.3",
|
|
52
|
+
"@conduit-client/command-network": "3.26.3",
|
|
53
|
+
"@conduit-client/service-cache": "3.26.3",
|
|
54
|
+
"@conduit-client/service-cache-control": "3.26.3",
|
|
55
|
+
"@conduit-client/service-cache-inclusion-policy": "3.26.3",
|
|
56
|
+
"@conduit-client/service-fetch-network": "3.26.3",
|
|
57
|
+
"@conduit-client/service-instrument-command": "3.26.3",
|
|
58
|
+
"@conduit-client/service-instrumentation": "3.26.3",
|
|
59
|
+
"@conduit-client/service-pubsub": "3.26.3",
|
|
60
|
+
"@conduit-client/service-store": "3.26.3",
|
|
61
|
+
"@conduit-client/utils": "3.26.3",
|
|
62
|
+
"@salesforce/lds-adapters-graphql": "^1.454.0",
|
|
63
|
+
"@salesforce/lds-drafts": "^1.454.0",
|
|
64
|
+
"@salesforce/lds-durable-records": "^1.454.0",
|
|
65
|
+
"@salesforce/lds-network-adapter": "^1.454.0",
|
|
66
|
+
"@salesforce/lds-network-nimbus": "^1.454.0",
|
|
67
|
+
"@salesforce/lds-store-binary": "^1.454.0",
|
|
68
|
+
"@salesforce/lds-store-nimbus": "^1.454.0",
|
|
69
|
+
"@salesforce/lds-store-sql": "^1.454.0",
|
|
70
|
+
"@salesforce/lds-utils-adapters": "^1.454.0",
|
|
71
|
+
"@salesforce/nimbus-plugin-lds": "^1.454.0",
|
|
72
72
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
73
73
|
"wait-for-expect": "^3.0.2"
|
|
74
74
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -42749,19 +42749,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
42749
42749
|
actionDataChanged = true;
|
|
42750
42750
|
}
|
|
42751
42751
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
42752
|
-
// Killswitch CLOSED (default) —
|
|
42752
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
42753
42753
|
// recognizable server error body) is retried with the SAME key, so the
|
|
42754
42754
|
// server can dedupe a write that may already have committed at the origin.
|
|
42755
|
-
//
|
|
42756
|
-
//
|
|
42757
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
42758
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
42759
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
42760
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
42761
|
-
// collision (new body), or when the user edits an errored draft
|
|
42762
|
-
// (mergeActions/handleReplaceAction).
|
|
42755
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
42756
|
+
// key is preserved.
|
|
42763
42757
|
shouldRetry = true;
|
|
42764
42758
|
}
|
|
42759
|
+
else {
|
|
42760
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
42761
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
42762
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
42763
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
42764
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
42765
|
+
//
|
|
42766
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
42767
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
42768
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
42769
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
42770
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
42771
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
42772
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
42773
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
42774
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
42775
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
42776
|
+
actionDataChanged = true;
|
|
42777
|
+
}
|
|
42765
42778
|
}
|
|
42766
42779
|
if (response.status === HttpStatusCode$1.BadRequest &&
|
|
42767
42780
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -59318,7 +59331,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59318
59331
|
},
|
|
59319
59332
|
};
|
|
59320
59333
|
}
|
|
59321
|
-
// version: 1.
|
|
59334
|
+
// version: 1.454.0-4223ab4365
|
|
59322
59335
|
|
|
59323
59336
|
/**
|
|
59324
59337
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59344,7 +59357,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59344
59357
|
},
|
|
59345
59358
|
};
|
|
59346
59359
|
}
|
|
59347
|
-
// version: 1.
|
|
59360
|
+
// version: 1.454.0-4223ab4365
|
|
59348
59361
|
|
|
59349
59362
|
function findExecutableOperation(input) {
|
|
59350
59363
|
const operations = input.query.definitions.filter(
|
|
@@ -62056,4 +62069,4 @@ register({
|
|
|
62056
62069
|
});
|
|
62057
62070
|
|
|
62058
62071
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
62059
|
-
// version: 1.
|
|
62072
|
+
// version: 1.454.0-4223ab4365
|
|
@@ -38,7 +38,7 @@ export declare function reportDraftQueueDurableOperation(op: string, segment: st
|
|
|
38
38
|
* the action's targetId/tag or any request body/field values.
|
|
39
39
|
*/
|
|
40
40
|
export declare function reportDraftActionUploadError(error: unknown, handlerId: string, attempt: number): void;
|
|
41
|
-
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'generic-400-killswitch';
|
|
41
|
+
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'server-validation-400' | 'generic-400-killswitch';
|
|
42
42
|
/**
|
|
43
43
|
* Emits a single greppable Splunk log line (and an o11y counter) every time a draft's
|
|
44
44
|
* Idempotency-Key is rotated — i.e. replaced with a fresh uuid rather than reused on
|