@zuplo/cli 7.15.17 → 7.15.18

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.
@@ -201,7 +201,11 @@ const toRequestError = (e) => {
201
201
  return new RequestError(e.message, { cause: e });
202
202
  };
203
203
  const GlobalRequest = global.Request;
204
- var Request$1 = class extends GlobalRequest {
204
+ var Request$1 = class Request$1 extends GlobalRequest {
205
+ static [Symbol.hasInstance](instance) {
206
+ if (this === Request$1) return instance instanceof GlobalRequest || Function.prototype[Symbol.hasInstance].call(this, instance);
207
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
208
+ }
205
209
  constructor(input, options) {
206
210
  if (typeof input === "object" && getRequestCache in input) {
207
211
  const hasReplacementBody = options !== void 0 && "body" in options && options.body != null;
@@ -240,8 +244,8 @@ const readBodyBufferedBeforeDisconnect = (incoming, chunks) => {
240
244
  else if (incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey] !== void 0 && incoming.readableLength !== incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey]) result = newBodyUnusableError();
241
245
  else {
242
246
  const bodyChunks = chunks ?? [];
243
- const chunk = incoming.read();
244
- if (chunk !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
247
+ let chunk;
248
+ while ((chunk = incoming.read()) !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
245
249
  const buffer = bodyChunks.length === 1 ? bodyChunks[0] : Buffer.concat(bodyChunks);
246
250
  result = buffer;
247
251
  const contentLength = incoming.headers["content-length"];
@@ -579,6 +583,9 @@ Object.defineProperty(requestPrototype, "blob", { value: function() {
579
583
  return new Response(buf, init).blob();
580
584
  });
581
585
  } });
586
+ Object.defineProperty(requestPrototype, "bytes", { value: function() {
587
+ return this.arrayBuffer().then((buf) => new Uint8Array(buf));
588
+ } });
582
589
  Object.defineProperty(requestPrototype, "json", { value: function() {
583
590
  if (this[bodyConsumedDirectlyKey]) return rejectBodyUnusable();
584
591
  return this.text().then(JSON.parse);
@@ -636,6 +643,10 @@ const GlobalResponse = global.Response;
636
643
  var Response$1 = class Response$1 {
637
644
  #body;
638
645
  #init;
646
+ static [Symbol.hasInstance](instance) {
647
+ if (this === Response$1) return instance instanceof GlobalResponse || Function.prototype[Symbol.hasInstance].call(this, instance);
648
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
649
+ }
639
650
  [getResponseCache]() {
640
651
  const cache = this[cacheKey];
641
652
  const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
@@ -656,7 +667,7 @@ var Response$1 = class Response$1 {
656
667
  this[getResponseCache]();
657
668
  return;
658
669
  }
659
- this.#init = init instanceof Response$1 ? init.#init : init;
670
+ this.#init = #init in init ? init.#init : init;
660
671
  headers = new Headers(init.headers);
661
672
  } else this.#init = init;
662
673
  if (body == null || typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) this[cacheKey] = [
@@ -697,6 +708,7 @@ var Response$1 = class Response$1 {
697
708
  [
698
709
  "arrayBuffer",
699
710
  "blob",
711
+ "bytes",
700
712
  "clone",
701
713
  "formData",
702
714
  "json",
@@ -200,7 +200,11 @@ const toRequestError = (e) => {
200
200
  return new RequestError(e.message, { cause: e });
201
201
  };
202
202
  const GlobalRequest = global.Request;
203
- var Request$1 = class extends GlobalRequest {
203
+ var Request$1 = class Request$1 extends GlobalRequest {
204
+ static [Symbol.hasInstance](instance) {
205
+ if (this === Request$1) return instance instanceof GlobalRequest || Function.prototype[Symbol.hasInstance].call(this, instance);
206
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
207
+ }
204
208
  constructor(input, options) {
205
209
  if (typeof input === "object" && getRequestCache in input) {
206
210
  const hasReplacementBody = options !== void 0 && "body" in options && options.body != null;
@@ -239,8 +243,8 @@ const readBodyBufferedBeforeDisconnect = (incoming, chunks) => {
239
243
  else if (incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey] !== void 0 && incoming.readableLength !== incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey]) result = newBodyUnusableError();
240
244
  else {
241
245
  const bodyChunks = chunks ?? [];
242
- const chunk = incoming.read();
243
- if (chunk !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
246
+ let chunk;
247
+ while ((chunk = incoming.read()) !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
244
248
  const buffer = bodyChunks.length === 1 ? bodyChunks[0] : Buffer.concat(bodyChunks);
245
249
  result = buffer;
246
250
  const contentLength = incoming.headers["content-length"];
@@ -578,6 +582,9 @@ Object.defineProperty(requestPrototype, "blob", { value: function() {
578
582
  return new Response(buf, init).blob();
579
583
  });
580
584
  } });
585
+ Object.defineProperty(requestPrototype, "bytes", { value: function() {
586
+ return this.arrayBuffer().then((buf) => new Uint8Array(buf));
587
+ } });
581
588
  Object.defineProperty(requestPrototype, "json", { value: function() {
582
589
  if (this[bodyConsumedDirectlyKey]) return rejectBodyUnusable();
583
590
  return this.text().then(JSON.parse);
@@ -635,6 +642,10 @@ const GlobalResponse = global.Response;
635
642
  var Response$1 = class Response$1 {
636
643
  #body;
637
644
  #init;
645
+ static [Symbol.hasInstance](instance) {
646
+ if (this === Response$1) return instance instanceof GlobalResponse || Function.prototype[Symbol.hasInstance].call(this, instance);
647
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
648
+ }
638
649
  [getResponseCache]() {
639
650
  const cache = this[cacheKey];
640
651
  const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
@@ -655,7 +666,7 @@ var Response$1 = class Response$1 {
655
666
  this[getResponseCache]();
656
667
  return;
657
668
  }
658
- this.#init = init instanceof Response$1 ? init.#init : init;
669
+ this.#init = #init in init ? init.#init : init;
659
670
  headers = new Headers(init.headers);
660
671
  } else this.#init = init;
661
672
  if (body == null || typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) this[cacheKey] = [
@@ -696,6 +707,7 @@ var Response$1 = class Response$1 {
696
707
  [
697
708
  "arrayBuffer",
698
709
  "blob",
710
+ "bytes",
699
711
  "clone",
700
712
  "formData",
701
713
  "json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/node-server",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "description": "Node.js Adapter for Hono",
5
5
  "main": "dist/index.mjs",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "7.15.17",
3
+ "version": "7.15.18",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/graphql",
3
3
  "type": "module",
4
- "version": "7.15.17",
4
+ "version": "7.15.18",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -2,7 +2,7 @@
2
2
  "name": "@zuplo/openapi-tools",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "7.15.17",
5
+ "version": "7.15.18",
6
6
  "description": "Tooling for OpenAPI files",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/otel",
3
3
  "type": "module",
4
- "version": "7.15.17",
4
+ "version": "7.15.18",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.15.17",
4
+ "version": "7.15.18",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -1,11 +1,26 @@
1
- 2.2.0 / 2025-03-26
2
- ==================
1
+ 2.3.0
2
+ =====
3
+
4
+ * Add `router.listRoutes()` to list the registered routes
5
+ * Add `diagnostics_channel` tracing through the `express.router.request` `TracingChannel`
6
+ - Traces request handlers, error handlers and `router.param()` callbacks
7
+ - Exposes the matched route pattern as `route` on the tracing context
8
+ * Add TypeScript declarations for `Router` and `Route`
9
+ * perf: skip decoding route parameters without `%`
10
+ * Set `err.statusCode` to 400 for malformed route parameters
11
+ * Fix `req.url` losing the path separator when a mounted layer rewrites it
12
+ * Keep layer match results local to each request
13
+ - The internal `Layer` no longer stores `keys`, `params` or `path`
14
+ - The internal `layer.match()` returns `{ params, path, keys, pattern }` or `false` instead of a boolean
15
+
16
+ 2.2.0
17
+ =====
3
18
 
4
19
  * Remove `setImmediate` support check
5
20
  * Restore `debug` dependency
6
21
 
7
- 2.1.0 / 2025-02-10
8
- ==================
22
+ 2.1.0
23
+ =====
9
24
 
10
25
  * Updated `engines` field to Node@18 or higher
11
26
  * Remove `Object.setPrototypeOf` polyfill
@@ -16,8 +31,8 @@
16
31
  * Replace `utils-merge` dependency with `Object.assign`
17
32
  * deps: Remove unused dep `after`
18
33
 
19
- 2.0.0 / 2024-09-09
20
- ==================
34
+ 2.0.0
35
+ =====
21
36
 
22
37
  * Drop support for node <18
23
38
  * deps: path-to-regexp@^8.0.0
@@ -29,15 +44,15 @@
29
44
  - `:name+` becomes `*name` and thus equivalent to `*name` so I dropped those tests
30
45
  - Strings as regular expressions are fully removed, need to be converted to native regular expressions
31
46
 
32
- 2.0.0-beta.2 / 2024-03-20
33
- =========================
47
+ 2.0.0-beta.2
48
+ ============
34
49
 
35
50
  This incorporates all changes after 1.3.5 up to 1.3.8.
36
51
 
37
52
  * Add support for returned, rejected Promises to `router.param`
38
53
 
39
- 2.0.0-beta.1 / 2020-03-29
40
- =========================
54
+ 2.0.0-beta.1
55
+ ============
41
56
 
42
57
  This incorporates all changes after 1.3.3 up to 1.3.5.
43
58
 
@@ -60,8 +75,8 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
60
75
  `/foo/*/bar` will match a literal `*` as the middle segment.
61
76
  * deps: setprototypeof@1.2.0
62
77
 
63
- 2.0.0-alpha.1 / 2018-07-27
64
- ==========================
78
+ 2.0.0-alpha.1
79
+ =============
65
80
 
66
81
  * Add basic support for returned, rejected Promises
67
82
  - Rejected Promises from middleware functions `next(error)`
@@ -73,42 +88,42 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
73
88
  - Remove `DEBUG_FD` environment variable support
74
89
  - Support 256 namespace colors
75
90
 
76
- 1.3.8 / 2023-02-24
77
- ==================
91
+ 1.3.8
92
+ =====
78
93
 
79
94
  * Fix routing requests without method
80
95
 
81
- 1.3.7 / 2022-04-28
82
- ==================
96
+ 1.3.7
97
+ =====
83
98
 
84
99
  * Fix hanging on large stack of sync routes
85
100
 
86
- 1.3.6 / 2021-11-15
87
- ==================
101
+ 1.3.6
102
+ =====
88
103
 
89
104
  * Fix handling very large stacks of sync middleware
90
105
  * deps: safe-buffer@5.2.1
91
106
 
92
- 1.3.5 / 2020-03-24
93
- ==================
107
+ 1.3.5
108
+ =====
94
109
 
95
110
  * Fix incorrect middleware execution with unanchored `RegExp`s
96
111
  * perf: use plain object for internal method map
97
112
 
98
- 1.3.4 / 2020-01-24
99
- ==================
113
+ 1.3.4
114
+ =====
100
115
 
101
116
  * deps: array-flatten@3.0.0
102
117
  * deps: parseurl@~1.3.3
103
118
  * deps: setprototypeof@1.2.0
104
119
 
105
- 1.3.3 / 2018-07-06
106
- ==================
120
+ 1.3.3
121
+ =====
107
122
 
108
123
  * Fix JSDoc for `Router` constructor
109
124
 
110
- 1.3.2 / 2017-09-24
111
- ==================
125
+ 1.3.2
126
+ =====
112
127
 
113
128
  * deps: debug@2.6.9
114
129
  * deps: parseurl@~1.3.2
@@ -117,15 +132,15 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
117
132
  * deps: setprototypeof@1.1.0
118
133
  * deps: utils-merge@1.0.1
119
134
 
120
- 1.3.1 / 2017-05-19
121
- ==================
135
+ 1.3.1
136
+ =====
122
137
 
123
138
  * deps: debug@2.6.8
124
139
  - Fix `DEBUG_MAX_ARRAY_LENGTH`
125
140
  - deps: ms@2.0.0
126
141
 
127
- 1.3.0 / 2017-02-25
128
- ==================
142
+ 1.3.0
143
+ =====
129
144
 
130
145
  * Add `next("router")` to exit from router
131
146
  * Fix case where `router.use` skipped requests routes did not
@@ -133,8 +148,8 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
133
148
  * deps: setprototypeof@1.0.3
134
149
  * perf: add fast match path for `*` route
135
150
 
136
- 1.2.0 / 2017-02-17
137
- ==================
151
+ 1.2.0
152
+ =====
138
153
 
139
154
  * Skip routing when `req.url` is not set
140
155
  * deps: debug@2.6.1
@@ -144,15 +159,15 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
144
159
  - Use same color for same namespace
145
160
  - deps: ms@0.7.2
146
161
 
147
- 1.1.5 / 2017-01-28
148
- ==================
162
+ 1.1.5
163
+ =====
149
164
 
150
165
  * deps: array-flatten@2.1.1
151
166
  * deps: setprototypeof@1.0.2
152
167
  - Fix using fallback even when native method exists
153
168
 
154
- 1.1.4 / 2016-01-21
155
- ==================
169
+ 1.1.4
170
+ =====
156
171
 
157
172
  * deps: array-flatten@2.0.0
158
173
  * deps: methods@~1.1.2
@@ -160,8 +175,8 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
160
175
  * deps: parseurl@~1.3.1
161
176
  - perf: enable strict mode
162
177
 
163
- 1.1.3 / 2015-08-02
164
- ==================
178
+ 1.1.3
179
+ =====
165
180
 
166
181
  * Fix infinite loop condition using `mergeParams: true`
167
182
  * Fix inner numeric indices incorrectly altering parent `req.params`
@@ -170,8 +185,8 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
170
185
  * deps: path-to-regexp@0.1.7
171
186
  - Fix regression with escaped round brackets and matching groups
172
187
 
173
- 1.1.2 / 2015-07-06
174
- ==================
188
+ 1.1.2
189
+ =====
175
190
 
176
191
  * Fix hiding platform issues with `decodeURIComponent`
177
192
  - Only `URIError`s are a 400
@@ -183,31 +198,31 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
183
198
  * perf: skip attempting to decode zero length string
184
199
  * perf: use plain for loops
185
200
 
186
- 1.1.1 / 2015-05-25
187
- ==================
201
+ 1.1.1
202
+ =====
188
203
 
189
204
  * Fix issue where `next('route')` in `router.param` would incorrectly skip values
190
205
  * deps: array-flatten@1.1.0
191
206
  * deps: debug@~2.2.0
192
207
  - deps: ms@0.7.1
193
208
 
194
- 1.1.0 / 2015-04-22
195
- ==================
209
+ 1.1.0
210
+ =====
196
211
 
197
212
  * Use `setprototypeof` instead of `__proto__`
198
213
  * deps: debug@~2.1.3
199
214
  - Fix high intensity foreground color for bold
200
215
  - deps: ms@0.7.0
201
216
 
202
- 1.0.0 / 2015-01-13
203
- ==================
217
+ 1.0.0
218
+ =====
204
219
 
205
220
  * Fix crash from error within `OPTIONS` response handler
206
221
  * deps: array-flatten@1.0.2
207
222
  - Remove redundant code path
208
223
 
209
- 1.0.0-beta.3 / 2015-01-11
210
- =========================
224
+ 1.0.0-beta.3
225
+ ============
211
226
 
212
227
  * Fix duplicate methods appearing in OPTIONS responses
213
228
  * Fix OPTIONS responses to include the HEAD method properly
@@ -216,13 +231,13 @@ This incorporates all changes after 1.3.3 up to 1.3.5.
216
231
  * deps: debug@~2.1.1
217
232
  * deps: methods@~1.1.1
218
233
 
219
- 1.0.0-beta.2 / 2014-11-19
220
- =========================
234
+ 1.0.0-beta.2
235
+ ============
221
236
 
222
237
  * Match routes iteratively to prevent stack overflows
223
238
 
224
- 1.0.0-beta.1 / 2014-11-16
225
- =========================
239
+ 1.0.0-beta.1
240
+ ============
226
241
 
227
242
  * Initial release ported from Express 4.x
228
243
  - Altered to work without Express