@leancodepl/api-binary-blob 9.7.1 → 9.7.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,618 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file. See
4
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [9.7.3](https://github.com/leancodepl/js_corelibrary/compare/v9.7.2...v9.7.3) (2026-02-10)
7
+
8
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
9
+
10
+ # Change Log
11
+
12
+ All notable changes to this project will be documented in this file. See
13
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
14
+
15
+ ## [9.7.2](https://github.com/leancodepl/js_corelibrary/compare/v9.7.1...v9.7.2) (2026-01-20)
16
+
17
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
18
+
19
+ # Change Log
20
+
21
+ All notable changes to this project will be documented in this file. See
22
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
23
+
24
+ ## [9.7.1](https://github.com/leancodepl/js_corelibrary/compare/v9.7.0...v9.7.1) (2026-01-20)
25
+
26
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
27
+
28
+ # Change Log
29
+
30
+ All notable changes to this project will be documented in this file. See
31
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
32
+
33
+ # [9.7.0](https://github.com/leancodepl/js_corelibrary/compare/v9.6.6...v9.7.0) (2025-12-18)
34
+
35
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
36
+
37
+ # Change Log
38
+
39
+ All notable changes to this project will be documented in this file. See
40
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
41
+
42
+ ## [9.6.6](https://github.com/leancodepl/js_corelibrary/compare/v9.6.5...v9.6.6) (2025-11-18)
43
+
44
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
45
+
46
+ # Change Log
47
+
48
+ All notable changes to this project will be documented in this file. See
49
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
50
+
51
+ ## [9.6.5](https://github.com/leancodepl/js_corelibrary/compare/v9.6.4...v9.6.5) (2025-10-16)
52
+
53
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
54
+
55
+ # Change Log
56
+
57
+ All notable changes to this project will be documented in this file. See
58
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
59
+
60
+ ## [9.6.4](https://github.com/leancodepl/js_corelibrary/compare/v9.6.3...v9.6.4) (2025-10-16)
61
+
62
+ ### Bug Fixes
63
+
64
+ - use new tanstack query keys
65
+ ([66737dd](https://github.com/leancodepl/js_corelibrary/commit/66737dd2767c857adb6c8d0aee12fa5ff744f618))
66
+
67
+ # Change Log
68
+
69
+ All notable changes to this project will be documented in this file. See
70
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
71
+
72
+ ## [9.6.3](https://github.com/leancodepl/js_corelibrary/compare/v9.6.2...v9.6.3) (2025-09-22)
73
+
74
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
75
+
76
+ # Change Log
77
+
78
+ All notable changes to this project will be documented in this file. See
79
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
80
+
81
+ ## [9.6.2](https://github.com/leancodepl/js_corelibrary/compare/v9.6.1...v9.6.2) (2025-09-09)
82
+
83
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
84
+
85
+ # Change Log
86
+
87
+ All notable changes to this project will be documented in this file. See
88
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
89
+
90
+ ## [9.6.1](https://github.com/leancodepl/js_corelibrary/compare/v9.6.0...v9.6.1) (2025-09-05)
91
+
92
+ **Note:** Version bump only for package @leancodepl/config
93
+
94
+ # Change Log
95
+
96
+ All notable changes to this project will be documented in this file. See
97
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
98
+
99
+ # [9.6.0](https://github.com/leancodepl/js_corelibrary/compare/v9.5.3...v9.6.0) (2025-09-05)
100
+
101
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
102
+
103
+ # Change Log
104
+
105
+ All notable changes to this project will be documented in this file. See
106
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
107
+
108
+ ## [9.5.3](https://github.com/leancodepl/js_corelibrary/compare/v9.5.2...v9.5.3) (2025-08-26)
109
+
110
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
111
+
112
+ # Change Log
113
+
114
+ All notable changes to this project will be documented in this file. See
115
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
116
+
117
+ ## [9.5.2](https://github.com/leancodepl/js_corelibrary/compare/v9.5.1...v9.5.2) (2025-08-13)
118
+
119
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
120
+
121
+ # Change Log
122
+
123
+ All notable changes to this project will be documented in this file. See
124
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
125
+
126
+ ## [9.5.1](https://github.com/leancodepl/js_corelibrary/compare/v9.5.0...v9.5.1) (2025-08-05)
127
+
128
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
129
+
130
+ # Change Log
131
+
132
+ All notable changes to this project will be documented in this file. See
133
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
134
+
135
+ # [9.5.0](https://github.com/leancodepl/js_corelibrary/compare/v9.4.0...v9.5.0) (2025-08-05)
136
+
137
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
138
+
139
+ # Change Log
140
+
141
+ All notable changes to this project will be documented in this file. See
142
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
143
+
144
+ # [9.4.0](https://github.com/leancodepl/js_corelibrary/compare/v9.3.0...v9.4.0) (2025-08-04)
145
+
146
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
147
+
148
+ # Change Log
149
+
150
+ All notable changes to this project will be documented in this file. See
151
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
152
+
153
+ # [9.3.0](https://github.com/leancodepl/js_corelibrary/compare/v9.2.1...v9.3.0) (2025-07-31)
154
+
155
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
156
+
157
+ # Change Log
158
+
159
+ All notable changes to this project will be documented in this file. See
160
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
161
+
162
+ ## [9.2.1](https://github.com/leancodepl/js_corelibrary/compare/v9.2.0...v9.2.1) (2025-07-30)
163
+
164
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
165
+
166
+ # Change Log
167
+
168
+ All notable changes to this project will be documented in this file. See
169
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
170
+
171
+ # [9.2.0](https://github.com/leancodepl/js_corelibrary/compare/v9.1.0...v9.2.0) (2025-07-24)
172
+
173
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
174
+
175
+ # Change Log
176
+
177
+ All notable changes to this project will be documented in this file. See
178
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
179
+
180
+ # [9.1.0](https://github.com/leancodepl/js_corelibrary/compare/v9.0.0...v9.1.0) (2025-07-24)
181
+
182
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
183
+
184
+ # Change Log
185
+
186
+ All notable changes to this project will be documented in this file. See
187
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
188
+
189
+ # [9.0.0](https://github.com/leancodepl/js_corelibrary/compare/v8.6.0...v9.0.0) (2025-07-22)
190
+
191
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
192
+
193
+ # Change Log
194
+
195
+ All notable changes to this project will be documented in this file. See
196
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
197
+
198
+ # [8.6.0](https://github.com/leancodepl/js_corelibrary/compare/v8.5.1...v8.6.0) (2025-07-16)
199
+
200
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
201
+
202
+ # Change Log
203
+
204
+ All notable changes to this project will be documented in this file. See
205
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
206
+
207
+ ## [8.5.1](https://github.com/leancodepl/js_corelibrary/compare/v8.5.0...v8.5.1) (2025-07-14)
208
+
209
+ ### Bug Fixes
210
+
211
+ - add actual content to published packages
212
+ ([cb7dadb](https://github.com/leancodepl/js_corelibrary/commit/cb7dadbc1f2126370f63505f5b8dbac08dad69a3))
213
+
214
+ # Change Log
215
+
216
+ All notable changes to this project will be documented in this file. See
217
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
218
+
219
+ # [8.5.0](https://github.com/leancodepl/js_corelibrary/compare/v8.4.0...v8.5.0) (2025-07-11)
220
+
221
+ ### Bug Fixes
222
+
223
+ - enhance packages documentation
224
+ ([ae960c4](https://github.com/leancodepl/js_corelibrary/commit/ae960c469b6231b04ca8b239dc268decbc9f0a18))
225
+
226
+ # Change Log
227
+
228
+ All notable changes to this project will be documented in this file. See
229
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
230
+
231
+ # [8.4.0](https://github.com/leancodepl/js_corelibrary/compare/v8.3.6...v8.4.0) (2025-06-20)
232
+
233
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
234
+
235
+ # Change Log
236
+
237
+ All notable changes to this project will be documented in this file. See
238
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
239
+
240
+ ## [8.3.6](https://github.com/leancodepl/js_corelibrary/compare/v8.3.5...v8.3.6) (2025-02-14)
241
+
242
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
243
+
244
+ # Change Log
245
+
246
+ All notable changes to this project will be documented in this file. See
247
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
248
+
249
+ ## [8.3.5](https://github.com/leancodepl/js_corelibrary/compare/v8.3.4...v8.3.5) (2025-01-30)
250
+
251
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
252
+
253
+ # Change Log
254
+
255
+ All notable changes to this project will be documented in this file. See
256
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
257
+
258
+ ## [8.3.4](https://github.com/leancodepl/js_corelibrary/compare/v8.3.3...v8.3.4) (2025-01-20)
259
+
260
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
261
+
262
+ # Change Log
263
+
264
+ All notable changes to this project will be documented in this file. See
265
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
266
+
267
+ ## [8.3.3](https://github.com/leancodepl/js_corelibrary/compare/v8.3.2...v8.3.3) (2025-01-17)
268
+
269
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
270
+
271
+ # Change Log
272
+
273
+ All notable changes to this project will be documented in this file. See
274
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
275
+
276
+ ## [8.3.2](https://github.com/leancodepl/js_corelibrary/compare/v8.3.1...v8.3.2) (2025-01-02)
277
+
278
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
279
+
280
+ # Change Log
281
+
282
+ All notable changes to this project will be documented in this file. See
283
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
284
+
285
+ ## [8.3.1](https://github.com/leancodepl/js_corelibrary/compare/v8.3.0...v8.3.1) (2024-12-06)
286
+
287
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
288
+
289
+ # Change Log
290
+
291
+ All notable changes to this project will be documented in this file. See
292
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
293
+
294
+ # [8.3.0](https://github.com/leancodepl/js_corelibrary/compare/v8.2.0...v8.3.0) (2024-12-06)
295
+
296
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
297
+
298
+ # Change Log
299
+
300
+ All notable changes to this project will be documented in this file. See
301
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
302
+
303
+ # [8.2.0](https://github.com/leancodepl/js_corelibrary/compare/v8.1.1...v8.2.0) (2024-11-05)
304
+
305
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
306
+
307
+ # Change Log
308
+
309
+ All notable changes to this project will be documented in this file. See
310
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
311
+
312
+ ## [8.1.1](https://github.com/leancodepl/js_corelibrary/compare/v8.1.0...v8.1.1) (2024-10-22)
313
+
314
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
315
+
316
+ # Change Log
317
+
318
+ All notable changes to this project will be documented in this file. See
319
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
320
+
321
+ # [8.1.0](https://github.com/leancodepl/js_corelibrary/compare/v8.0.0...v8.1.0) (2024-10-17)
322
+
323
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
324
+
325
+ # Change Log
326
+
327
+ All notable changes to this project will be documented in this file. See
328
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
329
+
330
+ # [8.0.0](https://github.com/leancodepl/js_corelibrary/compare/v7.8.2...v8.0.0) (2024-10-10)
331
+
332
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
333
+
334
+ # Change Log
335
+
336
+ All notable changes to this project will be documented in this file. See
337
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
338
+
339
+ ## [7.8.2](https://github.com/leancodepl/js_corelibrary/compare/v7.8.1...v7.8.2) (2024-09-19)
340
+
341
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
342
+
343
+ # Change Log
344
+
345
+ All notable changes to this project will be documented in this file. See
346
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
347
+
348
+ ## [7.8.1](https://github.com/leancodepl/js_corelibrary/compare/v7.8.0...v7.8.1) (2024-08-28)
349
+
350
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
351
+
352
+ # Change Log
353
+
354
+ All notable changes to this project will be documented in this file. See
355
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
356
+
357
+ # [7.8.0](https://github.com/leancodepl/js_corelibrary/compare/v7.7.0...v7.8.0) (2024-08-23)
358
+
359
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
360
+
361
+ # Change Log
362
+
363
+ All notable changes to this project will be documented in this file. See
364
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
365
+
366
+ # [7.7.0](https://github.com/leancodepl/js_corelibrary/compare/v7.6.0...v7.7.0) (2024-07-30)
367
+
368
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
369
+
370
+ # Change Log
371
+
372
+ All notable changes to this project will be documented in this file. See
373
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
374
+
375
+ # [7.6.0](https://github.com/leancodepl/js_corelibrary/compare/v7.5.0...v7.6.0) (2024-07-24)
376
+
377
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
378
+
379
+ # Change Log
380
+
381
+ All notable changes to this project will be documented in this file. See
382
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
383
+
384
+ # [7.5.0](https://github.com/leancodepl/js_corelibrary/compare/v7.4.0...v7.5.0) (2024-07-15)
385
+
386
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
387
+
388
+ # Change Log
389
+
390
+ All notable changes to this project will be documented in this file. See
391
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
392
+
393
+ # [7.4.0](https://github.com/leancodepl/js_corelibrary/compare/v7.3.7...v7.4.0) (2024-05-16)
394
+
395
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
396
+
397
+ # Change Log
398
+
399
+ All notable changes to this project will be documented in this file. See
400
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
401
+
402
+ ## [7.3.7](https://github.com/leancodepl/js_corelibrary/compare/v7.3.6...v7.3.7) (2024-04-15)
403
+
404
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
405
+
406
+ # Change Log
407
+
408
+ All notable changes to this project will be documented in this file. See
409
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
410
+
411
+ ## [7.3.6](https://github.com/leancodepl/js_corelibrary/compare/v7.3.5...v7.3.6) (2024-01-16)
412
+
413
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
414
+
415
+ # Change Log
416
+
417
+ All notable changes to this project will be documented in this file. See
418
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
419
+
420
+ ## [7.3.5](https://github.com/leancodepl/js_corelibrary/compare/v7.3.4...v7.3.5) (2024-01-15)
421
+
422
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
423
+
424
+ # Change Log
425
+
426
+ All notable changes to this project will be documented in this file. See
427
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
428
+
429
+ ## [7.3.4](https://github.com/leancodepl/js_corelibrary/compare/v7.3.3...v7.3.4) (2024-01-11)
430
+
431
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
432
+
433
+ # Change Log
434
+
435
+ All notable changes to this project will be documented in this file. See
436
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
437
+
438
+ ## [7.3.3](https://github.com/leancodepl/js_corelibrary/compare/v7.3.2...v7.3.3) (2023-12-11)
439
+
440
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
441
+
442
+ # Change Log
443
+
444
+ All notable changes to this project will be documented in this file. See
445
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
446
+
447
+ ## [7.3.2](https://github.com/leancodepl/js_corelibrary/compare/v7.3.1...v7.3.2) (2023-12-08)
448
+
449
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
450
+
451
+ # Change Log
452
+
453
+ All notable changes to this project will be documented in this file. See
454
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
455
+
456
+ ## [7.3.1](https://github.com/leancodepl/js_corelibrary/compare/v7.3.0...v7.3.1) (2023-12-08)
457
+
458
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
459
+
460
+ # Change Log
461
+
462
+ All notable changes to this project will be documented in this file. See
463
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
464
+
465
+ # [7.3.0](https://github.com/leancodepl/js_corelibrary/compare/v7.2.4...v7.3.0) (2023-12-08)
466
+
467
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
468
+
469
+ # Change Log
470
+
471
+ All notable changes to this project will be documented in this file. See
472
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
473
+
474
+ ## [7.2.4](https://github.com/leancodepl/js_corelibrary/compare/v7.2.3...v7.2.4) (2023-12-05)
475
+
476
+ ### Bug Fixes
477
+
478
+ - generated package.json
479
+ ([b7c95fd](https://github.com/leancodepl/js_corelibrary/commit/b7c95fd5719131629fa32722b49596d2c7314168))
480
+
481
+ # Change Log
482
+
483
+ All notable changes to this project will be documented in this file. See
484
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
485
+
486
+ ## [7.2.3](https://github.com/leancodepl/js_corelibrary/compare/v7.2.2...v7.2.3) (2023-11-14)
487
+
488
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
489
+
490
+ # Change Log
491
+
492
+ All notable changes to this project will be documented in this file. See
493
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
494
+
495
+ ## [7.2.2](https://github.com/leancodepl/js_corelibrary/compare/v7.2.1...v7.2.2) (2023-11-13)
496
+
497
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
498
+
499
+ # Change Log
500
+
501
+ All notable changes to this project will be documented in this file. See
502
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
503
+
504
+ ## [7.2.1](https://github.com/leancodepl/js_corelibrary/compare/v7.1.7...v7.2.1) (2023-11-09)
505
+
506
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
507
+
508
+ # Change Log
509
+
510
+ All notable changes to this project will be documented in this file. See
511
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
512
+
513
+ # [7.2.0](https://github.com/leancodepl/js_corelibrary/compare/v7.1.7...v7.2.0) (2023-11-09)
514
+
515
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
516
+
517
+ # Change Log
518
+
519
+ All notable changes to this project will be documented in this file. See
520
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
521
+
522
+ ## [7.1.7](https://github.com/leancodepl/js_corelibrary/compare/v7.0.0...v7.1.7) (2023-09-28)
523
+
524
+ ### Bug Fixes
525
+
526
+ - update nx to fix building packages
527
+ ([ff7577c](https://github.com/leancodepl/js_corelibrary/commit/ff7577c489a575818211d68eacacaed0aa309076))
528
+
529
+ # Change Log
530
+
531
+ All notable changes to this project will be documented in this file. See
532
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
533
+
534
+ ## [7.1.6](https://github.com/leancodepl/js_corelibrary/compare/v7.0.0...v7.1.6) (2023-09-27)
535
+
536
+ ### Bug Fixes
537
+
538
+ - update nx to fix building packages
539
+ ([ff7577c](https://github.com/leancodepl/js_corelibrary/commit/ff7577c489a575818211d68eacacaed0aa309076))
540
+
541
+ # Change Log
542
+
543
+ All notable changes to this project will be documented in this file. See
544
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
545
+
546
+ ## [7.1.5](https://github.com/leancodepl/js_corelibrary/compare/v7.1.4...v7.1.5) (2023-09-27)
547
+
548
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
549
+
550
+ # Change Log
551
+
552
+ All notable changes to this project will be documented in this file. See
553
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
554
+
555
+ ## [7.1.4](https://github.com/leancodepl/js_corelibrary/compare/v7.1.3...v7.1.4) (2023-09-27)
556
+
557
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
558
+
559
+ # Change Log
560
+
561
+ All notable changes to this project will be documented in this file. See
562
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
563
+
564
+ ## [7.1.3](https://github.com/leancodepl/js_corelibrary/compare/v7.1.2...v7.1.3) (2023-09-27)
565
+
566
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
567
+
568
+ # Change Log
569
+
570
+ All notable changes to this project will be documented in this file. See
571
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
572
+
573
+ ## [7.1.2](https://github.com/leancodepl/js_corelibrary/compare/v7.1.1...v7.1.2) (2023-09-27)
574
+
575
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
576
+
577
+ # Change Log
578
+
579
+ All notable changes to this project will be documented in this file. See
580
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
581
+
582
+ # [7.1.0](https://github.com/leancodepl/js_corelibrary/compare/v7.0.0...v7.1.0) (2023-09-27)
583
+
584
+ ### Bug Fixes
585
+
586
+ - update nx to fix building packages
587
+ ([ff7577c](https://github.com/leancodepl/js_corelibrary/commit/ff7577c489a575818211d68eacacaed0aa309076))
588
+
589
+ # Change Log
590
+
591
+ All notable changes to this project will be documented in this file. See
592
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
593
+
594
+ # [7.0.0](https://github.com/leancodepl/js_corelibrary/compare/v6.5.1...v7.0.0) (2023-09-01)
595
+
596
+ ### Features
597
+
598
+ - add github actions
599
+ ([15c2060](https://github.com/leancodepl/js_corelibrary/commit/15c2060511e6bec652431f248d6da75c3d194c85))
600
+ - add registry option to publish script
601
+ ([50f4c08](https://github.com/leancodepl/js_corelibrary/commit/50f4c0877482895b49b62a8f0a1f7ae289898130))
602
+
603
+ # Change Log
604
+
605
+ All notable changes to this project will be documented in this file. See
606
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
607
+
608
+ # [6.3.0](https://github.com/projects/leancodepl/repos/js_corelibrary/compare/diff?targetBranch=refs%2Ftags%2Fv6.2.0&sourceBranch=refs%2Ftags%2Fv6.3.0) (2022-08-10)
609
+
610
+ ### Bug Fixes
611
+
612
+ - correct module paths in package.json
613
+ ([94e0a2b](https://github.com/projects/leancodepl/repos/js_corelibrary/commits/94e0a2b))
614
+
615
+ ### Features
616
+
617
+ - add support for binary using blob
618
+ ([44af864](https://github.com/projects/leancodepl/repos/js_corelibrary/commits/44af864))
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ export * from '@leancodepl/api-binary';
2
+ export * from './lib/fromBlob';
3
+ export * from './lib/toBlob';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,43 @@
1
+ function i(r) {
2
+ return r;
3
+ }
4
+ function b(r) {
5
+ return r;
6
+ }
7
+ function d(r) {
8
+ return r ? new Promise((n, o) => {
9
+ try {
10
+ const e = new FileReader();
11
+ e.onloadend = () => {
12
+ const t = e.result;
13
+ if (typeof t == "string") {
14
+ n(t.slice(Math.max(0, 1 + t.indexOf(",", t.indexOf(";")))));
15
+ return;
16
+ }
17
+ throw new Error("Unknown blob result received for ApiBinary creation");
18
+ }, e.onerror = o, e.readAsDataURL(r);
19
+ } catch (e) {
20
+ o(e);
21
+ }
22
+ }) : Promise.resolve(void 0);
23
+ }
24
+ function a(r, n, o = 512) {
25
+ const e = atob(r), t = [];
26
+ for (let s = 0; s < e.length; s += o) {
27
+ const f = e.slice(s, s + o), u = new Array(f.length);
28
+ for (let l = 0; l < f.length; l++)
29
+ u[l] = f.charCodeAt(l);
30
+ t.push(new Uint8Array(u).buffer);
31
+ }
32
+ return new Blob(t, { type: n });
33
+ }
34
+ function w(r, n) {
35
+ if (r != null)
36
+ return a(r, n);
37
+ }
38
+ export {
39
+ d as fromBlob,
40
+ b as fromRaw,
41
+ w as toBlob,
42
+ i as toRaw
43
+ };
@@ -0,0 +1 @@
1
+ (function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n["@leancodepl/api-binary-blob"]={}))})(this,(function(n){"use strict";function r(e){return e}function b(e){return e}function d(e){return e?new Promise((i,f)=>{try{const t=new FileReader;t.onloadend=()=>{const o=t.result;if(typeof o=="string"){i(o.slice(Math.max(0,1+o.indexOf(",",o.indexOf(";")))));return}throw new Error("Unknown blob result received for ApiBinary creation")},t.onerror=f,t.readAsDataURL(e)}catch(t){f(t)}}):Promise.resolve(void 0)}function a(e,i,f=512){const t=atob(e),o=[];for(let l=0;l<t.length;l+=f){const s=t.slice(l,l+f),c=new Array(s.length);for(let u=0;u<s.length;u++)c[u]=s.charCodeAt(u);o.push(new Uint8Array(c).buffer)}return new Blob(o,{type:i})}function y(e,i){if(e!=null)return a(e,i)}n.fromBlob=d,n.fromRaw=b,n.toBlob=y,n.toRaw=r,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1,2 @@
1
1
  export declare function base64toBlob(base64Data: string, contentType?: string, sliceSize?: number): Blob;
2
+ //# sourceMappingURL=base64ToBlob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64ToBlob.d.ts","sourceRoot":"","sources":["../../src/lib/base64ToBlob.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,SAAM,QAkBrF"}
@@ -1,4 +1,4 @@
1
- import { ApiBinary } from "@leancodepl/api-binary";
1
+ import { ApiBinary } from '@leancodepl/api-binary';
2
2
  /**
3
3
  * Converts Blob to ApiBinary asynchronously.
4
4
  *
@@ -15,3 +15,4 @@ import { ApiBinary } from "@leancodepl/api-binary";
15
15
  */
16
16
  export declare function fromBlob(blob: Blob): Promise<ApiBinary>;
17
17
  export declare function fromBlob(blob?: Blob): Promise<ApiBinary | undefined>;
18
+ //# sourceMappingURL=fromBlob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromBlob.d.ts","sourceRoot":"","sources":["../../src/lib/fromBlob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,wBAAwB,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AACxD,wBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ApiBinary } from "@leancodepl/api-binary";
1
+ import { ApiBinary } from '@leancodepl/api-binary';
2
2
  /**
3
3
  * Converts ApiBinary to Blob with optional content type.
4
4
  *
@@ -16,3 +16,4 @@ import { ApiBinary } from "@leancodepl/api-binary";
16
16
  */
17
17
  export declare function toBlob(apiBinary: ApiBinary, contentType?: string): Blob;
18
18
  export declare function toBlob(apiBinary?: ApiBinary | null, contentType?: string): Blob | undefined;
19
+ //# sourceMappingURL=toBlob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toBlob.d.ts","sourceRoot":"","sources":["../../src/lib/toBlob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,MAAM,wBAAwB,CAAA;AAGzD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;AACxE,wBAAgB,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA"}
package/package.json CHANGED
@@ -1,9 +1,21 @@
1
1
  {
2
2
  "name": "@leancodepl/api-binary-blob",
3
- "version": "9.7.1",
3
+ "version": "9.7.3",
4
4
  "license": "Apache-2.0",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
5
17
  "dependencies": {
6
- "@leancodepl/api-binary": "9.7.1"
18
+ "@leancodepl/api-binary": "9.7.3"
7
19
  },
8
20
  "devDependencies": {
9
21
  "blob-polyfill": "^9.0.0"
@@ -13,7 +25,7 @@
13
25
  "registry": "https://registry.npmjs.org/"
14
26
  },
15
27
  "engines": {
16
- "node": ">=18.0.0"
28
+ "node": ">=22.0.0"
17
29
  },
18
30
  "repository": {
19
31
  "type": "git",
@@ -40,16 +52,9 @@
40
52
  "url": "https://leancode.co"
41
53
  },
42
54
  "sideEffects": false,
43
- "exports": {
44
- "./package.json": "./package.json",
45
- ".": {
46
- "module": "./index.esm.js",
47
- "types": "./index.d.ts",
48
- "import": "./index.cjs.mjs",
49
- "default": "./index.cjs.js"
50
- }
51
- },
52
- "module": "./index.esm.js",
53
- "main": "./index.cjs.js",
54
- "types": "./index.d.ts"
55
+ "files": [
56
+ "dist",
57
+ "CHANGELOG.md",
58
+ "!**/*.tsbuildinfo"
59
+ ]
55
60
  }
@@ -1 +0,0 @@
1
- exports._default = require('./index.cjs.js').default;
package/index.cjs.js DELETED
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- var apiBinary = require('@leancodepl/api-binary');
4
-
5
- function fromBlob(blob) {
6
- if (!blob) return Promise.resolve(undefined);
7
- return new Promise((resolve, reject)=>{
8
- try {
9
- const reader = new FileReader();
10
- reader.onloadend = ()=>{
11
- const result = reader.result;
12
- if (typeof result === "string") {
13
- // we need to strip the `data:*/*;base64,` from the beginning
14
- resolve(apiBinary.fromRaw(result.substring(1 + result.indexOf(",", result.indexOf(";")))));
15
- return;
16
- }
17
- throw new Error("Unknown blob result received for ApiBinary creation");
18
- };
19
- reader.onerror = reject;
20
- reader.readAsDataURL(blob);
21
- } catch (e) {
22
- reject(e);
23
- }
24
- });
25
- }
26
-
27
- function base64toBlob(base64Data, contentType, sliceSize = 512) {
28
- const byteCharacters = atob(base64Data);
29
- const byteArrays = [];
30
- for(let offset = 0; offset < byteCharacters.length; offset += sliceSize){
31
- const slice = byteCharacters.slice(offset, offset + sliceSize);
32
- const byteNumbers = new Array(slice.length);
33
- for(let i = 0; i < slice.length; i++){
34
- byteNumbers[i] = slice.charCodeAt(i);
35
- }
36
- byteArrays.push(new Uint8Array(byteNumbers).buffer);
37
- }
38
- const blob = new Blob(byteArrays, {
39
- type: contentType
40
- });
41
- return blob;
42
- }
43
-
44
- function toBlob(apiBinary$1, contentType) {
45
- if (apiBinary$1 === undefined || apiBinary$1 === null) {
46
- return undefined;
47
- }
48
- return base64toBlob(apiBinary.toRaw(apiBinary$1), contentType);
49
- }
50
-
51
- exports.fromBlob = fromBlob;
52
- exports.toBlob = toBlob;
53
- Object.keys(apiBinary).forEach(function (k) {
54
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
55
- enumerable: true,
56
- get: function () { return apiBinary[k]; }
57
- });
58
- });
package/index.cjs.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from './index.cjs.js';
2
- export { _default as default } from './index.cjs.default.js';
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./src/index";
package/index.esm.js DELETED
@@ -1,50 +0,0 @@
1
- import { fromRaw, toRaw } from '@leancodepl/api-binary';
2
- export * from '@leancodepl/api-binary';
3
-
4
- function fromBlob(blob) {
5
- if (!blob) return Promise.resolve(undefined);
6
- return new Promise((resolve, reject)=>{
7
- try {
8
- const reader = new FileReader();
9
- reader.onloadend = ()=>{
10
- const result = reader.result;
11
- if (typeof result === "string") {
12
- // we need to strip the `data:*/*;base64,` from the beginning
13
- resolve(fromRaw(result.substring(1 + result.indexOf(",", result.indexOf(";")))));
14
- return;
15
- }
16
- throw new Error("Unknown blob result received for ApiBinary creation");
17
- };
18
- reader.onerror = reject;
19
- reader.readAsDataURL(blob);
20
- } catch (e) {
21
- reject(e);
22
- }
23
- });
24
- }
25
-
26
- function base64toBlob(base64Data, contentType, sliceSize = 512) {
27
- const byteCharacters = atob(base64Data);
28
- const byteArrays = [];
29
- for(let offset = 0; offset < byteCharacters.length; offset += sliceSize){
30
- const slice = byteCharacters.slice(offset, offset + sliceSize);
31
- const byteNumbers = new Array(slice.length);
32
- for(let i = 0; i < slice.length; i++){
33
- byteNumbers[i] = slice.charCodeAt(i);
34
- }
35
- byteArrays.push(new Uint8Array(byteNumbers).buffer);
36
- }
37
- const blob = new Blob(byteArrays, {
38
- type: contentType
39
- });
40
- return blob;
41
- }
42
-
43
- function toBlob(apiBinary, contentType) {
44
- if (apiBinary === undefined || apiBinary === null) {
45
- return undefined;
46
- }
47
- return base64toBlob(toRaw(apiBinary), contentType);
48
- }
49
-
50
- export { fromBlob, toBlob };
package/src/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "@leancodepl/api-binary";
2
- export * from "./lib/fromBlob";
3
- export * from "./lib/toBlob";