@salesforce/lds-worker-api 1.290.0 → 1.291.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.
|
@@ -1074,4 +1074,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1077
|
-
// version: 1.
|
|
1077
|
+
// version: 1.291.0-8df6969f6
|
|
@@ -4190,7 +4190,7 @@ function withDefaultLuvio(callback) {
|
|
|
4190
4190
|
}
|
|
4191
4191
|
callbacks.push(callback);
|
|
4192
4192
|
}
|
|
4193
|
-
// version: 1.
|
|
4193
|
+
// version: 1.291.0-8df6969f6
|
|
4194
4194
|
|
|
4195
4195
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4196
4196
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15698,7 +15698,7 @@ function gql(literals, ...subs) {
|
|
|
15698
15698
|
}
|
|
15699
15699
|
return superResult;
|
|
15700
15700
|
}
|
|
15701
|
-
// version: 1.
|
|
15701
|
+
// version: 1.291.0-8df6969f6
|
|
15702
15702
|
|
|
15703
15703
|
function unwrap(data) {
|
|
15704
15704
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16623,7 +16623,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16623
16623
|
const { apiFamily, name } = metadata;
|
|
16624
16624
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16625
16625
|
}
|
|
16626
|
-
// version: 1.
|
|
16626
|
+
// version: 1.291.0-8df6969f6
|
|
16627
16627
|
|
|
16628
16628
|
/**
|
|
16629
16629
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -38013,7 +38013,7 @@ function generateClientToken(offset) {
|
|
|
38013
38013
|
}
|
|
38014
38014
|
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
38015
38015
|
// base64 character set, plus padding character (=)
|
|
38016
|
-
const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
38016
|
+
const b64$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
38017
38017
|
function base64Encode(input) {
|
|
38018
38018
|
let bitmap, a, b, c;
|
|
38019
38019
|
let result = "", i = 0;
|
|
@@ -38025,8 +38025,8 @@ function base64Encode(input) {
|
|
|
38025
38025
|
throw new TypeError("Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. " + input);
|
|
38026
38026
|
}
|
|
38027
38027
|
bitmap = (a << 16) | (b << 8) | c;
|
|
38028
|
-
result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63)
|
|
38029
|
-
+ b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63);
|
|
38028
|
+
result += b64$1.charAt(bitmap >> 18 & 63) + b64$1.charAt(bitmap >> 12 & 63)
|
|
38029
|
+
+ b64$1.charAt(bitmap >> 6 & 63) + b64$1.charAt(bitmap & 63);
|
|
38030
38030
|
}
|
|
38031
38031
|
// If there's need of padding, replace the last 'A's with equal signs
|
|
38032
38032
|
return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result;
|
|
@@ -42927,7 +42927,14 @@ const createRecord_ConfigPropertyMetadata = [
|
|
|
42927
42927
|
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$13(createRecord_ConfigPropertyMetadata);
|
|
42928
42928
|
|
|
42929
42929
|
function onResponseSuccess(luvio, response, recordIngest, conflictMap) {
|
|
42930
|
-
const { body } = response;
|
|
42930
|
+
const { body, status } = response;
|
|
42931
|
+
if (status === HttpStatusCode$1.NoContent) {
|
|
42932
|
+
const syntheticSnapshot = {
|
|
42933
|
+
state: 'Fulfilled',
|
|
42934
|
+
data: {},
|
|
42935
|
+
};
|
|
42936
|
+
return luvio.storeBroadcast().then(() => syntheticSnapshot);
|
|
42937
|
+
}
|
|
42931
42938
|
const selections = buildSelectionFromRecord(body);
|
|
42932
42939
|
const key = keyBuilder$26(luvio, {
|
|
42933
42940
|
recordId: body.id,
|
|
@@ -43156,11 +43163,23 @@ function validateAdapterConfig$2$1(untrustedConfig, configPropertyNames) {
|
|
|
43156
43163
|
return config;
|
|
43157
43164
|
}
|
|
43158
43165
|
|
|
43166
|
+
const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
|
|
43159
43167
|
function getHeaders(clientOptions) {
|
|
43160
43168
|
const headers = {};
|
|
43161
43169
|
if (untrustedIsObject$2(clientOptions)) {
|
|
43162
43170
|
if (typeof clientOptions.ifUnmodifiedSince === 'string') {
|
|
43163
43171
|
headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
|
|
43172
|
+
// HTTP standard format date is expected by UI-API
|
|
43173
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
|
|
43174
|
+
// A component built for Connect API must use If-Unmodified-Since
|
|
43175
|
+
// dates formatted as ISO 8601, which does not match the HTTP spec.
|
|
43176
|
+
// For compatibility, convert the date to match the standard.
|
|
43177
|
+
if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
|
|
43178
|
+
const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
|
|
43179
|
+
if (utcString !== 'Invalid Date') {
|
|
43180
|
+
headers.ifUnmodifiedSince = utcString;
|
|
43181
|
+
}
|
|
43182
|
+
}
|
|
43164
43183
|
}
|
|
43165
43184
|
}
|
|
43166
43185
|
return headers;
|
|
@@ -43179,6 +43198,14 @@ function buildNetworkSnapshot$2$1(luvio, config, clientOptions) {
|
|
|
43179
43198
|
const recordIngest = createRecordIngest(fieldTrie, optionalFieldTrie, conflictMap);
|
|
43180
43199
|
return luvio.dispatchResourceRequest(request).then((response) => {
|
|
43181
43200
|
return luvio.handleSuccessResponse(() => {
|
|
43201
|
+
if (response.status === HttpStatusCode$1.NoContent) {
|
|
43202
|
+
const syntheticSnapshot = {
|
|
43203
|
+
state: 'Fulfilled',
|
|
43204
|
+
data: {},
|
|
43205
|
+
};
|
|
43206
|
+
luvio.storeEvict(keyBuilder$26(luvio, { recordId }));
|
|
43207
|
+
return luvio.storeBroadcast().then(() => syntheticSnapshot);
|
|
43208
|
+
}
|
|
43182
43209
|
const snapshot = ingestRecordResponse(luvio, response, recordId, recordIngest, conflictMap);
|
|
43183
43210
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
43184
43211
|
}, () => {
|
|
@@ -44188,7 +44215,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44188
44215
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44189
44216
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44190
44217
|
});
|
|
44191
|
-
// version: 1.
|
|
44218
|
+
// version: 1.291.0-79b8ea231
|
|
44192
44219
|
|
|
44193
44220
|
var ldsIdempotencyWriteDisabled = {
|
|
44194
44221
|
isOpen: function (e) {
|
|
@@ -53407,6 +53434,32 @@ async function readIngestionTimestampForKey(key, query) {
|
|
|
53407
53434
|
return ingestionTimestamp;
|
|
53408
53435
|
}
|
|
53409
53436
|
|
|
53437
|
+
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53438
|
+
// base64 character set, plus padding character (=)
|
|
53439
|
+
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53440
|
+
function btoaPolyfill(input) {
|
|
53441
|
+
let bitmap, a, b, c;
|
|
53442
|
+
let result = '', i = 0;
|
|
53443
|
+
const rest = input.length % 3; // To determine the final padding
|
|
53444
|
+
for (; i < input.length;) {
|
|
53445
|
+
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53446
|
+
(b = input.charCodeAt(i++)) > 255 ||
|
|
53447
|
+
(c = input.charCodeAt(i++)) > 255) {
|
|
53448
|
+
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53449
|
+
input);
|
|
53450
|
+
}
|
|
53451
|
+
bitmap = (a << 16) | (b << 8) | c;
|
|
53452
|
+
result +=
|
|
53453
|
+
b64.charAt((bitmap >> 18) & 63) +
|
|
53454
|
+
b64.charAt((bitmap >> 12) & 63) +
|
|
53455
|
+
b64.charAt((bitmap >> 6) & 63) +
|
|
53456
|
+
b64.charAt(bitmap & 63);
|
|
53457
|
+
}
|
|
53458
|
+
// If there's need of padding, replace the last 'A's with equal signs
|
|
53459
|
+
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53460
|
+
}
|
|
53461
|
+
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53462
|
+
|
|
53410
53463
|
function findSpanningField(name) {
|
|
53411
53464
|
return (field) => {
|
|
53412
53465
|
return (field.apiName === name ||
|
|
@@ -53688,6 +53741,11 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53688
53741
|
return { recordRepresentation, ingestionTimestamp };
|
|
53689
53742
|
};
|
|
53690
53743
|
}
|
|
53744
|
+
else if (field.name === 'cursor') {
|
|
53745
|
+
field.resolve = function ({ index }) {
|
|
53746
|
+
return base64encode(`v1:${index}`);
|
|
53747
|
+
};
|
|
53748
|
+
}
|
|
53691
53749
|
}
|
|
53692
53750
|
}
|
|
53693
53751
|
if (isRecordType(type)) {
|
|
@@ -53904,10 +53962,11 @@ async function connectionEdgeResolver(obj, _args, context) {
|
|
|
53904
53962
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53905
53963
|
return results.rows
|
|
53906
53964
|
.map((row) => row[0])
|
|
53907
|
-
.map((record) => {
|
|
53965
|
+
.map((record, index) => {
|
|
53908
53966
|
return {
|
|
53909
53967
|
record,
|
|
53910
53968
|
ingestionTimestamp,
|
|
53969
|
+
index,
|
|
53911
53970
|
};
|
|
53912
53971
|
});
|
|
53913
53972
|
}
|
|
@@ -62056,6 +62115,20 @@ class SqlitePrimingStore {
|
|
|
62056
62115
|
async writeBatch(records, overwrite) {
|
|
62057
62116
|
const idsToPrime = new Set();
|
|
62058
62117
|
const written = [];
|
|
62118
|
+
if (overwrite === true) {
|
|
62119
|
+
// if overwrite is true we need to raise change notifications so use the batchOperations
|
|
62120
|
+
const operations = {};
|
|
62121
|
+
for (const { record, metadata } of records) {
|
|
62122
|
+
const key = keyBuilder$26(this.getLuvio(), { recordId: record.id });
|
|
62123
|
+
idsToPrime.add(record.id);
|
|
62124
|
+
operations[key] = {
|
|
62125
|
+
data: record,
|
|
62126
|
+
metadata: { ...metadata, metadataVersion: DURABLE_METADATA_VERSION },
|
|
62127
|
+
};
|
|
62128
|
+
}
|
|
62129
|
+
await this.store.setEntries(operations, DefaultDurableSegment);
|
|
62130
|
+
return { written: Array.from(idsToPrime), conflicted: [], errors: [] };
|
|
62131
|
+
}
|
|
62059
62132
|
const statement = `${overwrite ? 'REPLACE' : 'INSERT or IGNORE'} INTO lds_data (key, data, metadata) VALUES ${records
|
|
62060
62133
|
.map((_) => `(?,?,?)`)
|
|
62061
62134
|
.join(',')} returning key;`;
|
|
@@ -62421,7 +62494,7 @@ register$1({
|
|
|
62421
62494
|
id: '@salesforce/lds-network-adapter',
|
|
62422
62495
|
instrument: instrument$2,
|
|
62423
62496
|
});
|
|
62424
|
-
// version: 1.
|
|
62497
|
+
// version: 1.291.0-8df6969f6
|
|
62425
62498
|
|
|
62426
62499
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62427
62500
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -82485,7 +82558,7 @@ register$1({
|
|
|
82485
82558
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82486
82559
|
instrument: instrument$1,
|
|
82487
82560
|
});
|
|
82488
|
-
// version: 1.
|
|
82561
|
+
// version: 1.291.0-79b8ea231
|
|
82489
82562
|
|
|
82490
82563
|
// On core the unstable adapters are re-exported with different names,
|
|
82491
82564
|
// we want to match them here.
|
|
@@ -84741,7 +84814,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84741
84814
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84742
84815
|
graphQLImperative = ldsAdapter;
|
|
84743
84816
|
});
|
|
84744
|
-
// version: 1.
|
|
84817
|
+
// version: 1.291.0-79b8ea231
|
|
84745
84818
|
|
|
84746
84819
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84747
84820
|
__proto__: null,
|
|
@@ -85479,7 +85552,7 @@ const callbacks$1 = [];
|
|
|
85479
85552
|
function register(r) {
|
|
85480
85553
|
callbacks$1.forEach((callback) => callback(r));
|
|
85481
85554
|
}
|
|
85482
|
-
// version: 1.
|
|
85555
|
+
// version: 1.291.0-8df6969f6
|
|
85483
85556
|
|
|
85484
85557
|
/**
|
|
85485
85558
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90441,4 +90514,4 @@ const { luvio } = getRuntime();
|
|
|
90441
90514
|
setDefaultLuvio({ luvio });
|
|
90442
90515
|
|
|
90443
90516
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90444
|
-
// version: 1.
|
|
90517
|
+
// version: 1.291.0-8df6969f6
|
|
@@ -4196,7 +4196,7 @@
|
|
|
4196
4196
|
}
|
|
4197
4197
|
callbacks.push(callback);
|
|
4198
4198
|
}
|
|
4199
|
-
// version: 1.
|
|
4199
|
+
// version: 1.291.0-8df6969f6
|
|
4200
4200
|
|
|
4201
4201
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4202
4202
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15704,7 +15704,7 @@
|
|
|
15704
15704
|
}
|
|
15705
15705
|
return superResult;
|
|
15706
15706
|
}
|
|
15707
|
-
// version: 1.
|
|
15707
|
+
// version: 1.291.0-8df6969f6
|
|
15708
15708
|
|
|
15709
15709
|
function unwrap(data) {
|
|
15710
15710
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16629,7 +16629,7 @@
|
|
|
16629
16629
|
const { apiFamily, name } = metadata;
|
|
16630
16630
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16631
16631
|
}
|
|
16632
|
-
// version: 1.
|
|
16632
|
+
// version: 1.291.0-8df6969f6
|
|
16633
16633
|
|
|
16634
16634
|
/**
|
|
16635
16635
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -38019,7 +38019,7 @@
|
|
|
38019
38019
|
}
|
|
38020
38020
|
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
38021
38021
|
// base64 character set, plus padding character (=)
|
|
38022
|
-
const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
38022
|
+
const b64$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
38023
38023
|
function base64Encode(input) {
|
|
38024
38024
|
let bitmap, a, b, c;
|
|
38025
38025
|
let result = "", i = 0;
|
|
@@ -38031,8 +38031,8 @@
|
|
|
38031
38031
|
throw new TypeError("Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. " + input);
|
|
38032
38032
|
}
|
|
38033
38033
|
bitmap = (a << 16) | (b << 8) | c;
|
|
38034
|
-
result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63)
|
|
38035
|
-
+ b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63);
|
|
38034
|
+
result += b64$1.charAt(bitmap >> 18 & 63) + b64$1.charAt(bitmap >> 12 & 63)
|
|
38035
|
+
+ b64$1.charAt(bitmap >> 6 & 63) + b64$1.charAt(bitmap & 63);
|
|
38036
38036
|
}
|
|
38037
38037
|
// If there's need of padding, replace the last 'A's with equal signs
|
|
38038
38038
|
return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result;
|
|
@@ -42933,7 +42933,14 @@
|
|
|
42933
42933
|
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$13(createRecord_ConfigPropertyMetadata);
|
|
42934
42934
|
|
|
42935
42935
|
function onResponseSuccess(luvio, response, recordIngest, conflictMap) {
|
|
42936
|
-
const { body } = response;
|
|
42936
|
+
const { body, status } = response;
|
|
42937
|
+
if (status === HttpStatusCode$1.NoContent) {
|
|
42938
|
+
const syntheticSnapshot = {
|
|
42939
|
+
state: 'Fulfilled',
|
|
42940
|
+
data: {},
|
|
42941
|
+
};
|
|
42942
|
+
return luvio.storeBroadcast().then(() => syntheticSnapshot);
|
|
42943
|
+
}
|
|
42937
42944
|
const selections = buildSelectionFromRecord(body);
|
|
42938
42945
|
const key = keyBuilder$26(luvio, {
|
|
42939
42946
|
recordId: body.id,
|
|
@@ -43162,11 +43169,23 @@
|
|
|
43162
43169
|
return config;
|
|
43163
43170
|
}
|
|
43164
43171
|
|
|
43172
|
+
const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
|
|
43165
43173
|
function getHeaders(clientOptions) {
|
|
43166
43174
|
const headers = {};
|
|
43167
43175
|
if (untrustedIsObject$2(clientOptions)) {
|
|
43168
43176
|
if (typeof clientOptions.ifUnmodifiedSince === 'string') {
|
|
43169
43177
|
headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
|
|
43178
|
+
// HTTP standard format date is expected by UI-API
|
|
43179
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
|
|
43180
|
+
// A component built for Connect API must use If-Unmodified-Since
|
|
43181
|
+
// dates formatted as ISO 8601, which does not match the HTTP spec.
|
|
43182
|
+
// For compatibility, convert the date to match the standard.
|
|
43183
|
+
if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
|
|
43184
|
+
const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
|
|
43185
|
+
if (utcString !== 'Invalid Date') {
|
|
43186
|
+
headers.ifUnmodifiedSince = utcString;
|
|
43187
|
+
}
|
|
43188
|
+
}
|
|
43170
43189
|
}
|
|
43171
43190
|
}
|
|
43172
43191
|
return headers;
|
|
@@ -43185,6 +43204,14 @@
|
|
|
43185
43204
|
const recordIngest = createRecordIngest(fieldTrie, optionalFieldTrie, conflictMap);
|
|
43186
43205
|
return luvio.dispatchResourceRequest(request).then((response) => {
|
|
43187
43206
|
return luvio.handleSuccessResponse(() => {
|
|
43207
|
+
if (response.status === HttpStatusCode$1.NoContent) {
|
|
43208
|
+
const syntheticSnapshot = {
|
|
43209
|
+
state: 'Fulfilled',
|
|
43210
|
+
data: {},
|
|
43211
|
+
};
|
|
43212
|
+
luvio.storeEvict(keyBuilder$26(luvio, { recordId }));
|
|
43213
|
+
return luvio.storeBroadcast().then(() => syntheticSnapshot);
|
|
43214
|
+
}
|
|
43188
43215
|
const snapshot = ingestRecordResponse(luvio, response, recordId, recordIngest, conflictMap);
|
|
43189
43216
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
43190
43217
|
}, () => {
|
|
@@ -44194,7 +44221,7 @@
|
|
|
44194
44221
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44195
44222
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44196
44223
|
});
|
|
44197
|
-
// version: 1.
|
|
44224
|
+
// version: 1.291.0-79b8ea231
|
|
44198
44225
|
|
|
44199
44226
|
var ldsIdempotencyWriteDisabled = {
|
|
44200
44227
|
isOpen: function (e) {
|
|
@@ -53413,6 +53440,32 @@
|
|
|
53413
53440
|
return ingestionTimestamp;
|
|
53414
53441
|
}
|
|
53415
53442
|
|
|
53443
|
+
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53444
|
+
// base64 character set, plus padding character (=)
|
|
53445
|
+
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53446
|
+
function btoaPolyfill(input) {
|
|
53447
|
+
let bitmap, a, b, c;
|
|
53448
|
+
let result = '', i = 0;
|
|
53449
|
+
const rest = input.length % 3; // To determine the final padding
|
|
53450
|
+
for (; i < input.length;) {
|
|
53451
|
+
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53452
|
+
(b = input.charCodeAt(i++)) > 255 ||
|
|
53453
|
+
(c = input.charCodeAt(i++)) > 255) {
|
|
53454
|
+
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53455
|
+
input);
|
|
53456
|
+
}
|
|
53457
|
+
bitmap = (a << 16) | (b << 8) | c;
|
|
53458
|
+
result +=
|
|
53459
|
+
b64.charAt((bitmap >> 18) & 63) +
|
|
53460
|
+
b64.charAt((bitmap >> 12) & 63) +
|
|
53461
|
+
b64.charAt((bitmap >> 6) & 63) +
|
|
53462
|
+
b64.charAt(bitmap & 63);
|
|
53463
|
+
}
|
|
53464
|
+
// If there's need of padding, replace the last 'A's with equal signs
|
|
53465
|
+
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53466
|
+
}
|
|
53467
|
+
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53468
|
+
|
|
53416
53469
|
function findSpanningField(name) {
|
|
53417
53470
|
return (field) => {
|
|
53418
53471
|
return (field.apiName === name ||
|
|
@@ -53694,6 +53747,11 @@
|
|
|
53694
53747
|
return { recordRepresentation, ingestionTimestamp };
|
|
53695
53748
|
};
|
|
53696
53749
|
}
|
|
53750
|
+
else if (field.name === 'cursor') {
|
|
53751
|
+
field.resolve = function ({ index }) {
|
|
53752
|
+
return base64encode(`v1:${index}`);
|
|
53753
|
+
};
|
|
53754
|
+
}
|
|
53697
53755
|
}
|
|
53698
53756
|
}
|
|
53699
53757
|
if (isRecordType(type)) {
|
|
@@ -53910,10 +53968,11 @@
|
|
|
53910
53968
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53911
53969
|
return results.rows
|
|
53912
53970
|
.map((row) => row[0])
|
|
53913
|
-
.map((record) => {
|
|
53971
|
+
.map((record, index) => {
|
|
53914
53972
|
return {
|
|
53915
53973
|
record,
|
|
53916
53974
|
ingestionTimestamp,
|
|
53975
|
+
index,
|
|
53917
53976
|
};
|
|
53918
53977
|
});
|
|
53919
53978
|
}
|
|
@@ -62062,6 +62121,20 @@
|
|
|
62062
62121
|
async writeBatch(records, overwrite) {
|
|
62063
62122
|
const idsToPrime = new Set();
|
|
62064
62123
|
const written = [];
|
|
62124
|
+
if (overwrite === true) {
|
|
62125
|
+
// if overwrite is true we need to raise change notifications so use the batchOperations
|
|
62126
|
+
const operations = {};
|
|
62127
|
+
for (const { record, metadata } of records) {
|
|
62128
|
+
const key = keyBuilder$26(this.getLuvio(), { recordId: record.id });
|
|
62129
|
+
idsToPrime.add(record.id);
|
|
62130
|
+
operations[key] = {
|
|
62131
|
+
data: record,
|
|
62132
|
+
metadata: { ...metadata, metadataVersion: DURABLE_METADATA_VERSION },
|
|
62133
|
+
};
|
|
62134
|
+
}
|
|
62135
|
+
await this.store.setEntries(operations, DefaultDurableSegment);
|
|
62136
|
+
return { written: Array.from(idsToPrime), conflicted: [], errors: [] };
|
|
62137
|
+
}
|
|
62065
62138
|
const statement = `${overwrite ? 'REPLACE' : 'INSERT or IGNORE'} INTO lds_data (key, data, metadata) VALUES ${records
|
|
62066
62139
|
.map((_) => `(?,?,?)`)
|
|
62067
62140
|
.join(',')} returning key;`;
|
|
@@ -62427,7 +62500,7 @@
|
|
|
62427
62500
|
id: '@salesforce/lds-network-adapter',
|
|
62428
62501
|
instrument: instrument$2,
|
|
62429
62502
|
});
|
|
62430
|
-
// version: 1.
|
|
62503
|
+
// version: 1.291.0-8df6969f6
|
|
62431
62504
|
|
|
62432
62505
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62433
62506
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -82491,7 +82564,7 @@
|
|
|
82491
82564
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82492
82565
|
instrument: instrument$1,
|
|
82493
82566
|
});
|
|
82494
|
-
// version: 1.
|
|
82567
|
+
// version: 1.291.0-79b8ea231
|
|
82495
82568
|
|
|
82496
82569
|
// On core the unstable adapters are re-exported with different names,
|
|
82497
82570
|
// we want to match them here.
|
|
@@ -84747,7 +84820,7 @@
|
|
|
84747
84820
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84748
84821
|
graphQLImperative = ldsAdapter;
|
|
84749
84822
|
});
|
|
84750
|
-
// version: 1.
|
|
84823
|
+
// version: 1.291.0-79b8ea231
|
|
84751
84824
|
|
|
84752
84825
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84753
84826
|
__proto__: null,
|
|
@@ -85485,7 +85558,7 @@
|
|
|
85485
85558
|
function register(r) {
|
|
85486
85559
|
callbacks$1.forEach((callback) => callback(r));
|
|
85487
85560
|
}
|
|
85488
|
-
// version: 1.
|
|
85561
|
+
// version: 1.291.0-8df6969f6
|
|
85489
85562
|
|
|
85490
85563
|
/**
|
|
85491
85564
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90466,4 +90539,4 @@
|
|
|
90466
90539
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90467
90540
|
|
|
90468
90541
|
}));
|
|
90469
|
-
// version: 1.
|
|
90542
|
+
// version: 1.291.0-8df6969f6
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.291.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-priming": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
46
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.291.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.291.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.291.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.291.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.291.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.291.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.291.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.291.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.291.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|