fixed version control heatmap and activity

This commit is contained in:
will
2026-04-02 20:38:56 +01:00
parent 1da5da43e1
commit 250a7030bf
1777 changed files with 170575 additions and 83 deletions

View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AppPageRouteMatcherProvider", {
enumerable: true,
get: function() {
return AppPageRouteMatcherProvider;
}
});
const _isapppageroute = require("../../../lib/is-app-page-route");
const _constants = require("../../../shared/lib/constants");
const _app = require("../normalizers/built/app");
const _routekind = require("../route-kind");
const _apppageroutematcher = require("../route-matchers/app-page-route-matcher");
const _manifestroutematcherprovider = require("./manifest-route-matcher-provider");
class AppPageRouteMatcherProvider extends _manifestroutematcherprovider.ManifestRouteMatcherProvider {
constructor(distDir, manifestLoader){
super(_constants.APP_PATHS_MANIFEST, manifestLoader);
this.normalizers = new _app.AppNormalizers(distDir);
}
async transform(manifest) {
// This matcher only matches app pages.
const pages = Object.keys(manifest).filter((page)=>(0, _isapppageroute.isAppPageRoute)(page));
// Collect all the app paths for each page. This could include any parallel
// routes.
const allAppPaths = {};
for (const page of pages){
const pathname = this.normalizers.pathname.normalize(page);
if (pathname in allAppPaths) allAppPaths[pathname].push(page);
else allAppPaths[pathname] = [
page
];
}
// Format the routes.
const matchers = [];
for (const [pathname, appPaths] of Object.entries(allAppPaths)){
// TODO-APP: (wyattjoh) this is a hack right now, should be more deterministic
const page = appPaths[0];
const filename = this.normalizers.filename.normalize(manifest[page]);
const bundlePath = this.normalizers.bundlePath.normalize(page);
matchers.push(new _apppageroutematcher.AppPageRouteMatcher({
kind: _routekind.RouteKind.APP_PAGE,
pathname,
page,
bundlePath,
filename,
appPaths
}));
}
return matchers;
}
}
//# sourceMappingURL=app-page-route-matcher-provider.js.map

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AppRouteRouteMatcherProvider", {
enumerable: true,
get: function() {
return AppRouteRouteMatcherProvider;
}
});
const _isapprouteroute = require("../../../lib/is-app-route-route");
const _constants = require("../../../shared/lib/constants");
const _routekind = require("../route-kind");
const _approuteroutematcher = require("../route-matchers/app-route-route-matcher");
const _manifestroutematcherprovider = require("./manifest-route-matcher-provider");
const _app = require("../normalizers/built/app");
class AppRouteRouteMatcherProvider extends _manifestroutematcherprovider.ManifestRouteMatcherProvider {
constructor(distDir, manifestLoader){
super(_constants.APP_PATHS_MANIFEST, manifestLoader);
this.normalizers = new _app.AppNormalizers(distDir);
}
async transform(manifest) {
// This matcher only matches app routes.
const pages = Object.keys(manifest).filter((page)=>(0, _isapprouteroute.isAppRouteRoute)(page));
// Format the routes.
const matchers = [];
for (const page of pages){
const filename = this.normalizers.filename.normalize(manifest[page]);
const pathname = this.normalizers.pathname.normalize(page);
const bundlePath = this.normalizers.bundlePath.normalize(page);
matchers.push(new _approuteroutematcher.AppRouteRouteMatcher({
kind: _routekind.RouteKind.APP_ROUTE,
pathname,
page,
bundlePath,
filename
}));
}
return matchers;
}
}
//# sourceMappingURL=app-route-route-matcher-provider.js.map

View File

