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

1 line
14 KiB
Plaintext
Raw Normal View History

2024-09-06 15:32:35 +00:00
{"version":3,"sources":["../../src/lib/load-custom-routes.ts"],"names":["bold","yellow","escapeStringRegexp","tryToParsePath","allowedStatusCodes","allowedHasTypes","Set","namedGroupsRegex","normalizeRouteRegex","regex","replace","checkRedirect","route","invalidParts","hadInvalidStatus","statusCode","has","push","permanent","checkHeader","Array","isArray","headers","length","header","key","value","checkCustomRoutes","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","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","loadRedirects","redirects","_originalRedirects","loadRewrites","rewrites","beforeFiles","afterFiles","fallback","_rewrites","every","_originalRewrites","loadHeaders","loadCustomRoutes","Promise","all","totalRewrites","totalRoutes","warn","skipTrailingSlashRedirect","unshift","undefined","internal"],"mappings":"AAGA,SAASA,IAAI,EAAEC,MAAM,QAAQ,eAAc;AAC3C,SAASC,kBAAkB,QAAQ,8BAA6B;AAChE,SAASC,cAAc,QAAQ,sBAAqB;AACpD,SAASC,kBAAkB,QAAQ,oBAAmB;AAyEtD,MAAMC,kBAAkB,IAAIC,IAAI;IAAC;IAAU;IAAU;IAAS;CAAO;AACrE,MAAMC,mBAAmB;AAEzB,OAAO,SAASC,oBAAoBC,KAAa;IAC/C,0EAA0E;IAC1E,OAAOA,MAAMC,OAAO,CAAC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