Restructure (#1569)

This commit is contained in:
Drew Powers 2021-10-15 18:28:04 -06:00 committed by Drew Powers
parent 62106902bb
commit cd76229ed7
70 changed files with 581 additions and 677 deletions

View file

@ -8,6 +8,7 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',

View file

@ -5,7 +5,9 @@ We welcome contributions of any size and skill level. As an open source project,
> **Tip for new contributors:**
> Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
## Prerequisite
## Quick Guide
### Prerequisite
```shell
node: "^12.20.0 || ^14.13.1 || >=16.0.0"
@ -13,7 +15,7 @@ yarn: "^1.22.10"
# otherwise, your build will fail
```
## Setting up your local repo
### Setting up your local repo
Astro uses yarn workspaces, so you should **always run `yarn install` from the top-level project directory.** running `yarn install` in the top-level project root will install dependencies for `astro`, `www`, `docs`, and every package in the repo.
@ -23,7 +25,7 @@ yarn install
yarn build:all
```
## Development
### Development
```shell
# starts a file-watching, live-reloading dev script for active development
@ -32,7 +34,7 @@ yarn dev
yarn build
```
## Running tests
### Running tests
```shell
# run this in the top-level project root to run all tests
@ -42,7 +44,7 @@ yarn test
yarn test -g "$STRING_MATCH"
```
## Other useful commands
### Other useful commands
```shell
# auto-format the entire project
@ -56,7 +58,7 @@ yarn format
yarn lint
```
## Making a Pull Request
### Making a Pull Request
When making a pull request, be sure to add a changeset when something has changed with Astro. Non-packages (`examples/*`, `docs/*`, and `www/*`) do not need changesets.
@ -64,7 +66,7 @@ When making a pull request, be sure to add a changeset when something has change
yarn changeset
```
## Running benchmarks
### Running benchmarks
We have benchmarks to keep performance under control. You can run these by running (from the project root):
@ -83,7 +85,31 @@ node test/benchmark/dev.bench.js --save
Which will update the build and dev benchmarks.
# Releasing Astro
## Code Structure
Server-side rendering (SSR) can be complicated. The Astro package (`packages/astro`) is structured in a way to help think about the different systems.
- `components/`: Built-in components to use in your project (e.g. `import Code from 'astro/components/Code.astro'`)
- `src/`: Astro source
- `@types/`: TypeScript types. These are centralized to cut down on circular dependencies
- `cli/`: Code that powers the `astro` CLI command
- `core/`: Code that executes **in the top-level scope** (in Node). Within, youll find code that powers the `astro build` and `astro dev` commands, as well as top-level SSR code.
- `runtime/`: Code that executes **in different scopes** (i.e. not in a pure Node context). Youll have to think about code differently here.
- `client/`: Code that executes **in the browser.** Astros partial hydration code lives here, and only browser-compatible code can be used.
- `server/`: Code that executes **inside Vites SSR.** Though this is a Node environment inside, this will be executed independently from `core/` and may have to be structured differently.
- `vite-plugin-*/`: Any Vite plugins that Astro needs to run. For the most part, these also execute within Vite similar to `src/runtime/server/`, but its also helpful to think about them as independent modules. _Note: at the moment these are internal while theyre in development_
### Thinking about SSR
There are 3 contexts in which code executes:
- **Node.js**: this code lives in `src/core/`.
- **Inside Vite**: this code lives in `src/runtime/server/`.
- **In the browser**: this code lives in `src/runtime/client/`.
Understanding in which environment code runs, and at which stage in the process, can help clarify thinking about what Astro is doing. It also helps with debugging, for instance, if youre working within `src/core/`, you know that your code isnt executing within Vite, so you dont have to debug Vites setup. But you will have to debug vite inside `runtime/server/`.
## Releasing Astro
_Note: Only priviledged contributors (L3+) can release new versions of Astro._
@ -91,7 +117,7 @@ The repo is set up with automatic releases, using the changeset GitHub action &
To release a new version of Astro, find the `Version Packages` PR, read it over, and merge it.
## Releasing PR preview snapshots
### Releasing PR preview snapshots
Our release tool `changeset` has a feature for releasing "snapshot" releases from a PR or custom branch. These are npm package publishes that live temporarily, so that you can give users a way to test a PR before merging. This can be a great way to get early user feedback while still in the PR review process.
@ -112,7 +138,7 @@ git reset --hard
Full documentation: https://github.com/atlassian/changesets/blob/main/docs/snapshot-releases.md
## Releasing `astro@next` (aka "prerelease mode")
### Releasing `astro@next` (aka "prerelease mode")
Sometimes, the repo will enter into "prerelease mode". In prerelease mode, our normal release process will publish npm versions under the `next` dist-tag, instead of the default `latest` tag. We do this from time-to-time to test large features before sharing them with the larger Astro audience.
@ -154,7 +180,7 @@ When in prerelease mode, the automatic PR release process will no longer release
1. Go to https://github.com/snowpackjs/astro/releases/new and create a new release. Copy the new changelog entry from https://github.com/snowpackjs/astro/blob/latest/packages/astro/CHANGELOG.md.
1. Post in Discord #announcements channel, if needed!
# Translations
## Translations
Help us translate [docs.astro.build](https://docs.astro.build/) into as many languages as possible! This can be a great way to get involved with open source development without having to code.

View file

@ -21,7 +21,7 @@
"broken-link-checker": "^0.7.8",
"npm-run-all": "^4.1.5",
"pa11y-ci": "^2.4.2",
"prettier": "^2.3.2",
"prettier": "^2.4.1",
"start-server-and-test": "^1.12.6"
},
"dependencies": {

View file

@ -44,11 +44,11 @@
"devDependencies": {
"@changesets/cli": "^2.16.0",
"@octokit/action": "^3.15.4",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"del": "^6.0.0",
"esbuild": "^0.12.28",
"eslint": "^7.32.0",
"esbuild": "^0.13.7",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"execa": "^5.0.0",

View file

@ -4,7 +4,7 @@
"author": "Skypack",
"license": "MIT",
"type": "module",
"types": "./dist/types/@types/public.d.ts",
"types": "./dist/types/@types/astro-public.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/snowpackjs/astro.git",
@ -12,14 +12,25 @@
},
"exports": {
".": "./astro.js",
"./client/*": "./dist/client/*",
"./client/*": "./dist/runtime/client/*",
"./components": "./components/index.js",
"./components/*": "./components/*",
"./debug": "./components/Debug.astro",
"./internal": "./dist/internal/index.js",
"./internal/*": "./dist/internal/*",
"./runtime/*": "./dist/runtime/*.js",
"./package.json": "./package.json"
"./internal": "./dist/runtime/server/index.js",
"./internal/*": "./dist/runtime/server/*",
"./package.json": "./package.json",
"./runtime/*": "./dist/runtime/*",
"./server/*": "./dist/runtime/server/*",
"./vite-plugin-astro": "./dist/vite-plugin-astro/index.js",
"./vite-plugin-astro/*": "./dist/vite-plugin-astro/*",
"./vite-plugin-astro-postprocess": "./dist/vite-plugin-astro-postprocess/index.js",
"./vite-plugin-astro-postprocess/*": "./dist/vite-plugin-astro-postprocess/*",
"./vite-plugin-fetch": "./dist/vite-plugin-fetch/index.js",
"./vite-plugin-fetch/*": "./dist/vite-plugin-fetch/*",
"./vite-plugin-jsx/*": "./dist/vite-plugin-jsx/*",
"./vite-plugin-jsx": "./dist/vite-plugin-jsx/index.js",
"./vite-plugin-markdown": "./dist/vite-plugin-markdown/index.js",
"./vite-plugin-markdown/*": "./dist/vite-plugin-markdown/*"
},
"imports": {
"#astro/*": "./dist/*.js"
@ -30,7 +41,8 @@
"files": [
"components",
"dist",
"astro.js"
"astro.js",
"README.md"
],
"scripts": {
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
@ -49,16 +61,13 @@
"@astrojs/renderer-react": "0.2.2",
"@astrojs/renderer-svelte": "0.1.2",
"@astrojs/renderer-vue": "0.1.9",
"@babel/code-frame": "^7.12.13",
"@babel/core": "^7.15.5",
"@babel/core": "^7.15.8",
"@babel/traverse": "^7.15.4",
"@babel/types": "^7.15.6",
"@web/rollup-plugin-html": "^1.10.1",
"astring": "^1.7.5",
"cheerio": "^1.0.0-rc.10",
"ci-info": "^3.2.0",
"connect": "^3.7.0",
"del": "^6.0.0",
"es-module-lexer": "^0.7.1",
"esbuild": "^0.13.6",
"estree-util-value-to-estree": "^1.2.0",
@ -76,7 +85,6 @@
"shorthash": "^0.0.2",
"slash": "^4.0.0",
"sourcemap-codec": "^1.4.8",
"srcset-parse": "^1.1.0",
"string-width": "^5.0.0",
"strip-ansi": "^7.0.1",
"supports-esm": "^1.0.0",
@ -87,6 +95,7 @@
},
"devDependencies": {
"@astrojs/parser": "^0.20.2",
"@babel/types": "^7.15.6",
"@types/babel__core": "^7.1.15",
"@types/chai": "^4.2.22",
"@types/connect": "^3.4.35",

View file

@ -0,0 +1,5 @@
# `@types/`
TypeScript definitions and types for untyped modules.
[See CONTRIBUTING.md](../../../../CONTRIBUTING.md) for a code overview.

View file

@ -1,8 +1,8 @@
import type babel from '@babel/core';
import type vite from 'vite';
import type { z } from 'zod';
import type { AstroConfigSchema } from '../config';
import type { AstroComponentFactory } from '../internal';
import type { AstroConfigSchema } from '../core/config';
import type { AstroComponentFactory } from '../runtime/server';
export interface AstroComponentMetadata {
displayName: string;

View file

@ -0,0 +1 @@
export { AstroConfig, AstroUserConfig } from './astro-core';

View file

@ -1,3 +1,24 @@
import type { Renderer } from './astro-core';
export interface AstroBuiltinProps {
'client:load'?: boolean;
'client:idle'?: boolean;
'client:media'?: string;
'client:visible'?: boolean;
}
export interface AstroGlobal extends TopLevelAstro {
props: Record<string, number | string | any>;
request: AstroPageRequest;
slots: Record<string, true | undefined>;
}
interface AstroPageRequest {
url: URL;
canonicalURL: URL;
params: Params;
}
type AstroRenderedHTML = string;
export type FetchContentResultBase = {
@ -11,21 +32,14 @@ export type FetchContentResultBase = {
export type FetchContentResult<T> = FetchContentResultBase & T;
export interface HydrateOptions {
value?: string;
}
export type GetHydrateCallback = () => Promise<(element: Element, innerHTML: string | null) => void>;
export type Params = Record<string, string | undefined>;
interface AstroPageRequest {
url: URL;
canonicalURL: URL;
params: Params;
}
export interface AstroBuiltinProps {
'client:load'?: boolean;
'client:idle'?: boolean;
'client:media'?: string;
'client:visible'?: boolean;
}
export interface TopLevelAstro {
isPage: boolean;
fetchContent<T = any>(globStr: string): Promise<FetchContentResult<T>[]>;
@ -33,8 +47,13 @@ export interface TopLevelAstro {
site: URL;
}
export interface Astro extends TopLevelAstro {
props: Record<string, number | string | any>;
request: AstroPageRequest;
slots: Record<string, true | undefined>;
}
export interface SSRMetadata {
renderers: Renderer[];
}
export interface SSRResult {
styles: Set<string>;
scripts: Set<string>;
createAstro(Astro: TopLevelAstro, props: Record<string, any>, slots: Record<string, any> | null): AstroGlobal;
_metadata: SSRMetadata;
}

View file

@ -1,5 +0,0 @@
export type GetHydrateCallback = () => Promise<(element: Element, innerHTML: string | null) => void>;
export interface HydrateOptions {
value?: string;
}

View file

@ -1 +0,0 @@
export { AstroConfig, AstroUserConfig } from './astro';

View file

@ -1,13 +0,0 @@
import { Astro as AstroGlobal, TopLevelAstro } from './astro-file';
import { Renderer } from './astro';
export interface SSRMetadata {
renderers: Renderer[];
}
export interface SSRResult {
styles: Set<string>;
scripts: Set<string>;
createAstro(Astro: TopLevelAstro, props: Record<string, any>, slots: Record<string, any> | null): AstroGlobal;
_metadata: SSRMetadata;
}

View file

@ -0,0 +1,5 @@
# `cli/`
Code that controls Astros binfile and is responsible for `astro *` CLI commands.
[See CONTRIBUTING.md](../../../../CONTRIBUTING.md) for a code overview.

View file

@ -1,6 +1,7 @@
/* eslint-disable no-console */
import { AstroCheck, DiagnosticSeverity } from '@astrojs/language-server';
import type { AstroConfig } from '../@types/astro';
import type { AstroConfig } from '../@types/astro-core';
import { bold, black, bgWhite, red, cyan, yellow } from 'kleur/colors';
import glob from 'fast-glob';
import * as path from 'path';

View file

@ -1,19 +1,18 @@
/* eslint-disable no-console */
import type { AstroConfig } from '../@types/astro';
import { LogOptions } from '../logger.js';
import type { AstroConfig } from '../@types/astro-core';
import { LogOptions } from '../core/logger.js';
import * as colors from 'kleur/colors';
import fs from 'fs';
import yargs from 'yargs-parser';
import { z } from 'zod';
import { defaultLogDestination } from '../logger.js';
import build from '../build/index.js';
import devServer from '../dev/index.js';
import preview from '../preview/index.js';
import { reload } from './reload.js';
import { defaultLogDestination } from '../core/logger.js';
import build from '../core/build/index.js';
import devServer from '../core/dev/index.js';
import preview from '../core/preview/index.js';
import { check } from './check.js';
import { formatConfigError, loadConfig } from '../config.js';
import { formatConfigError, loadConfig } from '../core/config.js';
type Arguments = yargs.Arguments;
type cliCommand = 'help' | 'version' | 'dev' | 'build' | 'preview' | 'reload' | 'check';
@ -133,7 +132,6 @@ export async function cli(args: string[]) {
return;
}
case 'dev': {
if (flags.reload) await reload(projectRoot);
try {
const server = await devServer(config, { logging });
await new Promise(() => {}); // dont close dev server
@ -143,7 +141,6 @@ export async function cli(args: string[]) {
return;
}
case 'build': {
if (flags.reload) await reload(projectRoot);
try {
await build(config, { logging });
process.exit(0);
@ -158,7 +155,6 @@ export async function cli(args: string[]) {
return;
}
case 'preview': {
if (flags.reload) await reload(projectRoot);
try {
await preview(config, { logging }); // this will keep running
} catch (err) {

View file

@ -1,20 +0,0 @@
import type { LogOptions } from '../logger';
import del from 'del';
import { fileURLToPath } from 'url';
import { defaultLogDestination, defaultLogLevel, info } from '../logger.js';
const logging: LogOptions = {
level: defaultLogLevel,
dest: defaultLogDestination,
};
export async function reload(cwd: string) {
try {
info(logging, 'reload', `Clearing the cache...`);
const viteCache = new URL('node_modules/.vite/', `file://${cwd}/`);
del.sync(fileURLToPath(viteCache));
return 0;
} catch {
return 1;
}
}