@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevAppPageRouteMatcherProvider", {
enumerable: true,
get: function() {
return DevAppPageRouteMatcherProvider;
}
});
const _apppageroutematcher = require("../../route-matchers/app-page-route-matcher");
const _routekind = require("../../route-kind");
const _filecacheroutematcherprovider = require("./file-cache-route-matcher-provider");
const _app = require("../../normalizers/built/app");
const _normalizecatchallroutes = require("../../../../build/normalize-catchall-routes");
class DevAppPageRouteMatcherProvider extends _filecacheroutematcherprovider.FileCacheRouteMatcherProvider {
constructor(appDir, extensions, reader){
super(appDir, reader);
this.normalizers = new _app.DevAppNormalizers(appDir, extensions);
// Match any page file that ends with `/page.${extension}` or `/default.${extension}` under the app
// directory.
this.expression = new RegExp(`[/\\\\](page|default)\\.(?:${extensions.join("|")})$`);
}
async transform(files) {
// Collect all the app paths for each page. This could include any parallel
// routes.
const cache = new Map();
const routeFilenames = new Array();
let appPaths = {};
for (const filename of files){
// If the file isn't a match for this matcher, then skip it.
if (!this.expression.test(filename)) continue;
const page = this.normalizers.page.normalize(filename);
// Validate that this is not an ignored page.
if (page.includes("/_")) continue;
// This is a valid file that we want to create a matcher for.
routeFilenames.push(filename);
const pathname = this.normalizers.pathname.normalize(filename);
const bundlePath = this.normalizers.bundlePath.normalize(filename);
// Save the normalization results.
cache.set(filename, {
page,
pathname,
bundlePath
});
if (pathname in appPaths) appPaths[pathname].push(page);
else appPaths[pathname] = [
page
];
}
(0, _normalizecatchallroutes.normalizeCatchAllRoutes)(appPaths);
// Make sure to sort parallel routes to make the result deterministic.
appPaths = Object.fromEntries(Object.entries(appPaths).map(([k, v])=>[
k,
v.sort()
]));
const matchers = [];
for (const filename of routeFilenames){
// Grab the cached values (and the appPaths).
const cached = cache.get(filename);
if (!cached) {
throw new Error("Invariant: expected filename to exist in cache");
}
const { pathname, page, bundlePath } = cached;
matchers.push(new _apppageroutematcher.AppPageRouteMatcher({
kind: _routekind.RouteKind.APP_PAGE,
pathname,
page,
bundlePath,
filename,
appPaths: appPaths[pathname]
}));
}
return matchers;
}
}
//# sourceMappingURL=dev-app-page-route-matcher-provider.js.map

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevAppRouteRouteMatcherProvider", {
enumerable: true,
get: function() {
return DevAppRouteRouteMatcherProvider;
}
});
const _approuteroutematcher = require("../../route-matchers/app-route-route-matcher");
const _routekind = require("../../route-kind");
const _filecacheroutematcherprovider = require("./file-cache-route-matcher-provider");
const _isapprouteroute = require("../../../../lib/is-app-route-route");
const _app = require("../../normalizers/built/app");
class DevAppRouteRouteMatcherProvider extends _filecacheroutematcherprovider.FileCacheRouteMatcherProvider {
constructor(appDir, extensions, reader){
super(appDir, reader);
this.normalizers = new _app.DevAppNormalizers(appDir, extensions);
}
async transform(files) {
const matchers = [];
for (const filename of files){
const page = this.normalizers.page.normalize(filename);
// If the file isn't a match for this matcher, then skip it.
if (!(0, _isapprouteroute.isAppRouteRoute)(page)) continue;
// Validate that this is not an ignored page.
if (page.includes("/_")) continue;
const pathname = this.normalizers.pathname.normalize(filename);
const bundlePath = this.normalizers.bundlePath.normalize(filename);
matchers.push(new _approuteroutematcher.AppRouteRouteMatcher({
kind: _routekind.RouteKind.APP_ROUTE,
pathname,
page,
bundlePath,
filename
}));
}
return matchers;
}
}
//# sourceMappingURL=dev-app-route-route-matcher-provider.js.map

View File

