next-server
Advanced tools
Comparing version 8.1.1-canary.42 to 8.1.1-canary.43
@@ -18,5 +18,3 @@ "use strict"; | ||
const constants_1 = require("../lib/constants"); | ||
const route_matcher_1 = require("../lib/router/utils/route-matcher"); | ||
const route_regex_1 = require("../lib/router/utils/route-regex"); | ||
const sorted_routes_1 = require("../lib/router/utils/sorted-routes"); | ||
const utils_1 = require("../lib/router/utils"); | ||
const envConfig = __importStar(require("../lib/runtime-config")); | ||
@@ -31,3 +29,3 @@ const config_1 = __importDefault(require("./config")); | ||
const serve_static_1 = require("./serve-static"); | ||
const utils_1 = require("./utils"); | ||
const utils_2 = require("./utils"); | ||
class Server { | ||
@@ -222,5 +220,5 @@ constructor({ dir = '.', staticMarkup = false, quiet = false, conf = null, } = {}) { | ||
const dynamicRoutedPages = Object.keys(manifest.pages).filter(p => p.includes('/$')); | ||
return sorted_routes_1.getSortedRoutes(dynamicRoutedPages).map(page => ({ | ||
return utils_1.getSortedRoutes(dynamicRoutedPages).map(page => ({ | ||
page, | ||
match: route_matcher_1.getRouteMatcher(route_regex_1.getRouteRegex(page)), | ||
match: utils_1.getRouteMatcher(utils_1.getRouteRegex(page)), | ||
})); | ||
@@ -257,6 +255,6 @@ } | ||
const url = req.url; | ||
if (utils_1.isInternalUrl(url)) { | ||
if (utils_2.isInternalUrl(url)) { | ||
return this.handleRequest(req, res, parsedUrl); | ||
} | ||
if (utils_1.isBlockedPage(pathname)) { | ||
if (utils_2.isBlockedPage(pathname)) { | ||
return this.render404(req, res, parsedUrl); | ||
@@ -263,0 +261,0 @@ } |
@@ -281,3 +281,3 @@ "use strict"; | ||
// use replace to allow rendering directly to body in AMP mode | ||
html = html.replace('__NEXT_AMP_RENDER_TARGET__', docProps.html); | ||
html = html.replace('__NEXT_AMP_RENDER_TARGET__', `<!-- __NEXT_DATA__ -->${docProps.html}`); | ||
html = await optimize_amp_1.default(html); | ||
@@ -284,0 +284,0 @@ if (renderOpts.ampValidator) { |
{ | ||
"name": "next-server", | ||
"version": "8.1.1-canary.42", | ||
"version": "8.1.1-canary.43", | ||
"main": "./index.js", | ||
@@ -63,3 +63,3 @@ "license": "MIT", | ||
"taskr": "1.1.0", | ||
"typescript": "3.4.5" | ||
"typescript": "3.5.1" | ||
}, | ||
@@ -69,3 +69,3 @@ "engines": { | ||
}, | ||
"gitHead": "a7a59450a568d7ea56e4f588e48d5506b98ab76a" | ||
"gitHead": "79cf929b25c33ecdca630c05aac07ae42c23447a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124007
3058