@mastra/server 1.80.0 → 1.81.0-alpha.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 (86) hide show
  1. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +51 -12
  2. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +144 -42
  3. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-v6/dist/index.d.ts +53 -14
  4. package/dist/{agent-builder-DXhQCXod.cjs → agent-builder-DIEX-as5.cjs} +2 -2
  5. package/dist/{agent-builder-DXhQCXod.cjs.map → agent-builder-DIEX-as5.cjs.map} +1 -1
  6. package/dist/{agent-builder-CrmZ77IU.js → agent-builder-XhBB0Svr.js} +2 -2
  7. package/dist/{agent-builder-CrmZ77IU.js.map → agent-builder-XhBB0Svr.js.map} +1 -1
  8. package/dist/{api-schema-manifest-JUFooPZG.js → api-schema-manifest-BVPhF1ZS.js} +2 -2
  9. package/dist/{api-schema-manifest-JUFooPZG.js.map → api-schema-manifest-BVPhF1ZS.js.map} +1 -1
  10. package/dist/{api-schema-manifest-CwFjht0V.cjs → api-schema-manifest-BWId44SV.cjs} +2 -2
  11. package/dist/{api-schema-manifest-CwFjht0V.cjs.map → api-schema-manifest-BWId44SV.cjs.map} +1 -1
  12. package/dist/{dist-qgP3izdE.cjs → dist-BK1fCE4z.cjs} +1 -1
  13. package/dist/{dist-DK9HHAgo.js → dist-BLjE21MA.js} +2143 -2025
  14. package/dist/dist-BLjE21MA.js.map +1 -0
  15. package/dist/{dist-DXDt4qI1.cjs → dist-OpNBTIST.cjs} +2191 -2031
  16. package/dist/dist-OpNBTIST.cjs.map +1 -0
  17. package/dist/dist-_M1jEPcL.js +1 -0
  18. package/dist/docs/SKILL.md +1 -1
  19. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  20. package/dist/docs/references/reference-observability-tracing-advanced-queries.md +33 -16
  21. package/dist/{memory-DQXCDswv.js → memory-BTR95ujT.js} +3 -3
  22. package/dist/{memory-DQXCDswv.js.map → memory-BTR95ujT.js.map} +1 -1
  23. package/dist/{memory-DpKQ1Quf.cjs → memory-Buhi6kZ-.cjs} +3 -3
  24. package/dist/{memory-DpKQ1Quf.cjs.map → memory-Buhi6kZ-.cjs.map} +1 -1
  25. package/dist/{observability-65rZOqJk.js → observability-BgIU0otL.js} +2 -2
  26. package/dist/{observability-65rZOqJk.js.map → observability-BgIU0otL.js.map} +1 -1
  27. package/dist/{observability-CFKSxaff.cjs → observability-DHuljMXO.cjs} +2 -2
  28. package/dist/{observability-CFKSxaff.cjs.map → observability-DHuljMXO.cjs.map} +1 -1
  29. package/dist/{observability-new-endpoints-CDeHfFNP.cjs → observability-new-endpoints-CaTskbSh.cjs} +12 -3
  30. package/dist/observability-new-endpoints-CaTskbSh.cjs.map +1 -0
  31. package/dist/{observability-new-endpoints-B6MRJ5Rb.js → observability-new-endpoints-CsUP8y2j.js} +13 -4
  32. package/dist/observability-new-endpoints-CsUP8y2j.js.map +1 -0
  33. package/dist/{probe-image-size-DqKTuApZ.cjs → probe-image-size-BIZUe8Bp.cjs} +50 -678
  34. package/dist/probe-image-size-BIZUe8Bp.cjs.map +1 -0
  35. package/dist/{probe-image-size-BLtXo-AD.js → probe-image-size-BqH96zcz.js} +50 -678
  36. package/dist/probe-image-size-BqH96zcz.js.map +1 -0
  37. package/dist/{routes-CbwRkg8_.cjs → routes-By3cLbPV.cjs} +5 -5
  38. package/dist/{routes-CbwRkg8_.cjs.map → routes-By3cLbPV.cjs.map} +1 -1
  39. package/dist/{routes-M2U8U4Jl.js → routes-CBrxFxzL.js} +5 -5
  40. package/dist/{routes-M2U8U4Jl.js.map → routes-CBrxFxzL.js.map} +1 -1
  41. package/dist/server/handlers/agent-builder.cjs +1 -1
  42. package/dist/server/handlers/agent-builder.js +1 -1
  43. package/dist/server/handlers/memory.cjs +1 -1
  44. package/dist/server/handlers/memory.js +1 -1
  45. package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
  46. package/dist/server/handlers/observability-new-endpoints.d.ts +36 -4
  47. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  48. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  49. package/dist/server/handlers/observability-shared.cjs +27 -0
  50. package/dist/server/handlers/observability-shared.cjs.map +1 -1
  51. package/dist/server/handlers/observability-shared.d.ts +10 -0
  52. package/dist/server/handlers/observability-shared.d.ts.map +1 -1
  53. package/dist/server/handlers/observability-shared.js +24 -1
  54. package/dist/server/handlers/observability-shared.js.map +1 -1
  55. package/dist/server/handlers/observability.cjs +2 -2
  56. package/dist/server/handlers/observability.js +2 -2
  57. package/dist/server/handlers/system.cjs +2 -2
  58. package/dist/server/handlers/system.d.ts +4 -0
  59. package/dist/server/handlers/system.d.ts.map +1 -1
  60. package/dist/server/handlers/system.js +2 -2
  61. package/dist/server/handlers.cjs +3 -3
  62. package/dist/server/handlers.js +3 -3
  63. package/dist/server/schemas/index.cjs +1 -1
  64. package/dist/server/schemas/index.js +1 -1
  65. package/dist/server/schemas/system.d.ts +4 -0
  66. package/dist/server/schemas/system.d.ts.map +1 -1
  67. package/dist/server/server-adapter/index.cjs +1 -1
  68. package/dist/server/server-adapter/index.js +1 -1
  69. package/dist/server/server-adapter/routes/observability.d.ts +18 -2
  70. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  71. package/dist/server/server-adapter/routes/system.d.ts +4 -0
  72. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  73. package/dist/{system-DGfJlOxK.cjs → system-BxHpBJiq.cjs} +3 -1
  74. package/dist/system-BxHpBJiq.cjs.map +1 -0
  75. package/dist/{system-B8L_G4oo.js → system-CxwzIMsy.js} +3 -1
  76. package/dist/system-CxwzIMsy.js.map +1 -0
  77. package/package.json +6 -6
  78. package/dist/dist-C_xVj979.js +0 -1
  79. package/dist/dist-DK9HHAgo.js.map +0 -1
  80. package/dist/dist-DXDt4qI1.cjs.map +0 -1
  81. package/dist/observability-new-endpoints-B6MRJ5Rb.js.map +0 -1
  82. package/dist/observability-new-endpoints-CDeHfFNP.cjs.map +0 -1
  83. package/dist/probe-image-size-BLtXo-AD.js.map +0 -1
  84. package/dist/probe-image-size-DqKTuApZ.cjs.map +0 -1
  85. package/dist/system-B8L_G4oo.js.map +0 -1
  86. package/dist/system-DGfJlOxK.cjs.map +0 -1