@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevPagesAPIRouteMatcherProvider", {
enumerable: true,
get: function() {
return DevPagesAPIRouteMatcherProvider;
}
});
const _pagesapiroutematcher = require("../../route-matchers/pages-api-route-matcher");
const _routekind = require("../../route-kind");
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _filecacheroutematcherprovider = require("./file-cache-route-matcher-provider");
const _pages = require("../../normalizers/built/pages");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
class DevPagesAPIRouteMatcherProvider extends _filecacheroutematcherprovider.FileCacheRouteMatcherProvider {
constructor(pagesDir, extensions, reader, localeNormalizer){
super(pagesDir, reader);
this.pagesDir = pagesDir;
this.extensions = extensions;
this.localeNormalizer = localeNormalizer;
// Match any route file that ends with `/${filename}.${extension}` under the
// pages directory.
this.expression = new RegExp(`\\.(?:${extensions.join("|")})$`);
this.normalizers = new _pages.DevPagesNormalizers(pagesDir, extensions);
}
test(filename) {
// If the file does not end in the correct extension it's not a match.
if (!this.expression.test(filename)) return false;
// Pages API routes must exist in the pages directory with the `/api/`
// prefix. The pathnames being tested here though are the full filenames,
// so we need to include the pages directory.
// TODO: could path separator normalization be needed here?
if (filename.startsWith(_path.default.join(this.pagesDir, "/api/"))) return true;
for (const extension of this.extensions){
// We can also match if we have `pages/api.${extension}`, so check to
// see if it's a match.
if (filename === _path.default.join(this.pagesDir, `api.${extension}`)) {
return true;
}
}
return false;
}
async transform(files) {
const matchers = [];
for (const filename of files){
// If the file isn't a match for this matcher, then skip it.
if (!this.test(filename)) continue;
const pathname = this.normalizers.pathname.normalize(filename);
const page = this.normalizers.page.normalize(filename);
const bundlePath = this.normalizers.bundlePath.normalize(filename);
if (this.localeNormalizer) {
matchers.push(new _pagesapiroutematcher.PagesAPILocaleRouteMatcher({
kind: _routekind.RouteKind.PAGES_API,
pathname,
page,
bundlePath,
filename,
i18n: {}
}));
} else {
matchers.push(new _pagesapiroutematcher.PagesAPIRouteMatcher({
kind: _routekind.RouteKind.PAGES_API,
pathname,
page,
bundlePath,
filename
}));
}
}
return matchers;
}
}
//# sourceMappingURL=dev-pages-api-route-matcher-provider.js.map

View File

