@salesforce/lds-worker-api 1.354.0 → 1.356.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.
@@ -1128,4 +1128,4 @@ if (process.env.NODE_ENV !== 'production') {
1128
1128
  }
1129
1129
 
1130
1130
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
1131
- // version: 1.354.0-dc8789df55
1131
+ // version: 1.356.0-5a2e6cd82a
@@ -4266,7 +4266,7 @@ function withDefaultLuvio(callback) {
4266
4266
  }
4267
4267
  callbacks.push(callback);
4268
4268
  }
4269
- // version: 1.354.0-dc8789df55
4269
+ // version: 1.356.0-5a2e6cd82a
4270
4270
 
4271
4271
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4272
4272
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5214,7 +5214,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
5214
5214
  const { apiFamily, name } = metadata;
5215
5215
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
5216
5216
  }
5217
- // version: 1.354.0-dc8789df55
5217
+ // version: 1.356.0-5a2e6cd82a
5218
5218
 
5219
5219
  /**
5220
5220
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -33990,7 +33990,7 @@ withDefaultLuvio((luvio) => {
33990
33990
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
33991
33991
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
33992
33992
  });
33993
- // version: 1.354.0-c6c04442c4
33993
+ // version: 1.356.0-d412b8de3d
33994
33994
 
33995
33995
  /**
33996
33996
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -80456,12 +80456,16 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
80456
80456
  /* global __nimbus */
80457
80457
  function chunkToBase64(chunk) {
80458
80458
  const bytes = new Uint8Array(chunk);
80459
- const binary = String.fromCharCode.apply(null, bytes);
80459
+ const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
80460
+ let binary = '';
80461
+ for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {
80462
+ binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK_SIZE));
80463
+ }
80460
80464
  return btoa(binary);
80461
80465
  }
80462
80466
  async function streamBufferToBinaryStore(binaryStore, file, mimeType) {
80463
80467
  const uri = await binaryStore.createStream(mimeType);
80464
- const CHUNK_SIZE = 64 * 1024; // 64KB
80468
+ const CHUNK_SIZE = 1024 * 1024 * 2; // 2mb
80465
80469
  const fileSize = file.size;
80466
80470
  let offset = 0;
80467
80471
  try {
@@ -93093,7 +93097,7 @@ register$1({
93093
93097
  id: '@salesforce/lds-network-adapter',
93094
93098
  instrument: instrument$2,
93095
93099
  });
93096
- // version: 1.354.0-dc8789df55
93100
+ // version: 1.356.0-5a2e6cd82a
93097
93101
 
93098
93102
  const { create: create$2, keys: keys$2 } = Object;
93099
93103
  const { stringify, parse } = JSON;
@@ -116988,7 +116992,7 @@ register$1({
116988
116992
  configuration: { ...configurationForGraphQLAdapters$1 },
116989
116993
  instrument: instrument$1,
116990
116994
  });
116991
- // version: 1.354.0-c6c04442c4
116995
+ // version: 1.356.0-d412b8de3d
116992
116996
 
116993
116997
  // On core the unstable adapters are re-exported with different names,
116994
116998
  // we want to match them here.
@@ -117140,7 +117144,7 @@ withDefaultLuvio((luvio) => {
117140
117144
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
117141
117145
  graphQLImperative = ldsAdapter;
117142
117146
  });
117143
- // version: 1.354.0-c6c04442c4
117147
+ // version: 1.356.0-d412b8de3d
117144
117148
 
117145
117149
  var gqlApi = /*#__PURE__*/Object.freeze({
117146
117150
  __proto__: null,
@@ -117932,7 +117936,7 @@ const callbacks$1 = [];
117932
117936
  function register(r) {
117933
117937
  callbacks$1.forEach((callback) => callback(r));
117934
117938
  }
117935
- // version: 1.354.0-dc8789df55
117939
+ // version: 1.356.0-5a2e6cd82a
117936
117940
 
117937
117941
  /**
117938
117942
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -119012,4 +119016,4 @@ const { luvio } = getRuntime();
119012
119016
  setDefaultLuvio({ luvio });
119013
119017
 
119014
119018
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
119015
- // version: 1.354.0-dc8789df55
119019
+ // version: 1.356.0-5a2e6cd82a
@@ -4272,7 +4272,7 @@
4272
4272
  }
4273
4273
  callbacks.push(callback);
4274
4274
  }
4275
- // version: 1.354.0-dc8789df55
4275
+ // version: 1.356.0-5a2e6cd82a
4276
4276
 
4277
4277
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4278
4278
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5220,7 +5220,7 @@
5220
5220
  const { apiFamily, name } = metadata;
5221
5221
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
5222
5222
  }
5223
- // version: 1.354.0-dc8789df55
5223
+ // version: 1.356.0-5a2e6cd82a
5224
5224
 
5225
5225
  /**
5226
5226
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -33996,7 +33996,7 @@
33996
33996
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
33997
33997
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
33998
33998
  });
33999
- // version: 1.354.0-c6c04442c4
33999
+ // version: 1.356.0-d412b8de3d
34000
34000
 
34001
34001
  /**
34002
34002
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -80462,12 +80462,16 @@
80462
80462
  /* global __nimbus */
80463
80463
  function chunkToBase64(chunk) {
80464
80464
  const bytes = new Uint8Array(chunk);
80465
- const binary = String.fromCharCode.apply(null, bytes);
80465
+ const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
80466
+ let binary = '';
80467
+ for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {
80468
+ binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK_SIZE));
80469
+ }
80466
80470
  return btoa(binary);
80467
80471
  }
80468
80472
  async function streamBufferToBinaryStore(binaryStore, file, mimeType) {
80469
80473
  const uri = await binaryStore.createStream(mimeType);
80470
- const CHUNK_SIZE = 64 * 1024; // 64KB
80474
+ const CHUNK_SIZE = 1024 * 1024 * 2; // 2mb
80471
80475
  const fileSize = file.size;
80472
80476
  let offset = 0;
80473
80477
  try {
@@ -93099,7 +93103,7 @@
93099
93103
  id: '@salesforce/lds-network-adapter',
93100
93104
  instrument: instrument$2,
93101
93105
  });
93102
- // version: 1.354.0-dc8789df55
93106
+ // version: 1.356.0-5a2e6cd82a
93103
93107
 
93104
93108
  const { create: create$2, keys: keys$2 } = Object;
93105
93109
  const { stringify, parse } = JSON;
@@ -116994,7 +116998,7 @@
116994
116998
  configuration: { ...configurationForGraphQLAdapters$1 },
116995
116999
  instrument: instrument$1,
116996
117000
  });