@@ -1,684 +1,57 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
2
- const require_dist = require("./dist-DXDt4qI1.cjs");
2
+ const require_dist = require("./dist-OpNBTIST.cjs");
3
3
  let tty = require("tty");
4
4
  tty = require_rolldown_runtime.__toESM(tty, 1);
5
5
  let process$1 = require("process");
6
6
  process$1 = require_rolldown_runtime.__toESM(process$1, 1);
7
7
  let os = require("os");
8
8
  os = require_rolldown_runtime.__toESM(os, 1);
9
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/avif.js
10
- var require_avif = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
11
- var ParserStream = require_dist.require_common().ParserStream;
12
- var str2arr = require_dist.require_common().str2arr;
13
- var sliceEq = require_dist.require_common().sliceEq;
14
- var readUInt32BE = require_dist.require_common().readUInt32BE;
15
- var miaf = require_dist.require_miaf_utils();
16
- var exif = require_dist.require_exif_utils();
17
- var SIG_FTYP = str2arr("ftyp");
18
- function safeSkip(parser, count, callback) {
19
- if (count === 0) {
20
- callback();
21
- return;
22
- }
23
- parser._skipBytes(count, callback);
24
- }
25
- function readExifOrientation(parser, sandbox, on_orientation) {
26
- if (!sandbox.exif_location || sandbox.exif_location.offset <= sandbox.offset) {
27
- on_orientation(0);
28
- return;
29
- }
30
- parser._skipBytes(sandbox.exif_location.offset - sandbox.offset, function() {
31
- sandbox.offset = sandbox.exif_location.offset;
32
- parser._bytes(4, function(data) {
33
- sandbox.offset += 4;
34
- var sig_offset = readUInt32BE(data, 0);
35
- safeSkip(parser, sig_offset, function() {
36
- sandbox.offset += sig_offset;
37
- var byteCount = sandbox.exif_location.length - sig_offset - 4;
38
- if (byteCount <= 0) {
39
- on_orientation(0);
40
- return;
41
- }
42
- parser._bytes(byteCount, function(exif_data) {
43
- sandbox.offset += byteCount;
44
- on_orientation(exif.get_orientation(exif_data));
45
- });
46
- });
47
- });
48
- });
49
- }
50
- function readAvifSize(parser, sandbox) {
51
- parser._bytes(8, function(data) {
52
- sandbox.offset += 8;
53
- var size = readUInt32BE(data, 0) - 8;
54
- var type = String.fromCharCode.apply(null, data.slice(4, 8));
55
- if (type === "mdat") {
56
- parser._skipBytes(Infinity);
57
- parser.push(null);
58
- return;
59
- }
60
- if (size < 0) {
61
- parser._skipBytes(Infinity);
62
- parser.push(null);
63
- return;
64
- }
65
- if (type === "meta" && size > 0) parser._bytes(size, function(data) {
66
- sandbox.offset += size;
67
- var imgSize = miaf.readSizeFromMeta(data);
68
- if (!imgSize) {
69
- parser._skipBytes(Infinity);
70
- parser.push(null);
71
- return;
72
- }
73
- var result = {
74
- width: imgSize.width,
75
- height: imgSize.height,
76
- type: sandbox.fileType.type,
77
- mime: sandbox.fileType.mime,
78
- wUnits: "px",
79
- hUnits: "px"
80
- };
81
- if (imgSize.variants.length > 1) result.variants = imgSize.variants;
82
- if (imgSize.orientation) result.orientation = imgSize.orientation;
83
- sandbox.exif_location = imgSize.exif_location;
84
- readExifOrientation(parser, sandbox, function(orientation) {
85
- if (orientation > 0) result.orientation = orientation;
86
- parser._skipBytes(Infinity);
87
- parser.push(result);
88
- parser.push(null);
89
- });
90
- });
91
- else safeSkip(parser, size, function() {
92
- sandbox.offset += size;
93
- readAvifSize(parser, sandbox);
94
- });
95
- });
96
- }
97
- module.exports = function() {
98
- var parser = new ParserStream();
99
- var sandbox = {
100
- offset: 0,
101
- fileType: null
102
- };
103
- parser._bytes(8, function(data) {
104
- sandbox.offset += 8;
105
- if (!sliceEq(data, 4, SIG_FTYP)) {
106
- parser._skipBytes(Infinity);
107
- parser.push(null);
108
- return;
109
- }
110
- var size = readUInt32BE(data, 0) - 8;
111
- if (size <= 0) {
112
- parser._skipBytes(Infinity);
113
- parser.push(null);
114
- return;
115
- }
116
- parser._bytes(size, function(data) {
117
- sandbox.offset += size;
118
- sandbox.fileType = miaf.getMimeType(data);
119
- if (!sandbox.fileType) {
120
- parser._skipBytes(Infinity);
121
- parser.push(null);
122
- return;
123
- }
124
- readAvifSize(parser, sandbox);
125
- });
126
- });
127
- return parser;
128
- };
129
- }));
130
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/bmp.js
131
- var require_bmp = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
132
- var ParserStream = require_dist.require_common().ParserStream;
133
- var str2arr = require_dist.require_common().str2arr;
134
- var sliceEq = require_dist.require_common().sliceEq;
135
- var SIG_BM = str2arr("BM");
136
- module.exports = function() {
137
- var parser = new ParserStream();
138
- parser._bytes(26, function(data) {
139
- parser._skipBytes(Infinity);
140
- if (!sliceEq(data, 0, SIG_BM)) {
141
- parser.push(null);
142
- return;
143
- }
144
- var w, h;
145
- var headerSize = data.readUInt32LE(14);
146
- if (headerSize === 12) {
147
- w = data.readInt16LE(18);
148
- h = data.readInt16LE(20);
149
- } else if (headerSize > 12) {
150
- w = data.readInt32LE(18);
151
- h = data.readInt32LE(22);
152
- } else {
153
- parser.push(null);
154
- return;
155
- }
156
- parser.push({
157
- width: w,
158
- height: Math.abs(h),
159
- type: "bmp",
160
- mime: "image/bmp",
161
- wUnits: "px",
162
- hUnits: "px"
163
- });
164
- parser.push(null);
165
- });
166
- return parser;
167
- };
168
- }));
169
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/gif.js
170
- var require_gif = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
171
- var ParserStream = require_dist.require_common().ParserStream;
172
- var str2arr = require_dist.require_common().str2arr;
173
- var sliceEq = require_dist.require_common().sliceEq;
174
- var SIG_GIF87a = str2arr("GIF87a");
175
- var SIG_GIF89a = str2arr("GIF89a");
176
- module.exports = function() {
177
- var parser = new ParserStream();
178
- parser._bytes(10, function(data) {
179
- parser._skipBytes(Infinity);
180
- if (!sliceEq(data, 0, SIG_GIF87a) && !sliceEq(data, 0, SIG_GIF89a)) {
181
- parser.push(null);
182
- return;
183
- }
184
- parser.push({
185
- width: data.readUInt16LE(6),
186
- height: data.readUInt16LE(8),
187
- type: "gif",
188
- mime: "image/gif",
189
- wUnits: "px",
190
- hUnits: "px"
191
- });
192
- parser.push(null);
193
- });
194
- return parser;
195
- };
196
- }));
197
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/ico.js
198
- var require_ico = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
199
- var ParserStream = require_dist.require_common().ParserStream;
200
- var HEADER = 0;
201
- var TYPE_ICO = 1;
202
- var INDEX_SIZE = 16;
203
- module.exports = function() {
204
- var parser = new ParserStream();
205
- parser._bytes(6, function(data) {
206
- var header = data.readUInt16LE(0);
207
- var type = data.readUInt16LE(2);
208
- var numImages = data.readUInt16LE(4);
209
- if (header !== HEADER || type !== TYPE_ICO || !numImages) {
210
- parser._skipBytes(Infinity);
211
- parser.push(null);
212
- return;
213
- }
214
- parser._bytes(numImages * INDEX_SIZE, function(indexData) {
215
- parser._skipBytes(Infinity);
216
- var variants = [];
217
- var maxSize = {
218
- width: 0,
219
- height: 0
220
- };
221
- for (var i = 0; i < numImages; i++) {
222
- var width = indexData.readUInt8(INDEX_SIZE * i + 0) || 256;
223
- var height = indexData.readUInt8(INDEX_SIZE * i + 1) || 256;
224
- var size = {
225
- width,
226
- height
227
- };
228
- variants.push(size);
229
- if (width > maxSize.width || height > maxSize.height) maxSize = size;
230
- }
231
- parser.push({
232
- width: maxSize.width,
233
- height: maxSize.height,
234
- variants,
235
- type: "ico",
236
- mime: "image/x-icon",
237
- wUnits: "px",
238
- hUnits: "px"
239
- });
240
- parser.push(null);
241
- });
242
- });
243
- return parser;
244
- };
245
- }));
246
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/jpeg.js
247
- var require_jpeg = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
248
- var ParserStream = require_dist.require_common().ParserStream;
249
- var str2arr = require_dist.require_common().str2arr;
250
- var sliceEq = require_dist.require_common().sliceEq;
251
- var exif = require_dist.require_exif_utils();
252
- var SIG_EXIF = str2arr("Exif\0\0");
253
- function parseJpegMarker_afterFF(parser, callback) {
254
- parser._bytes(1, function(data) {
255
- var code = data[0];
256
- if (code === 255) {
257
- parseJpegMarker_afterFF(parser, callback);
258
- return;
259
- }
260
- if (code >= 208 && code <= 217 || code === 1) {
261
- callback(code, 0);
262
- return;
263
- }
264
- if (code >= 192 && code <= 254) {
265
- parser._bytes(2, function(length) {
266
- callback(code, length.readUInt16BE(0) - 2);
267
- });
268
- return;
269
- }
270
- callback();
271
- });
272
- }
273
- function parseJpegMarker(parser, sandbox, callback) {
274
- var start = sandbox.start;
275
- sandbox.start = false;
276
- parser._bytes(1, function(data) {
277
- if (data[0] !== 255) {
278
- if (start) callback();
279
- else parseJpegMarker(parser, sandbox, callback);
280
- return;
281
- }
282
- parseJpegMarker_afterFF(parser, callback);
283
- });
284
- }
285
- function getJpegSize(parser, sandbox) {
286
- parseJpegMarker(parser, sandbox, function(code, length) {
287
- if (!code || length < 0) {
288
- parser._skipBytes(Infinity);
289
- parser.push(null);
290
- return;
291
- }
292
- if (code === 217 || code === 218) {
293
- parser._skipBytes(Infinity);
294
- parser.push(null);
295
- return;
296
- }
297
- if (code === 225 && length >= 10) {
298
- parser._bytes(length, function(data) {
299
- if (sliceEq(data, 0, SIG_EXIF)) sandbox.orientation = exif.get_orientation(data.slice(6, 6 + length));
300
- getJpegSize(parser, sandbox);
301
- });
302
- return;
303
- }
304
- if (length <= 0) {
305
- getJpegSize(parser, sandbox);
306
- return;
307
- }
308
- if (length >= 5 && code >= 192 && code <= 207 && code !== 196 && code !== 200 && code !== 204) {
309
- parser._bytes(length, function(data) {
310
- parser._skipBytes(Infinity);
311
- var result = {
312
- width: data.readUInt16BE(3),
313
- height: data.readUInt16BE(1),
314
- type: "jpg",
315
- mime: "image/jpeg",
316
- wUnits: "px",
317
- hUnits: "px"
318
- };
319
- if (sandbox.orientation > 0) result.orientation = sandbox.orientation;
320
- parser.push(result);
321
- parser.push(null);
322
- });
323
- return;
324
- }
325
- parser._skipBytes(length, function() {
326
- getJpegSize(parser, sandbox);
327
- });
328
- });
329
- }
330
- module.exports = function() {
331
- var parser = new ParserStream();
332
- parser._bytes(2, function(data) {
333
- if (data[0] !== 255 || data[1] !== 216) {
334
- parser._skipBytes(Infinity);
335
- parser.push(null);
336
- return;
337
- }
338
- getJpegSize(parser, { start: true });
339
- });
340
- return parser;
341
- };
342
- }));
343
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/png.js
344
- var require_png = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
345
- var ParserStream = require_dist.require_common().ParserStream;
346
- var str2arr = require_dist.require_common().str2arr;
347
- var sliceEq = require_dist.require_common().sliceEq;
348
- var SIG_PNG = str2arr("‰PNG\r\n\n");
349
- var SIG_IHDR = str2arr("IHDR");
350
- module.exports = function() {
351
- var parser = new ParserStream();
352
- parser._bytes(24, function(data) {
353
- parser._skipBytes(Infinity);
354
- if (!sliceEq(data, 0, SIG_PNG)) {
355
- parser.push(null);
356
- return;
357
- }
358
- if (!sliceEq(data, 12, SIG_IHDR)) {
359
- parser.push(null);
360
- return;
361
- }
362
- parser.push({
363
- width: data.readUInt32BE(16),
364
- height: data.readUInt32BE(20),
365
- type: "png",
366
- mime: "image/png",
367
- wUnits: "px",
368
- hUnits: "px"
369
- });
370
- parser.push(null);
371
- });
372
- return parser;
373
- };
374
- }));
375
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/psd.js
376
- var require_psd = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
377
- var ParserStream = require_dist.require_common().ParserStream;
378
- var str2arr = require_dist.require_common().str2arr;
379
- var sliceEq = require_dist.require_common().sliceEq;
380
- var SIG_8BPS = str2arr("8BPS\0");
381
- module.exports = function() {
382
- var parser = new ParserStream();
383
- parser._bytes(6, function(data) {
384
- if (!sliceEq(data, 0, SIG_8BPS)) {
385
- parser._skipBytes(Infinity);
386
- parser.push(null);
387
- return;
388
- }
389
- parser._bytes(16, function(data) {
390
- parser._skipBytes(Infinity);
391
- parser.push({
392
- width: data.readUInt32BE(12),
393
- height: data.readUInt32BE(8),
394
- type: "psd",
395
- mime: "image/vnd.adobe.photoshop",
396
- wUnits: "px",
397
- hUnits: "px"
398
- });
399
- parser.push(null);
400
- });
401
- });
402
- return parser;
403
- };
404
- }));
405
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/svg.js
406
- var require_svg = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
9
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.5.0/48b233d456459b962cf37bbd06a4253dee16b693cf4ae8fcea86928b192810e1/node_modules/probe-image-size/lib/parsers_stream.js
10
+ var require_parsers_stream = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
407
11
  var Transform = require("stream").Transform;
