@ancon/wildcat-utils 1.30.6 → 1.31.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/index.js +1 -1
- package/index.mjs +89 -87
- package/logger/Logger.d.ts +1 -0
- package/logger/Logger.js +1 -1
- package/logger/Logger.mjs +6 -3
- package/logger/index.d.ts +2 -1
- package/logger/index.js +1 -1
- package/logger/index.mjs +9 -6
- package/logger/pascalCaseFormatter.d.ts +2 -0
- package/logger/pascalCaseFormatter.js +1 -0
- package/logger/pascalCaseFormatter.mjs +10 -0
- package/logger/sanitizeAsStringDict.js +1 -1
- package/logger/sanitizeAsStringDict.mjs +7 -7
- package/logger/types.d.ts +5 -0
- package/package.json +6 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./shared/isWithinFlag.js"),t=require("./shared/generateId.js"),i=require("./shared/wait.js"),o=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),n=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),g=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),O=require("./outlet/getPickerIntervalsForDay.js"),k=require("./outlet/getServiceIntervalRange.js"),m=require("./outlet/getServiceIntervalsForOrderFormat.js"),h=require("./outlet/getOutletFormattedAddress.js"),P=require("./outlet/getPartitionedOutletsList.js"),p=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),C=require("./versioning/isVersionALessThanB.js"),F=require("./versioning/cleanVersionString.js"),f=require("./api/getUrlAndParams.js"),T=require("./api/getEndpointWithVersion.js"),v=require("./api/generateBackoffWithEqualJitter.js"),y=require("./api/isAcceptedResponse.js"),I=require("./api/isNoContentResponse.js"),A=require("./string/slugify.js"),D=require("./string/truncate.js"),R=require("./color/lighten.js"),b=require("./color/brighten.js"),E=require("./color/darken.js"),V=require("./color/isDarkBackground.js"),M=require("./user/getFullName.js"),H=require("./user/getFullAddressString.js"),L=require("./user/getCustomerAddressFromGeocoderResult.js"),N=require("./user/getFormattedPhoneNumber.js"),W=require("./user/getStructuredCustomerAddress.js"),B=require("./logger/Logger.js"),U=require("./logger/types.js"),G=require("./logger/sanitizeAsStringDict.js"),w=require("./printing/getPrinterType.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./shared/isWithinFlag.js"),t=require("./shared/generateId.js"),i=require("./shared/wait.js"),o=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),n=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),g=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),O=require("./outlet/getPickerIntervalsForDay.js"),k=require("./outlet/getServiceIntervalRange.js"),m=require("./outlet/getServiceIntervalsForOrderFormat.js"),h=require("./outlet/getOutletFormattedAddress.js"),P=require("./outlet/getPartitionedOutletsList.js"),p=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),C=require("./versioning/isVersionALessThanB.js"),F=require("./versioning/cleanVersionString.js"),f=require("./api/getUrlAndParams.js"),T=require("./api/getEndpointWithVersion.js"),v=require("./api/generateBackoffWithEqualJitter.js"),y=require("./api/isAcceptedResponse.js"),I=require("./api/isNoContentResponse.js"),A=require("./string/slugify.js"),D=require("./string/truncate.js"),R=require("./color/lighten.js"),b=require("./color/brighten.js"),E=require("./color/darken.js"),V=require("./color/isDarkBackground.js"),M=require("./user/getFullName.js"),H=require("./user/getFullAddressString.js"),L=require("./user/getCustomerAddressFromGeocoderResult.js"),N=require("./user/getFormattedPhoneNumber.js"),W=require("./user/getStructuredCustomerAddress.js"),B=require("./logger/Logger.js"),U=require("./logger/types.js"),G=require("./logger/sanitizeAsStringDict.js"),w=require("./logger/pascalCaseFormatter.js"),x=require("./printing/getPrinterType.js"),z=require("./printing/isValidPrinter.js"),J=require("./printing/isValidNetworkPrinter.js"),K=require("./printing/isValidStarCloudPrinter.js"),Q=require("./printing/isTerminalPrinter.js"),j=require("./printing/isCloudPrintModeEnabled.js"),X=require("./number/randomIntFromInterval.js"),Y=require("./tables/decodeTableQRPayload.js"),Z=require("./checkout/getCheckoutItemModifications.js"),$=require("./checkout/getCheckoutProductName.js"),e=require("./checkout/getCheckoutOrderStatusTexts.js"),ee=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),re=require("./checkout/isCheckoutOrderSummary.js"),te=require("./checkout/buildCheckoutRequestItem.js"),ie=require("./checkout/getCheckoutGrandTotalAmount.js"),oe=require("./checkout/getCheckoutRequestItemFromCheckoutItem.js"),ue=require("./checkout/isCheckoutItemsAreEqual.js"),se=require("./checkout/checkoutHasWallet.js"),ne=require("./checkout/getWalletMetaFromCheckout.js"),ce=require("./checkout/isPreOrderServiceTime.js"),ae=require("./checkout/isPreOrderCheckout.js"),le=require("./currency/getFormattedCurrency.js"),de=require("./inventory/isDetailedProductOutOfStock.js"),ge=require("./inventory/isDetailedProductVariantOutOfStocks.js"),qe=require("./inventory/isMenuTreeProductOutOfStock.js"),_e=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),Oe=require("./inventory/isUpSellProductOutStock.js"),ke=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),me=require("./inventory/getDetailedProductVariantStock.js"),he=require("./signalr/createUseSignalRHook.js"),Pe=require("./signalr/SignalR.js"),pe=require("./error/createCodedError.js"),Se=require("./error/isCodedError.js"),Ce=require("./error/isNetworkError.js"),Fe=require("./error/isLockedError.js"),fe=require("./error/serializeError.js"),Te=require("./hangfire/isHangfireResponse.js"),ve=require("./hangfire/createHangfirePoller.js"),ye=require("./hangfire/createMakeHangfireRequest.js"),Ie=require("./product/extractProductsFromMenuTree.js"),Ae=require("./product/calculateIngredientsCost.js"),De=require("./product/calculateAddonGroupCost.js");require("moment");require("@ancon/wildcat-types");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("lodash");require("./shared/constants.js");require("./time/toMinutes.js");require("./time/getNextTenthMinute.js");require("./outlet/types.js");require("./outlet/getSettingsForOrderFormat.js");require("./outlet/getServiceIntervalStart.js");require("./outlet/getNextTenthMinute.js");require("./outlet/generatePickerTimesForDay.js");require("./outlet/getServiceIntervalEnd.js");require("./outlet/hoursAndMinutesToMinutes.js");require("compare-versions");require("tinycolor2");require("google-libphonenumber");require("@ancon/wildcat-printing");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");require("./index-4a932b99.js");require("./axios-5f25f7ff.js");exports.isWithinFlag=r;exports.generateId=t;exports.wait=i;exports.getListOutletOpeningHoursTable=o;exports.getOutletTagInformation=u.default;exports.getOutletAvailabilityInfo=s.default;exports.getOutletOfflineOrderFormats=n;exports.getOutletAvailableOrderFormats=c;exports.getOutletFormattedDistance=a;exports.isOutletAcceptingPreOrders=l;exports.getOutletDeliveryFee=d;exports.getOutletTodayOpeningTimes=g;exports.getOutletOrderFormats=q;exports.serviceDateTimesFromOpeningHours=_;exports.getPickerIntervalsForDay=O;exports.getServiceIntervalRange=k;exports.getServiceIntervalsForOrderFormat=m;exports.getOutletFormattedAddress=h;exports.getPartitionedOutletsList=P;exports.getOutletPickerTimesForWeek=p;exports.getOutletOrderPreparationTime=S;exports.isVersionALessThanB=C;exports.cleanVersionString=F;exports.getUrlAndParams=f;exports.getEndpointWithVersion=T;exports.generateBackoffWithEqualJitter=v;exports.isAcceptedResponse=y;exports.isNoContentResponse=I;exports.slugify=A;exports.truncate=D;exports.lighten=R;exports.brighten=b;exports.darken=E;exports.isDarkBackground=V;exports.getFullName=M;exports.getFullAddressString=H;exports.getCustomerAddressFromGeocoderResult=L;exports.getFormattedPhoneNumber=N;exports.getStructuredCustomerAddress=W;exports.Logger=B;exports.LogLevel=U.LogLevel;exports.sanitizeAsStringDict=G;exports.pascalCaseFormatter=w;exports.getPrinterType=x;exports.isValidPrinter=z;exports.isValidNetworkPrinter=J;exports.isValidStarCloudPrinter=K;exports.isTerminalPrinter=Q;exports.isCloudPrintModeEnabled=j;exports.randomIntFromInterval=X;exports.decodeTableQRPayload=Y;exports.getCheckoutGroupedModifications=Z;exports.getCheckoutProductName=$;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=ee;exports.isCheckoutOrderSummary=re;exports.buildCheckoutRequestItem=te;exports.getCheckoutGrandTotalAmount=ie;exports.getCheckoutRequestItemFromCheckoutItem=oe;exports.isCheckoutItemsAreEqual=ue;exports.checkoutHasWallet=se;exports.getWalletMetaFromCheckout=ne;exports.isPreOrderServiceTime=ce;exports.isPreOrderCheckout=ae;exports.getFormattedCurrency=le;exports.isDetailedProductOutOfStock=de;exports.isDetailedProductVariantOutOfStocks=ge;exports.isMenuTreeProductOutOfStock=qe;exports.isDetailedProductUpSellsOutOfStock=_e;exports.isUpSellProductOutOfStock=Oe;exports.isDetailedProductOutletStockOutOfStock=ke;exports.getDetailedProductVariantStock=me;exports.createUseSignalRHook=he;exports.SignalR=Pe;exports.createCodedError=pe;exports.isCodedError=Se;exports.isNetworkError=Ce;exports.isLockedError=Fe;exports.serializeError=fe;exports.isHangfireResponse=Te;exports.createHangfirePoller=ve.default;exports.createMakeHangfireRequest=ye;exports.extractProductsFromMenuTree=Ie;exports.calculateIngredientsCost=Ae;exports.calculateAddonGroupsCost=De;
|
package/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { default as xe } from "./outlet/getOutletPickerTimesForWeek.mjs";
|
|
|
21
21
|
import { default as ce } from "./outlet/getOutletOrderPrepTime.mjs";
|
|
22
22
|
import { default as Oe } from "./versioning/isVersionALessThanB.mjs";
|
|
23
23
|
import { default as Pe } from "./versioning/cleanVersionString.mjs";
|
|
24
|
-
import { default as
|
|
24
|
+
import { default as Se } from "./api/getUrlAndParams.mjs";
|
|
25
25
|
import { default as he } from "./api/getEndpointWithVersion.mjs";
|
|
26
26
|
import { default as Ie } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
27
27
|
import { default as ve } from "./api/isAcceptedResponse.mjs";
|
|
@@ -40,48 +40,49 @@ import { default as Ze } from "./user/getStructuredCustomerAddress.mjs";
|
|
|
40
40
|
import { default as $e } from "./logger/Logger.mjs";
|
|
41
41
|
import { LogLevel as tt } from "./logger/types.mjs";
|
|
42
42
|
import { default as ot } from "./logger/sanitizeAsStringDict.mjs";
|
|
43
|
-
import { default as ft } from "./
|
|
44
|
-
import { default as ut } from "./printing/
|
|
45
|
-
import { default as dt } from "./printing/
|
|
46
|
-
import { default as it } from "./printing/
|
|
47
|
-
import { default as xt } from "./printing/
|
|
48
|
-
import { default as ct } from "./printing/
|
|
49
|
-
import { default as Ot } from "./
|
|
50
|
-
import { default as Pt } from "./
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as ht } from "./checkout/
|
|
53
|
-
import {
|
|
54
|
-
import { default as yt } from "./checkout/
|
|
55
|
-
import { default as Rt } from "./checkout/
|
|
56
|
-
import { default as bt } from "./checkout/
|
|
57
|
-
import { default as Ht } from "./checkout/
|
|
58
|
-
import { default as Mt } from "./checkout/
|
|
59
|
-
import { default as Wt } from "./checkout/
|
|
60
|
-
import { default as Bt } from "./checkout/
|
|
61
|
-
import { default as Ut } from "./checkout/
|
|
62
|
-
import { default as zt } from "./checkout/
|
|
63
|
-
import { default as Kt } from "./checkout/
|
|
64
|
-
import { default as jt } from "./
|
|
65
|
-
import { default as Yt } from "./
|
|
66
|
-
import { default as _t } from "./inventory/
|
|
67
|
-
import { default as er } from "./inventory/
|
|
68
|
-
import { default as rr } from "./inventory/
|
|
69
|
-
import { default as ar } from "./inventory/
|
|
70
|
-
import { default as sr } from "./inventory/
|
|
71
|
-
import { default as lr } from "./inventory/
|
|
72
|
-
import { default as mr } from "./
|
|
73
|
-
import { default as pr } from "./signalr/
|
|
74
|
-
import { default as nr } from "./
|
|
75
|
-
import { default as gr } from "./error/
|
|
76
|
-
import { default as kr } from "./error/
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as Fr } from "./error/
|
|
79
|
-
import { default as Tr } from "./
|
|
80
|
-
import { default as Ar } from "./hangfire/
|
|
81
|
-
import { default as yr } from "./hangfire/
|
|
82
|
-
import { default as Rr } from "./
|
|
83
|
-
import { default as br } from "./product/
|
|
84
|
-
import { default as Hr } from "./product/
|
|
43
|
+
import { default as ft } from "./logger/pascalCaseFormatter.mjs";
|
|
44
|
+
import { default as ut } from "./printing/getPrinterType.mjs";
|
|
45
|
+
import { default as dt } from "./printing/isValidPrinter.mjs";
|
|
46
|
+
import { default as it } from "./printing/isValidNetworkPrinter.mjs";
|
|
47
|
+
import { default as xt } from "./printing/isValidStarCloudPrinter.mjs";
|
|
48
|
+
import { default as ct } from "./printing/isTerminalPrinter.mjs";
|
|
49
|
+
import { default as Ot } from "./printing/isCloudPrintModeEnabled.mjs";
|
|
50
|
+
import { default as Pt } from "./number/randomIntFromInterval.mjs";
|
|
51
|
+
import { default as St } from "./tables/decodeTableQRPayload.mjs";
|
|
52
|
+
import { default as ht } from "./checkout/getCheckoutItemModifications.mjs";
|
|
53
|
+
import { default as It } from "./checkout/getCheckoutProductName.mjs";
|
|
54
|
+
import { TranslationKey as vt, default as yt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
55
|
+
import { default as Rt } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
56
|
+
import { default as bt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
57
|
+
import { default as Ht } from "./checkout/buildCheckoutRequestItem.mjs";
|
|
58
|
+
import { default as Mt } from "./checkout/getCheckoutGrandTotalAmount.mjs";
|
|
59
|
+
import { default as Wt } from "./checkout/getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
60
|
+
import { default as Bt } from "./checkout/isCheckoutItemsAreEqual.mjs";
|
|
61
|
+
import { default as Ut } from "./checkout/checkoutHasWallet.mjs";
|
|
62
|
+
import { default as zt } from "./checkout/getWalletMetaFromCheckout.mjs";
|
|
63
|
+
import { default as Kt } from "./checkout/isPreOrderServiceTime.mjs";
|
|
64
|
+
import { default as jt } from "./checkout/isPreOrderCheckout.mjs";
|
|
65
|
+
import { default as Yt } from "./currency/getFormattedCurrency.mjs";
|
|
66
|
+
import { default as _t } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
67
|
+
import { default as er } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
68
|
+
import { default as rr } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
69
|
+
import { default as ar } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
70
|
+
import { default as sr } from "./inventory/isUpSellProductOutStock.mjs";
|
|
71
|
+
import { default as lr } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
72
|
+
import { default as mr } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
73
|
+
import { default as pr } from "./signalr/createUseSignalRHook.mjs";
|
|
74
|
+
import { default as nr } from "./signalr/SignalR.mjs";
|
|
75
|
+
import { default as gr } from "./error/createCodedError.mjs";
|
|
76
|
+
import { default as kr } from "./error/isCodedError.mjs";
|
|
77
|
+
import { default as Cr } from "./error/isNetworkError.mjs";
|
|
78
|
+
import { default as Fr } from "./error/isLockedError.mjs";
|
|
79
|
+
import { default as Tr } from "./error/serializeError.mjs";
|
|
80
|
+
import { default as Ar } from "./hangfire/isHangfireResponse.mjs";
|
|
81
|
+
import { default as yr } from "./hangfire/createHangfirePoller.mjs";
|
|
82
|
+
import { default as Rr } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
83
|
+
import { default as br } from "./product/extractProductsFromMenuTree.mjs";
|
|
84
|
+
import { default as Hr } from "./product/calculateIngredientsCost.mjs";
|
|
85
|
+
import { default as Mr } from "./product/calculateAddonGroupCost.mjs";
|
|
85
86
|
import "moment";
|
|
86
87
|
import "@ancon/wildcat-types";
|
|
87
88
|
import "./outlet/constants.mjs";
|
|
@@ -112,33 +113,33 @@ import "./axios-aa12e368.mjs";
|
|
|
112
113
|
export {
|
|
113
114
|
tt as LogLevel,
|
|
114
115
|
$e as Logger,
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
nr as SignalR,
|
|
117
|
+
vt as TranslationKey,
|
|
117
118
|
Ne as brighten,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
Ht as buildCheckoutRequestItem,
|
|
120
|
+
Mr as calculateAddonGroupsCost,
|
|
121
|
+
Hr as calculateIngredientsCost,
|
|
122
|
+
Ut as checkoutHasWallet,
|
|
122
123
|
Pe as cleanVersionString,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
gr as createCodedError,
|
|
125
|
+
yr as createHangfirePoller,
|
|
126
|
+
Rr as createMakeHangfireRequest,
|
|
127
|
+
pr as createUseSignalRHook,
|
|
127
128
|
qe as darken,
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
St as decodeTableQRPayload,
|
|
130
|
+
br as extractProductsFromMenuTree,
|
|
130
131
|
Ie as generateBackoffWithEqualJitter,
|
|
131
132
|
E as generateId,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
Mt as getCheckoutGrandTotalAmount,
|
|
134
|
+
ht as getCheckoutGroupedModifications,
|
|
135
|
+
Rt as getCheckoutItemsMappedByTicketItemStatus,
|
|
136
|
+
yt as getCheckoutOrderStatusTexts,
|
|
137
|
+
It as getCheckoutProductName,
|
|
138
|
+
Wt as getCheckoutRequestItemFromCheckoutItem,
|
|
138
139
|
Qe as getCustomerAddressFromGeocoderResult,
|
|
139
|
-
|
|
140
|
+
mr as getDetailedProductVariantStock,
|
|
140
141
|
he as getEndpointWithVersion,
|
|
141
|
-
|
|
142
|
+
Yt as getFormattedCurrency,
|
|
142
143
|
Xe as getFormattedPhoneNumber,
|
|
143
144
|
Je as getFullAddressString,
|
|
144
145
|
we as getFullName,
|
|
@@ -156,41 +157,42 @@ export {
|
|
|
156
157
|
Z as getOutletTodayOpeningTimes,
|
|
157
158
|
ie as getPartitionedOutletsList,
|
|
158
159
|
oe as getPickerIntervalsForDay,
|
|
159
|
-
|
|
160
|
+
ut as getPrinterType,
|
|
160
161
|
fe as getServiceIntervalRange,
|
|
161
162
|
ue as getServiceIntervalsForOrderFormat,
|
|
162
163
|
Ze as getStructuredCustomerAddress,
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
Se as getUrlAndParams,
|
|
165
|
+
zt as getWalletMetaFromCheckout,
|
|
165
166
|
ve as isAcceptedResponse,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
Bt as isCheckoutItemsAreEqual,
|
|
168
|
+
bt as isCheckoutOrderSummary,
|
|
169
|
+
Ot as isCloudPrintModeEnabled,
|
|
170
|
+
kr as isCodedError,
|
|
170
171
|
Ge as isDarkBackground,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
_t as isDetailedProductOutOfStock,
|
|
173
|
+
lr as isDetailedProductOutletStockOutOfStock,
|
|
174
|
+
ar as isDetailedProductUpSellsOutOfStock,
|
|
175
|
+
er as isDetailedProductVariantOutOfStocks,
|
|
176
|
+
Ar as isHangfireResponse,
|
|
177
|
+
Fr as isLockedError,
|
|
178
|
+
rr as isMenuTreeProductOutOfStock,
|
|
179
|
+
Cr as isNetworkError,
|
|
179
180
|
De as isNoContentResponse,
|
|
180
181
|
Q as isOutletAcceptingPreOrders,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
jt as isPreOrderCheckout,
|
|
183
|
+
Kt as isPreOrderServiceTime,
|
|
184
|
+
ct as isTerminalPrinter,
|
|
185
|
+
sr as isUpSellProductOutOfStock,
|
|
186
|
+
it as isValidNetworkPrinter,
|
|
187
|
+
dt as isValidPrinter,
|
|
188
|
+
xt as isValidStarCloudPrinter,
|
|
188
189
|
Oe as isVersionALessThanB,
|
|
189
190
|
D as isWithinFlag,
|
|
190
191
|
Le as lighten,
|
|
191
|
-
|
|
192
|
+
ft as pascalCaseFormatter,
|
|
193
|
+
Pt as randomIntFromInterval,
|
|
192
194
|
ot as sanitizeAsStringDict,
|
|
193
|
-
|
|
195
|
+
Tr as serializeError,
|
|
194
196
|
te as serviceDateTimesFromOpeningHours,
|
|
195
197
|
Ee as slugify,
|
|
196
198
|
Ve as truncate,
|
package/logger/Logger.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { LogStrategy } from './types';
|
|
|
2
2
|
declare class Logger {
|
|
3
3
|
protected logStrategy: LogStrategy;
|
|
4
4
|
constructor(logStrategy: LogStrategy);
|
|
5
|
+
private format;
|
|
5
6
|
private sanitize;
|
|
6
7
|
setLogStrategy(logStrategy: LogStrategy): void;
|
|
7
8
|
verbose<T = unknown>(message: string, data?: T): void;
|
package/logger/Logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./types.js");class g{constructor(
|
|
1
|
+
"use strict";const i=require("./types.js");class g{constructor(t){this.logStrategy=t}format(t){return this.logStrategy.format?this.logStrategy.format(t):t}sanitize(t){return this.logStrategy.sanitize?this.logStrategy.sanitize(t):t}setLogStrategy(t){this.logStrategy=t}verbose(t,e){this.logStrategy.execute(i.LogLevel.Verbose,t,this.sanitize(e))}debug(t,e){this.logStrategy.execute(i.LogLevel.Debug,t,this.sanitize(e))}info(t,e){this.logStrategy.execute(i.LogLevel.Information,t,this.sanitize(e))}warn(t,e){this.logStrategy.execute(i.LogLevel.Warning,t,this.sanitize(e))}error(t,e,r){this.logStrategy.execute(i.LogLevel.Error,t,this.format(this.sanitize(e)),r)}fatal(t,e){this.logStrategy.execute(i.LogLevel.Fatal,t,this.sanitize(e))}}module.exports=g;
|
package/logger/Logger.mjs
CHANGED
|
@@ -3,6 +3,9 @@ class g {
|
|
|
3
3
|
constructor(t) {
|
|
4
4
|
this.logStrategy = t;
|
|
5
5
|
}
|
|
6
|
+
format(t) {
|
|
7
|
+
return this.logStrategy.format ? this.logStrategy.format(t) : t;
|
|
8
|
+
}
|
|
6
9
|
sanitize(t) {
|
|
7
10
|
return this.logStrategy.sanitize ? this.logStrategy.sanitize(t) : t;
|
|
8
11
|
}
|
|
@@ -25,12 +28,12 @@ class g {
|
|
|
25
28
|
warn(t, e) {
|
|
26
29
|
this.logStrategy.execute(i.Warning, t, this.sanitize(e));
|
|
27
30
|
}
|
|
28
|
-
error(t, e,
|
|
31
|
+
error(t, e, r) {
|
|
29
32
|
this.logStrategy.execute(
|
|
30
33
|
i.Error,
|
|
31
34
|
t,
|
|
32
|
-
this.sanitize(e),
|
|
33
|
-
|
|
35
|
+
this.format(this.sanitize(e)),
|
|
36
|
+
r
|
|
34
37
|
);
|
|
35
38
|
}
|
|
36
39
|
fatal(t, e) {
|
package/logger/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import Logger from './Logger';
|
|
|
2
2
|
import type { LogStrategy } from './types';
|
|
3
3
|
import { LogLevel } from './types';
|
|
4
4
|
import sanitizeAsStringDict from './sanitizeAsStringDict';
|
|
5
|
-
|
|
5
|
+
import pascalCaseFormatter from './pascalCaseFormatter';
|
|
6
|
+
export { Logger, LogLevel, LogStrategy, sanitizeAsStringDict, pascalCaseFormatter, };
|
package/logger/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Logger.js"),r=require("./types.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Logger.js"),r=require("./types.js"),t=require("./sanitizeAsStringDict.js"),g=require("./pascalCaseFormatter.js");require("../string/truncate.js");require("lodash");exports.Logger=e;exports.LogLevel=r.LogLevel;exports.sanitizeAsStringDict=t;exports.pascalCaseFormatter=g;
|
package/logger/index.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { LogLevel as
|
|
3
|
-
import { default as
|
|
1
|
+
import { default as a } from "./Logger.mjs";
|
|
2
|
+
import { LogLevel as m } from "./types.mjs";
|
|
3
|
+
import { default as s } from "./sanitizeAsStringDict.mjs";
|
|
4
|
+
import { default as l } from "./pascalCaseFormatter.mjs";
|
|
4
5
|
import "../string/truncate.mjs";
|
|
6
|
+
import "lodash";
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
m as LogLevel,
|
|
9
|
+
a as Logger,
|
|
10
|
+
l as pascalCaseFormatter,
|
|
11
|
+
s as sanitizeAsStringDict
|
|
9
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("lodash");function p(e){return typeof e=="object"?Object.entries(e).reduce((r,[t,s])=>{const n=t.split(".").map(o.upperFirst).join(".");return r[n]=s,r},{}):e}module.exports=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("../string/truncate.js");function
|
|
1
|
+
"use strict";const f=require("../string/truncate.js");function g(n,t){return t?`${t}.${n}`:n}function o(n,t,s){return Object.entries(n).reduce((i,[u,r])=>{const e=g(u,s);return t[e]!==void 0?i:typeof r=="string"?(t[e]=f(r,100),i):typeof r=="number"?(t[e]=f(r.toString(),100),i):typeof r=="object"&&r?o(r,i,e):(t[e]=f(String(r),100),t)},t)}function m(n){if(n)return o(n,{})}module.exports=m;
|
|
@@ -2,19 +2,19 @@ import i from "../string/truncate.mjs";
|
|
|
2
2
|
function s(n, t) {
|
|
3
3
|
return t ? `${t}.${n}` : n;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function o(n, t, u) {
|
|
6
6
|
return Object.entries(n).reduce(
|
|
7
|
-
(
|
|
8
|
-
const
|
|
9
|
-
return t[
|
|
7
|
+
(f, [m, r]) => {
|
|
8
|
+
const e = s(m, u);
|
|
9
|
+
return t[e] !== void 0 ? f : typeof r == "string" ? (t[e] = i(r, 100), f) : typeof r == "number" ? (t[e] = i(r.toString(), 100), f) : typeof r == "object" && r ? o(r, f, e) : (t[e] = i(String(r), 100), t);
|
|
10
10
|
},
|
|
11
11
|
t
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function g(n) {
|
|
15
15
|
if (n)
|
|
16
|
-
return
|
|
16
|
+
return o(n, {});
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
package/logger/types.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export interface LogStrategy {
|
|
|
12
12
|
* @param data Additional data from `execute()`
|
|
13
13
|
*/
|
|
14
14
|
sanitize?(data?: unknown): unknown;
|
|
15
|
+
/**
|
|
16
|
+
* Method which should return a formatted version of `data`. Runs after `sanitize`.
|
|
17
|
+
* @param data Additional data from `execute()`
|
|
18
|
+
*/
|
|
19
|
+
format?(data?: unknown): unknown;
|
|
15
20
|
/**
|
|
16
21
|
* @param logLevel `LogLevel`
|
|
17
22
|
* @param message Message string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -266,6 +266,11 @@
|
|
|
266
266
|
"require": "./logger/index.js",
|
|
267
267
|
"types": "./logger/index.d.ts"
|
|
268
268
|
},
|
|
269
|
+
"./logger/pascalCaseFormatter": {
|
|
270
|
+
"import": "./logger/pascalCaseFormatter.mjs",
|
|
271
|
+
"require": "./logger/pascalCaseFormatter.js",
|
|
272
|
+
"types": "./logger/pascalCaseFormatter.d.ts"
|
|
273
|
+
},
|
|
269
274
|
"./logger/sanitizeAsStringDict": {
|
|
270
275
|
"import": "./logger/sanitizeAsStringDict.mjs",
|
|
271
276
|
"require": "./logger/sanitizeAsStringDict.js",
|