@salesforce/lds-worker-api 1.146.0 → 1.147.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/sfdc/es/ldsWorkerApi.js +2 -2
- package/dist/sfdc/es/types/executeAdapter.d.ts +7 -1
- package/dist/standalone/es/lds-worker-api.js +17 -11
- package/dist/standalone/es/types/executeAdapter.d.ts +7 -1
- package/dist/standalone/umd/lds-worker-api.js +17 -11
- package/dist/standalone/umd/types/executeAdapter.d.ts +7 -1
- package/package.json +1 -1
|
@@ -185,7 +185,7 @@ function buildAdapterRequestContext(nativeRequestContext) {
|
|
|
185
185
|
cachePolicy: buildCachePolicy(cachePolicy),
|
|
186
186
|
priority,
|
|
187
187
|
};
|
|
188
|
-
if (observabilityContext !== undefined) {
|
|
188
|
+
if (observabilityContext !== undefined && observabilityContext !== null) {
|
|
189
189
|
requestContext.requestCorrelator = {
|
|
190
190
|
observabilityContext,
|
|
191
191
|
};
|
|
@@ -758,4 +758,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
758
758
|
}
|
|
759
759
|
|
|
760
760
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
761
|
-
// version: 1.
|
|
761
|
+
// version: 1.147.0-f9a768a91
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
1
|
+
import type { AdapterRequestContext, CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
2
|
import type { DraftQueueItemMetadata } from '@salesforce/lds-drafts';
|
|
3
3
|
import type { NativeErrorResponse } from './responses';
|
|
4
4
|
import type { ObservabilityContext } from '@salesforce/lds-runtime-mobile';
|
|
@@ -31,6 +31,12 @@ interface NativeAdapterRequestContext {
|
|
|
31
31
|
observabilityContext?: NativeObservabilityContext;
|
|
32
32
|
luvioEventObserver?: NativeLuvioEventObserver;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Coerces a request context passed in from native to a luvio request context
|
|
36
|
+
* @param nativeRequestContext request context passed in from native
|
|
37
|
+
* @returns Coerced luvio request context
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildAdapterRequestContext(nativeRequestContext: NativeAdapterRequestContext | undefined): AdapterRequestContext | undefined;
|
|
34
40
|
/**
|
|
35
41
|
* Executes the adapter with the given adapterId and config. Will call onSnapshot
|
|
36
42
|
* callback with data or error. Returns an unsubscribe function that should
|
|
@@ -3801,7 +3801,7 @@ function withDefaultLuvio(callback) {
|
|
|
3801
3801
|
}
|
|
3802
3802
|
callbacks.push(callback);
|
|
3803
3803
|
}
|
|
3804
|
-
// version: 1.
|
|
3804
|
+
// version: 1.147.0-f9a768a91
|
|
3805
3805
|
|
|
3806
3806
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3807
3807
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15225,7 +15225,7 @@ function parseAndVisit(source) {
|
|
|
15225
15225
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15226
15226
|
return luvioDocumentNode;
|
|
15227
15227
|
}
|
|
15228
|
-
// version: 1.
|
|
15228
|
+
// version: 1.147.0-f9a768a91
|
|
15229
15229
|
|
|
15230
15230
|
function unwrap(data) {
|
|
15231
15231
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16138,7 +16138,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16138
16138
|
const { apiFamily, name } = metadata;
|
|
16139
16139
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16140
16140
|
}
|
|
16141
|
-
// version: 1.
|
|
16141
|
+
// version: 1.147.0-f9a768a91
|
|
16142
16142
|
|
|
16143
16143
|
/**
|
|
16144
16144
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44008,7 +44008,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44008
44008
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44009
44009
|
});
|
|
44010
44010
|
});
|
|
44011
|
-
// version: 1.
|
|
44011
|
+
// version: 1.147.0-10ad1ac43
|
|
44012
44012
|
|
|
44013
44013
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44014
44014
|
|
|
@@ -59786,6 +59786,7 @@ function primingSessionFactory(config) {
|
|
|
59786
59786
|
let lazyDraftQueue;
|
|
59787
59787
|
let lazyDraftManager;
|
|
59788
59788
|
let lazyLuvio;
|
|
59789
|
+
let lazyEnvironment;
|
|
59789
59790
|
let lazyBaseDurableStore;
|
|
59790
59791
|
let lazyNetworkAdapter;
|
|
59791
59792
|
let lazyObjectInfoService;
|
|
@@ -59793,7 +59794,10 @@ let lazyObjectInfoService;
|
|
|
59793
59794
|
* This returns the LDS on Mobile Runtime singleton object.
|
|
59794
59795
|
*/
|
|
59795
59796
|
function getRuntime() {
|
|
59796
|
-
if (lazyLuvio === undefined ||
|
|
59797
|
+
if (lazyLuvio === undefined ||
|
|
59798
|
+
lazyEnvironment === undefined ||
|
|
59799
|
+
lazyDraftManager === undefined ||
|
|
59800
|
+
lazyDraftQueue === undefined) {
|
|
59797
59801
|
// coerce runtime provided userID values to the 18 character version used in LDS
|
|
59798
59802
|
const userId = getRecordId18(caseSensitiveUserId);
|
|
59799
59803
|
if (userId === undefined || userId.length !== 18) {
|
|
@@ -59851,7 +59855,8 @@ function getRuntime() {
|
|
|
59851
59855
|
isDraftId: isGenerated,
|
|
59852
59856
|
}, draftEnv);
|
|
59853
59857
|
draftEnv = performQuickActionDraftEnvironment(lazyLuvio, draftEnv, quickActionHandler);
|
|
59854
|
-
|
|
59858
|
+
lazyEnvironment = draftEnv;
|
|
59859
|
+
lazyLuvio = new Luvio(lazyEnvironment, {
|
|
59855
59860
|
instrument: instrumentLuvio,
|
|
59856
59861
|
});
|
|
59857
59862
|
// Currently instruments store runtime perf
|
|
@@ -59896,6 +59901,7 @@ function getRuntime() {
|
|
|
59896
59901
|
}
|
|
59897
59902
|
return {
|
|
59898
59903
|
luvio: lazyLuvio,
|
|
59904
|
+
environment: lazyEnvironment,
|
|
59899
59905
|
draftManager: lazyDraftManager,
|
|
59900
59906
|
draftQueue: lazyDraftQueue,
|
|
59901
59907
|
createPrimingSession: (config) => {
|
|
@@ -59921,7 +59927,7 @@ register({
|
|
|
59921
59927
|
id: '@salesforce/lds-network-adapter',
|
|
59922
59928
|
instrument: instrument$1,
|
|
59923
59929
|
});
|
|
59924
|
-
// version: 1.
|
|
59930
|
+
// version: 1.147.0-f9a768a91
|
|
59925
59931
|
|
|
59926
59932
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59927
59933
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -80766,7 +80772,7 @@ register({
|
|
|
80766
80772
|
configuration: { ...configurationForGraphQLAdapters },
|
|
80767
80773
|
instrument,
|
|
80768
80774
|
});
|
|
80769
|
-
// version: 1.
|
|
80775
|
+
// version: 1.147.0-10ad1ac43
|
|
80770
80776
|
|
|
80771
80777
|
// On core the unstable adapters are re-exported with different names,
|
|
80772
80778
|
|
|
@@ -83004,7 +83010,7 @@ withDefaultLuvio((luvio) => {
|
|
|
83004
83010
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
83005
83011
|
graphQLImperative = ldsAdapter;
|
|
83006
83012
|
});
|
|
83007
|
-
// version: 1.
|
|
83013
|
+
// version: 1.147.0-10ad1ac43
|
|
83008
83014
|
|
|
83009
83015
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
83010
83016
|
__proto__: null,
|
|
@@ -83156,7 +83162,7 @@ function buildAdapterRequestContext(nativeRequestContext) {
|
|
|
83156
83162
|
cachePolicy: buildCachePolicy(cachePolicy),
|
|
83157
83163
|
priority,
|
|
83158
83164
|
};
|
|
83159
|
-
if (observabilityContext !== undefined) {
|
|
83165
|
+
if (observabilityContext !== undefined && observabilityContext !== null) {
|
|
83160
83166
|
requestContext.requestCorrelator = {
|
|
83161
83167
|
observabilityContext,
|
|
83162
83168
|
};
|
|
@@ -83693,4 +83699,4 @@ const { luvio } = getRuntime();
|
|
|
83693
83699
|
setDefaultLuvio({ luvio });
|
|
83694
83700
|
|
|
83695
83701
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
83696
|
-
// version: 1.
|
|
83702
|
+
// version: 1.147.0-f9a768a91
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
1
|
+
import type { AdapterRequestContext, CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
2
|
import type { DraftQueueItemMetadata } from '@salesforce/lds-drafts';
|
|
3
3
|
import type { NativeErrorResponse } from './responses';
|
|
4
4
|
import type { ObservabilityContext } from '@salesforce/lds-runtime-mobile';
|
|
@@ -31,6 +31,12 @@ interface NativeAdapterRequestContext {
|
|
|
31
31
|
observabilityContext?: NativeObservabilityContext;
|
|
32
32
|
luvioEventObserver?: NativeLuvioEventObserver;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Coerces a request context passed in from native to a luvio request context
|
|
36
|
+
* @param nativeRequestContext request context passed in from native
|
|
37
|
+
* @returns Coerced luvio request context
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildAdapterRequestContext(nativeRequestContext: NativeAdapterRequestContext | undefined): AdapterRequestContext | undefined;
|
|
34
40
|
/**
|
|
35
41
|
* Executes the adapter with the given adapterId and config. Will call onSnapshot
|
|
36
42
|
* callback with data or error. Returns an unsubscribe function that should
|
|
@@ -3809,7 +3809,7 @@
|
|
|
3809
3809
|
}
|
|
3810
3810
|
callbacks.push(callback);
|
|
3811
3811
|
}
|
|
3812
|
-
// version: 1.
|
|
3812
|
+
// version: 1.147.0-f9a768a91
|
|
3813
3813
|
|
|
3814
3814
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3815
3815
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15233,7 +15233,7 @@
|
|
|
15233
15233
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15234
15234
|
return luvioDocumentNode;
|
|
15235
15235
|
}
|
|
15236
|
-
// version: 1.
|
|
15236
|
+
// version: 1.147.0-f9a768a91
|
|
15237
15237
|
|
|
15238
15238
|
function unwrap(data) {
|
|
15239
15239
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16146,7 +16146,7 @@
|
|
|
16146
16146
|
const { apiFamily, name } = metadata;
|
|
16147
16147
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16148
16148
|
}
|
|
16149
|
-
// version: 1.
|
|
16149
|
+
// version: 1.147.0-f9a768a91
|
|
16150
16150
|
|
|
16151
16151
|
/**
|
|
16152
16152
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44016,7 +44016,7 @@
|
|
|
44016
44016
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44017
44017
|
});
|
|
44018
44018
|
});
|
|
44019
|
-
// version: 1.
|
|
44019
|
+
// version: 1.147.0-10ad1ac43
|
|
44020
44020
|
|
|
44021
44021
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44022
44022
|
|
|
@@ -59794,6 +59794,7 @@
|
|
|
59794
59794
|
let lazyDraftQueue;
|
|
59795
59795
|
let lazyDraftManager;
|
|
59796
59796
|
let lazyLuvio;
|
|
59797
|
+
let lazyEnvironment;
|
|
59797
59798
|
let lazyBaseDurableStore;
|
|
59798
59799
|
let lazyNetworkAdapter;
|
|
59799
59800
|
let lazyObjectInfoService;
|
|
@@ -59801,7 +59802,10 @@
|
|
|
59801
59802
|
* This returns the LDS on Mobile Runtime singleton object.
|
|
59802
59803
|
*/
|
|
59803
59804
|
function getRuntime() {
|
|
59804
|
-
if (lazyLuvio === undefined ||
|
|
59805
|
+
if (lazyLuvio === undefined ||
|
|
59806
|
+
lazyEnvironment === undefined ||
|
|
59807
|
+
lazyDraftManager === undefined ||
|
|
59808
|
+
lazyDraftQueue === undefined) {
|
|
59805
59809
|
// coerce runtime provided userID values to the 18 character version used in LDS
|
|
59806
59810
|
const userId = getRecordId18(caseSensitiveUserId);
|
|
59807
59811
|
if (userId === undefined || userId.length !== 18) {
|
|
@@ -59859,7 +59863,8 @@
|
|
|
59859
59863
|
isDraftId: isGenerated,
|
|
59860
59864
|
}, draftEnv);
|
|
59861
59865
|
draftEnv = performQuickActionDraftEnvironment(lazyLuvio, draftEnv, quickActionHandler);
|
|
59862
|
-
|
|
59866
|
+
lazyEnvironment = draftEnv;
|
|
59867
|
+
lazyLuvio = new Luvio(lazyEnvironment, {
|
|
59863
59868
|
instrument: instrumentLuvio,
|
|
59864
59869
|
});
|
|
59865
59870
|
// Currently instruments store runtime perf
|
|
@@ -59904,6 +59909,7 @@
|
|
|
59904
59909
|
}
|
|
59905
59910
|
return {
|
|
59906
59911
|
luvio: lazyLuvio,
|
|
59912
|
+
environment: lazyEnvironment,
|
|
59907
59913
|
draftManager: lazyDraftManager,
|
|
59908
59914
|
draftQueue: lazyDraftQueue,
|
|
59909
59915
|
createPrimingSession: (config) => {
|
|
@@ -59929,7 +59935,7 @@
|
|
|
59929
59935
|
id: '@salesforce/lds-network-adapter',
|
|
59930
59936
|
instrument: instrument$1,
|
|
59931
59937
|
});
|
|
59932
|
-
// version: 1.
|
|
59938
|
+
// version: 1.147.0-f9a768a91
|
|
59933
59939
|
|
|
59934
59940
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59935
59941
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -80774,7 +80780,7 @@
|
|
|
80774
80780
|
configuration: { ...configurationForGraphQLAdapters },
|
|
80775
80781
|
instrument,
|
|
80776
80782
|
});
|
|
80777
|
-
// version: 1.
|
|
80783
|
+
// version: 1.147.0-10ad1ac43
|
|
80778
80784
|
|
|
80779
80785
|
// On core the unstable adapters are re-exported with different names,
|
|
80780
80786
|
|
|
@@ -83012,7 +83018,7 @@
|
|
|
83012
83018
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
83013
83019
|
graphQLImperative = ldsAdapter;
|
|
83014
83020
|
});
|
|
83015
|
-
// version: 1.
|
|
83021
|
+
// version: 1.147.0-10ad1ac43
|
|
83016
83022
|
|
|
83017
83023
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
83018
83024
|
__proto__: null,
|
|
@@ -83164,7 +83170,7 @@
|
|
|
83164
83170
|
cachePolicy: buildCachePolicy(cachePolicy),
|
|
83165
83171
|
priority,
|
|
83166
83172
|
};
|
|
83167
|
-
if (observabilityContext !== undefined) {
|
|
83173
|
+
if (observabilityContext !== undefined && observabilityContext !== null) {
|
|
83168
83174
|
requestContext.requestCorrelator = {
|
|
83169
83175
|
observabilityContext,
|
|
83170
83176
|
};
|
|
@@ -83718,4 +83724,4 @@
|
|
|
83718
83724
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
83719
83725
|
|
|
83720
83726
|
}));
|
|
83721
|
-
// version: 1.
|
|
83727
|
+
// version: 1.147.0-f9a768a91
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
1
|
+
import type { AdapterRequestContext, CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
2
|
import type { DraftQueueItemMetadata } from '@salesforce/lds-drafts';
|
|
3
3
|
import type { NativeErrorResponse } from './responses';
|
|
4
4
|
import type { ObservabilityContext } from '@salesforce/lds-runtime-mobile';
|
|
@@ -31,6 +31,12 @@ interface NativeAdapterRequestContext {
|
|
|
31
31
|
observabilityContext?: NativeObservabilityContext;
|
|
32
32
|
luvioEventObserver?: NativeLuvioEventObserver;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Coerces a request context passed in from native to a luvio request context
|
|
36
|
+
* @param nativeRequestContext request context passed in from native
|
|
37
|
+
* @returns Coerced luvio request context
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildAdapterRequestContext(nativeRequestContext: NativeAdapterRequestContext | undefined): AdapterRequestContext | undefined;
|
|
34
40
|
/**
|
|
35
41
|
* Executes the adapter with the given adapterId and config. Will call onSnapshot
|
|
36
42
|
* callback with data or error. Returns an unsubscribe function that should
|