408
- var parseSvgHeader = require_dist.require_svg_header().parse;
409
- var MAX_DATA_LENGTH = require_dist.require_svg_header().MAX_DATA_LENGTH;
410
- var STATE_IDENTIFY = 0;
411
- var STATE_PARSE = 1;
412
- var STATE_IGNORE = 2;
413
- var IDENTIFY_RE = new RegExp("^\\s{0," + MAX_DATA_LENGTH + "}(?:<|$)");
414
- module.exports = function() {
415
- var state = STATE_IDENTIFY;
416
- var data_len = 0;
417
- var str = "";
418
- var parser = new Transform({
419
- readableObjectMode: true,
420
- transform: function(chunk, encoding, next) {
421
- if (state !== STATE_IGNORE) {
422
- data_len += chunk.length;
423
- str += chunk.toString();
424
- if (str.length > MAX_DATA_LENGTH) str = str.slice(0, MAX_DATA_LENGTH);
425
- }
426
- switch (state) {
427
- case STATE_IDENTIFY:
428
- if (!IDENTIFY_RE.test(str)) {
429
- state = STATE_IGNORE;
430
- parser.push(null);
431
- break;
432
- }
433
- if (str.indexOf("<") === -1) {
434
- if (data_len > MAX_DATA_LENGTH) {
435
- state = STATE_IGNORE;
436
- parser.push(null);
437
- }
438
- break;
439
- }
440
- state = STATE_PARSE;
441
- case STATE_PARSE:
442
- if (chunk.indexOf(62) !== -1) {
443
- var result = parseSvgHeader(str);
444
- if (result) {
445
- state = STATE_IGNORE;
446
- parser.push(result);
447
- parser.push(null);
448
- break;
449
- }
450
- }
451
- if (data_len > MAX_DATA_LENGTH) {
452
- state = STATE_IGNORE;
453
- parser.push(null);
12
+ var NEED_MORE = require_dist.require_utils().NEED_MORE;
13
+ function wrapParser(Parser) {
14
+ return function() {
15
+ var parser = new Parser();
16
+ return new Transform({
17
+ readableObjectMode: true,
18
+ transform: function(chunk, encoding, next) {
19
+ if (parser.getStatus() === NEED_MORE) {
20
+ parser.push(chunk);
21
+ if (parser.getStatus() !== NEED_MORE) {
22
+ var result = parser.getResult();
23
+ if (result) this.push(result);
24
+ this.push(null);
454
25
  }
455
- }
456
- next();
457
- },
458
- flush: function() {
459
- state = STATE_IGNORE;
460
- parser.push(null);
461
- }
462
- });
463
- return parser;
464
- };
465
- }));
466
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/tiff.js
467
- var require_tiff = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
468
- var ParserStream = require_dist.require_common().ParserStream;
469
- var str2arr = require_dist.require_common().str2arr;
470
- var sliceEq = require_dist.require_common().sliceEq;
471
- var SIG_1 = str2arr("II*\0");
472
- var SIG_2 = str2arr("MM\0*");
473
- function readUInt16(buffer, offset, is_big_endian) {
474
- return is_big_endian ? buffer.readUInt16BE(offset) : buffer.readUInt16LE(offset);
475
- }
476
- function readUInt32(buffer, offset, is_big_endian) {
477
- return is_big_endian ? buffer.readUInt32BE(offset) : buffer.readUInt32LE(offset);
478
- }
479
- function readIFDValue(data, data_offset, is_big_endian) {
480
- var type = readUInt16(data, data_offset + 2, is_big_endian);
481
- if (readUInt32(data, data_offset + 4, is_big_endian) !== 1 || type !== 3 && type !== 4) return null;
482
- if (type === 3) return readUInt16(data, data_offset + 8, is_big_endian);
483
- return readUInt32(data, data_offset + 8, is_big_endian);
484
- }
485
- module.exports = function() {
486
- var parser = new ParserStream();
487
- parser._bytes(8, function(data) {
488
- if (!sliceEq(data, 0, SIG_1) && !sliceEq(data, 0, SIG_2)) {
489
- parser._skipBytes(Infinity);
490
- parser.push(null);
491
- return;
492
- }
493
- var is_big_endian = data[0] === 77;
494
- var count = readUInt32(data, 4, is_big_endian) - 8;
495
- if (count < 0) {
496
- parser._skipBytes(Infinity);
497
- parser.push(null);
498
- return;
499
- }
500
- function safeSkip(parser, count, callback) {
501
- if (count === 0) {
502
- callback();
503
- return;
504
- }
505
- parser._skipBytes(count, callback);
506
- }
507
- safeSkip(parser, count, function() {
508
- parser._bytes(2, function(data) {
509
- var ifd_size = readUInt16(data, 0, is_big_endian) * 12;
510
- if (ifd_size <= 0) {
511
- parser._skipBytes(Infinity);
512
- parser.push(null);
513
- return;
514
26
  }
515
- parser._bytes(ifd_size, function(data) {
516
- parser._skipBytes(Infinity);
517
- var i = 0, width, height, tag;
518
- for (; i < ifd_size; i += 12) {
519
- tag = readUInt16(data, i, is_big_endian);
520
- if (tag === 256) width = readIFDValue(data, i, is_big_endian);
521
- else if (tag === 257) height = readIFDValue(data, i, is_big_endian);
522
- }
523
- if (width && height) parser.push({
524
- width,
525
- height,
526
- type: "tiff",
527
- mime: "image/tiff",
528
- wUnits: "px",
529
- hUnits: "px"
530
- });
531
- parser.push(null);
532
- });
533
- });
534
- });
535
- });
536
- return parser;
537
- };
538
- }));
539
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parse_stream/webp.js
540
- var require_webp = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
541
- var ParserStream = require_dist.require_common().ParserStream;
542
- var str2arr = require_dist.require_common().str2arr;
543
- var sliceEq = require_dist.require_common().sliceEq;
544
- var exif = require_dist.require_exif_utils();
545
- var SIG_RIFF = str2arr("RIFF");
546
- var SIG_WEBP = str2arr("WEBP");
547
- function safeSkip(parser, count, callback) {
548
- if (count === 0) {
549
- callback();
550
- return;
551
- }
552
- parser._skipBytes(count, callback);
553
- }
554
- function parseVP8(parser, length, sandbox) {
555
- parser._bytes(10, function(data) {
556
- if (data[3] === 157 && data[4] === 1 && data[5] === 42) sandbox.result = sandbox.result || {
557
- width: data.readUInt16LE(6) & 16383,
558
- height: data.readUInt16LE(8) & 16383,
559
- type: "webp",
560
- mime: "image/webp",
561
- wUnits: "px",
562
- hUnits: "px"
563
- };
564
- safeSkip(parser, length - 10, function() {
565
- sandbox.offset += length;
566
- getWebpSize(parser, sandbox);
567
- });
568
- });
569
- }
570
- function parseVP8L(parser, length, sandbox) {
571
- parser._bytes(5, function(data) {
572
- if (data[0] === 47) {
573
- var bits = data.readUInt32LE(1);
574
- sandbox.result = sandbox.result || {
575
- width: (bits & 16383) + 1,
576
- height: (bits >> 14 & 16383) + 1,
577
- type: "webp",
578
- mime: "image/webp",
579
- wUnits: "px",
580
- hUnits: "px"
581
- };
582
- }
583
- safeSkip(parser, length - 5, function() {
584
- sandbox.offset += length;
585
- getWebpSize(parser, sandbox);
586
- });
587
- });
588
- }
589
- function parseVP8X(parser, length, sandbox) {
590
- parser._bytes(10, function(data) {
591
- sandbox.result = sandbox.result || {
592
- width: (data[6] << 16 | data[5] << 8 | data[4]) + 1,
593
- height: (data[9] << 16 | data[8] << 8 | data[7]) + 1,
594
- type: "webp",
595
- mime: "image/webp",
596
- wUnits: "px",
597
- hUnits: "px"
598
- };
599
- safeSkip(parser, length - 10, function() {
600
- sandbox.offset += length;
601
- getWebpSize(parser, sandbox);
602
- });
603
- });
604
- }
605
- function parseExif(parser, length, sandbox) {
606
- parser._bytes(length, function(data) {
607
- sandbox.offset = Infinity;
608
- sandbox.exif_orientation = exif.get_orientation(data);
609
- getWebpSize(parser, sandbox);
610
- });
611
- }
612
- function getWebpSize(parser, sandbox) {
613
- if (sandbox.fileLength - 8 <= sandbox.offset) {
614
- parser._skipBytes(Infinity);
615
- if (sandbox.result) {
616
- var result = sandbox.result;
617
- if (sandbox.exif_orientation > 0) result.orientation = sandbox.exif_orientation;
618
- parser.push(result);
619
- }
620
- parser.push(null);
621
- return;
622
- }
623
- parser._bytes(4 - sandbox.bufferedChunkHeader.length, function(data) {
624
- sandbox.offset += 4 - sandbox.bufferedChunkHeader.length;
625
- var header = sandbox.bufferedChunkHeader + String.fromCharCode.apply(null, data);
626
- header = header.replace(/^\0+/, "");
627
- if (header.length < 4) {
628
- sandbox.bufferedChunkHeader = header;
629
- getWebpSize(parser, sandbox);
630
- return;
631
- }
632
- sandbox.bufferedChunkHeader = "";
633
- parser._bytes(4, function(data) {
634
- sandbox.offset += 4;
635
- var length = data.readUInt32LE(0);
636
- if (header === "VP8 " && length >= 10) parseVP8(parser, length, sandbox);
637
- else if (header === "VP8L" && length >= 5) parseVP8L(parser, length, sandbox);
638
- else if (header === "VP8X" && length >= 10) parseVP8X(parser, length, sandbox);
639
- else if (header === "EXIF" && length >= 4) parseExif(parser, length, sandbox);
640
- else safeSkip(parser, length, function() {
641
- sandbox.offset += length;
642
- getWebpSize(parser, sandbox);
643
- });
27
+ next();
28
+ },
29
+ flush: function(next) {
30
+ if (parser.getStatus() === NEED_MORE) {
31
+ var result = parser.getResult();
32
+ if (result) this.push(result);
33
+ }
34
+ next();
35
+ }
644
36
  });
645
- });
37
+ };
646
38
  }