116997
- // version: 1.354.0-c6c04442c4
117001
+ // version: 1.356.0-d412b8de3d
116998
117002
 
116999
117003
  // On core the unstable adapters are re-exported with different names,
117000
117004
  // we want to match them here.
@@ -117146,7 +117150,7 @@
117146
117150
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
117147
117151
  graphQLImperative = ldsAdapter;
117148
117152
  });
117149
- // version: 1.354.0-c6c04442c4
117153
+ // version: 1.356.0-d412b8de3d
117150
117154
 
117151
117155
  var gqlApi = /*#__PURE__*/Object.freeze({
117152
117156
  __proto__: null,
@@ -117938,7 +117942,7 @@
117938
117942
  function register(r) {
117939
117943
  callbacks$1.forEach((callback) => callback(r));
117940
117944
  }
117941
- // version: 1.354.0-dc8789df55
117945
+ // version: 1.356.0-5a2e6cd82a
117942
117946
 
117943
117947
  /**
117944
117948
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -119037,4 +119041,4 @@
119037
119041
  exports.subscribeToAdapter = subscribeToAdapter;
119038
119042
 
119039
119043
  }));
119040
- // version: 1.354.0-dc8789df55
119044
+ // version: 1.356.0-5a2e6cd82a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.354.0",
3
+ "version": "1.356.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
38
- "@salesforce/lds-adapters-graphql": "^1.354.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.354.0",
40
- "@salesforce/lds-default-luvio": "^1.354.0",
41
- "@salesforce/lds-drafts": "^1.354.0",
42
- "@salesforce/lds-graphql-parser": "^1.354.0",
43
- "@salesforce/lds-luvio-engine": "^1.354.0",
44
- "@salesforce/lds-runtime-mobile": "^1.354.0",
45
- "@salesforce/nimbus-plugin-lds": "^1.354.0",
38
+ "@salesforce/lds-adapters-graphql": "^1.356.0",
39
+ "@salesforce/lds-adapters-uiapi": "^1.356.0",
40
+ "@salesforce/lds-default-luvio": "^1.356.0",
41
+ "@salesforce/lds-drafts": "^1.356.0",
42
+ "@salesforce/lds-graphql-parser": "^1.356.0",
43
+ "@salesforce/lds-luvio-engine": "^1.356.0",
44
+ "@salesforce/lds-runtime-mobile": "^1.356.0",
45
+ "@salesforce/nimbus-plugin-lds": "^1.356.0",
46
46
  "ajv": "^8.11.0",
47
47
  "glob": "^7.1.5",
48
48
  "nimbus-types": "^2.0.0-alpha1",