@salesforce/lds-runtime-mobile 1.464.0 → 1.466.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.
- package/dist/main.js +137 -89
- package/package.json +33 -33
- package/sfdc/main.js +137 -89
package/dist/main.js
CHANGED
|
@@ -45226,47 +45226,41 @@ var DateLiteral;
|
|
|
45226
45226
|
DateLiteral["YESTERDAY"] = "YESTERDAY";
|
|
45227
45227
|
DateLiteral["NEXT_WEEK"] = "NEXT_WEEK";
|
|
45228
45228
|
})(DateLiteral || (DateLiteral = {}));
|
|
45229
|
-
// ranged adjusted to be between now and the end of the day,
|
|
45230
|
-
// you cannot do a straight = comparison in SQL
|
|
45231
45229
|
const TODAY_RANGE = {
|
|
45232
45230
|
lowerBound: `date('now')`,
|
|
45233
|
-
upperBound: `
|
|
45231
|
+
upperBound: `datetime('now', 'start of day', '+1 day', '-1 seconds')`,
|
|
45234
45232
|
};
|
|
45235
|
-
// ranged adjusted to be between today +1 day and +2 days -.001 seconds to be the very end of tomorrows date
|
|
45236
|
-
// you cannot do a straight = comparison in SQL
|
|
45237
45233
|
const TOMORROW_RANGE = {
|
|
45238
45234
|
lowerBound: `date('now', '+1 day')`,
|
|
45239
|
-
upperBound: `
|
|
45235
|
+
upperBound: `datetime('now', 'start of day', '+2 days', '-1 seconds')`,
|
|
45240
45236
|
};
|
|
45241
45237
|
const YESTERDAY_RANGE = {
|
|
45242
45238
|
lowerBound: `date('now', '-1 day')`,
|
|
45243
|
-
upperBound: `
|
|
45239
|
+
upperBound: `datetime('now', 'start of day', '-1 seconds')`,
|
|
45244
45240
|
};
|
|
45245
45241
|
const THIS_WEEK_RANGE = {
|
|
45246
|
-
lowerBound: `date('now', '
|
|
45247
|
-
upperBound: `
|
|
45242
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}')`,
|
|
45243
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+7 days', '-1 seconds')`,
|
|
45248
45244
|
};
|
|
45249
45245
|
const LAST_WEEK_RANGE = {
|
|
45250
|
-
lowerBound: `date('now', 'weekday
|
|
45251
|
-
upperBound: `
|
|
45246
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '-7 days')`,
|
|
45247
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '-1 seconds')`,
|
|
45252
45248
|
};
|
|
45253
45249
|
const NEXT_WEEK_RANGE = {
|
|
45254
|
-
lowerBound: `date('now', 'weekday
|
|
45255
|
-
upperBound: `
|
|
45250
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+7 days')`,
|
|
45251
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+14 days', '-1 seconds')`,
|
|
45256
45252
|
};
|
|
45257
45253
|
const THIS_MONTH_RANGE = {
|
|
45258
45254
|
lowerBound: `date('now', 'start of month')`,
|
|
45259
|
-
upperBound: `
|
|
45255
|
+
upperBound: `datetime('now', 'start of month', '+1 month', '-1 seconds')`,
|
|
45260
45256
|
};
|
|
45261
45257
|
const LAST_MONTH_RANGE = {
|
|
45262
45258
|
lowerBound: `date('now', 'start of month', '-1 month')`,
|
|
45263
|
-
upperBound: `
|
|
45259
|
+
upperBound: `datetime('now', 'start of month', '-1 seconds')`,
|
|
45264
45260
|
};
|
|
45265
45261
|
const NEXT_MONTH_RANGE = {
|
|
45266
45262
|
lowerBound: `date('now', 'start of month', '+1 month')`,
|
|
45267
|
-
|
|
45268
|
-
// this needs to be 0 day
|
|
45269
|
-
upperBound: `date('now', 'start of month', '+2 month', '0 day')`,
|
|
45263
|
+
upperBound: `datetime('now', 'start of month', '+2 months', '-1 seconds')`,
|
|
45270
45264
|
};
|
|
45271
45265
|
const THIS_QUARTER_RANGE = () => {
|
|
45272
45266
|
return computeQuarterDateRange(DateLiteral.THIS_QUARTER);
|
|
@@ -45279,23 +45273,23 @@ const NEXT_QUARTER_RANGE = () => {
|
|
|
45279
45273
|
};
|
|
45280
45274
|
const THIS_YEAR_RANGE = {
|
|
45281
45275
|
lowerBound: `date('now', 'start of year')`,
|
|
45282
|
-
upperBound: `
|
|
45276
|
+
upperBound: `datetime('now', 'start of year', '+1 year', '-1 seconds')`,
|
|
45283
45277
|
};
|
|
45284
45278
|
const LAST_YEAR_RANGE = {
|
|
45285
45279
|
lowerBound: `date('now', 'start of year', '-1 year')`,
|
|
45286
|
-
upperBound: `
|
|
45280
|
+
upperBound: `datetime('now', 'start of year', '-1 seconds')`,
|
|
45287
45281
|
};
|
|
45288
45282
|
const NEXT_YEAR_RANGE = {
|
|
45289
45283
|
lowerBound: `date('now', 'start of year', '+1 year')`,
|
|
45290
|
-
upperBound: `
|
|
45284
|
+
upperBound: `datetime('now', 'start of year', '+2 years', '-1 seconds')`,
|
|
45291
45285
|
};
|
|
45292
45286
|
const LAST_90_DAYS_RANGE = {
|
|
45293
45287
|
lowerBound: `date('now', '-90 days')`,
|
|
45294
|
-
upperBound: `
|
|
45288
|
+
upperBound: `datetime('now')`,
|
|
45295
45289
|
};
|
|
45296
45290
|
const NEXT_90_DAYS_RANGE = {
|
|
45297
45291
|
lowerBound: `date('now', '+1 day')`,
|
|
45298
|
-
upperBound: `
|
|
45292
|
+
upperBound: `datetime('now', 'start of day', '+91 days', '-1 seconds')`,
|
|
45299
45293
|
};
|
|
45300
45294
|
// querter start date in UTC
|
|
45301
45295
|
function quarterStart(date) {
|
|
@@ -45309,23 +45303,17 @@ function computeQuarterDateRange(enumType) {
|
|
|
45309
45303
|
case DateLiteral.LAST_QUARTER:
|
|
45310
45304
|
return {
|
|
45311
45305
|
lowerBound: `date('${curQuarterStart}', '-3 months')`,
|
|
45312
|
-
|
|
45313
|
-
// 0 days sets it to the end of the month
|
|
45314
|
-
upperBound: `date('${curQuarterStart}', '0 days')`,
|
|
45306
|
+
upperBound: `datetime('${curQuarterStart}', '-1 seconds')`,
|
|
45315
45307
|
};
|
|
45316
45308
|
case DateLiteral.THIS_QUARTER:
|
|
45317
45309
|
return {
|
|
45318
45310
|
lowerBound: `date('${curQuarterStart}')`,
|
|
45319
|
-
|
|
45320
|
-
// 0 days sets it to the end of the month
|
|
45321
|
-
upperBound: `date('${curQuarterStart}', '3 months', '0 days')`,
|
|
45311
|
+
upperBound: `datetime('${curQuarterStart}', '+3 months', '-1 seconds')`,
|
|
45322
45312
|
};
|
|
45323
45313
|
case DateLiteral.NEXT_QUARTER:
|
|
45324
45314
|
return {
|
|
45325
45315
|
lowerBound: `date('${curQuarterStart}', '+3 months')`,
|
|
45326
|
-
|
|
45327
|
-
// 0 days sets it to the end of the month
|
|
45328
|
-
upperBound: `date('${curQuarterStart}', '+6 months', '0 days')`,
|
|
45316
|
+
upperBound: `datetime('${curQuarterStart}', '+6 months', '-1 seconds')`,
|
|
45329
45317
|
};
|
|
45330
45318
|
}
|
|
45331
45319
|
}
|
|
@@ -45544,11 +45532,11 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45544
45532
|
case DateRange.next_n_days: {
|
|
45545
45533
|
return {
|
|
45546
45534
|
binding: {
|
|
45547
|
-
upper: `${input} days`,
|
|
45535
|
+
upper: `${input + 1} days`,
|
|
45548
45536
|
lower: '1 days',
|
|
45549
45537
|
},
|
|
45550
45538
|
range: {
|
|
45551
|
-
upper: `${dateFunction}('now', 'start of day',
|
|
45539
|
+
upper: `${dateFunction}('now', 'start of day', ?, '-1 seconds')`,
|
|
45552
45540
|
lower: `${dateFunction}('now', 'start of day', ?)`,
|
|
45553
45541
|
},
|
|
45554
45542
|
};
|
|
@@ -45585,19 +45573,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45585
45573
|
// starts at 00:00:00 the first day of the week n weeks after the current week
|
|
45586
45574
|
// ends 23:59:59 of the last day of week before the current
|
|
45587
45575
|
case DateRange.next_n_weeks: {
|
|
45588
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45589
45576
|
return {
|
|
45590
45577
|
binding: {
|
|
45591
|
-
|
|
45592
|
-
|
|
45593
|
-
// so for the upper bound if today is the start of the week we need to add 7 more days to the value to get next week as the start
|
|
45594
|
-
upper: `${input * 7 + (isStartOfWeek ? 7 : 0)} days`,
|
|
45595
|
-
//lower bound starts out 00:00:00 of next week
|
|
45596
|
-
lower: `${isStartOfWeek ? 7 : 0} days`,
|
|
45578
|
+
upper: `${(input + 1) * 7} days`,
|
|
45579
|
+
lower: '7 days',
|
|
45597
45580
|
},
|
|
45598
45581
|
range: {
|
|
45599
|
-
upper: `${dateFunction}('now', '
|
|
45600
|
-
lower: `${dateFunction}('now', '
|
|
45582
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45583
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45601
45584
|
},
|
|
45602
45585
|
};
|
|
45603
45586
|
}
|
|
@@ -45605,19 +45588,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45605
45588
|
// starts at 00:00:00 of day 0 n weeks before the current week
|
|
45606
45589
|
// ends 23:59:59 at last day of the week before the current week
|
|
45607
45590
|
case DateRange.last_n_weeks: {
|
|
45608
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45609
45591
|
return {
|
|
45610
45592
|
binding: {
|
|
45611
|
-
|
|
45612
|
-
|
|
45613
|
-
upper: `${-(isStartOfWeek ? 0 : 7)} days`,
|
|
45614
|
-
// starting on 00:00:00 of n * weeks before current week
|
|
45615
|
-
// -7 more days if today not the start of the week because weekday FIRST_DAY_OF_WEEK puts us next week day 0
|
|
45616
|
-
lower: `${-input * 7 - (isStartOfWeek ? 0 : 7)} days`,
|
|
45593
|
+
upper: '0 days',
|
|
45594
|
+
lower: `${-input * 7} days`,
|
|
45617
45595
|
},
|
|
45618
45596
|
range: {
|
|
45619
|
-
upper: `${dateFunction}('now', '
|
|
45620
|
-
lower: `${dateFunction}('now', '
|
|
45597
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45598
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45621
45599
|
},
|
|
45622
45600
|
};
|
|
45623
45601
|
}
|
|
@@ -45625,21 +45603,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45625
45603
|
// starts 00:00:00 on day 0 of n weeks before the current week
|
|
45626
45604
|
// ends 7 days after the start
|
|
45627
45605
|
case DateRange.n_weeks_ago: {
|
|
45628
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45629
45606
|
return {
|
|
45630
45607
|
binding: {
|
|
45631
|
-
|
|
45632
|
-
|
|
45633
|
-
// so add 7 to remove a week from -(n)
|
|
45634
|
-
upper: `${-input * 7 + (isStartOfWeek ? 7 : 0)} days`,
|
|
45635
|
-
// start of the week n weeks from the current week
|
|
45636
|
-
// if today is the start of the week then -(n) will do to be the previous week, but
|
|
45637
|
-
// if today is not the start of the week we need to go back 1 more week since weekday FIRST_DAY_OF_WEEK will put us next week
|
|
45638
|
-
lower: `${-input * 7 - (isStartOfWeek ? 0 : 7)} days`,
|
|
45608
|
+
upper: `${-input * 7 + 7} days`,
|
|
45609
|
+
lower: `${-input * 7} days`,
|
|
45639
45610
|
},
|
|
45640
45611
|
range: {
|
|
45641
|
-
upper: `${dateFunction}('now', '
|
|
45642
|
-
lower: `${dateFunction}('now', '
|
|
45612
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45613
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45643
45614
|
},
|
|
45644
45615
|
};
|
|
45645
45616
|
}
|
|
@@ -45789,9 +45760,6 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45789
45760
|
throw new Error(`DateRangeInput ${dateRange} is not supported in local evalutation`);
|
|
45790
45761
|
}
|
|
45791
45762
|
}
|
|
45792
|
-
function isTodayStartOfWeek() {
|
|
45793
|
-
return new Date().getDay() === FIRST_DAY_OF_WEEK;
|
|
45794
|
-
}
|
|
45795
45763
|
|
|
45796
45764
|
const JSON_EXTRACT_PATH_INGESTION_TIMESTAMP = '$.ingestionTimestamp';
|
|
45797
45765
|
const JSON_EXTRACT_PATH_INGESTION_APINAME = '$.apiName';
|
|
@@ -57996,8 +57964,8 @@ class InternalError extends Error {
|
|
|
57996
57964
|
}
|
|
57997
57965
|
}
|
|
57998
57966
|
class UserVisibleError extends Error {
|
|
57999
|
-
constructor(data) {
|
|
58000
|
-
super();
|
|
57967
|
+
constructor(data, message) {
|
|
57968
|
+
super(message);
|
|
58001
57969
|
this.data = data;
|
|
58002
57970
|
this.type = "user-visible";
|
|
58003
57971
|
}
|
|
@@ -58065,13 +58033,17 @@ function buildServiceDescriptor$m() {
|
|
|
58065
58033
|
};
|
|
58066
58034
|
}
|
|
58067
58035
|
|
|
58068
|
-
function applyOperationRequestOptions$
|
|
58069
|
-
if (operationType === void 0) {
|
|
58036
|
+
function applyOperationRequestOptions$3(init, operationType, requestOptions) {
|
|
58037
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58070
58038
|
return init;
|
|
58071
58039
|
}
|
|
58072
58040
|
return {
|
|
58073
58041
|
...init,
|
|
58074
|
-
onestore: {
|
|
58042
|
+
onestore: {
|
|
58043
|
+
...requestOptions,
|
|
58044
|
+
...init?.onestore,
|
|
58045
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58046
|
+
}
|
|
58075
58047
|
};
|
|
58076
58048
|
}
|
|
58077
58049
|
class AuraNetworkCommand extends NetworkCommand$1 {
|
|
@@ -58104,8 +58076,16 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
58104
58076
|
get operationType() {
|
|
58105
58077
|
return void 0;
|
|
58106
58078
|
}
|
|
58079
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
|
|
58080
|
+
get requestOptions() {
|
|
58081
|
+
return void 0;
|
|
58082
|
+
}
|
|
58107
58083
|
coerceAuraErrors(auraErrors) {
|
|
58108
|
-
|
|
58084
|
+
const response = getFetchResponseFromAuraError(auraErrors[0]);
|
|
58085
|
+
return new UserVisibleError(
|
|
58086
|
+
response,
|
|
58087
|
+
`Error from ${this.endpoint}, status ${response.status}`
|
|
58088
|
+
);
|
|
58109
58089
|
}
|
|
58110
58090
|
/**
|
|
58111
58091
|
* Customize how non-2xx fetch fallback responses are converted into errors.
|
|
@@ -58202,11 +58182,15 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
58202
58182
|
this.auraParams,
|
|
58203
58183
|
this.actionConfig
|
|
58204
58184
|
),
|
|
58205
|
-
this.coerceAuraErrors
|
|
58185
|
+
(errs) => this.coerceAuraErrors(errs)
|
|
58206
58186
|
);
|
|
58207
58187
|
} else if (this.shouldUseFetch()) {
|
|
58208
58188
|
const [input, init] = this.fetchParams;
|
|
58209
|
-
const initWithOptions = applyOperationRequestOptions$
|
|
58189
|
+
const initWithOptions = applyOperationRequestOptions$3(
|
|
58190
|
+
init,
|
|
58191
|
+
this.operationType,
|
|
58192
|
+
this.requestOptions
|
|
58193
|
+
);
|
|
58210
58194
|
try {
|
|
58211
58195
|
const fetchCall = initWithOptions === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithOptions);
|
|
58212
58196
|
return this.convertFetchResponseToData(fetchCall);
|
|
@@ -58774,6 +58758,19 @@ function mergeCacheControlConfigs(baseConfig, overrides) {
|
|
|
58774
58758
|
};
|
|
58775
58759
|
}
|
|
58776
58760
|
|
|
58761
|
+
function applyOperationRequestOptions$2(init, operationType, requestOptions) {
|
|
58762
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58763
|
+
return init;
|
|
58764
|
+
}
|
|
58765
|
+
return {
|
|
58766
|
+
...init,
|
|
58767
|
+
onestore: {
|
|
58768
|
+
...requestOptions,
|
|
58769
|
+
...init?.onestore,
|
|
58770
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58771
|
+
}
|
|
58772
|
+
};
|
|
58773
|
+
}
|
|
58777
58774
|
class AuraCacheControlCommand extends CacheControlCommand {
|
|
58778
58775
|
constructor(services) {
|
|
58779
58776
|
super(services);
|
|
@@ -58791,6 +58788,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
58791
58788
|
"Fetch parameters must be specified when using HTTP transport on an Aura adapter"
|
|
58792
58789
|
);
|
|
58793
58790
|
}
|
|
58791
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
|
|
58792
|
+
get requestOptions() {
|
|
58793
|
+
return void 0;
|
|
58794
|
+
}
|
|
58795
|
+
/**
|
|
58796
|
+
* `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
|
|
58797
|
+
* `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
|
|
58798
|
+
*/
|
|
58799
|
+
withRequestOptions([
|
|
58800
|
+
input,
|
|
58801
|
+
init
|
|
58802
|
+
]) {
|
|
58803
|
+
return [input, applyOperationRequestOptions$2(init, this.operationType, this.requestOptions)];
|
|
58804
|
+
}
|
|
58794
58805
|
shouldUseAuraNetwork() {
|
|
58795
58806
|
return this.services.auraNetwork !== void 0 && (this.networkPreference === "aura" || !this.services.fetch);
|
|
58796
58807
|
}
|
|
@@ -58809,7 +58820,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
58809
58820
|
(errs) => this.coerceAuraErrors(errs)
|
|
58810
58821
|
);
|
|
58811
58822
|
} else if (this.shouldUseFetch()) {
|
|
58812
|
-
const params = this.fetchParams;
|
|
58823
|
+
const params = this.withRequestOptions(this.fetchParams);
|
|
58813
58824
|
try {
|
|
58814
58825
|
return this.convertFetchResponseToData(this.services.fetch(...params));
|
|
58815
58826
|
} catch (reason) {
|
|
@@ -58956,13 +58967,17 @@ class NetworkCommand extends BaseCommand {
|
|
|
58956
58967
|
async afterRequestHooks(_options) {
|
|
58957
58968
|
}
|
|
58958
58969
|
}
|
|
58959
|
-
function applyOperationRequestOptions(init, operationType) {
|
|
58960
|
-
if (operationType === void 0) {
|
|
58970
|
+
function applyOperationRequestOptions$1(init, operationType, requestOptions) {
|
|
58971
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58961
58972
|
return init;
|
|
58962
58973
|
}
|
|
58963
58974
|
return {
|
|
58964
58975
|
...init,
|
|
58965
|
-
onestore: {
|
|
58976
|
+
onestore: {
|
|
58977
|
+
...requestOptions,
|
|
58978
|
+
...init?.onestore,
|
|
58979
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58980
|
+
}
|
|
58966
58981
|
};
|
|
58967
58982
|
}
|
|
58968
58983
|
function isAbortableCommand(command) {
|
|
@@ -59060,11 +59075,19 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
|
|
|
59060
59075
|
get operationType() {
|
|
59061
59076
|
return void 0;
|
|
59062
59077
|
}
|
|
59078
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides (`generateRequestOptionsGetter`). */
|
|
59079
|
+
get requestOptions() {
|
|
59080
|
+
return void 0;
|
|
59081
|
+
}
|
|
59063
59082
|
fetch(contextSeed) {
|
|
59064
59083
|
try {
|
|
59065
59084
|
const [input, init] = this.fetchParams;
|
|
59066
59085
|
const operationType = this.operationType;
|
|
59067
|
-
const initWithOptions = applyOperationRequestOptions(
|
|
59086
|
+
const initWithOptions = applyOperationRequestOptions$1(
|
|
59087
|
+
init,
|
|
59088
|
+
operationType,
|
|
59089
|
+
this.requestOptions
|
|
59090
|
+
);
|
|
59068
59091
|
const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
|
|
59069
59092
|
const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
|
|
59070
59093
|
const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
|
|
@@ -59139,6 +59162,19 @@ function buildServiceDescriptor$j() {
|
|
|
59139
59162
|
};
|
|
59140
59163
|
}
|
|
59141
59164
|
|
|
59165
|
+
function applyOperationRequestOptions(init, operationType, requestOptions) {
|
|
59166
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
59167
|
+
return init;
|
|
59168
|
+
}
|
|
59169
|
+
return {
|
|
59170
|
+
...init,
|
|
59171
|
+
onestore: {
|
|
59172
|
+
...requestOptions,
|
|
59173
|
+
...init?.onestore,
|
|
59174
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
59175
|
+
}
|
|
59176
|
+
};
|
|
59177
|
+
}
|
|
59142
59178
|
class HttpCacheControlCommand extends CacheControlCommand {
|
|
59143
59179
|
constructor(services) {
|
|
59144
59180
|
super(services);
|
|
@@ -59148,9 +59184,25 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
59148
59184
|
requestFromNetwork() {
|
|
59149
59185
|
return this.fetch();
|
|
59150
59186
|
}
|
|
59187
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. */
|
|
59188
|
+
get requestOptions() {
|
|
59189
|
+
return void 0;
|
|
59190
|
+
}
|
|
59191
|
+
/**
|
|
59192
|
+
* `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
|
|
59193
|
+
* `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
|
|
59194
|
+
*/
|
|
59195
|
+
withRequestOptions([
|
|
59196
|
+
input,
|
|
59197
|
+
init
|
|
59198
|
+
]) {
|
|
59199
|
+
return [input, applyOperationRequestOptions(init, this.operationType, this.requestOptions)];
|
|
59200
|
+
}
|
|
59151
59201
|
fetch() {
|
|
59152
59202
|
try {
|
|
59153
|
-
return this.convertFetchResponseToData(
|
|
59203
|
+
return this.convertFetchResponseToData(
|
|
59204
|
+
this.services.fetch(...this.withRequestOptions(this.fetchParams))
|
|
59205
|
+
);
|
|
59154
59206
|
} catch (reason) {
|
|
59155
59207
|
return resolvedPromiseLike$2(err$1(toError(reason)));
|
|
59156
59208
|
}
|
|
@@ -60160,7 +60212,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
60160
60212
|
},
|
|
60161
60213
|
};
|
|
60162
60214
|
}
|
|
60163
|
-
// version: 1.
|
|
60215
|
+
// version: 1.466.0-b7b08a8e3c
|
|
60164
60216
|
|
|
60165
60217
|
/**
|
|
60166
60218
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -60186,7 +60238,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
60186
60238
|
},
|
|
60187
60239
|
};
|
|
60188
60240
|
}
|
|
60189
|
-
// version: 1.
|
|
60241
|
+
// version: 1.466.0-b7b08a8e3c
|
|
60190
60242
|
|
|
60191
60243
|
function findExecutableOperation(input) {
|
|
60192
60244
|
const operations = input.query.definitions.filter(
|
|
@@ -60383,7 +60435,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
|
|
|
60383
60435
|
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
60384
60436
|
});
|
|
60385
60437
|
} else if (this.shouldUseFetch()) {
|
|
60386
|
-
const params = this.originalFetchParams;
|
|
60438
|
+
const params = this.withRequestOptions(this.originalFetchParams);
|
|
60387
60439
|
try {
|
|
60388
60440
|
return this.convertFetchResponseToData(this.services.fetch(...params)).then(
|
|
60389
60441
|
(result) => {
|
|
@@ -60538,7 +60590,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
|
|
|
60538
60590
|
}
|
|
60539
60591
|
runOriginalRequest() {
|
|
60540
60592
|
return this.convertFetchResponseToData(
|
|
60541
|
-
this.services.fetch(...this.originalFetchParams)
|
|
60593
|
+
this.services.fetch(...this.withRequestOptions(this.originalFetchParams))
|
|
60542
60594
|
).then((result) => {
|
|
60543
60595
|
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
60544
60596
|
});
|
|
@@ -62598,10 +62650,6 @@ function initializeOneStore(sqliteStore, luvio) {
|
|
|
62598
62650
|
const instrumentationServiceDescriptor = buildServiceDescriptor$e(loggerService);
|
|
62599
62651
|
const nimbusSqliteOneStoreCacheServiceDescriptor = buildNimbusDurableCacheInclusionPolicyService(cacheServiceDescriptor.service, new NimbusSqliteOneStoreCache(sqliteStore));
|
|
62600
62652
|
const featureFlagsServiceDescriptor = buildServiceDescriptor$c();
|
|
62601
|
-
const featureFlagsService = featureFlagsServiceDescriptor.service;
|
|
62602
|
-
// This disables the GraphQL mapping from lightning/uiGraphQLApi to lightning/graphql in this runtime
|
|
62603
|
-
// The gate is likely NOT to rollout ever, but we keep it here for completeness
|
|
62604
|
-
featureFlagsService.set('useOneStoreGraphQL', false);
|
|
62605
62653
|
const luvioUiapiRecordsServiceDescriptor = buildServiceDescriptor$a((configs) => {
|
|
62606
62654
|
return notifyUpdateAvailableFactory(luvio)(configs);
|
|
62607
62655
|
}, (recordId, reader) => {
|
|
@@ -62908,4 +62956,4 @@ register({
|
|
|
62908
62956
|
});
|
|
62909
62957
|
|
|
62910
62958
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
62911
|
-
// version: 1.
|
|
62959
|
+
// version: 1.466.0-b7b08a8e3c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.466.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,43 +32,43 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@conduit-client/service-bindings-imperative": "3.
|
|
36
|
-
"@conduit-client/service-bindings-lwc": "3.
|
|
37
|
-
"@conduit-client/service-provisioner": "3.
|
|
38
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
39
|
-
"@salesforce/lds-bindings": "^1.
|
|
40
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
41
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
42
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
35
|
+
"@conduit-client/service-bindings-imperative": "3.33.0",
|
|
36
|
+
"@conduit-client/service-bindings-lwc": "3.33.0",
|
|
37
|
+
"@conduit-client/service-provisioner": "3.33.0",
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "^1.466.0",
|
|
39
|
+
"@salesforce/lds-bindings": "^1.466.0",
|
|
40
|
+
"@salesforce/lds-instrumentation": "^1.466.0",
|
|
41
|
+
"@salesforce/lds-luvio-service": "^1.466.0",
|
|
42
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.466.0",
|
|
43
43
|
"@salesforce/user": "0.0.21",
|
|
44
44
|
"o11y": "250.7.0",
|
|
45
45
|
"o11y_schema": "256.126.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@conduit-client/command-aura-network": "3.
|
|
49
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.
|
|
50
|
-
"@conduit-client/command-fetch-network": "3.
|
|
51
|
-
"@conduit-client/command-http-normalized-cache-control": "3.
|
|
52
|
-
"@conduit-client/command-network": "3.
|
|
53
|
-
"@conduit-client/service-cache": "3.
|
|
54
|
-
"@conduit-client/service-cache-control": "3.
|
|
55
|
-
"@conduit-client/service-cache-inclusion-policy": "3.
|
|
56
|
-
"@conduit-client/service-fetch-network": "3.
|
|
57
|
-
"@conduit-client/service-instrument-command": "3.
|
|
58
|
-
"@conduit-client/service-instrumentation": "3.
|
|
59
|
-
"@conduit-client/service-pubsub": "3.
|
|
60
|
-
"@conduit-client/service-store": "3.
|
|
61
|
-
"@conduit-client/utils": "3.
|
|
62
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
63
|
-
"@salesforce/lds-drafts": "^1.
|
|
64
|
-
"@salesforce/lds-durable-records": "^1.
|
|
65
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
66
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
67
|
-
"@salesforce/lds-store-binary": "^1.
|
|
68
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
69
|
-
"@salesforce/lds-store-sql": "^1.
|
|
70
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
71
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
48
|
+
"@conduit-client/command-aura-network": "3.33.0",
|
|
49
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.33.0",
|
|
50
|
+
"@conduit-client/command-fetch-network": "3.33.0",
|
|
51
|
+
"@conduit-client/command-http-normalized-cache-control": "3.33.0",
|
|
52
|
+
"@conduit-client/command-network": "3.33.0",
|
|
53
|
+
"@conduit-client/service-cache": "3.33.0",
|
|
54
|
+
"@conduit-client/service-cache-control": "3.33.0",
|
|
55
|
+
"@conduit-client/service-cache-inclusion-policy": "3.33.0",
|
|
56
|
+
"@conduit-client/service-fetch-network": "3.33.0",
|
|
57
|
+
"@conduit-client/service-instrument-command": "3.33.0",
|
|
58
|
+
"@conduit-client/service-instrumentation": "3.33.0",
|
|
59
|
+
"@conduit-client/service-pubsub": "3.33.0",
|
|
60
|
+
"@conduit-client/service-store": "3.33.0",
|
|
61
|
+
"@conduit-client/utils": "3.33.0",
|
|
62
|
+
"@salesforce/lds-adapters-graphql": "^1.466.0",
|
|
63
|
+
"@salesforce/lds-drafts": "^1.466.0",
|
|
64
|
+
"@salesforce/lds-durable-records": "^1.466.0",
|
|
65
|
+
"@salesforce/lds-network-adapter": "^1.466.0",
|
|
66
|
+
"@salesforce/lds-network-nimbus": "^1.466.0",
|
|
67
|
+
"@salesforce/lds-store-binary": "^1.466.0",
|
|
68
|
+
"@salesforce/lds-store-nimbus": "^1.466.0",
|
|
69
|
+
"@salesforce/lds-store-sql": "^1.466.0",
|
|
70
|
+
"@salesforce/lds-utils-adapters": "^1.466.0",
|
|
71
|
+
"@salesforce/nimbus-plugin-lds": "^1.466.0",
|
|
72
72
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
73
73
|
"wait-for-expect": "^3.0.2"
|
|
74
74
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -45226,47 +45226,41 @@ var DateLiteral;
|
|
|
45226
45226
|
DateLiteral["YESTERDAY"] = "YESTERDAY";
|
|
45227
45227
|
DateLiteral["NEXT_WEEK"] = "NEXT_WEEK";
|
|
45228
45228
|
})(DateLiteral || (DateLiteral = {}));
|
|
45229
|
-
// ranged adjusted to be between now and the end of the day,
|
|
45230
|
-
// you cannot do a straight = comparison in SQL
|
|
45231
45229
|
const TODAY_RANGE = {
|
|
45232
45230
|
lowerBound: `date('now')`,
|
|
45233
|
-
upperBound: `
|
|
45231
|
+
upperBound: `datetime('now', 'start of day', '+1 day', '-1 seconds')`,
|
|
45234
45232
|
};
|
|
45235
|
-
// ranged adjusted to be between today +1 day and +2 days -.001 seconds to be the very end of tomorrows date
|
|
45236
|
-
// you cannot do a straight = comparison in SQL
|
|
45237
45233
|
const TOMORROW_RANGE = {
|
|
45238
45234
|
lowerBound: `date('now', '+1 day')`,
|
|
45239
|
-
upperBound: `
|
|
45235
|
+
upperBound: `datetime('now', 'start of day', '+2 days', '-1 seconds')`,
|
|
45240
45236
|
};
|
|
45241
45237
|
const YESTERDAY_RANGE = {
|
|
45242
45238
|
lowerBound: `date('now', '-1 day')`,
|
|
45243
|
-
upperBound: `
|
|
45239
|
+
upperBound: `datetime('now', 'start of day', '-1 seconds')`,
|
|
45244
45240
|
};
|
|
45245
45241
|
const THIS_WEEK_RANGE = {
|
|
45246
|
-
lowerBound: `date('now', '
|
|
45247
|
-
upperBound: `
|
|
45242
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}')`,
|
|
45243
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+7 days', '-1 seconds')`,
|
|
45248
45244
|
};
|
|
45249
45245
|
const LAST_WEEK_RANGE = {
|
|
45250
|
-
lowerBound: `date('now', 'weekday
|
|
45251
|
-
upperBound: `
|
|
45246
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '-7 days')`,
|
|
45247
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '-1 seconds')`,
|
|
45252
45248
|
};
|
|
45253
45249
|
const NEXT_WEEK_RANGE = {
|
|
45254
|
-
lowerBound: `date('now', 'weekday
|
|
45255
|
-
upperBound: `
|
|
45250
|
+
lowerBound: `date('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+7 days')`,
|
|
45251
|
+
upperBound: `datetime('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', '+14 days', '-1 seconds')`,
|
|
45256
45252
|
};
|
|
45257
45253
|
const THIS_MONTH_RANGE = {
|
|
45258
45254
|
lowerBound: `date('now', 'start of month')`,
|
|
45259
|
-
upperBound: `
|
|
45255
|
+
upperBound: `datetime('now', 'start of month', '+1 month', '-1 seconds')`,
|
|
45260
45256
|
};
|
|
45261
45257
|
const LAST_MONTH_RANGE = {
|
|
45262
45258
|
lowerBound: `date('now', 'start of month', '-1 month')`,
|
|
45263
|
-
upperBound: `
|
|
45259
|
+
upperBound: `datetime('now', 'start of month', '-1 seconds')`,
|
|
45264
45260
|
};
|
|
45265
45261
|
const NEXT_MONTH_RANGE = {
|
|
45266
45262
|
lowerBound: `date('now', 'start of month', '+1 month')`,
|
|
45267
|
-
|
|
45268
|
-
// this needs to be 0 day
|
|
45269
|
-
upperBound: `date('now', 'start of month', '+2 month', '0 day')`,
|
|
45263
|
+
upperBound: `datetime('now', 'start of month', '+2 months', '-1 seconds')`,
|
|
45270
45264
|
};
|
|
45271
45265
|
const THIS_QUARTER_RANGE = () => {
|
|
45272
45266
|
return computeQuarterDateRange(DateLiteral.THIS_QUARTER);
|
|
@@ -45279,23 +45273,23 @@ const NEXT_QUARTER_RANGE = () => {
|
|
|
45279
45273
|
};
|
|
45280
45274
|
const THIS_YEAR_RANGE = {
|
|
45281
45275
|
lowerBound: `date('now', 'start of year')`,
|
|
45282
|
-
upperBound: `
|
|
45276
|
+
upperBound: `datetime('now', 'start of year', '+1 year', '-1 seconds')`,
|
|
45283
45277
|
};
|
|
45284
45278
|
const LAST_YEAR_RANGE = {
|
|
45285
45279
|
lowerBound: `date('now', 'start of year', '-1 year')`,
|
|
45286
|
-
upperBound: `
|
|
45280
|
+
upperBound: `datetime('now', 'start of year', '-1 seconds')`,
|
|
45287
45281
|
};
|
|
45288
45282
|
const NEXT_YEAR_RANGE = {
|
|
45289
45283
|
lowerBound: `date('now', 'start of year', '+1 year')`,
|
|
45290
|
-
upperBound: `
|
|
45284
|
+
upperBound: `datetime('now', 'start of year', '+2 years', '-1 seconds')`,
|
|
45291
45285
|
};
|
|
45292
45286
|
const LAST_90_DAYS_RANGE = {
|
|
45293
45287
|
lowerBound: `date('now', '-90 days')`,
|
|
45294
|
-
upperBound: `
|
|
45288
|
+
upperBound: `datetime('now')`,
|
|
45295
45289
|
};
|
|
45296
45290
|
const NEXT_90_DAYS_RANGE = {
|
|
45297
45291
|
lowerBound: `date('now', '+1 day')`,
|
|
45298
|
-
upperBound: `
|
|
45292
|
+
upperBound: `datetime('now', 'start of day', '+91 days', '-1 seconds')`,
|
|
45299
45293
|
};
|
|
45300
45294
|
// querter start date in UTC
|
|
45301
45295
|
function quarterStart(date) {
|
|
@@ -45309,23 +45303,17 @@ function computeQuarterDateRange(enumType) {
|
|
|
45309
45303
|
case DateLiteral.LAST_QUARTER:
|
|
45310
45304
|
return {
|
|
45311
45305
|
lowerBound: `date('${curQuarterStart}', '-3 months')`,
|
|
45312
|
-
|
|
45313
|
-
// 0 days sets it to the end of the month
|
|
45314
|
-
upperBound: `date('${curQuarterStart}', '0 days')`,
|
|
45306
|
+
upperBound: `datetime('${curQuarterStart}', '-1 seconds')`,
|
|
45315
45307
|
};
|
|
45316
45308
|
case DateLiteral.THIS_QUARTER:
|
|
45317
45309
|
return {
|
|
45318
45310
|
lowerBound: `date('${curQuarterStart}')`,
|
|
45319
|
-
|
|
45320
|
-
// 0 days sets it to the end of the month
|
|
45321
|
-
upperBound: `date('${curQuarterStart}', '3 months', '0 days')`,
|
|
45311
|
+
upperBound: `datetime('${curQuarterStart}', '+3 months', '-1 seconds')`,
|
|
45322
45312
|
};
|
|
45323
45313
|
case DateLiteral.NEXT_QUARTER:
|
|
45324
45314
|
return {
|
|
45325
45315
|
lowerBound: `date('${curQuarterStart}', '+3 months')`,
|
|
45326
|
-
|
|
45327
|
-
// 0 days sets it to the end of the month
|
|
45328
|
-
upperBound: `date('${curQuarterStart}', '+6 months', '0 days')`,
|
|
45316
|
+
upperBound: `datetime('${curQuarterStart}', '+6 months', '-1 seconds')`,
|
|
45329
45317
|
};
|
|
45330
45318
|
}
|
|
45331
45319
|
}
|
|
@@ -45544,11 +45532,11 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45544
45532
|
case DateRange.next_n_days: {
|
|
45545
45533
|
return {
|
|
45546
45534
|
binding: {
|
|
45547
|
-
upper: `${input} days`,
|
|
45535
|
+
upper: `${input + 1} days`,
|
|
45548
45536
|
lower: '1 days',
|
|
45549
45537
|
},
|
|
45550
45538
|
range: {
|
|
45551
|
-
upper: `${dateFunction}('now', 'start of day',
|
|
45539
|
+
upper: `${dateFunction}('now', 'start of day', ?, '-1 seconds')`,
|
|
45552
45540
|
lower: `${dateFunction}('now', 'start of day', ?)`,
|
|
45553
45541
|
},
|
|
45554
45542
|
};
|
|
@@ -45585,19 +45573,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45585
45573
|
// starts at 00:00:00 the first day of the week n weeks after the current week
|
|
45586
45574
|
// ends 23:59:59 of the last day of week before the current
|
|
45587
45575
|
case DateRange.next_n_weeks: {
|
|
45588
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45589
45576
|
return {
|
|
45590
45577
|
binding: {
|
|
45591
|
-
|
|
45592
|
-
|
|
45593
|
-
// so for the upper bound if today is the start of the week we need to add 7 more days to the value to get next week as the start
|
|
45594
|
-
upper: `${input * 7 + (isStartOfWeek ? 7 : 0)} days`,
|
|
45595
|
-
//lower bound starts out 00:00:00 of next week
|
|
45596
|
-
lower: `${isStartOfWeek ? 7 : 0} days`,
|
|
45578
|
+
upper: `${(input + 1) * 7} days`,
|
|
45579
|
+
lower: '7 days',
|
|
45597
45580
|
},
|
|
45598
45581
|
range: {
|
|
45599
|
-
upper: `${dateFunction}('now', '
|
|
45600
|
-
lower: `${dateFunction}('now', '
|
|
45582
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45583
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45601
45584
|
},
|
|
45602
45585
|
};
|
|
45603
45586
|
}
|
|
@@ -45605,19 +45588,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45605
45588
|
// starts at 00:00:00 of day 0 n weeks before the current week
|
|
45606
45589
|
// ends 23:59:59 at last day of the week before the current week
|
|
45607
45590
|
case DateRange.last_n_weeks: {
|
|
45608
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45609
45591
|
return {
|
|
45610
45592
|
binding: {
|
|
45611
|
-
|
|
45612
|
-
|
|
45613
|
-
upper: `${-(isStartOfWeek ? 0 : 7)} days`,
|
|
45614
|
-
// starting on 00:00:00 of n * weeks before current week
|
|
45615
|
-
// -7 more days if today not the start of the week because weekday FIRST_DAY_OF_WEEK puts us next week day 0
|
|
45616
|
-
lower: `${-input * 7 - (isStartOfWeek ? 0 : 7)} days`,
|
|
45593
|
+
upper: '0 days',
|
|
45594
|
+
lower: `${-input * 7} days`,
|
|
45617
45595
|
},
|
|
45618
45596
|
range: {
|
|
45619
|
-
upper: `${dateFunction}('now', '
|
|
45620
|
-
lower: `${dateFunction}('now', '
|
|
45597
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45598
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45621
45599
|
},
|
|
45622
45600
|
};
|
|
45623
45601
|
}
|
|
@@ -45625,21 +45603,14 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45625
45603
|
// starts 00:00:00 on day 0 of n weeks before the current week
|
|
45626
45604
|
// ends 7 days after the start
|
|
45627
45605
|
case DateRange.n_weeks_ago: {
|
|
45628
|
-
const isStartOfWeek = isTodayStartOfWeek();
|
|
45629
45606
|
return {
|
|
45630
45607
|
binding: {
|
|
45631
|
-
|
|
45632
|
-
|
|
45633
|
-
// so add 7 to remove a week from -(n)
|
|
45634
|
-
upper: `${-input * 7 + (isStartOfWeek ? 7 : 0)} days`,
|
|
45635
|
-
// start of the week n weeks from the current week
|
|
45636
|
-
// if today is the start of the week then -(n) will do to be the previous week, but
|
|
45637
|
-
// if today is not the start of the week we need to go back 1 more week since weekday FIRST_DAY_OF_WEEK will put us next week
|
|
45638
|
-
lower: `${-input * 7 - (isStartOfWeek ? 0 : 7)} days`,
|
|
45608
|
+
upper: `${-input * 7 + 7} days`,
|
|
45609
|
+
lower: `${-input * 7} days`,
|
|
45639
45610
|
},
|
|
45640
45611
|
range: {
|
|
45641
|
-
upper: `${dateFunction}('now', '
|
|
45642
|
-
lower: `${dateFunction}('now', '
|
|
45612
|
+
upper: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?, '-1 seconds')`,
|
|
45613
|
+
lower: `${dateFunction}('now', 'start of day', '-6 days', 'weekday ${FIRST_DAY_OF_WEEK}', ?)`,
|
|
45643
45614
|
},
|
|
45644
45615
|
};
|
|
45645
45616
|
}
|
|
@@ -45789,9 +45760,6 @@ function dateRangesFrom(dateRange, input, dateFunction) {
|
|
|
45789
45760
|
throw new Error(`DateRangeInput ${dateRange} is not supported in local evalutation`);
|
|
45790
45761
|
}
|
|
45791
45762
|
}
|
|
45792
|
-
function isTodayStartOfWeek() {
|
|
45793
|
-
return new Date().getDay() === FIRST_DAY_OF_WEEK;
|
|
45794
|
-
}
|
|
45795
45763
|
|
|
45796
45764
|
const JSON_EXTRACT_PATH_INGESTION_TIMESTAMP = '$.ingestionTimestamp';
|
|
45797
45765
|
const JSON_EXTRACT_PATH_INGESTION_APINAME = '$.apiName';
|
|
@@ -57996,8 +57964,8 @@ class InternalError extends Error {
|
|
|
57996
57964
|
}
|
|
57997
57965
|
}
|
|
57998
57966
|
class UserVisibleError extends Error {
|
|
57999
|
-
constructor(data) {
|
|
58000
|
-
super();
|
|
57967
|
+
constructor(data, message) {
|
|
57968
|
+
super(message);
|
|
58001
57969
|
this.data = data;
|
|
58002
57970
|
this.type = "user-visible";
|
|
58003
57971
|
}
|
|
@@ -58065,13 +58033,17 @@ function buildServiceDescriptor$m() {
|
|
|
58065
58033
|
};
|
|
58066
58034
|
}
|
|
58067
58035
|
|
|
58068
|
-
function applyOperationRequestOptions$
|
|
58069
|
-
if (operationType === void 0) {
|
|
58036
|
+
function applyOperationRequestOptions$3(init, operationType, requestOptions) {
|
|
58037
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58070
58038
|
return init;
|
|
58071
58039
|
}
|
|
58072
58040
|
return {
|
|
58073
58041
|
...init,
|
|
58074
|
-
onestore: {
|
|
58042
|
+
onestore: {
|
|
58043
|
+
...requestOptions,
|
|
58044
|
+
...init?.onestore,
|
|
58045
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58046
|
+
}
|
|
58075
58047
|
};
|
|
58076
58048
|
}
|
|
58077
58049
|
class AuraNetworkCommand extends NetworkCommand$1 {
|
|
@@ -58104,8 +58076,16 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
58104
58076
|
get operationType() {
|
|
58105
58077
|
return void 0;
|
|
58106
58078
|
}
|
|
58079
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
|
|
58080
|
+
get requestOptions() {
|
|
58081
|
+
return void 0;
|
|
58082
|
+
}
|
|
58107
58083
|
coerceAuraErrors(auraErrors) {
|
|
58108
|
-
|
|
58084
|
+
const response = getFetchResponseFromAuraError(auraErrors[0]);
|
|
58085
|
+
return new UserVisibleError(
|
|
58086
|
+
response,
|
|
58087
|
+
`Error from ${this.endpoint}, status ${response.status}`
|
|
58088
|
+
);
|
|
58109
58089
|
}
|
|
58110
58090
|
/**
|
|
58111
58091
|
* Customize how non-2xx fetch fallback responses are converted into errors.
|
|
@@ -58202,11 +58182,15 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
58202
58182
|
this.auraParams,
|
|
58203
58183
|
this.actionConfig
|
|
58204
58184
|
),
|
|
58205
|
-
this.coerceAuraErrors
|
|
58185
|
+
(errs) => this.coerceAuraErrors(errs)
|
|
58206
58186
|
);
|
|
58207
58187
|
} else if (this.shouldUseFetch()) {
|
|
58208
58188
|
const [input, init] = this.fetchParams;
|
|
58209
|
-
const initWithOptions = applyOperationRequestOptions$
|
|
58189
|
+
const initWithOptions = applyOperationRequestOptions$3(
|
|
58190
|
+
init,
|
|
58191
|
+
this.operationType,
|
|
58192
|
+
this.requestOptions
|
|
58193
|
+
);
|
|
58210
58194
|
try {
|
|
58211
58195
|
const fetchCall = initWithOptions === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithOptions);
|
|
58212
58196
|
return this.convertFetchResponseToData(fetchCall);
|
|
@@ -58774,6 +58758,19 @@ function mergeCacheControlConfigs(baseConfig, overrides) {
|
|
|
58774
58758
|
};
|
|
58775
58759
|
}
|
|
58776
58760
|
|
|
58761
|
+
function applyOperationRequestOptions$2(init, operationType, requestOptions) {
|
|
58762
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58763
|
+
return init;
|
|
58764
|
+
}
|
|
58765
|
+
return {
|
|
58766
|
+
...init,
|
|
58767
|
+
onestore: {
|
|
58768
|
+
...requestOptions,
|
|
58769
|
+
...init?.onestore,
|
|
58770
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58771
|
+
}
|
|
58772
|
+
};
|
|
58773
|
+
}
|
|
58777
58774
|
class AuraCacheControlCommand extends CacheControlCommand {
|
|
58778
58775
|
constructor(services) {
|
|
58779
58776
|
super(services);
|
|
@@ -58791,6 +58788,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
58791
58788
|
"Fetch parameters must be specified when using HTTP transport on an Aura adapter"
|
|
58792
58789
|
);
|
|
58793
58790
|
}
|
|
58791
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
|
|
58792
|
+
get requestOptions() {
|
|
58793
|
+
return void 0;
|
|
58794
|
+
}
|
|
58795
|
+
/**
|
|
58796
|
+
* `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
|
|
58797
|
+
* `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
|
|
58798
|
+
*/
|
|
58799
|
+
withRequestOptions([
|
|
58800
|
+
input,
|
|
58801
|
+
init
|
|
58802
|
+
]) {
|
|
58803
|
+
return [input, applyOperationRequestOptions$2(init, this.operationType, this.requestOptions)];
|
|
58804
|
+
}
|
|
58794
58805
|
shouldUseAuraNetwork() {
|
|
58795
58806
|
return this.services.auraNetwork !== void 0 && (this.networkPreference === "aura" || !this.services.fetch);
|
|
58796
58807
|
}
|
|
@@ -58809,7 +58820,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
58809
58820
|
(errs) => this.coerceAuraErrors(errs)
|
|
58810
58821
|
);
|
|
58811
58822
|
} else if (this.shouldUseFetch()) {
|
|
58812
|
-
const params = this.fetchParams;
|
|
58823
|
+
const params = this.withRequestOptions(this.fetchParams);
|
|
58813
58824
|
try {
|
|
58814
58825
|
return this.convertFetchResponseToData(this.services.fetch(...params));
|
|
58815
58826
|
} catch (reason) {
|
|
@@ -58956,13 +58967,17 @@ class NetworkCommand extends BaseCommand {
|
|
|
58956
58967
|
async afterRequestHooks(_options) {
|
|
58957
58968
|
}
|
|
58958
58969
|
}
|
|
58959
|
-
function applyOperationRequestOptions(init, operationType) {
|
|
58960
|
-
if (operationType === void 0) {
|
|
58970
|
+
function applyOperationRequestOptions$1(init, operationType, requestOptions) {
|
|
58971
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
58961
58972
|
return init;
|
|
58962
58973
|
}
|
|
58963
58974
|
return {
|
|
58964
58975
|
...init,
|
|
58965
|
-
onestore: {
|
|
58976
|
+
onestore: {
|
|
58977
|
+
...requestOptions,
|
|
58978
|
+
...init?.onestore,
|
|
58979
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
58980
|
+
}
|
|
58966
58981
|
};
|
|
58967
58982
|
}
|
|
58968
58983
|
function isAbortableCommand(command) {
|
|
@@ -59060,11 +59075,19 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
|
|
|
59060
59075
|
get operationType() {
|
|
59061
59076
|
return void 0;
|
|
59062
59077
|
}
|
|
59078
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides (`generateRequestOptionsGetter`). */
|
|
59079
|
+
get requestOptions() {
|
|
59080
|
+
return void 0;
|
|
59081
|
+
}
|
|
59063
59082
|
fetch(contextSeed) {
|
|
59064
59083
|
try {
|
|
59065
59084
|
const [input, init] = this.fetchParams;
|
|
59066
59085
|
const operationType = this.operationType;
|
|
59067
|
-
const initWithOptions = applyOperationRequestOptions(
|
|
59086
|
+
const initWithOptions = applyOperationRequestOptions$1(
|
|
59087
|
+
init,
|
|
59088
|
+
operationType,
|
|
59089
|
+
this.requestOptions
|
|
59090
|
+
);
|
|
59068
59091
|
const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
|
|
59069
59092
|
const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
|
|
59070
59093
|
const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
|
|
@@ -59139,6 +59162,19 @@ function buildServiceDescriptor$j() {
|
|
|
59139
59162
|
};
|
|
59140
59163
|
}
|
|
59141
59164
|
|
|
59165
|
+
function applyOperationRequestOptions(init, operationType, requestOptions) {
|
|
59166
|
+
if (operationType === void 0 && requestOptions === void 0) {
|
|
59167
|
+
return init;
|
|
59168
|
+
}
|
|
59169
|
+
return {
|
|
59170
|
+
...init,
|
|
59171
|
+
onestore: {
|
|
59172
|
+
...requestOptions,
|
|
59173
|
+
...init?.onestore,
|
|
59174
|
+
...operationType !== void 0 && { retrySafe: operationType === "query" }
|
|
59175
|
+
}
|
|
59176
|
+
};
|
|
59177
|
+
}
|
|
59142
59178
|
class HttpCacheControlCommand extends CacheControlCommand {
|
|
59143
59179
|
constructor(services) {
|
|
59144
59180
|
super(services);
|
|
@@ -59148,9 +59184,25 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
59148
59184
|
requestFromNetwork() {
|
|
59149
59185
|
return this.fetch();
|
|
59150
59186
|
}
|
|
59187
|
+
/** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. */
|
|
59188
|
+
get requestOptions() {
|
|
59189
|
+
return void 0;
|
|
59190
|
+
}
|
|
59191
|
+
/**
|
|
59192
|
+
* `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
|
|
59193
|
+
* `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
|
|
59194
|
+
*/
|
|
59195
|
+
withRequestOptions([
|
|
59196
|
+
input,
|
|
59197
|
+
init
|
|
59198
|
+
]) {
|
|
59199
|
+
return [input, applyOperationRequestOptions(init, this.operationType, this.requestOptions)];
|
|
59200
|
+
}
|
|
59151
59201
|
fetch() {
|
|
59152
59202
|
try {
|
|
59153
|
-
return this.convertFetchResponseToData(
|
|
59203
|
+
return this.convertFetchResponseToData(
|
|
59204
|
+
this.services.fetch(...this.withRequestOptions(this.fetchParams))
|
|
59205
|
+
);
|
|
59154
59206
|
} catch (reason) {
|
|
59155
59207
|
return resolvedPromiseLike$2(err$1(toError(reason)));
|
|
59156
59208
|
}
|
|
@@ -60160,7 +60212,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
60160
60212
|
},
|
|
60161
60213
|
};
|
|
60162
60214
|
}
|
|
60163
|
-
// version: 1.
|
|
60215
|
+
// version: 1.466.0-b7b08a8e3c
|
|
60164
60216
|
|
|
60165
60217
|
/**
|
|
60166
60218
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -60186,7 +60238,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
60186
60238
|
},
|
|
60187
60239
|
};
|
|
60188
60240
|
}
|
|
60189
|
-
// version: 1.
|
|
60241
|
+
// version: 1.466.0-b7b08a8e3c
|
|
60190
60242
|
|
|
60191
60243
|
function findExecutableOperation(input) {
|
|
60192
60244
|
const operations = input.query.definitions.filter(
|
|
@@ -60383,7 +60435,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
|
|
|
60383
60435
|
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
60384
60436
|
});
|
|
60385
60437
|
} else if (this.shouldUseFetch()) {
|
|
60386
|
-
const params = this.originalFetchParams;
|
|
60438
|
+
const params = this.withRequestOptions(this.originalFetchParams);
|
|
60387
60439
|
try {
|
|
60388
60440
|
return this.convertFetchResponseToData(this.services.fetch(...params)).then(
|
|
60389
60441
|
(result) => {
|
|
@@ -60538,7 +60590,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
|
|
|
60538
60590
|
}
|
|
60539
60591
|
runOriginalRequest() {
|
|
60540
60592
|
return this.convertFetchResponseToData(
|
|
60541
|
-
this.services.fetch(...this.originalFetchParams)
|
|
60593
|
+
this.services.fetch(...this.withRequestOptions(this.originalFetchParams))
|
|
60542
60594
|
).then((result) => {
|
|
60543
60595
|
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
60544
60596
|
});
|
|
@@ -62598,10 +62650,6 @@ function initializeOneStore(sqliteStore, luvio) {
|
|
|
62598
62650
|
const instrumentationServiceDescriptor = buildServiceDescriptor$e(loggerService);
|
|
62599
62651
|
const nimbusSqliteOneStoreCacheServiceDescriptor = buildNimbusDurableCacheInclusionPolicyService(cacheServiceDescriptor.service, new NimbusSqliteOneStoreCache(sqliteStore));
|
|
62600
62652
|
const featureFlagsServiceDescriptor = buildServiceDescriptor$c();
|
|
62601
|
-
const featureFlagsService = featureFlagsServiceDescriptor.service;
|
|
62602
|
-
// This disables the GraphQL mapping from lightning/uiGraphQLApi to lightning/graphql in this runtime
|
|
62603
|
-
// The gate is likely NOT to rollout ever, but we keep it here for completeness
|
|
62604
|
-
featureFlagsService.set('useOneStoreGraphQL', false);
|
|
62605
62653
|
const luvioUiapiRecordsServiceDescriptor = buildServiceDescriptor$a((configs) => {
|
|
62606
62654
|
return notifyUpdateAvailableFactory(luvio)(configs);
|
|
62607
62655
|
}, (recordId, reader) => {
|
|
@@ -62908,4 +62956,4 @@ register({
|
|
|
62908
62956
|
});
|
|
62909
62957
|
|
|
62910
62958
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
62911
|
-
// version: 1.
|
|
62959
|
+
// version: 1.466.0-b7b08a8e3c
|