From b31b0122882eec06ce1f59bdd50f13b13cdd5ed9 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Tue, 23 Nov 2021 16:18:34 -0500 Subject: [PATCH] Support for unocss (and similar CSS plugins) --- packages/astro/package.json | 1 + packages/astro/src/core/build/index.ts | 13 +- packages/astro/src/core/build/util.ts | 13 + .../astro/src/vite-plugin-build-html/index.ts | 37 ++- .../fixtures/with-unocss/astro.config.mjs | 11 + .../with-unocss/src/pages/index.astro | 9 + packages/astro/test/unocss.test.js | 27 ++ yarn.lock | 267 +++++++++++++++++- 8 files changed, 363 insertions(+), 15 deletions(-) create mode 100644 packages/astro/src/core/build/util.ts create mode 100644 packages/astro/test/fixtures/with-unocss/astro.config.mjs create mode 100644 packages/astro/test/fixtures/with-unocss/src/pages/index.astro create mode 100644 packages/astro/test/unocss.test.js diff --git a/packages/astro/package.json b/packages/astro/package.json index cf97b1696..ae3929b56 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -121,6 +121,7 @@ "chai": "^4.3.4", "cheerio": "^1.0.0-rc.10", "mocha": "^9.1.3", + "unocss": "^0.12.4", "vite": "^2.6.10" }, "engines": { diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index 8ae8312f7..da7d9471e 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -17,6 +17,7 @@ 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 { createFetch } from './util.js'; export interface BuildOptions { mode?: string; @@ -34,6 +35,7 @@ class AstroBuilder { private logging: LogOptions; private mode = 'production'; private origin: string; + private port: number; private routeCache: RouteCache = {}; private manifest: ManifestData; private viteServer?: ViteDevServer; @@ -46,9 +48,9 @@ class AstroBuilder { if (options.mode) this.mode = options.mode; this.config = config; - const port = config.devOptions.port; // no need to save this (don’t rely on port in builder) + this.port = config.devOptions.port; this.logging = options.logging; - this.origin = config.buildOptions.site ? new URL(config.buildOptions.site).origin : `http://localhost:${port}`; + this.origin = config.buildOptions.site ? new URL(config.buildOptions.site).origin : `http://localhost:${this.port}`; this.manifest = createRouteManifest({ config }, this.logging); } @@ -62,8 +64,7 @@ class AstroBuilder { { mode: this.mode, server: { - hmr: { overlay: false }, - middlewareMode: 'ssr', + hmr: { overlay: false } }, }, this.config.vite || {} @@ -72,10 +73,13 @@ class AstroBuilder { ); this.viteConfig = viteConfig; const viteServer = await vite.createServer(viteConfig); + // Listen to the server so that we can make fetch requests if needed. + await viteServer.listen(this.port); this.viteServer = viteServer; debug(logging, 'build', timerMessage('Vite started', timer.viteStart)); timer.loadStart = performance.now(); + const fetch = createFetch(this.origin); const assets: Record = {}; const allPages: AllPagesData = {}; // Collect all routes ahead-of-time, before we start the build. @@ -185,6 +189,7 @@ class AstroBuilder { astroPageStyleMap, astroStyleMap, chunkToReferenceIdMap, + fetch, pureCSSChunks, logging, origin, diff --git a/packages/astro/src/core/build/util.ts b/packages/astro/src/core/build/util.ts new file mode 100644 index 000000000..01413f18a --- /dev/null +++ b/packages/astro/src/core/build/util.ts @@ -0,0 +1,13 @@ +import type { Response, RequestInit } from 'node-fetch'; +import fetch from 'node-fetch'; + +export type ViteFetch = (pathname: string, init?: RequestInit) => Promise; + +function localizedFetch(origin: string, pathname: string, init?: RequestInit) { + const url = origin + pathname; + return fetch(url, init); +} + +export function createFetch(origin: string): ViteFetch { + return localizedFetch.bind(null, origin); +} \ No newline at end of file diff --git a/packages/astro/src/vite-plugin-build-html/index.ts b/packages/astro/src/vite-plugin-build-html/index.ts index 139cc4051..4963954e7 100644 --- a/packages/astro/src/vite-plugin-build-html/index.ts +++ b/packages/astro/src/vite-plugin-build-html/index.ts @@ -3,9 +3,12 @@ import type { LogOptions } from '../core/logger'; import type { ViteDevServer, Plugin as VitePlugin } from '../core/vite'; import type { OutputChunk, PreRenderedChunk, RenderedChunk } from 'rollup'; import type { AllPagesData } from '../core/build/types'; +import type { ViteFetch } from '../core/build/util'; +import type { RequestInit } from 'fetch'; import parse5 from 'parse5'; import srcsetParse from 'srcset-parse'; import * as npath from 'path'; +import mime from 'mime'; import { promises as fs } from 'fs'; import { getAttribute, hasAttribute, insertBefore, remove, createScript, createElement, setAttribute } from '@web/parse5-utils'; import { addRollupInput } from './add-rollup-input.js'; @@ -36,10 +39,11 @@ interface PluginOptions { origin: string; routeCache: RouteCache; viteServer: ViteDevServer; + fetch: ViteFetch; } -export function rollupPluginAstroBuildHTML(options: PluginOptions): VitePlugin { - const { astroConfig, astroStyleMap, astroPageStyleMap, chunkToReferenceIdMap, pureCSSChunks, logging, origin, allPages, routeCache, viteServer, pageNames } = options; +export function rollupPluginAstroBuildHTML(options: PluginOptions): VitePlugin[] { + const { astroConfig, astroStyleMap, astroPageStyleMap, chunkToReferenceIdMap, fetch, pureCSSChunks, logging, origin, allPages, routeCache, viteServer, pageNames } = options; // The filepath root of the src folder const srcRoot = astroConfig.src.pathname; @@ -56,7 +60,7 @@ export function rollupPluginAstroBuildHTML(options: PluginOptions): VitePlugin { const cssChunkMap = new Map(); - return { + return [{ name: PLUGIN_NAME, enforce: 'pre', @@ -452,5 +456,30 @@ export function rollupPluginAstroBuildHTML(options: PluginOptions): VitePlugin { }); } }, - }; + }, { + name: '@astro/rollup-plugin-build-load-fallback', + enforce: 'post', + resolveId(id) { + // If we got here, nothing picked up this module, so let's try + // and grab it from the viteServer used for SSR loading. + if(id[0] === '/') { + return id; + } + return null; + }, + async load(id) { + const init: RequestInit = { + headers: { + accept: mime.getType(id) + } + }; + + const res = await fetch(id, init); + if(res.ok) { + return await res.text(); + } + + return null; + } + }]; } diff --git a/packages/astro/test/fixtures/with-unocss/astro.config.mjs b/packages/astro/test/fixtures/with-unocss/astro.config.mjs new file mode 100644 index 000000000..c4281706e --- /dev/null +++ b/packages/astro/test/fixtures/with-unocss/astro.config.mjs @@ -0,0 +1,11 @@ +// Full Astro Configuration API Documentation: +// https://docs.astro.build/reference/configuration-reference + +import Unocss from 'unocss/vite'; + +// @ts-check +export default /** @type {import('astro').AstroUserConfig} */ ({ + vite: { + plugins: [Unocss()], + }, +}); diff --git a/packages/astro/test/fixtures/with-unocss/src/pages/index.astro b/packages/astro/test/fixtures/with-unocss/src/pages/index.astro new file mode 100644 index 000000000..294e28f40 --- /dev/null +++ b/packages/astro/test/fixtures/with-unocss/src/pages/index.astro @@ -0,0 +1,9 @@ +--- +import 'uno.css' +--- + +My Uno App + + Text + + \ No newline at end of file diff --git a/packages/astro/test/unocss.test.js b/packages/astro/test/unocss.test.js new file mode 100644 index 000000000..3d79a8f77 --- /dev/null +++ b/packages/astro/test/unocss.test.js @@ -0,0 +1,27 @@ +import { expect } from 'chai'; +import cheerio from 'cheerio'; +import { loadFixture } from './test-utils.js'; + +describe('unocss', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + projectRoot: './fixtures/with-unocss/', + }); + try { + await fixture.build(); + } catch(err) { + console.log('wha...', err); + } + + }); + + it('Build when they create their own URLs', async () => { + const html = await fixture.readFile('/index.html'); + const $ = cheerio.load(html); + + // test 1: Link added + expect($('link').attr('href').includes('assets/')); + }); +}); diff --git a/yarn.lock b/yarn.lock index 36138a406..9996d1693 100644 --- a/yarn.lock +++ b/yarn.lock @@ -271,7 +271,7 @@ "@babel/template" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-get-function-arity@^7.16.0": +"@babel/helper-get-function-arity@^7.15.4", "@babel/helper-get-function-arity@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa" integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ== @@ -386,7 +386,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-validator-identifier@^7.15.7": +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== @@ -1056,7 +1056,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.16.0": +"@babel/template@^7.15.4", "@babel/template@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6" integrity sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A== @@ -1390,6 +1390,18 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@iconify/types@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@iconify/types/-/types-1.0.12.tgz#839f1f784b7030b94482d51996570f4dbd7d6796" + integrity sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg== + +"@iconify/utils@^1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-1.0.19.tgz#a66585e06920619e08e89c9194a72c1a8d5aba79" + integrity sha512-HEIo2FLLkzFcUcdTvNpJZugzbPIpmnhRLQk8PUYcJbjpzb8vsQHniDmTmEMAV8uN+dauMQg+Qrb8Bx054uG69w== + dependencies: + "@iconify/types" "^1.0.12" + "@jsdevtools/rehype-toc@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@jsdevtools/rehype-toc/-/rehype-toc-3.0.2.tgz#29c32e6b40cd4b5dafd96cb90d5057ac5dab4a51" @@ -2352,6 +2364,11 @@ dependencies: "@octokit/openapi-types" "^11.2.0" +"@polka/url@^1.0.0-next.20": + version "1.0.0-next.21" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" + integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== + "@proload/core@^0.2.1": version "0.2.2" resolved "https://registry.yarnpkg.com/@proload/core/-/core-0.2.2.tgz#d6de30e06a8864bdd0fbe568f87d0582cf988c1d" @@ -2806,6 +2823,86 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +"@unocss/cli@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/cli/-/cli-0.12.4.tgz#137ecaedc78e54fce05fb3ea99dd8f84699527f2" + integrity sha512-+veXpwfIbMmf6ggK9REggypUgPw+iKNi9+WPQ2CaDH64+XCAlo/+LIio0WGGajp6wV6ZEL8tqu1dYOWyGRu8zg== + dependencies: + "@unocss/config" "0.12.4" + "@unocss/core" "0.12.4" + "@unocss/preset-uno" "0.12.4" + cac "^6.7.12" + chokidar "^3.5.2" + colorette "^2.0.16" + consola "^2.15.3" + fast-glob "^3.2.7" + pathe "^0.2.0" + +"@unocss/config@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/config/-/config-0.12.4.tgz#734419a890e3b042ef6048a1c63812d66cd5adc0" + integrity sha512-z1a63Z6u/tJAf76nNOwi4Er21GQANFjekDavJ5/i2YFocWeTFuYlgxkzPC9OwgKSoO6GjfG7vSzRKeVGTDUR6A== + dependencies: + "@unocss/core" "0.12.4" + sucrase "^3.20.3" + +"@unocss/core@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.12.4.tgz#777afb6a7162e99b3b4cf17e3c477e0e494cdb5e" + integrity sha512-yqHrqY89k1eIrP8PjgPfSUwLJn4cBNyhNK3U5sZipeUT7tHcvIiQEamKlIhE5FNxJrhOFNhVIJX6m7W6zpyeDw== + +"@unocss/inspector@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/inspector/-/inspector-0.12.4.tgz#bb4c115545a6ceb50cd4641055907bbb21e0c628" + integrity sha512-uPuXH1oC/PM36qkT3BS9cIejoCvdJKIvqrEMUvWIyViiqRmjYBMkVx7IwxeTPziAX5l1tSO81WZpRkcX53+mHw== + dependencies: + gzip-size "^6.0.0" + sirv "^1.0.18" + +"@unocss/preset-attributify@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-attributify/-/preset-attributify-0.12.4.tgz#774ac47354ef0ab43c16056ae3307b1048a851e0" + integrity sha512-lJ3692PNP2p+57veZlrtUU7a6Kv7mKg82h1U7SCbmuxNLrWrTmbBlbr479gaEtFfMVAPikOtTy+o02f7ihVRBQ== + dependencies: + "@unocss/core" "0.12.4" + +"@unocss/preset-icons@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-icons/-/preset-icons-0.12.4.tgz#5e5830f56d0cc2ba9d285312d9dc499f2400fe4e" + integrity sha512-VdpaUSg6x3NLH2xZ0Xtr+oq7Y8Yiiqzod5uMgTqbImh+HVGN/uRInuziCZ59kbAkbpuEctQxcSfKNLUleM/mvA== + dependencies: + "@iconify/utils" "^1.0.19" + "@unocss/core" "0.12.4" + local-pkg "^0.4.0" + +"@unocss/preset-uno@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-0.12.4.tgz#a18d78158e5bde5e16d55aa7d6cf0f690ea5d895" + integrity sha512-BIrI863eOVvaV9wSe5AQM7Fv0nnnj1V/gQxhVYzkxrJC5Jj1dtHSUxNzo46FKY4XKVKwRRhgqGfAZM5af+zrVg== + dependencies: + "@unocss/core" "0.12.4" + +"@unocss/reset@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/reset/-/reset-0.12.4.tgz#849e359960a2f2e5f2ceadf8669bdb6c5e597092" + integrity sha512-m0PWFV7jI9LPG7RRHN2WuXEcsILTAL47ZkJIwV8wQXXFEhTaBtn4jzxKQueJhoaf9YscsTKXnKmbpNTw7pK24g== + +"@unocss/scope@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/scope/-/scope-0.12.4.tgz#dffc7ef5fb04030475c21cce88fd17305c77d1bc" + integrity sha512-M6YqhBFcuj3M7u88YYJRias/Q3KSfJNoa12h3YfcANLbkksM5cEt21aGZNthweQEiXfuChw4WWslg/sD9pJW1Q== + +"@unocss/vite@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@unocss/vite/-/vite-0.12.4.tgz#0d6604d52dff24be9297a06bc885ab701a478987" + integrity sha512-pCY4byeXTLQZcw6CYW6+uuxH7DLt4XNYOu0+I37eadRFwngNAfi6h6xbbwD6rn3t46arQt470ackIghpV3Bfkg== + dependencies: + "@rollup/pluginutils" "^4.1.1" + "@unocss/config" "0.12.4" + "@unocss/core" "0.12.4" + "@unocss/inspector" "0.12.4" + "@unocss/scope" "0.12.4" + "@vitejs/plugin-vue@^1.9.4": version "1.9.4" resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.9.4.tgz#4f48485432cbb986a9fb9d254dc33ce30ddccbfa" @@ -3101,6 +3198,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -3500,6 +3602,13 @@ builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= +builtins@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-4.0.0.tgz#a8345420de82068fdc4d6559d0456403a8fb1905" + integrity sha512-qC0E2Dxgou1IHhvJSLwGDSTvokbRovU5zZFuDY6oY8Y2lF3nGt5Ad8YZK7GMtqzY84Wu7pXTPeHQeHcXSXsRhw== + dependencies: + semver "^7.0.0" + byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" @@ -3515,6 +3624,11 @@ bytes@3.1.1, bytes@^3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== +cac@^6.7.12: + version "6.7.12" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193" + integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA== + cacache@^15.0.5, cacache@^15.2.0: version "15.3.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" @@ -3918,6 +4032,11 @@ color@^4.0.1: color-convert "^2.0.1" color-string "^1.6.0" +colorette@^2.0.16: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -3962,6 +4081,11 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@^6.0.0: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" @@ -4028,6 +4152,11 @@ connect@^3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" +consola@^2.15.3: + version "2.15.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" + integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -4579,7 +4708,7 @@ dotenv@^8.2.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== -duplexer@^0.1.1, duplexer@~0.1.1: +duplexer@^0.1.1, duplexer@^0.1.2, duplexer@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== @@ -5737,6 +5866,18 @@ glob-parent@^6.0.1: dependencies: is-glob "^4.0.3" +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -5820,6 +5961,13 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== +gzip-size@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" + integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== + dependencies: + duplexer "^0.1.2" + handlebars@^4.7.6: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -6295,6 +6443,13 @@ import-local@^3.0.2: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" +import-meta-resolve@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/import-meta-resolve/-/import-meta-resolve-1.1.1.tgz#244fd542fd1fae73550d4f8b3cde3bba1d7b2b18" + integrity sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A== + dependencies: + builtins "^4.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -7165,6 +7320,13 @@ load-yaml-file@^0.2.0: pify "^4.0.1" strip-bom "^3.0.0" +local-pkg@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.0.tgz#e6221171813d5a0812dd84fa80ffb1c8fcc00531" + integrity sha512-2XBWjO/v63JeR1HPzLJxdTVRQDB84Av2p2KtBA5ahvpyLUPubcAU6iXlAJrONcY7aSqgJhXxElAnKtnYsRolPQ== + dependencies: + mlly "^0.2.2" + locate-character@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-2.0.5.tgz#f2d2614d49820ecb3c92d80d193b8db755f74c0f" @@ -7950,7 +8112,7 @@ mime@1.6.0, mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.5.2: +mime@^2.3.1, mime@^2.5.2: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== @@ -8089,6 +8251,13 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mlly@^0.2.2: + version "0.2.10" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.2.10.tgz#645902c9761dc6b5ded174b8e717147fe52e4893" + integrity sha512-xfyW6c2QBGArtctzNnTV5leOKX8nOMz2simeubtXofdsdSJFSNw+Ncvrs8kxcN3pBrQLXuYBHNFV6NgZ5Ryf4A== + dependencies: + import-meta-resolve "^1.1.1" + mocha@^9.1.3: version "9.1.3" resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.3.tgz#8a623be6b323810493d8c8f6f7667440fa469fdb" @@ -8175,6 +8344,15 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nanoid@3.1.25: version "3.1.25" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" @@ -8283,6 +8461,11 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + node-releases@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" @@ -8520,7 +8703,7 @@ object-assign@^2.0.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" integrity sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo= -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -8984,6 +9167,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathe@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.2.0.tgz#30fd7bbe0a0d91f0e60bae621f5d19e9e225c339" + integrity sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -9036,6 +9224,13 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -10008,7 +10203,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -10139,6 +10334,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sirv@^1.0.18: + version "1.0.18" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.18.tgz#105fab52fb656ce8a2bebbf36b11052005952899" + integrity sha512-f2AOPogZmXgJ9Ma2M22ZEhc1dNtRIzcEkiflMFeVTRq+OViOZMvH1IPMVOwrKaxpSaHioBJiDR0SluRqGa7atA== + dependencies: + "@polka/url" "^1.0.0-next.20" + mime "^2.3.1" + totalist "^1.0.0" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -10632,6 +10836,18 @@ style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" +sucrase@^3.20.3: + version "3.20.3" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.20.3.tgz#424f1e75b77f955724b06060f1ae708f5f0935cf" + integrity sha512-azqwq0/Bs6RzLAdb4dXxsCgMtAaD2hzmUr4UhSfsxO46JFPAwMnnb441B/qsudZiS6Ylea3JXZe3Q497lsgXzQ== + dependencies: + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + supports-color@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -10805,6 +11021,20 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + through2-sink@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/through2-sink/-/through2-sink-1.0.0.tgz#5f106bba1d7330dad3cba5c0ab1863923256c399" @@ -10893,6 +11123,11 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +totalist@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" + integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== + totalist@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/totalist/-/totalist-2.0.0.tgz#db6f1e19c0fa63e71339bbb8fba89653c18c7eec" @@ -10935,6 +11170,11 @@ trough@^2.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-2.0.2.tgz#94a3aa9d5ce379fc561f6244905b3f36b7458d96" integrity sha512-FnHq5sTMxC0sk957wHDzRnemFnNBvt/gSY99HzK8F7UP5WAbvP70yX5bd7CjEQkN+TjdxwI7g7lJ6podqrG2/w== +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + ts-morph@^12.0.0: version "12.2.0" resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-12.2.0.tgz#3332319cecd44aff0b7b410f1fe39637499b1a1b" @@ -11320,6 +11560,19 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +unocss@^0.12.4: + version "0.12.4" + resolved "https://registry.yarnpkg.com/unocss/-/unocss-0.12.4.tgz#98d539d8976d6f58335c912da4151daa4e570027" + integrity sha512-3eWbGkcuSLM6dEXxXY0/JbpLKbUw+0XQquk74GXNJZfrAR9dv6jIur4jE7BrIwLP6je3FaXBz8a3gnhlWTMG0w== + dependencies: + "@unocss/cli" "0.12.4" + "@unocss/core" "0.12.4" + "@unocss/preset-attributify" "0.12.4" + "@unocss/preset-icons" "0.12.4" + "@unocss/preset-uno" "0.12.4" + "@unocss/reset" "0.12.4" + "@unocss/vite" "0.12.4" + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"