@vercel/routing-utils 1.11.4-canary.3 → 1.12.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.
package/dist/schemas.d.ts CHANGED
@@ -89,6 +89,9 @@ export declare const routesSchema: {
89
89
  readonly maxLength: 32;
90
90
  };
91
91
  };
92
+ readonly caseSensitive: {
93
+ readonly type: "boolean";
94
+ };
92
95
  readonly important: {
93
96
  readonly type: "boolean";
94
97
  };
@@ -145,20 +148,7 @@ export declare const routesSchema: {
145
148
  };
146
149
  };
147
150
  readonly middleware: {
148
- readonly type: "object";
149
- readonly required: readonly ["id", "type"];
150
- readonly additionalProperties: false;
151
- readonly properties: {
152
- readonly id: {
153
- readonly type: "string";
154
- readonly maxLength: 256;
155
- };
156
- readonly type: {
157
- readonly type: "string";
158
- readonly maxLength: 32;
159
- readonly enum: readonly ["v8-worker"];
160
- };
161
- };
151
+ readonly type: "number";
162
152
  };
163
153
  readonly has: {
164
154
  readonly description: "An array of requirements that are needed to match";
@@ -205,6 +195,51 @@ export declare const routesSchema: {
205
195
  }];
206
196
  };
207
197
  };
198
+ readonly missing: {
199
+ readonly description: "An array of requirements that are needed to match";
200
+ readonly type: "array";
201
+ readonly maxItems: 16;
202
+ readonly items: {
203
+ readonly anyOf: readonly [{
204
+ readonly type: "object";
205
+ readonly additionalProperties: false;
206
+ readonly required: readonly ["type", "value"];
207
+ readonly properties: {
208
+ readonly type: {
209
+ readonly description: "The type of request element to check";
210
+ readonly type: "string";
211
+ readonly enum: readonly ["host"];
212
+ };
213
+ readonly value: {
214
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
215
+ readonly type: "string";
216
+ readonly maxLength: 4096;
217
+ };
218
+ };
219
+ }, {
220
+ readonly type: "object";
221
+ readonly additionalProperties: false;
222
+ readonly required: readonly ["type", "key"];
223
+ readonly properties: {
224
+ readonly type: {
225
+ readonly description: "The type of request element to check";
226
+ readonly type: "string";
227
+ readonly enum: readonly ["header", "cookie", "query"];
228
+ };
229
+ readonly key: {
230
+ readonly description: "The name of the element contained in the particular type";
231
+ readonly type: "string";
232
+ readonly maxLength: 4096;
233
+ };
234
+ readonly value: {
235
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
236
+ readonly type: "string";
237
+ readonly maxLength: 4096;
238
+ };
239
+ };
240
+ }];
241
+ };
242
+ };
208
243
  };
209
244
  }, {
210
245
  readonly type: "object";
@@ -284,6 +319,51 @@ export declare const rewritesSchema: {
284
319
  }];
285
320
  };
286
321
  };
322
+ readonly missing: {
323
+ readonly description: "An array of requirements that are needed to match";
324
+ readonly type: "array";
325
+ readonly maxItems: 16;
326
+ readonly items: {
327
+ readonly anyOf: readonly [{
328
+ readonly type: "object";
329
+ readonly additionalProperties: false;
330
+ readonly required: readonly ["type", "value"];
331
+ readonly properties: {
332
+ readonly type: {
333
+ readonly description: "The type of request element to check";
334
+ readonly type: "string";
335
+ readonly enum: readonly ["host"];
336
+ };
337
+ readonly value: {
338
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
339
+ readonly type: "string";
340
+ readonly maxLength: 4096;
341
+ };
342
+ };
343
+ }, {
344
+ readonly type: "object";
345
+ readonly additionalProperties: false;
346
+ readonly required: readonly ["type", "key"];
347
+ readonly properties: {
348
+ readonly type: {
349
+ readonly description: "The type of request element to check";
350
+ readonly type: "string";
351
+ readonly enum: readonly ["header", "cookie", "query"];
352
+ };
353
+ readonly key: {
354
+ readonly description: "The name of the element contained in the particular type";
355
+ readonly type: "string";
356
+ readonly maxLength: 4096;
357
+ };
358
+ readonly value: {
359
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
360
+ readonly type: "string";
361
+ readonly maxLength: 4096;
362
+ };
363
+ };
364
+ }];
365
+ };
366
+ };
287
367
  };
288
368
  };
289
369
  };
@@ -362,6 +442,51 @@ export declare const redirectsSchema: {
362
442
  }];
363
443
  };
364
444
  };
445
+ readonly missing: {
446
+ readonly description: "An array of requirements that are needed to match";
447
+ readonly type: "array";
448
+ readonly maxItems: 16;
449
+ readonly items: {
450
+ readonly anyOf: readonly [{
451
+ readonly type: "object";
452
+ readonly additionalProperties: false;
453
+ readonly required: readonly ["type", "value"];
454
+ readonly properties: {
455
+ readonly type: {
456
+ readonly description: "The type of request element to check";
457
+ readonly type: "string";
458
+ readonly enum: readonly ["host"];
459
+ };
460
+ readonly value: {
461
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
462
+ readonly type: "string";
463
+ readonly maxLength: 4096;
464
+ };
465
+ };
466
+ }, {
467
+ readonly type: "object";
468
+ readonly additionalProperties: false;
469
+ readonly required: readonly ["type", "key"];
470
+ readonly properties: {
471
+ readonly type: {
472
+ readonly description: "The type of request element to check";
473
+ readonly type: "string";
474
+ readonly enum: readonly ["header", "cookie", "query"];
475
+ };
476
+ readonly key: {
477
+ readonly description: "The name of the element contained in the particular type";
478
+ readonly type: "string";
479
+ readonly maxLength: 4096;
480
+ };
481
+ readonly value: {
482
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
483
+ readonly type: "string";
484
+ readonly maxLength: 4096;
485
+ };
486
+ };
487
+ }];
488
+ };
489
+ };
365
490
  };
