@salesforce/lds-ads-bridge 1.266.0-dev2 → 1.266.0-dev20

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.
@@ -21,7 +21,9 @@ const WeakSetCtor = WeakSet;
21
21
  const deeplyFrozen = new WeakSetCtor();
22
22
  function deepFreeze(value) {
23
23
  // No need to freeze primitives or already frozen stuff
24
- if (typeof value !== 'object' || value === null || deeplyFrozen.has(value)) {
24
+ if (typeof value !== 'object' ||
25
+ value === null ||
26
+ deeplyFrozen.has(value)) {
25
27
  return;
26
28
  }
27
29
  deeplyFrozen.add(value);
@@ -383,6 +385,7 @@ function ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normal
383
385
  namespace,
384
386
  version,
385
387
  representationName,
388
+ ingestionTimestamp: timestamp,
386
389
  };
387
390
  luvio.publishStoreMetadata(key, storeMetadataParams);
388
391
  }
@@ -430,7 +433,7 @@ function createResourceParamsImpl(config, configMetadata) {
430
433
  }
431
434
  return resourceParams;
432
435
  }
433
- // engine version: 0.154.6-a3a5150a
436
+ // engine version: 0.154.7-dev8-fca5df34
434
437
 
435
438
  /**
436
439
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -478,7 +481,7 @@ const callbacks$1 = [];
478
481
  function register(r) {
479
482
  callbacks$1.forEach((callback) => callback(r));
480
483
  }
481
- // version: 1.266.0-dev2-7c2f3615f
484
+ // version: 1.266.0-dev20-117d849b4
482
485
 
483
486
  /**
484
487
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -4920,7 +4923,7 @@ function toSortedStringArray(value) {
4920
4923
  }
4921
4924
 
4922
4925
  const VERSION$2j = "d1e589a127fb1060c89070cdb6f500b2";
4923
- function validate$1Q(obj, path = 'RecordTypeInfoRepresentation') {
4926
+ function validate$1R(obj, path = 'RecordTypeInfoRepresentation') {
4924
4927
  const v_error = (() => {
4925
4928
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4926
4929
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5012,7 +5015,7 @@ function equals$14(existing, incoming) {
5012
5015
  }
5013
5016
 
5014
5017
  const VERSION$2i = "195d918987a35f45e1aa4dce9a11d8c5";
5015
- function validate$1P(obj, path = 'FieldValueRepresentation') {
5018
+ function validate$1Q(obj, path = 'FieldValueRepresentation') {
5016
5019
  const v_error = (() => {
5017
5020
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5018
5021
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5181,7 +5184,7 @@ const getTypeCacheKeys$1Y = (rootKeySet, luvio, input, _fullPathFactory) => {
5181
5184
 
5182
5185
  const TTL$E = 120000;
5183
5186
  const VERSION$2h = "79cb5ac9f44542f683d00245fdfe500d";
5184
- function validate$1O(obj, path = 'RecordCollectionRepresentation') {
5187
+ function validate$1P(obj, path = 'RecordCollectionRepresentation') {
5185
5188
  const v_error = (() => {
5186
5189
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5187
5190
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5454,7 +5457,7 @@ function equals$12(existing, incoming) {
5454
5457
  }
5455
5458
  const ingest$1U = function RecordCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
5456
5459
  if (process.env.NODE_ENV !== 'production') {
5457
- const validateError = validate$1O(input);
5460
+ const validateError = validate$1P(input);
5458
5461
  if (validateError !== null) {
5459
5462
  throw validateError;
5460
5463
  }
@@ -5490,7 +5493,7 @@ const keyBuilderFromType$B = function RecordRepresentationKeyBuilderFromType(luv
5490
5493
 
5491
5494
  const TTL$D = 30000;
5492
5495
  const VERSION$2g = "98c5b18512e48ca8d28727549507e4ba";
5493
- function validate$1N(obj, path = 'RecordRepresentation') {
5496
+ function validate$1O(obj, path = 'RecordRepresentation') {
5494
5497
  const v_error = (() => {
5495
5498
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5496
5499
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5620,7 +5623,7 @@ function validate$1N(obj, path = 'RecordRepresentation') {
5620
5623
  const path_recordTypeInfo = path + '.recordTypeInfo';
5621
5624
  let obj_recordTypeInfo_union0 = null;
5622
5625
  const obj_recordTypeInfo_union0_error = (() => {
5623
- const referencepath_recordTypeInfoValidationError = validate$1Q(obj_recordTypeInfo, path_recordTypeInfo);
5626
+ const referencepath_recordTypeInfoValidationError = validate$1R(obj_recordTypeInfo, path_recordTypeInfo);
5624
5627
  if (referencepath_recordTypeInfoValidationError !== null) {
5625
5628
  let message = 'Object doesn\'t match RecordTypeInfoRepresentation (at "' + path_recordTypeInfo + '")\n';
5626
5629
  message += referencepath_recordTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -8078,7 +8081,7 @@ function normalize$P(input, existing, path, luvio, store, timestamp, fieldsTrie,
8078
8081
  function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
8079
8082
  return (input, path, luvio, store, timestamp) => {
8080
8083
  if (process.env.NODE_ENV !== 'production') {
8081
- const validateError = validate$1P(input);
8084
+ const validateError = validate$1Q(input);
8082
8085
  if (validateError !== null) {
8083
8086
  throw validateError;
8084
8087
  }
@@ -8171,7 +8174,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
8171
8174
  const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
8172
8175
  return (input, path, luvio, store, timestamp) => {
8173
8176
  if (process.env.NODE_ENV !== 'production') {
8174
- const validateError = validate$1N(input);
8177
+ const validateError = validate$1O(input);
8175
8178
  if (validateError !== null) {
8176
8179
  throw validateError;
8177
8180
  }
@@ -8200,6 +8203,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
8200
8203
  representationName: RepresentationType$X,
8201
8204
  namespace: keyPrefix,
8202
8205
  version: VERSION$2g,
8206
+ ingestionTimestamp: timestamp,
8203
8207
  });
8204
8208
  return createLink$1(key);
8205
8209
  };
@@ -8394,17 +8398,19 @@ function onResourceError(luvio, config, key, err) {
8394
8398
  function buildNetworkSnapshot$18(luvio, config, serverRequestCount = 0, options) {
8395
8399
  const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
8396
8400
  return luvio.dispatchResourceRequest(request, options).then((response) => {
8401
+ // W-11964675 - Condition to dedupe a very specific set of requests for
8402
+ // Komaci - a batch record request with a single record followed by a single
8403
+ // record request. The fulfill logic sends the same network response, so
8404
+ // there is some TypeScript massaging to extract the RecordRepresentation
8405
+ //
8406
+ // W-14381091 - Ensure hoisting the response body happens prior to
8407
+ // calling `luvio.handleSuccessResponse`, since both arguments capture
8408
+ // the response.
8409
+ if (isSingleBatchRecordResponse(response.body)) {
8410
+ response.body = response.body.results[0]
8411
+ .result;
8412
+ }
8397
8413
  return luvio.handleSuccessResponse(() => {
8398
- // W-11964675 - Condition to dedupe a very specific set of requests for
8399
- // Komaci - a batch record request with a single record followed by a single
8400
- // record request. The fulfill logic sends the same network response, so
8401
- // there is some TypeScript massaging to extract the RecordRepresentation
8402
- if (isSingleBatchRecordResponse(response.body)) {
8403
- let recordResponse = response;
8404
- recordResponse.body = response.body.results[0]
8405
- .result;
8406
- return onResourceSuccess(luvio, config, key, allTrackedFields, recordResponse, serverRequestCount + 1);
8407
- }
8408
8414
  return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
8409
8415
  }, () => {
8410
8416
  const cache = new StoreKeyMap();
package/dist/adsBridge.js CHANGED
@@ -372,4 +372,4 @@ function withAdsBridge(callback) {
372
372
  }
373
373
 
374
374
  export { instrument, withAdsBridge };
375
- // version: 1.266.0-dev2-7c2f3615f
375
+ // version: 1.266.0-dev20-117d849b4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-ads-bridge",
3
- "version": "1.266.0-dev2",
3
+ "version": "1.266.0-dev20",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Bridge to sync data between LDS and ADS",
6
6
  "main": "dist/adsBridge.js",
@@ -29,7 +29,7 @@
29
29
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
30
30
  },
31
31
  "devDependencies": {
32
- "@salesforce/lds-adapters-uiapi": "^1.266.0-dev2",
33
- "@salesforce/lds-uiapi-record-utils": "^1.266.0-dev2"
32
+ "@salesforce/lds-adapters-uiapi": "^1.266.0-dev20",
33
+ "@salesforce/lds-uiapi-record-utils": "^1.266.0-dev20"
34
34
  }
35
35
  }