@vercel/config 0.0.20 → 0.0.21

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/router.d.ts CHANGED
@@ -466,31 +466,10 @@ export interface RouterConfig {
466
466
  * When routes is present, other fields (redirects, headers, rewrites, crons) are excluded.
467
467
  */
468
468
  routes?: Route[];
469
- /**
470
- * When true, Vercel automatically removes file extensions and normalizes
471
- * certain paths, serving HTML and serverless routes extension-free.
472
- */
473
- cleanUrls?: boolean;
474
- /**
475
- * When true, routes are normalized to include a trailing slash.
476
- */
477
- trailingSlash?: boolean;
478
- /**
479
- * Path to a JSON file containing bulk redirect rules.
480
- */
481
- bulkRedirectsPath?: string;
482
469
  /**
483
470
  * Array of cron definitions for scheduled invocations.
484
471
  */
485
472
  crons?: CronRule[];
486
- /**
487
- * Custom build command to run during deployment.
488
- */
489
- buildCommand?: string;
490
- /**
491
- * Custom install command to run during deployment.
492
- */
493
- installCommand?: string;
494
473
  }
495
474
  /**
496
475
  * The main Router class for building a Vercel configuration object in code.
@@ -503,35 +482,6 @@ export declare class Router {
503
482
  private rewriteRules;
504
483
  private routeRules;
505
484
  private cronRules;
506
- private cleanUrlsConfig;
507
- private trailingSlashConfig;
508
- private bulkRedirectsPathConfig;
509
- private buildCommandConfig;
510
- private installCommandConfig;
511
- /**
512
- * Property setter for cleanUrls configuration.
513
- */
514
- set cleanUrls(value: boolean | undefined);
515
- /**
516
- * Property getter for cleanUrls configuration.
517
- */
518
- get cleanUrls(): boolean | undefined;
519
- /**
520
- * Property setter for trailingSlash configuration.
521
- */
522
- set trailingSlash(value: boolean | undefined);
523
- /**
524
- * Property getter for trailingSlash configuration.
525
- */
526
- get trailingSlash(): boolean | undefined;
527
- /**
528
- * Property setter for bulkRedirectsPath configuration.
529
- */
530
- set bulkRedirectsPath(value: string | undefined);
531
- /**
532
- * Property getter for bulkRedirectsPath configuration.
533
- */
534
- get bulkRedirectsPath(): string | undefined;
535
485
  /**
536
486
  * Helper to extract path parameter names from a source pattern.
537
487
  * Path parameters are identified by :paramName syntax.
@@ -661,27 +611,6 @@ export declare class Router {
661
611
  * });
662
612
  */
663
613
  route(config: Route): this;
664
- /**
665
- * When true, automatically serve HTML files and serverless functions
666
- * without the .html or .js extension. This is a built-in Vercel feature.
667
- */
668
- setCleanUrls(value: boolean): this;
669
- /**
670
- * When true, automatically normalize paths to include a trailing slash.
671
- */
672
- setTrailingSlash(value: boolean): this;
673
- /**
674
- * Sets a custom build command to run during deployment.
675
- * @example
676
- * router.setBuildCommand('pnpm run generate-config')
677
- */
678
- setBuildCommand(value: string): this;
679
- /**
680
- * Sets a custom install command to run during deployment.
681
- * @example
682
- * router.setInstallCommand('pnpm install --no-frozen-lockfile')
683
- */
684
- setInstallCommand(value: string): this;
685
614
  /**
686
615
  * Adds a single cron rule (synchronous).
687
616
  */