@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevPagesRouteMatcherProvider", {
enumerable: true,
get: function() {
return DevPagesRouteMatcherProvider;
}
});
const _pagesroutematcher = require("../../route-matchers/pages-route-matcher");
const _routekind = require("../../route-kind");
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _filecacheroutematcherprovider = require("./file-cache-route-matcher-provider");
const _pages = require("../../normalizers/built/pages");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
class DevPagesRouteMatcherProvider extends _filecacheroutematcherprovider.FileCacheRouteMatcherProvider {
constructor(pagesDir, extensions, reader, localeNormalizer){
super(pagesDir, reader);
this.pagesDir = pagesDir;
this.extensions = extensions;
this.localeNormalizer = localeNormalizer;
// Match any route file that ends with `/${filename}.${extension}` under the
// pages directory.
this.expression = new RegExp(`\\.(?:${extensions.join("|")})$`);
this.normalizers = new _pages.DevPagesNormalizers(pagesDir, extensions);
}
test(filename) {
// If the file does not end in the correct extension it's not a match.
if (!this.expression.test(filename)) return false;
// Pages routes must exist in the pages directory without the `/api/`
// prefix. The pathnames being tested here though are the full filenames,
// so we need to include the pages directory.
// TODO: could path separator normalization be needed here?
if (filename.startsWith(_path.default.join(this.pagesDir, "/api/"))) return false;
for (const extension of this.extensions){
// We can also match if we have `pages/api.${extension}`, so check to
// see if it's a match.
if (filename === _path.default.join(this.pagesDir, `api.${extension}`)) {
return false;
}
}
return true;
}
async transform(files) {
const matchers = [];
for (const filename of files){
// If the file isn't a match for this matcher, then skip it.
if (!this.test(filename)) continue;
const pathname = this.normalizers.pathname.normalize(filename);
const page = this.normalizers.page.normalize(filename);
const bundlePath = this.normalizers.bundlePath.normalize(filename);
if (this.localeNormalizer) {
matchers.push(new _pagesroutematcher.PagesLocaleRouteMatcher({
kind: _routekind.RouteKind.PAGES,
pathname,
page,
bundlePath,
filename,
i18n: {}
}));
} else {
matchers.push(new _pagesroutematcher.PagesRouteMatcher({
kind: _routekind.RouteKind.PAGES,
pathname,
page,
bundlePath,
filename
}));
}
}
return matchers;
}
}
//# sourceMappingURL=dev-pages-route-matcher-provider.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "FileCacheRouteMatcherProvider", {
enumerable: true,
get: function() {
return FileCacheRouteMatcherProvider;
}
});
const _cachedroutematcherprovider = require("../helpers/cached-route-matcher-provider");
class FileCacheRouteMatcherProvider extends _cachedroutematcherprovider.CachedRouteMatcherProvider {
constructor(dir, reader){
super({
load: async ()=>reader.read(dir),
compare: (left, right)=>{
if (left.length !== right.length) return false;
// Assuming the file traversal order is deterministic...
for(let i = 0; i < left.length; i++){
if (left[i] !== right[i]) return false;
}
return true;
}
});
}
}
//# sourceMappingURL=file-cache-route-matcher-provider.js.map

View File

