@vercel/microfrontends 0.14.0 → 0.16.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/bin/cli.cjs +392 -1620
- package/dist/config.cjs +478 -1001
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.ts +4 -25
- package/dist/config.js +474 -980
- package/dist/config.js.map +1 -1
- package/dist/{v2/microfrontends → microfrontends}/server.cjs +91 -150
- package/dist/microfrontends/server.cjs.map +1 -0
- package/dist/{v2/microfrontends → microfrontends}/server.d.ts +4 -4
- package/dist/{v2/microfrontends → microfrontends}/server.js +91 -150
- package/dist/microfrontends/server.js.map +1 -0
- package/dist/{v2/microfrontends.cjs → microfrontends.cjs} +49 -28
- package/dist/microfrontends.cjs.map +1 -0
- package/dist/{v2/microfrontends.d.ts → microfrontends.d.ts} +4 -4
- package/dist/{v2/microfrontends.js → microfrontends.js} +48 -27
- package/dist/microfrontends.js.map +1 -0
- package/dist/next/client.cjs +1 -1
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.js +1 -1
- package/dist/next/client.js.map +1 -1
- package/dist/next/config.cjs +1344 -1024
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.d.ts +1 -1
- package/dist/next/config.js +1343 -1023
- package/dist/next/config.js.map +1 -1
- package/dist/next/endpoints.cjs +77 -18
- package/dist/next/endpoints.cjs.map +1 -1
- package/dist/next/endpoints.d.ts +13 -2
- package/dist/next/endpoints.js +77 -18
- package/dist/next/endpoints.js.map +1 -1
- package/dist/next/middleware.cjs +765 -395
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.ts +10 -5
- package/dist/next/middleware.js +765 -395
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.cjs +615 -1031
- package/dist/next/testing.cjs.map +1 -1
- package/dist/next/testing.d.ts +14 -12
- package/dist/next/testing.js +609 -1015
- package/dist/next/testing.js.map +1 -1
- package/dist/overrides.cjs +40 -108
- package/dist/overrides.cjs.map +1 -1
- package/dist/overrides.d.ts +24 -2
- package/dist/overrides.js +36 -106
- package/dist/overrides.js.map +1 -1
- package/dist/{v2/routing.cjs → routing.cjs} +3 -3
- package/dist/routing.cjs.map +1 -0
- package/dist/{v2/schema.cjs → schema.cjs} +1 -1
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/utils/mfe-port.cjs +237 -1338
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +230 -1331
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.cjs +31 -361
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.ts +3 -146
- package/dist/validation.js +30 -359
- package/dist/validation.js.map +1 -1
- package/package.json +29 -92
- package/schema/schema.json +174 -244
- package/dist/config/client.cjs +0 -54
- package/dist/config/client.cjs.map +0 -1
- package/dist/config/client.d.ts +0 -23
- package/dist/config/client.js +0 -28
- package/dist/config/client.js.map +0 -1
- package/dist/config/edge.cjs +0 -508
- package/dist/config/edge.cjs.map +0 -1
- package/dist/config/edge.d.ts +0 -20
- package/dist/config/edge.js +0 -481
- package/dist/config/edge.js.map +0 -1
- package/dist/microfrontend-config-983a5139.d.ts +0 -154
- package/dist/schema-2922d49e.d.ts +0 -182
- package/dist/v2/config.cjs +0 -709
- package/dist/v2/config.cjs.map +0 -1
- package/dist/v2/config.d.ts +0 -4
- package/dist/v2/config.js +0 -684
- package/dist/v2/config.js.map +0 -1
- package/dist/v2/microfrontends/server.cjs.map +0 -1
- package/dist/v2/microfrontends/server.js.map +0 -1
- package/dist/v2/microfrontends.cjs.map +0 -1
- package/dist/v2/microfrontends.js.map +0 -1
- package/dist/v2/next/client.cjs +0 -3
- package/dist/v2/next/client.cjs.map +0 -1
- package/dist/v2/next/client.d.ts +0 -45
- package/dist/v2/next/client.js +0 -3
- package/dist/v2/next/client.js.map +0 -1
- package/dist/v2/next/config.cjs +0 -2178
- package/dist/v2/next/config.cjs.map +0 -1
- package/dist/v2/next/config.d.ts +0 -22
- package/dist/v2/next/config.js +0 -2143
- package/dist/v2/next/config.js.map +0 -1
- package/dist/v2/next/endpoints.cjs +0 -141
- package/dist/v2/next/endpoints.cjs.map +0 -1
- package/dist/v2/next/endpoints.d.ts +0 -26
- package/dist/v2/next/endpoints.js +0 -116
- package/dist/v2/next/endpoints.js.map +0 -1
- package/dist/v2/next/middleware.cjs +0 -1099
- package/dist/v2/next/middleware.cjs.map +0 -1
- package/dist/v2/next/middleware.d.ts +0 -34
- package/dist/v2/next/middleware.js +0 -1071
- package/dist/v2/next/middleware.js.map +0 -1
- package/dist/v2/next/testing.cjs +0 -992
- package/dist/v2/next/testing.cjs.map +0 -1
- package/dist/v2/next/testing.d.ts +0 -55
- package/dist/v2/next/testing.js +0 -961
- package/dist/v2/next/testing.js.map +0 -1
- package/dist/v2/overrides.cjs +0 -75
- package/dist/v2/overrides.cjs.map +0 -1
- package/dist/v2/overrides.d.ts +0 -24
- package/dist/v2/overrides.js +0 -45
- package/dist/v2/overrides.js.map +0 -1
- package/dist/v2/routing.cjs.map +0 -1
- package/dist/v2/schema.cjs.map +0 -1
- package/dist/v2/schema.d.ts +0 -1
- package/schema/schema-v2.json +0 -266
- /package/dist/{v2/routing.d.ts → routing.d.ts} +0 -0
- /package/dist/{v2/routing.js → routing.js} +0 -0
- /package/dist/{v2/routing.js.map → routing.js.map} +0 -0
- /package/dist/{v2/schema.js → schema.js} +0 -0
- /package/dist/{v2/schema.js.map → schema.js.map} +0 -0
package/dist/validation.cjs
CHANGED
|
@@ -20,12 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/schema/validation.ts
|
|
21
21
|
var validation_exports = {};
|
|
22
22
|
__export(validation_exports, {
|
|
23
|
-
|
|
24
|
-
validateV2Schema: () => validateSchema
|
|
23
|
+
validateSchema: () => validateSchema
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(validation_exports);
|
|
27
26
|
|
|
28
|
-
// src/config
|
|
27
|
+
// src/config/microfrontends/server/validation.ts
|
|
29
28
|
var import_jsonc_parser = require("jsonc-parser");
|
|
30
29
|
var import_ajv = require("ajv");
|
|
31
30
|
|
|
@@ -121,8 +120,8 @@ var MicrofrontendError = class extends Error {
|
|
|
121
120
|
}
|
|
122
121
|
};
|
|
123
122
|
|
|
124
|
-
// schema/schema
|
|
125
|
-
var
|
|
123
|
+
// schema/schema.json
|
|
124
|
+
var schema_default = {
|
|
126
125
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
127
126
|
$ref: "#/definitions/Config",
|
|
128
127
|
definitions: {
|
|
@@ -161,7 +160,8 @@ var schema_v2_default = {
|
|
|
161
160
|
description: "Mapping of application names to the routes that they host. Only needs to be defined in the application that owns the primary microfrontend domain"
|
|
162
161
|
}
|
|
163
162
|
},
|
|
164
|
-
required: ["applications", "version"]
|
|
163
|
+
required: ["applications", "version"],
|
|
164
|
+
additionalProperties: false
|
|
165
165
|
},
|
|
166
166
|
Options: {
|
|
167
167
|
type: "object",
|
|
@@ -174,7 +174,8 @@ var schema_v2_default = {
|
|
|
174
174
|
$ref: "#/definitions/LocalProxyOptions",
|
|
175
175
|
description: "Options for local proxy."
|
|
176
176
|
}
|
|
177
|
-
}
|
|
177
|
+
},
|
|
178
|
+
additionalProperties: false
|
|
178
179
|
},
|
|
179
180
|
VercelOptions: {
|
|
180
181
|
type: "object",
|
|
@@ -187,7 +188,8 @@ var schema_v2_default = {
|
|
|
187
188
|
type: "boolean",
|
|
188
189
|
description: "If you want to disable the overrides for the site. For example, if you are managing rewrites between applications externally, you may wish to disable the overrides on the toolbar as they will have no effect."
|
|
189
190
|
}
|
|
190
|
-
}
|
|
191
|
+
},
|
|
192
|
+
additionalProperties: false
|
|
191
193
|
},
|
|
192
194
|
LocalProxyOptions: {
|
|
193
195
|
type: "object",
|
|
@@ -196,7 +198,8 @@ var schema_v2_default = {
|
|
|
196
198
|
type: "number",
|
|
197
199
|
description: "The port number used by the local proxy server.\n\nThe default is `3024`."
|
|
198
200
|
}
|
|
199
|
-
}
|
|
201
|
+
},
|
|
202
|
+
additionalProperties: false
|
|
200
203
|
},
|
|
201
204
|
Application: {
|
|
202
205
|
anyOf: [
|
|
@@ -221,7 +224,8 @@ var schema_v2_default = {
|
|
|
221
224
|
$ref: "#/definitions/HostConfig"
|
|
222
225
|
}
|
|
223
226
|
},
|
|
224
|
-
required: ["production"]
|
|
227
|
+
required: ["production"],
|
|
228
|
+
additionalProperties: false
|
|
225
229
|
},
|
|
226
230
|
Vercel: {
|
|
227
231
|
type: "object",
|
|
@@ -231,7 +235,8 @@ var schema_v2_default = {
|
|
|
231
235
|
description: "Vercel project ID"
|
|
232
236
|
}
|
|
233
237
|
},
|
|
234
|
-
required: ["projectId"]
|
|
238
|
+
required: ["projectId"],
|
|
239
|
+
additionalProperties: false
|
|
235
240
|
},
|
|
236
241
|
Development: {
|
|
237
242
|
type: "object",
|
|
@@ -247,10 +252,12 @@ var schema_v2_default = {
|
|
|
247
252
|
type: "string",
|
|
248
253
|
description: "Optional task to run when starting the development server. Should reference a script in the package.json of the application."
|
|
249
254
|
}
|
|
250
|
-
}
|
|
255
|
+
},
|
|
256
|
+
additionalProperties: false
|
|
251
257
|
},
|
|
252
258
|
LocalHostConfig: {
|
|
253
259
|
type: "object",
|
|
260
|
+
additionalProperties: false,
|
|
254
261
|
properties: {
|
|
255
262
|
host: {
|
|
256
263
|
type: "string",
|
|
@@ -284,7 +291,8 @@ var schema_v2_default = {
|
|
|
284
291
|
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
285
292
|
}
|
|
286
293
|
},
|
|
287
|
-
required: ["host"]
|
|
294
|
+
required: ["host"],
|
|
295
|
+
additionalProperties: false
|
|
288
296
|
},
|
|
289
297
|
ChildApplication: {
|
|
290
298
|
type: "object",
|
|
@@ -303,7 +311,8 @@ var schema_v2_default = {
|
|
|
303
311
|
$ref: "#/definitions/HostConfig"
|
|
304
312
|
}
|
|
305
313
|
},
|
|
306
|
-
required: ["routing"]
|
|
314
|
+
required: ["routing"],
|
|
315
|
+
additionalProperties: false
|
|
307
316
|
},
|
|
308
317
|
Routing: {
|
|
309
318
|
type: "array",
|
|
@@ -329,7 +338,8 @@ var schema_v2_default = {
|
|
|
329
338
|
}
|
|
330
339
|
}
|
|
331
340
|
},
|
|
332
|
-
required: ["paths"]
|
|
341
|
+
required: ["paths"],
|
|
342
|
+
additionalProperties: false
|
|
333
343
|
},
|
|
334
344
|
ApplicationRouting: {
|
|
335
345
|
type: "object",
|
|
@@ -362,15 +372,16 @@ var schema_v2_default = {
|
|
|
362
372
|
description: "Applications that only serve a subset of the microfrontend routes only need to reference the name of the primary application that owns the full microfrontends configuration."
|
|
363
373
|
}
|
|
364
374
|
},
|
|
365
|
-
required: ["partOf", "version"]
|
|
375
|
+
required: ["partOf", "version"],
|
|
376
|
+
additionalProperties: false
|
|
366
377
|
}
|
|
367
378
|
}
|
|
368
379
|
};
|
|
369
380
|
|
|
370
|
-
// src/config
|
|
371
|
-
var SCHEMA =
|
|
381
|
+
// src/config/schema/utils/load.ts
|
|
382
|
+
var SCHEMA = schema_default;
|
|
372
383
|
|
|
373
|
-
// src/config
|
|
384
|
+
// src/config/microfrontends/server/validation.ts
|
|
374
385
|
function validateSchema(configString) {
|
|
375
386
|
const parsedConfig = (0, import_jsonc_parser.parse)(configString);
|
|
376
387
|
const ajv = new import_ajv.Ajv();
|
|
@@ -384,349 +395,8 @@ function validateSchema(configString) {
|
|
|
384
395
|
}
|
|
385
396
|
return parsedConfig;
|
|
386
397
|
}
|
|
387
|
-
|
|
388
|
-
// src/config/validation.ts
|
|
389
|
-
var import_jsonc_parser2 = require("jsonc-parser");
|
|
390
|
-
var import_path_to_regexp = require("path-to-regexp");
|
|
391
|
-
var import_ajv2 = require("ajv");
|
|
392
|
-
|
|
393
|
-
// schema/schema.json
|
|
394
|
-
var schema_default = {
|
|
395
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
396
|
-
$ref: "#/definitions/Config",
|
|
397
|
-
definitions: {
|
|
398
|
-
Config: {
|
|
399
|
-
type: "object",
|
|
400
|
-
properties: {
|
|
401
|
-
version: {
|
|
402
|
-
type: "string"
|
|
403
|
-
},
|
|
404
|
-
$schema: {
|
|
405
|
-
type: "string"
|
|
406
|
-
},
|
|
407
|
-
name: {
|
|
408
|
-
type: "string",
|
|
409
|
-
description: 'Name for the micro-frontend site (eg. "vercel.com", "vercel-site" etc.).'
|
|
410
|
-
},
|
|
411
|
-
applications: {
|
|
412
|
-
$ref: "#/definitions/ApplicationConfigsById"
|
|
413
|
-
},
|
|
414
|
-
options: {
|
|
415
|
-
$ref: "#/definitions/Options",
|
|
416
|
-
description: "Optional configuration for the entire micro-frontends setup."
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
required: ["version", "applications"],
|
|
420
|
-
description: "Configuration for micro-frontend applications\n\nTODO: Add proxy configuration"
|
|
421
|
-
},
|
|
422
|
-
ApplicationConfigsById: {
|
|
423
|
-
type: "object",
|
|
424
|
-
additionalProperties: {
|
|
425
|
-
$ref: "#/definitions/ApplicationConfig"
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
ApplicationConfig: {
|
|
429
|
-
anyOf: [
|
|
430
|
-
{
|
|
431
|
-
$ref: "#/definitions/DefaultApplicationConfig"
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
$ref: "#/definitions/CommonApplicationConfig"
|
|
435
|
-
}
|
|
436
|
-
],
|
|
437
|
-
description: "A Micro-Frontend Deployment Target"
|
|
438
|
-
},
|
|
439
|
-
DefaultApplicationConfig: {
|
|
440
|
-
type: "object",
|
|
441
|
-
properties: {
|
|
442
|
-
default: {
|
|
443
|
-
type: "boolean",
|
|
444
|
-
const: true,
|
|
445
|
-
description: "The default application is used no other application is matched via the routing config"
|
|
446
|
-
},
|
|
447
|
-
routing: {
|
|
448
|
-
$ref: "#/definitions/Routing"
|
|
449
|
-
},
|
|
450
|
-
development: {
|
|
451
|
-
type: "object",
|
|
452
|
-
properties: {
|
|
453
|
-
local: {
|
|
454
|
-
$ref: "#/definitions/HostConfig"
|
|
455
|
-
},
|
|
456
|
-
fallback: {
|
|
457
|
-
$ref: "#/definitions/HostConfig",
|
|
458
|
-
description: "Fallback for local development, could be a host config that points to any environment. If this is not provided, or the application is not running - requests to the application in local development will error."
|
|
459
|
-
},
|
|
460
|
-
task: {
|
|
461
|
-
type: "string",
|
|
462
|
-
description: "Optional task to run when starting the development server. Should reference a script in the package.json of the application."
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
required: ["local"]
|
|
466
|
-
},
|
|
467
|
-
production: {
|
|
468
|
-
$ref: "#/definitions/HostConfig"
|
|
469
|
-
},
|
|
470
|
-
metadata: {
|
|
471
|
-
type: "object",
|
|
472
|
-
additionalProperties: {
|
|
473
|
-
type: "string"
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
federation: {
|
|
477
|
-
type: "object",
|
|
478
|
-
properties: {
|
|
479
|
-
exposes: {
|
|
480
|
-
type: "array",
|
|
481
|
-
items: {
|
|
482
|
-
type: "object",
|
|
483
|
-
properties: {
|
|
484
|
-
name: {
|
|
485
|
-
type: "string",
|
|
486
|
-
description: "The name of the module - should be used when importing the module from another application"
|
|
487
|
-
},
|
|
488
|
-
path: {
|
|
489
|
-
type: "string",
|
|
490
|
-
description: "Relative path to the module within its `application`"
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
|
-
required: ["name", "path"]
|
|
494
|
-
},
|
|
495
|
-
description: "Modules that are exposed by this application"
|
|
496
|
-
},
|
|
497
|
-
uses: {
|
|
498
|
-
type: "array",
|
|
499
|
-
items: {
|
|
500
|
-
type: "string"
|
|
501
|
-
},
|
|
502
|
-
description: "Modules that are used by this application. Only the name of the module is required."
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
vercel: {
|
|
507
|
-
$ref: "#/definitions/Vercel"
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
required: ["default", "development", "production"]
|
|
511
|
-
},
|
|
512
|
-
Routing: {
|
|
513
|
-
type: "object",
|
|
514
|
-
properties: {
|
|
515
|
-
assetPrefix: {
|
|
516
|
-
type: "string",
|
|
517
|
-
description: "[assetPrefix] for the application"
|
|
518
|
-
},
|
|
519
|
-
matches: {
|
|
520
|
-
type: "array",
|
|
521
|
-
items: {
|
|
522
|
-
$ref: "#/definitions/PathGroup"
|
|
523
|
-
},
|
|
524
|
-
description: "Path expressions that are routed to this application."
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
required: ["matches"]
|
|
528
|
-
},
|
|
529
|
-
PathGroup: {
|
|
530
|
-
type: "object",
|
|
531
|
-
properties: {
|
|
532
|
-
group: {
|
|
533
|
-
type: "string",
|
|
534
|
-
description: "Optional group name for the paths"
|
|
535
|
-
},
|
|
536
|
-
options: {
|
|
537
|
-
type: "object",
|
|
538
|
-
properties: {
|
|
539
|
-
flag: {
|
|
540
|
-
type: "string",
|
|
541
|
-
description: "flag name that can be used to enable/disable all paths in the group"
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
paths: {
|
|
546
|
-
type: "array",
|
|
547
|
-
items: {
|
|
548
|
-
type: "string"
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
required: ["paths"]
|
|
553
|
-
},
|
|
554
|
-
HostConfig: {
|
|
555
|
-
type: "object",
|
|
556
|
-
properties: {
|
|
557
|
-
protocol: {
|
|
558
|
-
type: "string",
|
|
559
|
-
enum: ["http", "https"],
|
|
560
|
-
description: 'The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n* @defaultValue "https"'
|
|
561
|
-
},
|
|
562
|
-
host: {
|
|
563
|
-
type: "string",
|
|
564
|
-
description: "The hostname or IP address of the server. This can be a domain name (e.g., `example.com`) or an IP address (e.g., `192.168.1.1`)."
|
|
565
|
-
},
|
|
566
|
-
port: {
|
|
567
|
-
type: "number",
|
|
568
|
-
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS.\n\nThis field is optional and can be omitted if the default ports for the specified protocol are used"
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
required: ["host"]
|
|
572
|
-
},
|
|
573
|
-
Vercel: {
|
|
574
|
-
type: "object",
|
|
575
|
-
properties: {
|
|
576
|
-
projectId: {
|
|
577
|
-
type: "string",
|
|
578
|
-
description: "Vercel project ID"
|
|
579
|
-
},
|
|
580
|
-
projectName: {
|
|
581
|
-
type: "string",
|
|
582
|
-
description: "Vercel project name (temporary until we can use project ID)"
|
|
583
|
-
},
|
|
584
|
-
defaultRoute: {
|
|
585
|
-
type: "string",
|
|
586
|
-
description: "The default route for the application. Used to render screenshots, favicons, and provide direct zone links"
|
|
587
|
-
},
|
|
588
|
-
routeSpeedInsightsToDefaultZone: {
|
|
589
|
-
type: "boolean",
|
|
590
|
-
description: "Whether to route Speed Insights to the default zone or each individual microfrontend."
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
|
-
required: ["projectId"]
|
|
594
|
-
},
|
|
595
|
-
CommonApplicationConfig: {
|
|
596
|
-
type: "object",
|
|
597
|
-
properties: {
|
|
598
|
-
default: {
|
|
599
|
-
type: "boolean",
|
|
600
|
-
const: false,
|
|
601
|
-
description: "The default application is used no other application is matched via the routing config"
|
|
602
|
-
},
|
|
603
|
-
routing: {
|
|
604
|
-
$ref: "#/definitions/Routing"
|
|
605
|
-
},
|
|
606
|
-
development: {
|
|
607
|
-
type: "object",
|
|
608
|
-
properties: {
|
|
609
|
-
local: {
|
|
610
|
-
$ref: "#/definitions/HostConfig"
|
|
611
|
-
},
|
|
612
|
-
fallback: {
|
|
613
|
-
$ref: "#/definitions/HostConfig",
|
|
614
|
-
description: "Fallback for local development, could be a host config that points to any environment. If this is not provided, or the application is not running - requests to the application in local development will error."
|
|
615
|
-
},
|
|
616
|
-
task: {
|
|
617
|
-
type: "string",
|
|
618
|
-
description: "Optional task to run when starting the development server. Should reference a script in the package.json of the application."
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
required: ["local"]
|
|
622
|
-
},
|
|
623
|
-
production: {
|
|
624
|
-
$ref: "#/definitions/HostConfig"
|
|
625
|
-
},
|
|
626
|
-
metadata: {
|
|
627
|
-
type: "object",
|
|
628
|
-
additionalProperties: {
|
|
629
|
-
type: "string"
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
federation: {
|
|
633
|
-
type: "object",
|
|
634
|
-
properties: {
|
|
635
|
-
exposes: {
|
|
636
|
-
type: "array",
|
|
637
|
-
items: {
|
|
638
|
-
type: "object",
|
|
639
|
-
properties: {
|
|
640
|
-
name: {
|
|
641
|
-
type: "string",
|
|
642
|
-
description: "The name of the module - should be used when importing the module from another application"
|
|
643
|
-
},
|
|
644
|
-
path: {
|
|
645
|
-
type: "string",
|
|
646
|
-
description: "Relative path to the module within its `application`"
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
required: ["name", "path"]
|
|
650
|
-
},
|
|
651
|
-
description: "Modules that are exposed by this application"
|
|
652
|
-
},
|
|
653
|
-
uses: {
|
|
654
|
-
type: "array",
|
|
655
|
-
items: {
|
|
656
|
-
type: "string"
|
|
657
|
-
},
|
|
658
|
-
description: "Modules that are used by this application. Only the name of the module is required."
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
vercel: {
|
|
663
|
-
$ref: "#/definitions/Vercel"
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
required: ["default", "development", "production", "routing"]
|
|
667
|
-
},
|
|
668
|
-
Options: {
|
|
669
|
-
type: "object",
|
|
670
|
-
properties: {
|
|
671
|
-
vercel: {
|
|
672
|
-
$ref: "#/definitions/VercelOptions",
|
|
673
|
-
description: "Micro-Frontends wide options for Vercel."
|
|
674
|
-
},
|
|
675
|
-
localProxy: {
|
|
676
|
-
$ref: "#/definitions/LocalProxyOptions",
|
|
677
|
-
description: "Options for local proxy."
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
VercelOptions: {
|
|
682
|
-
type: "object",
|
|
683
|
-
properties: {
|
|
684
|
-
previewDeploymentSuffix: {
|
|
685
|
-
type: "string",
|
|
686
|
-
description: "If your team uses a custom Preview Deployment Suffix, please specify it here. See https://vercel.com/docs/deployments/preview-deployment-suffix. The default is `vercel.app`."
|
|
687
|
-
},
|
|
688
|
-
teamSlug: {
|
|
689
|
-
type: "string",
|
|
690
|
-
description: "Team slug for the Vercel team"
|
|
691
|
-
},
|
|
692
|
-
disableOverrides: {
|
|
693
|
-
type: "boolean",
|
|
694
|
-
description: "If you want to disable the overrides for the site. For example, if you are managing rewrites between applications externally, you may wish to disable the overrides on the toolbar as they will have no effect."
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
LocalProxyOptions: {
|
|
699
|
-
type: "object",
|
|
700
|
-
properties: {
|
|
701
|
-
port: {
|
|
702
|
-
type: "number",
|
|
703
|
-
description: "The port number used by the local proxy server.\n\nThe default is `3024`."
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
// src/config/utils/load-schema.ts
|
|
711
|
-
var SCHEMA2 = schema_default;
|
|
712
|
-
|
|
713
|
-
// src/config/validation.ts
|
|
714
|
-
var validateSchema2 = (configString) => {
|
|
715
|
-
const parsedConfig = (0, import_jsonc_parser2.parse)(configString);
|
|
716
|
-
const ajv = new import_ajv2.Ajv();
|
|
717
|
-
const validate = ajv.compile(SCHEMA2);
|
|
718
|
-
const isValid = validate(parsedConfig);
|
|
719
|
-
if (!isValid) {
|
|
720
|
-
throw new MicrofrontendError(
|
|
721
|
-
`Invalid config: ${ajv.errorsText(validate.errors)}`,
|
|
722
|
-
{ type: "config", subtype: "does_not_match_schema" }
|
|
723
|
-
);
|
|
724
|
-
}
|
|
725
|
-
return parsedConfig;
|
|
726
|
-
};
|
|
727
398
|
// Annotate the CommonJS export names for ESM import in node:
|
|
728
399
|
0 && (module.exports = {
|
|
729
|
-
|
|
730
|
-
validateV2Schema
|
|
400
|
+
validateSchema
|
|
731
401
|
});
|
|
732
402
|
//# sourceMappingURL=validation.cjs.map
|