@salesforce/lds-runtime-mobile 1.451.0-dev3 → 1.451.0-dev5
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 +16 -16
- package/sfdc/main.js +25 -12
- package/sfdc/types/instrumentation/metrics.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -42663,19 +42663,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
42663
42663
|
actionDataChanged = true;
|
|
42664
42664
|
}
|
|
42665
42665
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
42666
|
-
// Killswitch CLOSED (default) —
|
|
42666
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
42667
42667
|
// recognizable server error body) is retried with the SAME key, so the
|
|
42668
42668
|
// server can dedupe a write that may already have committed at the origin.
|
|
42669
|
-
//
|
|
42670
|
-
//
|
|
42671
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
42672
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
42673
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
42674
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
42675
|
-
// collision (new body), or when the user edits an errored draft
|
|
42676
|
-
// (mergeActions/handleReplaceAction).
|
|
42669
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
42670
|
+
// key is preserved.
|
|
42677
42671
|
shouldRetry = true;
|
|
42678
42672
|
}
|
|
42673
|
+
else {
|
|
42674
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
42675
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
42676
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
42677
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
42678
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
42679
|
+
//
|
|
42680
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
42681
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
42682
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
42683
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
42684
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
42685
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
42686
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
42687
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
42688
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
42689
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
42690
|
+
actionDataChanged = true;
|
|
42691
|
+
}
|
|
42679
42692
|
}
|
|
42680
42693
|
if (response.status === HttpStatusCode$1.BadRequest &&
|
|
42681
42694
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -59137,7 +59150,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59137
59150
|
},
|
|
59138
59151
|
};
|
|
59139
59152
|
}
|
|
59140
|
-
// version: 1.451.0-
|
|
59153
|
+
// version: 1.451.0-dev5-24c4844020
|
|
59141
59154
|
|
|
59142
59155
|
/**
|
|
59143
59156
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59163,7 +59176,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59163
59176
|
},
|
|
59164
59177
|
};
|
|
59165
59178
|
}
|
|
59166
|
-
// version: 1.451.0-
|
|
59179
|
+
// version: 1.451.0-dev5-24c4844020
|
|
59167
59180
|
|
|
59168
59181
|
function findExecutableOperation(input) {
|
|
59169
59182
|
const operations = input.query.definitions.filter(
|
|
@@ -61875,4 +61888,4 @@ register({
|
|
|
61875
61888
|
});
|
|
61876
61889
|
|
|
61877
61890
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61878
|
-
// version: 1.451.0-
|
|
61891
|
+
// version: 1.451.0-dev5-24c4844020
|
|
@@ -24,7 +24,7 @@ export declare function reportDraftActionEvent(state: 'added' | 'uploading' | 'c
|
|
|
24
24
|
* the action's targetId/tag or any request body/field values.
|
|
25
25
|
*/
|
|
26
26
|
export declare function reportDraftActionUploadError(error: unknown, handlerId: string, attempt: number): void;
|
|
27
|
-
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'generic-400-killswitch';
|
|
27
|
+
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'server-validation-400' | 'generic-400-killswitch';
|
|
28
28
|
/**
|
|
29
29
|
* Emits a single greppable Splunk log line (and an o11y counter) every time a draft's
|
|
30
30
|
* 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.451.0-
|
|
3
|
+
"version": "1.451.0-dev5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@conduit-client/service-bindings-imperative": "3.26.1-dev3",
|
|
36
36
|
"@conduit-client/service-bindings-lwc": "3.26.1-dev3",
|
|
37
37
|
"@conduit-client/service-provisioner": "3.26.1-dev3",
|
|
38
|
-
"@salesforce/lds-adapters-uiapi": "^1.451.0-
|
|
39
|
-
"@salesforce/lds-bindings": "^1.451.0-
|
|
40
|
-
"@salesforce/lds-instrumentation": "^1.451.0-
|
|
41
|
-
"@salesforce/lds-luvio-service": "^1.451.0-
|
|
42
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.451.0-
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "^1.451.0-dev5",
|
|
39
|
+
"@salesforce/lds-bindings": "^1.451.0-dev5",
|
|
40
|
+
"@salesforce/lds-instrumentation": "^1.451.0-dev5",
|
|
41
|
+
"@salesforce/lds-luvio-service": "^1.451.0-dev5",
|
|
42
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.451.0-dev5",
|
|
43
43
|
"@salesforce/user": "0.0.21",
|
|
44
44
|
"o11y": "250.7.0",
|
|
45
45
|
"o11y_schema": "256.126.0"
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"@conduit-client/service-pubsub": "3.26.1-dev3",
|
|
60
60
|
"@conduit-client/service-store": "3.26.1-dev3",
|
|
61
61
|
"@conduit-client/utils": "3.26.1-dev3",
|
|
62
|
-
"@salesforce/lds-adapters-graphql": "^1.451.0-
|
|
63
|
-
"@salesforce/lds-drafts": "^1.451.0-
|
|
64
|
-
"@salesforce/lds-durable-records": "^1.451.0-
|
|
65
|
-
"@salesforce/lds-network-adapter": "^1.451.0-
|
|
66
|
-
"@salesforce/lds-network-nimbus": "^1.451.0-
|
|
67
|
-
"@salesforce/lds-store-binary": "^1.451.0-
|
|
68
|
-
"@salesforce/lds-store-nimbus": "^1.451.0-
|
|
69
|
-
"@salesforce/lds-store-sql": "^1.451.0-
|
|
70
|
-
"@salesforce/lds-utils-adapters": "^1.451.0-
|
|
71
|
-
"@salesforce/nimbus-plugin-lds": "^1.451.0-
|
|
62
|
+
"@salesforce/lds-adapters-graphql": "^1.451.0-dev5",
|
|
63
|
+
"@salesforce/lds-drafts": "^1.451.0-dev5",
|
|
64
|
+
"@salesforce/lds-durable-records": "^1.451.0-dev5",
|
|
65
|
+
"@salesforce/lds-network-adapter": "^1.451.0-dev5",
|
|
66
|
+
"@salesforce/lds-network-nimbus": "^1.451.0-dev5",
|
|
67
|
+
"@salesforce/lds-store-binary": "^1.451.0-dev5",
|
|
68
|
+
"@salesforce/lds-store-nimbus": "^1.451.0-dev5",
|
|
69
|
+
"@salesforce/lds-store-sql": "^1.451.0-dev5",
|
|
70
|
+
"@salesforce/lds-utils-adapters": "^1.451.0-dev5",
|
|
71
|
+
"@salesforce/nimbus-plugin-lds": "^1.451.0-dev5",
|
|
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
|
@@ -42663,19 +42663,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
42663
42663
|
actionDataChanged = true;
|
|
42664
42664
|
}
|
|
42665
42665
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
42666
|
-
// Killswitch CLOSED (default) —
|
|
42666
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
42667
42667
|
// recognizable server error body) is retried with the SAME key, so the
|
|
42668
42668
|
// server can dedupe a write that may already have committed at the origin.
|
|
42669
|
-
//
|
|
42670
|
-
//
|
|
42671
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
42672
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
42673
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
42674
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
42675
|
-
// collision (new body), or when the user edits an errored draft
|
|
42676
|
-
// (mergeActions/handleReplaceAction).
|
|
42669
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
42670
|
+
// key is preserved.
|
|
42677
42671
|
shouldRetry = true;
|
|
42678
42672
|
}
|
|
42673
|
+
else {
|
|
42674
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
42675
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
42676
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
42677
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
42678
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
42679
|
+
//
|
|
42680
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
42681
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
42682
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
42683
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
42684
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
42685
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
42686
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
42687
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
42688
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
42689
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
42690
|
+
actionDataChanged = true;
|
|
42691
|
+
}
|
|
42679
42692
|
}
|
|
42680
42693
|
if (response.status === HttpStatusCode$1.BadRequest &&
|
|
42681
42694
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -59137,7 +59150,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59137
59150
|
},
|
|
59138
59151
|
};
|
|
59139
59152
|
}
|
|
59140
|
-
// version: 1.451.0-
|
|
59153
|
+
// version: 1.451.0-dev5-24c4844020
|
|
59141
59154
|
|
|
59142
59155
|
/**
|
|
59143
59156
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59163,7 +59176,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59163
59176
|
},
|
|
59164
59177
|
};
|
|
59165
59178
|
}
|
|
59166
|
-
// version: 1.451.0-
|
|
59179
|
+
// version: 1.451.0-dev5-24c4844020
|
|
59167
59180
|
|
|
59168
59181
|
function findExecutableOperation(input) {
|
|
59169
59182
|
const operations = input.query.definitions.filter(
|
|
@@ -61875,4 +61888,4 @@ register({
|
|
|
61875
61888
|
});
|
|
61876
61889
|
|
|
61877
61890
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61878
|
-
// version: 1.451.0-
|
|
61891
|
+
// version: 1.451.0-dev5-24c4844020
|
|
@@ -24,7 +24,7 @@ export declare function reportDraftActionEvent(state: 'added' | 'uploading' | 'c
|
|
|
24
24
|
* the action's targetId/tag or any request body/field values.
|
|
25
25
|
*/
|
|
26
26
|
export declare function reportDraftActionUploadError(error: unknown, handlerId: string, attempt: number): void;
|
|
27
|
-
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'generic-400-killswitch';
|
|
27
|
+
export type IdempotencyKeyRotationReason = 'idempotency-error' | 'backdating-collision' | 'merge-actions' | 'server-validation-400' | 'generic-400-killswitch';
|
|
28
28
|
/**
|
|
29
29
|
* Emits a single greppable Splunk log line (and an o11y counter) every time a draft's
|
|
30
30
|
* Idempotency-Key is rotated — i.e. replaced with a fresh uuid rather than reused on
|