@salesforce/lds-worker-api 1.214.1 → 1.215.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.
@@ -795,4 +795,4 @@ if (process.env.NODE_ENV !== 'production') {
795
795
  }
796
796
 
797
797
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
798
- // version: 1.214.1-04b93f721
798
+ // version: 1.215.0-bad85aa50
@@ -3898,7 +3898,7 @@ function withDefaultLuvio(callback) {
3898
3898
  }
3899
3899
  callbacks.push(callback);
3900
3900
  }
3901
- // version: 1.214.1-04b93f721
3901
+ // version: 1.215.0-bad85aa50
3902
3902
 
3903
3903
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3904
3904
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15331,7 +15331,7 @@ function parseAndVisit(source) {
15331
15331
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15332
15332
  return luvioDocumentNode;
15333
15333
  }
15334
- // version: 1.214.1-04b93f721
15334
+ // version: 1.215.0-bad85aa50
15335
15335
 
15336
15336
  function unwrap(data) {
15337
15337
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16254,7 +16254,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16254
16254
  const { apiFamily, name } = metadata;
16255
16255
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16256
16256
  }
16257
- // version: 1.214.1-04b93f721
16257
+ // version: 1.215.0-bad85aa50
16258
16258
 
16259
16259
  /**
16260
16260
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -17441,26 +17441,29 @@ const RECORD_ID_DECODER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456';
17441
17441
  * @returns An 18-char record id, and throws error if an invalid record id was provided.
17442
17442
  */
17443
17443
  function getRecordId18(value) {
17444
- if (!isString$1(value)) {
17445
- return undefined;
17446
- }
17447
- else if (value.length === 18) {
17448
- return value;
17449
- }
17450
- else if (value.length === 15) {
17451
- // Add the 3 character suffix
17452
- let recordId = value;
17453
- for (let offset = 0; offset < 15; offset += 5) {
17454
- let decodeValue = 0;
17455
- for (let bit = 0; bit < 5; bit++) {
17456
- const c = value[offset + bit];
17457
- if (c >= 'A' && c <= 'Z') {
17458
- decodeValue += 1 << bit;
17444
+ if (isString$1(value)) {
17445
+ if (value.length === 18) {
17446
+ return value;
17447
+ }
17448
+ else if (value.length === 15) {
17449
+ // Add the 3 character suffix
17450
+ let recordId = value;
17451
+ for (let offset = 0; offset < 15; offset += 5) {
17452
+ let decodeValue = 0;
17453
+ for (let bit = 0; bit < 5; bit++) {
17454
+ const c = value[offset + bit];
17455
+ if (c >= 'A' && c <= 'Z') {
17456
+ decodeValue += 1 << bit;
17457
+ }
17459
17458
  }
17459
+ recordId += RECORD_ID_DECODER[decodeValue];
17460
17460
  }
17461
- recordId += RECORD_ID_DECODER[decodeValue];
17461
+ return recordId;
17462
17462
  }
17463
- return recordId;
17463
+ }
17464
+ else if (value === undefined || value === null) {
17465
+ // Not throwing here - input params might not have settled
17466
+ return undefined;
17464
17467
  }
17465
17468
  return undefined;
17466
17469
  }
@@ -40933,7 +40936,7 @@ function typeCheckConfig$4(untrustedConfig) {
40933
40936
  }
40934
40937
  return config;
40935
40938
  }
40936
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
40939
+ function validateAdapterConfig$2$1(untrustedConfig, configPropertyNames) {
40937
40940
  if (!untrustedIsObject$2(untrustedConfig)) {
40938
40941
  return null;
40939
40942
  }
@@ -41002,7 +41005,7 @@ const factory$2 = (luvio) => {
41002
41005
  let config = null;
41003
41006
  if (untrustedIsObject$2(untrusted) &&
41004
41007
  untrustedIsObject$2(untrusted.fields)) {
41005
- config = validateAdapterConfig$2({ recordId: untrusted.fields.Id, ...untrusted }, updateRecord_ConfigPropertyNames);
41008
+ config = validateAdapterConfig$2$1({ recordId: untrusted.fields.Id, ...untrusted }, updateRecord_ConfigPropertyNames);
41006
41009
  }
41007
41010
  // Invalid or incomplete config
41008
41011
  if (config === null) {
@@ -41931,7 +41934,7 @@ withDefaultLuvio((luvio) => {
41931
41934
  });
41932
41935
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
41933
41936
  });
41934
- // version: 1.214.1-e4e4d8399
41937
+ // version: 1.215.0-dc8d4056e
41935
41938
 
41936
41939
  var caseSensitiveUserId = '005B0000000GR4OIAW';
41937
41940
 
@@ -58529,7 +58532,7 @@ register({
58529
58532
  id: '@salesforce/lds-network-adapter',
58530
58533
  instrument: instrument$1,
58531
58534
  });
58532
- // version: 1.214.1-04b93f721
58535
+ // version: 1.215.0-bad85aa50
58533
58536
 
58534
58537
  const { create: create$2, keys: keys$2 } = Object;
58535
58538
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -75648,7 +75651,7 @@ function typeCheckConfig$1(untrustedConfig) {
75648
75651
  }
75649
75652
  return config;
75650
75653
  }
75651
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
75654
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
75652
75655
  if (!untrustedIsObject$1(untrustedConfig)) {
75653
75656
  return null;
75654
75657
  }
@@ -75875,6 +75878,19 @@ function ensureRegisteredOnce(registration) {
75875
75878
  }
75876
75879
  }
75877
75880
 
75881
+ function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
75882
+ if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
75883
+ const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
75884
+ untrustedConfig.operationName === undefined;
75885
+ const variablesIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'variables') &&
75886
+ untrustedConfig.variables === undefined;
75887
+ if (operationNameIsDefinedAsUndefined || variablesIsDefinedAsUndefined) {
75888
+ return null;
75889
+ }
75890
+ }
75891
+ return validateAdapterConfig$2(untrustedConfig, _configPropertyNames);
75892
+ }
75893
+
75878
75894
  const factory$1 = (luvio) => function graphql(untrustedConfig, requestContext) {
75879
75895
  const config = validateAdapterConfig$1(untrustedConfig, graphql_ConfigPropertyNames);
75880
75896
  // Invalid or incomplete config
@@ -76804,7 +76820,7 @@ register({
76804
76820
  configuration: { ...configurationForGraphQLAdapters },
76805
76821
  instrument,
76806
76822
  });
76807
- // version: 1.214.1-e4e4d8399
76823
+ // version: 1.215.0-dc8d4056e
76808
76824
 
76809
76825
  // On core the unstable adapters are re-exported with different names,
76810
76826
 
@@ -79051,7 +79067,7 @@ withDefaultLuvio((luvio) => {
79051
79067
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79052
79068
  graphQLImperative = ldsAdapter;
79053
79069
  });
79054
- // version: 1.214.1-e4e4d8399
79070
+ // version: 1.215.0-dc8d4056e
79055
79071
 
79056
79072
  var gqlApi = /*#__PURE__*/Object.freeze({
79057
79073
  __proto__: null,
@@ -79765,4 +79781,4 @@ const { luvio } = getRuntime();
79765
79781
  setDefaultLuvio({ luvio });
79766
79782
 
79767
79783
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
79768
- // version: 1.214.1-04b93f721
79784
+ // version: 1.215.0-bad85aa50
@@ -3904,7 +3904,7 @@
3904
3904
  }
3905
3905
  callbacks.push(callback);
3906
3906
  }
3907
- // version: 1.214.1-04b93f721
3907
+ // version: 1.215.0-bad85aa50
3908
3908
 
3909
3909
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3910
3910
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15337,7 +15337,7 @@
15337
15337
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15338
15338
  return luvioDocumentNode;
15339
15339
  }
