@d0paminedriven/fs 10.1.0 → 12.0.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.
Files changed (60) hide show
  1. package/dist/docs/index.d.ts +151 -0
  2. package/dist/docs/index.js +1163 -0
  3. package/dist/extract/client.d.ts +56 -0
  4. package/dist/extract/client.js +116 -0
  5. package/dist/extract/index.d.ts +66 -0
  6. package/dist/extract/index.js +620 -0
  7. package/dist/fs/index.d.ts +18 -58
  8. package/dist/fs/index.js +89 -19
  9. package/dist/fs-atomic/index.d.ts +25 -39
  10. package/dist/fs-atomic/index.js +94 -13
  11. package/dist/fs-base/index.d.ts +105 -113
  12. package/dist/fs-base/index.js +197 -12
  13. package/dist/fs-core/index.d.ts +18 -26
  14. package/dist/fs-core/index.js +43 -16
  15. package/dist/fs-fetch/index.d.ts +48 -65
  16. package/dist/fs-fetch/index.js +183 -18
  17. package/dist/fs-size/index.d.ts +15 -31
  18. package/dist/fs-size/index.js +63 -15
  19. package/dist/fs-tmp/index.d.ts +178 -195
  20. package/dist/fs-tmp/index.js +320 -17
  21. package/dist/images/index.d.ts +443 -0
  22. package/dist/images/index.js +893 -0
  23. package/dist/images/workup.d.ts +26 -0
  24. package/dist/images/workup.js +316 -0
  25. package/dist/index.d.ts +48 -22
  26. package/dist/index.js +19 -64
  27. package/dist/ld/index.d.ts +14 -16
  28. package/dist/ld/index.js +54 -6
  29. package/dist/mime/index.d.ts +301 -296
  30. package/dist/mime/index.js +348 -13
  31. package/dist/mixins/index.d.ts +30 -0
  32. package/dist/mixins/index.js +54 -0
  33. package/dist/types/index.d.ts +339 -260
  34. package/dist/types/index.js +10 -6
  35. package/dist/types/stream.d.ts +7 -9
  36. package/dist/types/stream.js +1 -1
  37. package/dist/url/index.d.ts +18 -25
  38. package/dist/url/index.js +19 -8
  39. package/dist/utils/index.d.ts +18 -26
  40. package/dist/utils/index.js +80 -7
  41. package/package.json +42 -22
  42. package/dist/chunk-4D2YBCI6.js +0 -163
  43. package/dist/chunk-5CACVZVF.js +0 -386
  44. package/dist/chunk-5H6GE5AO.js +0 -14
  45. package/dist/chunk-7QVYU63E.js +0 -7
  46. package/dist/chunk-DNR5ZI2T.js +0 -75
  47. package/dist/chunk-JZ6JNZZ6.js +0 -77
  48. package/dist/chunk-L2QMQOEJ.js +0 -366
  49. package/dist/chunk-NJHN5OE3.js +0 -33
  50. package/dist/chunk-OHKRQJZH.js +0 -82
  51. package/dist/chunk-OT5JEQKW.js +0 -139
  52. package/dist/chunk-PATMSIQK.js +0 -367
  53. package/dist/chunk-PB5A7ZFD.js +0 -79
  54. package/dist/chunk-VDKUXJE7.js +0 -240
  55. package/dist/chunk-Y5QWE4EG.js +0 -1335
  56. package/dist/chunk-YRCJWFZD.js +0 -107
  57. package/dist/image/index.d.ts +0 -182
  58. package/dist/image/index.js +0 -13
  59. package/dist/image/workup.d.ts +0 -40
  60. package/dist/image/workup.js +0 -12