@@ -0,0 +1,106 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "BatchedFileReader", {
enumerable: true,
get: function() {
return BatchedFileReader;
}
});
class BatchedFileReader {
constructor(reader){
this.reader = reader;
}
schedule(callback) {
if (!this.schedulePromise) {
this.schedulePromise = Promise.resolve();
}
this.schedulePromise.then(()=>{
process.nextTick(callback);
});
}
getOrCreateBatch() {
// If there is an existing batch and it's not completed, then reuse it.
if (this.batch && !this.batch.completed) {
return this.batch;
}
const batch = {
completed: false,
directories: [],
callbacks: []
};
this.batch = batch;
this.schedule(async ()=>{
batch.completed = true;
if (batch.directories.length === 0) return;
// Collect all the results for each of the directories. If any error
// occurs, send the results back to the loaders.
let values;
try {
values = await this.load(batch.directories);
} catch (err) {
// Reject all the callbacks.
for (const { reject } of batch.callbacks){
reject(err);
}
return;
}
// Loop over all the callbacks and send them their results.
for(let i = 0; i < batch.callbacks.length; i++){
const value = values[i];
if (value instanceof Error) {
batch.callbacks[i].reject(value);
} else {
batch.callbacks[i].resolve(value);
}
}
});
return batch;
}
async load(directories) {
// Make a unique array of directories. This is what lets us de-duplicate
// loads for the same directory.
const unique = [
...new Set(directories)
];
const results = await Promise.all(unique.map(async (directory)=>{
let files;
let error;
try {
files = await this.reader.read(directory);
} catch (err) {
if (err instanceof Error) error = err;
}
return {
directory,
files,
error
};
}));
return directories.map((directory)=>{
const found = results.find((result)=>result.directory === directory);
if (!found) return [];
if (found.files) return found.files;
if (found.error) return found.error;
return [];
});
}
async read(dir) {
// Get or create a new file reading batch.
const batch = this.getOrCreateBatch();
// Push this directory into the batch to resolve.
batch.directories.push(dir);
// Push the promise handles into the batch (under the same index) so it can
// be resolved later when it's scheduled.
const promise = new Promise((resolve, reject)=>{
batch.callbacks.push({
resolve,
reject
});
});
return promise;
}
}
//# sourceMappingURL=batched-file-reader.js.map

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DefaultFileReader", {
enumerable: true,
get: function() {
return DefaultFileReader;
}
});
const _recursivereaddir = require("../../../../../../lib/recursive-readdir");
class DefaultFileReader {
/**
* Creates a new file reader.
*
* @param pathnameFilter filter to ignore files with absolute pathnames, false to ignore
* @param ignoreFilter filter to ignore files and directories with absolute pathnames, false to ignore
* @param ignorePartFilter filter to ignore files and directories with the pathname part, false to ignore
*/ constructor(options){
this.options = options;
}
/**
* Reads all the files in the directory and its subdirectories following any
* symbolic links.
*
* @param dir the directory to read
* @returns a promise that resolves to the list of files
*/ async read(dir) {
return (0, _recursivereaddir.recursiveReadDir)(dir, {
pathnameFilter: this.options.pathnameFilter,
ignoreFilter: this.options.ignoreFilter,
ignorePartFilter: this.options.ignorePartFilter,
// We don't need to sort the results because we're not depending on the
// order of the results.
sortPathnames: false,
// We want absolute pathnames because we're going to be comparing them
// with other absolute pathnames.
relativePathnames: false
});
}
}
//# sourceMappingURL=default-file-reader.js.map

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CachedRouteMatcherProvider", {
enumerable: true,
get: function() {
return CachedRouteMatcherProvider;
}
});
class CachedRouteMatcherProvider {
constructor(loader){
this.loader = loader;
this.cached = [];
}
async matchers() {
const data = await this.loader.load();
if (!data) return [];
// Return the cached matchers if the data has not changed.
if (this.data && this.loader.compare(this.data, data)) return this.cached;
this.data = data;
// Transform the manifest into matchers.
const matchers = await this.transform(data);
// Cache the matchers.
this.cached = matchers;
return matchers;
}
}
//# sourceMappingURL=cached-route-matcher-provider.js.map

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NodeManifestLoader", {
enumerable: true,
get: function() {
return NodeManifestLoader;
}
});
const _constants = require("../../../../../shared/lib/constants");
const _path = /*#__PURE__*/ _interop_require_default(require("../../../../../shared/lib/isomorphic/path"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
class NodeManifestLoader {
constructor(distDir){
this.distDir = distDir;
}
static require(id) {
try {
return require(id);
} catch {
return null;
}
}
load(name) {
return NodeManifestLoader.require(_path.default.join(this.distDir, _constants.SERVER_DIRECTORY, name));
}
}
//# sourceMappingURL=node-manifest-loader.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ServerManifestLoader", {
enumerable: true,
get: function() {
return ServerManifestLoader;
}
});
class ServerManifestLoader {
constructor(getter){
this.getter = getter;
}
load(name) {
return this.getter(name);
}
}
//# sourceMappingURL=server-manifest-loader.js.map

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ManifestRouteMatcherProvider", {
enumerable: true,
get: function() {
return ManifestRouteMatcherProvider;
}
});
const _cachedroutematcherprovider = require("./helpers/cached-route-matcher-provider");
class ManifestRouteMatcherProvider extends _cachedroutematcherprovider.CachedRouteMatcherProvider {
constructor(manifestName, manifestLoader){
super({
load: async ()=>manifestLoader.load(manifestName),
compare: (left, right)=>left === right
});
}
}
//# sourceMappingURL=manifest-route-matcher-provider.js.map

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PagesAPIRouteMatcherProvider", {
enumerable: true,
get: function() {
return PagesAPIRouteMatcherProvider;
}
});
const _isapiroute = require("../../../lib/is-api-route");
const _constants = require("../../../shared/lib/constants");
const _routekind = require("../route-kind");
const _pagesapiroutematcher = require("../route-matchers/pages-api-route-matcher");
const _manifestroutematcherprovider = require("./manifest-route-matcher-provider");
const _pages = require("../normalizers/built/pages");
class PagesAPIRouteMatcherProvider extends _manifestroutematcherprovider.ManifestRouteMatcherProvider {
constructor(distDir, manifestLoader, i18nProvider){
super(_constants.PAGES_MANIFEST, manifestLoader);
this.i18nProvider = i18nProvider;
this.normalizers = new _pages.PagesNormalizers(distDir);
}
async transform(manifest) {
// This matcher is only for Pages API routes.
const pathnames = Object.keys(manifest).filter((pathname)=>(0, _isapiroute.isAPIRoute)(pathname));
const matchers = [];
for (const page of pathnames){
if (this.i18nProvider) {
// Match the locale on the page name, or default to the default locale.
const { detectedLocale, pathname } = this.i18nProvider.analyze(page);
matchers.push(new _pagesapiroutematcher.PagesAPILocaleRouteMatcher({
kind: _routekind.RouteKind.PAGES_API,
pathname,
page,
bundlePath: this.normalizers.bundlePath.normalize(page),
filename: this.normalizers.filename.normalize(manifest[page]),
i18n: {
locale: detectedLocale
}
}));
} else {
matchers.push(new _pagesapiroutematcher.PagesAPIRouteMatcher({
kind: _routekind.RouteKind.PAGES_API,
// In `pages/`, the page is the same as the pathname.
pathname: page,
page,
bundlePath: this.normalizers.bundlePath.normalize(page),
filename: this.normalizers.filename.normalize(manifest[page])
}));
}
}
return matchers;
}
}
//# sourceMappingURL=pages-api-route-matcher-provider.js.map

