Removed changes no longer necessary
This commit is contained in:
parent
697ff4dfb4
commit
0555099619
7 changed files with 11 additions and 32 deletions
|
@ -103,7 +103,6 @@
|
||||||
"htmlparser2": "^7.2.0",
|
"htmlparser2": "^7.2.0",
|
||||||
"kleur": "^4.1.4",
|
"kleur": "^4.1.4",
|
||||||
"magic-string": "^0.25.9",
|
"magic-string": "^0.25.9",
|
||||||
"micromatch": "^4.0.5",
|
|
||||||
"micromorph": "^0.1.2",
|
"micromorph": "^0.1.2",
|
||||||
"mime": "^3.0.0",
|
"mime": "^3.0.0",
|
||||||
"ora": "^6.1.0",
|
"ora": "^6.1.0",
|
||||||
|
@ -146,7 +145,6 @@
|
||||||
"@types/diff": "^5.0.2",
|
"@types/diff": "^5.0.2",
|
||||||
"@types/estree": "^0.0.51",
|
"@types/estree": "^0.0.51",
|
||||||
"@types/html-escaper": "^3.0.0",
|
"@types/html-escaper": "^3.0.0",
|
||||||
"@types/micromatch": "^4.0.2",
|
|
||||||
"@types/mime": "^2.0.3",
|
"@types/mime": "^2.0.3",
|
||||||
"@types/mocha": "^9.1.0",
|
"@types/mocha": "^9.1.0",
|
||||||
"@types/parse5": "^6.0.3",
|
"@types/parse5": "^6.0.3",
|
||||||
|
@ -159,8 +157,7 @@
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"cheerio": "^1.0.0-rc.10",
|
"cheerio": "^1.0.0-rc.10",
|
||||||
"mocha": "^9.2.2",
|
"mocha": "^9.2.2",
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.49.9"
|
||||||
"type-fest": "^2.12.1"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.15.0 || >=16.0.0",
|
"node": "^14.15.0 || >=16.0.0",
|
||||||
|
|
|
@ -502,7 +502,6 @@ export interface AstroConfig extends z.output<typeof AstroConfigSchema> {
|
||||||
adapter: AstroAdapter | undefined;
|
adapter: AstroAdapter | undefined;
|
||||||
renderers: AstroRenderer[];
|
renderers: AstroRenderer[];
|
||||||
scripts: { stage: InjectedScriptStage; content: string }[];
|
scripts: { stage: InjectedScriptStage; content: string }[];
|
||||||
ignoredPages: string[];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +671,6 @@ export interface AstroIntegration {
|
||||||
updateConfig: (newConfig: Record<string, any>) => void;
|
updateConfig: (newConfig: Record<string, any>) => void;
|
||||||
addRenderer: (renderer: AstroRenderer) => void;
|
addRenderer: (renderer: AstroRenderer) => void;
|
||||||
injectScript: (stage: InjectedScriptStage, content: string) => void;
|
injectScript: (stage: InjectedScriptStage, content: string) => void;
|
||||||
ignorePages: (glob: string) => void;
|
|
||||||
// TODO: Add support for `injectElement()` for full HTML element injection, not just scripts.
|
// TODO: Add support for `injectElement()` for full HTML element injection, not just scripts.
|
||||||
// This may require some refactoring of `scripts`, `styles`, and `links` into something
|
// This may require some refactoring of `scripts`, `styles`, and `links` into something
|
||||||
// more generalized. Consider the SSR use-case as well.
|
// more generalized. Consider the SSR use-case as well.
|
||||||
|
|
|
@ -206,7 +206,7 @@ export async function validateConfig(userConfig: any, root: string): Promise<Ast
|
||||||
// First-Pass Validation
|
// First-Pass Validation
|
||||||
const result = {
|
const result = {
|
||||||
...(await AstroConfigRelativeSchema.parseAsync(userConfig)),
|
...(await AstroConfigRelativeSchema.parseAsync(userConfig)),
|
||||||
_ctx: { scripts: [], renderers: [], adapter: undefined, ignoredPages: [] },
|
_ctx: { scripts: [], renderers: [], adapter: undefined },
|
||||||
};
|
};
|
||||||
// Final-Pass Validation (perform checks that require the full config object)
|
// Final-Pass Validation (perform checks that require the full config object)
|
||||||
if (!result.experimentalIntegrations && !result.integrations.every((int) => int.name.startsWith('@astrojs/'))) {
|
if (!result.experimentalIntegrations && !result.integrations.every((int) => int.name.startsWith('@astrojs/'))) {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import type { LogOptions } from '../../logger';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { compile } from 'path-to-regexp';
|
import { compile } from 'path-to-regexp';
|
||||||
import micromatch from 'micromatch';
|
|
||||||
import slash from 'slash';
|
import slash from 'slash';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import { warn } from '../../logger.js';
|
import { warn } from '../../logger.js';
|
||||||
|
@ -179,16 +178,11 @@ export function createRouteManifest({ config, cwd }: { config: AstroConfig; cwd?
|
||||||
fs.readdirSync(dir).forEach((basename) => {
|
fs.readdirSync(dir).forEach((basename) => {
|
||||||
const resolved = path.join(dir, basename);
|
const resolved = path.join(dir, basename);
|
||||||
const file = slash(path.relative(cwd || fileURLToPath(config.projectRoot), resolved));
|
const file = slash(path.relative(cwd || fileURLToPath(config.projectRoot), resolved));
|
||||||
const pagePath = slash(path.relative(fileURLToPath(config.pages), resolved));
|
|
||||||
const isDir = fs.statSync(resolved).isDirectory();
|
const isDir = fs.statSync(resolved).isDirectory();
|
||||||
|
|
||||||
const ext = path.extname(basename);
|
const ext = path.extname(basename);
|
||||||
const name = ext ? basename.slice(0, -ext.length) : basename;
|
const name = ext ? basename.slice(0, -ext.length) : basename;
|
||||||
|
|
||||||
if ((config._ctx?.ignoredPages || []).length > 0 && micromatch.isMatch(pagePath, config._ctx.ignoredPages)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name[0] === '_') {
|
if (name[0] === '_') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,6 @@ export async function runHookConfigSetup({ config: _config, command }: { config:
|
||||||
updateConfig: (newConfig) => {
|
updateConfig: (newConfig) => {
|
||||||
updatedConfig = mergeConfig(updatedConfig, newConfig) as AstroConfig;
|
updatedConfig = mergeConfig(updatedConfig, newConfig) as AstroConfig;
|
||||||
},
|
},
|
||||||
ignorePages: (glob: string) => {
|
|
||||||
updatedConfig._ctx.ignoredPages.push(glob);
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,14 @@ export default function vercel(): AstroIntegration {
|
||||||
version: 3,
|
version: 3,
|
||||||
basePath: '/',
|
basePath: '/',
|
||||||
pages404: false,
|
pages404: false,
|
||||||
|
// redirects: [
|
||||||
|
// {
|
||||||
|
// source: '/nice/',
|
||||||
|
// destination: '/stuff',
|
||||||
|
// statusCode: 308,
|
||||||
|
// regex: '^/nice.*$',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
rewrites: routes.map((route) => ({
|
rewrites: routes.map((route) => ({
|
||||||
source: route.pathname,
|
source: route.pathname,
|
||||||
destination: '/__astro_entry',
|
destination: '/__astro_entry',
|
||||||
|
|
|
@ -464,7 +464,6 @@ importers:
|
||||||
'@types/diff': ^5.0.2
|
'@types/diff': ^5.0.2
|
||||||
'@types/estree': ^0.0.51
|
'@types/estree': ^0.0.51
|
||||||
'@types/html-escaper': ^3.0.0
|
'@types/html-escaper': ^3.0.0
|
||||||
'@types/micromatch': ^4.0.2
|
|
||||||
'@types/mime': ^2.0.3
|
'@types/mime': ^2.0.3
|
||||||
'@types/mocha': ^9.1.0
|
'@types/mocha': ^9.1.0
|
||||||
'@types/parse5': ^6.0.3
|
'@types/parse5': ^6.0.3
|
||||||
|
@ -495,7 +494,6 @@ importers:
|
||||||
htmlparser2: ^7.2.0
|
htmlparser2: ^7.2.0
|
||||||
kleur: ^4.1.4
|
kleur: ^4.1.4
|
||||||
magic-string: ^0.25.9
|
magic-string: ^0.25.9
|
||||||
micromatch: ^4.0.5
|
|
||||||
micromorph: ^0.1.2
|
micromorph: ^0.1.2
|
||||||
mime: ^3.0.0
|
mime: ^3.0.0
|
||||||
mocha: ^9.2.2
|
mocha: ^9.2.2
|
||||||
|
@ -524,7 +522,6 @@ importers:
|
||||||
strip-ansi: ^7.0.1
|
strip-ansi: ^7.0.1
|
||||||
supports-esm: ^1.0.0
|
supports-esm: ^1.0.0
|
||||||
tsconfig-resolver: ^3.0.1
|
tsconfig-resolver: ^3.0.1
|
||||||
type-fest: ^2.12.1
|
|
||||||
vite: ^2.8.6
|
vite: ^2.8.6
|
||||||
yargs-parser: ^21.0.1
|
yargs-parser: ^21.0.1
|
||||||
zod: ^3.14.3
|
zod: ^3.14.3
|
||||||
|
@ -559,7 +556,6 @@ importers:
|
||||||
htmlparser2: 7.2.0
|
htmlparser2: 7.2.0
|
||||||
kleur: 4.1.4
|
kleur: 4.1.4
|
||||||
magic-string: 0.25.9
|
magic-string: 0.25.9
|
||||||
micromatch: 4.0.5
|
|
||||||
micromorph: 0.1.2
|
micromorph: 0.1.2
|
||||||
mime: 3.0.0
|
mime: 3.0.0
|
||||||
ora: 6.1.0
|
ora: 6.1.0
|
||||||
|
@ -601,7 +597,6 @@ importers:
|
||||||
'@types/diff': 5.0.2
|
'@types/diff': 5.0.2
|
||||||
'@types/estree': 0.0.51
|
'@types/estree': 0.0.51
|
||||||
'@types/html-escaper': 3.0.0
|
'@types/html-escaper': 3.0.0
|
||||||
'@types/micromatch': 4.0.2
|
|
||||||
'@types/mime': 2.0.3
|
'@types/mime': 2.0.3
|
||||||
'@types/mocha': 9.1.0
|
'@types/mocha': 9.1.0
|
||||||
'@types/parse5': 6.0.3
|
'@types/parse5': 6.0.3
|
||||||
|
@ -615,7 +610,6 @@ importers:
|
||||||
cheerio: 1.0.0-rc.10
|
cheerio: 1.0.0-rc.10
|
||||||
mocha: 9.2.2
|
mocha: 9.2.2
|
||||||
sass: 1.49.9
|
sass: 1.49.9
|
||||||
type-fest: 2.12.1
|
|
||||||
|
|
||||||
packages/astro-prism:
|
packages/astro-prism:
|
||||||
specifiers:
|
specifiers:
|
||||||
|
@ -3844,10 +3838,6 @@ packages:
|
||||||
'@babel/types': 7.17.0
|
'@babel/types': 7.17.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/braces/3.0.1:
|
|
||||||
resolution: {integrity: sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ==}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@types/chai/4.3.0:
|
/@types/chai/4.3.0:
|
||||||
resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==}
|
resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -3936,12 +3926,6 @@ packages:
|
||||||
resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==}
|
resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/micromatch/4.0.2:
|
|
||||||
resolution: {integrity: sha512-oqXqVb0ci19GtH0vOA/U2TmHTcRY9kuZl4mqUxe0QmJAlIW13kzhuK5pi1i9+ngav8FjpSb9FVS/GE00GLX1VA==}
|
|
||||||
dependencies:
|
|
||||||
'@types/braces': 3.0.1
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@types/mime/1.3.2:
|
/@types/mime/1.3.2:
|
||||||
resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==}
|
resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -10203,6 +10187,7 @@ packages:
|
||||||
/type-fest/2.12.1:
|
/type-fest/2.12.1:
|
||||||
resolution: {integrity: sha512-AiknQSEqKVGDDjtZqeKrUoTlcj7FKhupmnVUgz6KoOKtvMwRGE6hUNJ/nVear+h7fnUPO1q/htSkYKb1pyntkQ==}
|
resolution: {integrity: sha512-AiknQSEqKVGDDjtZqeKrUoTlcj7FKhupmnVUgz6KoOKtvMwRGE6hUNJ/nVear+h7fnUPO1q/htSkYKb1pyntkQ==}
|
||||||
engines: {node: '>=12.20'}
|
engines: {node: '>=12.20'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/typescript/4.6.3:
|
/typescript/4.6.3:
|
||||||
resolution: {integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==}
|
resolution: {integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==}
|
||||||
|
|
Loading…
Reference in a new issue