diff --git a/package.json b/package.json index 741c445..0f27d51 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ ], "scripts": { "prepack": "nuxt-module-build", + "test": "vitest", "dev": "nuxi dev playground", "dev:build": "nuxi build playground", "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground" @@ -38,8 +39,11 @@ }, "devDependencies": { "@nuxt/module-builder": "latest", + "@nuxt/test-utils-edge": "^3.0.0-rc.6-27651720.5dc864d", "@nuxtjs/eslint-config-typescript": "latest", "eslint": "latest", - "nuxt": "^3.0.0-rc.6" + "nuxt": "^3.0.0-rc.6", + "playwright": "^1.24.2", + "vitest": "^0.19.1" } } diff --git a/test/basic-with-enabled-false.test.ts b/test/basic-with-enabled-false.test.ts new file mode 100644 index 0000000..06ae90f --- /dev/null +++ b/test/basic-with-enabled-false.test.ts @@ -0,0 +1,24 @@ +import { fileURLToPath } from 'url' +import { describe, test, expect } from 'vitest' +import { setup, createPage } from '@nuxt/test-utils-edge' +import BasicAuth from '../src/module' + +describe('Basic test: with module options { enabled: false }', async () => { + await setup({ + rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), + browser: true, + nuxtConfig: { + modules: [ + [BasicAuth, { enabled: false }], + ], + }, + }) + + test('allow if enabled option is false', async () => { + const page = await createPage('/') + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).not.toBe(0) + }) +}) diff --git a/test/basic-with-options.test.ts b/test/basic-with-options.test.ts new file mode 100644 index 0000000..ae630c2 --- /dev/null +++ b/test/basic-with-options.test.ts @@ -0,0 +1,36 @@ +import { fileURLToPath } from 'url' +import { describe, test, expect } from 'vitest' +import { setup, createPage } from '@nuxt/test-utils-edge' +import BasicAuth from '../src/module' + +describe('Basic test: with module options', async () => { + await setup({ + rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), + browser: true, + nuxtConfig: { + modules: [ + [BasicAuth, { enabled: true }], + ], + }, + }) + + test('access denied without http credentials', async () => { + const page = await createPage('/') + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).toBe(0) + }) + test('allow with http credentials', async () => { + const page = await createPage('/', { + httpCredentials: { + username: 'admin', + password: 'admin', + }, + }) + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).not.toBe(0) + }) +}) diff --git a/test/basic-with-runtime-config.test.ts b/test/basic-with-runtime-config.test.ts new file mode 100644 index 0000000..0620f04 --- /dev/null +++ b/test/basic-with-runtime-config.test.ts @@ -0,0 +1,63 @@ +import { fileURLToPath } from 'url' +import { describe, test, expect } from 'vitest' +import { setup, createPage } from '@nuxt/test-utils-edge' +import BasicAuth from '../src/module' + +describe('RuntimeConfig test: pairs', async () => { + await setup({ + rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), + browser: true, + nuxtConfig: { + modules: [ + [BasicAuth, { enabled: true }], + ], + runtimeConfig: { + basicAuth: { + pairs: { + foo: 'bar', + baz: 'baz', + }, + }, + }, + }, + }) + + test('allow with http credentials', async () => { + const page = await createPage('/', { + httpCredentials: { + username: 'foo', + password: 'bar', + }, + }) + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).not.toBe(0) + }) + + test('allow with right pair', async () => { + const page = await createPage('/', { + httpCredentials: { + username: 'baz', + password: 'baz', + }, + }) + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).not.toBe(0) + }) + + test('access denied with wrong pair', async () => { + const page = await createPage('/', { + httpCredentials: { + username: 'wrong', + password: 'pair', + }, + }) + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).toBe(0) + }) +}) diff --git a/test/basic.test.ts b/test/basic.test.ts new file mode 100644 index 0000000..0a44362 --- /dev/null +++ b/test/basic.test.ts @@ -0,0 +1,36 @@ +import { fileURLToPath } from 'url' +import { describe, test, expect } from 'vitest' +import { setup, createPage } from '@nuxt/test-utils-edge' +import BasicAuth from '../src/module' + +describe('Basic test: without module options', async () => { + await setup({ + rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), + browser: true, + nuxtConfig: { + modules: [ + BasicAuth, + ], + }, + }) + + test('access denied without http credentials', async () => { + const page = await createPage('/') + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).toBe(0) + }) + test('allow with http credentials', async () => { + const page = await createPage('/', { + httpCredentials: { + username: 'admin', + password: 'admin', + }, + }) + + const selector = await page.locator('div', { hasText: 'Nuxt Basic Auth Module' }) + const count = await selector.count() + expect(count).not.toBe(0) + }) +}) diff --git a/test/fixtures/basic/app.vue b/test/fixtures/basic/app.vue new file mode 100644 index 0000000..12a1bf6 --- /dev/null +++ b/test/fixtures/basic/app.vue @@ -0,0 +1,8 @@ + + + diff --git a/test/fixtures/basic/nuxt.config.ts b/test/fixtures/basic/nuxt.config.ts new file mode 100644 index 0000000..8b0aa10 --- /dev/null +++ b/test/fixtures/basic/nuxt.config.ts @@ -0,0 +1,4 @@ +import { defineNuxtConfig } from 'nuxt' + +export default defineNuxtConfig({ +}) diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..4dd31ec --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,11 @@ +/// +import { defineConfig } from 'vite' + +export default defineConfig({ + test: { + testTimeout: 300000, + deps: { + inline: [/@nuxt\/test-utils-edge/] + }, + }, +}) diff --git a/yarn.lock b/yarn.lock index fe2d541..2e1038f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -453,6 +453,31 @@ unimport "^0.4.5" untyped "^0.4.4" +"@nuxt/kit@npm:@nuxt/kit-edge@3.0.0-rc.6-27651720.5dc864d": + version "3.0.0-rc.6-27651720.5dc864d" + resolved "https://registry.yarnpkg.com/@nuxt/kit-edge/-/kit-edge-3.0.0-rc.6-27651720.5dc864d.tgz#ff89276ef28cc4cf53d59d735d0d643563f40296" + integrity sha512-awSPj8mBe4rIussHLm/2778RjWRsNJIdeNpLb839HAPLQRi6m6FAU8kuXKtT53dTT3gwHYTE8DvYlNfI8KVd0g== + dependencies: + "@nuxt/schema" "npm:@nuxt/schema-edge@3.0.0-rc.6-27651720.5dc864d" + c12 "^0.2.8" + consola "^2.15.3" + defu "^6.0.0" + globby "^13.1.2" + hash-sum "^2.0.0" + ignore "^5.2.0" + jiti "^1.14.0" + knitwork "^0.1.2" + lodash.template "^4.5.0" + mlly "^0.5.5" + ohash "^0.1.4" + pathe "^0.3.2" + pkg-types "^0.3.3" + scule "^0.3.2" + semver "^7.3.7" + unctx "^1.1.4" + unimport "^0.6.4" + untyped "^0.4.4" + "@nuxt/module-builder@latest": version "0.1.7" resolved "https://registry.yarnpkg.com/@nuxt/module-builder/-/module-builder-0.1.7.tgz#6de83fa24a839265d43abdb5ecf8ec85456ca765" @@ -480,6 +505,22 @@ ufo "^0.8.5" unimport "^0.4.5" +"@nuxt/schema@npm:@nuxt/schema-edge@3.0.0-rc.6-27651720.5dc864d": + version "3.0.0-rc.6-27651720.5dc864d" + resolved "https://registry.yarnpkg.com/@nuxt/schema-edge/-/schema-edge-3.0.0-rc.6-27651720.5dc864d.tgz#dc4ff35d213f6e7f77e17e337773c2357ed429a9" + integrity sha512-tO+FGzwqKp/AYdrd1ShzNhxKn3ZzhWnNuEWkmCY682gKXZaOf2oFnL4vEto71A6SvUVWfdn17tm6Co4knJKMUQ== + dependencies: + c12 "^0.2.8" + create-require "^1.1.1" + defu "^6.0.0" + jiti "^1.14.0" + pathe "^0.3.2" + postcss-import-resolver "^2.0.0" + scule "^0.3.2" + std-env "^3.1.1" + ufo "^0.8.5" + unimport "^0.6.4" + "@nuxt/telemetry@^2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nuxt/telemetry/-/telemetry-2.1.3.tgz#0ecc8fed684db835bcf2f7e5a0bebef54e43d294" @@ -506,6 +547,19 @@ rc9 "^1.2.2" std-env "^3.1.1" +"@nuxt/test-utils-edge@^3.0.0-rc.6-27651720.5dc864d": + version "3.0.0-rc.6-27651720.5dc864d" + resolved "https://registry.yarnpkg.com/@nuxt/test-utils-edge/-/test-utils-edge-3.0.0-rc.6-27651720.5dc864d.tgz#189fae0e4884ba2969dad639b724068d1ad2a1ee" + integrity sha512-BSlLeQkeFN3CGauGkTMOMlJ11wK2aqsVvIopRIXuHNOweVIFZWtqAR/lY+qmPLAj4okZ9e0A3GYFTQCRH2iXDQ== + dependencies: + "@nuxt/kit" "npm:@nuxt/kit-edge@3.0.0-rc.6-27651720.5dc864d" + "@nuxt/schema" "npm:@nuxt/schema-edge@3.0.0-rc.6-27651720.5dc864d" + defu "^6.0.0" + execa "^6.1.0" + get-port-please "^2.5.0" + jiti "^1.14.0" + ohmyfetch "^0.4.18" + "@nuxt/ui-templates@^0.2.1": version "0.2.2" resolved "https://registry.yarnpkg.com/@nuxt/ui-templates/-/ui-templates-0.2.2.tgz#bf6bb59c644c3981aa30449763ac05eefd566576" @@ -676,6 +730,18 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== +"@types/chai-subset@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" + integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + "@types/estree@*": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" @@ -975,7 +1041,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.5.0, acorn@^8.6.0, acorn@^8.7.0, acorn@^8.7.1: +acorn@^8.5.0, acorn@^8.6.0, acorn@^8.7.0, acorn@^8.7.1, acorn@^8.8.0: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -1119,6 +1185,11 @@ array.prototype.flat@^1.2.5: es-abstract "^1.19.2" es-shim-unscopables "^1.0.0" +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -1299,6 +1370,19 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001366: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001369.tgz#58ca6974acf839a72a02003258a005cbb0cb340d" integrity sha512-OY1SBHaodJc4wflDIKnlkdqWzJZd1Ls/2zbVJHBSv3AT7vgOJ58yAhd2CN4d57l2kPJrgMb7P9+N1Mhy4tNSQA== +chai@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" + integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -1326,6 +1410,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -1667,6 +1756,13 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -2368,6 +2464,21 @@ execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" + integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^3.0.1" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -2607,6 +2718,11 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" @@ -2623,7 +2739,7 @@ get-port-please@^2.5.0: dependencies: fs-memo "^1.2.0" -get-stream@^6.0.0: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -2851,6 +2967,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" + integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== + iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3100,6 +3221,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3391,6 +3517,13 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +loupe@^2.3.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -3470,6 +3603,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -3754,6 +3892,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + npmlog@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" @@ -3893,6 +4038,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.4.0: version "8.4.0" resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" @@ -4042,6 +4194,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -4062,6 +4219,11 @@ pathe@^0.3.0, pathe@^0.3.2: resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.3.2.tgz#016345ed643027404d7a9ed8d1454ad997a1483a" integrity sha512-qhnmX0TOqlCvdWWTkoM83wh5J8fZ2yhbDEc9MlsnAEtEc+JCwxUKEwmd6pkY9hRe6JR1Uecbc14VcAKX2yFSTA== +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + perfect-debounce@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-0.1.3.tgz#ff6798ea543a3ba1f0efeeaf97c0340f5c8871ce" @@ -4091,6 +4253,18 @@ pkg-types@^0.3.2, pkg-types@^0.3.3: mlly "^0.5.3" pathe "^0.3.0" +playwright-core@1.24.2: + version "1.24.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.24.2.tgz#47bc5adf3dcfcc297a5a7a332449c9009987db26" + integrity sha512-zfAoDoPY/0sDLsgSgLZwWmSCevIg1ym7CppBwllguVBNiHeixZkc1AdMuYUPZC6AdEYc4CxWEyLMBTw2YcmRrA== + +playwright@^1.24.2: + version "1.24.2" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.24.2.tgz#51e60f128b386023e5ee83deca23453aaf73ba6d" + integrity sha512-iMWDLgaFRT+7dXsNeYwgl8nhLHsUrzFyaRVC+ftr++P1dVs70mPrFKBZrGp1fOKigHV9d1syC03IpPbqLKlPsg== + dependencies: + playwright-core "1.24.2" + pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" @@ -4676,6 +4850,11 @@ scule@^0.2.1: resolved "https://registry.yarnpkg.com/scule/-/scule-0.2.1.tgz#0c1dc847b18e07219ae9a3832f2f83224e2079dc" integrity sha512-M9gnWtn3J0W+UhJOHmBxBTwv8mZCan5i1Himp60t6vvZcor0wr+IM0URKmIglsWJ7bRujNAVVN77fp+uZaWoKg== +scule@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/scule/-/scule-0.3.2.tgz#472445cecd8357165a94a067f78cee40e700b596" + integrity sha512-zIvPdjOH8fv8CgrPT5eqtxHQXmPNnV/vHJYffZhE43KZkvULvpCTvOt1HPlFaCZx287INL9qaqrZg34e8NgI4g== + selfsigned@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" @@ -4774,7 +4953,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -4940,6 +5119,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -5086,6 +5270,16 @@ tiny-invariant@^1.1.0: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.2.0.tgz#a1141f86b672a9148c72e978a19a73b9b94a15a9" integrity sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg== +tinypool@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.2.4.tgz#4d2598c4689d1a2ce267ddf3360a9c6b3925a20c" + integrity sha512-Vs3rhkUH6Qq1t5bqtb816oT+HeJTXfwt2cbPH17sWHIYKTotQIFPk3tf2fgqRrVyMDVOc1EnPgzIxfIulXVzwQ== + +tinyspy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-1.0.0.tgz#0cb34587287b0432b33fe36a9bd945fe22b1eb89" + integrity sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -5149,6 +5343,11 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" @@ -5283,6 +5482,22 @@ unimport@^0.4.4, unimport@^0.4.5: strip-literal "^0.4.0" unplugin "^0.7.2" +unimport@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/unimport/-/unimport-0.6.4.tgz#65ab496e41ac37952dad0c49394c64c62be6238a" + integrity sha512-1cbSeTsC2EwzWeWAyQleajM354y+EYsymxE9p1wDbHKVTEe9XL6+e7vlEv2pj1Zk8YYFf+CBf9QG8My7aDKhag== + dependencies: + "@rollup/pluginutils" "^4.2.1" + escape-string-regexp "^5.0.0" + fast-glob "^3.2.11" + local-pkg "^0.4.2" + magic-string "^0.26.2" + mlly "^0.5.5" + pathe "^0.3.2" + scule "^0.3.2" + strip-literal "^0.4.0" + unplugin "^0.8.0" + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -5307,6 +5522,16 @@ unplugin@^0.7.2: webpack-sources "^3.2.3" webpack-virtual-modules "^0.4.4" +unplugin@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.8.0.tgz#aeabac40e89fb69e5c9366b4821c3836d1b6ffce" + integrity sha512-OzOkJ9XOPlD1Cph6qy/p4i/KSUbs76GToXjH/STHpfo6D7y+EqpfAL6G6HaoOw5QLkt9+KWwcxYUmPFkDf1upQ== + dependencies: + acorn "^8.8.0" + chokidar "^3.5.3" + webpack-sources "^3.2.3" + webpack-virtual-modules "^0.4.4" + unstorage@^0.5.4: version "0.5.5" resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-0.5.5.tgz#5fba120c631302684fe393c9e501a4a8283f912c" @@ -5427,6 +5652,21 @@ vite@^2.9.14: optionalDependencies: fsevents "~2.3.2" +vitest@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.19.1.tgz#8a89f4c873132d778d4206dbfbd6791c12f6d921" + integrity sha512-E/ZXpFMUahn731wzhMBNzWRp4mGgiZFT0xdHa32cbNO0CSaHpE9hTfteEU247Gi2Dula8uXo5vvrNB6dtszmQA== + dependencies: + "@types/chai" "^4.3.1" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + chai "^4.3.6" + debug "^4.3.4" + local-pkg "^0.4.2" + tinypool "^0.2.4" + tinyspy "^1.0.0" + vite "^2.9.12 || ^3.0.0-0" + vscode-jsonrpc@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e"