View File

@@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PagesRouteMatcherProvider", {
enumerable: true,
get: function() {
return PagesRouteMatcherProvider;
}
});
const _isapiroute = require("../../../lib/is-api-route");
const _constants = require("../../../shared/lib/constants");
const _routekind = require("../route-kind");
const _pagesroutematcher = require("../route-matchers/pages-route-matcher");
const _manifestroutematcherprovider = require("./manifest-route-matcher-provider");
const _pages = require("../normalizers/built/pages");
class PagesRouteMatcherProvider extends _manifestroutematcherprovider.ManifestRouteMatcherProvider {
constructor(distDir, manifestLoader, i18nProvider){
super(_constants.PAGES_MANIFEST, manifestLoader);
this.i18nProvider = i18nProvider;
this.normalizers = new _pages.PagesNormalizers(distDir);
}
async transform(manifest) {
// This matcher is only for Pages routes, not Pages API routes which are
// included in this manifest.
const pathnames = Object.keys(manifest).filter((pathname)=>!(0, _isapiroute.isAPIRoute)(pathname))// Remove any blocked pages (page that can't be routed to, like error or
// internal pages).
.filter((pathname)=>{
var _this_i18nProvider;
const normalized = ((_this_i18nProvider = this.i18nProvider) == null ? void 0 : _this_i18nProvider.analyze(pathname).pathname) ?? pathname;
// Skip any blocked pages.
if (_constants.BLOCKED_PAGES.includes(normalized)) return false;
return true;
});
const matchers = [];
for (const page of pathnames){
if (this.i18nProvider) {
// Match the locale on the page name, or default to the default locale.
const { detectedLocale, pathname } = this.i18nProvider.analyze(page);
matchers.push(new _pagesroutematcher.PagesLocaleRouteMatcher({
kind: _routekind.RouteKind.PAGES,
pathname,
page,
bundlePath: this.normalizers.bundlePath.normalize(page),
filename: this.normalizers.filename.normalize(manifest[page]),
i18n: {
locale: detectedLocale
}
}));
} else {
matchers.push(new _pagesroutematcher.PagesRouteMatcher({
kind: _routekind.RouteKind.PAGES,
// In `pages/`, the page is the same as the pathname.
pathname: page,
page,
bundlePath: this.normalizers.bundlePath.normalize(page),
filename: this.normalizers.filename.normalize(manifest[page])
}));
}
}
return matchers;
}
}
//# sourceMappingURL=pages-route-matcher-provider.js.map