runcloud 0.2.172 → 0.2.173
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/commands/appStoreEvaluate.js +12 -11
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.173.tgz +0 -0
- package/runcloud-0.2.172.tgz +0 -0
|
@@ -303,12 +303,10 @@ function evaluateDuplicateRoutes(root, item) {
|
|
|
303
303
|
return makeItem(item, 'pass', 'No Expo Router app directory found.', 'scan: app/ directory absent');
|
|
304
304
|
const routes = new Map();
|
|
305
305
|
for (const file of walkFiles(appDir)) {
|
|
306
|
-
if (!/\.(tsx|ts|jsx|js)$/.test(file)
|
|
306
|
+
if (!/\.(tsx|ts|jsx|js)$/.test(file))
|
|
307
307
|
continue;
|
|
308
|
-
const route
|
|
309
|
-
|
|
310
|
-
current.push(toRel(root, file));
|
|
311
|
-
routes.set(route, current);
|
|
308
|
+
for (const route of routeKeys(appDir, file))
|
|
309
|
+
routes.set(route, [...(routes.get(route) ?? []), toRel(root, file)]);
|
|
312
310
|
}
|
|
313
311
|
const duplicates = [...routes.entries()].filter(([, files]) => files.length > 1);
|
|
314
312
|
if (!duplicates.length)
|
|
@@ -571,12 +569,15 @@ function routerDir(root) {
|
|
|
571
569
|
const src = path.join(root, 'src', 'app');
|
|
572
570
|
return safeStat(src)?.isDirectory() ? src : path.join(root, 'app');
|
|
573
571
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
572
|
+
function routeKeys(appDir, file) {
|
|
573
|
+
let keys = [''];
|
|
574
|
+
for (const part of toRel(appDir, file).replace(/\.(tsx|ts|jsx|js)$/, '').split('/')) {
|
|
575
|
+
let options = /^\(.+,.+\)$/.test(part) ? part.slice(1, -1).split(',').map((group) => `(${group})`) : [part];
|
|
576
|
+
if (keys.length * options.length > 64)
|
|
577
|
+
options = [part];
|
|
578
|
+
keys = keys.flatMap((key) => options.map((option) => `${key}/${option}`));
|
|
579
|
+
}
|
|
580
|
+
return keys;
|
|
580
581
|
}
|
|
581
582
|
function evidence(matches) {
|
|
582
583
|
return matches.slice(0, 5).map((match) => `${match.file}:${match.line}: ${match.text}`).join('\n');
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.173';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.2.172.tgz
DELETED
|
Binary file
|