647
- module.exports = function() {
648
- var parser = new ParserStream();
649
- parser._bytes(12, function(data) {
650
- if (sliceEq(data, 0, SIG_RIFF) && sliceEq(data, 8, SIG_WEBP)) getWebpSize(parser, {
651
- fileLength: data.readUInt32LE(4) + 8,
652
- offset: 12,
653
- exif_orientation: 0,
654
- bufferedChunkHeader: ""
655
- });
656
- else {
657
- parser._skipBytes(Infinity);
658
- parser.push(null);
659
- }
660
- });
661
- return parser;
662
- };
663
- }));
664
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/lib/parsers_stream.js
665
- var require_parsers_stream = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
666
39
  module.exports = {
667
- avif: require_avif(),
668
- bmp: require_bmp(),
669
- gif: require_gif(),
670
- ico: require_ico(),
671
- jpeg: require_jpeg(),
672
- png: require_png(),
673
- psd: require_psd(),
674
- svg: require_svg(),
675
- tiff: require_tiff(),
676
- webp: require_webp()
40
+ avif: wrapParser(require_dist.require_avif().Parser),
41
+ bmp: wrapParser(require_dist.require_bmp().Parser),
42
+ gif: wrapParser(require_dist.require_gif().Parser),
43
+ ico: wrapParser(require_dist.require_ico().Parser),
44
+ jpeg: wrapParser(require_dist.require_jpeg().Parser),
45
+ png: wrapParser(require_dist.require_png().Parser),
46
+ psd: wrapParser(require_dist.require_psd().Parser),
47
+ svg: wrapParser(require_dist.require_svg().Parser),
48
+ tiff: wrapParser(require_dist.require_tiff().Parser),
49
+ webp: wrapParser(require_dist.require_webp().Parser)
677
50
  };