@@ -707,7 +636,14 @@ export declare class Router {
707
636
  /**
708
637
  * A simple factory function for creating a new Router instance.
709
638
  * @example
710
- * import { createRouter } from '@vercel/router-sdk';
711
- * const router = createRouter();
639
+ * import { createRoutes } from '@vercel/router-sdk';
640
+ * const routes = createRoutes();
641
+ */
642
+ export declare function createRoutes(): Router;
643
+ /**
644
+ * Default singleton router instance for convenience.
645
+ * @example
646
+ * import { routes } from '@vercel/router-sdk';
647
+ * routes.redirect('/old', '/new');
712
648
  */
713
- export declare function createRouter(): Router;
649
+ export declare const routes: Router;
package/dist/router.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRouter = exports.Router = exports.runtimeEnv = exports.param = void 0;
3
+ exports.routes = exports.createRoutes = exports.Router = exports.runtimeEnv = exports.param = void 0;
4
4
  const pretty_cache_header_1 = require("pretty-cache-header");
5
5
  const validation_1 = require("./utils/validation");
6
6
  /**
@@ -62,47 +62,6 @@ class Router {
62
62
  this.rewriteRules = [];
63
63
  this.routeRules = [];
64
64
  this.cronRules = [];
65
- this.cleanUrlsConfig = undefined;
66
- this.trailingSlashConfig = undefined;
67
- this.bulkRedirectsPathConfig = undefined;
68
- this.buildCommandConfig = undefined;
69
- this.installCommandConfig = undefined;
70
- }
71
- /**
72
- * Property setter for cleanUrls configuration.
73
- */
74
- set cleanUrls(value) {
75
- this.cleanUrlsConfig = value;
76
- }
77
- /**
78
- * Property getter for cleanUrls configuration.
79
- */
80
- get cleanUrls() {
81
- return this.cleanUrlsConfig;
82
- }
83
- /**
84
- * Property setter for trailingSlash configuration.
85
- */
86
- set trailingSlash(value) {
87
- this.trailingSlashConfig = value;
88
- }
89
- /**
90
- * Property getter for trailingSlash configuration.
91
- */
92
- get trailingSlash() {
93
- return this.trailingSlashConfig;
94
- }
95
- /**
96
- * Property setter for bulkRedirectsPath configuration.
97
- */
98
- set bulkRedirectsPath(value) {
99
- this.bulkRedirectsPathConfig = value;
100
- }
101
- /**
102
- * Property getter for bulkRedirectsPath configuration.
103
- */
104
- get bulkRedirectsPath() {
105
- return this.bulkRedirectsPathConfig;
106
65
  }
107
66
  /**
108
67
  * Helper to extract path parameter names from a source pattern.
@@ -392,39 +351,6 @@ class Router {
392
351
  this.routeRules.push(config);
393
352
  return this;
394
353
  }
395
- /**
396
- * When true, automatically serve HTML files and serverless functions
397
- * without the .html or .js extension. This is a built-in Vercel feature.
398
- */
399
- setCleanUrls(value) {
400
- this.cleanUrlsConfig = value;
401
- return this;
402
- }
403
- /**
404
- * When true, automatically normalize paths to include a trailing slash.
405
- */
406
- setTrailingSlash(value) {
407
- this.trailingSlashConfig = value;
408
- return this;
409
- }
410
- /**
411
- * Sets a custom build command to run during deployment.
412
- * @example
413
- * router.setBuildCommand('pnpm run generate-config')
414
- */
415
- setBuildCommand(value) {
416
- this.buildCommandConfig = value;
417
- return this;
418
- }
419
- /**
420
- * Sets a custom install command to run during deployment.
421
- * @example
422
- * router.setInstallCommand('pnpm install --no-frozen-lockfile')
423
- */
424
- setInstallCommand(value) {
425
- this.installCommandConfig = value;
426
- return this;
427
- }
428
354
  /**
429
355
  * Adds a single cron rule (synchronous).
430
356
  */
@@ -532,16 +458,6 @@ class Router {
532
458
  };
533
459
  // NOTE: crons are now handled via export const crons in vercel.ts
534
460
  // They are no longer included in router.getConfig()
535
- // Only include optional fields if they're explicitly set
536
- if (this.bulkRedirectsPathConfig !== undefined) {
537
- config.bulkRedirectsPath = this.bulkRedirectsPathConfig;
538
- }
539
- if (this.buildCommandConfig !== undefined) {
540
- config.buildCommand = this.buildCommandConfig;
541
- }
542
- if (this.installCommandConfig !== undefined) {
543
- config.installCommand = this.installCommandConfig;
544
- }
545
461
  return config;
546
462
  }
547
463
  // Otherwise, return the legacy format
@@ -549,20 +465,8 @@ class Router {
549
465
  redirects: this.redirectRules,
550
466
  headers: this.headerRules,
551
467
  rewrites: legacyRewrites,
552
- cleanUrls: this.cleanUrlsConfig,
553
- trailingSlash: this.trailingSlashConfig,
554
468
  // NOTE: crons are now handled via export const crons in vercel.ts
555
469
  };
556
- // Only include optional fields if they're explicitly set
557
- if (this.bulkRedirectsPathConfig !== undefined) {
558
- config.bulkRedirectsPath = this.bulkRedirectsPathConfig;
559
- }
560
- if (this.buildCommandConfig !== undefined) {
561
- config.buildCommand = this.buildCommandConfig;
562
- }
563
- if (this.installCommandConfig !== undefined) {
564
- config.installCommand = this.installCommandConfig;
565
- }
566
470
  return config;