View file

@ -0,0 +1,5 @@
# `core/`
Code that executes within the top-level Node context. Contains the main Astro logic for the `build` and `dev` commands, and also manages the Vite server and SSR.
[See CONTRIBUTING.md](../../../../CONTRIBUTING.md) for a code overview.

View file

@ -1,4 +1,4 @@
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, ManifestData, RouteCache, RouteData, RSSResult } from '../@types/astro';
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, ManifestData, RouteCache, RouteData, RSSResult } from '../../@types/astro-core';
import type { LogOptions } from '../logger';
import { rollupPluginHTML } from '@web/rollup-plugin-html';
@ -7,15 +7,15 @@ import { bold, cyan, green, dim } from 'kleur/colors';
import { performance } from 'perf_hooks';
import vite, { ViteDevServer } from 'vite';
import { fileURLToPath } from 'url';
import { createVite } from '../create-vite.js';
import { pad } from '../dev/util.js';
import { defaultLogOptions, levels, warn } from '../logger.js';
import { generatePaginateFunction } from '../runtime/paginate.js';
import { createRouteManifest, validateGetStaticPathsModule, validateGetStaticPathsResult } from '../runtime/routing.js';
import { generateRssFunction } from '../runtime/rss.js';
import { ssr } from '../runtime/ssr.js';
import { loadViteConfig } from '../runtime/vite/config.js';
import { ssr } from '../ssr/index.js';
import { generatePaginateFunction } from '../ssr/paginate.js';
import { createRouteManifest, validateGetStaticPathsModule, validateGetStaticPathsResult } from '../ssr/routing.js';
import { generateRssFunction } from '../ssr/rss.js';
import { generateSitemap } from '../ssr/sitemap.js';
import { kb, profileHTML, profileJS } from './stats.js';
import { generateSitemap } from '../runtime/sitemap.js';
export interface BuildOptions {
mode?: string;
@ -55,7 +55,7 @@ class AstroBuilder {
// 1. initialize fresh Vite instance
const { logging, origin } = this;
const viteConfig = await loadViteConfig(
const viteConfig = await createVite(
{
mode: this.mode,
server: {
@ -127,7 +127,10 @@ class AstroBuilder {
},
target: 'es2020', // must match an esbuild target
},
plugins: [rollupPluginHTML({ input, extractAssets: false }), ...(viteConfig.plugins || [])],
plugins: [
rollupPluginHTML({ input, extractAssets: false }) as any, // "any" needed for CI; also we dont need typedefs for this anyway
...(viteConfig.plugins || []),
],
publicDir: viteConfig.publicDir,
root: viteConfig.root,
server: viteConfig.server,

View file

@ -1,4 +1,4 @@
import type { AstroConfig, AstroUserConfig } from './@types/astro';
import type { AstroConfig, AstroUserConfig } from '../@types/astro-core';
import { existsSync } from 'fs';
import * as colors from 'kleur/colors';

View file

@ -1,18 +1,18 @@
import type { AstroConfig } from '../../@types/astro';
import type { LogOptions } from '../../logger';
import type { AstroConfig } from '../@types/astro-core';
import type { AstroDevServer } from './dev';
import type { LogOptions } from './logger';
import fs from 'fs';
import slash from 'slash';
import { fileURLToPath } from 'url';
import { createRequire } from 'module';
import vite from 'vite';
import { getPackageJSON, parseNpmName } from '../util.js';
import astroVitePlugin from './plugin-astro.js';
import astroPostprocessVitePlugin from './plugin-astro-postprocess.js';
import markdownVitePlugin from './plugin-markdown.js';
import jsxVitePlugin from './plugin-jsx.js';
import fetchVitePlugin from './plugin-fetch.js';
import { AstroDevServer } from '../../dev';
import astroVitePlugin from '../vite-plugin-astro/index.js';
import astroPostprocessVitePlugin from '../vite-plugin-astro-postprocess/index.js';
import markdownVitePlugin from '../vite-plugin-markdown/index.js';
import jsxVitePlugin from '../vite-plugin-jsx/index.js';
import fetchVitePlugin from '../vite-plugin-fetch/index.js';
import { getPackageJSON, parseNpmName } from './util.js';
const require = createRequire(import.meta.url);
@ -20,7 +20,7 @@ const require = createRequire(import.meta.url);
type ViteConfigWithSSR = vite.InlineConfig & { ssr?: { external?: string[]; noExternal?: string[] } };
/** Return a common starting point for all Vite actions */
export async function loadViteConfig(
export async function createVite(
viteConfig: ViteConfigWithSSR,
{ astroConfig, logging, devServer }: { astroConfig: AstroConfig; logging: LogOptions; devServer?: AstroDevServer }
): Promise<ViteConfigWithSSR> {
@ -67,7 +67,7 @@ export async function loadViteConfig(
);
// load client-side hydrations
fs.readdirSync(new URL('../../client', import.meta.url)).forEach((hydrator) => {
fs.readdirSync(new URL('../runtime/client', import.meta.url)).forEach((hydrator) => {
optimizedDeps.add(`astro/client/${hydrator}`); // always prepare these for client
});
@ -83,12 +83,12 @@ export async function loadViteConfig(
include: [...optimizedDeps],
},
plugins: [
astroVitePlugin({ config: astroConfig, devServer }),
markdownVitePlugin({ config: astroConfig, devServer }),
jsxVitePlugin({ config: astroConfig, logging }),
astroVitePlugin({ config: astroConfig, devServer }),
markdownVitePlugin({ config: astroConfig, devServer }),
jsxVitePlugin({ config: astroConfig, logging }),
astroPostprocessVitePlugin({ config: astroConfig, devServer }),
fetchVitePlugin(),
...plugins
...plugins,
],
publicDir: fileURLToPath(astroConfig.public),
resolve: {
@ -111,7 +111,7 @@ export async function loadViteConfig(
noExternal: [...noExternal],
},
},
viteConfig
vite.mergeConfig(viteConfig, astroConfig.vite || {}) // merge in user vite settings
);
}

View file

@ -1,6 +1,6 @@
import type { NextFunction } from 'connect';
import type http from 'http';
import type { AstroConfig, ManifestData, RouteCache, RouteData, SSRError } from '../@types/astro';
import type { AstroConfig, ManifestData, RouteCache, RouteData } from '../../@types/astro-core';
import type { LogOptions } from '../logger';
import type { HmrContext, ModuleNode } from 'vite';
@ -8,18 +8,15 @@ import { fileURLToPath } from 'url';
import connect from 'connect';
import mime from 'mime';
import { performance } from 'perf_hooks';
import { createRequire } from 'module';
import stripAnsi from 'strip-ansi';
import vite from 'vite';
import { defaultLogOptions, error, info } from '../logger.js';
import { createRouteManifest, matchRoute } from '../runtime/routing.js';
import { ssr } from '../runtime/ssr.js';
import { loadViteConfig } from '../runtime/vite/config.js';
import { ssr } from '../ssr/index.js';
import { createRouteManifest, matchRoute } from '../ssr/routing.js';
import { createVite } from '../create-vite.js';
import * as msg from './messages.js';
import { errorTemplate } from './template/error.js';
const require = createRequire(import.meta.url);
export interface DevOptions {
logging: LogOptions;
}
@ -54,17 +51,15 @@ export class AstroDevServer {
hostname: string;
port: number;
private internalCache: Map<string, string>;
private config: AstroConfig;
private logging: LogOptions;
private manifest: ManifestData;
private mostRecentRoute?: RouteData;
private origin: string;
private routeCache: RouteCache = {};
private viteServer: vite.ViteDevServer | undefined;
private mostRecentRoute?: RouteData;
constructor(config: AstroConfig, options: DevOptions) {
this.internalCache = new Map();
this.config = config;
this.hostname = config.devOptions.hostname || 'localhost';
this.logging = options.logging;
@ -110,7 +105,6 @@ export class AstroDevServer {
/** Stop dev server */
async stop() {
this.internalCache = new Map();
this.httpServer?.close(); // close HTTP server
if (this.viteServer) await this.viteServer.close(); // close Vite server
}
@ -167,7 +161,7 @@ export class AstroDevServer {
/** Set up Vite server */
private async createViteServer() {
const viteConfig = await loadViteConfig(
const viteConfig = await createVite(
{
mode: 'development',
server: {

View file

@ -88,12 +88,7 @@ export const levels: Record<LoggerLevel, number> = {
};
/** Full logging API */
export function log(
opts: LogOptions = {},
level: LoggerLevel,
type: string | null,
...args: Array<any>
) {
export function log(opts: LogOptions = {}, level: LoggerLevel, type: string | null, ...args: Array<any>) {
const logLevel = opts.level ?? defaultLogOptions.level;
const dest = opts.dest ?? defaultLogOptions.dest;
const event: LogMessage = {
@ -112,38 +107,22 @@ export function log(
}
/** Emit a message only shown in debug mode */
export function debug(
opts: LogOptions,
type: string | null,
...messages: Array<any>
) {
export function debug(opts: LogOptions, type: string | null, ...messages: Array<any>) {
return log(opts, 'debug', type, ...messages);
}
/** Emit a general info message (be careful using this too much!) */
export function info(
opts: LogOptions,
type: string | null,
...messages: Array<any>
) {
export function info(opts: LogOptions, type: string | null, ...messages: Array<any>) {
return log(opts, 'info', type, ...messages);
}
/** Emit a warning a user should be aware of */
export function warn(
opts: LogOptions,
type: string | null,
...messages: Array<any>
) {
export function warn(opts: LogOptions, type: string | null, ...messages: Array<any>) {
return log(opts, 'warn', type, ...messages);
}
/** Emit a fatal error message the user should address. */
export function error(
opts: LogOptions,
type: string | null,
...messages: Array<any>
) {
export function error(opts: LogOptions, type: string | null, ...messages: Array<any>) {
return log(opts, 'error', type, ...messages);
}
@ -174,9 +153,7 @@ export function parseError(opts: LogOptions, err: CompileError) {
opts,
'parse-error',
`
${underline(
bold(grey(`${err.filename || ''}:${err.start.line}:${err.start.column}`))
)}
${underline(bold(grey(`${err.filename || ''}:${err.start.line}:${err.start.column}`)))}
${bold(red(`𝘅 ${err.message}`))}
${frame}
`

View file

@ -1,5 +1,5 @@
import type { AstroConfig } from '../@types/astro';
import type { LogOptions } from '../logger.js';
import type { AstroConfig } from '../../@types/astro-core';
import type { LogOptions } from '../logger';
import http from 'http';
import { performance } from 'perf_hooks';

View file

@ -1,8 +1,7 @@
import type { BuildResult } from 'esbuild';
import type { ViteDevServer } from 'vite';
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, Params, Props, Renderer, RouteCache, RouteData, RuntimeMode, SSRError } from '../@types/astro';
import type { SSRResult } from '../@types/ssr';
import type { Astro, TopLevelAstro } from '../@types/astro-file';
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, Params, Props, Renderer, RouteCache, RouteData, RuntimeMode, SSRError } from '../../@types/astro-core';
import type { AstroGlobal, TopLevelAstro, SSRResult } from '../../@types/astro-runtime';
import type { LogOptions } from '../logger';
import cheerio from 'cheerio';
@ -10,12 +9,10 @@ import * as eslexer from 'es-module-lexer';
import { fileURLToPath } from 'url';
import fs from 'fs';
import path from 'path';
import slash from 'slash';
import glob from 'tiny-glob';
import { renderPage } from '../internal/index.js';
import { renderPage } from '../../runtime/server/index.js';
import { parseNpmName, canonicalURL as getCanonicalURL, codeFrame } from '../util.js';
import { generatePaginateFunction } from './paginate.js';
import { getParams, validateGetStaticPathsModule, validateGetStaticPathsResult } from './routing.js';
import { parseNpmName, canonicalURL as getCanonicalURL, codeFrame } from './util.js';
interface SSROptions {
/** an instance of the AstroConfig */
@ -68,8 +65,7 @@ async function resolveRenderer(viteServer: ViteDevServer, renderer: string) {
async function resolveRenderers(viteServer: ViteDevServer, ids: string[]): Promise<Renderer[]> {
const renderers = await Promise.all(
ids.map(renderer => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
ids.map((renderer) => {
if (cache.has(renderer)) return cache.get(renderer)!;
let promise = resolveRenderer(viteServer, renderer);
cache.set(renderer, promise);
@ -96,7 +92,7 @@ export async function ssr({ astroConfig, filePath, logging, mode, origin, pathna
if (route && !route.pathname) {
if (route.params.length) {
const paramsMatch = route.pattern.exec(pathname);
if(paramsMatch) {
if (paramsMatch) {
params = getParams(route.params)(paramsMatch);
}
}
@ -104,7 +100,6 @@ export async function ssr({ astroConfig, filePath, logging, mode, origin, pathna
routeCache[route.component] =
routeCache[route.component] ||
(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await mod.getStaticPaths!({
paginate: generatePaginateFunction(route),
rss: () => {
@ -135,23 +130,21 @@ export async function ssr({ astroConfig, filePath, logging, mode, origin, pathna
styles: new Set(),
scripts: new Set(),
/** This function returns the `Astro` faux-global */
createAstro(AstroGlobal: TopLevelAstro, props: Record<string, any>, slots: Record<string, any> | null) {
createAstro(astroGlobal: TopLevelAstro, props: Record<string, any>, slots: Record<string, any> | null) {
const site = new URL(origin);
const url = new URL('.' + pathname, site);
const canonicalURL = getCanonicalURL('.' + pathname, astroConfig.buildOptions.site || origin);
return {
__proto__: AstroGlobal,
__proto__: astroGlobal,
props,
request: {
canonicalURL,
params: {},
url
url,
},
slots: Object.fromEntries(
Object.entries(slots || {}).map(([slotName]) => [slotName, true])
)
} as unknown as Astro;
slots: Object.fromEntries(Object.entries(slots || {}).map(([slotName]) => [slotName, true])),
} as unknown as AstroGlobal;
},
_metadata: { renderers },
};
@ -201,7 +194,7 @@ function injectViteClient(html: string): string {
/** Injects Astro HMR client code */
function injectAstroHMR(html: string): string {
return html.replace('<head>', `<head><script type="module" src="/@astro/runtime/hmr"></script>`);
return html.replace('<head>', `<head><script type="module" src="/@astro/runtime/client/hmr"></script>`);
}
/** Convert npm specifier into Vite URL */

View file

@ -1,4 +1,4 @@
import { GetStaticPathsResult, PaginatedCollectionProp, PaginateFunction, Params, Props, RouteData } from '../@types/astro';
import { GetStaticPathsResult, PaginatedCollectionProp, PaginateFunction, Params, Props, RouteData } from '../../@types/astro-core';
// return filters.map((filter) => {
// const filteredRecipes = allRecipes.filter((recipe) =>

View file

@ -1,4 +1,4 @@
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, ManifestData, Params, RouteData } from '../@types/astro';
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, ManifestData, Params, RouteData } from '../../@types/astro-core';
import type { LogOptions } from '../logger';
import fs from 'fs';

View file

@ -1,6 +1,7 @@
import type { RSSFunction, RSSFunctionArgs, RSSResult, RouteData } from '../@types/astro';
import type { RSSFunction, RSSFunctionArgs, RSSResult, RouteData } from '../../@types/astro-core';
import parser from 'fast-xml-parser';
import { canonicalURL } from './util.js';
import { canonicalURL } from '../util.js';
/** Validates getStaticPaths.rss */
export function validateRSS(args: GenerateRSSArgs): void {

View file

@ -0,0 +1,8 @@
# `runtime/`
Code that executes within isolated contexts:
- `client/`: executes within the browser. Astros client-side partial hydration code lives here, and only browser-compatible code can be used.
- `server/`: executes inside Vite SSR. Though also a Node context, this is isolated from code in `core/`.
[See CONTRIBUTING.md](../../../../CONTRIBUTING.md) for a code overview.

View file

@ -1,35 +0,0 @@
import type { ScriptInfo } from '../@types/astro';
const sym = Symbol.for('astro.hoistedScripts');
interface ComponentThatMaybeHasHoistedScripts {
[sym]: ScriptInfo[];
}
/**
* Takes all of the components this component uses and combines them with its
* own scripts and flattens it to a deduped list.
* The page component will have an array of all scripts used by all child components and itself.
*/
function hoistedScripts(Components: ComponentThatMaybeHasHoistedScripts[], scripts: ScriptInfo[]) {
const flatScripts = [];
const allScripts: ScriptInfo[] = Components.map((c) => c && c[sym])
.filter((a) => a)
.concat(scripts)
.flatMap((a) => a);
const visitedSource = new Set();
for (let script of allScripts) {
if (!('src' in script)) {
flatScripts.push(script);
} else if (!visitedSource.has(script.src)) {
flatScripts.push(script);
visitedSource.add(script.src);
}
}
return flatScripts;
}
export { hoistedScripts as __astro_hoisted_scripts };

View file

@ -1,15 +0,0 @@
/** */
export function __astro_slot_content({ name }: { name: string }, ...children: any[]) {
return { $slot: name, children };
}
export const __astro_slot = ({ name = 'default' }: { name: string }, _children: any, ...fallback: string[]) => {
if (name === 'default' && typeof _children === 'string') {
return _children ? _children : fallback;
}
if (!_children.$slots) {
throw new Error(`__astro_slot encountered an unexpected child:\n${JSON.stringify(_children)}`);
}
const children = _children.$slots[name];
return children ? children : fallback;
};

View file

@ -1,4 +1,4 @@
import type { GetHydrateCallback, HydrateOptions } from '../@types/hydrate';
import type { GetHydrateCallback, HydrateOptions } from '../../@types/astro-runtime';
/**
* Hydrate this component as soon as the main thread is free

View file

@ -1,4 +1,4 @@
import type { GetHydrateCallback, HydrateOptions } from '../@types/hydrate';
import type { GetHydrateCallback, HydrateOptions } from '../../@types/astro-runtime';
/**
* Hydrate this component immediately

View file

@ -1,4 +1,4 @@
import type { GetHydrateCallback, HydrateOptions } from '../@types/hydrate';
import type { GetHydrateCallback, HydrateOptions } from '../../@types/astro-runtime';
/**
* Hydrate this component when a matching media query is found

View file

@ -1,4 +1,4 @@
import type { GetHydrateCallback, HydrateOptions } from '../@types/hydrate';
import type { GetHydrateCallback, HydrateOptions } from '../../@types/astro-runtime';
/**
* Hydrate this component immediately

View file

@ -1,4 +1,4 @@
import type { GetHydrateCallback, HydrateOptions } from '../@types/hydrate';
import type { GetHydrateCallback, HydrateOptions } from '../../@types/astro-runtime';
/**
* Hydrate this component when one of it's children becomes visible.

View file

@ -1,48 +0,0 @@
import type { AstroComponentMetadata } from '../@types/astro';
type ModuleCandidates = Map<any, string>;
interface RegistryOptions {
candidates: ModuleCandidates;
}
class AstroElementRegistry {
private candidates: ModuleCandidates;
private cache: Map<string, string> = new Map();
constructor(options: RegistryOptions) {
this.candidates = options.candidates;
}
find(tagName: string) {
for (let [module, importSpecifier] of this.candidates) {
if (module && typeof module.tagName === 'string') {
if (module.tagName === tagName) {
// Found!
return importSpecifier;
}
}
}
}
findCached(tagName: string) {
if (this.cache.has(tagName)) {
return this.cache.get(tagName);
}
let specifier = this.find(tagName);
if (specifier) {
this.cache.set(tagName, specifier);
}
return specifier;
}
astroComponentArgs(tagName: string, metadata: AstroComponentMetadata) {
const specifier = this.findCached(tagName);
const outMeta: AstroComponentMetadata = {
...metadata,
componentUrl: specifier || metadata.componentUrl,
};
return [tagName, outMeta];
}
}
export { AstroElementRegistry };

View file

@ -1,71 +0,0 @@
export type HProps = Record<string, string | boolean> | null | undefined;
export type HChild = string | undefined | (() => string);
export type AstroComponent = (props: HProps, ...children: Array<HChild>) => string;
export type HTag = string | AstroComponent;
const voidTags = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
function* _children(children: Array<HChild>) {
for (let child of children) {
// Special: If a child is a function, call it automatically.
// This lets you do {() => ...} without the extra boilerplate
// of wrapping it in a function and calling it.
if (typeof child === 'function') {
yield child();
} else if (typeof child === 'string') {
yield child;
} else if (!child && child !== 0) {
// do nothing, safe to ignore falsey values.
} else {
yield child;
}
}
}
/** Generator for primary h() function */
function* _h(tag: string, attrs: HProps, children: Array<HChild>) {
if (tag.toLowerCase() === '!doctype') {
yield `<${tag} `;
if (attrs) {
yield Object.keys(attrs).join(' ');
}
yield '>';
return;
}
yield `<${tag}`;
if (attrs) {
for (let [key, value] of Object.entries(attrs)) {
if (value === '') yield ` ${key}=""`;
else if (value == null || value === false) yield '';
else if (value === true) yield ` ${key}`;
else yield ` ${key}="${value}"`;
}
}
yield '>';
// Void tags have no children.
if (voidTags.has(tag)) {
return;
}
yield* _children(children);
yield `</${tag}>`;
}
/** Astros primary h() function. Allows it to use JSX-like syntax. */
export async function h(tag: HTag, attrs: HProps, ...pChildren: Array<Promise<HChild>>) {
const children = await Promise.all(pChildren.flat(Infinity));
if (typeof tag === 'function') {
// We assume it's an astro component
return tag(attrs, ...children);
}
return Array.from(_h(tag, attrs, children)).join('');
}
/** Fragment helper, similar to React.Fragment */
export function Fragment(_: HProps, ...children: Array<HChild>) {
return Array.from(_children(children)).join('');
}

View file

@ -1,13 +0,0 @@
import type { AstroComponentMetadata } from '../@types/astro.js';
import { h } from './h.js';
async function renderToStaticMarkup(tag: string, props: Record<string, any>, children: string | undefined) {
const html = await h(tag, props, Promise.resolve(children));
return {
check: (...args: any[]) => true,
html,
};
}
export { renderToStaticMarkup };

View file

@ -1,13 +1,13 @@
import { pathToFileURL } from 'url';
interface ModuleInfo {
module: Record<string, any>,
module: Record<string, any>;
specifier: string;
}
interface ComponentMetadata {
componentExport: string;
componentUrl: string
componentUrl: string;
}
class HydrationMap {
@ -29,8 +29,7 @@ class HydrationMap {
}
private getComponentMetadata(Component: any): ComponentMetadata | null {
if(this.metadataCache.has(Component)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (this.metadataCache.has(Component)) {
return this.metadataCache.get(Component)!;
}
const metadata = this.findComponentMetadata(Component);
@ -40,20 +39,20 @@ class HydrationMap {
private findComponentMetadata(Component: any): ComponentMetadata | null {
const isCustomElement = typeof Component === 'string';
for (const { module, specifier } of this.modules) {
for (const { module, specifier } of this.modules) {
const id = specifier.startsWith('.') ? new URL(specifier, this.fileURL).pathname : specifier;
for (const [key, value] of Object.entries(module)) {
if(isCustomElement) {
if (isCustomElement) {
if (key === 'tagName' && Component === value) {
return {
componentExport: key,
componentUrl: id
componentUrl: id,
};
}
} else if(Component === value) {
} else if (Component === value) {
return {
componentExport: key,
componentUrl: id
componentUrl: id,
};
}
}
@ -64,4 +63,4 @@ class HydrationMap {
export function createHydrationMap(fileURL: string, modules: ModuleInfo[], components: any[]) {
return new HydrationMap(fileURL, modules, components);
}
}

View file

@ -1,6 +1,6 @@
import type { AstroComponentMetadata } from '../@types/astro';
import type { SSRResult } from '../@types/ssr';
import type { TopLevelAstro } from '../@types/astro-file';
import type { AstroComponentMetadata } from '../../@types/astro-core';
import type { SSRResult } from '../../@types/astro-runtime';
import type { TopLevelAstro } from '../../@types/astro-runtime';
import { pathToFileURL } from 'url';
import { valueToEstree } from 'estree-util-value-to-estree';
@ -24,6 +24,7 @@ const customGenerator: astring.Generator = {
}
},
};
const serialize = (value: any) =>
generate(valueToEstree(value), {
generator: customGenerator,

View file

@ -1,64 +0,0 @@
import type { TransformResult } from '@astrojs/compiler';
import type { Plugin } from 'vite';
import type { AstroConfig } from '../../@types/astro.js';
import esbuild from 'esbuild';
import fs from 'fs';
import { transform } from '@astrojs/compiler';
import { decode } from 'sourcemap-codec';
import { AstroDevServer } from '../../dev/index.js';
interface AstroPluginOptions {
config: AstroConfig;
devServer?: AstroDevServer;
}
/** Transform .astro files for Vite */
export default function astro({ config, devServer }: AstroPluginOptions): Plugin {
return {
name: '@astrojs/vite-plugin-astro',
enforce: 'pre', // run transforms before other plugins can
// note: dont claim .astro files with resolveId() — it prevents Vite from transpiling the final JS (import.meta.globEager, etc.)
async load(id) {
if (id.endsWith('.astro')) {
// const isPage = id.startsWith(fileURLToPath(config.pages));
let source = await fs.promises.readFile(id, 'utf8');
let tsResult: TransformResult | undefined;
try {
// 1. Transform from `.astro` to valid `.ts`
// use `sourcemap: "inline"` so that the sourcemap is included in the "code" result that we pass to esbuild.
tsResult = await transform(source, {
site: config.buildOptions.site,
sourcefile: id,
sourcemap: 'both',
internalURL: 'astro/internal',
});
// 2. Compile `.ts` to `.js`
const { code, map } = await esbuild.transform(tsResult.code, { loader: 'ts', sourcemap: 'external', sourcefile: id });
return {
code,
map,
};
} catch (err: any) {
// if esbuild threw the error, find original code source to display
if (err.errors && tsResult?.map) {
const json = JSON.parse(tsResult.map);
const mappings = decode(json.mappings);
const focusMapping = mappings[err.errors[0].location.line + 1];
err.sourceLoc = { file: id, line: (focusMapping[0][2] || 0) + 1, column: (focusMapping[0][3] || 0) + 1 };
}
throw err;
}
}
return null;
},
async handleHotUpdate(context) {
if (devServer) {
return devServer.handleHotUpdate(context);
}
},
};
}

View file

@ -0,0 +1,3 @@
# vite-plugin-astro-postprocess
Adds last-minute transforms to `.astro` files

View file

@ -1,9 +1,10 @@
import * as babel from '@babel/core';
import * as babelTraverse from '@babel/traverse';
import type * as t from '@babel/types';
import type { Plugin } from 'vite';
import type { AstroConfig } from '../../@types/astro.js';
import { AstroDevServer } from '../../dev/index.js';
import type { AstroConfig } from '../@types/astro-core';
import type { AstroDevServer } from '../core/dev/index';
import * as babelTraverse from '@babel/traverse';
import * as babel from '@babel/core';
interface AstroPluginOptions {
config: AstroConfig;
@ -18,11 +19,13 @@ export default function astro({ config, devServer }: AstroPluginOptions): Plugin
if (!id.endsWith('.astro') && !id.endsWith('.md')) {
return null;
}
// Optimization: only run on a probably match
// Open this up if need for post-pass extends past fetchContent
if (!code.includes('fetchContent')) {
return null;
}
// Handle the second-pass JS AST Traversal
const result = await babel.transformAsync(code, {
sourceType: 'module',
@ -44,22 +47,23 @@ export default function astro({ config, devServer }: AstroPluginOptions): Plugin
if (/[a-z]\:\/\//.test(value)) {
return;
}
path.replaceWith({
type: 'CallExpression',
callee: {
type: 'MemberExpression',
object: { type: 'MetaProperty', meta: { type: 'Identifier', name: 'import' }, property: { type: 'Identifier', name: 'meta' } },
property: { type: 'Identifier', name: 'globEager' },
computed: false,
},
arguments: [path.node],
} as any);
path.replaceWith({
type: 'CallExpression',
callee: {
type: 'MemberExpression',
object: { type: 'MetaProperty', meta: { type: 'Identifier', name: 'import' }, property: { type: 'Identifier', name: 'meta' } },
property: { type: 'Identifier', name: 'globEager' },
computed: false,
},
arguments: [path.node],
} as any);
},
},
};
},
],
});
// Undocumented baby behavior, but possible according to Babel types.
if (!result || !result.code) {
return null;
@ -67,4 +71,4 @@ export default function astro({ config, devServer }: AstroPluginOptions): Plugin
return { code: result.code, map: result.map };
},
};
}
}

View file

@ -0,0 +1,3 @@
# vite-plugin-astro
Adds `.astro` support to Vite

View file

@ -0,0 +1,63 @@
import type { TransformResult } from '@astrojs/compiler';
import type { Plugin } from 'vite';
import type { AstroConfig } from '../@types/astro-core';
import esbuild from 'esbuild';
import fs from 'fs';
import { transform } from '@astrojs/compiler';
import { decode } from 'sourcemap-codec';
import { AstroDevServer } from '../core/dev/index.js';
interface AstroPluginOptions {
config: AstroConfig;
devServer?: AstroDevServer;
}
/** Transform .astro files for Vite */
export default function astro({ config, devServer }: AstroPluginOptions): Plugin {
return {
name: '@astrojs/vite-plugin-astro',
enforce: 'pre', // run transforms before other plugins can
// note: dont claim .astro files with resolveId() — it prevents Vite from transpiling the final JS (import.meta.globEager, etc.)
async load(id) {
if (!id.endsWith('.astro')) {
return null;
}
// const isPage = id.startsWith(fileURLToPath(config.pages));
let source = await fs.promises.readFile(id, 'utf8');
let tsResult: TransformResult | undefined;
try {
// 1. Transform from `.astro` to valid `.ts`
// use `sourcemap: "inline"` so that the sourcemap is included in the "code" result that we pass to esbuild.
tsResult = await transform(source, {
site: config.buildOptions.site,
sourcefile: id,
sourcemap: 'both',
internalURL: 'astro/internal',
});
// 2. Compile `.ts` to `.js`
const { code, map } = await esbuild.transform(tsResult.code, { loader: 'ts', sourcemap: 'external', sourcefile: id });
return {
code,
map,
};
} catch (err: any) {
// if esbuild threw the error, find original code source to display
if (err.errors && tsResult?.map) {
const json = JSON.parse(tsResult.map);
const mappings = decode(json.mappings);
const focusMapping = mappings[err.errors[0].location.line + 1];
err.sourceLoc = { file: id, line: (focusMapping[0][2] || 0) + 1, column: (focusMapping[0][3] || 0) + 1 };
}
throw err;
}
},
async handleHotUpdate(context) {
if (devServer) {
return devServer.handleHotUpdate(context);
}
},
};
}

View file

@ -0,0 +1,3 @@
# vite-plugin-fetch
Adds fetch support in SSR contexts.

View file

@ -0,0 +1,3 @@
# vite-plugin-jsx
Modifies Vites built-in JSX behavior to allow for React, Preact, and Solid.js to coexist and all use `.jsx` and `.tsx` extensions.

View file

@ -1,15 +1,15 @@
import type { Plugin } from 'vite';
import type { TransformResult } from 'rollup';
import type { AstroConfig, Renderer } from '../../@types/astro';
import type { LogOptions } from '../../logger';
import type { AstroConfig, Renderer } from '../@types/astro-core';
import type { LogOptions } from '../core/logger';
import babel from '@babel/core';
import esbuild from 'esbuild';
import * as colors from 'kleur/colors';
import * as eslexer from 'es-module-lexer';
import path from 'path';
import { error } from '../../logger.js';
import { parseNpmName } from '../util.js';
import { error } from '../core/logger.js';
import { parseNpmName } from '../core/util.js';
const JSX_RENDERERS = new Map<string, Renderer>();
const JSX_EXTENSIONS = new Set(['.jsx', '.tsx']);

View file

@ -0,0 +1,3 @@
# vite-plugin-markdown
Adds Markdown support to Vite, both at the top level as well as within `.astro` files.

View file

@ -1,10 +1,10 @@
import type { Plugin } from 'vite';
import type { AstroConfig, Renderer } from '../../@types/astro.js';
import type { AstroConfig } from '../@types/astro-core';
import esbuild from 'esbuild';
import fs from 'fs';
import { transform } from '@astrojs/compiler';
import { AstroDevServer } from '../../dev/index.js';
import { AstroDevServer } from '../core/dev/index.js';
interface AstroPluginOptions {
config: AstroConfig;

View file

@ -5,7 +5,7 @@ let fixture;
before(async () => {
fixture = await loadFixture({
projectRoot: './fixtures/astro-rss/',
projectRoot: './fixtures/astro-sitemap-rss/',
buildOptions: {
site: 'https://astro.build/',
sitemap: true,
@ -23,3 +23,12 @@ describe('RSS Generation', () => {
);
});
});
describe('Sitemap Generation', () => {
it('Generates Sitemap correctly', async () => {
let sitemap = await fixture.readFile('/sitemap.xml');
expect(sitemap).to.equal(
`<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://astro.build/404/index.html</loc></url><url><loc>https://astro.build/episode/fazers/index.html</loc></url><url><loc>https://astro.build/episode/rap-snitch-knishes/index.html</loc></url><url><loc>https://astro.build/episode/rhymes-like-dimes/index.html</loc></url><url><loc>https://astro.build/episodes/index.html</loc></url></urlset>\n`
);
});
});

View file

@ -1,24 +0,0 @@
import { expect } from 'chai';
import { loadFixture } from './test-utils.js';
let fixture;
before(async () => {
fixture = await loadFixture({
projectRoot: './fixtures/astro-rss/',
buildOptions: {
site: 'https://astro.build/',
sitemap: true,
},
});
await fixture.build();
});
describe('Sitemap Generation', () => {
it('Generates Sitemap correctly', async () => {
let sitemap = await fixture.readFile('/sitemap.xml');
expect(sitemap).to.equal(
`<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://astro.build/404/index.html</loc></url><url><loc>https://astro.build/episode/fazers/index.html</loc></url><url><loc>https://astro.build/episode/rap-snitch-knishes/index.html</loc></url><url><loc>https://astro.build/episode/rhymes-like-dimes/index.html</loc></url><url><loc>https://astro.build/episodes/index.html</loc></url></urlset>\n`
);
});
});

View file

@ -1,7 +1,7 @@
import { expect } from 'chai';
import { z } from 'zod';
import stripAnsi from 'strip-ansi';
import { formatConfigError, validateConfig } from '../dist/config.js';
import { formatConfigError, validateConfig } from '../dist/core/config.js';
describe('Config Validation', () => {
it('empty user config is valid', async () => {

View file

@ -1,6 +1,6 @@
import { expect } from 'chai';
import { fileURLToPath } from 'url';
import { createRouteManifest } from '../dist/runtime/routing.js';
import { createRouteManifest } from '../dist/core/ssr/routing.js';
const cwd = new URL('./fixtures/route-manifest/', import.meta.url);

View file

@ -2,9 +2,9 @@ import execa from 'execa';
import fetch from 'node-fetch';
import fs from 'fs';
import { fileURLToPath } from 'url';
import { loadConfig } from '../dist/config.js';
import build from '../dist/build/index.js';
import preview from '../dist/preview/index.js';
import { loadConfig } from '../dist/core/config.js';
import build from '../dist/core/build/index.js';
import preview from '../dist/core/preview/index.js';
/**
* Load Astro fixture

View file

@ -17,6 +17,11 @@ const defaultConfig = {
sourcesContent: false,
};
const dt = new Intl.DateTimeFormat('en-us', {
hour: '2-digit',
minute: '2-digit',
});
export default async function build(...args) {
const config = Object.assign({}, defaultConfig);
const isDev = args.slice(-1)[0] === 'IS_DEV';
@ -46,7 +51,7 @@ export default async function build(...args) {
...config,
watch: {
onRebuild(error, result) {
const date = new Date().toISOString();
const date = dt.format(new Date());
if (error || (result && result.errors.length)) {
console.error(dim(`[${date}] `) + red(error || result.errors.join('\n')));
} else {

413
yarn.lock
View file

@ -150,13 +150,6 @@
unist-util-map "^3.0.0"
unist-util-visit "^4.0.0"
"@babel/code-frame@7.12.11":
version "7.12.11"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
dependencies:
"@babel/highlight" "^7.10.4"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb"
@ -164,7 +157,7 @@
dependencies:
"@babel/highlight" "^7.14.5"
"@babel/code-frame@^7.12.13":
"@babel/code-frame@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503"
integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==
@ -198,20 +191,20 @@
semver "^5.4.1"
source-map "^0.5.0"
"@babel/core@^7.15.5":
version "7.15.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.5.tgz#f8ed9ace730722544609f90c9bb49162dc3bf5b9"
integrity sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==
"@babel/core@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10"
integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==
dependencies:
"@babel/code-frame" "^7.14.5"
"@babel/generator" "^7.15.4"
"@babel/code-frame" "^7.15.8"
"@babel/generator" "^7.15.8"
"@babel/helper-compilation-targets" "^7.15.4"
"@babel/helper-module-transforms" "^7.15.4"
"@babel/helper-module-transforms" "^7.15.8"
"@babel/helpers" "^7.15.4"
"@babel/parser" "^7.15.5"
"@babel/parser" "^7.15.8"
"@babel/template" "^7.15.4"
"@babel/traverse" "^7.15.4"
"@babel/types" "^7.15.4"
"@babel/types" "^7.15.6"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
@ -228,6 +221,15 @@
jsesc "^2.5.1"
source-map "^0.5.0"
"@babel/generator@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1"
integrity sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==
dependencies:
"@babel/types" "^7.15.6"
jsesc "^2.5.1"
source-map "^0.5.0"
"@babel/helper-annotate-as-pure@^7.14.5":
version "7.15.4"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz#3d0e43b00c5e49fdb6c57e421601a7a658d5f835"
@ -282,7 +284,7 @@
dependencies:
"@babel/types" "^7.15.4"
"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.15.4":
"@babel/helper-module-transforms@^7.12.1":
version "7.15.7"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz#7da80c8cbc1f02655d83f8b79d25866afe50d226"
integrity sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==
@ -296,6 +298,20 @@
"@babel/traverse" "^7.15.4"
"@babel/types" "^7.15.6"
"@babel/helper-module-transforms@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2"
integrity sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==
dependencies:
"@babel/helper-module-imports" "^7.15.4"
"@babel/helper-replace-supers" "^7.15.4"
"@babel/helper-simple-access" "^7.15.4"
"@babel/helper-split-export-declaration" "^7.15.4"
"@babel/helper-validator-identifier" "^7.15.7"
"@babel/template" "^7.15.4"
"@babel/traverse" "^7.15.4"
"@babel/types" "^7.15.6"
"@babel/helper-optimise-call-expression@^7.15.4":
version "7.15.4"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171"
@ -356,7 +372,7 @@
"@babel/traverse" "^7.15.4"
"@babel/types" "^7.15.4"
"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5":
"@babel/highlight@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9"
integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==
@ -365,11 +381,16 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5", "@babel/parser@^7.4.5":
"@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.4.5":
version "7.15.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae"
integrity sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==
"@babel/parser@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016"
integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==
"@babel/plugin-proposal-object-rest-spread@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069"
@ -675,14 +696,14 @@
resolved "https://registry.yarnpkg.com/@emmetio/scanner/-/scanner-1.0.0.tgz#065b2af6233fe7474d44823e3deb89724af42b5f"
integrity sha512-8HqW8EVqjnCmWXVpqAOZf+EGESdkR27odcMMMGefgKXtar00SoYNSryGv//TELI4T3QFsECo78p+0lmalk/CFA==
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==
"@eslint/eslintrc@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.3.tgz#41f08c597025605f672251dcc4e8be66b5ed7366"
integrity sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==
dependencies:
ajv "^6.12.4"
debug "^4.1.1"
espree "^7.3.0"
debug "^4.3.2"
espree "^9.0.0"
globals "^13.9.0"
ignore "^4.0.6"
import-fresh "^3.2.1"
@ -717,10 +738,10 @@
dependencies:
"@hapi/hoek" "^9.0.0"
"@humanwhocodes/config-array@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==
"@humanwhocodes/config-array@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.6.0.tgz#b5621fdb3b32309d2d16575456cbc277fa8f021a"
integrity sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==
dependencies:
"@humanwhocodes/object-schema" "^1.2.0"
debug "^4.1.1"
@ -1985,74 +2006,75 @@
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129"
integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==
"@typescript-eslint/eslint-plugin@^4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz#9f41efaee32cdab7ace94b15bd19b756dd099b0a"
integrity sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA==
"@typescript-eslint/eslint-plugin@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.0.0.tgz#ecc7cc69d1e6f342beb6ea9cf9fbc02c97a212ac"
integrity sha512-T6V6fCD2U0YesOedvydTnrNtsC8E+c2QzpawIpDdlaObX0OX5dLo7tLU5c64FhTZvA1Xrdim+cXDI7NPsVx8Cg==
dependencies:
"@typescript-eslint/experimental-utils" "4.31.2"
"@typescript-eslint/scope-manager" "4.31.2"
"@typescript-eslint/experimental-utils" "5.0.0"
"@typescript-eslint/scope-manager" "5.0.0"
debug "^4.3.1"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
regexpp "^3.1.0"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/experimental-utils@4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.2.tgz#98727a9c1e977dd5d20c8705e69cd3c2a86553fa"
integrity sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q==
"@typescript-eslint/experimental-utils@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.0.0.tgz#c7d7e67443dfb9fd93a5d060fb72c9e9b5638bbc"
integrity sha512-Dnp4dFIsZcPawD6CT1p5NibNUQyGSEz80sULJZkyhyna8AEqArmfwMwJPbmKzWVo4PabqNVzHYlzmcdLQWk+pg==
dependencies:
"@types/json-schema" "^7.0.7"
"@typescript-eslint/scope-manager" "4.31.2"
"@typescript-eslint/types" "4.31.2"
"@typescript-eslint/typescript-estree" "4.31.2"
"@typescript-eslint/scope-manager" "5.0.0"
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/typescript-estree" "5.0.0"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/parser@^4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.2.tgz#54aa75986e3302d91eff2bbbaa6ecfa8084e9c34"
integrity sha512-EcdO0E7M/sv23S/rLvenHkb58l3XhuSZzKf6DBvLgHqOYdL6YFMYVtreGFWirxaU2mS1GYDby3Lyxco7X5+Vjw==
"@typescript-eslint/parser@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.0.0.tgz#50d1be2e0def82d73e863cceba74aeeac9973592"
integrity sha512-B6D5rmmQ14I1fdzs71eL3DAuvnPHTY/t7rQABrL9BLnx/H51Un8ox1xqYAchs0/V2trcoyxB1lMJLlrwrJCDgw==
dependencies:
"@typescript-eslint/scope-manager" "4.31.2"
"@typescript-eslint/types" "4.31.2"
"@typescript-eslint/typescript-estree" "4.31.2"
"@typescript-eslint/scope-manager" "5.0.0"
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/typescript-estree" "5.0.0"
debug "^4.3.1"
"@typescript-eslint/scope-manager@4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.31.2.tgz#1d528cb3ed3bcd88019c20a57c18b897b073923a"
integrity sha512-2JGwudpFoR/3Czq6mPpE8zBPYdHWFGL6lUNIGolbKQeSNv4EAiHaR5GVDQaLA0FwgcdcMtRk+SBJbFGL7+La5w==
"@typescript-eslint/scope-manager@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.0.0.tgz#aea0fb0e2480c1169a02e89d9005ac3f2835713f"
integrity sha512-5RFjdA/ain/MDUHYXdF173btOKncIrLuBmA9s6FJhzDrRAyVSA+70BHg0/MW6TE+UiKVyRtX91XpVS0gVNwVDQ==
dependencies:
"@typescript-eslint/types" "4.31.2"
"@typescript-eslint/visitor-keys" "4.31.2"
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/visitor-keys" "5.0.0"
"@typescript-eslint/types@4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.2.tgz#2aea7177d6d744521a168ed4668eddbd912dfadf"
integrity sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w==
"@typescript-eslint/types@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.0.0.tgz#25d93f6d269b2d25fdc51a0407eb81ccba60eb0f"
integrity sha512-dU/pKBUpehdEqYuvkojmlv0FtHuZnLXFBn16zsDmlFF3LXkOpkAQ2vrKc3BidIIve9EMH2zfTlxqw9XM0fFN5w==
"@typescript-eslint/typescript-estree@4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.2.tgz#abfd50594d8056b37e7428df3b2d185ef2d0060c"
integrity sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA==
"@typescript-eslint/typescript-estree@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.0.0.tgz#bc20f413c6e572c7309dbe5fa3be027984952af3"
integrity sha512-V/6w+PPQMhinWKSn+fCiX5jwvd1vRBm7AX7SJQXEGQtwtBvjMPjaU3YTQ1ik2UF1u96X7tsB96HMnulG3eLi9Q==
dependencies:
"@typescript-eslint/types" "4.31.2"
"@typescript-eslint/visitor-keys" "4.31.2"
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/visitor-keys" "5.0.0"
debug "^4.3.1"
globby "^11.0.3"
is-glob "^4.0.1"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/visitor-keys@4.31.2":
version "4.31.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.2.tgz#7d5b4a4705db7fe59ecffb273c1d082760f635cc"
integrity sha512-PrBId7EQq2Nibns7dd/ch6S6/M4/iwLM9McbgeEbCXfxdwRUNxJ4UNreJ6Gh3fI2GNKNrWnQxKL7oCPmngKBug==
"@typescript-eslint/visitor-keys@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.0.0.tgz#b789f7cd105e59bee5c0983a353942a5a48f56df"
integrity sha512-yRyd2++o/IrJdyHuYMxyFyBhU762MRHQ/bAGQeTnN3pGikfh+nEmM61XTqaDH1XDp53afZ+waXrk0ZvenoZ6xw==
dependencies:
"@typescript-eslint/types" "4.31.2"
eslint-visitor-keys "^2.0.0"
"@typescript-eslint/types" "5.0.0"
eslint-visitor-keys "^3.0.0"
"@ungap/promise-all-settled@1.1.2":
version "1.1.2"
@ -2231,6 +2253,11 @@ acorn@^7.0.0, acorn@^7.4.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.5.0:
version "8.5.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2"
integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
add-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
@ -2277,16 +2304,6 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@^8.0.1:
version "8.6.3"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764"
integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
require-from-string "^2.0.2"
uri-js "^4.2.2"
algoliasearch@^4.0.0:
version "4.10.5"
resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.10.5.tgz#1faf34a3ae5ac3bef27282eb141251c70c7f5db2"
@ -2504,11 +2521,6 @@ ast-types@^0.13.2:
dependencies:
tslib "^2.0.1"
astral-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
astring@^1.7.5:
version "1.7.5"
resolved "https://registry.yarnpkg.com/astring/-/astring-1.7.5.tgz#a7d47fceaf32b052d33a3d07c511efeec67447ca"
@ -3615,7 +3627,7 @@ debug@2.6.9, debug@^2.1.1, debug@^2.6.9:
dependencies:
ms "2.0.0"
debug@4, debug@4.3.2, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
debug@4, debug@4.3.2, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
@ -4080,6 +4092,11 @@ esbuild-android-arm64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.6.tgz#a109b4e5203e9ec144cadccdf18a5daf021423e5"
integrity sha512-uEwrMRzqNzXxzIi0K/CtHn3/SPoRso4Dd/aJCpf9KuX+kCs9Tlhz29cKbZieznYAekdo36fDUrZyuugAwSdI+A==
esbuild-android-arm64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.7.tgz#528886c36968aa6ab6496392d419654dda88f092"
integrity sha512-yqCTKzmm3jiUXgi0yeKhvwZCZTqClUXwwMRAntcM9u/xvXhmpw0V0Z4qDEpnkmF2NCMzmJRH+DAAQ5whuf3CYA==
esbuild-darwin-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.4.tgz#7a3e66c8e1271b650541b25eed65c84f3564a69d"
@ -4090,6 +4107,11 @@ esbuild-darwin-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.6.tgz#1a00ef4d2b3b1fe9de28a5cf195df113d6461155"
integrity sha512-oJdWZn2QV5LTM24/vVWaUFlMVlRhpG9zZIA6Xd+xbCULOURwYnYRQWIzRpXNtTfuAr3+em9PqKUaGtYqvO/DYg==
esbuild-darwin-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.7.tgz#32cf420d43ca448e7741a90d0d4c6dc5385969da"
integrity sha512-MvsgMUWzq5FxoeJLSavw3rgQbaC55A8QTI1U2/8MWamtAeDKyzWQnglcsF0/TkjGLaKEqS0ZLo8akJ8q34BCtw==
esbuild-darwin-arm64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.4.tgz#793feca6032b2a57ef291eb9b2d33768d60a49d6"
@ -4100,6 +4122,11 @@ esbuild-darwin-arm64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.6.tgz#f48954d441059e2d06c1675ddcc25af00b164935"
integrity sha512-+f8Yn5doTEpCWtBaGxciDTikxESdGCNZpLYtXzMJLTWFHr8zqfAf4TAYGvg6T5T6N7OMC8HHy3GM+BijFXDXMg==
esbuild-darwin-arm64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.7.tgz#c80f0b62c8ae4710b17090f507037aeae73e9016"
integrity sha512-tuP+dpIzXj17UC17VkHFDAH5nB7MajJK7sF8Fz4iVo8cml8YXj3MeNtjjLmx9YFvPs4XW3hFw1eqZJ06h2ssIA==
esbuild-freebsd-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.4.tgz#294aec3c2cf4b41fb6900212fc9c33dd8fbbb4a2"
@ -4110,6 +4137,11 @@ esbuild-freebsd-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.6.tgz#b3bfea7e21f0d80796220927118fc76170cac06f"
integrity sha512-Yb/DgZUX0C6i4vnOymthLzoWAJBYWbn3Y2F4wKEufsx2veGN/wlwO/yz7IWGVVzb2zMUqbt30hCLF61sUFe7gA==
esbuild-freebsd-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.7.tgz#0b826a9655446c0d0a01a4a996d450e5cb0e033a"
integrity sha512-p07TrpkCJJyAXXCXFm2IpAvyASUTcuT0OF43riEsgjuRJmtaNBOUENecr2B2k/zd9wkGz6UyxxtnFntaBttkDg==
esbuild-freebsd-arm64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.4.tgz#09fe66c751c12f9b976976b1d83f3de594cb2787"
@ -4120,6 +4152,11 @@ esbuild-freebsd-arm64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.6.tgz#e6f5777a85012457ada049fc6b1e3e2c36161514"
integrity sha512-UKYlEb7mwprSJ9VW9+q3/Mgxest45I6rGMB/hrKY1T6lqoBVhWS4BTbL4EGetWdk05Tw4njFAO9+nmxgl7jMlA==
esbuild-freebsd-arm64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.7.tgz#f9c980ce7e71e6702f82706a6244959eba2b80dc"
integrity sha512-MCtfBRkE1GwAnjVoWPYoZ+S/+zanzWxAJVER1/8jmWobCXJG0w+YM2IXQ2fN4T9U96RusFWQDMJVoACnqhIAzg==
esbuild-linux-32@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.4.tgz#a9f0793d7bcc9cef4f4ffa4398c525877fba5839"
@ -4130,6 +4167,11 @@ esbuild-linux-32@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.6.tgz#8b04058312a76faec6964b954f1f02ab32ce43fe"
integrity sha512-hQCZfSLBYtn8f1afFT6Dh9KeLsW12xLqrqssbhpi/xfN9c/bbCh/QQZaR9ZOEnmBHHRPb7rbSo3jQqlCWYb7LQ==
esbuild-linux-32@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.7.tgz#3d9d704452ed13da20771537bf30f695b9f80327"
integrity sha512-HM4d16XbqToo93LPrgzkiLgX3Xgr9Mw67tEM8vjhHDx18JnaZqPdIsl5ZfCqRGHlLUq+GdFKl6+dH7WlsiWMCA==
esbuild-linux-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.4.tgz#c0d0b4c9d62e3bbf8bdf2cece37403aa6d60fc2e"
@ -4140,6 +4182,11 @@ esbuild-linux-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.6.tgz#554d8edfe3f791f8b26978eb173b2e13643442c0"
integrity sha512-bRQwsD+xJoajonfyeq5JpiNRogH4mYFYbYsGhwrtQ4pMGk93V/4KuKQiKEisRZO0hYhZL4MtxufwF195zKlCAw==
esbuild-linux-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.7.tgz#ce5c7b964990fdb2713ce816f0a24ffffd96942c"
integrity sha512-krgiIEyqcS0kfTjptGEQzdYwiEmmqpmiZHlKqZILVuU5BaIVWCBMmVx20HH9waJw1yT0Ao4fZTZ9kg8s/pKAYA==
esbuild-linux-arm64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.4.tgz#1292d97bfa64a08d12728f8a7837bf92776c779b"
@ -4150,6 +4197,11 @@ esbuild-linux-arm64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.6.tgz#2142fadbdbc0ebd52a166f956f0ecb1f6602112a"
integrity sha512-sRc1lt9ma1xBvInCwpS77ywR6KVdcJNsErsrDkDXx3mVe8DLLEn05TG0nIX9I+s8ouHEepikdKCfe1DZdILRjQ==
esbuild-linux-arm64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.7.tgz#53a53f43669ef705c925bf275491d507cb77b06b"
integrity sha512-aM2BUTdbtzEUOuLqDusGCuWQRqc0JazgbA/6+Q9xhUgNLHGUMAsu4C5G0qPnJCTlWGZX+bcQYma6wFVEp9ibBg==
esbuild-linux-arm@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.4.tgz#186cd9b8885ac132b9953a4a0afe668168debd10"
@ -4160,6 +4212,11 @@ esbuild-linux-arm@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.6.tgz#ced8e35a94e0adbf134e5fa4e2b661f897e14b27"
integrity sha512-qQUrpL7QoPqujXEFSpeu6QZ43z0+OdDPHDkLO0GPbpV/jebP7J+0FreMqoq7ZxWG4rPigwcRdEyqzHh8Bh4Faw==
esbuild-linux-arm@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.7.tgz#3372ea117517aa3194ed1622305ab76bf2550b1d"
integrity sha512-GOAt1brGG14mmQx2sRD3wHi3rih94OzhmDRVyo7JvlSmWOfEczPf7zL7YfmgjuktvvuLTERtTJzaih7nyCwPOg==
esbuild-linux-mips64le@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.4.tgz#42049bf72bc586817b4a51cc9e32148d13e5e807"
@ -4170,6 +4227,11 @@ esbuild-linux-mips64le@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.6.tgz#e5cbc050f5d44f8ecc0f79b1641bbad3919a2b3a"
integrity sha512-1lsHZaIsHlFkHn1QRa/EONPGVHwzdIrkKn6r2m9cYUIn2J+rKtJg0e+WkNG3MaIrxozaGKaiSPGvaG1toCbZjw==
esbuild-linux-mips64le@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.7.tgz#c431291deecb949a4cdbbab0bc01b6b4a962104a"
integrity sha512-+UJq6cxpc2ldaQFdpEDrBhqhluXsqCNlWiHccIjq25r+3YbFg0c/RJEypoVU7tjhGXUGWyWWQ7SLkzHYpf+Nsg==
esbuild-linux-ppc64le@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.4.tgz#adf1ce2ef2302757c4383887da6ac4dd25be9d4f"
@ -4180,11 +4242,21 @@ esbuild-linux-ppc64le@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.6.tgz#57868a7eb762c1d19fa6d367b09a4610f0cbf7ca"
integrity sha512-x223JNC8XeLDf05zLaKfxqCEWVct4frp8ft8Qc13cha33TMrqMFaSPq6cgpgT2VYuUsXtwoocoWChKfvy+AUQg==
esbuild-linux-ppc64le@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.7.tgz#d47b2322ac1ad61669045d5f95181d4f0d9744d2"
integrity sha512-6zwpliO4ZZtodDYM1JJEmSMpkd07I8bnNOKoHe7TOs9VhylXJooHh5ObSbSvk3FxCBs+jL5bxb24p10/Cg4RGw==
esbuild-netbsd-64@0.13.6:
version "0.13.6"
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.6.tgz#1c5daa62571f1065e4a1100a1db5e488ef259024"
integrity sha512-TonKf530kT25+zi1Da6esITmuBJe13QiN+QGVch6YE8t720IvIelDGwkOQN3Td7A0JjbSbK3u+Fo6YaL151VxQ==
esbuild-netbsd-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.7.tgz#9c9fed5dfc2f3656de024496f10928368a29ea10"
integrity sha512-CfTHeTfJWlwjgfpApXYvECytLD6BzTWovLE0+28KT7bjU5fM4ieDYzRvjWjFAOB2X6DWpaoQnJAlhJirQBW0EQ==
esbuild-openbsd-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.4.tgz#1c8122101898c52a20c8786935cf3eb7a19b83b4"
@ -4195,6 +4267,11 @@ esbuild-openbsd-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.6.tgz#315fd85970365835f6a1eb7b6e9335d59f772564"
integrity sha512-WFa5J0IuyER0UJbCGw87gvGWXGfhxeNppYcvQjp0pWYuH4FS+YqphyjV0RJlybzzDpAXkyZ9RzkMFtSAp+6AUA==
esbuild-openbsd-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.7.tgz#fc039ce363b0ad5617a82dc9d312fccebd950070"
integrity sha512-qfW+f0MQfl72zVwgbV00I1kAP2zty+N031cNnQINcBmzHOSbEbaBQbUM0kawq+wdfgS/Xmppgf7nD1H8GWAvow==
esbuild-sunos-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.4.tgz#4ec95faa14a60f295fe485bebffefff408739337"
@ -4205,6 +4282,11 @@ esbuild-sunos-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.6.tgz#8422eeb9f3712daa4befd19e5da6d7c9af9fc744"
integrity sha512-duCL8Ewri+zjKxuN/61maniDxcd8fHwSuubdAPofll0y0E6WcL/R/e/mQzhHIuoguFm5RJkKun1qua54javh7g==
esbuild-sunos-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.7.tgz#ad85a2f2cd38b6e920f2ad07ebc134cdba92e26d"
integrity sha512-fVRM9mV0wAYLt92IqzudxACMLJZRQFx1oJsNeU4fPFmUxIkYE4C7G7z9vqI2eu9bpDo1fA+3+5djo/T/28Mckg==
esbuild-windows-32@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.4.tgz#3182c380487b797b04d0ec2c80c2945666869080"
@ -4215,6 +4297,11 @@ esbuild-windows-32@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.6.tgz#694eb4768ee72219d3bc6415b1d3a0f843aea9ec"
integrity sha512-U8RkpT4f0/dygA5ytFyHNZ/fRECU9LWBMrqWflNhM31iTi6RhU0QTuOzFYkmpYnwl358ZZhVoBeEOm313d4u4A==
esbuild-windows-32@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.7.tgz#146b416c5172a2c252ce29f899c0c8f1a20eac50"
integrity sha512-v3csjeQtlHHWS1q/tE9rTRCSSU/fGvJVh1l7gkS93ysAaIMeC0j9Q0h2PxFpQ6yxuwftuDYfQdnkVGcqjkKM8A==
esbuild-windows-64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.4.tgz#b9e995f92d81f433a04f33611e603e82f9232e69"
@ -4225,6 +4312,11 @@ esbuild-windows-64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.6.tgz#1adbf5367b08e735262f57098d19c07d0a2fec1c"
integrity sha512-A23VyUeyBfSWUYNL0jtrJi5M/2yR/RR8zfpGQ0wU0fldqV2vxnvmBYOBwRxexFYCDRpRWh4cPFsoYoXRCFa8Dg==
esbuild-windows-64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.7.tgz#9eaffae2204263a7b35313ea51a6a6e5a5e0bb48"
integrity sha512-vk+yv/vYpHZP0vxSaxaA4EMaicuxy4E435EXkbsgk5UgpcQgSP0CVlIeaqtgfSM3IwGnpbagOirRVqqZqxyMDQ==
esbuild-windows-arm64@0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.4.tgz#fb239532f07b764d158f4cc787178ef4c6fadb5c"
@ -4235,16 +4327,16 @@ esbuild-windows-arm64@0.13.6:
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.6.tgz#9279083740ec90a2d638485c97b1d003771d685a"
integrity sha512-K/pFqK/s5C6wXYcFKO9iPY4yU3DI0/Gbl1W2+OhaPHoXu13VGBmqbCiQ5lohHGE72FFQl76naOjEayEiI+gDMQ==
esbuild-windows-arm64@0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.7.tgz#6937647f05528248b1634027d839ae81ffdde8c2"
integrity sha512-0Fp+IeG5qWLCK+U6d8L9/SnXkI6f3JMtauSQ8HHzw3Fl0pZ+VImUAUWZ3g2fhthNqp+t8dB3n238CJD6XBn15w==
esbuild@^0.11.16:
version "0.11.23"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.23.tgz#c42534f632e165120671d64db67883634333b4b8"
integrity sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==
esbuild@^0.12.28:
version "0.12.28"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.28.tgz#84da0d2a0d0dee181281545271e0d65cf6fab1ef"
integrity sha512-pZ0FrWZXlvQOATlp14lRSk1N9GkeJ3vLIwOcUoo3ICQn9WNR4rWoNi81pbn6sC1iYUy7QPqNzI3+AEzokwyVcA==
esbuild@^0.13.2:
version "0.13.4"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.4.tgz#ce2deb56c4fb360938311cbfc67f8e467bb6841b"
@ -4290,6 +4382,29 @@ esbuild@^0.13.6:
esbuild-windows-64 "0.13.6"
esbuild-windows-arm64 "0.13.6"
esbuild@^0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.7.tgz#ee6e04da3c0ca34f35a05dea649caa48686c92fb"
integrity sha512-Ok3w+Pc9SNdNVEEJUUx9OvNZHwFyoKS0N+ceytfUB3wh/HxhRkOEc9dO8KR9AjfpFI82/Wg258GRDs1/8SFgKQ==
optionalDependencies:
esbuild-android-arm64 "0.13.7"
esbuild-darwin-64 "0.13.7"
esbuild-darwin-arm64 "0.13.7"
esbuild-freebsd-64 "0.13.7"
esbuild-freebsd-arm64 "0.13.7"
esbuild-linux-32 "0.13.7"
esbuild-linux-64 "0.13.7"
esbuild-linux-arm "0.13.7"
esbuild-linux-arm64 "0.13.7"
esbuild-linux-mips64le "0.13.7"
esbuild-linux-ppc64le "0.13.7"
esbuild-netbsd-64 "0.13.7"
esbuild-openbsd-64 "0.13.7"
esbuild-sunos-64 "0.13.7"
esbuild-windows-32 "0.13.7"
esbuild-windows-64 "0.13.7"
esbuild-windows-arm64 "0.13.7"
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
@ -4347,12 +4462,13 @@ eslint-scope@^5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
eslint-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
eslint-scope@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-6.0.0.tgz#9cf45b13c5ac8f3d4c50f46a5121f61b3e318978"
integrity sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==
dependencies:
eslint-visitor-keys "^1.1.0"
esrecurse "^4.3.0"
estraverse "^5.2.0"
eslint-utils@^3.0.0:
version "3.0.0"
@ -4361,47 +4477,46 @@ eslint-utils@^3.0.0:
dependencies:
eslint-visitor-keys "^2.0.0"
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
eslint-visitor-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
eslint@^7.32.0:
version "7.32.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"
integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==
eslint-visitor-keys@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186"
integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==
eslint@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.1.tgz#3610e7fe4a05c2154669515ca60835a76a19f700"
integrity sha512-LsgcwZgQ72vZ+SMp4K6pAnk2yFDWL7Ti4pJaRvsZ0Hsw2h8ZjUIW38a9AFn2cZXdBMlScMFYYgsSp4ttFI/0bA==
dependencies:
"@babel/code-frame" "7.12.11"
"@eslint/eslintrc" "^0.4.3"
"@humanwhocodes/config-array" "^0.5.0"
"@eslint/eslintrc" "^1.0.3"
"@humanwhocodes/config-array" "^0.6.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.0.1"
debug "^4.3.2"
doctrine "^3.0.0"
enquirer "^2.3.5"
escape-string-regexp "^4.0.0"
eslint-scope "^5.1.1"
eslint-utils "^2.1.0"
eslint-visitor-keys "^2.0.0"
espree "^7.3.1"
eslint-scope "^6.0.0"
eslint-utils "^3.0.0"
eslint-visitor-keys "^3.0.0"
espree "^9.0.0"
esquery "^1.4.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
file-entry-cache "^6.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.1.2"
glob-parent "^6.0.1"
globals "^13.6.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
js-yaml "^3.13.1"
js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash.merge "^4.6.2"
@ -4409,22 +4524,21 @@ eslint@^7.32.0:
natural-compare "^1.4.0"
optionator "^0.9.1"
progress "^2.0.0"
regexpp "^3.1.0"
regexpp "^3.2.0"
semver "^7.2.1"
strip-ansi "^6.0.0"
strip-json-comments "^3.1.0"
table "^6.0.9"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
espree@^7.3.0, espree@^7.3.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6"
integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==
espree@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090"
integrity sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==
dependencies:
acorn "^7.4.0"
acorn "^8.5.0"
acorn-jsx "^5.3.1"
eslint-visitor-keys "^1.3.0"
eslint-visitor-keys "^3.0.0"
esprima@^4.0.0, esprima@^4.0.1:
version "4.0.1"
@ -5608,7 +5722,7 @@ ignore@^4.0.6:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
ignore@^5.1.4:
ignore@^5.1.4, ignore@^5.1.8:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
@ -6134,7 +6248,7 @@ joi@^17.4.0:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
js-yaml@4.1.0:
js-yaml@4.1.0, js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
@ -6174,11 +6288,6 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
json-schema-traverse@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
@ -6593,11 +6702,6 @@ lodash.topath@^4.5.2:
resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009"
integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=
lodash.truncate@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0, lodash@~4.17.20:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
@ -8657,7 +8761,7 @@ prettier@^1.19.1:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@^2.3.2, prettier@^2.4.1:
prettier@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
@ -9087,7 +9191,7 @@ regenerator-runtime@^0.13.4:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==
regexpp@^3.1.0:
regexpp@^3.1.0, regexpp@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
@ -9281,11 +9385,6 @@ require-directory@^2.1.1:
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
require-from-string@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
@ -9658,15 +9757,6 @@ slash@^4.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
slice-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
dependencies:
ansi-styles "^4.0.0"
astral-regex "^2.0.0"
is-fullwidth-code-point "^3.0.0"
slide@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
@ -9846,11 +9936,6 @@ sprintf-js@~1.0.2:
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
srcset-parse@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/srcset-parse/-/srcset-parse-1.1.0.tgz#73f787f38b73ede2c5af775e0a3465579488122b"
integrity sha512-JWp4cG2eybkvKA1QUHGoNK6JDEYcOnSuhzNGjZuYUPqXreDl/VkkvP2sZW7Rmh+icuCttrR9ccb2WPIazyM/Cw==
sshpk@^1.7.0:
version "1.16.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
@ -10170,18 +10255,6 @@ svelte@^3.42.3:
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.42.6.tgz#45a534d76fcdb551a2f23abf2cfee648fa248d03"
integrity sha512-lAcryr9Do2PeGtbodspX5I4kWj4yWYAa2WGpDCwzNkP3y8WZTxigMd4/TMO1rBZEOkMYGn4ZXrbAlSEGhK6q3w==
table@^6.0.9:
version "6.7.1"
resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2"
integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==
dependencies:
ajv "^8.0.1"
lodash.clonedeep "^4.5.0"
lodash.truncate "^4.4.2"
slice-ansi "^4.0.0"
string-width "^4.2.0"
strip-ansi "^6.0.0"
tailwindcss@^2.1.2:
version "2.2.15"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.15.tgz#8bee3ebe68b988c050508ce20633f35b040dd9fe"