678
51
  }));
679
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/stream.js
52
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.5.0/48b233d456459b962cf37bbd06a4253dee16b693cf4ae8fcea86928b192810e1/node_modules/probe-image-size/stream.js
680
53
  var require_stream = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
681
- var ProbeError = require_dist.require_common().ProbeError;
54
+ var ProbeError = require_dist.require_utils().ProbeError;
682
55
  var parsers = require_parsers_stream();
683
56
  var PassThrough = require("stream").PassThrough;
684
57
  var pipeline = require("stream").pipeline;
@@ -691,7 +64,7 @@ var require_stream = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
691
64
  var alive_parsers = [];
692
65
  var last_error;
693
66
  function parserEnd(err) {
694
- var idx = alive_parsers.indexOf[this];
67
+ var idx = alive_parsers.indexOf(this);
695
68
  /* istanbul ignore if */
696
69
  if (idx < 0) return;
697
70
  /* istanbul ignore if */
@@ -13785,11 +13158,11 @@ var require_lodash_merge = /* @__PURE__ */ require_rolldown_runtime.__commonJSMi
13785
13158
  }
13786
13159
  module.exports = merge;
13787
13160
  }));
13788
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/package.json
13161
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.5.0/48b233d456459b962cf37bbd06a4253dee16b693cf4ae8fcea86928b192810e1/node_modules/probe-image-size/package.json
13789
13162
  var require_package = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