567
471
  }
568
472
  /**
@@ -633,10 +537,17 @@ exports.Router = Router;
633
537
  /**
634
538
  * A simple factory function for creating a new Router instance.
635
539
  * @example
636
- * import { createRouter } from '@vercel/router-sdk';
637
- * const router = createRouter();
540
+ * import { createRoutes } from '@vercel/router-sdk';
541
+ * const routes = createRoutes();
638
542
  */
639
- function createRouter() {
543
+ function createRoutes() {
640
544
  return new Router();
641
545
  }
642
- exports.createRouter = createRouter;
546
+ exports.createRoutes = createRoutes;
547
+ /**
548
+ * Default singleton router instance for convenience.
549
+ * @example
550
+ * import { routes } from '@vercel/router-sdk';
551
+ * routes.redirect('/old', '/new');
552
+ */
553
+ exports.routes = new Router();
package/dist/types.d.ts CHANGED
@@ -3,75 +3,123 @@
3
3
  * https://openapi.vercel.sh/vercel.json
4
4
  */
5
5
  export type Framework = 'blitzjs' | 'nextjs' | 'gatsby' | 'remix' | 'react-router' | 'astro' | 'hexo' | 'eleventy' | 'docusaurus-2' | 'docusaurus' | 'preact' | 'solidstart-1' | 'solidstart' | 'dojo' | 'ember' | 'vue' | 'scully' | 'ionic-angular' | 'angular' | 'polymer' | 'svelte' | 'sveltekit' | 'sveltekit-1' | 'ionic-react' | 'create-react-app' | 'gridsome' | 'umijs' | 'sapper' | 'saber' | 'stencil' | 'nuxtjs' | 'redwoodjs' | 'hugo' | 'jekyll' | 'brunch' | 'middleman' | 'zola' | 'hydrogen' | 'vite' | 'tanstack-start' | 'vitepress' | 'vuepress' | 'parcel' | 'fastapi' | 'flask' | 'fasthtml' | 'sanity-v3' | 'sanity' | 'storybook' | 'nitro' | 'hono' | 'express' | 'h3' | 'nestjs' | 'elysia' | 'fastify' | 'xmcp' | null;
6
- export interface CronJob {
7
- schedule: string;
8
- path: string;
9
- }
10
6
  export interface FunctionConfig {
7
+ /**
8
+ * A glob pattern to match files that should be excluded from your Serverless Function. If you’re using a Community Runtime, the behavior might vary.
9
+ */
11
10
  excludeFiles?: string;
11
+ /**
12
+ * A glob pattern to match files that should be included in your Serverless Function. If you’re using a Community Runtime, the behavior might vary.
13
+ */
12
14
  includeFiles?: string;
15
+ /**
16
+ * An integer defining how long your Serverless Function should be allowed to run on every request in seconds (between 1 and the maximum limit of your plan).
17
+ */
13
18
  maxDuration?: number;
19
+ /**
20
+ * An integer defining the memory your Serverless Function should be provided with (between 128 and 10240).
21
+ */
14
22
  memory?: number;
23
+ /**
24
+ * The npm package name of a Runtime, including its version
25
+ */
15
26
  runtime?: string;
27
+ /**
28
+ * A boolean that defines whether the Function supports cancellation (default: false)
29
+ */
16
30
  supportsCancellation?: boolean;
17
- experimentalTriggers?: Array<{
18
- type: 'queue/v1beta';
31
+ /**
32
+ * An array of experimental triggers for this Serverless Function. Currently only supports queue triggers.
33
+ */
34
+ experimentalTriggers?: {
35
+ /**
36
+ * Event type pattern this trigger handles
37
+ */
38
+ type: string;
39
+ /**
40
+ * Name of the queue topic to consume from
41
+ */
19
42
  topic: string;
43
+ /**
44
+ * Name of the consumer group for this trigger
45
+ */
20
46
  consumer: string;
47
+ /**
48
+ * Maximum number of delivery attempts
49
+ */
21
50
  maxDeliveries?: number;
51
+ /**
52
+ * Delay in seconds before retrying failed executions
53
+ */
22
54
  retryAfterSeconds?: number;
55
+ /**
56
+ * Initial delay in seconds before first execution attempt
57
+ */
23
58
  initialDelaySeconds?: number;
24
- }>;
59
+ }[];
60
+ }
61
+ export interface CronJob {
62
+ schedule: string;
63
+ path: string;
25
64
  }
26
65
  export interface GitDeploymentConfig {
27
66
  [branch: string]: boolean;
28
67
  }
29
68
  export interface GitConfig {
69
+ /**
70
+ * Specifies the branches that will not trigger an auto-deployment when committing to them. Any non specified branch is `true` by default.
71
+ */
30
72
  deploymentEnabled?: boolean | GitDeploymentConfig;
31
73
  /**
74
+ * If specified, the git repository will be exclusive to the specificed Team IDs. Teams that are not specified in the list will not be able to link new projects or create new deployments.
32
75
  * @private
33
76
  */
34
77
  exclusivity?: {
78
+ /**
79
+ * A list of allowed Team IDs.
80
+ */
35
81
  teams?: string[];
36
82
  };
37
83
  }
38
84
  export interface GithubConfig {
39
- enabled?: boolean;
85
+ /**
86
+ * When set to `false`, Vercel for GitHub will not deploy the given project regardless of the GitHub app being installed.
87
+ */
40
88
  autoAlias?: boolean;
89
+ /**
90
+ * When set to `false`, Vercel for GitHub will always build pushes in sequence without cancelling a build for the most recent commit.
91
+ */
41
92
  autoJobCancelation?: boolean;
42
93
  /**
94
+ * When set to false, Vercel for GitHub will not apply the alias upon merge.
95
+ */
96
+ enabled?: boolean;
97
+ /**
98
+ * [deprecated] Please use the Project Settings in the dashboard instead: https://vercel.link/46vERTS When set to `true`, Vercel for GitHub will stop commenting on pull requests and commits.
43
99
  * @deprecated
44
100
  */
45
101
  silent?: boolean;
46
102
  }
47
103
  export interface ImageConfig {
48
- sizes: number[];
49
- domains?: string[];
50
- formats?: ('image/avif' | 'image/webp' | 'image/jpeg' | 'image/png')[];
51
- minimumCacheTTL?: number;
52
- dangerouslyAllowSVG?: boolean;
53
- contentSecurityPolicy?: string;
54
104
  contentDispositionType?: 'inline' | 'attachment';
55
- qualities?: number[];
56
- localPatterns?: Array<{
105
+ contentSecurityPolicy?: string;
106
+ dangerouslyAllowSVG?: boolean;
107
+ domains?: string[];
108
+ formats?: 'image/avif' | 'image/webp' | 'image/jpeg' | 'image/png'[];
109
+ localPatterns?: {
57
110
  pathname?: string;
58
111
  search?: string;
59
- }>;
60
- remotePatterns?: Array<{
112
+ }[];
113
+ minimumCacheTTL?: number;
114
+ qualities?: number[];
115
+ remotePatterns?: {
61
116
  protocol?: 'http' | 'https';
62
117
  hostname: string;
63
118
  port?: string;
64
119
  pathname?: string;
65
120
  search?: string;
66
- }>;
67
- }
68
- export interface ProbeConfig {
69
- path: string;
70
- initialDelaySeconds?: number;
71
- periodSeconds?: number;
72
- timeoutSeconds?: number;
73
- successThreshold?: number;
74
- failureThreshold?: number;
121
+ }[];
122
+ sizes: number[];
75
123
  }
76
124
  /**
77
125
  * HTTP header key/value pair
@@ -145,154 +193,133 @@ export interface BuildConfig {
145
193
  env?: Record<string, string>;
146
194
  }
147
195
  export interface BuildItem {
196
+ config?: Record<string, any>;
148
197
  src?: string;
149
198
  use: string;
150
- config?: Record<string, any>;
151
199
  }
152
200
  export interface VercelConfig {
153
201
  /**
154
- * JSON schema URL for editor completions and validation.
155
- */
156
- $schema?: string;
157
- /**
158
- * Aliases that will get assigned when the deployment is `READY` and the target is `production`.
202
+ * Aliases that will get assigned when the deployment is `READY` and the target is `production`. The client needs to make a `GET` request to its API to ensure the assignment
159
203
  */
160
204
  alias?: string | string[];
161
205
  /**
162
- * Build configuration (deprecated).
206
+ * An object containing another object with information to be passed to the Build Process
163
207
  * @deprecated
164
208
  */
165
209
  build?: BuildConfig;
166
210
  /**
167
- * Build descriptions (deprecated).
211
+ * A list of build descriptions whose src references valid source files.
168
212
  * @deprecated
169
213
  */
170
214
  builds?: BuildItem[];
171
215
  /**
172
- * Path to a JSON file containing bulk redirect rules.
173
- */
174
- bulkRedirectsPath?: string;
175
- /**
176
- * When set to `true`, all HTML files and Serverless Functions will have their extension removed.
216
+ * When set to `true`, all HTML files and Serverless Functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.
177
217
  */
178
218
  cleanUrls?: boolean;
179
219
  /**
180
- * An array of cron jobs that should be created for production Deployments.
181
- */
182
- crons?: CronJob[];
183
- /**
184
- * An object containing the deployment's environment variables.
220
+ * An object containing the deployment's environment variable names and values. Secrets can be referenced by prefixing the value with `@`
221
+ * @deprecated
185
222
  */
186
223
  env?: Record<string, string>;
187
224
  /**
188
- * An array of the passive regions the deployment's Serverless Functions should be deployed to.
225
+ * An array of the passive regions the deployment's Serverless Functions should be deployed to that can be failed over to during a lambda outage
189
226
  */
190
227
  passiveRegions?: string[];
191
228
  /**
192
- * Same as passiveRegions. An array of passive regions for failover.
229
+ * Same as passiveRegions. An array of the passive regions the deployment's Serverless Functions should be deployed to so we can failover to these regions on lambda outages
193
230
  */
194
231
  functionFailoverRegions?: string[];
195
232
  /**
196
- * An object describing custom options for Serverless Functions.
233
+ * An object describing custom options for your Serverless Functions. Each key must be glob pattern that matches the paths of the Serverless Functions you would like to customize (like `api/*.js` or `api/test.js`).
197
234
  */
198
235
  functions?: Record<string, FunctionConfig>;
199
- /**
200
- * Git-related configuration.
201
- */
202
236
  git?: GitConfig;
203
237
  /**
204
- * GitHub-related configuration.
238
+ * @private
205
239
  */
206
240
  github?: GithubConfig;
207
241
  /**
208
- * HTTP headers configuration.
209
- * Can use router.header() and router.cacheControl() helpers.
242
+ * A list of header definitions.
210
243
  */
211
244
  headers?: RouteType[];
212
- /**
213
- * Image optimization configuration.
214
- */
215
245
  images?: ImageConfig;
216
246
  /**
217
- * A name for the deployment.
247
+ * A name for the deployment
218
248
  */
219
249
  name?: string;
220
250
  /**
221
- * Probe configuration for health checks.
222
- */
223
- probes?: ProbeConfig[];
224
- /**
225
- * When true, the source code is not stored on the platform and only the production output will be deployed.
251
+ * Whether a deployment's source and logs are available publicly
226
252
  */
227
253
  public?: boolean;
228
254
  /**
229
- * HTTP redirects configuration.
230
- * Can use router.redirect() helper.
255
+ * A list of redirect definitions.
231
256
  */
232
257
  redirects?: RouteType[];
233
258
  /**
234
- * An array of regions where the deployment's Serverless Functions and Edge Functions should be deployed to.
259
+ * The path to a file containing bulk redirects; supports JSON, JSONL, and CSV
260
+ */
261
+ bulkRedirectsPath?: string | null;
262
+ /**
263
+ * An array of the regions the deployment's Serverless Functions should be deployed to
235
264
  */
236
265
  regions?: string[];
237
266
  /**
238
- * HTTP rewrites configuration.
239
- * Can use router.rewrite() helper.
267
+ * A list of rewrite definitions.
240
268
  */
241
269
  rewrites?: RouteType[];
242
270
  /**
243
- * Routes configuration using the lower-level routes primitive.
244
- * Use this if you need transforms or want everything in one place.
245
- * Cannot be mixed with headers, redirects, or rewrites.
271
+ * A list of routes objects used to rewrite paths to point towards other internal or external paths
272
+ * @deprecated
246
273
  */
247
274
  routes?: RouteType[];
248
275
  /**
249
- * Scope (user or team) for deployment.
276
+ * This property determines the scope (user or team) under which the project will be deployed by Vercel CLI.
250
277
  * @private
251
278
  */
252
279
  scope?: string;
253
280
  /**
254
- * Wildcard domain configuration.
281
+ * When `false`, visiting a path that ends with a forward slash will respond with a `308` status code and redirect to the path without the trailing slash.
255
282
  */
256
- wildcard?: WildcardDomain[];
283
+ trailingSlash?: boolean;
257
284
  /**
258
- * Version of the configuration schema.
259
285
  * @private
260
286
  */
261
287
  version?: number;
262
288
  /**
263
- * The build command for this project. When `null`, automatically detected.
289
+ * @private
264
290
  */
265
- buildCommand?: string | null;
291
+ wildcard?: WildcardDomain[];
266
292
  /**
267
- * The ignore command for this project.
293
+ * The build command for this project. When `null` is used this value will be automatically detected
268
294
  */
295
+ buildCommand?: string | null;
269
296
  ignoreCommand?: string | null;
270
297
  /**
271
- * The dev command for this project. When `null`, automatically detected.
298
+ * The dev command for this project. When `null` is used this value will be automatically detected
272
299
  */
273
300
  devCommand?: string | null;
274
301
  /**
275
- * The framework being used. When `null`, no framework is selected.
302
+ * The framework that is being used for this project. When `null` is used no framework is selected
276
303
  */
277
304
  framework?: Framework;
278
305
  /**
279
- * The install command for this project. When `null`, automatically detected.
306
+ * The install command for this project. When `null` is used this value will be automatically detected
280
307
  */
281
308
  installCommand?: string | null;
282
309
  /**
283
- * The output directory of the project. When `null`, automatically detected.
310
+ * The output directory of the project. When `null` is used this value will be automatically detected
284
311
  */
285
312
  outputDirectory?: string | null;
286
313
  /**
287
- * When `false`, visiting a path that ends with a forward slash will redirect to the path without the trailing slash.
314
+ * An array of cron jobs that should be created for production Deployments.
288
315
  */
289
- trailingSlash?: boolean;
316
+ crons?: CronJob[];
290
317
  /**
291
318
  * An array of projectIds to associate with the current project.
292
319
  */
293
320
  relatedProjects?: string[];
294
321
  /**
295
- * Enables Fluid compute for the project.
322
+ * Enables Fluid compute for the project. It's enabled by default for new projects.
296
323
  */
297
324
  fluid?: boolean;
298
325
  /**
@@ -1,4 +1,4 @@
1
- export { createRouter, Router } from "../router";
1
+ export { createRoutes, routes, Router } from "../router";
2
2
  export * from "../router";
3
3
  export { VercelConfig } from "../types";
4
4
  export type { Redirect, Rewrite, HeaderRule, Condition, RouteType } from "../types";
package/dist/v1/index.js CHANGED
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.validateStaticFields = exports.validateStaticStringArray = exports.validateStaticObject = exports.validateStaticBoolean = exports.validateStaticString = exports.VercelConfig = exports.Router = exports.createRouter = void 0;
17
+ exports.validateStaticFields = exports.validateStaticStringArray = exports.validateStaticObject = exports.validateStaticBoolean = exports.validateStaticString = exports.VercelConfig = exports.Router = exports.routes = exports.createRoutes = void 0;
18
18
  var router_1 = require("../router");
19
- Object.defineProperty(exports, "createRouter", { enumerable: true, get: function () { return router_1.createRouter; } });
19
+ Object.defineProperty(exports, "createRoutes", { enumerable: true, get: function () { return router_1.createRoutes; } });
20
+ Object.defineProperty(exports, "routes", { enumerable: true, get: function () { return router_1.routes; } });
20
21
  Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return router_1.Router; } });
21
22
  __exportStar(require("../router"), exports);
22
23
  var types_1 = require("../types");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/config",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "A TypeScript SDK for programmatically configuring Vercel projects",
5
5
  "bugs": {
6
6
  "url": "https://github.com/vercel/config/issues"
@@ -40,6 +40,7 @@
40
40
  "@typescript-eslint/parser": "^5.0.0",
41
41
  "eslint": "^8.0.0",
42
42
  "prettier": "^2.8.0",
43
+ "tsx": "^4.7.0",
43
44
  "typescript": "^4.9.0",
44
45
  "vitest": "^1.0.0"
45
46
  },
@@ -49,6 +50,7 @@
49
50
  "scripts": {
50
51
  "build": "tsc",
51
52
  "format": "prettier --write \"src/**/*.ts\"",
53
+ "generate-types": "tsx scripts/generate-types.ts",
52
54
  "lint": "eslint . --ext .ts",
53
55
  "release": "npm run build && changeset publish",
54
56
  "test": "vitest",