@vmz/vmz 0.1.7 → 0.1.8
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/locale-router.js +26 -8
- package/package.json +12 -12
package/dist/locale-router.js
CHANGED
|
@@ -90,16 +90,34 @@ export function buildLocaleRouteRealizationTable(input) {
|
|
|
90
90
|
pathPattern: normalizePath(route.path),
|
|
91
91
|
};
|
|
92
92
|
realizations.push(entry);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
// `none` / `domain`: LocaleId is Host preference — many locales share one URL path.
|
|
94
|
+
// Collision only when *different RouteIds* claim the same path.
|
|
95
|
+
if (routing.strategy === 'none' || routing.strategy === 'domain') {
|
|
96
|
+
const prevRoute = pathOwners.get(entry.path);
|
|
97
|
+
if (prevRoute && prevRoute !== route.routeId) {
|
|
98
|
+
diagnostics.push({
|
|
99
|
+
code: DIAG_LOCALE_ROUTE_COLLISION,
|
|
100
|
+
severity: 'error',
|
|
101
|
+
message: `path ${entry.path} claimed by ${prevRoute} and ${route.routeId}`,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
pathOwners.set(entry.path, route.routeId);
|
|
106
|
+
}
|
|
100
107
|
}
|
|
101
108
|
else {
|
|
102
|
-
|
|
109
|
+
const owner = `${route.routeId}@${localeId}`;
|
|
110
|
+
const prev = pathOwners.get(entry.path);
|
|
111
|
+
if (prev && prev !== owner) {
|
|
112
|
+
diagnostics.push({
|
|
113
|
+
code: DIAG_LOCALE_ROUTE_COLLISION,
|
|
114
|
+
severity: 'error',
|
|
115
|
+
message: `path ${entry.path} claimed by ${prev} and ${owner}`,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
pathOwners.set(entry.path, owner);
|
|
120
|
+
}
|
|
103
121
|
}
|
|
104
122
|
}
|
|
105
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/vmz",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VMZ Node toolchain — N-API workspace session + CLI (publish name @vmz/vmz)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@vmz/core": "0.1.
|
|
52
|
-
"@vmz/plugin": "0.1.
|
|
53
|
-
"@vmz/protocol": "0.1.
|
|
51
|
+
"@vmz/core": "0.1.8",
|
|
52
|
+
"@vmz/plugin": "0.1.8",
|
|
53
|
+
"@vmz/protocol": "0.1.8",
|
|
54
54
|
"jiti": "^2.6.1",
|
|
55
55
|
"json5": "^2.2.3"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@vmz/plugin-markdown-it": "0.1.
|
|
59
|
-
"@vmz/test": "0.1.
|
|
58
|
+
"@vmz/plugin-markdown-it": "0.1.8",
|
|
59
|
+
"@vmz/test": "0.1.8",
|
|
60
60
|
"typescript": "^5.8.3"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|
|
@@ -90,12 +90,12 @@
|
|
|
90
90
|
"cli"
|
|
91
91
|
],
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@vmz/vmz-win32-x64": "0.1.
|
|
94
|
-
"@vmz/vmz-win32-arm64": "0.1.
|
|
95
|
-
"@vmz/vmz-darwin-x64": "0.1.
|
|
96
|
-
"@vmz/vmz-darwin-arm64": "0.1.
|
|
97
|
-
"@vmz/vmz-linux-x64": "0.1.
|
|
98
|
-
"@vmz/vmz-linux-arm64": "0.1.
|
|
93
|
+
"@vmz/vmz-win32-x64": "0.1.8",
|
|
94
|
+
"@vmz/vmz-win32-arm64": "0.1.8",
|
|
95
|
+
"@vmz/vmz-darwin-x64": "0.1.8",
|
|
96
|
+
"@vmz/vmz-darwin-arm64": "0.1.8",
|
|
97
|
+
"@vmz/vmz-linux-x64": "0.1.8",
|
|
98
|
+
"@vmz/vmz-linux-arm64": "0.1.8"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": {
|
|
101
101
|
"access": "public"
|