13790
13163
  module.exports = {
13791
13164
  "name": "probe-image-size",
13792
- "version": "7.4.0",
13165
+ "version": "7.5.0",
13793
13166
  "description": "Get image size without full download (JPG, GIF, PNG, WebP, BMP, TIFF, PSD)",
13794
13167
  "keywords": [
13795
13168
  "image",
@@ -13828,19 +13201,18 @@ var require_package = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((e
13828
13201
  },
13829
13202
  "dependencies": {
13830
13203
  "lodash.merge": "^4.6.2",
13831
- "needle": "^2.5.2",
13832
- "stream-parser": "~0.3.1"
13204
+ "needle": "^2.5.2"
13833
13205
  },
13834
13206
  "devDependencies": {
13835
- "c8": "^11.0.0",
13836
- "eslint": "^9.39.4",
13837
- "neostandard": "^0.13.0"
13207
+ "c8": "^12.0.0",
13208
+ "eslint": "^10.13.0",
13209
+ "neostandard": "^0.14.1"
13838
13210
  }
13839
13211
  };
13840
13212
  }));
13841
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/http.js
13213
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.5.0/48b233d456459b962cf37bbd06a4253dee16b693cf4ae8fcea86928b192810e1/node_modules/probe-image-size/http.js
13842
13214
  var require_http = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
