@adtrackify/at-service-common 3.18.3 → 3.18.4
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/cjs/__tests__/clients/sqs-bundled-client.spec.js +3 -1
- package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js.map +1 -1
- package/dist/cjs/__tests__/clients/sqs-client.spec.js +7 -4
- package/dist/cjs/__tests__/clients/sqs-client.spec.js.map +1 -1
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js +27 -27
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js.map +1 -1
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +9 -6
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-bundled-client.js +28 -21
- package/dist/cjs/clients/generic/sqs-bundled-client.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-client.d.ts +7 -2
- package/dist/cjs/clients/generic/sqs-client.js +17 -17
- package/dist/cjs/clients/generic/sqs-client.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-unbundle.d.ts +2 -2
- package/dist/cjs/clients/generic/sqs-unbundle.js +6 -6
- package/dist/cjs/clients/generic/sqs-unbundle.js.map +1 -1
- package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +1 -1
- package/dist/cjs/clients/third-party/shopify-client.d.ts +1 -1
- package/dist/cjs/constants/sqs.d.ts +9 -0
- package/dist/cjs/constants/sqs.js +15 -3
- package/dist/cjs/constants/sqs.js.map +1 -1
- package/dist/cjs/services/events/log-event-service.d.ts +11 -1
- package/dist/cjs/services/events/log-event-service.js +24 -6
- package/dist/cjs/services/events/log-event-service.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +38 -38
- package/dist/cjs/types/shopify-graphql-types/admin.types.js.map +1 -1
- package/dist/cjs/types/shopify-rest-types.d.ts +396 -0
- package/dist/cjs/types/shopify-rest-types.js +3 -0
- package/dist/cjs/types/shopify-rest-types.js.map +1 -0
- package/dist/cjs/utils/size.js +2 -1
- package/dist/cjs/utils/size.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +3 -1
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-client.spec.js +7 -4
- package/dist/esm/__tests__/clients/sqs-client.spec.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +27 -27
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.js.map +1 -1
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +9 -6
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +1 -1
- package/dist/esm/clients/generic/sqs-bundled-client.js +29 -22
- package/dist/esm/clients/generic/sqs-bundled-client.js.map +1 -1
- package/dist/esm/clients/generic/sqs-client.d.ts +7 -2
- package/dist/esm/clients/generic/sqs-client.js +17 -17
- package/dist/esm/clients/generic/sqs-client.js.map +1 -1
- package/dist/esm/clients/generic/sqs-unbundle.d.ts +2 -2
- package/dist/esm/clients/generic/sqs-unbundle.js +6 -6
- package/dist/esm/clients/generic/sqs-unbundle.js.map +1 -1
- package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +1 -1
- package/dist/esm/clients/third-party/shopify-client.d.ts +1 -1
- package/dist/esm/constants/sqs.d.ts +9 -0
- package/dist/esm/constants/sqs.js +13 -2
- package/dist/esm/constants/sqs.js.map +1 -1
- package/dist/esm/services/events/log-event-service.d.ts +11 -1
- package/dist/esm/services/events/log-event-service.js +22 -4
- package/dist/esm/services/events/log-event-service.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +38 -38
- package/dist/esm/types/shopify-graphql-types/admin.types.js.map +1 -1
- package/dist/esm/types/shopify-rest-types.d.ts +396 -0
- package/dist/esm/types/shopify-rest-types.js +2 -0
- package/dist/esm/types/shopify-rest-types.js.map +1 -0
- package/dist/esm/utils/size.js +2 -1
- package/dist/esm/utils/size.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
export interface IShop {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
domain: string;
|
|
6
|
+
province?: string;
|
|
7
|
+
country?: string;
|
|
8
|
+
address1?: string;
|
|
9
|
+
zip?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
latitude?: number;
|
|
14
|
+
longitude?: number;
|
|
15
|
+
primary_locale?: string;
|
|
16
|
+
address2?: string;
|
|
17
|
+
created_at?: string;
|
|
18
|
+
updated_at?: string;
|
|
19
|
+
country_code?: string;
|
|
20
|
+
country_name?: string;
|
|
21
|
+
currency?: string;
|
|
22
|
+
customer_email?: string;
|
|
23
|
+
timezone?: string;
|
|
24
|
+
iana_timezone?: string;
|
|
25
|
+
shop_owner?: string;
|
|
26
|
+
money_format?: string;
|
|
27
|
+
money_with_currency_format?: string;
|
|
28
|
+
weight_unit?: string;
|
|
29
|
+
province_code?: string;
|
|
30
|
+
taxes_included?: boolean;
|
|
31
|
+
auto_configure_tax_inclusivity?: boolean;
|
|
32
|
+
tax_shipping?: boolean;
|
|
33
|
+
county_taxes?: boolean;
|
|
34
|
+
plan_display_name?: string;
|
|
35
|
+
plan_name?: string;
|
|
36
|
+
has_discounts?: boolean;
|
|
37
|
+
has_gift_cards?: boolean;
|
|
38
|
+
myshopify_domain?: string;
|
|
39
|
+
google_apps_domain?: string;
|
|
40
|
+
google_apps_login_enabled?: boolean;
|
|
41
|
+
money_in_emails_format?: string;
|
|
42
|
+
money_with_currency_in_emails_format?: string;
|
|
43
|
+
eligible_for_payments?: boolean;
|
|
44
|
+
requires_extra_payments_agreement?: boolean;
|
|
45
|
+
password_enabled?: boolean;
|
|
46
|
+
has_storefront?: boolean;
|
|
47
|
+
finances?: boolean;
|
|
48
|
+
primary_location_id?: number;
|
|
49
|
+
checkout_api_supported?: boolean;
|
|
50
|
+
multi_location_enabled?: boolean;
|
|
51
|
+
setup_required?: boolean;
|
|
52
|
+
pre_launch_enabled?: boolean;
|
|
53
|
+
enabled_presentment_currencies?: string[];
|
|
54
|
+
transactional_sms_disabled?: boolean;
|
|
55
|
+
marketing_sms_consent_enabled_at_checkout?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface IOrder {
|
|
58
|
+
id: number;
|
|
59
|
+
admin_graphql_api_id?: string;
|
|
60
|
+
app_id?: number;
|
|
61
|
+
browser_ip?: string;
|
|
62
|
+
buyer_accepts_marketing?: boolean;
|
|
63
|
+
cancel_reason?: string;
|
|
64
|
+
cancelled_at?: string;
|
|
65
|
+
cart_token?: string;
|
|
66
|
+
checkout_id?: number;
|
|
67
|
+
checkout_token?: string;
|
|
68
|
+
client_details?: {
|
|
69
|
+
accept_language?: string;
|
|
70
|
+
browser_height?: number;
|
|
71
|
+
browser_ip?: string;
|
|
72
|
+
browser_width?: number;
|
|
73
|
+
session_hash?: string;
|
|
74
|
+
user_agent?: string;
|
|
75
|
+
};
|
|
76
|
+
closed_at?: string;
|
|
77
|
+
confirmation_number?: string;
|
|
78
|
+
confirmed?: boolean;
|
|
79
|
+
contact_email?: string;
|
|
80
|
+
created_at?: string;
|
|
81
|
+
currency?: string;
|
|
82
|
+
current_subtotal_price?: string;
|
|
83
|
+
current_subtotal_price_set?: IMoneySet;
|
|
84
|
+
current_total_additional_fees_set?: IMoneySet;
|
|
85
|
+
current_total_discounts?: string;
|
|
86
|
+
current_total_discounts_set?: IMoneySet;
|
|
87
|
+
current_total_duties_set?: IMoneySet;
|
|
88
|
+
current_total_price?: string;
|
|
89
|
+
current_total_price_set?: IMoneySet;
|
|
90
|
+
current_total_tax?: string;
|
|
91
|
+
current_total_tax_set?: IMoneySet;
|
|
92
|
+
customer?: ICustomer;
|
|
93
|
+
customer_locale?: string;
|
|
94
|
+
discount_applications?: IDiscountApplication[];
|
|
95
|
+
discount_codes?: IDiscountCode[];
|
|
96
|
+
email?: string;
|
|
97
|
+
estimated_taxes?: boolean;
|
|
98
|
+
financial_status?: string;
|
|
99
|
+
fulfillment_status?: string;
|
|
100
|
+
fulfillments?: IFulfillment[];
|
|
101
|
+
landing_site?: string;
|
|
102
|
+
landing_site_ref?: string;
|
|
103
|
+
line_items?: ILineItem[];
|
|
104
|
+
location_id?: number;
|
|
105
|
+
merchant_of_record_app_id?: number;
|
|
106
|
+
name?: string;
|
|
107
|
+
note?: string;
|
|
108
|
+
note_attributes?: INoteAttribute[];
|
|
109
|
+
number?: number;
|
|
110
|
+
order_number?: number;
|
|
111
|
+
order_status_url?: string;
|
|
112
|
+
original_total_additional_fees_set?: IMoneySet;
|
|
113
|
+
original_total_duties_set?: IMoneySet;
|
|
114
|
+
payment_gateway_names?: string[];
|
|
115
|
+
phone?: string;
|
|
116
|
+
po_number?: string;
|
|
117
|
+
presentment_currency?: string;
|
|
118
|
+
processed_at?: string;
|
|
119
|
+
reference?: string;
|
|
120
|
+
referring_site?: string;
|
|
121
|
+
refunds?: IRefund[];
|
|
122
|
+
shipping_address?: IAddress;
|
|
123
|
+
billing_address?: IAddress;
|
|
124
|
+
shipping_lines?: IShippingLine[];
|
|
125
|
+
source_identifier?: string;
|
|
126
|
+
source_name?: string;
|
|
127
|
+
source_url?: string;
|
|
128
|
+
subtotal_price?: string;
|
|
129
|
+
subtotal_price_set?: IMoneySet;
|
|
130
|
+
tags?: string;
|
|
131
|
+
tax_exempt?: boolean;
|
|
132
|
+
tax_lines?: ITaxLine[];
|
|
133
|
+
taxes_included?: boolean;
|
|
134
|
+
test?: boolean;
|
|
135
|
+
token?: string;
|
|
136
|
+
total_discounts?: string;
|
|
137
|
+
total_discounts_set?: IMoneySet;
|
|
138
|
+
total_line_items_price?: string;
|
|
139
|
+
total_line_items_price_set?: IMoneySet;
|
|
140
|
+
total_outstanding?: string;
|
|
141
|
+
total_price?: string;
|
|
142
|
+
total_price_set?: IMoneySet;
|
|
143
|
+
total_shipping_price_set?: IMoneySet;
|
|
144
|
+
total_tax?: string;
|
|
145
|
+
total_tax_set?: IMoneySet;
|
|
146
|
+
total_tip_received?: string;
|
|
147
|
+
total_weight?: number;
|
|
148
|
+
updated_at?: string;
|
|
149
|
+
user_id?: number;
|
|
150
|
+
}
|
|
151
|
+
export interface IProduct {
|
|
152
|
+
id: number;
|
|
153
|
+
title?: string;
|
|
154
|
+
body_html?: string;
|
|
155
|
+
vendor?: string;
|
|
156
|
+
product_type?: string;
|
|
157
|
+
created_at?: string;
|
|
158
|
+
handle?: string;
|
|
159
|
+
updated_at?: string;
|
|
160
|
+
published_at?: string;
|
|
161
|
+
template_suffix?: string;
|
|
162
|
+
published_scope?: string;
|
|
163
|
+
tags?: string;
|
|
164
|
+
status?: string;
|
|
165
|
+
admin_graphql_api_id?: string;
|
|
166
|
+
variants?: IVariant[];
|
|
167
|
+
options?: IProductOption[];
|
|
168
|
+
images?: IProductImage[];
|
|
169
|
+
image?: IProductImage;
|
|
170
|
+
}
|
|
171
|
+
export interface IRecurringApplicationCharge {
|
|
172
|
+
id: number;
|
|
173
|
+
name?: string;
|
|
174
|
+
api_client_id?: number;
|
|
175
|
+
price?: string;
|
|
176
|
+
status?: string;
|
|
177
|
+
return_url?: string;
|
|
178
|
+
billing_on?: string;
|
|
179
|
+
created_at?: string;
|
|
180
|
+
updated_at?: string;
|
|
181
|
+
test?: boolean;
|
|
182
|
+
activated_on?: string;
|
|
183
|
+
cancelled_on?: string;
|
|
184
|
+
trial_days?: number;
|
|
185
|
+
trial_ends_on?: string;
|
|
186
|
+
decorated_return_url?: string;
|
|
187
|
+
confirmation_url?: string;
|
|
188
|
+
}
|
|
189
|
+
interface IMoneySet {
|
|
190
|
+
shop_money?: IMoney;
|
|
191
|
+
presentment_money?: IMoney;
|
|
192
|
+
}
|
|
193
|
+
interface IMoney {
|
|
194
|
+
amount?: string;
|
|
195
|
+
currency_code?: string;
|
|
196
|
+
}
|
|
197
|
+
interface ICustomer {
|
|
198
|
+
id?: number;
|
|
199
|
+
email?: string;
|
|
200
|
+
accepts_marketing?: boolean;
|
|
201
|
+
created_at?: string;
|
|
202
|
+
updated_at?: string;
|
|
203
|
+
first_name?: string;
|
|
204
|
+
last_name?: string;
|
|
205
|
+
orders_count?: number;
|
|
206
|
+
state?: string;
|
|
207
|
+
total_spent?: string;
|
|
208
|
+
last_order_id?: number;
|
|
209
|
+
note?: string;
|
|
210
|
+
verified_email?: boolean;
|
|
211
|
+
multipass_identifier?: string;
|
|
212
|
+
tax_exempt?: boolean;
|
|
213
|
+
tags?: string;
|
|
214
|
+
last_order_name?: string;
|
|
215
|
+
currency?: string;
|
|
216
|
+
phone?: string;
|
|
217
|
+
default_address?: IAddress;
|
|
218
|
+
}
|
|
219
|
+
interface IAddress {
|
|
220
|
+
id?: number;
|
|
221
|
+
customer_id?: number;
|
|
222
|
+
first_name?: string;
|
|
223
|
+
last_name?: string;
|
|
224
|
+
company?: string;
|
|
225
|
+
address1?: string;
|
|
226
|
+
address2?: string;
|
|
227
|
+
city?: string;
|
|
228
|
+
province?: string;
|
|
229
|
+
country?: string;
|
|
230
|
+
zip?: string;
|
|
231
|
+
phone?: string;
|
|
232
|
+
name?: string;
|
|
233
|
+
province_code?: string;
|
|
234
|
+
country_code?: string;
|
|
235
|
+
country_name?: string;
|
|
236
|
+
default?: boolean;
|
|
237
|
+
latitude?: number;
|
|
238
|
+
longitude?: number;
|
|
239
|
+
}
|
|
240
|
+
interface ILineItem {
|
|
241
|
+
id?: number;
|
|
242
|
+
admin_graphql_api_id?: string;
|
|
243
|
+
attributed_staffs?: any[];
|
|
244
|
+
fulfillable_quantity?: number;
|
|
245
|
+
fulfillment_service?: string;
|
|
246
|
+
fulfillment_status?: string;
|
|
247
|
+
gift_card?: boolean;
|
|
248
|
+
grams?: number;
|
|
249
|
+
name?: string;
|
|
250
|
+
price?: string;
|
|
251
|
+
price_set?: IMoneySet;
|
|
252
|
+
product_exists?: boolean;
|
|
253
|
+
product_id?: number;
|
|
254
|
+
properties?: any[];
|
|
255
|
+
quantity?: number;
|
|
256
|
+
requires_shipping?: boolean;
|
|
257
|
+
sku?: string;
|
|
258
|
+
taxable?: boolean;
|
|
259
|
+
title?: string;
|
|
260
|
+
total_discount?: string;
|
|
261
|
+
total_discount_set?: IMoneySet;
|
|
262
|
+
variant_id?: number;
|
|
263
|
+
variant_inventory_management?: string;
|
|
264
|
+
variant_title?: string;
|
|
265
|
+
vendor?: string;
|
|
266
|
+
tax_lines?: ITaxLine[];
|
|
267
|
+
duties?: any[];
|
|
268
|
+
discount_allocations?: any[];
|
|
269
|
+
}
|
|
270
|
+
interface IDiscountApplication {
|
|
271
|
+
type?: string;
|
|
272
|
+
value?: string;
|
|
273
|
+
value_type?: string;
|
|
274
|
+
allocation_method?: string;
|
|
275
|
+
target_selection?: string;
|
|
276
|
+
target_type?: string;
|
|
277
|
+
description?: string;
|
|
278
|
+
title?: string;
|
|
279
|
+
code?: string;
|
|
280
|
+
}
|
|
281
|
+
interface IDiscountCode {
|
|
282
|
+
code?: string;
|
|
283
|
+
amount?: string;
|
|
284
|
+
type?: string;
|
|
285
|
+
}
|
|
286
|
+
interface IFulfillment {
|
|
287
|
+
id?: number;
|
|
288
|
+
admin_graphql_api_id?: string;
|
|
289
|
+
created_at?: string;
|
|
290
|
+
location_id?: number;
|
|
291
|
+
name?: string;
|
|
292
|
+
order_id?: number;
|
|
293
|
+
origin_address?: any;
|
|
294
|
+
receipt?: any;
|
|
295
|
+
service?: string;
|
|
296
|
+
shipment_status?: string;
|
|
297
|
+
status?: string;
|
|
298
|
+
tracking_company?: string;
|
|
299
|
+
tracking_number?: string;
|
|
300
|
+
tracking_numbers?: string[];
|
|
301
|
+
tracking_url?: string;
|
|
302
|
+
tracking_urls?: string[];
|
|
303
|
+
updated_at?: string;
|
|
304
|
+
line_items?: ILineItem[];
|
|
305
|
+
}
|
|
306
|
+
interface INoteAttribute {
|
|
307
|
+
name?: string;
|
|
308
|
+
value?: string;
|
|
309
|
+
}
|
|
310
|
+
interface IRefund {
|
|
311
|
+
id?: number;
|
|
312
|
+
admin_graphql_api_id?: string;
|
|
313
|
+
created_at?: string;
|
|
314
|
+
note?: string;
|
|
315
|
+
order_id?: number;
|
|
316
|
+
processed_at?: string;
|
|
317
|
+
restock?: boolean;
|
|
318
|
+
total_duties_set?: IMoneySet;
|
|
319
|
+
user_id?: number;
|
|
320
|
+
order_adjustments?: any[];
|
|
321
|
+
transactions?: any[];
|
|
322
|
+
refund_line_items?: any[];
|
|
323
|
+
duties?: any[];
|
|
324
|
+
}
|
|
325
|
+
interface IShippingLine {
|
|
326
|
+
id?: number;
|
|
327
|
+
carrier_identifier?: string;
|
|
328
|
+
code?: string;
|
|
329
|
+
delivery_category?: string;
|
|
330
|
+
discounted_price?: string;
|
|
331
|
+
discounted_price_set?: IMoneySet;
|
|
332
|
+
phone?: string;
|
|
333
|
+
price?: string;
|
|
334
|
+
price_set?: IMoneySet;
|
|
335
|
+
requested_fulfillment_service_id?: string;
|
|
336
|
+
source?: string;
|
|
337
|
+
title?: string;
|
|
338
|
+
tax_lines?: ITaxLine[];
|
|
339
|
+
discount_allocations?: any[];
|
|
340
|
+
}
|
|
341
|
+
interface ITaxLine {
|
|
342
|
+
price?: string;
|
|
343
|
+
rate?: number;
|
|
344
|
+
title?: string;
|
|
345
|
+
price_set?: IMoneySet;
|
|
346
|
+
channel_liable?: boolean;
|
|
347
|
+
}
|
|
348
|
+
interface IVariant {
|
|
349
|
+
id?: number;
|
|
350
|
+
product_id?: number;
|
|
351
|
+
title?: string;
|
|
352
|
+
price?: string;
|
|
353
|
+
sku?: string;
|
|
354
|
+
position?: number;
|
|
355
|
+
inventory_policy?: string;
|
|
356
|
+
compare_at_price?: string;
|
|
357
|
+
fulfillment_service?: string;
|
|
358
|
+
inventory_management?: string;
|
|
359
|
+
option1?: string;
|
|
360
|
+
option2?: string;
|
|
361
|
+
option3?: string;
|
|
362
|
+
created_at?: string;
|
|
363
|
+
updated_at?: string;
|
|
364
|
+
taxable?: boolean;
|
|
365
|
+
barcode?: string;
|
|
366
|
+
grams?: number;
|
|
367
|
+
weight?: number;
|
|
368
|
+
weight_unit?: string;
|
|
369
|
+
inventory_item_id?: number;
|
|
370
|
+
inventory_quantity?: number;
|
|
371
|
+
old_inventory_quantity?: number;
|
|
372
|
+
requires_shipping?: boolean;
|
|
373
|
+
admin_graphql_api_id?: string;
|
|
374
|
+
image_id?: number;
|
|
375
|
+
}
|
|
376
|
+
interface IProductOption {
|
|
377
|
+
id?: number;
|
|
378
|
+
product_id?: number;
|
|
379
|
+
name?: string;
|
|
380
|
+
position?: number;
|
|
381
|
+
values?: string[];
|
|
382
|
+
}
|
|
383
|
+
interface IProductImage {
|
|
384
|
+
id?: number;
|
|
385
|
+
product_id?: number;
|
|
386
|
+
position?: number;
|
|
387
|
+
created_at?: string;
|
|
388
|
+
updated_at?: string;
|
|
389
|
+
alt?: string;
|
|
390
|
+
width?: number;
|
|
391
|
+
height?: number;
|
|
392
|
+
src?: string;
|
|
393
|
+
variant_ids?: number[];
|
|
394
|
+
admin_graphql_api_id?: string;
|
|
395
|
+
}
|
|
396
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify-rest-types.js","sourceRoot":"","sources":["../../../src/types/shopify-rest-types.ts"],"names":[],"mappings":""}
|
package/dist/esm/utils/size.js
CHANGED
|
@@ -17,7 +17,8 @@ export function chunkArrayBySize(array, maxChunkSizeBytes, maxItemsPerChunk) {
|
|
|
17
17
|
let currentChunkSize = 0;
|
|
18
18
|
for (const item of array) {
|
|
19
19
|
const itemSize = sizeInBytes(item);
|
|
20
|
-
const
|
|
20
|
+
const arrayOverhead = 2 + Math.max(0, currentChunk.length);
|
|
21
|
+
const wouldExceedSize = currentChunkSize + itemSize + arrayOverhead > maxChunkSizeBytes;
|
|
21
22
|
const wouldExceedCount = maxItemsPerChunk !== undefined && currentChunk.length >= maxItemsPerChunk;
|
|
22
23
|
if ((wouldExceedSize || wouldExceedCount) && currentChunk.length > 0) {
|
|
23
24
|
chunks.push(currentChunk);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../src/utils/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI;QACF,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;KAC7D;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,IAAI,CAAC,kEAAkE,EAAE;YAC9E,KAAK;YACL,UAAU,EAAE,OAAO,GAAG;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,GAAG,IAAI,CAAC;KACpB;AACH,CAAC;AAYD,MAAM,UAAU,gBAAgB,CAAI,KAAU,EAAE,iBAAyB,EAAE,gBAAyB;IAClG,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,IAAI,YAAY,GAAQ,EAAE,CAAC;IAC3B,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../src/utils/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI;QACF,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,I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