diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..11e4593
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+dist
+tsconfig.tsbuildinfo
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..4e59339
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,344 @@
+# @web/dev-server-esbuild
+
+## 1.0.1
+
+### Patch Changes
+
+- e31de569: Update `@web/dev-server-rollup` to latest version
+
+## 1.0.0
+
+### Major Changes
+
+- 8218a0a5: Update ESBuild to latest version.
+
+ ESBuild has changed how TypeScript decorators are enabled in preparation for JavaScript decorators to land in browsers. ESBuild now requires the `experimentalDecorators` key to be set to `true` in the `tsconfig.json` for TypeScript decorators to be enabled.
+
+ If you are having issues with decorators after updating to this version, try setting the `experimentalDecorators` key in your `tsconfig.json`.
+
+### Minor Changes
+
+- c185cbaa: Set minimum node version to 18
+
+### Patch Changes
+
+- Updated dependencies [c185cbaa]
+ - @web/dev-server-core@0.7.0
+
+## 0.4.4
+
+### Patch Changes
+
+- ef6b2543: Use split versions for all lit dependencies
+
+## 0.4.3
+
+### Patch Changes
+
+- 640ba85f: added types for main entry point
+- Updated dependencies [640ba85f]
+ - @web/dev-server-core@0.6.2
+
+## 0.4.2
+
+### Patch Changes
+
+- Updated dependencies [7f0f4315]
+ - @web/dev-server-core@0.6.0
+
+## 0.4.1
+
+### Patch Changes
+
+- c26d3730: Update TypeScript
+- Updated dependencies [c26d3730]
+ - @web/dev-server-core@0.5.1
+
+## 0.4.0
+
+### Minor Changes
+
+- febd9d9d: Set node 16 as the minimum version.
+
+### Patch Changes
+
+- Updated dependencies [ca715faf]
+- Updated dependencies [febd9d9d]
+ - @web/dev-server-core@0.5.0
+
+## 0.3.6
+
+### Patch Changes
+
+- 8128ca53: Update @rollup/plugin-replace
+- Updated dependencies [c103f166]
+ - @web/dev-server-core@0.4.1
+
+## 0.3.5
+
+### Patch Changes
+
+- 0f5631d0: chore(deps): bump ua-parser-js from 1.0.32 to 1.0.33
+
+## 0.3.4
+
+### Patch Changes
+
+- 1b2ae08c: Bump the `esbuild` version to `^0.16 || ^0.17` fix a decorator bug in 0.14
+- Updated dependencies [ac05ca5d]
+- Updated dependencies [acc0a84c]
+- Updated dependencies [81db401b]
+ - @web/dev-server-core@0.4.0
+
+## 0.3.3
+
+### Patch Changes
+
+- cfc2aa1e: Expose banner/footer as a pass-through to esbuild transform
+
+## 0.3.2
+
+### Patch Changes
+
+- 00da4255: Update es-module-lexer to 1.0.0
+- Updated dependencies [00da4255]
+ - @web/dev-server-core@0.3.19
+
+## 0.3.1
+
+### Patch Changes
+
+- d0e5e3f0: Add a `tsconfig` option which can be pointed towards your tsconfig.json to keep esbuild and typescript in sync.
+
+ Usage example:
+
+ ```js
+ import { fileURLToPath } from 'url';
+ esbuildPlugin({
+ ts: true,
+ tsconfig: fileURLToPath(new URL('./tsconfig.json', import.meta.url)),
+ });
+ ```
+
+ Note: Without the above code the `tsconfig.json` file will not be used.
+
+## 0.3.0
+
+### Minor Changes
+
+- c1946b04: Relax `esbuild` semver dependency from `^0.12.21` to `^0.12 || ^0.13 || ^0.14`.
+
+## 0.2.16
+
+### Patch Changes
+
+- d406c772: Do not process scripts with non-JS type attribute
+- Updated dependencies [b2c081d8]
+ - @web/dev-server-core@0.3.17
+
+## 0.2.15
+
+### Patch Changes
+
+- 9f4940f0: Update ua-parser-js dependency to 1.0.2
+
+## 0.2.14
+
+### Patch Changes
+
+- bf89ce23: Update dependency @mdn/browser-compat-data to v4
+
+## 0.2.13
+
+### Patch Changes
+
+- 9f96e7be: Update esbuild dependency to ^0.12.21
+
+## 0.2.12
+
+### Patch Changes
+
+- 90375262: Upgrade to esbuild ^0.11.0
+- 020917c4: Do not override js loader with esbuild target
+- Updated dependencies [780a3520]
+ - @web/dev-server-core@0.3.10
+
+## 0.2.11
+
+### Patch Changes
+
+- 87705b04: pass `esbuildconfig.define` to esbuild transform function
+
+## 0.2.10
+
+### Patch Changes
+
+- c7f8d271: set esm format for non jslike loaders
+- Updated dependencies [375116ad]
+ - @web/dev-server-core@0.3.2
+
+## 0.2.9
+
+### Patch Changes
+
+- Updated dependencies [0f613e0e]
+ - @web/dev-server-core@0.3.0
+
+## 0.2.8
+
+### Patch Changes
+
+- 28890a0: update to latest esbuild
+
+## 0.2.6
+
+### Patch Changes
+
+- 46a01fb: filter unsupported sourcemap warnings
+
+## 0.2.5
+
+### Patch Changes
+
+- 8111c2f: upgrade mdn-browser-compat-data to @mdn/browser-compat-data
+- 201ffbd: updated esbuild dependency
+
+## 0.2.4
+
+### Patch Changes
+
+- be76d89: exposed strict option for esbuild
+
+## 0.2.3
+
+### Patch Changes
+
+- dc2d689: added esbuild auto and auto-always flags
+- bb53e68: add support for JSON loader
+
+## 0.2.2
+
+### Patch Changes
+
+- ce2a2e6: align dependencies
+
+## 0.2.1
+
+### Patch Changes
+
+- aa65fd1: run build before publishing
+- Updated dependencies [aa65fd1]
+ - @web/dev-server-core@0.2.1
+
+## 0.2.0
+
+### Minor Changes
+
+- 9be1f95: Added native node es module entrypoints. This is a breaking change. Before, native node es module imports would import a CJS module as a default import and require destructuring afterwards:
+
+ ```js
+ import playwrightModule from '@web/test-runner-playwright';
+
+ const { playwrightLauncher } = playwrightModule;
+ ```
+
+ Now, the exports are only available directly as a named export:
+
+ ```js
+ import { playwrightLauncher } from '@web/test-runner-playwright';
+ ```
+
+### Patch Changes
+
+- 62ff8b2: make tests work on windows
+- Updated dependencies [96dd279]
+- Updated dependencies [62ff8b2]
+- Updated dependencies [9be1f95]
+ - @web/dev-server-core@0.2.0
+
+## 0.1.5
+
+### Patch Changes
+
+- 5a33916: support .js extensions in TS imports
+
+## 0.1.4
+
+### Patch Changes
+
+- 38a8505: improve esbuild syntax error logging
+- Updated dependencies [8596276]
+ - @web/dev-server-core@0.1.5
+
+## 0.1.3
+
+### Patch Changes
+
+- 8b94b03: update to esbuild 0.6.x
+
+## 0.1.2
+
+### Patch Changes
+
+- 339722c: don't compile class fields when transforming ts
+
+## 0.1.1
+
+### Patch Changes
+
+- 89214f0: update to latest esbuild
+- Updated dependencies [59d3efe]
+ - @web/dev-server-core@0.1.1
+
+## 0.1.0
+
+### Minor Changes
+
+- c4cb321: Use web dev server in test runner. This contains multiple breaking changes:
+
+ - Browsers that don't support es modules are not supported for now. We will add this back later.
+ - Most es-dev-server config options are no longer available. The only options that are kept are `plugins`, `middleware`, `nodeResolve` and `preserveSymlinks`.
+ - Test runner config changes:
+ - Dev server options are not available on the root level of the configuration file.
+ - `nodeResolve` is no longer enabled by default. You can enable it with the `--node-resolve` flag or `nodeResolve` option.
+ - `middlewares` option is now called `middleware`.
+ - `testFrameworkImport` is now called `testFramework`.
+ - `address` is now split into `protocol` and `hostname`.
+
+### Patch Changes
+
+- Updated dependencies [c4cb321]
+ - @web/dev-server-core@0.1.0
+
+## 0.0.5
+
+### Patch Changes
+
+- 5da18d7: compile class fields strictly
+- d1cc35c: set transform cache key
+- Updated dependencies [9302247]
+ - @web/dev-server-core@0.0.3
+
+## 0.0.4
+
+### Patch Changes
+
+- a4d32b3: add auto compatibility mode
+
+## 0.0.3
+
+### Patch Changes
+
+- 271ef35: allow setting loader for file extension
+
+## 0.0.2
+
+### Patch Changes
+
+- bffc09b: fix package json main
+
+## 0.0.1
+
+### Patch Changes
+
+- 52803c0: add esbuild plugin
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6645200
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# @web/dev-server-esbuild
+
+Plugin for using [esbuild](https://github.com/evanw/esbuild) in the dev server.
+
+See [our website](https://modern-web.dev/docs/dev-server/plugins/esbuild/) for full documentation.
diff --git a/demo/jsx/app.jsx b/demo/jsx/app.jsx
new file mode 100644
index 0000000..0516a66
--- /dev/null
+++ b/demo/jsx/app.jsx
@@ -0,0 +1,8 @@
+import { h, render } from 'preact';
+
+render(
+
+ Hello World!
+ ,
+ document.body,
+);
diff --git a/demo/jsx/index.html b/demo/jsx/index.html
new file mode 100644
index 0000000..4b4ba42
--- /dev/null
+++ b/demo/jsx/index.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/demo/jsx/server.config.js b/demo/jsx/server.config.js
new file mode 100644
index 0000000..b48b615
--- /dev/null
+++ b/demo/jsx/server.config.js
@@ -0,0 +1,9 @@
+const { esbuildPlugin } = require('../../dist/esbuildPlugin');
+
+module.exports = {
+ open: true,
+ rootDir: '../..',
+ nodeResolve: true,
+ appIndex: 'packages/dev-server-esbuild/demo/jsx/index.html',
+ plugins: [esbuildPlugin({ jsx: true, jsxFactory: 'h', jsxFragment: 'Fragment' })],
+};
diff --git a/demo/ts/.gitignore b/demo/ts/.gitignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/demo/ts/.gitignore
@@ -0,0 +1 @@
+node_modules
\ No newline at end of file
diff --git a/demo/ts/app.ts b/demo/ts/app.ts
new file mode 100644
index 0000000..21c33ef
--- /dev/null
+++ b/demo/ts/app.ts
@@ -0,0 +1,13 @@
+import { LitElement, customElement, property, html } from 'lit-element';
+
+@customElement('my-app')
+class MyApp extends LitElement {
+ @property({ type: String })
+ foo = 'bar';
+
+ render() {
+ return html`
+ Hello world
+ `;
+ }
+}
diff --git a/demo/ts/index.html b/demo/ts/index.html
new file mode 100644
index 0000000..8d94638
--- /dev/null
+++ b/demo/ts/index.html
@@ -0,0 +1,12 @@
+
+
+ Web Dev Server ESBuild Plugin Demo
+
+
+
+
+ Web Dev Server ESBuild Plugin Demo
+
+
+
+
diff --git a/demo/ts/package.json b/demo/ts/package.json
new file mode 100644
index 0000000..f3fa745
--- /dev/null
+++ b/demo/ts/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "dev-server-esbuild-demo",
+ "version": "1.0.0",
+ "license": "ISC",
+ "scripts": {
+ "start": "wds --node-resolve --open --watch"
+ },
+ "devDependencies": {
+ "@web/dev-server": "^0.1.30"
+ }
+}
diff --git a/demo/ts/tsconfig.json b/demo/ts/tsconfig.json
new file mode 100644
index 0000000..504cd64
--- /dev/null
+++ b/demo/ts/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "compilerOptions": {
+ "experimentalDecorators": true
+ }
+}
diff --git a/demo/ts/web-dev-server.config.js b/demo/ts/web-dev-server.config.js
new file mode 100644
index 0000000..a0c6aec
--- /dev/null
+++ b/demo/ts/web-dev-server.config.js
@@ -0,0 +1,9 @@
+const { esbuildPlugin } = require('@web/dev-server-esbuild');
+
+module.exports = {
+ open: true,
+ // rootDir: '../..',
+ nodeResolve: true,
+ appIndex: 'index.html',
+ plugins: [esbuildPlugin({ ts: true })],
+};
diff --git a/index.d.ts b/index.d.ts
new file mode 100644
index 0000000..06811aa
--- /dev/null
+++ b/index.d.ts
@@ -0,0 +1,2 @@
+// this file is autogenerated with the generate-mjs-dts-entrypoints script
+export * from './dist/index.js';
diff --git a/index.mjs b/index.mjs
new file mode 100644
index 0000000..3d9d2f5
--- /dev/null
+++ b/index.mjs
@@ -0,0 +1,6 @@
+// this file is autogenerated with the generate-mjs-dts-entrypoints script
+import cjsEntrypoint from './dist/index.js';
+
+const { esbuildPlugin } = cjsEntrypoint;
+
+export { esbuildPlugin };
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..1b7ee83
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,2613 @@
+{
+ "name": "@web/dev-server-esbuild",
+ "version": "1.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@web/dev-server-esbuild",
+ "version": "1.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "@mdn/browser-compat-data": "^4.0.0",
+ "@web/dev-server-core": "^0.7.0",
+ "esbuild": "^0.19.5",
+ "parse5": "^6.0.1",
+ "ua-parser-js": "^1.0.33"
+ },
+ "devDependencies": {
+ "@types/chai": "^4.3.11",
+ "@types/mocha": "^10.0.6",
+ "@types/ua-parser-js": "^0.7.35",
+ "@web/dev-server-rollup": "^0.6.1",
+ "chai": "^4.4.0",
+ "lit-element": "^3.0.0 || ^4.0.1",
+ "mocha": "^10.2.0",
+ "node-fetch": "^2.7.0",
+ "portfinder": "^1.0.32",
+ "preact": "^10.5.9",
+ "ts-node": "^10.9.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.19.5",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@lit-labs/ssr-dom-shim": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz",
+ "integrity": "sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==",
+ "dev": true
+ },
+ "node_modules/@lit/reactive-element": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.2.tgz",
+ "integrity": "sha512-SVOwLAWUQg3Ji1egtOt1UiFe4zdDpnWHyc5qctSceJ5XIu0Uc76YmGpIjZgx9YJ0XtdW0Jm507sDvjOu+HnB8w==",
+ "dev": true,
+ "dependencies": {
+ "@lit-labs/ssr-dom-shim": "^1.1.2"
+ }
+ },
+ "node_modules/@mdn/browser-compat-data": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz",
+ "integrity": "sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA=="
+ },
+ "node_modules/@rollup/plugin-node-resolve": {
+ "version": "15.2.3",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz",
+ "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==",
+ "dev": true,
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "@types/resolve": "1.20.2",
+ "deepmerge": "^4.2.2",
+ "is-builtin-module": "^3.2.1",
+ "is-module": "^1.0.0",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.78.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
+ "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.4.tgz",
+ "integrity": "sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.4.tgz",
+ "integrity": "sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.4.tgz",
+ "integrity": "sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.4.tgz",
+ "integrity": "sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.4.tgz",
+ "integrity": "sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.4.tgz",
+ "integrity": "sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.4.tgz",
+ "integrity": "sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.4.tgz",
+ "integrity": "sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.4.tgz",
+ "integrity": "sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.4.tgz",
+ "integrity": "sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.4.tgz",
+ "integrity": "sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.4.tgz",
+ "integrity": "sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.4.tgz",
+ "integrity": "sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "dev": true
+ },
+ "node_modules/@types/accepts": {
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz",
+ "integrity": "sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/body-parser": {
+ "version": "1.19.5",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
+ "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==",
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/chai": {
+ "version": "4.3.11",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz",
+ "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==",
+ "dev": true
+ },
+ "node_modules/@types/connect": {
+ "version": "3.4.38",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
+ "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/content-disposition": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.8.tgz",
+ "integrity": "sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg=="
+ },
+ "node_modules/@types/cookies": {
+ "version": "0.7.10",
+ "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.10.tgz",
+ "integrity": "sha512-hmUCjAk2fwZVPPkkPBcI7jGLIR5mg4OVoNMBwU6aVsMm/iNPY7z9/R+x2fSwLt/ZXoGua6C5Zy2k5xOo9jUyhQ==",
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/express": "*",
+ "@types/keygrip": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
+ "dev": true
+ },
+ "node_modules/@types/express": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
+ "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==",
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.33",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "node_modules/@types/express-serve-static-core": {
+ "version": "4.17.41",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz",
+ "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/http-assert": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.5.tgz",
+ "integrity": "sha512-4+tE/lwdAahgZT1g30Jkdm9PzFRde0xwxBNUyRsCitRvCQB90iuA2uJYdUnhnANRcqGXaWOGY4FEoxeElNAK2g=="
+ },
+ "node_modules/@types/http-errors": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz",
+ "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA=="
+ },
+ "node_modules/@types/keygrip": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.6.tgz",
+ "integrity": "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ=="
+ },
+ "node_modules/@types/koa": {
+ "version": "2.13.12",
+ "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.12.tgz",
+ "integrity": "sha512-vAo1KuDSYWFDB4Cs80CHvfmzSQWeUb909aQib0C0aFx4sw0K9UZFz2m5jaEP+b3X1+yr904iQiruS0hXi31jbw==",
+ "dependencies": {
+ "@types/accepts": "*",
+ "@types/content-disposition": "*",
+ "@types/cookies": "*",
+ "@types/http-assert": "*",
+ "@types/http-errors": "*",
+ "@types/keygrip": "*",
+ "@types/koa-compose": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/koa-compose": {
+ "version": "3.2.8",
+ "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.8.tgz",
+ "integrity": "sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==",
+ "dependencies": {
+ "@types/koa": "*"
+ }
+ },
+ "node_modules/@types/mime": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
+ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w=="
+ },
+ "node_modules/@types/mocha": {
+ "version": "10.0.6",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz",
+ "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==",
+ "dev": true
+ },
+ "node_modules/@types/node": {
+ "version": "20.10.7",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz",
+ "integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==",
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/parse5": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz",
+ "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g=="
+ },
+ "node_modules/@types/qs": {
+ "version": "6.9.11",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz",
+ "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ=="
+ },
+ "node_modules/@types/range-parser": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
+ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ=="
+ },
+ "node_modules/@types/resolve": {
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
+ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
+ "dev": true
+ },
+ "node_modules/@types/send": {
+ "version": "0.17.4",
+ "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz",
+ "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==",
+ "dependencies": {
+ "@types/mime": "^1",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/serve-static": {
+ "version": "1.15.5",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz",
+ "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==",
+ "dependencies": {
+ "@types/http-errors": "*",
+ "@types/mime": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/trusted-types": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
+ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
+ "dev": true
+ },
+ "node_modules/@types/ua-parser-js": {
+ "version": "0.7.39",
+ "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz",
+ "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==",
+ "dev": true
+ },
+ "node_modules/@types/ws": {
+ "version": "7.4.7",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
+ "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@web/dev-server-core": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.7.0.tgz",
+ "integrity": "sha512-1FJe6cJ3r0x0ZmxY/FnXVduQD4lKX7QgYhyS6N+VmIpV+tBU4sGRbcrmeoYeY+nlnPa6p2oNuonk3X5ln/W95g==",
+ "dependencies": {
+ "@types/koa": "^2.11.6",
+ "@types/ws": "^7.4.0",
+ "@web/parse5-utils": "^2.1.0",
+ "chokidar": "^3.4.3",
+ "clone": "^2.1.2",
+ "es-module-lexer": "^1.0.0",
+ "get-stream": "^6.0.0",
+ "is-stream": "^2.0.0",
+ "isbinaryfile": "^5.0.0",
+ "koa": "^2.13.0",
+ "koa-etag": "^4.0.0",
+ "koa-send": "^5.0.1",
+ "koa-static": "^5.0.0",
+ "lru-cache": "^8.0.4",
+ "mime-types": "^2.1.27",
+ "parse5": "^6.0.1",
+ "picomatch": "^2.2.2",
+ "ws": "^7.4.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@web/dev-server-rollup": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.6.1.tgz",
+ "integrity": "sha512-vhtsQ8qu1pBHailOBOYJwZnYDc1Lmx6ZAd2j+y5PD2ck0R1LmVsZ7dZK8hDCpkvpvlu2ndURjL9tbzdcsBRJmg==",
+ "dev": true,
+ "dependencies": {
+ "@rollup/plugin-node-resolve": "^15.0.1",
+ "@web/dev-server-core": "^0.7.0",
+ "nanocolors": "^0.2.1",
+ "parse5": "^6.0.1",
+ "rollup": "^4.4.0",
+ "whatwg-url": "^11.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@web/parse5-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-2.1.0.tgz",
+ "integrity": "sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==",
+ "dependencies": {
+ "@types/parse5": "^6.0.1",
+ "parse5": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.11.3",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
+ "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
+ "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ansi-colors": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "node_modules/assertion-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "dev": true,
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browser-stdout": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
+ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
+ "dev": true
+ },
+ "node_modules/builtin-modules": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
+ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cache-content-type": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz",
+ "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==",
+ "dependencies": {
+ "mime-types": "^2.1.18",
+ "ylru": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/chai": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.0.tgz",
+ "integrity": "sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==",
+ "dev": true,
+ "dependencies": {
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.3",
+ "deep-eql": "^4.1.3",
+ "get-func-name": "^2.0.2",
+ "loupe": "^2.3.6",
+ "pathval": "^1.1.1",
+ "type-detect": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chalk/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/check-error": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
+ "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
+ "dev": true,
+ "dependencies": {
+ "get-func-name": "^2.0.2"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+ "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "node_modules/clone": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+ "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/co": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==",
+ "engines": {
+ "iojs": ">= 1.0.0",
+ "node": ">= 0.12.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookies": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.9.1.tgz",
+ "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "keygrip": "~1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decamelize": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
+ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/deep-eql": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
+ "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
+ "dev": true,
+ "dependencies": {
+ "type-detect": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/deep-equal": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+ "integrity": "sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw=="
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/diff": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
+ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz",
+ "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w=="
+ },
+ "node_modules/esbuild": {
+ "version": "0.19.5",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.19.5",
+ "@esbuild/android-arm64": "0.19.5",
+ "@esbuild/android-x64": "0.19.5",
+ "@esbuild/darwin-arm64": "0.19.5",
+ "@esbuild/darwin-x64": "0.19.5",
+ "@esbuild/freebsd-arm64": "0.19.5",
+ "@esbuild/freebsd-x64": "0.19.5",
+ "@esbuild/linux-arm": "0.19.5",
+ "@esbuild/linux-arm64": "0.19.5",
+ "@esbuild/linux-ia32": "0.19.5",
+ "@esbuild/linux-loong64": "0.19.5",
+ "@esbuild/linux-mips64el": "0.19.5",
+ "@esbuild/linux-ppc64": "0.19.5",
+ "@esbuild/linux-riscv64": "0.19.5",
+ "@esbuild/linux-s390x": "0.19.5",
+ "@esbuild/linux-x64": "0.19.5",
+ "@esbuild/netbsd-x64": "0.19.5",
+ "@esbuild/openbsd-x64": "0.19.5",
+ "@esbuild/sunos-x64": "0.19.5",
+ "@esbuild/win32-arm64": "0.19.5",
+ "@esbuild/win32-ia32": "0.19.5",
+ "@esbuild/win32-x64": "0.19.5"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
+ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
+ "dev": true,
+ "bin": {
+ "flat": "cli.js"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-func-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
+ "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+ "dev": true,
+ "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"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true,
+ "bin": {
+ "he": "bin/he"
+ }
+ },
+ "node_modules/http-assert": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz",
+ "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==",
+ "dependencies": {
+ "deep-equal": "~1.0.1",
+ "http-errors": "~1.8.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
+ "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
+ "dependencies": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": ">= 1.5.0 < 2",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/http-errors/node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-builtin-module": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
+ "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",
+ "dev": true,
+ "dependencies": {
+ "builtin-modules": "^3.3.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-generator-function": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
+ "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
+ "dev": true
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/isbinaryfile": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.0.tgz",
+ "integrity": "sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==",
+ "engines": {
+ "node": ">= 14.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/gjtorikian/"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/keygrip": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz",
+ "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==",
+ "dependencies": {
+ "tsscmp": "1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/koa": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/koa/-/koa-2.15.0.tgz",
+ "integrity": "sha512-KEL/vU1knsoUvfP4MC4/GthpQrY/p6dzwaaGI6Rt4NQuFqkw3qrvsdYF5pz3wOfi7IGTvMPHC9aZIcUKYFNxsw==",
+ "dependencies": {
+ "accepts": "^1.3.5",
+ "cache-content-type": "^1.0.0",
+ "content-disposition": "~0.5.2",
+ "content-type": "^1.0.4",
+ "cookies": "~0.9.0",
+ "debug": "^4.3.2",
+ "delegates": "^1.0.0",
+ "depd": "^2.0.0",
+ "destroy": "^1.0.4",
+ "encodeurl": "^1.0.2",
+ "escape-html": "^1.0.3",
+ "fresh": "~0.5.2",
+ "http-assert": "^1.3.0",
+ "http-errors": "^1.6.3",
+ "is-generator-function": "^1.0.7",
+ "koa-compose": "^4.1.0",
+ "koa-convert": "^2.0.0",
+ "on-finished": "^2.3.0",
+ "only": "~0.0.2",
+ "parseurl": "^1.3.2",
+ "statuses": "^1.5.0",
+ "type-is": "^1.6.16",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4"
+ }
+ },
+ "node_modules/koa-compose": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
+ "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw=="
+ },
+ "node_modules/koa-convert": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz",
+ "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==",
+ "dependencies": {
+ "co": "^4.6.0",
+ "koa-compose": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/koa-etag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/koa-etag/-/koa-etag-4.0.0.tgz",
+ "integrity": "sha512-1cSdezCkBWlyuB9l6c/IFoe1ANCDdPBxkDkRiaIup40xpUub6U/wwRXoKBZw/O5BifX9OlqAjYnDyzM6+l+TAg==",
+ "dependencies": {
+ "etag": "^1.8.1"
+ }
+ },
+ "node_modules/koa-send": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz",
+ "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "http-errors": "^1.7.3",
+ "resolve-path": "^1.4.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/koa-static": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz",
+ "integrity": "sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==",
+ "dependencies": {
+ "debug": "^3.1.0",
+ "koa-send": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 7.6.0"
+ }
+ },
+ "node_modules/koa-static/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/lit-element": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.2.tgz",
+ "integrity": "sha512-/W6WQZUa5VEXwC7H9tbtDMdSs9aWil3Ou8hU6z2cOKWbsm/tXPAcsoaHVEtrDo0zcOIE5GF6QgU55tlGL2Nihg==",
+ "dev": true,
+ "dependencies": {
+ "@lit-labs/ssr-dom-shim": "^1.1.2",
+ "@lit/reactive-element": "^2.0.0",
+ "lit-html": "^3.1.0"
+ }
+ },
+ "node_modules/lit-html": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.0.tgz",
+ "integrity": "sha512-FwAjq3iNsaO6SOZXEIpeROlJLUlrbyMkn4iuv4f4u1H40Jw8wkeR/OUXZUHUoiYabGk8Y4Y0F/rgq+R4MrOLmA==",
+ "dev": true,
+ "dependencies": {
+ "@types/trusted-types": "^2.0.2"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/log-symbols": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/loupe": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
+ "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
+ "dev": true,
+ "dependencies": {
+ "get-func-name": "^2.0.1"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz",
+ "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==",
+ "engines": {
+ "node": ">=16.14"
+ }
+ },
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
+ "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/mocha": {
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
+ "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
+ "dev": true,
+ "dependencies": {
+ "ansi-colors": "4.1.1",
+ "browser-stdout": "1.3.1",
+ "chokidar": "3.5.3",
+ "debug": "4.3.4",
+ "diff": "5.0.0",
+ "escape-string-regexp": "4.0.0",
+ "find-up": "5.0.0",
+ "glob": "7.2.0",
+ "he": "1.2.0",
+ "js-yaml": "4.1.0",
+ "log-symbols": "4.1.0",
+ "minimatch": "5.0.1",
+ "ms": "2.1.3",
+ "nanoid": "3.3.3",
+ "serialize-javascript": "6.0.0",
+ "strip-json-comments": "3.1.1",
+ "supports-color": "8.1.1",
+ "workerpool": "6.2.1",
+ "yargs": "16.2.0",
+ "yargs-parser": "20.2.4",
+ "yargs-unparser": "2.0.0"
+ },
+ "bin": {
+ "_mocha": "bin/_mocha",
+ "mocha": "bin/mocha.js"
+ },
+ "engines": {
+ "node": ">= 14.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mochajs"
+ }
+ },
+ "node_modules/mocha/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/nanocolors": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz",
+ "integrity": "sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==",
+ "dev": true
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
+ "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
+ "dev": true,
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "dev": true,
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/node-fetch/node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "dev": true
+ },
+ "node_modules/node-fetch/node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "dev": true
+ },
+ "node_modules/node-fetch/node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "dev": true,
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/only": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz",
+ "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ=="
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parse5": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
+ "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "node_modules/pathval": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/portfinder": {
+ "version": "1.0.32",
+ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
+ "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
+ "dev": true,
+ "dependencies": {
+ "async": "^2.6.4",
+ "debug": "^3.2.7",
+ "mkdirp": "^0.5.6"
+ },
+ "engines": {
+ "node": ">= 0.12.0"
+ }
+ },
+ "node_modules/portfinder/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/preact": {
+ "version": "10.19.3",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.3.tgz",
+ "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==",
+ "dev": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/preact"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-path": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz",
+ "integrity": "sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==",
+ "dependencies": {
+ "http-errors": "~1.6.2",
+ "path-is-absolute": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/resolve-path/node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/resolve-path/node_modules/http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==",
+ "dependencies": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/resolve-path/node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
+ },
+ "node_modules/resolve-path/node_modules/setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
+ },
+ "node_modules/rollup": {
+ "version": "4.9.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.4.tgz",
+ "integrity": "sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "1.0.5"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.9.4",
+ "@rollup/rollup-android-arm64": "4.9.4",
+ "@rollup/rollup-darwin-arm64": "4.9.4",
+ "@rollup/rollup-darwin-x64": "4.9.4",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.9.4",
+ "@rollup/rollup-linux-arm64-gnu": "4.9.4",
+ "@rollup/rollup-linux-arm64-musl": "4.9.4",
+ "@rollup/rollup-linux-riscv64-gnu": "4.9.4",
+ "@rollup/rollup-linux-x64-gnu": "4.9.4",
+ "@rollup/rollup-linux-x64-musl": "4.9.4",
+ "@rollup/rollup-win32-arm64-msvc": "4.9.4",
+ "@rollup/rollup-win32-ia32-msvc": "4.9.4",
+ "@rollup/rollup-win32-x64-msvc": "4.9.4",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/serialize-javascript": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
+ "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ },
+ "node_modules/statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/ts-node": {
+ "version": "10.9.2",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+ "dev": true,
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node/node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/tsscmp": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz",
+ "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==",
+ "engines": {
+ "node": ">=0.6.x"
+ }
+ },
+ "node_modules/type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+ "dev": true,
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/ua-parser-js": {
+ "version": "1.0.37",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz",
+ "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ua-parser-js"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/faisalman"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/faisalman"
+ }
+ ],
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+ },
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "dev": true,
+ "dependencies": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/workerpool": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
+ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
+ "dev": true
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/ws": {
+ "version": "7.5.9",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
+ "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yargs": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^7.0.2",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.0",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^20.2.2"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "20.2.4",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
+ "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yargs-unparser": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
+ "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
+ "dev": true,
+ "dependencies": {
+ "camelcase": "^6.0.0",
+ "decamelize": "^4.0.0",
+ "flat": "^5.0.2",
+ "is-plain-obj": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/ylru": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.3.2.tgz",
+ "integrity": "sha512-RXRJzMiK6U2ye0BlGGZnmpwJDPgakn6aNQ0A7gHRbD4I0uvK4TW6UqkK1V0pp9jskjJBAXd3dRrbzWkqJ+6cxA==",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..c001a6c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "@web/dev-server-esbuild",
+ "version": "1.0.1",
+ "publishConfig": {
+ "access": "public"
+ },
+ "description": "Plugin for using esbuild in @web/dev-server",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/modernweb-dev/web.git",
+ "directory": "packages/dev-server-esbuild"
+ },
+ "author": "modern-web",
+ "homepage": "https://github.com/modernweb-dev/web/tree/master/packages/dev-server-esbuild",
+ "main": "dist/index.js",
+ "exports": {
+ ".": {
+ "types": "./index.d.ts",
+ "import": "./index.mjs",
+ "require": "./dist/index.js"
+ }
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "scripts": {
+ "build": "tsc",
+ "start:demo:jsx": "es-dev-server --config demo/jsx/server.config.js",
+ "start:demo:ts": "es-dev-server --config demo/ts/server.config.js",
+ "test": "mocha \"test/**/*.test.ts\" --require ts-node/register --reporter dot",
+ "test:watch": "mocha \"test/**/*.test.ts\" --require ts-node/register --watch --watch-files src,test"
+ },
+ "files": [
+ "*.d.ts",
+ "*.js",
+ "*.mjs",
+ "dist",
+ "src"
+ ],
+ "keywords": [
+ "web",
+ "dev",
+ "server",
+ "test",
+ "runner",
+ "testrunner",
+ "typescript",
+ "jsx",
+ "compile",
+ "transform"
+ ],
+ "dependencies": {
+ "@mdn/browser-compat-data": "^4.0.0",
+ "@web/dev-server-core": "^0.7.0",
+ "esbuild": "^0.19.5",
+ "parse5": "^6.0.1",
+ "ua-parser-js": "^1.0.33"
+ },
+ "devDependencies": {
+ "@types/chai": "^4.3.11",
+ "@types/mocha": "^10.0.6",
+ "@types/ua-parser-js": "^0.7.35",
+ "@web/dev-server-rollup": "^0.6.1",
+ "chai": "^4.4.0",
+ "lit-element": "^3.0.0 || ^4.0.1",
+ "mocha": "^10.2.0",
+ "node-fetch": "^2.7.0",
+ "portfinder": "^1.0.32",
+ "preact": "^10.5.9",
+ "ts-node": "^10.9.2"
+ }
+}
diff --git a/src/EsbuildPlugin.ts b/src/EsbuildPlugin.ts
new file mode 100644
index 0000000..5143101
--- /dev/null
+++ b/src/EsbuildPlugin.ts
@@ -0,0 +1,225 @@
+import {
+ Context,
+ Plugin,
+ PluginSyntaxError,
+ Logger,
+ DevServerCoreConfig,
+ getRequestFilePath,
+} from '@web/dev-server-core';
+import type { TransformOptions, BuildFailure } from 'esbuild';
+import { Loader, Message, transform } from 'esbuild';
+import { promisify } from 'util';
+import path from 'path';
+import fs from 'fs';
+import {
+ queryAll,
+ predicates,
+ getTextContent,
+ setTextContent,
+} from '@web/dev-server-core/dist/dom5';
+import { parse as parseHtml, serialize as serializeHtml } from 'parse5';
+
+import { getEsbuildTarget } from './getEsbuildTarget.js';
+
+const filteredWarnings = ['Unsupported source map comment'];
+
+async function fileExists(path: string) {
+ try {
+ await promisify(fs.access)(path);
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+export interface EsbuildConfig {
+ loaders: Record;
+ target: string | string[];
+ handledExtensions: string[];
+ tsFileExtensions: string[];
+ jsxFactory?: string;
+ jsxFragment?: string;
+ define?: { [key: string]: string };
+ tsconfig?: string;
+ banner?: string;
+ footer?: string;
+}
+
+export class EsbuildPlugin implements Plugin {
+ private config?: DevServerCoreConfig;
+ private esbuildConfig: EsbuildConfig;
+ private logger?: Logger;
+ private transformedHtmlFiles: string[] = [];
+ private tsconfigRaw?: string;
+ name = 'esbuild';
+
+ constructor(esbuildConfig: EsbuildConfig) {
+ this.esbuildConfig = esbuildConfig;
+ }
+
+ async serverStart({ config, logger }: { config: DevServerCoreConfig; logger: Logger }) {
+ this.config = config;
+ this.logger = logger;
+ if (this.esbuildConfig.tsconfig) {
+ this.tsconfigRaw = await promisify(fs.readFile)(this.esbuildConfig.tsconfig, 'utf8');
+ }
+ }
+
+ resolveMimeType(context: Context) {
+ const fileExtension = path.posix.extname(context.path);
+ if (this.esbuildConfig.handledExtensions.includes(fileExtension)) {
+ return 'js';
+ }
+ }
+
+ async resolveImport({ source, context }: { source: string; context: Context }) {
+ const fileExtension = path.posix.extname(context.path);
+ if (!this.esbuildConfig.tsFileExtensions.includes(fileExtension)) {
+ // only handle typescript files
+ return;
+ }
+
+ if (!source.endsWith('.js') || !source.startsWith('.')) {
+ // only handle relative imports
+ return;
+ }
+
+ // a TS file imported a .js file relatively, but they might intend to import a .ts file instead
+ // check if the .ts file exists, and rewrite it in that case
+ const filePath = getRequestFilePath(context.url, this.config!.rootDir);
+ const fileDir = path.dirname(filePath);
+ const importAsTs = source.substring(0, source.length - 3) + '.ts';
+ const importedTsFilePath = path.join(fileDir, importAsTs);
+ if (!(await fileExists(importedTsFilePath))) {
+ return;
+ }
+ return importAsTs;
+ }
+
+ transformCacheKey(context: Context) {
+ // the transformed files are cached per esbuild transform target
+ const target = getEsbuildTarget(this.esbuildConfig.target, context.headers['user-agent']);
+ return Array.isArray(target) ? target.join('_') : target;
+ }
+
+ async transform(context: Context) {
+ let loader: Loader;
+
+ if (context.response.is('html')) {
+ // we are transforming inline scripts
+ loader = 'js';
+ } else {
+ const fileExtension = path.posix.extname(context.path);
+ loader = this.esbuildConfig.loaders[fileExtension];
+ }
+
+ if (!loader) {
+ // we are not handling this file
+ return;
+ }
+
+ const target = getEsbuildTarget(this.esbuildConfig.target, context.headers['user-agent']);
+ if (target === 'esnext' && loader === 'js') {
+ // no need run esbuild, this happens when compile target is set to auto and the user is on a modern browser
+ return;
+ }
+
+ const filePath = getRequestFilePath(context.url, this.config!.rootDir);
+ if (context.response.is('html')) {
+ this.transformedHtmlFiles.push(context.path);
+ return this.__transformHtml(context, filePath, loader, target);
+ }
+
+ return this.__transformCode(context.body as string, filePath, loader, target);
+ }
+
+ private async __transformHtml(
+ context: Context,
+ filePath: string,
+ loader: Loader,
+ target: string | string[],
+ ) {
+ const documentAst = parseHtml(context.body as string);
+ const inlineScripts = queryAll(
+ documentAst,
+ predicates.AND(
+ predicates.hasTagName('script'),
+ predicates.NOT(predicates.hasAttr('src')),
+ predicates.OR(
+ predicates.NOT(predicates.hasAttr('type')),
+ predicates.hasAttrValue('type', 'module'),
+ ),
+ ),
+ );
+
+ if (inlineScripts.length === 0) {
+ return;
+ }
+
+ for (const node of inlineScripts) {
+ const code = getTextContent(node);
+ const transformedCode = await this.__transformCode(code, filePath, loader, target);
+ setTextContent(node, transformedCode);
+ }
+
+ return serializeHtml(documentAst);
+ }
+
+ private async __transformCode(
+ code: string,
+ filePath: string,
+ loader: Loader,
+ target: string | string[],
+ ): Promise {
+ try {
+ const transformOptions: TransformOptions = {
+ sourcefile: filePath,
+ sourcemap: 'inline',
+ loader,
+ target,
+ // don't set any format for JS-like formats, otherwise esbuild reformats the code unnecessarily
+ format: ['js', 'jsx', 'ts', 'tsx'].includes(loader) ? undefined : 'esm',
+ jsxFactory: this.esbuildConfig.jsxFactory,
+ jsxFragment: this.esbuildConfig.jsxFragment,
+ define: this.esbuildConfig.define,
+ tsconfigRaw: this.tsconfigRaw,
+ banner: this.esbuildConfig.banner,
+ footer: this.esbuildConfig.footer,
+ };
+
+ const { code: transformedCode, warnings } = await transform(code, transformOptions);
+
+ if (warnings) {
+ const relativePath = path.relative(process.cwd(), filePath);
+
+ for (const warning of warnings) {
+ if (!filteredWarnings.some(w => warning.text.includes(w))) {
+ this.logger!.warn(
+ `[@web/test-runner-esbuild] Warning while transforming ${relativePath}: ${warning.text}`,
+ );
+ }
+ }
+ }
+
+ return transformedCode;
+ } catch (e) {
+ if (Array.isArray((e as BuildFailure).errors)) {
+ const msg = (e as BuildFailure).errors[0] as Message;
+
+ if (msg.location) {
+ throw new PluginSyntaxError(
+ msg.text,
+ filePath,
+ code,
+ msg.location.line,
+ msg.location.column,
+ );
+ }
+
+ throw new Error(msg.text);
+ }
+
+ throw e;
+ }
+ }
+}
diff --git a/src/browser-targets.ts b/src/browser-targets.ts
new file mode 100644
index 0000000..67c9ffe
--- /dev/null
+++ b/src/browser-targets.ts
@@ -0,0 +1,87 @@
+import { browsers } from '@mdn/browser-compat-data';
+
+type Release = { status: string };
+export type Browser = { name: string; version: string };
+
+export const TARGET_LATEST_MODERN = createModernTarget();
+// earliest browser versions to support module scripts, dynamic imports and import.meta
+export const TARGET_LOWEST_ESM_SUPPORT = ['chrome64', 'edge79', 'firefox67', 'safari11.1'];
+
+function createModernTarget() {
+ try {
+ const latestChrome = getLatestStableMajor(browsers.chrome.releases);
+ if (!latestChrome) throw new Error('Could not find latest Chrome major version');
+
+ const latestEdge = getLatestStableMajor(browsers.edge.releases);
+ if (!latestEdge) throw new Error('Could not find latest Edge major version');
+
+ const latestSafari = getLatestStableMajor(browsers.safari.releases);
+ if (!latestSafari) throw new Error('Could not find latest Safari major version');
+
+ const latestFirefox = getLatestStableMajor(browsers.firefox.releases);
+ if (!latestFirefox) throw new Error('Could not find latest Firefox major version');
+
+ return [
+ `chrome${latestChrome - 1}`,
+ `edge${latestEdge - 1}`,
+ `safari${latestSafari}`,
+ `firefox${latestFirefox}`,
+ ];
+ } catch (error) {
+ throw new Error(
+ `Error while initializing default browser targets for @web/dev-server-esbuild: ${
+ (error as Error).message
+ }`,
+ );
+ }
+}
+
+function getMajorVersion(version: string | number) {
+ return Number(version.toString().split('.')[0]);
+}
+
+export function getLatestStableMajor(releases: Record): number | undefined {
+ const release = Object.entries(releases).find(([, release]) => release.status === 'current')?.[0];
+ if (release) {
+ return getMajorVersion(release);
+ }
+ return undefined;
+}
+
+function isWithinRange(releases: Record, version: string | number, range: number) {
+ const currentMajorVersion = getMajorVersion(version);
+ const latestMajorVersion = getLatestStableMajor(releases);
+ if (latestMajorVersion == null) {
+ return false;
+ }
+ return currentMajorVersion >= latestMajorVersion - range;
+}
+
+export function isLatestSafari({ name, version }: Browser) {
+ const nameLowerCase = name.toLowerCase();
+
+ // don't use include to avoid matching safari iOS
+ if (nameLowerCase === 'safari') {
+ return isWithinRange(browsers.safari.releases, version, 0);
+ }
+
+ return false;
+}
+
+export function isLatestModernBrowser({ name, version }: Browser) {
+ const nameLowerCase = name.toLowerCase();
+
+ if (['chrome', 'chromium'].some(name => nameLowerCase.includes(name))) {
+ return isWithinRange(browsers.chrome.releases, version, 1);
+ }
+
+ if (nameLowerCase.includes('edge')) {
+ return isWithinRange(browsers.edge.releases, version, 1);
+ }
+
+ if (nameLowerCase.includes('firefox')) {
+ return isWithinRange(browsers.firefox.releases, version, 0);
+ }
+
+ return false;
+}
diff --git a/src/esbuildPluginFactory.ts b/src/esbuildPluginFactory.ts
new file mode 100644
index 0000000..992a548
--- /dev/null
+++ b/src/esbuildPluginFactory.ts
@@ -0,0 +1,69 @@
+import { Plugin } from '@web/dev-server-core';
+import { Loader } from 'esbuild';
+import { EsbuildPlugin } from './EsbuildPlugin.js';
+
+export interface EsBuildPluginArgs {
+ target?: string | string[];
+ js?: boolean;
+ ts?: boolean;
+ json?: boolean;
+ jsx?: boolean;
+ tsx?: boolean;
+ jsxFactory?: string;
+ jsxFragment?: string;
+ loaders?: Record;
+ define?: { [key: string]: string };
+ tsconfig?: string;
+ banner?: string;
+ footer?: string;
+}
+
+export function esbuildPlugin(args: EsBuildPluginArgs = {}): Plugin {
+ const target = args.target ?? 'auto';
+ const loaders: Record = {};
+ for (const [key, value] of Object.entries(args.loaders ?? {})) {
+ loaders[key.startsWith('.') ? key : `.${key}`] = value;
+ }
+ if (args.ts) {
+ loaders['.ts'] = 'ts';
+ }
+ if (args.jsx) {
+ loaders['.jsx'] = 'jsx';
+ }
+ if (args.tsx) {
+ loaders['.tsx'] = 'tsx';
+ }
+ if (args.json) {
+ loaders['.json'] = 'json';
+ }
+ if (args.js) {
+ loaders['.js'] = 'js';
+ }
+ if (
+ !Object.prototype.hasOwnProperty.call(loaders, '.js') &&
+ (typeof args.target === 'string' || Array.isArray(args.target))
+ ) {
+ loaders['.js'] = 'js';
+ }
+
+ const handledExtensions = Object.keys(loaders);
+ const tsFileExtensions: string[] = [];
+ for (const [extension, loader] of Object.entries(loaders)) {
+ if (loader === 'ts' || loader === 'tsx') {
+ tsFileExtensions.push(extension);
+ }
+ }
+
+ return new EsbuildPlugin({
+ loaders,
+ target,
+ handledExtensions,
+ tsFileExtensions,
+ jsxFactory: args.jsxFactory,
+ jsxFragment: args.jsxFragment,
+ define: args.define,
+ tsconfig: args.tsconfig,
+ banner: args.banner,
+ footer: args.footer,
+ });
+}
diff --git a/src/getEsbuildTarget.ts b/src/getEsbuildTarget.ts
new file mode 100644
index 0000000..e06354a
--- /dev/null
+++ b/src/getEsbuildTarget.ts
@@ -0,0 +1,64 @@
+import { parseUserAgent } from './parseUserAgent.js';
+import {
+ TARGET_LATEST_MODERN,
+ TARGET_LOWEST_ESM_SUPPORT,
+ Browser,
+ isLatestModernBrowser,
+ isLatestSafari,
+} from './browser-targets.js';
+
+const cache = new Map();
+
+function getTargetForUserAgent(target: string, userAgent: string): string | string[] {
+ const browser = parseUserAgent(userAgent);
+ if (typeof browser.name === 'string' && typeof browser.version === 'string') {
+ if (target === 'auto') {
+ if (isLatestModernBrowser(browser as Browser)) {
+ // skip compiling on latest chrome/firefox/edge
+ return 'esnext';
+ }
+
+ if (isLatestSafari(browser as Browser)) {
+ // we don't skip safari, but we also don't want to compile to the lowest common denominator
+ return `safari${browser.version}`;
+ }
+ }
+
+ if (target === 'auto-always') {
+ if (isLatestModernBrowser(browser as Browser) || isLatestSafari(browser as Browser)) {
+ // compile to JS compatible with latest chrome/firefox/edge/safari
+ return TARGET_LATEST_MODERN;
+ }
+ }
+ }
+
+ // fall back to compiling to the lowest compatible with browsers that support es modules
+ return TARGET_LOWEST_ESM_SUPPORT;
+}
+
+export function getEsbuildTarget(
+ targets: string | string[],
+ userAgent?: string,
+): string | string[] {
+ const target =
+ typeof targets === 'string' ? targets : targets.length === 1 ? targets[0] : undefined;
+
+ if (!target || !['auto-always', 'auto'].includes(target)) {
+ // user has defined one or more targets that is not auto, so compile to this target directly
+ return targets;
+ }
+
+ if (userAgent == null) {
+ // user has auto but there is no user agent, fall back to the lowest compatible with browsers that support es modules
+ return TARGET_LOWEST_ESM_SUPPORT;
+ }
+
+ const cached = cache.get(userAgent);
+ if (cached != null) {
+ return cached;
+ }
+
+ const targetForUserAgent = getTargetForUserAgent(target, userAgent);
+ cache.set(userAgent, targetForUserAgent);
+ return targetForUserAgent;
+}
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..414f215
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1 @@
+export { esbuildPlugin } from './esbuildPluginFactory.js';
diff --git a/src/parseUserAgent.ts b/src/parseUserAgent.ts
new file mode 100644
index 0000000..44740c5
--- /dev/null
+++ b/src/parseUserAgent.ts
@@ -0,0 +1,10 @@
+import { UAParser } from 'ua-parser-js';
+
+export function parseUserAgent(userAgent: string) {
+ const parser = new UAParser(userAgent);
+ const browser = parser.getBrowser();
+ return {
+ name: browser.name,
+ version: browser.version != null ? String(browser.version) : undefined,
+ };
+}
diff --git a/test/banner-footer.test.ts b/test/banner-footer.test.ts
new file mode 100644
index 0000000..d808498
--- /dev/null
+++ b/test/banner-footer.test.ts
@@ -0,0 +1,69 @@
+import { expect } from 'chai';
+import { createTestServer } from '@web/dev-server-core/test-helpers';
+import { expectIncludes } from '@web/dev-server-core/test-helpers';
+
+import { esbuildPlugin } from '../src/index.js';
+
+describe('esbuildPlugin banner/footers', function () {
+ this.timeout(5000);
+
+ it('prepends custom banner', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.ts') {
+ return `export const foo = 5;`;
+ }
+ },
+ },
+ esbuildPlugin({ ts: true, banner: '/* hello there */' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.ts`);
+ const text = await response.text();
+
+ const indexOfExpr = text.indexOf('export const foo = 5;');
+ const indexOfBanner = text.indexOf('/* hello there */');
+
+ expectIncludes(text, '/* hello there */');
+ expect(indexOfExpr).to.be.greaterThan(indexOfBanner);
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('appends custom footer', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.ts') {
+ return `export const foo = 5;`;
+ }
+ },
+ },
+ esbuildPlugin({ ts: true, footer: '/* hello there */' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.ts`);
+ const text = await response.text();
+
+ const indexOfExpr = text.indexOf('export const foo = 5;');
+ const indexOfFooter = text.indexOf('/* hello there */');
+
+ expectIncludes(text, '/* hello there */');
+ expect(indexOfFooter).to.be.greaterThan(indexOfExpr);
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/test/browser-targets.test.ts b/test/browser-targets.test.ts
new file mode 100644
index 0000000..57ab9d8
--- /dev/null
+++ b/test/browser-targets.test.ts
@@ -0,0 +1,74 @@
+import { expect } from 'chai';
+import { browsers } from '@mdn/browser-compat-data';
+import { isLatestModernBrowser, getLatestStableMajor } from '../src/browser-targets.js';
+
+describe('isLatestModernBrowser', () => {
+ it('returns true for latest Chrome', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest) })).to.be.true;
+ });
+
+ it('returns true for latest Chrome -1', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest - 1) })).to.be.true;
+ });
+
+ it('returns true for future version of Chrome', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest + 1) })).to.be.true;
+ });
+
+ it('returns true for unknown version of Chrome', async () => {
+ expect(isLatestModernBrowser({ name: 'Chrome', version: '9999999' })).to.be.true;
+ });
+
+ it('returns false for latest Chrome -2', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest - 2) })).to.be.false;
+ });
+
+ it('returns false for latest Chrome -3', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest - 3) })).to.be.false;
+ });
+
+ it('returns true for latest Chrome Headless', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome Headless', version: String(latest) })).to.be.true;
+ });
+
+ it('returns true for latest chromium', async () => {
+ const latest = getLatestStableMajor(browsers.chrome.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chromium', version: String(latest) })).to.be.true;
+ });
+
+ it('returns true for latest Firefox', async () => {
+ const latest = getLatestStableMajor(browsers.firefox.releases)!;
+ expect(isLatestModernBrowser({ name: 'Firefox', version: String(latest) })).to.be.true;
+ });
+
+ it('returns false for latest Firefox -1', async () => {
+ const latest = getLatestStableMajor(browsers.firefox.releases)!;
+ expect(isLatestModernBrowser({ name: 'Firefox', version: String(latest - 1) })).to.be.false;
+ });
+
+ it('returns false for latest Firefox -2', async () => {
+ const latest = getLatestStableMajor(browsers.firefox.releases)!;
+ expect(isLatestModernBrowser({ name: 'Firefox', version: String(latest - 2) })).to.be.false;
+ });
+
+ it('returns true for latest Edge', async () => {
+ const latest = getLatestStableMajor(browsers.edge.releases)!;
+ expect(isLatestModernBrowser({ name: 'Edge', version: String(latest) })).to.be.true;
+ });
+
+ it('returns true for latest Edge -1', async () => {
+ const latest = getLatestStableMajor(browsers.edge.releases)!;
+ expect(isLatestModernBrowser({ name: 'Edge', version: String(latest - 1) })).to.be.true;
+ });
+
+ it('returns false for latest Edge -2', async () => {
+ const latest = getLatestStableMajor(browsers.edge.releases)!;
+ expect(isLatestModernBrowser({ name: 'Chrome', version: String(latest - 2) })).to.be.false;
+ });
+});
diff --git a/test/fixture/1.js b/test/fixture/1.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixture/a/2.js b/test/fixture/a/2.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixture/a/b/3.js b/test/fixture/a/b/3.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixture/a/b/bar.js b/test/fixture/a/b/bar.js
new file mode 100644
index 0000000..12802bf
--- /dev/null
+++ b/test/fixture/a/b/bar.js
@@ -0,0 +1,12 @@
+import 'some-lib/some-file.js';
+import '../../x.js';
+import '../y.js';
+import './z.js';
+
+import '../../1.js';
+import '../2.js';
+import './3.js';
+
+import '../../non-existing-a.js';
+import '../non-existing-b.js';
+import './non-existing-c.js';
diff --git a/test/fixture/a/b/foo.ts b/test/fixture/a/b/foo.ts
new file mode 100644
index 0000000..c517ce3
--- /dev/null
+++ b/test/fixture/a/b/foo.ts
@@ -0,0 +1,15 @@
+import 'some-lib/some-file.js';
+import '../../x.js';
+import '../y.js';
+import './z.js';
+
+import '../../1.js';
+import '../2.js';
+import './3.js';
+
+import '../../non-existing-a.js';
+import '../non-existing-b.js';
+import './non-existing-c.js';
+export class SomeClass {
+ prop: string;
+}
diff --git a/test/fixture/a/b/z.ts b/test/fixture/a/b/z.ts
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixture/a/y.ts b/test/fixture/a/y.ts
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixture/tsconfig-with-experimental-decorators.json b/test/fixture/tsconfig-with-experimental-decorators.json
new file mode 100644
index 0000000..504cd64
--- /dev/null
+++ b/test/fixture/tsconfig-with-experimental-decorators.json
@@ -0,0 +1,5 @@
+{
+ "compilerOptions": {
+ "experimentalDecorators": true
+ }
+}
diff --git a/test/fixture/tsconfig.json b/test/fixture/tsconfig.json
new file mode 100644
index 0000000..5056d09
--- /dev/null
+++ b/test/fixture/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "target": "es2022",
+ "useDefineForClassFields": true
+ }
+}
diff --git a/test/fixture/x.ts b/test/fixture/x.ts
new file mode 100644
index 0000000..e69de29
diff --git a/test/json.test.ts b/test/json.test.ts
new file mode 100644
index 0000000..0d98282
--- /dev/null
+++ b/test/json.test.ts
@@ -0,0 +1,41 @@
+import { expect } from 'chai';
+import { expectIncludes, createTestServer } from '@web/dev-server-core/test-helpers';
+
+import { esbuildPlugin } from '../src/index.js';
+
+describe('esbuildPlugin JSON', function () {
+ it('transforms .json files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.json') {
+ return '{ "foo": "bar" }';
+ }
+ },
+ },
+ esbuildPlugin({ json: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.json`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'var foo = "bar";');
+ expectIncludes(text, 'var foo_default = { foo };');
+ expectIncludes(text, 'export {');
+ expectIncludes(text, 'foo_default as default');
+ expectIncludes(text, 'foo');
+ expectIncludes(text, '}');
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/test/jsx.test.ts b/test/jsx.test.ts
new file mode 100644
index 0000000..8f94ba4
--- /dev/null
+++ b/test/jsx.test.ts
@@ -0,0 +1,80 @@
+import { expect } from 'chai';
+import { expectIncludes, createTestServer } from '@web/dev-server-core/test-helpers';
+
+import { esbuildPlugin } from '../src/index.js';
+
+describe('esbuildPlugin JSX', function () {
+ it('transforms .jsx files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.jsx') {
+ return `
+export function foo(bar) {
+ return
+}
+ `;
+ }
+ },
+ },
+ esbuildPlugin({ jsx: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.jsx`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'React.createElement("div", {');
+ expectIncludes(text, 'id: "myDiv"');
+ expectIncludes(text, 'React.createElement(MyElement, {');
+ expectIncludes(text, 'foo: bar');
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can set the JSX factory', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.jsx') {
+ return `
+export function foo(bar) {
+ return
+}
+ `;
+ }
+ },
+ },
+ esbuildPlugin({ jsx: true, jsxFactory: 'h', jsxFragment: 'Fragment' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.jsx`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'h("div", {');
+ expectIncludes(text, 'id: "myDiv"');
+ expectIncludes(text, 'h(MyElement, {');
+ expectIncludes(text, 'foo: bar');
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/test/target.test.ts b/test/target.test.ts
new file mode 100644
index 0000000..d2e9ffb
--- /dev/null
+++ b/test/target.test.ts
@@ -0,0 +1,387 @@
+import { expect } from 'chai';
+import { createTestServer, expectIncludes } from '@web/dev-server-core/test-helpers';
+
+import { esbuildPlugin } from '../src/index.js';
+
+const modernJs = `
+class MyClass {
+ static myStaticField = 'foo';
+ #myPrivateField = 'bar';
+ myField = 'x';
+}
+
+const myClass = new MyClass();
+
+const optionalChaining = window.bar?.foo;
+
+try {
+ // do something
+} catch {
+ // catch it
+}
+
+const spread = {
+ ...foo,
+ ...bar
+};
+
+async function myFunction() {
+ await foo;
+ await bar;
+}
+`;
+
+const syntax = {
+ classes: 'class MyClass {',
+ classFields: ["static myStaticField = 'foo';", "#myPrivateField = 'bar';", "myField = 'x';"],
+ optionalChaining: 'const optionalChaining = window.bar?.foo;',
+ optionalCatch: '} catch {',
+ objectSpread: ['...foo,', '...bar'],
+ asyncFunctions: ['async function myFunction() {', 'await foo;', 'await bar;'],
+};
+
+const transformedSyntax = {
+ classFields: [
+ 'var __publicField =',
+ '__privateAdd(this, _myPrivateField, "bar");',
+ '__publicField(this, "myField", "x");',
+ '__publicField(MyClass, "myStaticField", "foo");',
+ ],
+ optionalChaining: 'const optionalChaining = (_a = window.bar) == null ? void 0 : _a.foo;',
+ optionalCatch: '} catch (e) {',
+ objectSpread: 'const spread = __spreadValues(__spreadValues({}, foo), bar)',
+ asyncFunctions: [
+ 'var __async = (__this, __arguments, generator) => {',
+ 'return __async(this, null, function* () {',
+ 'yield foo;',
+ 'yield bar;',
+ ],
+};
+
+describe('esbuildPlugin target', function () {
+ it('does not transform anything when set to esnext', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ target: 'esnext' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of syntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, syntax.optionalChaining);
+ expectIncludes(text, syntax.optionalCatch);
+ for (const e of syntax.objectSpread) {
+ expectIncludes(text, e);
+ }
+ for (const e of syntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform to es2020', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2020' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, syntax.optionalChaining);
+ expectIncludes(text, syntax.optionalCatch);
+ for (const e of syntax.objectSpread) {
+ expectIncludes(text, e);
+ }
+ for (const e of syntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform to es2019', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2019' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, transformedSyntax.optionalChaining);
+ expectIncludes(text, syntax.optionalCatch);
+ for (const e of syntax.objectSpread) {
+ expectIncludes(text, e);
+ }
+ for (const e of syntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform to es2018', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2018' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, transformedSyntax.optionalChaining);
+ expectIncludes(text, transformedSyntax.optionalCatch);
+ for (const e of syntax.objectSpread) {
+ expectIncludes(text, e);
+ }
+ for (const e of syntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform to es2017', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2017' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, transformedSyntax.optionalChaining);
+ expectIncludes(text, transformedSyntax.optionalCatch);
+ expectIncludes(text, transformedSyntax.objectSpread);
+ for (const e of syntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform to es2016', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.js') {
+ return modernJs;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2016' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, transformedSyntax.optionalChaining);
+ expectIncludes(text, transformedSyntax.optionalCatch);
+ expectIncludes(text, transformedSyntax.objectSpread);
+ for (const e of transformedSyntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can transform inline scripts', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/index.html') {
+ return `
+
+
+
+`;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2016' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/index.html`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal('text/html; charset=utf-8');
+
+ expectIncludes(text, syntax.classes);
+ for (const e of transformedSyntax.classFields) {
+ expectIncludes(text, e);
+ }
+ expectIncludes(text, transformedSyntax.optionalChaining);
+ expectIncludes(text, transformedSyntax.optionalCatch);
+ expectIncludes(text, transformedSyntax.objectSpread);
+ for (const e of transformedSyntax.asyncFunctions) {
+ expectIncludes(text, e);
+ }
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('should leave non-js types as they are', async () => {
+ const importmapString = '{"imports":{"foo":"./bar.js"}}';
+ const jsonString = '{test:1}';
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/index.html') {
+ return `
+
+
+
+
+`;
+ }
+ },
+ },
+ esbuildPlugin({ js: true, target: 'es2016' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/index.html`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal('text/html; charset=utf-8');
+ expect(text).to.include(importmapString);
+ expect(text).to.include(jsonString);
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/test/ts.test.ts b/test/ts.test.ts
new file mode 100644
index 0000000..ce2ec02
--- /dev/null
+++ b/test/ts.test.ts
@@ -0,0 +1,274 @@
+import path from 'path';
+import { expect } from 'chai';
+import { createTestServer } from '@web/dev-server-core/test-helpers';
+import { expectIncludes, expectNotIncludes } from '@web/dev-server-core/test-helpers';
+import { Plugin as RollupPlugin } from 'rollup';
+import { fromRollup } from '@web/dev-server-rollup';
+
+import { esbuildPlugin } from '../src/index.js';
+
+describe('esbuildPlugin TS', function () {
+ this.timeout(5000);
+
+ it('transforms .ts files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.ts') {
+ return `
+ interface MyInterface {
+ id: number;
+ name: string;
+ }
+
+ type Foo = number;
+
+ export function foo (a: number, b: number): Foo {
+ return a + b
+ }`;
+ }
+ },
+ },
+ esbuildPlugin({ ts: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.ts`);
+ const text = await response.text();
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'export function foo(a, b) {');
+ expectIncludes(text, 'return a + b;');
+ expectIncludes(text, '}');
+ expectNotIncludes(text, 'type Foo');
+ expectNotIncludes(text, 'interface MyInterface');
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('transforms TS decorators', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.ts') {
+ return `
+@foo
+class Bar {
+ @prop
+ x = 'y';
+}`;
+ }
+ },
+ },
+ esbuildPlugin({
+ ts: true,
+ tsconfig: path.join(__dirname, 'fixture', 'tsconfig-with-experimental-decorators.json'),
+ }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.ts`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, '__decorate');
+ expectIncludes(text, '__publicField(this, "x", "y");');
+ expectIncludes(
+ text,
+ `__decorateClass([
+ prop
+], Bar.prototype, "x", 2);`,
+ );
+ expectIncludes(
+ text,
+ `Bar = __decorateClass([
+ foo
+], Bar);`,
+ );
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('resolves relative ending with .js to .ts files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: path.join(__dirname, 'fixture'),
+ plugins: [
+ {
+ name: 'test',
+ },
+ esbuildPlugin({ ts: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/a/b/foo.ts`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'import "../../x.ts";');
+ expectIncludes(text, 'import "../y.ts";');
+ expectIncludes(text, 'import "./z.ts";');
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('does not change imports where the TS file does not exist', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: path.join(__dirname, 'fixture'),
+ plugins: [
+ {
+ name: 'test',
+ },
+ esbuildPlugin({ ts: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/a/b/foo.ts`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'import "../../1.js";');
+ expectIncludes(text, 'import "../2.js";');
+ expectIncludes(text, 'import "./3.js";');
+
+ expectIncludes(text, 'import "../../non-existing-a.js";');
+ expectIncludes(text, 'import "../non-existing-b.js";');
+ expectIncludes(text, 'import "./non-existing-c.js";');
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('does not change imports when ts transform is not enabled', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: path.join(__dirname, 'fixture'),
+ plugins: [
+ {
+ name: 'test',
+ },
+ esbuildPlugin({}),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/a/b/foo.ts`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expectIncludes(text, "import '../../x.js';");
+ expectIncludes(text, "import '../y.js';");
+ expectIncludes(text, "import './z.js';");
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('does not change imports in non-TS files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: path.join(__dirname, 'fixture'),
+ plugins: [
+ {
+ name: 'test',
+ },
+ esbuildPlugin({ ts: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/a/b/bar.js`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expectIncludes(text, "import '../../x.js';");
+ expectIncludes(text, "import '../y.js';");
+ expectIncludes(text, "import './z.js';");
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('imports with a null byte are rewritten to a special URL', async () => {
+ const plugin: RollupPlugin = {
+ name: 'my-plugin',
+ load(id) {
+ if (id === path.join(__dirname, 'app.js')) {
+ return 'import "\0foo.js";';
+ }
+ },
+ resolveId(id) {
+ if (id === '\0foo.js') {
+ return id;
+ }
+ },
+ };
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ fromRollup(() => plugin)(),
+ esbuildPlugin({
+ js: true,
+ }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/app.js`);
+ const text = await response.text();
+ expectIncludes(
+ text,
+ 'import "/__web-dev-server__/rollup/foo.js?web-dev-server-rollup-null-byte=%00foo.js"',
+ );
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('reads tsconfig.json file', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: path.join(__dirname, 'fixture'),
+ plugins: [
+ {
+ name: 'test',
+ },
+ esbuildPlugin({ ts: true, tsconfig: path.join(__dirname, 'fixture', 'tsconfig.json') }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/a/b/foo.ts`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+
+ expectIncludes(text, '__publicField(this, "prop");');
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/test/tsx.test.ts b/test/tsx.test.ts
new file mode 100644
index 0000000..595e5e3
--- /dev/null
+++ b/test/tsx.test.ts
@@ -0,0 +1,101 @@
+import { expect } from 'chai';
+import { createTestServer } from '@web/dev-server-core/test-helpers';
+import { expectIncludes, expectNotIncludes } from '@web/dev-server-core/test-helpers';
+
+import { esbuildPlugin } from '../src/index.js';
+
+describe('esbuildPlugin TSX', function () {
+ this.timeout(5000);
+
+ it('transforms .tsx files', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.tsx') {
+ return `
+interface MyInterface {
+ id: number;
+ name: string;
+}
+
+type Foo = number;
+
+export function foo (a: number, b: number): Foo {
+ return
+}`;
+ }
+ },
+ },
+ esbuildPlugin({ tsx: true }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.tsx`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'React.createElement("div", {');
+ expectIncludes(text, 'id: "myDiv"');
+ expectIncludes(text, 'React.createElement(MyElement, {');
+ expectIncludes(text, 'foo: bar');
+ expectIncludes(text, 'export function foo(a, b) {');
+ expectNotIncludes(text, 'type Foo');
+ expectNotIncludes(text, 'interface MyInterface');
+ } finally {
+ server.stop();
+ }
+ });
+
+ it('can set the JSX factory', async () => {
+ const { server, host } = await createTestServer({
+ rootDir: __dirname,
+ plugins: [
+ {
+ name: 'test',
+ serve(context) {
+ if (context.path === '/foo.tsx') {
+ return `
+interface MyInterface {
+ id: number;
+ name: string;
+}
+
+type Foo = number;
+
+export function foo (a: number, b: number): Foo {
+ return
+}`;
+ }
+ },
+ },
+ esbuildPlugin({ tsx: true, jsxFactory: 'h', jsxFragment: 'Fragment' }),
+ ],
+ });
+
+ try {
+ const response = await fetch(`${host}/foo.tsx`);
+ const text = await response.text();
+
+ expect(response.status).to.equal(200);
+ expect(response.headers.get('content-type')).to.equal(
+ 'application/javascript; charset=utf-8',
+ );
+ expectIncludes(text, 'h("div", {');
+ expectIncludes(text, 'id: "myDiv"');
+ expectIncludes(text, 'h(MyElement, {');
+ expectIncludes(text, 'foo: bar');
+ expectIncludes(text, 'export function foo(a, b) {');
+ expectNotIncludes(text, 'type Foo');
+ expectNotIncludes(text, 'interface MyInterface');
+ } finally {
+ server.stop();
+ }
+ });
+});
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..1f5036f
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,35 @@
+{
+ "ts-node": {
+ "experimentalResolver": true
+ },
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "./dist",
+ "rootDir": "./src",
+ "composite": true,
+ "allowJs": true,
+ "target": "ES2017",
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true,
+ "downlevelIteration": true,
+ "strict": true,
+ "moduleResolution": "node",
+ "types": ["node", "mocha", "chai"],
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "lib": [
+ "DOM",
+ "DOM.Iterable",
+ "ES6",
+ "ES2017",
+ // Allows array.flatMap. import `array-flat-polyfill` to cover node10
+ "ES2019.array",
+ "ScriptHost"
+ ]
+ },
+ "include": ["src", "types"],
+ "exclude": ["src/browser", "tests", "dist"]
+}