13843
- var ProbeError = require_dist.require_common().ProbeError;
13215
+ var ProbeError = require_dist.require_utils().ProbeError;
13844
13216
  var needle = require_needle();
13845
13217
  var lodashMerge = require_lodash_merge();
13846
13218
  var pkg = require_package();
@@ -13912,7 +13284,7 @@ var require_http = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((expo
13912
13284
  };
13913
13285
  module.exports.parsers = require_parsers_stream();
13914
13286
  }));
13915
- // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.4.0/f69b9b4fcba47e3caec204c2c2fb06128584c44c9c217acf2bb0f3ce5286d00b/node_modules/probe-image-size/index.js
13287
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/probe-image-size/7.5.0/48b233d456459b962cf37bbd06a4253dee16b693cf4ae8fcea86928b192810e1/node_modules/probe-image-size/index.js
13916
13288
  var require_probe_image_size = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
13917
13289
  var probeStream = require_stream();
13918
13290
  var probeHttp = require_http();
@@ -13922,7 +13294,7 @@ var require_probe_image_size = /* @__PURE__ */ require_rolldown_runtime.__common
13922
13294
  };
13923
13295
  module.exports.parsers = require_parsers_stream();
13924
13296
  module.exports.sync = require_dist.require_sync();
13925
- module.exports.Error = require_dist.require_common().ProbeError;
13297
+ module.exports.Error = require_dist.require_utils().ProbeError;
13926
13298
  }));
13927
13299
  Object.defineProperty(exports, "default", {
13928
13300
  enumerable: true,
@@ -13931,4 +13303,4 @@ Object.defineProperty(exports, "default", {
13931
13303
  }
13932
13304
  });
13933
13305
 
13934
- //# sourceMappingURL=probe-image-size-DqKTuApZ.cjs.map
13306
+ //# sourceMappingURL=probe-image-size-BIZUe8Bp.cjs.map