@salesforce/lds-ads-bridge 1.265.0 → 1.266.0-dev10

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.
@@ -383,6 +383,7 @@ function ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normal
383
383
  namespace,
384
384
  version,
385
385
  representationName,
386
+ ingestionTimestamp: timestamp,
386
387
  };
387
388
  luvio.publishStoreMetadata(key, storeMetadataParams);
388
389
  }
@@ -430,7 +431,7 @@ function createResourceParamsImpl(config, configMetadata) {
430
431
  }
431
432
  return resourceParams;
432
433
  }
433
- // engine version: 0.154.6-a3a5150a
434
+ // engine version: 0.154.7-dev4-96466e64
434
435
 
435
436
  /**
436
437
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -478,7 +479,7 @@ const callbacks$1 = [];
478
479
  function register(r) {
479
480
  callbacks$1.forEach((callback) => callback(r));
480
481
  }
481
- // version: 1.265.0-48248f4dd
482
+ // version: 1.266.0-dev10-ff398791a
482
483
 
483
484
  /**
484
485
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -4920,7 +4921,7 @@ function toSortedStringArray(value) {
4920
4921
  }
4921
4922
 
4922
4923
  const VERSION$2j = "d1e589a127fb1060c89070cdb6f500b2";
4923
- function validate$1Q(obj, path = 'RecordTypeInfoRepresentation') {
4924
+ function validate$1R(obj, path = 'RecordTypeInfoRepresentation') {
4924
4925
  const v_error = (() => {
4925
4926
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4926
4927
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5012,7 +5013,7 @@ function equals$14(existing, incoming) {
5012
5013
  }
5013
5014
 
5014
5015
  const VERSION$2i = "195d918987a35f45e1aa4dce9a11d8c5";
5015
- function validate$1P(obj, path = 'FieldValueRepresentation') {
5016
+ function validate$1Q(obj, path = 'FieldValueRepresentation') {
5016
5017
  const v_error = (() => {
5017
5018
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5018
5019
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5181,7 +5182,7 @@ const getTypeCacheKeys$1Y = (rootKeySet, luvio, input, _fullPathFactory) => {
5181
5182
 
5182
5183
  const TTL$E = 120000;
5183
5184
  const VERSION$2h = "79cb5ac9f44542f683d00245fdfe500d";
5184
- function validate$1O(obj, path = 'RecordCollectionRepresentation') {
5185
+ function validate$1P(obj, path = 'RecordCollectionRepresentation') {
5185
5186
  const v_error = (() => {
5186
5187
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5187
5188
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5454,7 +5455,7 @@ function equals$12(existing, incoming) {
5454
5455
  }
5455
5456
  const ingest$1U = function RecordCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
5456
5457
  if (process.env.NODE_ENV !== 'production') {
5457
- const validateError = validate$1O(input);
5458
+ const validateError = validate$1P(input);
5458
5459
  if (validateError !== null) {
5459
5460
  throw validateError;
5460
5461
  }
@@ -5490,7 +5491,7 @@ const keyBuilderFromType$B = function RecordRepresentationKeyBuilderFromType(luv
5490
5491
 
5491
5492
  const TTL$D = 30000;
5492
5493
  const VERSION$2g = "98c5b18512e48ca8d28727549507e4ba";
5493
- function validate$1N(obj, path = 'RecordRepresentation') {
5494
+ function validate$1O(obj, path = 'RecordRepresentation') {
5494
5495
  const v_error = (() => {
5495
5496
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
5496
5497
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -5620,7 +5621,7 @@ function validate$1N(obj, path = 'RecordRepresentation') {
5620
5621
  const path_recordTypeInfo = path + '.recordTypeInfo';
5621
5622
  let obj_recordTypeInfo_union0 = null;
5622
5623
  const obj_recordTypeInfo_union0_error = (() => {
5623
- const referencepath_recordTypeInfoValidationError = validate$1Q(obj_recordTypeInfo, path_recordTypeInfo);
5624
+ const referencepath_recordTypeInfoValidationError = validate$1R(obj_recordTypeInfo, path_recordTypeInfo);
5624
5625
  if (referencepath_recordTypeInfoValidationError !== null) {
5625
5626
  let message = 'Object doesn\'t match RecordTypeInfoRepresentation (at "' + path_recordTypeInfo + '")\n';
5626
5627
  message += referencepath_recordTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -8078,7 +8079,7 @@ function normalize$P(input, existing, path, luvio, store, timestamp, fieldsTrie,
8078
8079
  function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
8079
8080
  return (input, path, luvio, store, timestamp) => {
8080
8081
  if (process.env.NODE_ENV !== 'production') {
8081
- const validateError = validate$1P(input);
8082
+ const validateError = validate$1Q(input);
8082
8083
  if (validateError !== null) {
8083
8084
  throw validateError;
8084
8085
  }
@@ -8171,7 +8172,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
8171
8172
  const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
8172
8173
  return (input, path, luvio, store, timestamp) => {
8173
8174
  if (process.env.NODE_ENV !== 'production') {
8174
- const validateError = validate$1N(input);
8175
+ const validateError = validate$1O(input);
8175
8176
  if (validateError !== null) {
8176
8177
  throw validateError;
8177
8178
  }
@@ -8200,6 +8201,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
8200
8201
  representationName: RepresentationType$X,
8201
8202
  namespace: keyPrefix,
8202
8203
  version: VERSION$2g,
8204
+ ingestionTimestamp: timestamp,
8203
8205
  });
8204
8206
  return createLink$1(key);
8205
8207
  };
@@ -8394,17 +8396,19 @@ function onResourceError(luvio, config, key, err) {
8394
8396
  function buildNetworkSnapshot$18(luvio, config, serverRequestCount = 0, options) {
8395
8397
  const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
8396
8398
  return luvio.dispatchResourceRequest(request, options).then((response) => {
8399
+ // W-11964675 - Condition to dedupe a very specific set of requests for
8400
+ // Komaci - a batch record request with a single record followed by a single
8401
+ // record request. The fulfill logic sends the same network response, so
8402
+ // there is some TypeScript massaging to extract the RecordRepresentation
8403
+ //
8404
+ // W-14381091 - Ensure hoisting the response body happens prior to
8405
+ // calling `luvio.handleSuccessResponse`, since both arguments capture
8406
+ // the response.
8407
+ if (isSingleBatchRecordResponse(response.body)) {
8408
+ response.body = response.body.results[0]
8409
+ .result;
8410
+ }
8397
8411
  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
8412
  return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
8409
8413
  }, () => {
8410
8414
  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.265.0-48248f4dd
375
+ // version: 1.266.0-dev10-ff398791a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-ads-bridge",
3
- "version": "1.265.0",
3
+ "version": "1.266.0-dev10",
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.265.0",
33
- "@salesforce/lds-uiapi-record-utils": "^1.265.0"
32
+ "@salesforce/lds-adapters-uiapi": "^1.266.0-dev10",
33
+ "@salesforce/lds-uiapi-record-utils": "^1.266.0-dev10"
34
34
  }
35
35
  }