@netlify/angular-runtime
Advanced tools
Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "@netlify/angular-runtime", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Netlify Angular Runtime - Run Angular seamlessly on Netlify.", | ||
@@ -27,2 +27,3 @@ "main": "src/index.js", | ||
"pretest:fixtures:browser-builder": "cd tests/fixtures/browser-builder && npm ci", | ||
"pretest:fixtures:prerender-false": "cd tests/fixtures/prerender-false && npm ci", | ||
"pretest": "run-s pretest:*", | ||
@@ -29,0 +30,0 @@ "test": "node --test" |
const { Buffer } = require('node:buffer') | ||
const { existsSync, readdirSync } = require('node:fs') | ||
const { readdirSync, existsSync } = require('node:fs') | ||
const { writeFile, mkdir, readFile } = require('node:fs/promises') | ||
@@ -49,2 +49,13 @@ const { join, relative, sep, posix } = require('node:path') | ||
/** | ||
* @param {string} outputDir | ||
* @returns {Promise<string[]>} | ||
*/ | ||
const getPrerenderedRoutes = async (outputDir) => { | ||
const file = join(outputDir, 'prerendered-routes.json') | ||
if (!existsSync(file)) return [] | ||
const { routes: prerenderedRoutes } = await readJson(file) | ||
return prerenderedRoutes | ||
} | ||
const setUpEdgeFunction = async ({ angularJson, constants, failBuild }) => { | ||
@@ -76,4 +87,3 @@ const project = getProject(angularJson) | ||
const { routes: prerenderedRoutes } = await readJson(join(outputDir, 'prerendered-routes.json')) | ||
const excludedPaths = [...staticFiles, ...prerenderedRoutes].map(toPosix) | ||
const excludedPaths = [...staticFiles, ...(await getPrerenderedRoutes(outputDir))].map(toPosix) | ||
@@ -80,0 +90,0 @@ // buy putting this into a separate module that's imported first, |
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
18035
266