@salesforce/lds-runtime-mobile 1.114.4 → 1.114.5

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.
Files changed (3) hide show
  1. package/dist/main.js +12 -12
  2. package/package.json +1 -1
  3. package/sfdc/main.js +12 -12
package/dist/main.js CHANGED
@@ -5193,11 +5193,11 @@ class DurableDraftQueue {
5193
5193
  mergeActions(targetActionId, sourceActionId) {
5194
5194
  // ids must be unique
5195
5195
  if (targetActionId === sourceActionId) {
5196
- return Promise.reject(new Error('target and source action ids cannot be the same'));
5196
+ return Promise.reject(new Error('targetActionId and sourceActionId cannot be the same.'));
5197
5197
  }
5198
5198
  // cannot have a replace action already in progress
5199
5199
  if (this.replacingAction !== undefined) {
5200
- return Promise.reject(new Error('Cannot replace actions while a replace action is in progress'));
5200
+ return Promise.reject(new Error('Cannot merge actions while a replace/merge action operation is in progress.'));
5201
5201
  }
5202
5202
  this.stopQueueManually();
5203
5203
  const promise = this.getQueueActions().then(async (actions) => {
@@ -5205,13 +5205,13 @@ class DurableDraftQueue {
5205
5205
  if (target === undefined) {
5206
5206
  this.replacingAction = undefined;
5207
5207
  await this.startQueueSafe();
5208
- throw Error('No action to replace');
5208
+ throw Error('targetActionId not found in the draft queue.');
5209
5209
  }
5210
5210
  const source = actions.find((action) => action.id === sourceActionId);
5211
5211
  if (source === undefined) {
5212
5212
  this.replacingAction = undefined;
5213
5213
  await this.startQueueSafe();
5214
- throw Error('No action to replace');
5214
+ throw Error('sourceActionId not found in the draft queue.');
5215
5215
  }
5216
5216
  // put in a try/finally block so we don't leave this.replacingAction
5217
5217
  // indefinitely set
@@ -11573,28 +11573,28 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
11573
11573
  const { method: sourceMethod, body: sourceBody } = sourceData;
11574
11574
  // pre-requisites
11575
11575
  if (targetCacheKey !== sourceCacheKey) {
11576
- throw Error('Cannot merge actions for different targetIds');
11576
+ throw Error('Cannot merge actions for different targetIds.');
11577
11577
  }
11578
11578
  if (targetTag !== sourceTag) {
11579
- throw Error('Cannot merge actions for different tags');
11579
+ throw Error('Cannot merge actions for different tags.');
11580
11580
  }
11581
11581
  if (targetStatus === DraftActionStatus.Completed ||
11582
11582
  targetStatus === DraftActionStatus.Uploading) {
11583
- throw Error(`cannot merge actions when targetAction is in ${targetStatus} status`);
11583
+ throw Error(`Cannot merge actions when targetAction is in ${targetStatus} status.`);
11584
11584
  }
11585
11585
  if (sourceStatus === DraftActionStatus.Completed ||
11586
11586
  sourceStatus === DraftActionStatus.Uploading) {
11587
- throw Error(`cannot merge actions when sourceAction is in ${sourceStatus} status`);
11587
+ throw Error(`Cannot merge actions when sourceAction is in ${sourceStatus} status.`);
11588
11588
  }
11589
11589
  if (targetMethod.toLowerCase() === 'delete' || sourceMethod.toLowerCase() === 'delete') {
11590
- throw Error('cannot merge DELETE actions');
11590
+ throw Error('Cannot merge DELETE actions.');
11591
11591
  }
11592
11592
  if (targetMethod.toLowerCase() === 'patch' && sourceMethod.toLowerCase() === 'post') {
11593
11593
  // overlaying a POST over a PATCH is not supported
11594
- throw Error('cannot merge a POST action over top of a PATCH action');
11594
+ throw Error('Cannot merge a POST action over top of a PATCH action.');
11595
11595
  }
11596
11596
  if (targetVersion !== sourceVersion) {
11597
- throw Error('cannot merge actions with different versions');
11597
+ throw Error('Cannot merge actions with different versions.');
11598
11598
  }
11599
11599
  // overlay top-level properties, maintain target's timestamp and id
11600
11600
  const merged = {
@@ -15600,4 +15600,4 @@ register({
15600
15600
  });
15601
15601
 
15602
15602
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15603
- // version: 1.114.4-844684b4c
15603
+ // version: 1.114.5-f719a4bce
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.114.4",
3
+ "version": "1.114.5",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
package/sfdc/main.js CHANGED
@@ -5193,11 +5193,11 @@ class DurableDraftQueue {
5193
5193
  mergeActions(targetActionId, sourceActionId) {
5194
5194
  // ids must be unique
5195
5195
  if (targetActionId === sourceActionId) {
5196
- return Promise.reject(new Error('target and source action ids cannot be the same'));
5196
+ return Promise.reject(new Error('targetActionId and sourceActionId cannot be the same.'));
5197
5197
  }
5198
5198
  // cannot have a replace action already in progress
5199
5199
  if (this.replacingAction !== undefined) {
5200
- return Promise.reject(new Error('Cannot replace actions while a replace action is in progress'));
5200
+ return Promise.reject(new Error('Cannot merge actions while a replace/merge action operation is in progress.'));
5201
5201
  }
5202
5202
  this.stopQueueManually();
5203
5203
  const promise = this.getQueueActions().then(async (actions) => {
@@ -5205,13 +5205,13 @@ class DurableDraftQueue {
5205
5205
  if (target === undefined) {
5206
5206
  this.replacingAction = undefined;
5207
5207
  await this.startQueueSafe();
5208
- throw Error('No action to replace');
5208
+ throw Error('targetActionId not found in the draft queue.');
5209
5209
  }
5210
5210
  const source = actions.find((action) => action.id === sourceActionId);
5211
5211
  if (source === undefined) {
5212
5212
  this.replacingAction = undefined;
5213
5213
  await this.startQueueSafe();
5214
- throw Error('No action to replace');
5214
+ throw Error('sourceActionId not found in the draft queue.');
5215
5215
  }
5216
5216
  // put in a try/finally block so we don't leave this.replacingAction
5217
5217
  // indefinitely set
@@ -11573,28 +11573,28 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
11573
11573
  const { method: sourceMethod, body: sourceBody } = sourceData;
11574
11574
  // pre-requisites
11575
11575
  if (targetCacheKey !== sourceCacheKey) {
11576
- throw Error('Cannot merge actions for different targetIds');
11576
+ throw Error('Cannot merge actions for different targetIds.');
11577
11577
  }
11578
11578
  if (targetTag !== sourceTag) {
11579
- throw Error('Cannot merge actions for different tags');
11579
+ throw Error('Cannot merge actions for different tags.');
11580
11580
  }
11581
11581
  if (targetStatus === DraftActionStatus.Completed ||
11582
11582
  targetStatus === DraftActionStatus.Uploading) {
11583
- throw Error(`cannot merge actions when targetAction is in ${targetStatus} status`);
11583
+ throw Error(`Cannot merge actions when targetAction is in ${targetStatus} status.`);
11584
11584
  }
11585
11585
  if (sourceStatus === DraftActionStatus.Completed ||
11586
11586
  sourceStatus === DraftActionStatus.Uploading) {
11587
- throw Error(`cannot merge actions when sourceAction is in ${sourceStatus} status`);
11587
+ throw Error(`Cannot merge actions when sourceAction is in ${sourceStatus} status.`);
11588
11588
  }
11589
11589
  if (targetMethod.toLowerCase() === 'delete' || sourceMethod.toLowerCase() === 'delete') {
11590
- throw Error('cannot merge DELETE actions');
11590
+ throw Error('Cannot merge DELETE actions.');
11591
11591
  }
11592
11592
  if (targetMethod.toLowerCase() === 'patch' && sourceMethod.toLowerCase() === 'post') {
11593
11593
  // overlaying a POST over a PATCH is not supported
11594
- throw Error('cannot merge a POST action over top of a PATCH action');
11594
+ throw Error('Cannot merge a POST action over top of a PATCH action.');
11595
11595
  }
11596
11596
  if (targetVersion !== sourceVersion) {
11597
- throw Error('cannot merge actions with different versions');
11597
+ throw Error('Cannot merge actions with different versions.');
11598
11598
  }
11599
11599
  // overlay top-level properties, maintain target's timestamp and id
11600
11600
  const merged = {
@@ -15600,4 +15600,4 @@ register({
15600
15600
  });
15601
15601
 
15602
15602
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15603
- // version: 1.114.4-844684b4c
15603
+ // version: 1.114.5-f719a4bce