15340
- // version: 1.214.1-04b93f721
15340
+ // version: 1.215.0-bad85aa50
15341
15341
 
15342
15342
  function unwrap(data) {
15343
15343
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16260,7 +16260,7 @@
16260
16260
  const { apiFamily, name } = metadata;
16261
16261
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16262
16262
  }
16263
- // version: 1.214.1-04b93f721
16263
+ // version: 1.215.0-bad85aa50
16264
16264
 
16265
16265
  /**
16266
16266
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -17447,26 +17447,29 @@
17447
17447
  * @returns An 18-char record id, and throws error if an invalid record id was provided.
17448
17448
  */
17449
17449
  function getRecordId18(value) {
17450
- if (!isString$1(value)) {
17451
- return undefined;
17452
- }
17453
- else if (value.length === 18) {
17454
- return value;
17455
- }
17456
- else if (value.length === 15) {
17457
- // Add the 3 character suffix
17458
- let recordId = value;
17459
- for (let offset = 0; offset < 15; offset += 5) {
17460
- let decodeValue = 0;
17461
- for (let bit = 0; bit < 5; bit++) {
17462
- const c = value[offset + bit];
17463
- if (c >= 'A' && c <= 'Z') {
17464
- decodeValue += 1 << bit;
17450
+ if (isString$1(value)) {
17451
+ if (value.length === 18) {
17452
+ return value;
17453
+ }
17454
+ else if (value.length === 15) {
17455
+ // Add the 3 character suffix
17456
+ let recordId = value;
17457
+ for (let offset = 0; offset < 15; offset += 5) {
17458
+ let decodeValue = 0;
17459
+ for (let bit = 0; bit < 5; bit++) {
17460
+ const c = value[offset + bit];
17461
+ if (c >= 'A' && c <= 'Z') {
17462
+ decodeValue += 1 << bit;
17463
+ }
17465
17464
  }
17465
+ recordId += RECORD_ID_DECODER[decodeValue];
17466
17466
  }
17467
- recordId += RECORD_ID_DECODER[decodeValue];
17467
+ return recordId;
17468
17468
  }
17469
- return recordId;
17469
+ }
17470
+ else if (value === undefined || value === null) {
17471
+ // Not throwing here - input params might not have settled
17472
+ return undefined;
17470
17473
  }
17471
17474
  return undefined;
17472
17475
  }
@@ -40939,7 +40942,7 @@
40939
40942
  }
40940
40943
  return config;
40941
40944
  }
40942
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
40945
+ function validateAdapterConfig$2$1(untrustedConfig, configPropertyNames) {
40943
40946
  if (!untrustedIsObject$2(untrustedConfig)) {
40944
40947
  return null;
40945
40948
  }
@@ -41008,7 +41011,7 @@
41008
41011
  let config = null;
41009
41012
  if (untrustedIsObject$2(untrusted) &&
41010
41013
  untrustedIsObject$2(untrusted.fields)) {
41011
- config = validateAdapterConfig$2({ recordId: untrusted.fields.Id, ...untrusted }, updateRecord_ConfigPropertyNames);
41014
+ config = validateAdapterConfig$2$1({ recordId: untrusted.fields.Id, ...untrusted }, updateRecord_ConfigPropertyNames);
41012
41015
  }
41013
41016
  // Invalid or incomplete config
41014
41017
  if (config === null) {
@@ -41937,7 +41940,7 @@
41937
41940
  });
41938
41941
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
41939
41942
  });
