@vercel/microfrontends 0.17.4 → 0.19.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/README.md +7 -159
- package/dist/bin/cli.cjs +202 -139
- package/dist/config.cjs +103 -57
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.js +103 -57
- package/dist/config.js.map +1 -1
- package/dist/{index-f094deb1.d.ts → index-09b1ddf9.d.ts} +16 -19
- package/dist/{index-5fcf0863.d.ts → index-2f78c0ca.d.ts} +44 -17
- package/dist/microfrontends/server.cjs +180 -133
- package/dist/microfrontends/server.cjs.map +1 -1
- package/dist/microfrontends/server.d.ts +4 -4
- package/dist/microfrontends/server.js +180 -133
- package/dist/microfrontends/server.js.map +1 -1
- package/dist/microfrontends.cjs +104 -58
- package/dist/microfrontends.cjs.map +1 -1
- package/dist/microfrontends.d.ts +4 -4
- package/dist/microfrontends.js +104 -58
- package/dist/microfrontends.js.map +1 -1
- package/dist/next/client.cjs +1 -1
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.ts +1 -1
- package/dist/next/client.js +1 -1
- package/dist/next/client.js.map +1 -1
- package/dist/next/config.cjs +197 -145
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +197 -145
- package/dist/next/config.js.map +1 -1
- package/dist/next/endpoints.d.ts +2 -2
- package/dist/next/middleware.cjs +121 -80
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.js +121 -80
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.cjs +110 -63
- package/dist/next/testing.cjs.map +1 -1
- package/dist/next/testing.d.ts +4 -4
- package/dist/next/testing.js +110 -63
- package/dist/next/testing.js.map +1 -1
- package/dist/overrides.d.ts +3 -3
- package/dist/schema.d.ts +1 -1
- package/dist/{types-5900be7c.d.ts → types-4ef2bddb.d.ts} +1 -1
- package/dist/{types-ecd7b91b.d.ts → types-b6d38aea.d.ts} +1 -1
- package/dist/utils/mfe-port.cjs +181 -134
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +181 -134
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.cjs +74 -73
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +74 -73
- package/dist/validation.js.map +1 -1
- package/package.json +19 -3
- package/schema/schema.json +80 -73
package/schema/schema.json
CHANGED
|
@@ -25,16 +25,6 @@
|
|
|
25
25
|
"options": {
|
|
26
26
|
"$ref": "#/definitions/Options"
|
|
27
27
|
},
|
|
28
|
-
"remotes": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"additionalProperties": {
|
|
31
|
-
"$ref": "#/definitions/Application"
|
|
32
|
-
},
|
|
33
|
-
"propertyNames": {
|
|
34
|
-
"description": "The unique identifier for a Microfrontend Application. Must match the `name` field of the application's `package.json`."
|
|
35
|
-
},
|
|
36
|
-
"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."
|
|
37
|
-
},
|
|
38
28
|
"applications": {
|
|
39
29
|
"$ref": "#/definitions/ApplicationRouting",
|
|
40
30
|
"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"
|
|
@@ -50,11 +40,21 @@
|
|
|
50
40
|
"properties": {
|
|
51
41
|
"vercel": {
|
|
52
42
|
"$ref": "#/definitions/VercelOptions",
|
|
53
|
-
"description": "
|
|
43
|
+
"description": "Microfrontends wide options for Vercel.",
|
|
44
|
+
"deprecated": "This is being replaced by the `disableOverrides` field below."
|
|
45
|
+
},
|
|
46
|
+
"disableOverrides": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"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."
|
|
54
49
|
},
|
|
55
50
|
"localProxy": {
|
|
56
51
|
"$ref": "#/definitions/LocalProxyOptions",
|
|
57
|
-
"description": "Options for local proxy."
|
|
52
|
+
"description": "Options for local proxy.",
|
|
53
|
+
"deprecated": "This is being replaced by the `localProxyPort` field below."
|
|
54
|
+
},
|
|
55
|
+
"localProxyPort": {
|
|
56
|
+
"type": "number",
|
|
57
|
+
"description": "The port number used by the local proxy server.\n\nThe default is `3024`."
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"additionalProperties": false
|
|
@@ -62,10 +62,6 @@
|
|
|
62
62
|
"VercelOptions": {
|
|
63
63
|
"type": "object",
|
|
64
64
|
"properties": {
|
|
65
|
-
"teamSlug": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"description": "Team slug for the Vercel team"
|
|
68
|
-
},
|
|
69
65
|
"disableOverrides": {
|
|
70
66
|
"type": "boolean",
|
|
71
67
|
"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."
|
|
@@ -83,6 +79,15 @@
|
|
|
83
79
|
},
|
|
84
80
|
"additionalProperties": false
|
|
85
81
|
},
|
|
82
|
+
"ApplicationRouting": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": {
|
|
85
|
+
"$ref": "#/definitions/Application"
|
|
86
|
+
},
|
|
87
|
+
"propertyNames": {
|
|
88
|
+
"description": "The unique identifier for a Microfrontend Application. Must match the `name` field of the application's `package.json`."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
86
91
|
"Application": {
|
|
87
92
|
"anyOf": [
|
|
88
93
|
{
|
|
@@ -97,18 +102,21 @@
|
|
|
97
102
|
"type": "object",
|
|
98
103
|
"properties": {
|
|
99
104
|
"vercel": {
|
|
100
|
-
"$ref": "#/definitions/Vercel"
|
|
105
|
+
"$ref": "#/definitions/Vercel",
|
|
106
|
+
"deprecated": "This is being replaced by the `projectId` field below."
|
|
101
107
|
},
|
|
102
|
-
"
|
|
103
|
-
"
|
|
108
|
+
"projectId": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Vercel project ID"
|
|
104
111
|
},
|
|
105
112
|
"production": {
|
|
106
|
-
"$ref": "#/definitions/HostConfig"
|
|
113
|
+
"$ref": "#/definitions/HostConfig",
|
|
114
|
+
"deprecated": "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
115
|
+
},
|
|
116
|
+
"development": {
|
|
117
|
+
"$ref": "#/definitions/Development"
|
|
107
118
|
}
|
|
108
119
|
},
|
|
109
|
-
"required": [
|
|
110
|
-
"production"
|
|
111
|
-
],
|
|
112
120
|
"additionalProperties": false
|
|
113
121
|
},
|
|
114
122
|
"Vercel": {
|
|
@@ -124,15 +132,52 @@
|
|
|
124
132
|
],
|
|
125
133
|
"additionalProperties": false
|
|
126
134
|
},
|
|
135
|
+
"HostConfig": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"protocol": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"enum": [
|
|
141
|
+
"http",
|
|
142
|
+
"https"
|
|
143
|
+
],
|
|
144
|
+
"description": "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
145
|
+
},
|
|
146
|
+
"host": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"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`)."
|
|
149
|
+
},
|
|
150
|
+
"port": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"description": "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [
|
|
156
|
+
"host"
|
|
157
|
+
],
|
|
158
|
+
"additionalProperties": false
|
|
159
|
+
},
|
|
127
160
|
"Development": {
|
|
128
161
|
"type": "object",
|
|
129
162
|
"properties": {
|
|
130
163
|
"local": {
|
|
131
|
-
"$ref": "#/definitions/LocalHostConfig"
|
|
164
|
+
"$ref": "#/definitions/LocalHostConfig",
|
|
165
|
+
"deprecated": "This is being replaced by the `localPort` field below."
|
|
166
|
+
},
|
|
167
|
+
"localPort": {
|
|
168
|
+
"type": "number",
|
|
169
|
+
"description": "The local port number that this application runs on when it is running locally. Common values include `80` for HTTP and `443` for HTTPS."
|
|
132
170
|
},
|
|
133
171
|
"fallback": {
|
|
134
|
-
"
|
|
135
|
-
|
|
172
|
+
"anyOf": [
|
|
173
|
+
{
|
|
174
|
+
"$ref": "#/definitions/HostConfig"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"type": "string"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"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.\n\nIf passing a string, include the protocol (optional), host (required) and port (optional). For example: `https://this.ismyhost:8080`. If omitted, the protocol defaults to HTTPS. If omitted, the port defaults to `80` for HTTP and `443` for HTTPS."
|
|
136
181
|
},
|
|
137
182
|
"task": {
|
|
138
183
|
"type": "string",
|
|
@@ -163,36 +208,20 @@
|
|
|
163
208
|
}
|
|
164
209
|
}
|
|
165
210
|
},
|
|
166
|
-
"
|
|
211
|
+
"ChildApplication": {
|
|
167
212
|
"type": "object",
|
|
168
213
|
"properties": {
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"http",
|
|
173
|
-
"https"
|
|
174
|
-
],
|
|
175
|
-
"description": "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
214
|
+
"vercel": {
|
|
215
|
+
"$ref": "#/definitions/Vercel",
|
|
216
|
+
"deprecated": "This is being replaced by the `projectId` field below."
|
|
176
217
|
},
|
|
177
|
-
"
|
|
218
|
+
"projectId": {
|
|
178
219
|
"type": "string",
|
|
179
|
-
"description": "
|
|
220
|
+
"description": "Vercel project ID"
|
|
180
221
|
},
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
"required": [
|
|
187
|
-
"host"
|
|
188
|
-
],
|
|
189
|
-
"additionalProperties": false
|
|
190
|
-
},
|
|
191
|
-
"ChildApplication": {
|
|
192
|
-
"type": "object",
|
|
193
|
-
"properties": {
|
|
194
|
-
"vercel": {
|
|
195
|
-
"$ref": "#/definitions/Vercel"
|
|
222
|
+
"production": {
|
|
223
|
+
"$ref": "#/definitions/HostConfig",
|
|
224
|
+
"deprecated": "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
196
225
|
},
|
|
197
226
|
"development": {
|
|
198
227
|
"$ref": "#/definitions/Development"
|
|
@@ -200,9 +229,6 @@
|
|
|
200
229
|
"routing": {
|
|
201
230
|
"$ref": "#/definitions/Routing",
|
|
202
231
|
"description": "Groups of path expressions that are routed to this application."
|
|
203
|
-
},
|
|
204
|
-
"production": {
|
|
205
|
-
"$ref": "#/definitions/HostConfig"
|
|
206
232
|
}
|
|
207
233
|
},
|
|
208
234
|
"required": [
|
|
@@ -239,15 +265,6 @@
|
|
|
239
265
|
],
|
|
240
266
|
"additionalProperties": false
|
|
241
267
|
},
|
|
242
|
-
"ApplicationRouting": {
|
|
243
|
-
"type": "object",
|
|
244
|
-
"additionalProperties": {
|
|
245
|
-
"$ref": "#/definitions/Application"
|
|
246
|
-
},
|
|
247
|
-
"propertyNames": {
|
|
248
|
-
"description": "The unique identifier for a Microfrontend Application. Must match the `name` field of the application's `package.json`."
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
268
|
"ChildConfig": {
|
|
252
269
|
"type": "object",
|
|
253
270
|
"properties": {
|
|
@@ -261,16 +278,6 @@
|
|
|
261
278
|
"options": {
|
|
262
279
|
"$ref": "#/definitions/Options"
|
|
263
280
|
},
|
|
264
|
-
"remotes": {
|
|
265
|
-
"type": "object",
|
|
266
|
-
"additionalProperties": {
|
|
267
|
-
"$ref": "#/definitions/Application"
|
|
268
|
-
},
|
|
269
|
-
"propertyNames": {
|
|
270
|
-
"description": "The unique identifier for a Microfrontend Application. Must match the `name` field of the application's `package.json`."
|
|
271
|
-
},
|
|
272
|
-
"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."
|
|
273
|
-
},
|
|
274
281
|
"partOf": {
|
|
275
282
|
"type": "string",
|
|
276
283
|
"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."
|