366
491
  };
367
492
  };
@@ -444,6 +569,51 @@ export declare const headersSchema: {
444
569
  }];
445
570
  };
446
571
  };
572
+ readonly missing: {
573
+ readonly description: "An array of requirements that are needed to match";
574
+ readonly type: "array";
575
+ readonly maxItems: 16;
576
+ readonly items: {
577
+ readonly anyOf: readonly [{
578
+ readonly type: "object";
579
+ readonly additionalProperties: false;
580
+ readonly required: readonly ["type", "value"];
581
+ readonly properties: {
582
+ readonly type: {
583
+ readonly description: "The type of request element to check";
584
+ readonly type: "string";
585
+ readonly enum: readonly ["host"];
586
+ };
587
+ readonly value: {
588
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
589
+ readonly type: "string";
590
+ readonly maxLength: 4096;
591
+ };
592
+ };
593
+ }, {
594
+ readonly type: "object";
595
+ readonly additionalProperties: false;
596
+ readonly required: readonly ["type", "key"];
597
+ readonly properties: {
598
+ readonly type: {
599
+ readonly description: "The type of request element to check";
600
+ readonly type: "string";
601
+ readonly enum: readonly ["header", "cookie", "query"];
602
+ };
603
+ readonly key: {
604
+ readonly description: "The name of the element contained in the particular type";
605
+ readonly type: "string";
606
+ readonly maxLength: 4096;
607
+ };
608
+ readonly value: {
609
+ readonly description: "A regular expression used to match the value. Named groups can be used in the destination";
610
+ readonly type: "string";
611
+ readonly maxLength: 4096;
612
+ };
613
+ };
614
+ }];
615
+ };
616
+ };
447
617
  };
448
618
  };
449
619
  };
package/dist/schemas.js CHANGED
@@ -93,6 +93,9 @@ exports.routesSchema = {
93
93
  maxLength: 32,
94
94
  },
95
95
  },
96
+ caseSensitive: {
97
+ type: 'boolean',
98
+ },
96
99
  important: {
97
100
  type: 'boolean',
98
101
  },
@@ -149,22 +152,10 @@ exports.routesSchema = {
149
152
  },
150
153
  },
151
154
  middleware: {
152
- type: 'object',
153
- required: ['id', 'type'],
154
- additionalProperties: false,
155
- properties: {
156
- id: {
157
- type: 'string',
158
- maxLength: 256,
159
- },
160
- type: {
161
- type: 'string',
162
- maxLength: 32,
163
- enum: ['v8-worker'],
164
- },
165
- },
155
+ type: 'number',
166
156
  },
167
157
  has: exports.hasSchema,
158
+ missing: exports.hasSchema,
168
159
  },
169
160
  },
170
161
  {
@@ -202,6 +193,7 @@ exports.rewritesSchema = {
202
193
  maxLength: 4096,
203
194
  },
204
195
  has: exports.hasSchema,
196
+ missing: exports.hasSchema,
205
197
  },
206
198
  },
207
199
  };
@@ -236,6 +228,7 @@ exports.redirectsSchema = {
236
228
  maximum: 999,
237
229
  },
238
230
  has: exports.hasSchema,
231
+ missing: exports.hasSchema,
239
232
  },
240
233
  },
241
234
  };
@@ -274,6 +267,7 @@ exports.headersSchema = {
274
267
  },
275
268
  },
276
269
  has: exports.hasSchema,
270
+ missing: exports.hasSchema,
277
271
  },
278
272
  },
279
273
  };
package/dist/types.d.ts CHANGED
@@ -24,18 +24,17 @@ export declare type Source = {
24
24
  methods?: string[];
25
25
  continue?: boolean;
26
26
  override?: boolean;
27
+ caseSensitive?: boolean;
27
28
  check?: boolean;
28
29
  important?: boolean;
29
30
  status?: number;
30
31
  has?: HasField;
32
+ missing?: HasField;
31
33
  locale?: {
32
34
  redirect?: Record<string, string>;
33
35
  cookie?: string;
34
36
  };
35
- middleware?: {
36
- id: string;
37
- type: 'v8-worker';
38
- };
37
+ middleware?: number;
39
38
  };
40
39
  export declare type Handler = {
41
40
  handle: HandleValue;
@@ -74,6 +73,7 @@ export interface Rewrite {
74
73
  source: string;
75
74
  destination: string;
76
75
  has?: HasField;
76
+ missing?: HasField;
77
77
  }
78
78
  export interface Redirect {
79
79
  source: string;
@@ -81,11 +81,13 @@ export interface Redirect {
81
81
  permanent?: boolean;
82
82
  statusCode?: number;
83
83
  has?: HasField;
84
+ missing?: HasField;
84
85
  }
85
86
  export interface Header {
86
87
  source: string;
87
88
  headers: HeaderKeyValue[];
88
89
  has?: HasField;
90
+ missing?: HasField;
89
91
  }
90
92
  export interface HeaderKeyValue {
91
93
  key: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/routing-utils",
3
- "version": "1.11.4-canary.3",
3
+ "version": "1.12.0",
4
4
  "description": "Vercel routing utilities",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -30,5 +30,5 @@
30
30
  "optionalDependencies": {
31
31
  "ajv": "^6.0.0"
32
32
  },
33
- "gitHead": "3d7e01ebf032a5e391b3ad8df674437db23c622a"
33
+ "gitHead": "99fa729966c4334aa2d64c592421cc65e1644bdb"
34
34
  }