41940
- // version: 1.214.1-e4e4d8399
41943
+ // version: 1.215.0-dc8d4056e
41941
41944
 
41942
41945
  var caseSensitiveUserId = '005B0000000GR4OIAW';
41943
41946
 
@@ -58535,7 +58538,7 @@
58535
58538
  id: '@salesforce/lds-network-adapter',
58536
58539
  instrument: instrument$1,
58537
58540
  });
58538
- // version: 1.214.1-04b93f721
58541
+ // version: 1.215.0-bad85aa50
58539
58542
 
58540
58543
  const { create: create$2, keys: keys$2 } = Object;
58541
58544
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -75654,7 +75657,7 @@
75654
75657
  }
75655
75658
  return config;
75656
75659
  }
75657
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
75660
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
75658
75661
  if (!untrustedIsObject$1(untrustedConfig)) {
75659
75662
  return null;
75660
75663
  }
@@ -75881,6 +75884,19 @@
75881
75884
  }
75882
75885
  }
75883
75886
 
75887
+ function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
75888
+ if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
75889
+ const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
75890
+ untrustedConfig.operationName === undefined;
75891
+ const variablesIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'variables') &&
75892
+ untrustedConfig.variables === undefined;
75893
+ if (operationNameIsDefinedAsUndefined || variablesIsDefinedAsUndefined) {
75894
+ return null;
75895
+ }
75896
+ }
75897
+ return validateAdapterConfig$2(untrustedConfig, _configPropertyNames);
75898
+ }
75899
+
75884
75900
  const factory$1 = (luvio) => function graphql(untrustedConfig, requestContext) {
75885
75901
  const config = validateAdapterConfig$1(untrustedConfig, graphql_ConfigPropertyNames);
75886
75902
  // Invalid or incomplete config
@@ -76810,7 +76826,7 @@
76810
76826
  configuration: { ...configurationForGraphQLAdapters },
76811
76827
  instrument,
76812
76828
  });
76813
- // version: 1.214.1-e4e4d8399
76829
+ // version: 1.215.0-dc8d4056e
76814
76830
 
76815
76831
  // On core the unstable adapters are re-exported with different names,
76816
76832
 
@@ -79057,7 +79073,7 @@
79057
79073
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79058
79074
  graphQLImperative = ldsAdapter;
79059
79075
  });
79060
- // version: 1.214.1-e4e4d8399
79076
+ // version: 1.215.0-dc8d4056e
79061
79077
 
79062
79078
  var gqlApi = /*#__PURE__*/Object.freeze({
79063
79079
  __proto__: null,
@@ -79788,4 +79804,4 @@
79788
79804
  Object.defineProperty(exports, '__esModule', { value: true });
79789
79805
 
79790
79806
  }));
79791
- // version: 1.214.1-04b93f721
79807
+ // version: 1.215.0-bad85aa50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.214.1",
3
+ "version": "1.215.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",