securityos/node_modules/next/dist/lib/load-custom-routes.js.map

1 line
14 KiB
Plaintext
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
{"version":3,"sources":["../../src/lib/load-custom-routes.ts"],"names":["normalizeRouteRegex","checkCustomRoutes","loadCustomRoutes","allowedHasTypes","Set","namedGroupsRegex","regex","replace","checkRedirect","route","invalidParts","hadInvalidStatus","statusCode","allowedStatusCodes","has","push","permanent","checkHeader","Array","isArray","headers","length","header","key","value","routes","type","console","error","process","exit","numInvalidRoutes","hadInvalidHas","hadInvalidMissing","allowedKeys","add","JSON","stringify","basePath","destination","startsWith","source","keys","Object","invalidKeys","filter","locale","checkInvalidHasMissing","items","fieldName","hadInvalidItem","invalidHasItems","hasItem","invalidHasParts","join","itemStr","missing","_route","match","result","sourceTokens","tokens","regexStr","tryToParsePath","hasSegments","matchAll","unnamedInDest","token","name","unnamedIndex","RegExp","size","destTokens","destRegexStr","destinationParseFailed","handleUrl","sourceSegments","map","item","Boolean","invalidDestSegments","hasInvalidKeys","hasInvalidParts","processRoutes","config","_routes","newRoutes","defaultLocales","i18n","domains","defaultLocale","base","http","domain","r","srcBasePath","isExternal","destBasePath","forEach","trailingSlash","locales","escapeStringRegexp","loadRedirects","redirects","_originalRedirects","loadRewrites","rewrites","beforeFiles","afterFiles","fallback","_rewrites","every","_originalRewrites","loadHeaders","Promise","all","totalRewrites","totalRoutes","warn","bold","yellow","skipTrailingSlashRedirect","unshift","undefined","internal"],"mappings":";;;;;;;;;;;;;;;;IAkFgBA,mBAAmB;eAAnBA;;IAwDAC,iBAAiB;eAAjBA;;IA4gBhB,OAwFC;eAxF6BC;;;4BAnpBD;8BACM;gCACJ;gCACI;AAyEnC,MAAMC,kBAAkB,IAAIC,IAAI;IAAC;IAAU;IAAU;IAAS;CAAO;AACrE,MAAMC,mBAAmB;AAElB,SAASL,oBAAoBM,KAAa;IAC/C,0EAA0E;IAC1E,OAAOA,MAAMC,OAAO,CAAC,SAAS;AAChC;AAEA,SAASC,cA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