@vercel/microfrontends 2.0.0 → 2.0.1
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/CHANGELOG.md +9 -0
- package/dist/bin/cli.cjs +180 -63
- package/dist/config.cjs +5 -4
- package/dist/config.cjs.map +1 -1
- package/dist/config.js +5 -4
- package/dist/config.js.map +1 -1
- package/dist/experimental/sveltekit.cjs +5 -4
- package/dist/experimental/sveltekit.cjs.map +1 -1
- package/dist/experimental/sveltekit.js +5 -4
- package/dist/experimental/sveltekit.js.map +1 -1
- package/dist/experimental/vite.cjs +5 -4
- package/dist/experimental/vite.cjs.map +1 -1
- package/dist/experimental/vite.js +5 -4
- package/dist/experimental/vite.js.map +1 -1
- package/dist/microfrontends/server.cjs +5 -4
- package/dist/microfrontends/server.cjs.map +1 -1
- package/dist/microfrontends/server.js +5 -4
- package/dist/microfrontends/server.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 +15 -1
- package/dist/next/client.js +1 -1
- package/dist/next/client.js.map +1 -1
- package/dist/next/config.cjs +5 -4
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +5 -4
- package/dist/next/config.js.map +1 -1
- package/dist/next/middleware.cjs +5 -4
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.js +5 -4
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.cjs +5 -4
- package/dist/next/testing.cjs.map +1 -1
- package/dist/next/testing.js +5 -4
- package/dist/next/testing.js.map +1 -1
- package/dist/utils/mfe-port.cjs +20 -24
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +20 -24
- package/dist/utils/mfe-port.js.map +1 -1
- package/package.json +4 -4
package/dist/next/config.js
CHANGED
|
@@ -423,7 +423,7 @@ var MicrofrontendConfigClient = class {
|
|
|
423
423
|
static fromEnv(config) {
|
|
424
424
|
if (!config) {
|
|
425
425
|
throw new Error(
|
|
426
|
-
"Could not construct MicrofrontendConfigClient: configuration is empty or undefined. Did you set up your application with `withMicrofrontends`?"
|
|
426
|
+
"Could not construct MicrofrontendConfigClient: configuration is empty or undefined. Did you set up your application with `withMicrofrontends`? Is the local proxy running and this application is being accessed via the proxy port? See https://vercel.com/docs/microfrontends/local-development#setting-up-microfrontends-proxy"
|
|
427
427
|
);
|
|
428
428
|
}
|
|
429
429
|
return new MicrofrontendConfigClient(JSON.parse(config));
|
|
@@ -563,10 +563,11 @@ function validatePathExpression(path6) {
|
|
|
563
563
|
}
|
|
564
564
|
if (token.pattern !== PATH_DEFAULT_PATTERN && // Allows (a|b|c) and ((?!a|b|c).*) regex
|
|
565
565
|
// Only limited regex is supported for now, due to performance considerations
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
// Allows all letters, numbers, and hyphens. Other characters must be escaped.
|
|
567
|
+
!/^(?<allowed>[\w-~]+(?:\|[^:|()]+)+)$|^\(\?!(?<disallowed>[\w-~]+(?:\|[^:|()]+)*)\)\.\*$/.test(
|
|
568
|
+
token.pattern.replace(/\\./g, "")
|
|
568
569
|
)) {
|
|
569
|
-
return `Path ${path6} cannot use unsupported regular expression wildcard`;
|
|
570
|
+
return `Path ${path6} cannot use unsupported regular expression wildcard. If the path includes special characters, they must be escaped with backslash (e.g. '\\(')`;
|
|
570
571
|
}
|
|
571
572
|
if (token.modifier && i !== tokens.length - 1) {
|
|
572
573
|
return `Modifier ${token.modifier} is not allowed on wildcard :${token.name} in ${path6}. Modifiers are only allowed in the last path component`;
|