diff --git a/build-lists.js b/build-lists.js index 2b0da1c..6b3401d 100644 --- a/build-lists.js +++ b/build-lists.js @@ -25,6 +25,10 @@ import { } from './helpers/app-derived.js' import { makeSearchableList } from './helpers/searchable-list.js' +import { + writeStorkToml +} from './helpers/stork/toml.js' + // Setup dotenv dotenv.config() @@ -535,10 +539,15 @@ class BuildLists { await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`) } - // Save sitemap endpoints - await this.saveToJson(Object.values(this.endpointMaps).map( endpointSet => { + const sitemapEndpoints = Object.values(this.endpointMaps).map( endpointSet => { return Array.from( endpointSet , ([route, payload]) => ({ route, payload }) ) - } ).flat(1), './static/sitemap-endpoints.json') + } ).flat(1) + + // Save sitemap endpoints + await this.saveToJson( sitemapEndpoints, './static/sitemap-endpoints.json') + + // Save stork toml index + await writeStorkToml( sitemapEndpoints ) } console.log('Total Nuxt Endpoints', this.endpointMaps.nuxt.size ) diff --git a/package.json b/package.json index 4d811d5..c4ba117 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "precommit": "npm run lint", "clone-readme": "cp ./README.md README-temp.md", "cloudflare-deploy": "npm run build-api", - "vercel-build": "npm run build-lists-and-api && npm run build-stork && npm run test-postbuild-api", + "vercel-build": "npm run build-lists-and-api && npm run test-postbuild-api", "netlify-build": "npm run test-prebuild-functions && npm run generate-astro" }, "dependencies": {