@@ -0,0 +1,443 @@
1
+ import { ExpandedImgSpecs } from "../types/index.js";
2
+ import { ImgMetadataExtractorWorkup } from "./workup.js";
3
+ import { Readable } from "node:stream";
4
+ export declare class ImgMetadataExtractor extends ImgMetadataExtractorWorkup {
5
+ constructor();
6
+ protected png(buffer: Buffer<ArrayBufferLike>): {
7
+ type: "IMAGE";
8
+ width: number;
9
+ height: number;
10
+ format: "apng" | "png";
11
+ frames: number;
12
+ animated: boolean;
13
+ hasAlpha: boolean;
14
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed";
15
+ orientation: number | null;
16
+ aspectRatio: number;
17
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
18
+ iccProfile: string | null;
19
+ exifDateTimeOriginal: string | null;
20
+ metadata: Record<string, string>;
21
+ };
22
+ protected jpeg(buffer: Buffer<ArrayBufferLike>): {
23
+ type: "IMAGE";
24
+ width: number;
25
+ height: number;
26
+ format: "jpeg";
27
+ frames: number;
28
+ animated: false;
29
+ hasAlpha: false;
30
+ orientation: number | null;
31
+ aspectRatio: number;
32
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
33
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
34
+ iccProfile: string | null;
35
+ exifDateTimeOriginal: string | null;
36
+ };
37
+ protected gif(buffer: Buffer<ArrayBufferLike>): {
38
+ type: "IMAGE";
39
+ width: number;
40
+ height: number;
41
+ format: "gif";
42
+ frames: number;
43
+ animated: boolean;
44
+ hasAlpha: null;
45
+ orientation: null;
46
+ aspectRatio: number;
47
+ colorModel: "indexed";
48
+ colorSpace: "unknown";
49
+ iccProfile: null;
50
+ exifDateTimeOriginal: null;
51
+ };
52
+ protected bmp(buffer: Buffer<ArrayBufferLike>): {
53
+ type: "IMAGE";
54
+ width: number;
55
+ height: number;
56
+ format: "bmp";
57
+ frames: number;
58
+ animated: false;
59
+ hasAlpha: null;
60
+ orientation: number;
61
+ aspectRatio: number;
62
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
63
+ colorSpace: "unknown";
64
+ iccProfile: null;
65
+ exifDateTimeOriginal: null;
66
+ };
67
+ protected webp(buffer: Buffer<ArrayBufferLike>): {
68
+ type: "IMAGE";
69
+ width: number;
70
+ height: number;
71
+ format: "webp";
72
+ frames: number;
73
+ animated: boolean;
74
+ hasAlpha: boolean;
75
+ colorModel: "unknown" | "rgb" | "rgba";
76
+ orientation: null;
77
+ aspectRatio: number;
78
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
79
+ iccProfile: string | null;
80
+ exifDateTimeOriginal: null;
81
+ };
82
+ protected avif(buffer: Buffer<ArrayBufferLike>): {
83
+ type: "IMAGE";
84
+ width: number;
85
+ height: number;
86
+ format: "avif";
87
+ frames: number;
88
+ animated: boolean;
89
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
90
+ hasAlpha: true | null;
91
+ orientation: null;
92
+ aspectRatio: number;
93
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
94
+ iccProfile: string | null;
95
+ exifDateTimeOriginal: string | null;
96
+ };
97
+ protected heic(buffer: Buffer<ArrayBufferLike>): {
98
+ type: "IMAGE";
99
+ width: number;
100
+ height: number;
101
+ format: "heic";
102
+ frames: number;
103
+ animated: boolean;
104
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
105
+ hasAlpha: true | null;
106
+ orientation: null;
107
+ aspectRatio: number;
108
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
109
+ iccProfile: string | null;
110
+ exifDateTimeOriginal: string | null;
111
+ };
112
+ protected svg(headerText: string): {
113
+ type: "IMAGE";
114
+ width: number;
115
+ height: number;
116
+ format: "svg";
117
+ frames: number;
118
+ animated: boolean;
119
+ hasAlpha: true;
120
+ orientation: null;
121
+ aspectRatio: number;
122
+ colorModel: "vector";
123
+ colorSpace: "srgb";
124
+ iccProfile: null;
125
+ exifDateTimeOriginal: null;
126
+ };
127
+ protected ico(rawbuffer: Buffer<ArrayBufferLike>, buffer: Buffer<ArrayBufferLike>): {
128
+ type: "IMAGE";
129
+ width: number;
130
+ height: number;
131
+ format: "ico";
132
+ frames: number;
133
+ animated: false;
134
+ hasAlpha: true | null;
135
+ orientation: null;
136
+ aspectRatio: number;
137
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
138
+ colorSpace: "srgb";
139
+ iccProfile: null;
140
+ exifDateTimeOriginal: null;
141
+ };
142
+ tiff(rawbuffer: Buffer<ArrayBufferLike>, buffer: Buffer<ArrayBufferLike>): {
143
+ type: "IMAGE";
144
+ width: number;
145
+ height: number;
146
+ format: "tiff";
147
+ frames: number;
148
+ animated: false;
149
+ hasAlpha: boolean;
150
+ orientation: number | null;
151
+ aspectRatio: number;
152
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
153
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
154
+ iccProfile: string | null;
155
+ exifDateTimeOriginal: string | null;
156
+ };
157
+ extractImgSpecsViaStream(stream: Readable, size?: number): Promise<{
158
+ type: "IMAGE";
159
+ width: number;
160
+ height: number;
161
+ format: "apng" | "png";
162
+ frames: number;
163
+ animated: boolean;
164
+ hasAlpha: boolean;
165
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed";
166
+ orientation: number | null;
167
+ aspectRatio: number;
168
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
169
+ iccProfile: string | null;
170
+ exifDateTimeOriginal: string | null;
171
+ metadata: Record<string, string>;
172
+ } | {
173
+ type: "IMAGE";
174
+ width: number;
175
+ height: number;
176
+ format: "jpeg";
177
+ frames: number;
178
+ animated: false;
179
+ hasAlpha: false;
180
+ orientation: number | null;
181
+ aspectRatio: number;
182
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
183
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
184
+ iccProfile: string | null;
185
+ exifDateTimeOriginal: string | null;
186
+ } | {
187
+ type: "IMAGE";
188
+ width: number;
189
+ height: number;
190
+ format: "gif";
191
+ frames: number;
192
+ animated: boolean;
193
+ hasAlpha: null;
194
+ orientation: null;
195
+ aspectRatio: number;
196
+ colorModel: "indexed";
197
+ colorSpace: "unknown";
198
+ iccProfile: null;
199
+ exifDateTimeOriginal: null;
200
+ } | {
201
+ type: "IMAGE";
202
+ width: number;
203
+ height: number;
204
+ format: "bmp";
205
+ frames: number;
206
+ animated: false;
207
+ hasAlpha: null;
208
+ orientation: number;
209
+ aspectRatio: number;
210
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
211
+ colorSpace: "unknown";
212
+ iccProfile: null;
213
+ exifDateTimeOriginal: null;
214
+ } | {
215
+ type: "IMAGE";
216
+ width: number;
217
+ height: number;
218
+ format: "webp";
219
+ frames: number;
220
+ animated: boolean;
221
+ hasAlpha: boolean;
222
+ colorModel: "unknown" | "rgb" | "rgba";
223
+ orientation: null;
224
+ aspectRatio: number;
225
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
226
+ iccProfile: string | null;
227
+ exifDateTimeOriginal: null;
228
+ } | {
229
+ type: "IMAGE";
230
+ width: number;
231
+ height: number;
232
+ format: "avif";
233
+ frames: number;
234
+ animated: boolean;
235
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
236
+ hasAlpha: true | null;
237
+ orientation: null;
238
+ aspectRatio: number;
239
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
240
+ iccProfile: string | null;
241
+ exifDateTimeOriginal: string | null;
242
+ } | {
243
+ type: "IMAGE";
244
+ width: number;
245
+ height: number;
246
+ format: "heic";
247
+ frames: number;
248
+ animated: boolean;
249
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
250
+ hasAlpha: true | null;
251
+ orientation: null;
252
+ aspectRatio: number;
253
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
254
+ iccProfile: string | null;
255
+ exifDateTimeOriginal: string | null;
256
+ } | {
257
+ type: "IMAGE";
258
+ width: number;
259
+ height: number;
260
+ format: "svg";
261
+ frames: number;
262
+ animated: boolean;
263
+ hasAlpha: true;
264
+ orientation: null;
265
+ aspectRatio: number;
266
+ colorModel: "vector";
267
+ colorSpace: "srgb";
268
+ iccProfile: null;
269
+ exifDateTimeOriginal: null;
270
+ } | {
271
+ type: "IMAGE";
272
+ width: number;
273
+ height: number;
274
+ format: "ico";
275
+ frames: number;
276
+ animated: false;
277
+ hasAlpha: true | null;
278
+ orientation: null;
279
+ aspectRatio: number;
280
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
281
+ colorSpace: "srgb";
282
+ iccProfile: null;
283
+ exifDateTimeOriginal: null;
284
+ } | {
285
+ type: "IMAGE";
286
+ width: number;
287
+ height: number;
288
+ format: "tiff";
289
+ frames: number;
290
+ animated: false;
291
+ hasAlpha: boolean;
292
+ orientation: number | null;
293
+ aspectRatio: number;
294
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
295
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
296
+ iccProfile: string | null;
297
+ exifDateTimeOriginal: string | null;
298
+ }>;
299
+ extractImgSpecsViaPath(filePath: string, size?: number): Promise<ExpandedImgSpecs>;
300
+ getImageSpecsWorkup(rawbuffer: Buffer<ArrayBufferLike>, size?: number): {
301
+ type: "IMAGE";
302
+ width: number;
303
+ height: number;
304
+ format: "apng" | "png";
305
+ frames: number;
306
+ animated: boolean;
307
+ hasAlpha: boolean;
308
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed";
309
+ orientation: number | null;
310
+ aspectRatio: number;
311
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
312
+ iccProfile: string | null;
313
+ exifDateTimeOriginal: string | null;
314
+ metadata: Record<string, string>;
315
+ } | {
316
+ type: "IMAGE";
317
+ width: number;
318
+ height: number;
319
+ format: "jpeg";
320
+ frames: number;
321
+ animated: false;
322
+ hasAlpha: false;
323
+ orientation: number | null;
324
+ aspectRatio: number;
325
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
326
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
327
+ iccProfile: string | null;
328
+ exifDateTimeOriginal: string | null;
329
+ } | {
330
+ type: "IMAGE";
331
+ width: number;
332
+ height: number;
333
+ format: "gif";
334
+ frames: number;
335
+ animated: boolean;
336
+ hasAlpha: null;
337
+ orientation: null;
338
+ aspectRatio: number;
339
+ colorModel: "indexed";
340
+ colorSpace: "unknown";
341
+ iccProfile: null;
342
+ exifDateTimeOriginal: null;
343
+ } | {
344
+ type: "IMAGE";
345
+ width: number;
346
+ height: number;
347
+ format: "bmp";
348
+ frames: number;
349
+ animated: false;
350
+ hasAlpha: null;
351
+ orientation: number;
352
+ aspectRatio: number;
353
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
354
+ colorSpace: "unknown";
355
+ iccProfile: null;
356
+ exifDateTimeOriginal: null;
357
+ } | {
358
+ type: "IMAGE";
359
+ width: number;
360
+ height: number;
361
+ format: "webp";
362
+ frames: number;
363
+ animated: boolean;
364
+ hasAlpha: boolean;
365
+ colorModel: "unknown" | "rgb" | "rgba";
366
+ orientation: null;
367
+ aspectRatio: number;
368
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
369
+ iccProfile: string | null;
370
+ exifDateTimeOriginal: null;
371
+ } | {
372
+ type: "IMAGE";
373
+ width: number;
374
+ height: number;
375
+ format: "avif";
376
+ frames: number;
377
+ animated: boolean;
378
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
379
+ hasAlpha: true | null;
380
+ orientation: null;
381
+ aspectRatio: number;
382
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
383
+ iccProfile: string | null;
384
+ exifDateTimeOriginal: string | null;
385
+ } | {
386
+ type: "IMAGE";
387
+ width: number;
388
+ height: number;
389
+ format: "heic";
390
+ frames: number;
391
+ animated: boolean;
392
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
393
+ hasAlpha: true | null;
394
+ orientation: null;
395
+ aspectRatio: number;
396
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
397
+ iccProfile: string | null;
398
+ exifDateTimeOriginal: string | null;
399
+ } | {
400
+ type: "IMAGE";
401
+ width: number;
402
+ height: number;
403
+ format: "svg";
404
+ frames: number;
405
+ animated: boolean;
406
+ hasAlpha: true;
407
+ orientation: null;
408
+ aspectRatio: number;
409
+ colorModel: "vector";
410
+ colorSpace: "srgb";
411
+ iccProfile: null;
412
+ exifDateTimeOriginal: null;
413
+ } | {
414
+ type: "IMAGE";
415
+ width: number;
416
+ height: number;
417
+ format: "ico";
418
+ frames: number;
419
+ animated: false;
420
+ hasAlpha: true | null;
421
+ orientation: null;
422
+ aspectRatio: number;
423
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
424
+ colorSpace: "srgb";
425
+ iccProfile: null;
426
+ exifDateTimeOriginal: null;
427
+ } | {
428
+ type: "IMAGE";
429
+ width: number;
430
+ height: number;
431
+ format: "tiff";
432
+ frames: number;
433
+ animated: false;
434
+ hasAlpha: boolean;
435
+ orientation: number | null;
436
+ aspectRatio: number;
437
+ colorModel: "unknown" | "rgb" | "rgba" | "grayscale" | "grayscale-alpha" | "indexed" | "cmyk" | "ycbcr" | "ycck" | "vector" | "lab";
438
+ colorSpace: "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
439
+ iccProfile: string | null;
440
+ exifDateTimeOriginal: string | null;
441
+ };
442
+ }
443
+ //# sourceMappingURL=index.d.ts.map