diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0cf9a9e95..ced30021a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,21 @@ on: push: jobs: + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + - name: npm install + run: npm ci + - name: Check import file extensions + run: npm run lint:ext + unit-tests: runs-on: buildjet-2vcpu-ubuntu-2004 strategy: @@ -345,3 +360,112 @@ jobs: # run: cd packages/benchmark && sh setup.sh # - name: Benchmark run # run: cd packages/benchmark && npm run benchmark + + platform-browser: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + - name: Install NPM dependencies + run: npm ci + - name: Bootstrap + run: npm run bootstrap:ci -- --scope @deepkit/platform + # - name: Link + # run: npm run link + # - name: Install compiler + # run: npm run install-compiler + - name: Build Platform + run: npm run lerna -- build --scope="@deepkit/platform" + - name: Test + run: npm run lerna -- test:browser --scope="@deepkit/platform" + + platform-deno: + strategy: + matrix: + node-version: [ 16.x] + deno-version: [ vx.x.x ] + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Setup Deno + uses: denolib/setup-deno@v2 + with: + deno-version: ${{ matrix.deno-version }} + - name: Install NPM dependencies + run: npm ci + - name: Bootstrap + run: npm run bootstrap:ci -- --scope @deepkit/platform + # - name: Link + # run: npm run link + # - name: Install compiler + # run: npm run install-compiler + - name: Build Platform + run: npm run lerna -- build --scope="@deepkit/platform" + - name: Test + run: npm run lerna -- test:deno --scope="@deepkit/platform" + + platform-gjs: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + - name: Install GJS + run: sudo apt-get --yes install gjs + - name: Install NPM dependencies + run: npm ci + - name: Bootstrap + run: npm run bootstrap:ci -- --scope @deepkit/platform + # - name: Link + # run: npm run link + # - name: Install compiler + # run: npm run install-compiler + - name: Build Platform + run: npm run lerna -- build --scope="@deepkit/platform" + - name: Test + run: npm run lerna -- test:gjs --scope="@deepkit/platform" + + platform-node: + strategy: + matrix: + node-version: [ 16.x ] + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install NPM dependencies + run: npm ci + - name: Bootstrap + run: npm run bootstrap:ci -- --scope @deepkit/platform + # - name: Link + # run: npm run link + # - name: Install compiler + # run: npm run install-compiler + - name: Build Platform + run: npm run lerna -- build --scope="@deepkit/platform" + - name: Test + run: npm run lerna -- test:node --scope="@deepkit/platform" diff --git a/.gitignore b/.gitignore index 7126bb796..1b2aa3459 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ coverage packages/node packages/network packages/*/dist/* +!packages/*/dist/esm/ +packages/*/dist/esm/* !packages/*/dist/esm/package.json !packages/*/dist/.gitkeep packages/benchmark/src/orm/end-to-end/sqlite/prisma.sqlite @@ -13,3 +15,4 @@ packages/benchmark/results packages/example-app/var/debug packages/example-app/migrations .vs +packages/platform/test/browser/base.test.js \ No newline at end of file diff --git a/lint-file-extension.cjs b/lint-file-extension.cjs new file mode 100644 index 000000000..b04d5d23e --- /dev/null +++ b/lint-file-extension.cjs @@ -0,0 +1,74 @@ +const path = require('path'); +const fs = require('fs/promises'); + +const search = async (dir, regex, ext, exclude) => { + const files = await getFiles(dir, ext, exclude); + const result = []; + + for (file of files) { + const content = await fs.readFile(file, 'utf8'); + + if (regex.test(content)) { + result.push(file); + } + }; + + return result; +} + +/** + * + * @param {string} dir + * @param {string} ext + * @param {string[]} excludes + * @returns + */ +const getFiles = async (dir, ext, excludes) => { + let files = []; + + if(excludes.find(exclude => dir.includes(exclude))) { + console.debug("exclude", dir) + return files; + } + + const stat = await fs.lstat(dir); + if (!stat.isDirectory()) { + return files; + } + + const dirFiles = await fs.readdir(dir); + + for (let file of dirFiles) { + const filePath = path.join(dir, file); + + if(excludes.find(exclude => filePath.includes(exclude))) { + continue + } + + const stat = await fs.lstat(filePath); + + if (stat.isDirectory()) { + const nestedFiles = await getFiles(filePath, ext, excludes); + files = files.concat(nestedFiles); + } else if (stat.isFile()) { + if (path.extname(file) === ext) { + files.push(filePath); + } + } + }; + + return files; +} + +search('./packages', /(import|from) ("|')\..*(? { + if(files.length) { + console.error(`Imports without file extension found!`); + console.error('\t' + files.join('\n\t')); + process.exit(1); + } + console.info("All imports are looking good :)"); + process.exit(0); + +}).catch((error) => { + console.error(error); +}) diff --git a/package-lock.json b/package-lock.json index c6753c3fc..619e5eb78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10178,6 +10178,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", + "deprecated": "The functionality that this package provided is now in @npmcli/arborist", "dev": true, "dependencies": { "read-package-json": "^2.0.0", @@ -11676,6 +11677,15 @@ "node": ">=0.4.0" } }, + "node_modules/ts-node/node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tsconfig": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", diff --git a/package.json b/package.json index e9cdf2c0c..b185a822c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "private": true, "scripts": { "test": "node --max_old_space_size=3048 node_modules/jest/bin/jest.js --forceExit --no-cache", + "lerna": "lerna run", "test:coverage": "node --max_old_space_size=3048 node_modules/jest/bin/jest.js --coverage --forceExit --no-cache", "bootstrap": "lerna bootstrap --no-ci", "bootstrap:ci": "lerna bootstrap --ignore @deepkit/benchmark", @@ -22,7 +23,8 @@ "docs": "rm -rf docs && node --max-old-space-size=12096 node_modules/.bin/typedoc packages/*/index.ts", "publish": "lerna publish --no-private prerelease", "publish-force": "npm run build && lerna publish --no-private --force-publish", - "publish-website": "heroku container:push web && heroku container:release web" + "publish-website": "heroku container:push web && heroku container:release web", + "lint:ext": "node lint-file-extension.cjs" }, "peerDependencies": {}, "devDependencies": { @@ -46,6 +48,9 @@ "node": ">= 14.0.0" }, "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "resolver": "./jest-resolver.js", "testPathIgnorePatterns": [ "packages/*/dist" diff --git a/packages/angular-universal/index.ts b/packages/angular-universal/index.ts index 24b9d7d28..a869a74d5 100644 --- a/packages/angular-universal/index.ts +++ b/packages/angular-universal/index.ts @@ -8,6 +8,6 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/listener'; -export * from './src/module'; +export * from './src/listener.js'; +export * from './src/module.js'; export { HttpResponse, HttpRequest } from '@deepkit/http'; diff --git a/packages/angular-universal/package-lock.json b/packages/angular-universal/package-lock.json index a7fe85292..717d29dc3 100644 --- a/packages/angular-universal/package-lock.json +++ b/packages/angular-universal/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/angular-universal", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.73", "license": "MIT", "dependencies": { "domino": "^2.0.0" diff --git a/packages/angular-universal/package.json b/packages/angular-universal/package.json index 4dbd52ef8..c57ba61a6 100644 --- a/packages/angular-universal/package.json +++ b/packages/angular-universal/package.json @@ -54,7 +54,10 @@ "@deepkit/type": "^1.0.1-alpha.75", "@types/node": "^14.0.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/angular-universal/src/listener.ts b/packages/angular-universal/src/listener.ts index b8fd0532e..2adc6baa4 100644 --- a/packages/angular-universal/src/listener.ts +++ b/packages/angular-universal/src/listener.ts @@ -11,11 +11,11 @@ import { HtmlResponse, httpWorkflow, RouteConfig } from '@deepkit/http'; import { eventDispatcher } from '@deepkit/event'; import { Logger } from '@deepkit/logger'; -import { Config } from './config'; +import { Config } from './config.js'; import { join } from 'path'; import { readFileSync } from 'fs'; import type { Router } from '@angular/router'; -import { AngularUniversalModule } from './module'; +import { AngularUniversalModule } from './module.js'; export class AngularUniversalListener { protected serverModule: any; diff --git a/packages/angular-universal/src/module.ts b/packages/angular-universal/src/module.ts index f4a483893..87344e6c3 100644 --- a/packages/angular-universal/src/module.ts +++ b/packages/angular-universal/src/module.ts @@ -9,8 +9,8 @@ */ import { createModule } from '@deepkit/app'; -import { AngularUniversalListener } from './listener'; -import { Config } from './config'; +import { AngularUniversalListener } from './listener.js'; +import { Config } from './config.js'; export class AngularUniversalModule extends createModule({ config: Config, diff --git a/packages/angular-universal/tsconfig.json b/packages/angular-universal/tsconfig.json index 704626ea9..03234916d 100644 --- a/packages/angular-universal/tsconfig.json +++ b/packages/angular-universal/tsconfig.json @@ -43,4 +43,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/api-console-api/index.ts b/packages/api-console-api/index.ts index 263171971..e06e47edc 100644 --- a/packages/api-console-api/index.ts +++ b/packages/api-console-api/index.ts @@ -8,4 +8,4 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/api'; +export * from './src/api.js'; diff --git a/packages/api-console-api/package.json b/packages/api-console-api/package.json index bb04dae21..2cdde123e 100644 --- a/packages/api-console-api/package.json +++ b/packages/api-console-api/package.json @@ -39,7 +39,10 @@ "@deepkit/rpc": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/api-console-api/tsconfig.esm.json b/packages/api-console-api/tsconfig.esm.json index a21c5b324..11538fa4f 100644 --- a/packages/api-console-api/tsconfig.esm.json +++ b/packages/api-console-api/tsconfig.esm.json @@ -5,6 +5,21 @@ "module": "ES2020" }, "references": [ + { + "path": "../bson/tsconfig.esm.json" + }, + { + "path": "../core/tsconfig.esm.json" + }, + { + "path": "../crypto/tsconfig.json" + }, + { + "path": "../injector/tsconfig.esm.json" + }, + { + "path": "../logger/tsconfig.esm.json" + }, { "path": "../rpc/tsconfig.esm.json" }, @@ -12,4 +27,4 @@ "path": "../type/tsconfig.esm.json" } ] -} +} \ No newline at end of file diff --git a/packages/api-console-api/tsconfig.json b/packages/api-console-api/tsconfig.json index 8bb23b330..cf99a45da 100644 --- a/packages/api-console-api/tsconfig.json +++ b/packages/api-console-api/tsconfig.json @@ -23,6 +23,21 @@ "src" ], "references": [ + { + "path": "../bson/tsconfig.json" + }, + { + "path": "../core/tsconfig.json" + }, + { + "path": "../crypto/tsconfig.json" + }, + { + "path": "../injector/tsconfig.json" + }, + { + "path": "../logger/tsconfig.json" + }, { "path": "../rpc/tsconfig.json" }, @@ -30,4 +45,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/api-console-gui/angular.json b/packages/api-console-gui/angular.json index 2921d8d28..c2b42fa5c 100644 --- a/packages/api-console-gui/angular.json +++ b/packages/api-console-gui/angular.json @@ -42,8 +42,11 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:browser", + "builder": "@angular-builders/custom-webpack:browser", "options": { + "customWebpackConfig": { + "path": "./extra-webpack.config.js" + }, "outputPath": "dist/api-console-gui", "index": "src/index.html", "preserveSymlinks": true, diff --git a/packages/api-console-gui/extra-webpack.config.js b/packages/api-console-gui/extra-webpack.config.js new file mode 100644 index 000000000..d9f42873a --- /dev/null +++ b/packages/api-console-gui/extra-webpack.config.js @@ -0,0 +1,9 @@ +const ResolveTypeScriptPlugin = require("resolve-typescript-plugin"); + +module.exports = { + resolve: { + plugins: [new ResolveTypeScriptPlugin({ + includeNodeModules: true + })] + } +} diff --git a/packages/api-console-gui/index.ts b/packages/api-console-gui/index.ts index 58ea86e98..7f349a004 100644 --- a/packages/api-console-gui/index.ts +++ b/packages/api-console-gui/index.ts @@ -1 +1 @@ -export * from './src/app/api-console.module'; +export * from './src/app/api-console.module.js'; diff --git a/packages/api-console-gui/package.json b/packages/api-console-gui/package.json index 0d3e5f22e..be9c04f96 100644 --- a/packages/api-console-gui/package.json +++ b/packages/api-console-gui/package.json @@ -5,7 +5,7 @@ "scripts": { "ng": "ng", "start": "NODE_OPTIONS=--preserve-symlinks ng serve", - "build": "NODE_OPTIONS=--preserve-symlinks ng build --prod", + "build": "NODE_OPTIONS=--preserve-symlinks ng build --configuration production", "build:dev": "NODE_OPTIONS=--preserve-symlinks ng build", "watch": "NODE_OPTIONS=--preserve-symlinks ng build --watch --configuration development" }, @@ -19,6 +19,7 @@ "dist" ], "devDependencies": { + "@angular-builders/custom-webpack": "^12.1.0", "@angular-devkit/build-angular": "~12.2.0", "@angular/animations": "~12.2.0", "@angular/cdk": "^12.2.0", @@ -49,6 +50,7 @@ "ngx-markdown": "^12.0.1", "object-inspect": "^1.11.0", "prismjs": "^1.24.1", + "resolve-typescript-plugin": "^1.2.0", "rxjs": "~6.6.0", "tslib": "^2.3.0", "typescript": "~4.3.5", diff --git a/packages/api-console-gui/src/app/api-console.module.ts b/packages/api-console-gui/src/app/api-console.module.ts index 0db4358cf..942df9897 100644 --- a/packages/api-console-gui/src/app/api-console.module.ts +++ b/packages/api-console-gui/src/app/api-console.module.ts @@ -18,30 +18,30 @@ import { DuiWindowModule } from '@deepkit/desktop-ui'; import { FormsModule } from '@angular/forms'; -import { ConsoleComponent } from './views/console.component'; +import { ConsoleComponent } from './views/console.component.js'; import { DeepkitClient } from '@deepkit/rpc'; -import { ControllerClient } from './client'; -import { Store } from './store'; -import { StringInputComponent } from './components/inputs/string-input.component'; -import { InputComponent } from './components/inputs/input.component'; -import { ArrayInputComponent } from './components/inputs/array-input.component'; -import { BinaryInputComponent } from './components/inputs/binary-input.component'; -import { DateInputComponent } from './components/inputs/date-input.component'; -import { EnumInputComponent } from './components/inputs/enum-input.component'; -import { JsonInputComponent } from './components/inputs/json-input.component'; -import { ClassInputComponent } from './components/inputs/class-input.component'; -import { HeadersComponent } from './components/headers.component'; -import { MapInputComponent } from './components/inputs/map-input.component'; -import { UnionInputComponent } from './components/inputs/union-input.component'; -import { EnvironmentDialogComponent } from './components/environment-dialog.component'; +import { ControllerClient } from './client.js'; +import { Store } from './store.js'; +import { StringInputComponent } from './components/inputs/string-input.component.js'; +import { InputComponent } from './components/inputs/input.component.js'; +import { ArrayInputComponent } from './components/inputs/array-input.component.js'; +import { BinaryInputComponent } from './components/inputs/binary-input.component.js'; +import { DateInputComponent } from './components/inputs/date-input.component.js'; +import { EnumInputComponent } from './components/inputs/enum-input.component.js'; +import { JsonInputComponent } from './components/inputs/json-input.component.js'; +import { ClassInputComponent } from './components/inputs/class-input.component.js'; +import { HeadersComponent } from './components/headers.component.js'; +import { MapInputComponent } from './components/inputs/map-input.component.js'; +import { UnionInputComponent } from './components/inputs/union-input.component.js'; +import { EnvironmentDialogComponent } from './components/environment-dialog.component.js'; import { RouterModule } from '@angular/router'; -import { OverviewComponent } from './views/overview.component'; +import { OverviewComponent } from './views/overview.component.js'; import { MarkdownModule } from 'ngx-markdown'; import { DeepkitUIModule } from '@deepkit/ui-library'; -import { HttpRouteDetailComponent } from './views/http/route-detail.component'; -import { HttpRequestsComponent } from './views/http/results.component'; -import { RpcDetailComponent } from './views/rpc/rpc-detail.component'; -import { RpcInspectMessageComponent } from './views/rpc/rpc-inspect-message.component'; +import { HttpRouteDetailComponent } from './views/http/route-detail.component.js'; +import { HttpRequestsComponent } from './views/http/results.component.js'; +import { RpcDetailComponent } from './views/rpc/rpc-detail.component.js'; +import { RpcInspectMessageComponent } from './views/rpc/rpc-inspect-message.component.js'; @NgModule({ declarations: [ diff --git a/packages/api-console-gui/src/app/app.component.ts b/packages/api-console-gui/src/app/app.component.ts index d8828c539..f5bc66b37 100644 --- a/packages/api-console-gui/src/app/app.component.ts +++ b/packages/api-console-gui/src/app/app.component.ts @@ -1,6 +1,6 @@ import { Component, ElementRef } from '@angular/core'; import { DuiApp } from '@deepkit/desktop-ui'; -import { ControllerClient } from './client'; +import { ControllerClient } from './client.js'; @Component({ selector: 'app-root', diff --git a/packages/api-console-gui/src/app/app.module.ts b/packages/api-console-gui/src/app/app.module.ts index 633f0ac8e..7d453eb31 100644 --- a/packages/api-console-gui/src/app/app.module.ts +++ b/packages/api-console-gui/src/app/app.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { AppComponent } from './app.component'; +import { AppComponent } from './app.component.js'; import { RouterModule } from '@angular/router'; -import { ApiConsoleModule } from './api-console.module'; +import { ApiConsoleModule } from './api-console.module.js'; import { DuiAppModule, DuiButtonModule, DuiIconModule, DuiWindowModule } from '@deepkit/desktop-ui'; import { DeepkitUIModule } from '@deepkit/ui-library'; diff --git a/packages/api-console-gui/src/app/components/environment-dialog.component.ts b/packages/api-console-gui/src/app/components/environment-dialog.component.ts index 743db4b3c..6f118975e 100644 --- a/packages/api-console-gui/src/app/components/environment-dialog.component.ts +++ b/packages/api-console-gui/src/app/components/environment-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Input } from '@angular/core'; -import { Environment, Store } from '../store'; +import { Environment, Store } from '../store.js'; import { arrayRemoveItem, copy } from '@deepkit/core'; import { DialogComponent } from '@deepkit/desktop-ui'; diff --git a/packages/api-console-gui/src/app/components/inputs/array-input.component.ts b/packages/api-console-gui/src/app/components/inputs/array-input.component.ts index 218068fba..5b2dd7801 100644 --- a/packages/api-console-gui/src/app/components/inputs/array-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/array-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { arrayMoveItem } from '@deepkit/core'; -import { trackByIndex } from '../../utils'; -import { DataStructure } from '../../store'; +import { trackByIndex } from '../../utils.js'; +import { DataStructure } from '../../store.js'; import { TypeArray } from '@deepkit/type'; @Component({ diff --git a/packages/api-console-gui/src/app/components/inputs/class-input.component.ts b/packages/api-console-gui/src/app/components/inputs/class-input.component.ts index 5381eef66..47338f5d8 100644 --- a/packages/api-console-gui/src/app/components/inputs/class-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/class-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { isBackReferenceType, isReferenceType, ReflectionClass, TypeClass, TypeObjectLiteral } from '@deepkit/type'; -import { isReferenceLike, trackByIndex } from '../../utils'; -import { DataStructure } from '../../store'; +import { isReferenceLike, trackByIndex } from '../../utils.js'; +import { DataStructure } from '../../store.js'; @Component({ template: ` diff --git a/packages/api-console-gui/src/app/components/inputs/date-input.component.ts b/packages/api-console-gui/src/app/components/inputs/date-input.component.ts index 224e4359d..752920d4d 100644 --- a/packages/api-console-gui/src/app/components/inputs/date-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/date-input.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { TypeClass } from '@deepkit/type'; -import { DataStructure } from '../../store'; +import { DataStructure } from '../../store.js'; @Component({ template: ` diff --git a/packages/api-console-gui/src/app/components/inputs/enum-input.component.ts b/packages/api-console-gui/src/app/components/inputs/enum-input.component.ts index 4cc8bc8a8..152abe371 100644 --- a/packages/api-console-gui/src/app/components/inputs/enum-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/enum-input.component.ts @@ -2,7 +2,7 @@ import { AfterViewInit, Component, EventEmitter, Input, OnChanges, OnDestroy, On import { SelectboxComponent, unsubscribe } from '@deepkit/desktop-ui'; import { TypeEnum } from '@deepkit/type'; import { Subscription } from 'rxjs'; -import { DataStructure } from '../../store'; +import { DataStructure } from '../../store.js'; @Component({ template: ` diff --git a/packages/api-console-gui/src/app/components/inputs/input.component.ts b/packages/api-console-gui/src/app/components/inputs/input.component.ts index eb603ef82..f12786e4c 100644 --- a/packages/api-console-gui/src/app/components/inputs/input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/input.component.ts @@ -15,9 +15,9 @@ import { import { unsubscribe } from '@deepkit/desktop-ui'; import { hasDefaultValue, isOptional, ReflectionKind, Type } from '@deepkit/type'; import { Subscription } from 'rxjs'; -import { DataStructure } from '../../store'; -import { TypeDecoration, typeToTSJSONInterface } from '../../utils'; -import { inputRegistry } from './registry'; +import { DataStructure } from '../../store.js'; +import { TypeDecoration, typeToTSJSONInterface } from '../../utils.js'; +import { inputRegistry } from './registry.js'; @Component({ selector: 'api-console-input', diff --git a/packages/api-console-gui/src/app/components/inputs/json-input.component.ts b/packages/api-console-gui/src/app/components/inputs/json-input.component.ts index db339e84a..ca9a194ce 100644 --- a/packages/api-console-gui/src/app/components/inputs/json-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/json-input.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { getSerializeFunction, ReflectionKind, serializer, Type } from '@deepkit/type'; -import { DataStructure } from '../../store'; +import { DataStructure } from '../../store.js'; @Component({ template: ` diff --git a/packages/api-console-gui/src/app/components/inputs/map-input.component.ts b/packages/api-console-gui/src/app/components/inputs/map-input.component.ts index d3d883643..a150cc85f 100644 --- a/packages/api-console-gui/src/app/components/inputs/map-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/map-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { getKeyType, getValueType, Type, TypeClass, TypeObjectLiteral } from '@deepkit/type'; -import { trackByIndex } from '../../utils'; -import { DataStructure } from '../../store'; +import { trackByIndex } from '../../utils.js'; +import { DataStructure } from '../../store.js'; import { arrayMoveItem } from '@deepkit/core'; @Component({ diff --git a/packages/api-console-gui/src/app/components/inputs/registry.ts b/packages/api-console-gui/src/app/components/inputs/registry.ts index d16d5ea70..19d0636c3 100644 --- a/packages/api-console-gui/src/app/components/inputs/registry.ts +++ b/packages/api-console-gui/src/app/components/inputs/registry.ts @@ -1,14 +1,14 @@ import { isMapType, isMongoIdType, isSetType, isUUIDType, ReflectionKind, TypeRegistry } from '@deepkit/type'; import { ClassType, getClassName } from '@deepkit/core'; -import { StringInputComponent } from './string-input.component'; -import { ArrayInputComponent } from './array-input.component'; -import { EnumInputComponent } from './enum-input.component'; -import { DateInputComponent } from './date-input.component'; -import { JsonInputComponent } from './json-input.component'; -import { BinaryInputComponent } from './binary-input.component'; -import { ClassInputComponent } from './class-input.component'; -import { MapInputComponent } from './map-input.component'; -import { UnionInputComponent } from './union-input.component'; +import { StringInputComponent } from './string-input.component.js'; +import { ArrayInputComponent } from './array-input.component.js'; +import { EnumInputComponent } from './enum-input.component.js'; +import { DateInputComponent } from './date-input.component.js'; +import { JsonInputComponent } from './json-input.component.js'; +import { BinaryInputComponent } from './binary-input.component.js'; +import { ClassInputComponent } from './class-input.component.js'; +import { MapInputComponent } from './map-input.component.js'; +import { UnionInputComponent } from './union-input.component.js'; export const inputRegistry = new TypeRegistry(); diff --git a/packages/api-console-gui/src/app/components/inputs/string-input.component.ts b/packages/api-console-gui/src/app/components/inputs/string-input.component.ts index eda7cbd8e..a8bbd8d9f 100644 --- a/packages/api-console-gui/src/app/components/inputs/string-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/string-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { ReflectionKind, Type } from '@deepkit/type'; -import { DataStructure } from '../../store'; -import { TypeDecoration } from '../../utils'; +import { DataStructure } from '../../store.js'; +import { TypeDecoration } from '../../utils.js'; @Component({ template: ` diff --git a/packages/api-console-gui/src/app/components/inputs/union-input.component.ts b/packages/api-console-gui/src/app/components/inputs/union-input.component.ts index 6dedb64fe..86dac91d8 100644 --- a/packages/api-console-gui/src/app/components/inputs/union-input.component.ts +++ b/packages/api-console-gui/src/app/components/inputs/union-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { isType, ReflectionKind, stringifyType, Type, TypeUnion } from '@deepkit/type'; -import { DataStructure } from '../../store'; -import { trackByIndex } from '../../utils'; +import { DataStructure } from '../../store.js'; +import { trackByIndex } from '../../utils.js'; interface Entry { type?: Type; diff --git a/packages/api-console-gui/src/app/views/console.component.ts b/packages/api-console-gui/src/app/views/console.component.ts index edb8985cb..fbf787031 100644 --- a/packages/api-console-gui/src/app/views/console.component.ts +++ b/packages/api-console-gui/src/app/views/console.component.ts @@ -1,16 +1,16 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ControllerClient } from '../client'; +import { ControllerClient } from '../client.js'; import { ApiAction, ApiEntryPoints, ApiRoute } from '@deepkit/api-console-api'; -import { methods, trackByIndex } from '../utils'; -import { Environment, RouteState, Store } from '../store'; +import { methods, trackByIndex } from '../utils.js'; +import { Environment, RouteState, Store } from '../store.js'; import { copy } from '@deepkit/core'; import { Subscription } from 'rxjs'; import { DuiDialog } from '@deepkit/desktop-ui'; -import { EnvironmentDialogComponent } from '../components/environment-dialog.component'; -import { filterAndSortActions, filterAndSortRoutes } from './view-helper'; +import { EnvironmentDialogComponent } from '../components/environment-dialog.component.js'; +import { filterAndSortActions, filterAndSortRoutes } from './view-helper.js'; import { ActivatedRoute, Router } from '@angular/router'; -import { HttpRouteDetailComponent } from './http/route-detail.component'; -import { HttpRequestsComponent } from './http/results.component'; +import { HttpRouteDetailComponent } from './http/route-detail.component.js'; +import { HttpRequestsComponent } from './http/results.component.js'; import { ReflectionKind, stringifyType } from '@deepkit/type'; @Component({ diff --git a/packages/api-console-gui/src/app/views/http/results.component.ts b/packages/api-console-gui/src/app/views/http/results.component.ts index 94d13ac77..8be3e688a 100644 --- a/packages/api-console-gui/src/app/views/http/results.component.ts +++ b/packages/api-console-gui/src/app/views/http/results.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectorRef, Component, EventEmitter, Output } from '@angular/core'; -import { ControllerClient } from '../../client'; -import { Request, Store } from '../../store'; +import { ControllerClient } from '../../client.js'; +import { Request, Store } from '../../store.js'; import { DuiDialog } from '@deepkit/desktop-ui'; import { Router } from '@angular/router'; -import { trackByIndex } from '../../utils'; +import { trackByIndex } from '../../utils.js'; import { ApiRoute } from '@deepkit/api-console-api'; @Component({ diff --git a/packages/api-console-gui/src/app/views/http/route-detail.component.ts b/packages/api-console-gui/src/app/views/http/route-detail.component.ts index fb2ba3104..2107ee6ba 100644 --- a/packages/api-console-gui/src/app/views/http/route-detail.component.ts +++ b/packages/api-console-gui/src/app/views/http/route-detail.component.ts @@ -1,11 +1,11 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; import { ApiRoute } from '@deepkit/api-console-api'; import { isArray, isObject } from '@deepkit/core'; -import { extractDataStructure, extractDataStructureFromSchema, Request, RouteState, Store } from '../../store'; -import { ControllerClient } from '../../client'; +import { extractDataStructure, extractDataStructureFromSchema, Request, RouteState, Store } from '../../store.js'; +import { ControllerClient } from '../../client.js'; import { Router } from '@angular/router'; import { DuiDialog } from '@deepkit/desktop-ui/src/index'; -import { headerStatusCodes, methods, trackByIndex, typeToTSJSONInterface } from '../../utils'; +import { headerStatusCodes, methods, trackByIndex, typeToTSJSONInterface } from '../../utils.js'; import { getTypeJitContainer } from '@deepkit/type'; @Component({ diff --git a/packages/api-console-gui/src/app/views/overview.component.ts b/packages/api-console-gui/src/app/views/overview.component.ts index 60fcc82d6..36cefa30c 100644 --- a/packages/api-console-gui/src/app/views/overview.component.ts +++ b/packages/api-console-gui/src/app/views/overview.component.ts @@ -1,8 +1,8 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; -import { ControllerClient } from '../client'; +import { ControllerClient } from '../client.js'; import { ApiDocument, ApiRoute } from '@deepkit/api-console-api'; -import { filterAndSortRoutes } from './view-helper'; -import { headerStatusCodes, trackByIndex, typeToTSJSONInterface } from '../utils'; +import { filterAndSortRoutes } from './view-helper.js'; +import { headerStatusCodes, trackByIndex, typeToTSJSONInterface } from '../utils.js'; import { Subscriptions } from '@deepkit/core-rxjs'; import { typeSettings } from '@deepkit/type'; diff --git a/packages/api-console-gui/src/app/views/rpc/rpc-detail.component.ts b/packages/api-console-gui/src/app/views/rpc/rpc-detail.component.ts index 5faae7561..f285f764f 100644 --- a/packages/api-console-gui/src/app/views/rpc/rpc-detail.component.ts +++ b/packages/api-console-gui/src/app/views/rpc/rpc-detail.component.ts @@ -1,12 +1,12 @@ import { ChangeDetectorRef, Component, Input, OnChanges } from '@angular/core'; import { trackByIndex } from '@deepkit/ui-library'; import { ApiAction } from '@deepkit/api-console-api'; -import { extractDataStructureFromParameters, RpcActionState, RpcClientConfiguration, RpcExecution, RpcExecutionSubscription, Store } from '../../store'; +import { extractDataStructureFromParameters, RpcActionState, RpcClientConfiguration, RpcExecution, RpcExecutionSubscription, Store } from '../../store.js'; import { DuiDialog } from '@deepkit/desktop-ui'; import { DisconnectableObservable, RpcWebSocketClient } from '@deepkit/rpc'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { Observable, Subject } from 'rxjs'; -import { inspect, typeToTSJSONInterface } from '../../utils'; +import { inspect, typeToTSJSONInterface } from '../../utils.js'; import { isSubject } from '@deepkit/core-rxjs'; @Component({ diff --git a/packages/api-console-gui/src/app/views/rpc/rpc-inspect-message.component.ts b/packages/api-console-gui/src/app/views/rpc/rpc-inspect-message.component.ts index c03f0c3db..4985ff5e7 100644 --- a/packages/api-console-gui/src/app/views/rpc/rpc-inspect-message.component.ts +++ b/packages/api-console-gui/src/app/views/rpc/rpc-inspect-message.component.ts @@ -1,7 +1,7 @@ import { RpcClientEventIncomingMessage, RpcClientEventOutgoingMessage, RpcTypes } from '@deepkit/rpc'; import { Component, Input, OnChanges } from '@angular/core'; import { trackByIndex } from '@deepkit/ui-library'; -import { inspect } from '../../utils'; +import { inspect } from '../../utils.js'; @Component({ selector: 'rpc-inspect-message', diff --git a/packages/api-console-gui/src/main.ts b/packages/api-console-gui/src/main.ts index 938583c38..c9bdc8d0b 100644 --- a/packages/api-console-gui/src/main.ts +++ b/packages/api-console-gui/src/main.ts @@ -1,8 +1,8 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppModule } from './app/app.module.js'; +import { environment } from './environments/environment.js'; if (environment.production) { enableProdMode(); diff --git a/packages/api-console-gui/src/polyfills.ts b/packages/api-console-gui/src/polyfills.ts index bed9fada2..d1b369621 100644 --- a/packages/api-console-gui/src/polyfills.ts +++ b/packages/api-console-gui/src/polyfills.ts @@ -37,7 +37,7 @@ * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; + * import './zone-flags.js'; * * The flags allowed in zone-flags.ts are listed here. * diff --git a/packages/api-console-gui/tsconfig.json b/packages/api-console-gui/tsconfig.json index 1d6d9e7b0..aa02d2d8b 100644 --- a/packages/api-console-gui/tsconfig.json +++ b/packages/api-console-gui/tsconfig.json @@ -34,13 +34,13 @@ }, "references": [ { - "path": "../bson/tsconfig.json" + "path": "../api-console-api/tsconfig.json" }, { - "path": "../core/tsconfig.json" + "path": "../bson/tsconfig.json" }, { - "path": "../api-console-api/tsconfig.json" + "path": "../core/tsconfig.json" }, { "path": "../core-rxjs/tsconfig.json" @@ -62,6 +62,12 @@ }, { "path": "../type/tsconfig.json" + }, + { + "path": "../type-compiler/tsconfig.json" + }, + { + "path": "../ui-library/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/api-console-module/dist/esm/package.json b/packages/api-console-module/dist/esm/package.json new file mode 100644 index 000000000..6990891ff --- /dev/null +++ b/packages/api-console-module/dist/esm/package.json @@ -0,0 +1 @@ +{"type": "module"} diff --git a/packages/api-console-module/index.ts b/packages/api-console-module/index.ts index 0f51f1dc6..7b732405e 100644 --- a/packages/api-console-module/index.ts +++ b/packages/api-console-module/index.ts @@ -1 +1 @@ -export * from './src/module'; +export * from './src/module.js'; diff --git a/packages/api-console-module/package-lock.json b/packages/api-console-module/package-lock.json index 4eed68565..c584b08c6 100644 --- a/packages/api-console-module/package-lock.json +++ b/packages/api-console-module/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/api-console-module", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.73", "license": "MIT", "devDependencies": { "rxjs": "~6.6.0" diff --git a/packages/api-console-module/package.json b/packages/api-console-module/package.json index bc3d80118..a7f2c3c21 100644 --- a/packages/api-console-module/package.json +++ b/packages/api-console-module/package.json @@ -39,6 +39,7 @@ "@deepkit/api-console-gui": "^1.0.1-alpha.75" }, "devDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.75", "@deepkit/broker": "^1.0.1-alpha.75", "@deepkit/bson": "^1.0.1-alpha.75", @@ -51,7 +52,10 @@ "@deepkit/type": "^1.0.1-alpha.75", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/api-console-module/src/controller.ts b/packages/api-console-module/src/controller.ts index 3a3866733..40957b2f1 100644 --- a/packages/api-console-module/src/controller.ts +++ b/packages/api-console-module/src/controller.ts @@ -2,7 +2,7 @@ import { ApiAction, ApiConsoleApi, ApiDocument, ApiEntryPoints, ApiRoute, ApiRou import { getActions, rpc, RpcKernel } from '@deepkit/rpc'; import { HttpRouteFilter, HttpRouterFilterResolver, parseRouteControllerAction } from '@deepkit/http'; import { ClassType, getClassName, isClass } from '@deepkit/core'; -import { Config } from './module.config'; +import { Config } from './module.config.js'; import { readFile } from 'fs/promises'; import { ReflectionClass, ReflectionKind, serializeType, Type, TypeClass, TypeObjectLiteral, TypePropertySignature } from '@deepkit/type'; diff --git a/packages/api-console-module/src/module.ts b/packages/api-console-module/src/module.ts index 2056a6287..61c204488 100644 --- a/packages/api-console-module/src/module.ts +++ b/packages/api-console-module/src/module.ts @@ -1,11 +1,11 @@ import { createModule, findParentPath } from '@deepkit/app'; import { HttpRouteFilter, normalizeDirectory, registerStaticHttpController } from '@deepkit/http'; import { ApiConsoleApi } from '@deepkit/api-console-api'; -import { Config } from './module.config'; +import { Config } from './module.config.js'; import { rpc } from '@deepkit/rpc'; -import { ApiConsoleController } from './controller'; +import { ApiConsoleController } from './controller.js'; import { dirname } from 'path'; -import { getCurrentFileName } from '@deepkit/core'; +import { getDirname } from '@deepkit/platform'; export class ApiConsoleModule extends createModule({ config: Config, @@ -37,8 +37,8 @@ export class ApiConsoleModule extends createModule({ this.addController(NamedApiConsoleController); - const localPath = findParentPath('node_modules/@deepkit/api-console-gui/dist/api-console-gui', dirname(getCurrentFileName())); - if (!localPath) throw new Error('node_modules/@deepkit/api-console-gui not installed in ' + dirname(getCurrentFileName())); + const localPath = findParentPath('node_modules/@deepkit/api-console-gui/dist/api-console-gui', getDirname()); + if (!localPath) throw new Error('node_modules/@deepkit/api-console-gui not installed in ' + getDirname()); registerStaticHttpController(this, { path: this.config.path, diff --git a/packages/api-console-module/tests/module.spec.ts b/packages/api-console-module/tests/module.spec.ts index 3b1279ff6..de8b6477f 100644 --- a/packages/api-console-module/tests/module.spec.ts +++ b/packages/api-console-module/tests/module.spec.ts @@ -1,6 +1,6 @@ import { App } from '@deepkit/app'; import { expect, test } from '@jest/globals'; -import { ApiConsoleModule } from '../src/module'; +import { ApiConsoleModule } from '../src/module.js'; import { HttpKernel, HttpModule, HttpRequest } from '@deepkit/http'; import { ApiEntryPoints } from '@deepkit/api-console-gui/src/api'; import { reflect, ReflectionKind, TypeObjectLiteral } from '@deepkit/type'; diff --git a/packages/api-console-module/tsconfig.esm.json b/packages/api-console-module/tsconfig.esm.json index f1a3921dd..0fdf51c5a 100644 --- a/packages/api-console-module/tsconfig.esm.json +++ b/packages/api-console-module/tsconfig.esm.json @@ -39,4 +39,4 @@ "path": "../type/tsconfig.esm.json" } ] -} +} \ No newline at end of file diff --git a/packages/api-console-module/tsconfig.json b/packages/api-console-module/tsconfig.json index 80afeb3dc..cf280dd0b 100644 --- a/packages/api-console-module/tsconfig.json +++ b/packages/api-console-module/tsconfig.json @@ -56,4 +56,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/app/index.ts b/packages/app/index.ts index c04b1cbe1..e054cbd9c 100644 --- a/packages/app/index.ts +++ b/packages/app/index.ts @@ -1,6 +1,6 @@ -export * from './src/app'; -export * from './src/command'; -export * from './src/configuration'; -export * from './src/module'; -export * from './src/service-container'; -export * from './src/utils'; +export * from './src/app.js'; +export * from './src/command.js'; +export * from './src/configuration.js'; +export * from './src/module.js'; +export * from './src/service-container.js'; +export * from './src/utils.js'; diff --git a/packages/app/package-lock.json b/packages/app/package-lock.json index 6fa0054dc..ae710a972 100644 --- a/packages/app/package-lock.json +++ b/packages/app/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/app", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@oclif/command": "^1.8.16", diff --git a/packages/app/package.json b/packages/app/package.json index 9a26f0dfc..a947ab4ce 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -22,6 +22,7 @@ "build": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json" }, "peerDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/core": "^1.0.1-alpha.13", "@deepkit/event": "^1.0.1-alpha.13", "@deepkit/injector": "^1.0.1-alpha.13", @@ -35,6 +36,7 @@ "@oclif/errors": "^1.3.5" }, "devDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/core": "^1.0.1-alpha.75", "@deepkit/event": "^1.0.1-alpha.75", "@deepkit/injector": "^1.0.1-alpha.75", @@ -43,7 +45,10 @@ "@deepkit/workflow": "^1.0.1-alpha.75", "conditional-type-checks": "^1.0.5" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/app/src/app.ts b/packages/app/src/app.ts index 69ef813f6..9d3b41681 100644 --- a/packages/app/src/app.ts +++ b/packages/app/src/app.ts @@ -8,16 +8,17 @@ * You should have received a copy of the MIT License along with this program. */ -import { ClassType, ExtractClassType, getCurrentFileName, isFunction, isObject, setPathValue } from '@deepkit/core'; -import { ConfigLoader, ServiceContainer } from './service-container'; +import { ClassType, ExtractClassType, isFunction, isObject, setPathValue } from '@deepkit/core'; +import { getDirname } from '@deepkit/platform'; +import { ConfigLoader, ServiceContainer } from './service-container.js'; import { InjectorContext, ResolveToken, Token } from '@deepkit/injector'; -import { AppModule, RootModuleDefinition } from './module'; +import { AppModule, RootModuleDefinition } from './module.js'; import { Command, Config, Options } from '@oclif/config'; import { basename, dirname, relative } from 'path'; import { Main } from '@oclif/command'; import { ExitError } from '@oclif/errors'; -import { buildOclifCommand } from './command'; -import { EnvConfiguration } from './configuration'; +import { buildOclifCommand } from './command.js'; +import { EnvConfiguration } from './configuration.js'; import { EventDispatcher, EventListener, EventListenerCallback, EventOfEventToken, EventToken } from '@deepkit/event'; import { ReceiveType, ReflectionClass, ReflectionKind } from '@deepkit/type'; @@ -332,7 +333,7 @@ export class App { } try { - const config = new MyConfig({ root: dirname(getCurrentFileName()) }); + const config = new MyConfig({ root: getDirname() }); const scopedInjectorContext = this.getInjectorContext().createChildScope('cli'); for (const [name, info] of this.serviceContainer.cliControllerRegistry.controllers.entries()) { diff --git a/packages/app/src/service-container.ts b/packages/app/src/service-container.ts index 9c8e83456..057fa795d 100644 --- a/packages/app/src/service-container.ts +++ b/packages/app/src/service-container.ts @@ -10,9 +10,9 @@ import { ClassType, getClassName, isClass, isFunction } from '@deepkit/core'; import { EventDispatcher } from '@deepkit/event'; -import { AppModule, ConfigurationInvalidError, MiddlewareConfig, ModuleDefinition } from './module'; +import { AppModule, ConfigurationInvalidError, MiddlewareConfig, ModuleDefinition } from './module.js'; import { Injector, InjectorContext, InjectorModule, isProvided, ProviderWithScope, resolveToken, Token } from '@deepkit/injector'; -import { cli } from './command'; +import { cli } from './command.js'; import { WorkflowDefinition } from '@deepkit/workflow'; import { deserialize, ReflectionClass, validate } from '@deepkit/type'; diff --git a/packages/app/src/utils.ts b/packages/app/src/utils.ts index 98c758ce4..73ed4f5c3 100644 --- a/packages/app/src/utils.ts +++ b/packages/app/src/utils.ts @@ -1,8 +1,8 @@ -import { getCurrentFileName } from '@deepkit/core'; +import { getDirname } from '@deepkit/platform'; import { existsSync } from 'fs'; import { dirname, join, resolve } from 'path'; -export function findParentPath(path: string, origin: string = dirname(getCurrentFileName())): string | undefined { +export function findParentPath(path: string, origin: string = getDirname()): string | undefined { let current = origin; while (!existsSync(join(current, path))) { diff --git a/packages/app/tests/application.spec.ts b/packages/app/tests/application.spec.ts index fac820b4a..bd78bc5c8 100644 --- a/packages/app/tests/application.spec.ts +++ b/packages/app/tests/application.spec.ts @@ -1,12 +1,12 @@ import { beforeEach, expect, test } from '@jest/globals'; -import { App } from '../src/app'; +import { App } from '../src/app.js'; import { Inject, ProviderWithScope, Token } from '@deepkit/injector'; -import { AppModule, createModule } from '../src/module'; +import { AppModule, createModule } from '../src/module.js'; import { BaseEvent, EventDispatcher, eventDispatcher, EventToken, DataEventToken } from '@deepkit/event'; -import { cli, Command } from '../src/command'; -import { ClassType } from '../../core'; +import { cli, Command } from '../src/command.js'; +import { ClassType } from '../../core/index.js'; import { isClass } from '@deepkit/core'; -import { ServiceContainer } from '../src/service-container'; +import { ServiceContainer } from '../src/service-container.js'; import { DataEvent } from '@deepkit/event'; Error.stackTraceLimit = 100; diff --git a/packages/app/tests/command.spec.ts b/packages/app/tests/command.spec.ts index 9a4ab5cc8..a20862fad 100644 --- a/packages/app/tests/command.spec.ts +++ b/packages/app/tests/command.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { App } from '../src/app'; -import { arg, cli, Command } from '../src/command'; -import { ServiceContainer } from '../src/service-container'; +import { App } from '../src/app.js'; +import { arg, cli, Command } from '../src/command.js'; +import { ServiceContainer } from '../src/service-container.js'; @cli.controller('my') class MyCli implements Command { diff --git a/packages/app/tests/docs.spec.ts b/packages/app/tests/docs.spec.ts index e6251730a..0c5829b74 100644 --- a/packages/app/tests/docs.spec.ts +++ b/packages/app/tests/docs.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { ClassType } from '@deepkit/core'; -import { App } from '../src/app'; -import { AppModule, createModule } from '../src/module'; +import { App } from '../src/app.js'; +import { AppModule, createModule } from '../src/module.js'; import { InjectorContext } from '@deepkit/injector'; test('controller instantiation', () => { diff --git a/packages/app/tests/module-basics.spec.ts b/packages/app/tests/module-basics.spec.ts index 9e89dd4d2..10f925a20 100644 --- a/packages/app/tests/module-basics.spec.ts +++ b/packages/app/tests/module-basics.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { createModule } from '../src/module'; -import { ServiceContainer } from '../src/service-container'; +import { createModule } from '../src/module.js'; +import { ServiceContainer } from '../src/service-container.js'; import { assert, IsExact } from 'conditional-type-checks'; test('strict types config', () => { diff --git a/packages/app/tests/module.spec.ts b/packages/app/tests/module.spec.ts index 81a75ced3..60ad55578 100644 --- a/packages/app/tests/module.spec.ts +++ b/packages/app/tests/module.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; import { Minimum, MinLength } from '@deepkit/type'; import { injectorReference } from '@deepkit/injector'; -import { ServiceContainer } from '../src/service-container'; +import { ServiceContainer } from '../src/service-container.js'; import { ClassType } from '@deepkit/core'; -import { AppModule, createModule, FunctionalModuleFactory } from '../src/module'; +import { AppModule, createModule, FunctionalModuleFactory } from '../src/module.js'; class MyModuleConfig { param1!: string & MinLength<5>; diff --git a/packages/app/tests/service-container.spec.ts b/packages/app/tests/service-container.spec.ts index 61e92feba..56298f21e 100644 --- a/packages/app/tests/service-container.spec.ts +++ b/packages/app/tests/service-container.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { AppModule, createModule } from '../src/module'; -import { ServiceContainer } from '../src/service-container'; +import { AppModule, createModule } from '../src/module.js'; +import { ServiceContainer } from '../src/service-container.js'; test('simple setup with import and overwrite', () => { class Connection { diff --git a/packages/app/tsconfig.json b/packages/app/tsconfig.json index 73bfd5c53..b1c628e44 100644 --- a/packages/app/tsconfig.json +++ b/packages/app/tsconfig.json @@ -24,6 +24,9 @@ { "path": "../core/tsconfig.json" }, + { + "path": "../platform/tsconfig.json" + }, { "path": "../event/tsconfig.json" }, @@ -40,4 +43,4 @@ "path": "../workflow/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/benchmark/index.ts b/packages/benchmark/index.ts index e491b5b51..4d844944c 100644 --- a/packages/benchmark/index.ts +++ b/packages/benchmark/index.ts @@ -1,13 +1,15 @@ import { mkdirSync, writeFileSync } from 'fs'; import { join } from 'path'; import * as vm from 'vm'; -import { BenchmarkRun } from './model'; +import { BenchmarkRun } from './model.js'; import * as si from 'systeminformation'; import { execSync } from 'child_process'; import { serialize } from '@deepkit/type'; +import { getDirname } from '@deepkit/platform'; import fetch from 'node-fetch'; const fg = require('fast-glob'); +const _dirname = getDirname(); const filters = process.argv.slice(2) .map(v => v.startsWith('src/') ? v.substr(4) : v) @@ -56,7 +58,7 @@ async function main() { } } - const resultsPath = join(__dirname, 'results'); + const resultsPath = join(_dirname, 'results'); mkdirSync(resultsPath, { recursive: true }); const jsonPath = resultsPath + '/' + (new Date().toJSON()) + '.json'; console.log('Write benchmark result to', jsonPath); diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 89d2bba23..6b7e28a12 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -15,6 +15,7 @@ "author": "Marc J. Schmidt ", "license": "MIT", "dependencies": { + "@deepkit/platform": "^1.0.1-alpha.74", "@deepkit/app": "^1.0.1-alpha.0", "@deepkit/broker": "^1.0.1-alpha.0", "@deepkit/bson": "^1.0.1-alpha.0", diff --git a/packages/benchmark/src/broker/broker-get-set.bench.ts b/packages/benchmark/src/broker/broker-get-set.bench.ts index 770eedc54..feddbc8ea 100644 --- a/packages/benchmark/src/broker/broker-get-set.bench.ts +++ b/packages/benchmark/src/broker/broker-get-set.bench.ts @@ -10,7 +10,7 @@ import { BrokerDirectClient, BrokerKernel } from '@deepkit/broker'; import { t } from '@deepkit/type'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const kernel = new BrokerKernel(); diff --git a/packages/benchmark/src/broker/broker-lock.bench.ts b/packages/benchmark/src/broker/broker-lock.bench.ts index c3ecfc504..97ebef552 100644 --- a/packages/benchmark/src/broker/broker-lock.bench.ts +++ b/packages/benchmark/src/broker/broker-lock.bench.ts @@ -9,7 +9,7 @@ */ import { BrokerDirectClient, BrokerKernel } from '@deepkit/broker'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const kernel = new BrokerKernel(); diff --git a/packages/benchmark/src/broker/broker-pub-sub.bench.ts b/packages/benchmark/src/broker/broker-pub-sub.bench.ts index bf089fee8..e6819c970 100644 --- a/packages/benchmark/src/broker/broker-pub-sub.bench.ts +++ b/packages/benchmark/src/broker/broker-pub-sub.bench.ts @@ -11,7 +11,7 @@ import { BrokerDirectClient, BrokerKernel } from "@deepkit/broker"; import { t } from "@deepkit/type"; import 'reflect-metadata'; -import { BenchSuite } from "../bench"; +import { BenchSuite } from "../bench.js"; export async function main() { const kernel = new BrokerKernel(); diff --git a/packages/benchmark/src/broker/node-redis.bench.ts b/packages/benchmark/src/broker/node-redis.bench.ts index 5d289e976..5a75b3db7 100644 --- a/packages/benchmark/src/broker/node-redis.bench.ts +++ b/packages/benchmark/src/broker/node-redis.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from "../bench"; +import { BenchSuite } from "../bench.js"; const redis = require("redis"); const client = redis.createClient(); @@ -37,4 +37,4 @@ export async function main() { await suite.runAsync(); client.end(); -} \ No newline at end of file +} diff --git a/packages/benchmark/src/broker/tcp-broker.bench.ts b/packages/benchmark/src/broker/tcp-broker.bench.ts index 2e979ad9d..709dfefb9 100644 --- a/packages/benchmark/src/broker/tcp-broker.bench.ts +++ b/packages/benchmark/src/broker/tcp-broker.bench.ts @@ -1,7 +1,7 @@ import { BrokerClient } from "@deepkit/broker"; import { TcpRpcClientAdapter } from "@deepkit/rpc-tcp"; import { t } from "@deepkit/type"; -import { BenchSuite } from "../bench"; +import { BenchSuite } from "../bench.js"; class Model { @t ready?: boolean; diff --git a/packages/benchmark/src/bson/hydration.bench.ts b/packages/benchmark/src/bson/hydration.bench.ts index 7e2e77c92..a0706e9fb 100644 --- a/packages/benchmark/src/bson/hydration.bench.ts +++ b/packages/benchmark/src/bson/hydration.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const suite = new BenchSuite(`Object hydration`); diff --git a/packages/benchmark/src/bson/parser.bench.ts b/packages/benchmark/src/bson/parser.bench.ts index f3ffae2b9..024a7dddd 100644 --- a/packages/benchmark/src/bson/parser.bench.ts +++ b/packages/benchmark/src/bson/parser.bench.ts @@ -10,7 +10,7 @@ import * as bson from 'bson'; import * as bsonExt from 'bson-ext'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; import { MongoId, t } from '@deepkit/type'; import { getBSONDeserializer, Parser } from '@deepkit/bson'; diff --git a/packages/benchmark/src/bson/serializer.bench.ts b/packages/benchmark/src/bson/serializer.bench.ts index 69d1903e0..f5c9c51da 100644 --- a/packages/benchmark/src/bson/serializer.bench.ts +++ b/packages/benchmark/src/bson/serializer.bench.ts @@ -10,7 +10,7 @@ import * as bson from 'bson'; import * as bsonExt from 'bson-ext'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; import { t } from '@deepkit/type'; import { createBSONSizer, getBSONSerializer } from '@deepkit/bson'; diff --git a/packages/benchmark/src/bson/utf8.bench.ts b/packages/benchmark/src/bson/utf8.bench.ts index 86c65f7fe..8416b02fc 100644 --- a/packages/benchmark/src/bson/utf8.bench.ts +++ b/packages/benchmark/src/bson/utf8.bench.ts @@ -9,9 +9,9 @@ */ import { buildStringDecoder, decodeUTF8, decodeUTF8Short, Writer } from '@deepkit/bson'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; import { performance } from 'perf_hooks'; -import { GetOptimizationStatus } from '../utils'; +import { GetOptimizationStatus } from '../utils.js'; function parseUtf8(buffer: Uint8Array, size: number): string { const coded = new Uint16Array(size); diff --git a/packages/benchmark/src/framework/core.bench.ts b/packages/benchmark/src/framework/core.bench.ts index 1f15384d1..3fab0aaac 100644 --- a/packages/benchmark/src/framework/core.bench.ts +++ b/packages/benchmark/src/framework/core.bench.ts @@ -9,7 +9,7 @@ */ import { asyncOperation } from '@deepkit/core'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { diff --git a/packages/benchmark/src/framework/event.bench.ts b/packages/benchmark/src/framework/event.bench.ts index b86364a9b..d77760902 100644 --- a/packages/benchmark/src/framework/event.bench.ts +++ b/packages/benchmark/src/framework/event.bench.ts @@ -9,7 +9,7 @@ */ import { BaseEvent, eventDispatcher, EventDispatcher, EventToken, InjectorContext } from '@deepkit/framework'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const bench = new BenchSuite('event'); diff --git a/packages/benchmark/src/framework/http.bench.ts b/packages/benchmark/src/framework/http.bench.ts index 43790a576..03b7b83fd 100644 --- a/packages/benchmark/src/framework/http.bench.ts +++ b/packages/benchmark/src/framework/http.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { FrameworkModule } from '@deepkit/framework'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; import { Socket } from 'net'; import { AppModule, ServiceContainer } from '@deepkit/app'; import { http, HttpKernel, HttpRequest, HttpResponse } from '@deepkit/http'; diff --git a/packages/benchmark/src/framework/injector.bench.ts b/packages/benchmark/src/framework/injector.bench.ts index 4c9c7a929..f2a59107e 100644 --- a/packages/benchmark/src/framework/injector.bench.ts +++ b/packages/benchmark/src/framework/injector.bench.ts @@ -9,7 +9,7 @@ */ import { injectable, Injector, InjectorContext } from '@deepkit/injector'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { class Database { } diff --git a/packages/benchmark/src/framework/injector2.bench.ts b/packages/benchmark/src/framework/injector2.bench.ts index a89fc34b0..5855a4cb5 100644 --- a/packages/benchmark/src/framework/injector2.bench.ts +++ b/packages/benchmark/src/framework/injector2.bench.ts @@ -9,8 +9,8 @@ */ import { InjectorContext, InjectorModule } from '@deepkit/injector'; -import { BenchSuite } from '../bench'; -import { GetOptimizationStatus } from '../utils'; +import { BenchSuite } from '../bench.js'; +import { GetOptimizationStatus } from '../utils.js'; export async function main() { const bench = new BenchSuite('injector2', 1); diff --git a/packages/benchmark/src/framework/router/resolve.bench.ts b/packages/benchmark/src/framework/router/resolve.bench.ts index 0a4fd92c0..8e8b1b5a0 100644 --- a/packages/benchmark/src/framework/router/resolve.bench.ts +++ b/packages/benchmark/src/framework/router/resolve.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ import { http, Router } from '@deepkit/http'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; export async function main() { diff --git a/packages/benchmark/src/jsperf.spec.ts b/packages/benchmark/src/jsperf.spec.ts index 20d48fcf5..86dda21e9 100644 --- a/packages/benchmark/src/jsperf.spec.ts +++ b/packages/benchmark/src/jsperf.spec.ts @@ -10,7 +10,7 @@ import { expect, test } from '@jest/globals'; import { f, getClassSchema, jsonSerializer, Patcher } from '@deepkit/type'; -import { BenchSuite } from './bench'; +import { BenchSuite } from './bench.js'; test.only('nope', () => { }); diff --git a/packages/benchmark/src/language/bigint.bench.ts b/packages/benchmark/src/language/bigint.bench.ts index adb0a4d44..59a8a0f84 100644 --- a/packages/benchmark/src/language/bigint.bench.ts +++ b/packages/benchmark/src/language/bigint.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; import { createHash } from 'crypto'; function bufToBigint(buf: Buffer): bigint { diff --git a/packages/benchmark/src/language/crypto.bench.ts b/packages/benchmark/src/language/crypto.bench.ts index f49378b63..aee0ad2db 100644 --- a/packages/benchmark/src/language/crypto.bench.ts +++ b/packages/benchmark/src/language/crypto.bench.ts @@ -9,7 +9,7 @@ */ import { randomBytes } from 'crypto'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export function main() { const bench = new BenchSuite('crypto'); diff --git a/packages/benchmark/src/language/is-array.bench.ts b/packages/benchmark/src/language/is-array.bench.ts index fa94d506e..da854f54b 100644 --- a/packages/benchmark/src/language/is-array.bench.ts +++ b/packages/benchmark/src/language/is-array.bench.ts @@ -9,7 +9,7 @@ */ import { isArray } from '@deepkit/core'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const suite = new BenchSuite('isArray', 3); diff --git a/packages/benchmark/src/language/map.bench.ts b/packages/benchmark/src/language/map.bench.ts index 4ebea5a11..752a08e95 100644 --- a/packages/benchmark/src/language/map.bench.ts +++ b/packages/benchmark/src/language/map.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from "../bench"; +import { BenchSuite } from "../bench.js"; export function main() { diff --git a/packages/benchmark/src/language/pass-args.bench.ts b/packages/benchmark/src/language/pass-args.bench.ts index ac584108f..963cd7503 100644 --- a/packages/benchmark/src/language/pass-args.bench.ts +++ b/packages/benchmark/src/language/pass-args.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export function main() { const bench = new BenchSuite('map'); diff --git a/packages/benchmark/src/language/prototype.bench.ts b/packages/benchmark/src/language/prototype.bench.ts index e87bbaec1..7de65a936 100644 --- a/packages/benchmark/src/language/prototype.bench.ts +++ b/packages/benchmark/src/language/prototype.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export function main() { const bench = new BenchSuite('prototype'); diff --git a/packages/benchmark/src/language/string.bench.ts b/packages/benchmark/src/language/string.bench.ts index 3721fabfa..6497e85a1 100644 --- a/packages/benchmark/src/language/string.bench.ts +++ b/packages/benchmark/src/language/string.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export function main() { const bench = new BenchSuite('string'); diff --git a/packages/benchmark/src/orm/change-detection.bench.ts b/packages/benchmark/src/orm/change-detection.bench.ts index 7880ae81b..a454acb12 100644 --- a/packages/benchmark/src/orm/change-detection.bench.ts +++ b/packages/benchmark/src/orm/change-detection.bench.ts @@ -10,7 +10,7 @@ import { plainToClass, t } from '@deepkit/type'; import { buildChanges, getClassState, getInstanceState, getJITConverterForSnapshot } from '@deepkit/orm'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const schema = t.schema({ diff --git a/packages/benchmark/src/orm/converter.benc.ts b/packages/benchmark/src/orm/converter.benc.ts index 41a65a836..8f64bf2f1 100644 --- a/packages/benchmark/src/orm/converter.benc.ts +++ b/packages/benchmark/src/orm/converter.benc.ts @@ -10,7 +10,7 @@ import { getClassSchema, jsonSerializer, t } from '@deepkit/type'; import { getJITConverterForSnapshot, getPrimaryKeyExtractor, getPrimaryKeyHashGenerator } from '@deepkit/orm'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; class Image { @t title: string = ''; diff --git a/packages/benchmark/src/orm/end-to-end/mongo/deepkit-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/deepkit-10k.bench.ts index befb6cd20..803e0de97 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/deepkit-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/deepkit-10k.bench.ts @@ -11,7 +11,7 @@ import { MongoId, PrimaryKey } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { MongoDatabaseAdapter } from '@deepkit/mongo'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; export class Model { public _id: MongoId & PrimaryKey = ''; diff --git a/packages/benchmark/src/orm/end-to-end/mongo/mikro-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/mikro-orm-10k.bench.ts index a3a4f1f70..9d6b6ea70 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/mikro-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/mikro-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Entity as MikroEntity, MikroORM, PrimaryKey, Property, ReflectMetadataProvider } from 'mikro-orm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @MikroEntity({ collection: 'mikro' }) export class MikroModel { diff --git a/packages/benchmark/src/orm/end-to-end/mongo/mongo-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/mongo-10k.bench.ts index 2b0b36b8e..44862fb4e 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/mongo-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/mongo-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { MongoClient } from 'mongodb'; diff --git a/packages/benchmark/src/orm/end-to-end/mongo/mongoose-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/mongoose-10k.bench.ts index b1a403191..dc63cc269 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/mongoose-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/mongoose-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import mongoose from 'mongoose'; const { Schema } = mongoose; diff --git a/packages/benchmark/src/orm/end-to-end/mongo/prisma-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/prisma-10k.bench.ts index 2292778a3..c03e75fdf 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/prisma-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/prisma-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { spawnSync } from 'child_process'; export async function main() { @@ -20,7 +20,7 @@ export async function main() { spawnSync(`./node_modules/.bin/prisma generate --schema src/orm/end-to-end/mongo/model.prisma`, { stdio: 'inherit', shell: true }); // spawnSync(`./node_modules/.bin/prisma db push --schema=src/orm/end-to-end/mongo/model.prisma --force-reset`, {stdio: 'inherit', shell: true}); - const {PrismaClient} = await import('@prisma/client'); + const {PrismaClient} = await import('@prisma/client.js'); const prisma = new PrismaClient(); const bench = new BenchSuite('prisma'); diff --git a/packages/benchmark/src/orm/end-to-end/mongo/type-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mongo/type-orm-10k.bench.ts index 818dedd4d..b80ae7c4c 100644 --- a/packages/benchmark/src/orm/end-to-end/mongo/type-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mongo/type-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Column, createConnection, Entity as TypeOrmEntity, ObjectIdColumn } from 'typeorm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @TypeOrmEntity() export class TypeOrmModel { diff --git a/packages/benchmark/src/orm/end-to-end/mysql/deepkit-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mysql/deepkit-10k.bench.ts index 05369b7f4..bdbb0e86f 100644 --- a/packages/benchmark/src/orm/end-to-end/mysql/deepkit-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mysql/deepkit-10k.bench.ts @@ -11,7 +11,7 @@ import { PrimaryKey, entity } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { MySQLDatabaseAdapter } from '@deepkit/mysql'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @entity.name('deepkit') export class DeepkitModel { diff --git a/packages/benchmark/src/orm/end-to-end/mysql/mikro-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mysql/mikro-orm-10k.bench.ts index b9a3a80c2..a7f5bce81 100644 --- a/packages/benchmark/src/orm/end-to-end/mysql/mikro-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mysql/mikro-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Entity as MikroEntity, MikroORM, PrimaryKey, Property, ReflectMetadataProvider } from 'mikro-orm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @MikroEntity({ collection: 'mikro' }) export class MikroModel { diff --git a/packages/benchmark/src/orm/end-to-end/mysql/prisma-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mysql/prisma-10k.bench.ts index 4989b65a1..594fc000e 100644 --- a/packages/benchmark/src/orm/end-to-end/mysql/prisma-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mysql/prisma-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { spawnSync } from 'child_process'; @@ -19,7 +19,7 @@ export async function main() { spawnSync(`./node_modules/.bin/prisma generate --schema src/orm/end-to-end/mysql/model.prisma`, {stdio: 'inherit', shell: true}); spawnSync(`./node_modules/.bin/prisma db push --schema=src/orm/end-to-end/mysql/model.prisma --force-reset`, {stdio: 'inherit', shell: true}); - const {PrismaClient} = await import('@prisma/client'); + const {PrismaClient} = await import('@prisma/client.js'); const prisma = new PrismaClient(); const bench = new BenchSuite('prisma'); diff --git a/packages/benchmark/src/orm/end-to-end/mysql/sequelize-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mysql/sequelize-orm-10k.bench.ts index 0454499d2..4a73ded50 100644 --- a/packages/benchmark/src/orm/end-to-end/mysql/sequelize-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mysql/sequelize-orm-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { DataTypes, Model, Sequelize } from 'sequelize'; const sequelize = new Sequelize('mysql://root@localhost/default', { diff --git a/packages/benchmark/src/orm/end-to-end/mysql/type-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/mysql/type-orm-10k.bench.ts index 655009b8c..8432747a8 100644 --- a/packages/benchmark/src/orm/end-to-end/mysql/type-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/mysql/type-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Column, createConnection, Entity as TypeOrmEntity, PrimaryGeneratedColumn } from 'typeorm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @TypeOrmEntity() export class TypeOrmModel { diff --git a/packages/benchmark/src/orm/end-to-end/postgresql/deepkit-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/postgresql/deepkit-10k.bench.ts index 5074b8247..94b3871e0 100644 --- a/packages/benchmark/src/orm/end-to-end/postgresql/deepkit-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/postgresql/deepkit-10k.bench.ts @@ -11,8 +11,8 @@ import { PrimaryKey, entity } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { PostgresDatabaseAdapter } from '@deepkit/postgres'; -import { BenchSuite } from '../../../bench'; -import { Model } from '../mongo/deepkit-10k.bench'; +import { BenchSuite } from '../../../bench.js'; +import { Model } from '../mongo/deepkit-10k.bench.js'; @entity.name('deepkit') export class DeepkitModel { diff --git a/packages/benchmark/src/orm/end-to-end/postgresql/mikro-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/postgresql/mikro-orm-10k.bench.ts index d30a24097..bbd12a8fb 100644 --- a/packages/benchmark/src/orm/end-to-end/postgresql/mikro-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/postgresql/mikro-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Entity as MikroEntity, MikroORM, PrimaryKey, Property, ReflectMetadataProvider } from 'mikro-orm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @MikroEntity({ collection: 'mikro' }) export class MikroModel { diff --git a/packages/benchmark/src/orm/end-to-end/postgresql/prisma-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/postgresql/prisma-10k.bench.ts index 6e238c62f..dcf20d202 100644 --- a/packages/benchmark/src/orm/end-to-end/postgresql/prisma-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/postgresql/prisma-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { spawnSync } from 'child_process'; export async function main() { @@ -18,7 +18,7 @@ export async function main() { spawnSync(`./node_modules/.bin/prisma generate --schema src/orm/end-to-end/postgresql/model.prisma`, {stdio: 'inherit', shell: true}); spawnSync(`./node_modules/.bin/prisma db push --schema=src/orm/end-to-end/postgresql/model.prisma --force-reset`, {stdio: 'inherit', shell: true}); - const {PrismaClient} = await import('@prisma/client'); + const {PrismaClient} = await import('@prisma/client.js'); const prisma = new PrismaClient(); const bench = new BenchSuite('prisma'); diff --git a/packages/benchmark/src/orm/end-to-end/postgresql/sequelize-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/postgresql/sequelize-orm-10k.bench.ts index f50263b95..b78621920 100644 --- a/packages/benchmark/src/orm/end-to-end/postgresql/sequelize-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/postgresql/sequelize-orm-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { DataTypes, Model, Sequelize } from 'sequelize'; const sequelize = new Sequelize('postgres://postgres@localhost/postgres', { diff --git a/packages/benchmark/src/orm/end-to-end/postgresql/type-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/postgresql/type-orm-10k.bench.ts index 52939a471..0aead2de8 100644 --- a/packages/benchmark/src/orm/end-to-end/postgresql/type-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/postgresql/type-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Column, createConnection, Entity as TypeOrmEntity, PrimaryGeneratedColumn } from 'typeorm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @TypeOrmEntity() export class TypeOrmModel { diff --git a/packages/benchmark/src/orm/end-to-end/sqlite/deepkit-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/sqlite/deepkit-10k.bench.ts index fe115f591..5fbb8000e 100644 --- a/packages/benchmark/src/orm/end-to-end/sqlite/deepkit-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/sqlite/deepkit-10k.bench.ts @@ -11,7 +11,7 @@ import { AutoIncrement, PrimaryKey } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { SQLiteDatabaseAdapter } from '@deepkit/sqlite'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; // @entity.name('deepkit') export class DeepkitModel { diff --git a/packages/benchmark/src/orm/end-to-end/sqlite/mikro-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/sqlite/mikro-orm-10k.bench.ts index c54f8818b..9f4b3c362 100644 --- a/packages/benchmark/src/orm/end-to-end/sqlite/mikro-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/sqlite/mikro-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Entity as MikroEntity, MikroORM, PrimaryKey, Property, ReflectMetadataProvider } from 'mikro-orm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @MikroEntity({ collection: 'mikro' }) export class MikroModel { diff --git a/packages/benchmark/src/orm/end-to-end/sqlite/prisma-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/sqlite/prisma-10k.bench.ts index 39e7864a3..be90942ff 100644 --- a/packages/benchmark/src/orm/end-to-end/sqlite/prisma-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/sqlite/prisma-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { spawnSync } from 'child_process'; export async function main() { @@ -18,7 +18,7 @@ export async function main() { spawnSync(`./node_modules/.bin/prisma generate --schema src/orm/end-to-end/sqlite/model.prisma`, {stdio: 'inherit', shell: true}); spawnSync(`./node_modules/.bin/prisma db push --schema=src/orm/end-to-end/sqlite/model.prisma --force-reset`, {stdio: 'inherit', shell: true}); - const {PrismaClient} = await import('@prisma/client'); + const {PrismaClient} = await import('@prisma/client.js'); const prisma = new PrismaClient(); const bench = new BenchSuite('prisma'); let created = false; diff --git a/packages/benchmark/src/orm/end-to-end/sqlite/sequelize-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/sqlite/sequelize-orm-10k.bench.ts index 40ffb0b96..b2f5384b8 100644 --- a/packages/benchmark/src/orm/end-to-end/sqlite/sequelize-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/sqlite/sequelize-orm-10k.bench.ts @@ -9,7 +9,7 @@ */ import 'reflect-metadata'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; import { DataTypes, Model, Sequelize } from 'sequelize'; const sequelize = new Sequelize('sqlite::memory:', { diff --git a/packages/benchmark/src/orm/end-to-end/sqlite/type-orm-10k.bench.ts b/packages/benchmark/src/orm/end-to-end/sqlite/type-orm-10k.bench.ts index 5fc75c361..5a1ccf781 100644 --- a/packages/benchmark/src/orm/end-to-end/sqlite/type-orm-10k.bench.ts +++ b/packages/benchmark/src/orm/end-to-end/sqlite/type-orm-10k.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { Column, createConnection, Entity as TypeOrmEntity, PrimaryGeneratedColumn } from 'typeorm'; -import { BenchSuite } from '../../../bench'; +import { BenchSuite } from '../../../bench.js'; @TypeOrmEntity() export class TypeOrmModel { diff --git a/packages/benchmark/src/rpc/grpc/grpc-js.bench.ts b/packages/benchmark/src/rpc/grpc/grpc-js.bench.ts index 749522b85..10ff2690e 100644 --- a/packages/benchmark/src/rpc/grpc/grpc-js.bench.ts +++ b/packages/benchmark/src/rpc/grpc/grpc-js.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; const grpc = require('@grpc/grpc-js'); const protoLoader = require('@grpc/proto-loader'); diff --git a/packages/benchmark/src/rpc/parser.bench.ts b/packages/benchmark/src/rpc/parser.bench.ts index 91e427e9b..608b0d13a 100644 --- a/packages/benchmark/src/rpc/parser.bench.ts +++ b/packages/benchmark/src/rpc/parser.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from "../bench"; +import { BenchSuite } from "../bench.js"; export async function main() { @@ -17,4 +17,4 @@ export async function main() { }); suite.run(); -} \ No newline at end of file +} diff --git a/packages/benchmark/src/rpc/rpc-roundtrip.bench.ts b/packages/benchmark/src/rpc/rpc-roundtrip.bench.ts index 67eb6415c..b62e7b4bd 100644 --- a/packages/benchmark/src/rpc/rpc-roundtrip.bench.ts +++ b/packages/benchmark/src/rpc/rpc-roundtrip.bench.ts @@ -9,7 +9,7 @@ */ import { createRpcMessage, DirectClient, readRpcMessage, rpc, rpcAction, RpcKernel } from '@deepkit/rpc'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { const bench1 = new BenchSuite('protocol'); diff --git a/packages/benchmark/src/rpc/rpc-rountrtip-peer.bench.ts b/packages/benchmark/src/rpc/rpc-rountrtip-peer.bench.ts index ac04d59f0..db46033c1 100644 --- a/packages/benchmark/src/rpc/rpc-rountrtip-peer.bench.ts +++ b/packages/benchmark/src/rpc/rpc-rountrtip-peer.bench.ts @@ -10,7 +10,7 @@ import { ClassType } from '@deepkit/core'; import { DirectClient, rpc, RpcKernel } from '@deepkit/rpc'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; class SimpleInjector { get(classType: ClassType) { diff --git a/packages/benchmark/src/rpc/rpc-tcp-server.bench.ts b/packages/benchmark/src/rpc/rpc-tcp-server.bench.ts index 53fdbe477..94a8d6698 100644 --- a/packages/benchmark/src/rpc/rpc-tcp-server.bench.ts +++ b/packages/benchmark/src/rpc/rpc-tcp-server.bench.ts @@ -10,7 +10,7 @@ import { rpc, RpcClient, RpcKernel } from '@deepkit/rpc'; import { TcpRpcClientAdapter, TcpRpcServer } from '@deepkit/rpc-tcp'; -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; export async function main() { interface ControllerInterface { diff --git a/packages/benchmark/src/type/memoize.bench.ts b/packages/benchmark/src/type/memoize.bench.ts index 13d4a4772..b823b60e5 100644 --- a/packages/benchmark/src/type/memoize.bench.ts +++ b/packages/benchmark/src/type/memoize.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from '../bench'; +import { BenchSuite } from '../bench.js'; const memoize = require('memoizee'); diff --git a/packages/benchmark/src/type/reflection/processor.bench.ts b/packages/benchmark/src/type/reflection/processor.bench.ts index 991ebb39e..3b4a078ed 100644 --- a/packages/benchmark/src/type/reflection/processor.bench.ts +++ b/packages/benchmark/src/type/reflection/processor.bench.ts @@ -1,4 +1,4 @@ -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; import { pack, Processor, ReflectionOp, typeOf } from '@deepkit/type'; export async function main() { diff --git a/packages/benchmark/src/type/serialization/medium-class-transformer.bench.ts b/packages/benchmark/src/type/serialization/medium-class-transformer.bench.ts index 0b6e6676d..4fc66ab4c 100644 --- a/packages/benchmark/src/type/serialization/medium-class-transformer.bench.ts +++ b/packages/benchmark/src/type/serialization/medium-class-transformer.bench.ts @@ -10,7 +10,7 @@ import 'reflect-metadata'; import { classToPlain, Exclude as ctExclude, plainToClass, Transform, Type } from 'class-transformer'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; export class SubModel { label: string; diff --git a/packages/benchmark/src/type/serialization/medium-deepkit.bench.ts b/packages/benchmark/src/type/serialization/medium-deepkit.bench.ts index b086f9cc2..b6de204a4 100644 --- a/packages/benchmark/src/type/serialization/medium-deepkit.bench.ts +++ b/packages/benchmark/src/type/serialization/medium-deepkit.bench.ts @@ -9,7 +9,7 @@ */ import { deserializeFunction, Excluded, serializeFunction } from '@deepkit/type'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; export class SubModel { age?: number; diff --git a/packages/benchmark/src/type/serialization/small-cerialize.bench.ts b/packages/benchmark/src/type/serialization/small-cerialize.bench.ts index 815712101..dfbf8d105 100644 --- a/packages/benchmark/src/type/serialization/small-cerialize.bench.ts +++ b/packages/benchmark/src/type/serialization/small-cerialize.bench.ts @@ -9,7 +9,7 @@ */ import { autoserializeAs, autoserializeAsArray, Deserialize, Serialize } from 'cerialize'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; export class Model { @autoserializeAs(Number) id?: number; diff --git a/packages/benchmark/src/type/serialization/small-class-transformer.bench.ts b/packages/benchmark/src/type/serialization/small-class-transformer.bench.ts index 5912e3d7e..f468afdad 100644 --- a/packages/benchmark/src/type/serialization/small-class-transformer.bench.ts +++ b/packages/benchmark/src/type/serialization/small-class-transformer.bench.ts @@ -12,7 +12,7 @@ import { classToPlain, plainToClass } from "class-transformer"; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; export class Model { public id?: number; diff --git a/packages/benchmark/src/type/serialization/small-deepkit.bench.ts b/packages/benchmark/src/type/serialization/small-deepkit.bench.ts index 81707be56..364be482d 100644 --- a/packages/benchmark/src/type/serialization/small-deepkit.bench.ts +++ b/packages/benchmark/src/type/serialization/small-deepkit.bench.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; import { serializeFunction, deserializeFunction } from '@deepkit/type'; class Model { diff --git a/packages/benchmark/src/type/serialization/small-io-ts.bench.ts b/packages/benchmark/src/type/serialization/small-io-ts.bench.ts index ceab00d54..a17e694f6 100644 --- a/packages/benchmark/src/type/serialization/small-io-ts.bench.ts +++ b/packages/benchmark/src/type/serialization/small-io-ts.bench.ts @@ -9,7 +9,7 @@ */ import * as t from 'io-ts'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; const decoderIoTS = t.type({ ready: t.boolean, diff --git a/packages/benchmark/src/type/validation/small-avj.bench.ts b/packages/benchmark/src/type/validation/small-avj.bench.ts index 64c9d1f26..d4255ba47 100644 --- a/packages/benchmark/src/type/validation/small-avj.bench.ts +++ b/packages/benchmark/src/type/validation/small-avj.bench.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { good } from './validation'; +import { good } from './validation.js'; import Ajv from 'ajv'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; //todo: note deeplyNested is missing, so not complete validation yet. diff --git a/packages/benchmark/src/type/validation/small-class-validator.bench.ts b/packages/benchmark/src/type/validation/small-class-validator.bench.ts index 729a4ca2d..e8ee86c91 100644 --- a/packages/benchmark/src/type/validation/small-class-validator.bench.ts +++ b/packages/benchmark/src/type/validation/small-class-validator.bench.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; import { IsArray, IsBoolean, IsInt, IsNegative, IsString, Max, validate, ValidateNested, } from 'class-validator'; -import { good } from './validation'; +import { good } from './validation.js'; export class Nested { @IsString() diff --git a/packages/benchmark/src/type/validation/small-deepkit.bench.ts b/packages/benchmark/src/type/validation/small-deepkit.bench.ts index 0d86a242f..d9fd45e82 100644 --- a/packages/benchmark/src/type/validation/small-deepkit.bench.ts +++ b/packages/benchmark/src/type/validation/small-deepkit.bench.ts @@ -9,8 +9,8 @@ */ import { Maximum, Negative, guard } from '@deepkit/type'; -import { good } from './validation'; -import { BenchSuite } from '../../bench'; +import { good } from './validation.js'; +import { BenchSuite } from '../../bench.js'; interface Model { number: number; diff --git a/packages/benchmark/src/type/validation/small-io-ts.bench.ts b/packages/benchmark/src/type/validation/small-io-ts.bench.ts index d964f8bf1..b76cd9eeb 100644 --- a/packages/benchmark/src/type/validation/small-io-ts.bench.ts +++ b/packages/benchmark/src/type/validation/small-io-ts.bench.ts @@ -11,8 +11,8 @@ import * as t from 'io-ts'; import * as G from 'io-ts/lib/Guard'; import { isRight } from 'fp-ts/Either'; -import { good } from './validation'; -import { BenchSuite } from '../../bench'; +import { good } from './validation.js'; +import { BenchSuite } from '../../bench.js'; const decoderIoTS = t.type({ number: t.number, diff --git a/packages/benchmark/src/type/validation/small-quartet.bench.ts b/packages/benchmark/src/type/validation/small-quartet.bench.ts index a4dc3f742..5c84a12e8 100644 --- a/packages/benchmark/src/type/validation/small-quartet.bench.ts +++ b/packages/benchmark/src/type/validation/small-quartet.bench.ts @@ -8,10 +8,10 @@ * You should have received a copy of the MIT License along with this program. */ -import { good } from './validation'; +import { good } from './validation.js'; //we use `e` and not `v` because deepkit/type supports out of the box error explanations, which quartet does only with `e`. import { e } from 'quartet'; -import { BenchSuite } from '../../bench'; +import { BenchSuite } from '../../bench.js'; const QuartetModelChecker = e({ number: e.number, diff --git a/packages/benchmark/tsconfig.json b/packages/benchmark/tsconfig.json index ac13d44a5..3c7c806fb 100644 --- a/packages/benchmark/tsconfig.json +++ b/packages/benchmark/tsconfig.json @@ -25,6 +25,9 @@ "index.ts" ], "references": [ + { + "path": "../platform/tsconfig.json" + }, { "path": "../app/tsconfig.json" }, @@ -37,6 +40,9 @@ { "path": "../core/tsconfig.json" }, + { + "path": "../core-rxjs/tsconfig.json" + }, { "path": "../framework/tsconfig.json" }, @@ -73,8 +79,17 @@ { "path": "../template/tsconfig.json" }, + { + "path": "../logger/tsconfig.json" + }, + { + "path": "../stopwatch/tsconfig.json" + }, { "path": "../type/tsconfig.json" + }, + { + "path": "../type-compiler/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/broker/index.ts b/packages/broker/index.ts index d688868b1..2613c50f3 100644 --- a/packages/broker/index.ts +++ b/packages/broker/index.ts @@ -8,6 +8,6 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/client'; -export * from './src/kernel'; -export * from './src/model'; +export * from './src/client.js'; +export * from './src/kernel.js'; +export * from './src/model.js'; diff --git a/packages/broker/package.json b/packages/broker/package.json index dfa61ccfb..bb76d84e6 100644 --- a/packages/broker/package.json +++ b/packages/broker/package.json @@ -35,7 +35,10 @@ "@deepkit/rpc": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/broker/src/client.ts b/packages/broker/src/client.ts index a588899de..818802bf0 100644 --- a/packages/broker/src/client.ts +++ b/packages/broker/src/client.ts @@ -7,12 +7,12 @@ * * You should have received a copy of the MIT License along with this program. */ - -import { BSONDeserializer, BSONSerializer, deserializeBSONWithoutOptimiser, getBSONDeserializer, getBSONSerializer } from '@deepkit/bson'; +import type { BSONDeserializer, BSONSerializer } from '@deepkit/bson'; +import { deserializeBSONWithoutOptimiser, getBSONDeserializer, getBSONSerializer } from '@deepkit/bson'; import { arrayRemoveItem, asyncOperation, ClassType } from '@deepkit/core'; import { AsyncSubscription } from '@deepkit/core-rxjs'; import { createRpcMessage, RpcBaseClient, RpcDirectClientAdapter, RpcMessage, RpcMessageRouteType } from '@deepkit/rpc'; -import { BrokerKernel } from './kernel'; +import { BrokerKernel } from './kernel.js'; import { brokerDelete, brokerEntityFields, @@ -27,7 +27,7 @@ import { brokerSet, brokerSubscribe, BrokerType -} from './model'; +} from './model.js'; import { ReceiveType, ReflectionClass, ReflectionKind, resolveReceiveType, Type, TypePropertySignature } from '@deepkit/type'; export class BrokerChannel { diff --git a/packages/broker/src/kernel.ts b/packages/broker/src/kernel.ts index 2c092dd40..81ee86476 100644 --- a/packages/broker/src/kernel.ts +++ b/packages/broker/src/kernel.ts @@ -24,7 +24,7 @@ import { brokerSet, brokerSubscribe, BrokerType -} from './model'; +} from './model.js'; export class BrokerConnection extends RpcKernelBaseConnection { protected subscribedChannels: string[] = []; diff --git a/packages/broker/tests/kernel.spec.ts b/packages/broker/tests/kernel.spec.ts index 230ad1790..8386c327f 100644 --- a/packages/broker/tests/kernel.spec.ts +++ b/packages/broker/tests/kernel.spec.ts @@ -2,8 +2,8 @@ import { sleep } from '@deepkit/core'; import { AsyncSubscription } from '@deepkit/core-rxjs'; import { expect, test } from '@jest/globals'; import { BehaviorSubject } from 'rxjs'; -import { BrokerDirectClient } from '../src/client'; -import { BrokerKernel } from '../src/kernel'; +import { BrokerDirectClient } from '../src/client.js'; +import { BrokerKernel } from '../src/kernel.js'; Error.stackTraceLimit = 1000; diff --git a/packages/broker/tsconfig.json b/packages/broker/tsconfig.json index 68681af67..f02821c6e 100644 --- a/packages/broker/tsconfig.json +++ b/packages/broker/tsconfig.json @@ -38,4 +38,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/bson/index.ts b/packages/bson/index.ts index f368a4d45..aebed928f 100644 --- a/packages/bson/index.ts +++ b/packages/bson/index.ts @@ -8,9 +8,11 @@ * You should have received a copy of the MIT License along with this program. */ -export { ObjectId } from './src/model'; -export { deserializeBSONWithoutOptimiser, ParserV2 as Parser } from './src/bson-parser'; -export { getBSONDeserializer, deserializeBSON, BSONDeserializer } from './src/bson-deserializer'; +export { ObjectId } from './src/model.js'; +export { deserializeBSONWithoutOptimiser, ParserV2 as Parser } from './src/bson-parser.js'; +export type { BSONDeserializer } from './src/bson-deserializer.js'; +export { getBSONDeserializer, deserializeBSON } from './src/bson-deserializer.js'; +export type { BSONSerializer } from './src/bson-serializer.js'; export { - stringByteLength, BSONSerializer, createBSONSizer, getBSONSizer, getBSONSerializer, bsonBinarySerializer, serializeBSON, serializeWithoutOptimiser, Writer, BSONBinarySerializer, ValueWithBSONSerializer -} from './src/bson-serializer'; + stringByteLength, createBSONSizer, getBSONSizer, getBSONSerializer, bsonBinarySerializer, serializeBSON, serializeWithoutOptimiser, Writer, BSONBinarySerializer, ValueWithBSONSerializer +} from './src/bson-serializer.js'; diff --git a/packages/bson/package-lock.json b/packages/bson/package-lock.json index a8c2c9ea7..34ad76f95 100644 --- a/packages/bson/package-lock.json +++ b/packages/bson/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/bson", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "devDependencies": { "@types/bson": "^4.0.3", diff --git a/packages/bson/package.json b/packages/bson/package.json index 409c46dd1..86871ae3f 100644 --- a/packages/bson/package.json +++ b/packages/bson/package.json @@ -37,7 +37,10 @@ "bson": "^4.4.0", "bson-ext": "^4.0.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/bson/src/bson-deserializer-templates.ts b/packages/bson/src/bson-deserializer-templates.ts index af32ec5f4..44359b99b 100644 --- a/packages/bson/src/bson-deserializer-templates.ts +++ b/packages/bson/src/bson-deserializer-templates.ts @@ -39,8 +39,8 @@ import { TypeUnion, uuidAnnotation } from '@deepkit/type'; -import { seekElementSize } from './continuation'; -import { BSONType, digitByteSize, isSerializable } from './utils'; +import { seekElementSize } from './continuation.js'; +import { BSONType, digitByteSize, isSerializable } from './utils.js'; function getNameComparator(name: string): string { //todo: support utf8 names diff --git a/packages/bson/src/bson-deserializer.ts b/packages/bson/src/bson-deserializer.ts index 6c6487ce2..92514e2ae 100644 --- a/packages/bson/src/bson-deserializer.ts +++ b/packages/bson/src/bson-deserializer.ts @@ -1,8 +1,8 @@ import { executeTemplates, getTypeJitContainer, JitStack, NamingStrategy, ReceiveType, resolveReceiveType, TemplateState, Type } from '@deepkit/type'; import { CompilerContext, toFastProperties } from '@deepkit/core'; -import { seekElementSize } from './continuation'; -import { BSONBinarySerializer, bsonBinarySerializer } from './bson-serializer'; -import { ParserV2 } from './bson-parser'; +import { seekElementSize } from './continuation.js'; +import { BSONBinarySerializer, bsonBinarySerializer } from './bson-serializer.js'; +import { ParserV2 } from './bson-parser.js'; function createBSONDeserializer(type: Type, serializer: BSONBinarySerializer, namingStrategy: NamingStrategy = new NamingStrategy(), path: string = '', jitStack: JitStack = new JitStack()) { const compiler = new CompilerContext(); diff --git a/packages/bson/src/bson-parser.ts b/packages/bson/src/bson-parser.ts index 48255c6fe..07afd522c 100644 --- a/packages/bson/src/bson-parser.ts +++ b/packages/bson/src/bson-parser.ts @@ -8,10 +8,10 @@ * You should have received a copy of the MIT License along with this program. */ -import { BSON_BINARY_SUBTYPE_BYTE_ARRAY, BSON_BINARY_SUBTYPE_UUID, BSONType, digitByteSize, TWO_PWR_32_DBL_N } from './utils'; -import { buildStringDecoder, decodeUTF8 } from './strings'; +import { BSON_BINARY_SUBTYPE_BYTE_ARRAY, BSON_BINARY_SUBTYPE_UUID, BSONType, digitByteSize, TWO_PWR_32_DBL_N } from './utils.js'; +import { buildStringDecoder, decodeUTF8 } from './strings.js'; import { nodeBufferToArrayBuffer, ReflectionKind, SerializationError, Type } from '@deepkit/type'; -import { hexTable } from './model'; +import { hexTable } from './model.js'; declare var Buffer: any; diff --git a/packages/bson/src/bson-serializer.ts b/packages/bson/src/bson-serializer.ts index 18fd1be57..9ba7ace70 100644 --- a/packages/bson/src/bson-serializer.ts +++ b/packages/bson/src/bson-serializer.ts @@ -87,10 +87,10 @@ import { deserializeTuple, deserializeUndefined, deserializeUnion -} from './bson-deserializer-templates'; -import { seekElementSize } from './continuation'; -import { BSONError } from './model'; -import { BSON_BINARY_SUBTYPE_DEFAULT, BSON_BINARY_SUBTYPE_UUID, BSONType, digitByteSize, isSerializable, TWO_PWR_32_DBL_N } from './utils'; +} from './bson-deserializer-templates.js'; +import { seekElementSize } from './continuation.js'; +import { BSONError } from './model.js'; +import { BSON_BINARY_SUBTYPE_DEFAULT, BSON_BINARY_SUBTYPE_UUID, BSONType, digitByteSize, isSerializable, TWO_PWR_32_DBL_N } from './utils.js'; export function createBuffer(size: number): Uint8Array { return 'undefined' !== typeof Buffer && 'function' === typeof Buffer.allocUnsafe ? Buffer.allocUnsafe(size) : new Uint8Array(size); diff --git a/packages/bson/src/continuation.ts b/packages/bson/src/continuation.ts index 787d6325b..e0033ab90 100644 --- a/packages/bson/src/continuation.ts +++ b/packages/bson/src/continuation.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseParser } from './bson-parser'; +import { BaseParser } from './bson-parser.js'; import { BSON_BINARY_SUBTYPE_BYTE_ARRAY, BSON_DATA_ARRAY, @@ -33,8 +33,8 @@ import { BSON_DATA_TIMESTAMP, BSON_DATA_UNDEFINED, BSONType -} from './utils'; -import { BSONError } from './model'; +} from './utils.js'; +import { BSONError } from './model.js'; export function seekElementSize(elementType: number, parser: BaseParser): any { switch (elementType) { diff --git a/packages/bson/src/strings.ts b/packages/bson/src/strings.ts index b87e1a29a..0f0b2489b 100644 --- a/packages/bson/src/strings.ts +++ b/packages/bson/src/strings.ts @@ -9,7 +9,7 @@ */ import { CompilerContext } from '@deepkit/core'; -import { BSONError } from './model'; +import { BSONError } from './model.js'; const decoder = new TextDecoder("utf-8"); export function decodeUTF8(buffer: Uint8Array, off: number = 0, end: number) { diff --git a/packages/bson/tests/bson-parser.spec.ts b/packages/bson/tests/bson-parser.spec.ts index 08c0d0602..fd3be7667 100644 --- a/packages/bson/tests/bson-parser.spec.ts +++ b/packages/bson/tests/bson-parser.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import bson, { Binary } from 'bson'; -import { deserializeBSON, getBSONDeserializer } from '../src/bson-deserializer'; +import { deserializeBSON, getBSONDeserializer } from '../src/bson-deserializer.js'; import { BinaryBigInt, copyAndSetParent, @@ -16,7 +16,7 @@ import { UUID } from '@deepkit/type'; import { getClassName } from '@deepkit/core'; -import { serializeWithoutOptimiser } from '../src/bson-serializer'; +import { serializeWithoutOptimiser } from '../src/bson-serializer.js'; const { deserialize, serialize } = bson; diff --git a/packages/bson/tests/bson-serialize.spec.ts b/packages/bson/tests/bson-serialize.spec.ts index b7198f6c3..fe72a2b7e 100644 --- a/packages/bson/tests/bson-serialize.spec.ts +++ b/packages/bson/tests/bson-serialize.spec.ts @@ -1,11 +1,11 @@ import { expect, test } from '@jest/globals'; -import { getBSONSerializer, getBSONSizer, getValueSize, hexToByte, uuidStringToByte } from '../src/bson-serializer'; +import { getBSONSerializer, getBSONSizer, getValueSize, hexToByte, uuidStringToByte } from '../src/bson-serializer.js'; import { BinaryBigInt, createReference, Excluded, MongoId, nodeBufferToArrayBuffer, PrimaryKey, Reference, SignedBinaryBigInt, typeOf, uuid, UUID } from '@deepkit/type'; import bson from 'bson'; import { randomBytes } from 'crypto'; -import { BSON_BINARY_SUBTYPE_DEFAULT, BSONType } from '../src/utils'; -import { deserializeBSONWithoutOptimiser } from '../src/bson-parser'; -import { deserializeBSON } from '../src/bson-deserializer'; +import { BSON_BINARY_SUBTYPE_DEFAULT, BSONType } from '../src/utils.js'; +import { deserializeBSONWithoutOptimiser } from '../src/bson-parser.js'; +import { deserializeBSON } from '../src/bson-deserializer.js'; const { Binary, calculateObjectSize, deserialize, Long, ObjectId: OfficialObjectId, serialize } = bson; diff --git a/packages/bson/tests/type-spec.spec.ts b/packages/bson/tests/type-spec.spec.ts index 44a4edf7b..8028cd0fd 100644 --- a/packages/bson/tests/type-spec.spec.ts +++ b/packages/bson/tests/type-spec.spec.ts @@ -24,9 +24,9 @@ import { UUID } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { deserializeBSON } from '../src/bson-deserializer'; -import { deserializeBSONWithoutOptimiser } from '../src/bson-parser'; -import { serializeBSON, serializeWithoutOptimiser } from '../src/bson-serializer'; +import { deserializeBSON } from '../src/bson-deserializer.js'; +import { deserializeBSONWithoutOptimiser } from '../src/bson-parser.js'; +import { serializeBSON, serializeWithoutOptimiser } from '../src/bson-serializer.js'; (BigInt.prototype as any).toJSON = function () { return this.toString(); diff --git a/packages/bson/tsconfig.esm.json b/packages/bson/tsconfig.esm.json index c598c7896..bb9c87f5d 100644 --- a/packages/bson/tsconfig.esm.json +++ b/packages/bson/tsconfig.esm.json @@ -6,10 +6,10 @@ }, "references": [ { - "path": "../core/tsconfig.esm.json" + "path": "../crypto/tsconfig.json" }, { - "path": "../crypto/tsconfig.json" + "path": "../core/tsconfig.esm.json" }, { "path": "../type/tsconfig.esm.json" diff --git a/packages/bson/tsconfig.json b/packages/bson/tsconfig.json index 61cf5b9d3..e11f3b01c 100644 --- a/packages/bson/tsconfig.json +++ b/packages/bson/tsconfig.json @@ -24,13 +24,13 @@ ], "references": [ { - "path": "../core/tsconfig.json" + "path": "../crypto/tsconfig.json" }, { - "path": "../crypto/tsconfig.json" + "path": "../core/tsconfig.json" }, { "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/core-rxjs/index.ts b/packages/core-rxjs/index.ts index 89ae22973..aa2f7427b 100644 --- a/packages/core-rxjs/index.ts +++ b/packages/core-rxjs/index.ts @@ -8,5 +8,5 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/utils'; -export * from './src/timer'; +export * from './src/utils.js'; +export * from './src/timer.js'; diff --git a/packages/core-rxjs/package-lock.json b/packages/core-rxjs/package-lock.json index aeba73dba..d949d18a0 100644 --- a/packages/core-rxjs/package-lock.json +++ b/packages/core-rxjs/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/core-rxjs", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "license": "MIT", "devDependencies": { "rxjs": "~6.6.0" diff --git a/packages/core-rxjs/package.json b/packages/core-rxjs/package.json index a2ee609cb..47e27aefb 100644 --- a/packages/core-rxjs/package.json +++ b/packages/core-rxjs/package.json @@ -30,7 +30,10 @@ "@deepkit/core": "^1.0.1-alpha.75", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/core-rxjs/tests/index.spec.ts b/packages/core-rxjs/tests/index.spec.ts index fc259dda1..961b5cfe3 100644 --- a/packages/core-rxjs/tests/index.spec.ts +++ b/packages/core-rxjs/tests/index.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs'; -import { isBehaviorSubject, isSubject, nextValue, Subscriptions } from '../src/utils'; +import { isBehaviorSubject, isSubject, nextValue, Subscriptions } from '../src/utils.js'; test('nextValue subject', async () => { const subject = new Subject(); diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 2735bfe65..0c43befb1 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/core", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "dot-prop": "^5.1.1", diff --git a/packages/core/package.json b/packages/core/package.json index 30f78b682..484859ea2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -29,13 +29,13 @@ "scripts": { "build": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json" }, - "jest": { - "transform": { - "^.+\\.(ts|tsx)$": "ts-jest" - }, + "jest": { "moduleNameMapper": { "(.+)\\.js": "$1" }, + "transform": { + "^.+\\.(ts|tsx)$": "ts-jest" + }, "testMatch": [ "**/tests/**/*.spec.ts" ] diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index 134903376..ceeabbeb8 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -694,19 +694,3 @@ export function createDynamicClass(name: string, base?: ClassType): ClassType { export function isIterable(value: any): boolean { return isArray(value) || value instanceof Set || value instanceof Map; } - -/** - * Returns __filename, works in both cjs and esm. - */ -export function getCurrentFileName(): string { - const e = new Error; - const initiator = e.stack!.split('\n').slice(2, 3)[0]; - let path = /(?[^(\s]+):[0-9]+:[0-9]+/.exec(initiator)!.groups!.path; - if (path.indexOf('file') >= 0) { - path = new URL(path).pathname; - } - if (path[0] === '/' && process.platform === 'win32') { - path = path.slice(1); - } - return path; -} diff --git a/packages/core/tests/array.spec.ts b/packages/core/tests/array.spec.ts index 22b6a8e6a..48ede2f72 100644 --- a/packages/core/tests/array.spec.ts +++ b/packages/core/tests/array.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { arrayMoveItem } from '../src/array'; +import { arrayMoveItem } from '../src/array.js'; import { arrayClear, arrayHasItem, arrayRemoveItem } from '@deepkit/core'; diff --git a/packages/core/tests/compiler.spec.ts b/packages/core/tests/compiler.spec.ts index 72e1d913d..852116060 100644 --- a/packages/core/tests/compiler.spec.ts +++ b/packages/core/tests/compiler.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { CompilerContext } from '../src/compiler'; +import { CompilerContext } from '../src/compiler.js'; test('compiler', () => { const compiler = new CompilerContext(); diff --git a/packages/core/tests/core.spec.ts b/packages/core/tests/core.spec.ts index eb9b44a1e..70b419663 100644 --- a/packages/core/tests/core.spec.ts +++ b/packages/core/tests/core.spec.ts @@ -24,7 +24,7 @@ import { setPathValue, sleep, stringifyValueWithType -} from '../src/core'; +} from '../src/core.js'; class SimpleClass { constructor(public name: string) { diff --git a/packages/core/tests/decorators.spec.ts b/packages/core/tests/decorators.spec.ts index 5ba63196d..5bfb75321 100644 --- a/packages/core/tests/decorators.spec.ts +++ b/packages/core/tests/decorators.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { log, stack } from '../src/decorators'; -import { sleep } from '../src/core'; +import { log, stack } from '../src/decorators.js'; +import { sleep } from '../src/core.js'; test('test decorators @sync', async () => { class Test { diff --git a/packages/core/tests/enum.spec.ts b/packages/core/tests/enum.spec.ts index 4e8cbc989..1caa1890b 100644 --- a/packages/core/tests/enum.spec.ts +++ b/packages/core/tests/enum.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { getEnumLabels, getEnumValues } from '../src/enum'; +import { getEnumLabels, getEnumValues } from '../src/enum.js'; test('getEnumLabels numbered index', () => { enum MyEnum { diff --git a/packages/core/tests/iterator.spec.ts b/packages/core/tests/iterator.spec.ts index 8b82e88fe..bfc6d0dbc 100644 --- a/packages/core/tests/iterator.spec.ts +++ b/packages/core/tests/iterator.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { each, eachKey, eachPair } from '../src/iterators'; +import { each, eachKey, eachPair } from '../src/iterators.js'; test('test array', () => { const array: string[] = ['a', 'b', 'c']; diff --git a/packages/core/tests/lock.spec.ts b/packages/core/tests/lock.spec.ts index 200c8adea..7b50f4825 100644 --- a/packages/core/tests/lock.spec.ts +++ b/packages/core/tests/lock.spec.ts @@ -1,5 +1,5 @@ import { jest, expect, test, beforeAll } from '@jest/globals'; -import { Mutex, ProcessLock, ProcessLocker } from '../src/process-locker'; +import { Mutex, ProcessLock, ProcessLocker } from '../src/process-locker.js'; jest.setTimeout(20000); diff --git a/packages/core/tests/network.spec.ts b/packages/core/tests/network.spec.ts index 0ba52a3cc..b671703f0 100644 --- a/packages/core/tests/network.spec.ts +++ b/packages/core/tests/network.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { parseHost } from '../src/network'; +import { parseHost } from '../src/network.js'; test('parseHost', () => { { diff --git a/packages/core/tests/reflection.spec.ts b/packages/core/tests/reflection.spec.ts index adcf7a66a..31b15e91a 100644 --- a/packages/core/tests/reflection.spec.ts +++ b/packages/core/tests/reflection.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { extractMethodBody, extractParameters, removeStrings } from '../src/reflection'; +import { extractMethodBody, extractParameters, removeStrings } from '../src/reflection.js'; test('removeStrings', () => { diff --git a/packages/core/tests/utils.spec.ts b/packages/core/tests/utils.spec.ts index bfcba48f1..961a2dbf2 100644 --- a/packages/core/tests/utils.spec.ts +++ b/packages/core/tests/utils.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { urlJoin } from '../src/url'; +import { urlJoin } from '../src/url.js'; test('urlJoin', async () => { expect(urlJoin('base', 'path')).toBe('base/path'); diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index fbbd537fe..81d15bc3a 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -23,4 +23,4 @@ "tests" ], "references": [] -} +} \ No newline at end of file diff --git a/packages/create-app/files/app.ts b/packages/create-app/files/app.ts index 2bac95e84..a23390db4 100755 --- a/packages/create-app/files/app.ts +++ b/packages/create-app/files/app.ts @@ -3,11 +3,11 @@ import { App } from '@deepkit/app'; import { FrameworkModule } from '@deepkit/framework'; import { Logger, JSONTransport } from '@deepkit/logger'; -import { HelloWorldControllerCli } from './src/controller/hello-world.cli'; -import { HelloWorldControllerHttp } from './src/controller/hello-world.http'; -import { HelloWorldControllerRpc } from './src/controller/hello-world.rpc'; -import { Service } from './src/app/service'; -import { AppConfig } from './src/app/config'; +import { HelloWorldControllerCli } from './src/controller/hello-world.cli.js'; +import { HelloWorldControllerHttp } from './src/controller/hello-world.http.js'; +import { HelloWorldControllerRpc } from './src/controller/hello-world.rpc.js'; +import { Service } from './src/app/service.js'; +import { AppConfig } from './src/app/config.js'; new App({ config: AppConfig, diff --git a/packages/create-app/files/client.rpc.ts b/packages/create-app/files/client.rpc.ts index 2e6a1decb..b27fca816 100755 --- a/packages/create-app/files/client.rpc.ts +++ b/packages/create-app/files/client.rpc.ts @@ -2,7 +2,7 @@ import { RpcWebSocketClient } from '@deepkit/rpc'; //`import type` is important, since we do not want to import server code in the runtime. -import type { HelloWorldControllerRpc } from './src/controller/hello-world.rpc'; +import type { HelloWorldControllerRpc } from './src/controller/hello-world.rpc.js'; async function main() { const client = new RpcWebSocketClient('http://localhost:8080'); diff --git a/packages/create-app/files/src/controller/hello-world.cli.ts b/packages/create-app/files/src/controller/hello-world.cli.ts index 752b6d26e..2a192bfe0 100644 --- a/packages/create-app/files/src/controller/hello-world.cli.ts +++ b/packages/create-app/files/src/controller/hello-world.cli.ts @@ -1,7 +1,7 @@ import { MaxLength } from '@deepkit/type'; import { cli, arg } from '@deepkit/app'; import { Logger } from '@deepkit/logger'; -import { Service } from '../app/service'; +import { Service } from '../app/service.js'; @cli.controller('hello') export class HelloWorldControllerCli { diff --git a/packages/create-app/files/src/controller/hello-world.http.ts b/packages/create-app/files/src/controller/hello-world.http.ts index 00354f6ad..eb9a06ab1 100644 --- a/packages/create-app/files/src/controller/hello-world.http.ts +++ b/packages/create-app/files/src/controller/hello-world.http.ts @@ -1,6 +1,6 @@ import { MaxLength } from '@deepkit/type'; import { http } from '@deepkit/http'; -import { Service } from '../app/service'; +import { Service } from '../app/service.js'; export class HelloWorldControllerHttp { constructor(private service: Service) { diff --git a/packages/create-app/files/src/controller/hello-world.rpc.ts b/packages/create-app/files/src/controller/hello-world.rpc.ts index 033a69def..05d8122e2 100644 --- a/packages/create-app/files/src/controller/hello-world.rpc.ts +++ b/packages/create-app/files/src/controller/hello-world.rpc.ts @@ -1,6 +1,6 @@ import { MaxLength } from '@deepkit/type'; import { rpc } from '@deepkit/rpc'; -import { Service } from '../app/service'; +import { Service } from '../app/service.js'; @rpc.controller('/main') export class HelloWorldControllerRpc { diff --git a/packages/create-app/files/tests/app.spec.ts b/packages/create-app/files/tests/app.spec.ts index c2ee560d1..c79eb5773 100644 --- a/packages/create-app/files/tests/app.spec.ts +++ b/packages/create-app/files/tests/app.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@jest/globals'; -import { Service } from '../src/app/service'; +import { Service } from '../src/app/service.js'; import { Logger, MemoryLoggerTransport } from '@deepkit/logger'; import { createTestingApp } from '@deepkit/framework'; diff --git a/packages/create-app/files/tests/cli.spec.ts b/packages/create-app/files/tests/cli.spec.ts index 5f4317292..6d00758bc 100644 --- a/packages/create-app/files/tests/cli.spec.ts +++ b/packages/create-app/files/tests/cli.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { createTestingApp } from '@deepkit/framework'; -import { Service } from '../src/app/service'; -import { HelloWorldControllerCli } from '../src/controller/hello-world.cli'; +import { Service } from '../src/app/service.js'; +import { HelloWorldControllerCli } from '../src/controller/hello-world.cli.js'; test('cli command', async () => { const testing = createTestingApp({ diff --git a/packages/create-app/files/tests/http.spec.ts b/packages/create-app/files/tests/http.spec.ts index c84b2b590..2d9286cb5 100644 --- a/packages/create-app/files/tests/http.spec.ts +++ b/packages/create-app/files/tests/http.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { createTestingApp } from '@deepkit/framework'; -import { Service } from '../src/app/service'; -import { HelloWorldControllerHttp } from '../src/controller/hello-world.http'; +import { Service } from '../src/app/service.js'; +import { HelloWorldControllerHttp } from '../src/controller/hello-world.http.js'; import { HttpRequest } from '@deepkit/http'; test('http controller', async () => { diff --git a/packages/create-app/files/tests/rpc.spec.ts b/packages/create-app/files/tests/rpc.spec.ts index c16c1b63c..51a7b758b 100644 --- a/packages/create-app/files/tests/rpc.spec.ts +++ b/packages/create-app/files/tests/rpc.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { createTestingApp } from '@deepkit/framework'; -import { Service } from '../src/app/service'; -import { HelloWorldControllerRpc } from '../src/controller/hello-world.rpc'; +import { Service } from '../src/app/service.js'; +import { HelloWorldControllerRpc } from '../src/controller/hello-world.rpc.js'; test('rpc controller', async () => { const testing = createTestingApp({ diff --git a/packages/create-app/main.ts b/packages/create-app/main.ts index 900370237..082e3b92a 100755 --- a/packages/create-app/main.ts +++ b/packages/create-app/main.ts @@ -1,7 +1,7 @@ #!/usr/bin/env -S node -r ts-node/register/transpile-only import { App } from '@deepkit/app'; import { ConsoleTransport, Logger } from '@deepkit/logger'; -import { CreateController } from './src/controller/create'; +import { CreateController } from './src/controller/create.js'; new App({ controllers: [CreateController], diff --git a/packages/create-app/package.json b/packages/create-app/package.json index e9fa86d57..d4ad7feb3 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -28,6 +28,7 @@ "peerDependencies": { }, "dependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.13", "@deepkit/type": "^1.0.1-alpha.13", "@deepkit/logger": "^1.0.1-alpha.13", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index c0409032e..4fb16b922 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -14,7 +14,10 @@ "browser": { "crypto": false }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/desktop-ui/create-font.ts b/packages/desktop-ui/create-font.ts index 961f7e372..e3f804448 100644 --- a/packages/desktop-ui/create-font.ts +++ b/packages/desktop-ui/create-font.ts @@ -6,7 +6,6 @@ const svg2ttf = require('svg2ttf'); const ttf2woff = require('ttf2woff'); const SVGIcons2SVGFontStream = require('svgicons2svgfont'); - function readFolder(dir: string, files: { [path: string]: string }) { const read = readdirSync(dir); for (const file of read) { diff --git a/packages/desktop-ui/package.json b/packages/desktop-ui/package.json index 7125d00f6..8a10d1ead 100644 --- a/packages/desktop-ui/package.json +++ b/packages/desktop-ui/package.json @@ -40,6 +40,8 @@ "electron": ">7.1.9" }, "devDependencies": { + "@deepkit/core": "^1.0.1-alpha.13", + "@deepkit/core-rxjs": "^1.0.1-alpha.13", "@angular-devkit/build-angular": "^12.1.1", "@angular/animations": "~12.1.1", "@angular/cdk": "~12.1.1", diff --git a/packages/desktop-ui/src/components/app/dui-view.directive.ts b/packages/desktop-ui/src/components/app/dui-view.directive.ts index 1b4afecad..3cefda75b 100644 --- a/packages/desktop-ui/src/components/app/dui-view.directive.ts +++ b/packages/desktop-ui/src/components/app/dui-view.directive.ts @@ -9,7 +9,7 @@ */ import { Directive, EmbeddedViewRef, Injectable, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core'; -import { detectChangesNextFrame, scheduleWindowResizeEvent } from './utils'; +import { detectChangesNextFrame, scheduleWindowResizeEvent } from './utils.js'; let i = 0; diff --git a/packages/desktop-ui/src/components/app/index.ts b/packages/desktop-ui/src/components/app/index.ts index 114810a6f..d37a214e5 100644 --- a/packages/desktop-ui/src/components/app/index.ts +++ b/packages/desktop-ui/src/components/app/index.ts @@ -9,27 +9,27 @@ */ import { ApplicationRef, Component, Directive, HostBinding, Inject, Injectable, Input, ModuleWithProviders, NgModule, Optional } from '@angular/core'; -import { MenuCheckboxDirective, MenuDirective, MenuItemDirective, MenuRadioDirective, MenuSeparatorDirective } from './menu.component'; -import { detectChangesNextFrame, OpenExternalDirective, ZonelessChangeDetector } from './utils'; -import { ViewDirective } from './dui-view.directive'; -import { CdCounterComponent } from './cd-counter.component'; -import { DuiResponsiveDirective } from './dui-responsive.directive'; +import { MenuCheckboxDirective, MenuDirective, MenuItemDirective, MenuRadioDirective, MenuSeparatorDirective } from './menu.component.js'; +import { detectChangesNextFrame, OpenExternalDirective, ZonelessChangeDetector } from './utils.js'; +import { ViewDirective } from './dui-view.directive.js'; +import { CdCounterComponent } from './cd-counter.component.js'; +import { DuiResponsiveDirective } from './dui-responsive.directive.js'; import { CommonModule, DOCUMENT } from '@angular/common'; -import { Electron } from '../../core/utils'; +import { Electron } from '../../core/utils.js'; import { ActivationEnd, Event as RouterEvent, NavigationEnd, Router } from '@angular/router'; -import { WindowRegistry } from '../window/window-state'; -import { ELECTRON_WINDOW, IN_DIALOG } from './token'; -import { AsyncRenderPipe, HumanFileSizePipe, ObjectURLPipe } from './pipes'; -import { ReactiveChangeDetectionModule } from './reactivate-change-detection'; +import { WindowRegistry } from '../window/window-state.js'; +import { ELECTRON_WINDOW, IN_DIALOG } from './token.js'; +import { AsyncRenderPipe, HumanFileSizePipe, ObjectURLPipe } from './pipes.js'; +import { ReactiveChangeDetectionModule } from './reactivate-change-detection.js'; import { arrayRemoveItem } from '@deepkit/core'; -export * from './reactivate-change-detection'; -export * from './cd-counter.component'; -export * from './dui-view.directive'; -export * from './dui-responsive.directive'; -export * from './utils'; -export * from './menu.component'; -export * from './pipes'; +export * from './reactivate-change-detection.js'; +export * from './cd-counter.component.js'; +export * from './dui-view.directive.js'; +export * from './dui-responsive.directive.js'; +export * from './utils.js'; +export * from './menu.component.js'; +export * from './pipes.js'; if ('undefined' !== typeof window && 'undefined' === typeof (window as any)['global']) { (window as any).global = window; diff --git a/packages/desktop-ui/src/components/app/menu.component.ts b/packages/desktop-ui/src/components/app/menu.component.ts index 23f1e4173..f51c3c13e 100644 --- a/packages/desktop-ui/src/components/app/menu.component.ts +++ b/packages/desktop-ui/src/components/app/menu.component.ts @@ -19,10 +19,10 @@ import { Output, QueryList } from '@angular/core'; -import { WindowMenuState } from '../window/window-menu'; +import { WindowMenuState } from '../window/window-menu.js'; import { arrayHasItem } from '@deepkit/core'; import { Subscription } from 'rxjs'; -import { Electron } from '../../core/utils'; +import { Electron } from '../../core/utils.js'; @Directive() export class MenuBase implements AfterViewInit { diff --git a/packages/desktop-ui/src/components/app/pipes.ts b/packages/desktop-ui/src/components/app/pipes.ts index 3c866bbe7..79aea7bd4 100644 --- a/packages/desktop-ui/src/components/app/pipes.ts +++ b/packages/desktop-ui/src/components/app/pipes.ts @@ -10,7 +10,7 @@ import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core'; import { Observable, Subscription } from 'rxjs'; -import { detectChangesNextFrame } from './utils'; +import { detectChangesNextFrame } from './utils.js'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { humanBytes } from '@deepkit/core'; @@ -75,4 +75,4 @@ export class HumanFileSizePipe implements PipeTransform { transform(bytes: number, si: boolean = false): string { return humanBytes(bytes, si); } -} \ No newline at end of file +} diff --git a/packages/desktop-ui/src/components/app/utils.ts b/packages/desktop-ui/src/components/app/utils.ts index 3e72a54a9..ea3cc5847 100644 --- a/packages/desktop-ui/src/components/app/utils.ts +++ b/packages/desktop-ui/src/components/app/utils.ts @@ -17,7 +17,7 @@ import { Input, OnChanges } from '@angular/core'; -import { Electron } from '../../core/utils'; +import { Electron } from '../../core/utils.js'; @Directive({ diff --git a/packages/desktop-ui/src/components/button/button.component.ts b/packages/desktop-ui/src/components/button/button.component.ts index c6c37ce87..f01b865b5 100644 --- a/packages/desktop-ui/src/components/button/button.component.ts +++ b/packages/desktop-ui/src/components/button/button.component.ts @@ -27,10 +27,10 @@ import { Output, SkipSelf } from '@angular/core'; -import { WindowComponent } from '../window/window.component'; -import { WindowState } from '../window/window-state'; -import { FormComponent } from '../form/form.component'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { WindowComponent } from '../window/window.component.js'; +import { WindowState } from '../window/window-state.js'; +import { FormComponent } from '../form/form.component.js'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; @Component({ selector: 'dui-button', diff --git a/packages/desktop-ui/src/components/button/dropdown.component.ts b/packages/desktop-ui/src/components/button/dropdown.component.ts index 1c0611d0f..74cf235d0 100644 --- a/packages/desktop-ui/src/components/button/dropdown.component.ts +++ b/packages/desktop-ui/src/components/button/dropdown.component.ts @@ -31,11 +31,11 @@ import { import { TemplatePortal } from '@angular/cdk/portal'; import { Overlay, OverlayConfig, OverlayRef, PositionStrategy } from '@angular/cdk/overlay'; import { Subscription } from 'rxjs'; -import { WindowRegistry } from '../window/window-state'; -import { focusWatcher } from '../../core/utils'; +import { WindowRegistry } from '../window/window-state.js'; +import { focusWatcher } from '../../core/utils.js'; import { isArray } from '@deepkit/core'; -import { OverlayStack, OverlayStackItem, ReactiveChangeDetectionModule, unsubscribe } from '../app'; -import { ButtonComponent } from './button.component'; +import { OverlayStack, OverlayStackItem, ReactiveChangeDetectionModule, unsubscribe } from '../app/index.js'; +import { ButtonComponent } from './button.component.js'; @Component({ diff --git a/packages/desktop-ui/src/components/button/index.ts b/packages/desktop-ui/src/components/button/index.ts index 5687a5472..86c5a9544 100644 --- a/packages/desktop-ui/src/components/button/index.ts +++ b/packages/desktop-ui/src/components/button/index.ts @@ -9,9 +9,9 @@ */ import { NgModule } from '@angular/core'; -import { ButtonComponent, ButtonGroupComponent, ButtonGroupsComponent, FileChooserDirective, FileDropDirective, FilePickerDirective } from './button.component'; +import { ButtonComponent, ButtonGroupComponent, ButtonGroupsComponent, FileChooserDirective, FileDropDirective, FilePickerDirective } from './button.component.js'; import { CommonModule } from '@angular/common'; -import { DuiIconModule } from '../icon'; +import { DuiIconModule } from '../icon/index.js'; import { ContextDropdownDirective, DropdownComponent, @@ -20,13 +20,13 @@ import { DropdownSplitterComponent, OpenDropdownDirective, OpenDropdownHoverDirective, -} from './dropdown.component'; +} from './dropdown.component.js'; import { FormsModule } from '@angular/forms'; -import { TabButtonComponent } from './tab-button.component'; +import { TabButtonComponent } from './tab-button.component.js'; -export * from "./dropdown.component"; -export * from './button.component' -export * from './tab-button.component' +export * from "./dropdown.component.js"; +export * from './button.component.js' +export * from './tab-button.component.js' @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/checkbox/checkbox.component.ts b/packages/desktop-ui/src/components/checkbox/checkbox.component.ts index 6bdef0e6e..d619f3d02 100644 --- a/packages/desktop-ui/src/components/checkbox/checkbox.component.ts +++ b/packages/desktop-ui/src/components/checkbox/checkbox.component.ts @@ -17,7 +17,7 @@ import { Injector, SkipSelf } from '@angular/core'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; @Component({ selector: 'dui-checkbox', diff --git a/packages/desktop-ui/src/components/checkbox/index.ts b/packages/desktop-ui/src/components/checkbox/index.ts index 9229176ff..84ad897f7 100644 --- a/packages/desktop-ui/src/components/checkbox/index.ts +++ b/packages/desktop-ui/src/components/checkbox/index.ts @@ -9,10 +9,10 @@ */ import { NgModule } from '@angular/core'; -import { CheckboxComponent } from './checkbox.component'; -import { DuiIconModule } from '../icon'; +import { CheckboxComponent } from './checkbox.component.js'; +import { DuiIconModule } from '../icon/index.js'; -export * from './checkbox.component' +export * from './checkbox.component.js' @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/core/index.ts b/packages/desktop-ui/src/components/core/index.ts index a75f94407..3718e6824 100644 --- a/packages/desktop-ui/src/components/core/index.ts +++ b/packages/desktop-ui/src/components/core/index.ts @@ -9,9 +9,9 @@ */ import { NgModule } from '@angular/core'; -import { RenderComponentDirective } from './render-component.directive'; +import { RenderComponentDirective } from './render-component.directive.js'; -export * from './render-component.directive' +export * from './render-component.directive.js' @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/dialog/dialog.component.ts b/packages/desktop-ui/src/components/dialog/dialog.component.ts index 3ce7f9d86..a3ab9438c 100644 --- a/packages/desktop-ui/src/components/dialog/dialog.component.ts +++ b/packages/desktop-ui/src/components/dialog/dialog.component.ts @@ -32,13 +32,13 @@ import { } from '@angular/core'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; -import { WindowRegistry } from '../window/window-state'; -import { WindowComponent } from '../window/window.component'; -import { RenderComponentDirective } from '../core/render-component.directive'; -import { IN_DIALOG } from '../app/token'; -import { OverlayStack, OverlayStackItem, ReactiveChangeDetectionModule, unsubscribe } from '../app'; +import { WindowRegistry } from '../window/window-state.js'; +import { WindowComponent } from '../window/window.component.js'; +import { RenderComponentDirective } from '../core/render-component.directive.js'; +import { IN_DIALOG } from '../app/token.js'; +import { OverlayStack, OverlayStackItem, ReactiveChangeDetectionModule, unsubscribe } from '../app/index.js'; import { Subscription } from 'rxjs'; -import { ButtonComponent } from '../button'; +import { ButtonComponent } from '../button/index.js'; @Component({ template: ` diff --git a/packages/desktop-ui/src/components/dialog/dialog.ts b/packages/desktop-ui/src/components/dialog/dialog.ts index b9d9d9bcb..43b753da7 100644 --- a/packages/desktop-ui/src/components/dialog/dialog.ts +++ b/packages/desktop-ui/src/components/dialog/dialog.ts @@ -24,11 +24,11 @@ import { Type, ViewContainerRef } from '@angular/core'; -import { DialogComponent } from './dialog.component'; -import { isTargetChildOf } from '../../core/utils'; -import { DuiDialogProgress, ProgressDialogState } from './progress-dialog.component'; +import { DialogComponent } from './dialog.component.js'; +import { isTargetChildOf } from '../../core/utils.js'; +import { DuiDialogProgress, ProgressDialogState } from './progress-dialog.component.js'; import { DOCUMENT } from '@angular/common'; -import { WindowRegistry } from '../window/window-state'; +import { WindowRegistry } from '../window/window-state.js'; import { Overlay, OverlayConfig } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; diff --git a/packages/desktop-ui/src/components/dialog/index.ts b/packages/desktop-ui/src/components/dialog/index.ts index edecfc673..bba898222 100644 --- a/packages/desktop-ui/src/components/dialog/index.ts +++ b/packages/desktop-ui/src/components/dialog/index.ts @@ -9,7 +9,7 @@ */ import { NgModule } from '@angular/core'; -import { DuiWindowModule } from '../window'; +import { DuiWindowModule } from '../window/index.js'; import { CloseDialogDirective, DialogActionsComponent, @@ -17,19 +17,19 @@ import { DialogDirective, DialogErrorComponent, DialogWrapperComponent, OpenDialogDirective, -} from './dialog.component'; +} from './dialog.component.js'; import { OverlayModule } from '@angular/cdk/overlay'; import { CommonModule } from '@angular/common'; -import { DuiDialog, DuiDialogAlert, DuiDialogConfirm, DuiDialogConfirmDirective, DuiDialogPrompt } from './dialog'; -import { DuiButtonModule } from '../button'; -import { DuiCoreModule } from '../core'; -import { DuiInputModule } from '../input'; +import { DuiDialog, DuiDialogAlert, DuiDialogConfirm, DuiDialogConfirmDirective, DuiDialogPrompt } from './dialog.js'; +import { DuiButtonModule } from '../button/index.js'; +import { DuiCoreModule } from '../core/index.js'; +import { DuiInputModule } from '../input/index.js'; import { FormsModule } from '@angular/forms'; -import { DuiDialogProgress } from './progress-dialog.component'; +import { DuiDialogProgress } from './progress-dialog.component.js'; -export * from "./dialog.component"; -export * from "./dialog"; -export * from "./progress-dialog.component"; +export * from "./dialog.component.js"; +export * from "./dialog.js"; +export * from "./progress-dialog.component.js"; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/dialog/progress-dialog.component.ts b/packages/desktop-ui/src/components/dialog/progress-dialog.component.ts index ad4921597..0319d56d6 100644 --- a/packages/desktop-ui/src/components/dialog/progress-dialog.component.ts +++ b/packages/desktop-ui/src/components/dialog/progress-dialog.component.ts @@ -10,7 +10,7 @@ import { BehaviorSubject } from 'rxjs'; import { Component, Input, OnInit } from '@angular/core'; -import { DialogComponent } from './dialog.component'; +import { DialogComponent } from './dialog.component.js'; class State { title: string = ''; diff --git a/packages/desktop-ui/src/components/emoji/emoji-dropdown.component.ts b/packages/desktop-ui/src/components/emoji/emoji-dropdown.component.ts index b1dc1dde0..e16d78612 100644 --- a/packages/desktop-ui/src/components/emoji/emoji-dropdown.component.ts +++ b/packages/desktop-ui/src/components/emoji/emoji-dropdown.component.ts @@ -26,9 +26,9 @@ import { ViewChild, ViewContainerRef } from '@angular/core'; -import * as emojis from './emojis'; -import { EmojiCategory } from './emojis'; -import { DropdownComponent } from '../button'; +import * as emojis from './emojis.js'; +import { EmojiCategory } from './emojis.js'; +import { DropdownComponent } from '../button/index.js'; @Component({ selector: 'dui-emoji-dropdown', diff --git a/packages/desktop-ui/src/components/emoji/emoji.component.ts b/packages/desktop-ui/src/components/emoji/emoji.component.ts index f3416f6e1..8f44cfc21 100644 --- a/packages/desktop-ui/src/components/emoji/emoji.component.ts +++ b/packages/desktop-ui/src/components/emoji/emoji.component.ts @@ -9,7 +9,7 @@ */ import { Component, Input } from '@angular/core'; -import { Emoji, emojis } from './emojis'; +import { Emoji, emojis } from './emojis.js'; @Component({ selector: 'dui-emoji', diff --git a/packages/desktop-ui/src/components/emoji/index.ts b/packages/desktop-ui/src/components/emoji/index.ts index 92cbf9e47..2cfe82d58 100644 --- a/packages/desktop-ui/src/components/emoji/index.ts +++ b/packages/desktop-ui/src/components/emoji/index.ts @@ -11,14 +11,14 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; -import { EmojiDropdownComponent, EmojiDropdownDirective } from './emoji-dropdown.component'; -import { DuiInputModule } from '../input'; -import { DuiButtonModule } from '../button'; -import { EmojiComponent } from './emoji.component'; +import { EmojiDropdownComponent, EmojiDropdownDirective } from './emoji-dropdown.component.js'; +import { DuiInputModule } from '../input/index.js'; +import { DuiButtonModule } from '../button/index.js'; +import { EmojiComponent } from './emoji.component.js'; -export { EmojiComponent } from "./emoji.component"; +export { EmojiComponent } from "./emoji.component.js"; -export { EmojiDropdownComponent, EmojiDropdownDirective } from "./emoji-dropdown.component"; +export { EmojiDropdownComponent, EmojiDropdownDirective } from './emoji-dropdown.component.js'; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/form/form.component.ts b/packages/desktop-ui/src/components/form/form.component.ts index 117a2e319..6d280c4aa 100644 --- a/packages/desktop-ui/src/components/form/form.component.ts +++ b/packages/desktop-ui/src/components/form/form.component.ts @@ -10,7 +10,7 @@ import { ChangeDetectorRef, Component, ContentChild, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges, SkipSelf } from '@angular/core'; import { FormGroup, NgControl } from '@angular/forms'; -import { detectChangesNextFrame } from '../app'; +import { detectChangesNextFrame } from '../app/index.js'; @Component({ selector: 'dui-form-row', diff --git a/packages/desktop-ui/src/components/form/index.ts b/packages/desktop-ui/src/components/form/index.ts index 4d78f2eb7..ed223736d 100644 --- a/packages/desktop-ui/src/components/form/index.ts +++ b/packages/desktop-ui/src/components/form/index.ts @@ -9,11 +9,11 @@ */ import { NgModule } from '@angular/core'; -import { FormComponent, FormRowComponent } from './form.component'; +import { FormComponent, FormRowComponent } from './form.component.js'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; -export * from "./form.component"; +export * from "./form.component.js"; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/icon/index.ts b/packages/desktop-ui/src/components/icon/index.ts index 36623ef08..09e0fc725 100644 --- a/packages/desktop-ui/src/components/icon/index.ts +++ b/packages/desktop-ui/src/components/icon/index.ts @@ -10,9 +10,9 @@ import { NgModule } from '@angular/core'; -import { IconComponent } from './icon.component'; +import { IconComponent } from './icon.component.js'; -export * from './icon.component'; +export * from './icon.component.js'; @NgModule({ imports: [], diff --git a/packages/desktop-ui/src/components/indicator/index.ts b/packages/desktop-ui/src/components/indicator/index.ts index 1c8f446e1..50ea62fe3 100644 --- a/packages/desktop-ui/src/components/indicator/index.ts +++ b/packages/desktop-ui/src/components/indicator/index.ts @@ -10,9 +10,9 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IndicatorComponent } from './indicator.component'; +import { IndicatorComponent } from './indicator.component.js'; -export * from './indicator.component'; +export * from './indicator.component.js'; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/input/index.ts b/packages/desktop-ui/src/components/input/index.ts index 0c3e8e8da..7919b503c 100644 --- a/packages/desktop-ui/src/components/input/index.ts +++ b/packages/desktop-ui/src/components/input/index.ts @@ -9,12 +9,12 @@ */ import { NgModule } from '@angular/core'; -import { InputComponent } from './input.component'; +import { InputComponent } from './input.component.js'; import { FormsModule } from '@angular/forms'; import { CommonModule, DatePipe } from '@angular/common'; -import { DuiIconModule } from '../icon'; +import { DuiIconModule } from '../icon/index.js'; -export * from './input.component'; +export * from './input.component.js'; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/input/input.component.ts b/packages/desktop-ui/src/components/input/input.component.ts index 5bf349875..20357698c 100644 --- a/packages/desktop-ui/src/components/input/input.component.ts +++ b/packages/desktop-ui/src/components/input/input.component.ts @@ -9,8 +9,8 @@ */ import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Injector, Input, Output, SkipSelf, ViewChild } from '@angular/core'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; -import { detectChangesNextFrame } from '../app'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; +import { detectChangesNextFrame } from '../app/index.js'; import { DatePipe } from '@angular/common'; const dateTimeTypes: string[] = ['time', 'date', 'datetime', 'datetime-local']; diff --git a/packages/desktop-ui/src/components/list/index.ts b/packages/desktop-ui/src/components/list/index.ts index aa67edf59..ebba70f02 100644 --- a/packages/desktop-ui/src/components/list/index.ts +++ b/packages/desktop-ui/src/components/list/index.ts @@ -9,9 +9,9 @@ */ import { NgModule } from '@angular/core'; -import { ListComponent, ListItemComponent, ListTitleComponent } from './list.component'; +import { ListComponent, ListItemComponent, ListTitleComponent } from './list.component.js'; -export * from './list.component'; +export * from './list.component.js'; @NgModule({ imports: [], diff --git a/packages/desktop-ui/src/components/list/list.component.ts b/packages/desktop-ui/src/components/list/list.component.ts index 8ea144f77..7a710e199 100644 --- a/packages/desktop-ui/src/components/list/list.component.ts +++ b/packages/desktop-ui/src/components/list/list.component.ts @@ -26,7 +26,7 @@ import { SkipSelf } from '@angular/core'; import { NavigationEnd, Router, UrlTree } from '@angular/router'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; import { Subscription } from 'rxjs'; import { arrayRemoveItem } from '@deepkit/core'; diff --git a/packages/desktop-ui/src/components/radiobox/index.ts b/packages/desktop-ui/src/components/radiobox/index.ts index a382324bc..17e7fc97a 100644 --- a/packages/desktop-ui/src/components/radiobox/index.ts +++ b/packages/desktop-ui/src/components/radiobox/index.ts @@ -9,9 +9,9 @@ */ import { NgModule } from '@angular/core'; -import { RadioboxComponent } from './radiobox.component'; +import { RadioboxComponent } from './radiobox.component.js'; -export * from './radiobox.component'; +export * from './radiobox.component.js'; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/radiobox/radiobox.component.ts b/packages/desktop-ui/src/components/radiobox/radiobox.component.ts index b5b0b16f3..b8ab89d8a 100644 --- a/packages/desktop-ui/src/components/radiobox/radiobox.component.ts +++ b/packages/desktop-ui/src/components/radiobox/radiobox.component.ts @@ -9,7 +9,7 @@ */ import { ChangeDetectorRef, Component, HostBinding, HostListener, Injector, Input, SkipSelf } from '@angular/core'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; @Component({ selector: 'dui-radiobox', diff --git a/packages/desktop-ui/src/components/select/index.ts b/packages/desktop-ui/src/components/select/index.ts index 636940722..3de9565fc 100644 --- a/packages/desktop-ui/src/components/select/index.ts +++ b/packages/desktop-ui/src/components/select/index.ts @@ -14,13 +14,13 @@ import { OptionDirective, OptionSeparatorDirective, SelectboxComponent -} from './selectbox.component'; +} from './selectbox.component.js'; import { FormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; -import { DuiIconModule } from '../icon'; -import { DuiButtonModule } from '../button'; +import { DuiIconModule } from '../icon/index.js'; +import { DuiButtonModule } from '../button/index.js'; -export * from "./selectbox.component"; +export * from "./selectbox.component.js"; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/select/selectbox.component.ts b/packages/desktop-ui/src/components/select/selectbox.component.ts index 47717c679..7216f8909 100644 --- a/packages/desktop-ui/src/components/select/selectbox.component.ts +++ b/packages/desktop-ui/src/components/select/selectbox.component.ts @@ -29,10 +29,10 @@ import { ViewChild } from '@angular/core'; import { Subscription } from 'rxjs'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; import { Overlay } from '@angular/cdk/overlay'; -import { DropdownComponent } from '../button/dropdown.component'; -import { ButtonComponent } from '../button/button.component'; +import { DropdownComponent } from '../button/dropdown.component.js'; +import { ButtonComponent } from '../button/button.component.js'; /** * Necessary directive to get a dynamic rendered option. diff --git a/packages/desktop-ui/src/components/slider/index.ts b/packages/desktop-ui/src/components/slider/index.ts index 355ccf243..9a35657a8 100644 --- a/packages/desktop-ui/src/components/slider/index.ts +++ b/packages/desktop-ui/src/components/slider/index.ts @@ -11,11 +11,11 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; -import { DuiIconModule } from '../icon'; -import { DuiButtonModule } from '../button'; -import { SliderComponent } from './slider.component'; +import { DuiIconModule } from '../icon/index.js'; +import { DuiButtonModule } from '../button/index.js'; +import { SliderComponent } from './slider.component.js'; -export * from './slider.component'; +export * from './slider.component.js'; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/slider/slider.component.ts b/packages/desktop-ui/src/components/slider/slider.component.ts index 71f1e64d1..63c4f0119 100644 --- a/packages/desktop-ui/src/components/slider/slider.component.ts +++ b/packages/desktop-ui/src/components/slider/slider.component.ts @@ -18,7 +18,7 @@ import { SkipSelf, ViewChild } from '@angular/core'; -import { ngValueAccessor, ValueAccessorBase } from '../../core/form'; +import { ngValueAccessor, ValueAccessorBase } from '../../core/form.js'; import Hammer from 'hammerjs'; @Component({ diff --git a/packages/desktop-ui/src/components/splitter/index.ts b/packages/desktop-ui/src/components/splitter/index.ts index 53e4dd6e5..e1d71c90b 100644 --- a/packages/desktop-ui/src/components/splitter/index.ts +++ b/packages/desktop-ui/src/components/splitter/index.ts @@ -10,9 +10,9 @@ import { NgModule } from '@angular/core'; -import { SplitterComponent } from './splitter.component'; +import { SplitterComponent } from './splitter.component.js'; -export * from './splitter.component'; +export * from './splitter.component.js'; @NgModule({ imports: [], diff --git a/packages/desktop-ui/src/components/table/index.ts b/packages/desktop-ui/src/components/table/index.ts index f23eeb740..ca24bd0d1 100644 --- a/packages/desktop-ui/src/components/table/index.ts +++ b/packages/desktop-ui/src/components/table/index.ts @@ -16,14 +16,14 @@ import { TableCustomHeaderContextMenuDirective, TableCustomRowContextMenuDirective, TableHeaderDirective -} from './table.component'; +} from './table.component.js'; import { CommonModule } from '@angular/common'; -import { DuiIconModule } from '../icon'; -import { DuiSplitterModule } from '../splitter'; +import { DuiIconModule } from '../icon/index.js'; +import { DuiSplitterModule } from '../splitter/index.js'; import { ScrollingModule } from '@angular/cdk/scrolling'; -import { DuiButtonModule } from '../button'; +import { DuiButtonModule } from '../button/index.js'; -export * from "./table.component"; +export * from "./table.component.js"; @NgModule({ exports: [ diff --git a/packages/desktop-ui/src/components/table/table.component.ts b/packages/desktop-ui/src/components/table/table.component.ts index ad018d754..69a61af58 100644 --- a/packages/desktop-ui/src/components/table/table.component.ts +++ b/packages/desktop-ui/src/components/table/table.component.ts @@ -37,9 +37,9 @@ import { arrayClear, arrayHasItem, arrayRemoveItem, eachPair, empty, first, inde import Hammer from 'hammerjs'; import { isObservable, Observable } from 'rxjs'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; -import { DropdownComponent } from '../button'; -import { detectChangesNextFrame } from '../app/utils'; -import { findParentWithClass } from '../../core/utils'; +import { DropdownComponent } from '../button/index.js'; +import { detectChangesNextFrame } from '../app/utils.js'; +import { findParentWithClass } from '../../core/utils.js'; /** * Directive to allow dynamic content in a cell. diff --git a/packages/desktop-ui/src/components/tabs/index.ts b/packages/desktop-ui/src/components/tabs/index.ts index 098a7eb63..8497850fe 100644 --- a/packages/desktop-ui/src/components/tabs/index.ts +++ b/packages/desktop-ui/src/components/tabs/index.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; -import { TabComponent } from './tab.component'; -import { TabsComponent } from './tabs.component'; -import { DuiIconModule } from '../icon'; +import { TabComponent } from './tab.component.js'; +import { TabsComponent } from './tabs.component.js'; +import { DuiIconModule } from '../icon/index.js'; import { CommonModule } from '@angular/common'; @NgModule({ diff --git a/packages/desktop-ui/src/components/window/external-window.component.ts b/packages/desktop-ui/src/components/window/external-window.component.ts index 7cb99d885..c8dbe92f5 100644 --- a/packages/desktop-ui/src/components/window/external-window.component.ts +++ b/packages/desktop-ui/src/components/window/external-window.component.ts @@ -30,15 +30,15 @@ import { ViewContainerRef } from '@angular/core'; import { ComponentPortal, DomPortalHost, PortalHost } from '@angular/cdk/portal'; -import { WindowComponent } from '../window/window.component'; -import { WindowRegistry } from '../window/window-state'; -import { RenderComponentDirective } from '../core/render-component.directive'; -import { ELECTRON_WINDOW, IN_DIALOG } from '../app/token'; +import { WindowComponent } from '../window/window.component.js'; +import { WindowRegistry } from '../window/window-state.js'; +import { RenderComponentDirective } from '../core/render-component.directive.js'; +import { ELECTRON_WINDOW, IN_DIALOG } from '../app/token.js'; import { Subscription } from 'rxjs'; import { DOCUMENT } from '@angular/common'; -import { DuiDialog } from '../dialog/dialog'; -import { Electron } from '../../core/utils'; -import { detectChangesNextFrame } from '../app'; +import { DuiDialog } from '../dialog/dialog.js'; +import { Electron } from '../../core/utils.js'; +import { detectChangesNextFrame } from '../app/index.js'; function PopupCenter(url: string, title: string, w: number, h: number): Window { let top = window.screenTop + (window.outerHeight / 2) - w / 2; diff --git a/packages/desktop-ui/src/components/window/external-window.ts b/packages/desktop-ui/src/components/window/external-window.ts index dae5afa4d..d22f45942 100644 --- a/packages/desktop-ui/src/components/window/external-window.ts +++ b/packages/desktop-ui/src/components/window/external-window.ts @@ -9,7 +9,7 @@ */ import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector, Type, ViewContainerRef } from '@angular/core'; -import { ExternalWindowComponent } from './external-window.component'; +import { ExternalWindowComponent } from './external-window.component.js'; import { ComponentPortal, DomPortalHost } from '@angular/cdk/portal'; @Injectable() diff --git a/packages/desktop-ui/src/components/window/index.ts b/packages/desktop-ui/src/components/window/index.ts index 1007a82c2..afa113976 100644 --- a/packages/desktop-ui/src/components/window/index.ts +++ b/packages/desktop-ui/src/components/window/index.ts @@ -9,36 +9,36 @@ */ import { ModuleWithProviders, NgModule } from '@angular/core'; -import { WindowContentComponent } from './window-content.component'; -import { WindowComponent, WindowFrameComponent } from './window.component'; -import { WindowFooterComponent } from './window-footer.component'; +import { WindowContentComponent } from './window-content.component.js'; +import { WindowComponent, WindowFrameComponent } from './window.component.js'; +import { WindowFooterComponent } from './window-footer.component.js'; import { WindowHeaderComponent, WindowToolbarComponent, WindowToolbarContainerComponent -} from './window-header.component'; +} from './window-header.component.js'; import { CommonModule } from '@angular/common'; -import { WindowSidebarComponent } from './window-sidebar.component'; -import { DuiSplitterModule } from '../splitter'; -import { DuiIconModule } from '../icon'; -import { WindowRegistry } from './window-state'; +import { WindowSidebarComponent } from './window-sidebar.component.js'; +import { DuiSplitterModule } from '../splitter/index.js'; +import { DuiIconModule } from '../icon/index.js'; +import { WindowRegistry } from './window-state.js'; import { ExternalDialogDirective, ExternalDialogWrapperComponent, ExternalWindowComponent -} from './external-window.component'; -import { DuiExternalWindow } from './external-window'; -import { DuiCoreModule } from '../core'; +} from './external-window.component.js'; +import { DuiExternalWindow } from './external-window.js'; +import { DuiCoreModule } from '../core/index.js'; -export * from "./window.component"; -export * from "./external-window"; -export * from "./external-window.component"; -export * from "./window-content.component"; -export * from "./window-header.component"; -export * from "./window-footer.component"; -export * from "./window-menu"; -export * from "./window-sidebar.component"; +export * from "./window.component.js"; +export * from "./external-window.js"; +export * from "./external-window.component.js"; +export * from "./window-content.component.js"; +export * from "./window-header.component.js"; +export * from "./window-footer.component.js"; +export * from "./window-menu.js"; +export * from "./window-sidebar.component.js"; @NgModule({ declarations: [ diff --git a/packages/desktop-ui/src/components/window/window-content.component.ts b/packages/desktop-ui/src/components/window/window-content.component.ts index 76f1d28cd..a3311b9e0 100644 --- a/packages/desktop-ui/src/components/window/window-content.component.ts +++ b/packages/desktop-ui/src/components/window/window-content.component.ts @@ -9,10 +9,10 @@ */ import { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core'; -import { WindowSidebarComponent } from './window-sidebar.component'; +import { WindowSidebarComponent } from './window-sidebar.component.js'; import { Subject } from 'rxjs'; -import { WindowState } from './window-state'; -import { triggerResize } from '../../core/utils'; +import { WindowState } from './window-state.js'; +import { triggerResize } from '../../core/utils.js'; @Component({ selector: 'dui-window-content', diff --git a/packages/desktop-ui/src/components/window/window-header.component.ts b/packages/desktop-ui/src/components/window/window-header.component.ts index e283a384c..1f33fdffc 100644 --- a/packages/desktop-ui/src/components/window/window-header.component.ts +++ b/packages/desktop-ui/src/components/window/window-header.component.ts @@ -20,8 +20,8 @@ import { TemplateRef, ViewChild } from '@angular/core'; -import { WindowState } from './window-state'; -import { Electron } from '../../core/utils'; +import { WindowState } from './window-state.js'; +import { Electron } from '../../core/utils.js'; @Component({ selector: 'dui-window-header', diff --git a/packages/desktop-ui/src/components/window/window-menu.ts b/packages/desktop-ui/src/components/window/window-menu.ts index 231b6c9f8..f8cd00cf4 100644 --- a/packages/desktop-ui/src/components/window/window-menu.ts +++ b/packages/desktop-ui/src/components/window/window-menu.ts @@ -8,11 +8,11 @@ * You should have received a copy of the MIT License along with this program. */ -import { MenuDirective } from '../app/menu.component'; +import { MenuDirective } from '../app/menu.component.js'; import { arrayRemoveItem } from '@deepkit/core'; import { Subscription } from 'rxjs'; import { Injectable } from '@angular/core'; -import { Electron } from '../../core/utils'; +import { Electron } from '../../core/utils.js'; @Injectable() export class WindowMenuState { diff --git a/packages/desktop-ui/src/components/window/window-state.ts b/packages/desktop-ui/src/components/window/window-state.ts index c1adb8709..471b84e41 100644 --- a/packages/desktop-ui/src/components/window/window-state.ts +++ b/packages/desktop-ui/src/components/window/window-state.ts @@ -9,13 +9,13 @@ */ import { ChangeDetectorRef, Injectable, TemplateRef, ViewContainerRef } from '@angular/core'; -import { ButtonGroupComponent } from '../button/button.component'; -import { WindowHeaderComponent, WindowToolbarContainerComponent } from './window-header.component'; +import { ButtonGroupComponent } from '../button/button.component.js'; +import { WindowHeaderComponent, WindowToolbarContainerComponent } from './window-header.component.js'; import { arrayRemoveItem } from '@deepkit/core'; -import { WindowComponent } from './window.component'; -import { WindowMenuState } from './window-menu'; +import { WindowComponent } from './window.component.js'; +import { WindowMenuState } from './window-menu.js'; import { BehaviorSubject } from 'rxjs'; -import { detectChangesNextFrame } from '../app/utils'; +import { detectChangesNextFrame } from '../app/utils.js'; @Injectable() export class WindowRegistry { diff --git a/packages/desktop-ui/src/components/window/window.component.ts b/packages/desktop-ui/src/components/window/window.component.ts index 8b121ead4..1c6d40d33 100644 --- a/packages/desktop-ui/src/components/window/window.component.ts +++ b/packages/desktop-ui/src/components/window/window.component.ts @@ -9,13 +9,13 @@ */ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Inject, Input, OnChanges, OnDestroy, Optional, SimpleChanges, SkipSelf, ViewContainerRef } from '@angular/core'; -import { WindowContentComponent } from './window-content.component'; -import { WindowRegistry, WindowState } from './window-state'; +import { WindowContentComponent } from './window-content.component.js'; +import { WindowRegistry, WindowState } from './window-state.js'; import { DOCUMENT } from '@angular/common'; -import { WindowMenuState } from './window-menu'; -import { WindowHeaderComponent } from './window-header.component'; -import { ELECTRON_WINDOW, IN_DIALOG } from '../app/token'; -import { DuiApp } from '../app'; +import { WindowMenuState } from './window-menu.js'; +import { WindowHeaderComponent } from './window-header.component.js'; +import { ELECTRON_WINDOW, IN_DIALOG } from '../app/token.js'; +import { DuiApp } from '../app/index.js'; /** * This is only for documentation purposes. diff --git a/packages/desktop-ui/src/core/form.ts b/packages/desktop-ui/src/core/form.ts index c6295d8ab..9f2e60da0 100644 --- a/packages/desktop-ui/src/core/form.ts +++ b/packages/desktop-ui/src/core/form.ts @@ -23,8 +23,8 @@ import { Type } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms'; -import { detectChangesNextFrame } from '../components/app/utils'; -import { FormComponent } from '../components/form/form.component'; +import { detectChangesNextFrame } from '../components/app/utils.js'; +import { FormComponent } from '../components/form/form.component.js'; export function ngValueAccessor(clazz: Type) { return { diff --git a/packages/desktop-ui/src/index.ts b/packages/desktop-ui/src/index.ts index 9cfebb000..f76bf99c0 100644 --- a/packages/desktop-ui/src/index.ts +++ b/packages/desktop-ui/src/index.ts @@ -8,25 +8,25 @@ * You should have received a copy of the MIT License along with this program. */ -export { ValueAccessorBase, ngValueAccessor } from './core/form'; -export * from './browser-text'; -export * from './core/form'; -export * from './core/utils'; -export * from './components/app'; -export * from './components/checkbox'; -export * from './components/button'; -export * from './components/input'; -export * from './components/form'; -export * from './components/radiobox'; -export * from './components/select'; -export * from './components/window'; -export * from './components/icon'; -export * from './components/list'; -export * from './components/table'; -export * from './components/splitter'; -export * from './components/dialog'; -export * from './components/core'; -export * from './components/emoji'; -export * from './components/slider'; -export * from './components/indicator'; -export * from './components/tabs'; +export { ValueAccessorBase, ngValueAccessor } from './core/form.js'; +export * from './browser-text.js'; +export * from './core/form.js'; +export * from './core/utils.js'; +export * from './components/app/index.js'; +export * from './components/checkbox/index.js'; +export * from './components/button/index.js'; +export * from './components/input/index.js'; +export * from './components/form/index.js'; +export * from './components/radiobox/index.js'; +export * from './components/select/index.js'; +export * from './components/window/index.js'; +export * from './components/icon/index.js'; +export * from './components/list/index.js'; +export * from './components/table/index.js'; +export * from './components/splitter/index.js'; +export * from './components/dialog/index.js'; +export * from './components/core/index.js'; +export * from './components/emoji/index.js'; +export * from './components/slider/index.js'; +export * from './components/indicator/index.js'; +export * from './components/tabs/index.js'; diff --git a/packages/event/index.ts b/packages/event/index.ts index 1233bb712..7442dd49a 100644 --- a/packages/event/index.ts +++ b/packages/event/index.ts @@ -1 +1 @@ -export * from './src/event'; +export * from './src/event.js'; diff --git a/packages/event/package.json b/packages/event/package.json index f563ea090..1c8d52351 100644 --- a/packages/event/package.json +++ b/packages/event/package.json @@ -31,13 +31,13 @@ "@deepkit/injector": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { - "transform": { - "^.+\\.(ts|tsx)$": "ts-jest" - }, + "jest": { "moduleNameMapper": { "(.+)\\.js": "$1" }, + "transform": { + "^.+\\.(ts|tsx)$": "ts-jest" + }, "testMatch": [ "**/tests/**/*.spec.ts" ] diff --git a/packages/event/tsconfig.json b/packages/event/tsconfig.json index 200d9bb5d..bdc813279 100644 --- a/packages/event/tsconfig.json +++ b/packages/event/tsconfig.json @@ -32,4 +32,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/example-app/app.ts b/packages/example-app/app.ts index e2c794e80..3b6c1a141 100755 --- a/packages/example-app/app.ts +++ b/packages/example-app/app.ts @@ -1,12 +1,12 @@ #!/usr/bin/env ts-node-script import { createCrudRoutes, FrameworkModule, onServerMainBootstrapDone } from '@deepkit/framework'; -import { Author, Book, SQLiteDatabase, User } from './src/database'; -import { MainController } from './src/controller/main.http'; -import { UsersCommand } from './src/controller/users.cli'; -import { Config } from './src/config'; +import { Author, Book, SQLiteDatabase, User } from './src/database.js'; +import { MainController } from './src/controller/main.http.js'; +import { UsersCommand } from './src/controller/users.cli.js'; +import { Config } from './src/config.js'; import { JSONTransport, Logger, LoggerInterface } from '@deepkit/logger'; import { App } from '@deepkit/app'; -import { RpcController } from './src/controller/rpc.controller'; +import { RpcController } from './src/controller/rpc.controller.js'; import { ApiConsoleModule } from '@deepkit/api-console-module'; const bookStoreCrud = createCrudRoutes([Author, Book]); diff --git a/packages/example-app/package.json b/packages/example-app/package.json index 35241b626..a72f9252f 100644 --- a/packages/example-app/package.json +++ b/packages/example-app/package.json @@ -3,9 +3,14 @@ "private": true, "version": "1.0.1-alpha.0", "description": "", + "type": "commonjs", "scripts": { - "start": "NODE_OPTIONS=--preserve-symlinks ts-node app server:start", - "start:prod": "NODE_OPTIONS=--preserve-symlinks APP_ENVIRONMENT=production ts-node app server:start", + "start": "npm run set:cjs && NODE_OPTIONS=--preserve-symlinks ts-node app server:start", + "start:prod": "npm run set:cjs && NODE_OPTIONS=--preserve-symlinks APP_ENVIRONMENT=production ts-node app server:start", + "start:esm": "npm run set:esm && TS_NODE_PROJECT=tsconfig.esm.json node --preserve-symlinks --experimental-specifier-resolution=node --loader ts-node/esm app.ts server:start ", + "start:esm:prod": "npm run set:esm && TS_NODE_PROJECT=tsconfig.esm.json APP_ENVIRONMENT=production node --preserve-symlinks --experimental-specifier-resolution=node --loader ts-node/esm app.ts server:start", + "set:esm": "node ./set-type.cjs module", + "set:cjs": "node ./set-type.cjs commonjs", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { @@ -37,4 +42,4 @@ "keywords": [], "author": "", "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/example-app/set-type.cjs b/packages/example-app/set-type.cjs new file mode 100644 index 000000000..10d49bf97 --- /dev/null +++ b/packages/example-app/set-type.cjs @@ -0,0 +1,7 @@ +const { writeFileSync } = require('fs'); +const pkgPath = './package.json'; +const pkg = require(pkgPath); + +pkg.type = process.argv[2]; + +writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); \ No newline at end of file diff --git a/packages/example-app/src/controller/users.cli.ts b/packages/example-app/src/controller/users.cli.ts index 57bfc31a7..148910b0f 100644 --- a/packages/example-app/src/controller/users.cli.ts +++ b/packages/example-app/src/controller/users.cli.ts @@ -1,6 +1,6 @@ import { arg, cli, Command, flag } from '@deepkit/app'; import { LoggerInterface } from '@deepkit/logger'; -import { SQLiteDatabase, User } from '../database'; +import { SQLiteDatabase, User } from '../database.js'; import { Positive } from '@deepkit/type'; @cli.controller('users') diff --git a/packages/example-app/src/database.ts b/packages/example-app/src/database.ts index d8b9cc166..308e3a04f 100644 --- a/packages/example-app/src/database.ts +++ b/packages/example-app/src/database.ts @@ -1,7 +1,7 @@ import { AutoIncrement, Email, entity, MaxLength, MinLength, PrimaryKey, Reference, Unique } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { SQLiteDatabaseAdapter } from '@deepkit/sqlite'; -import { Config } from './config'; +import { Config } from './config.js'; @entity.name('user') export class User { diff --git a/packages/example-app/tsconfig.esm.json b/packages/example-app/tsconfig.esm.json new file mode 100644 index 000000000..658e13577 --- /dev/null +++ b/packages/example-app/tsconfig.esm.json @@ -0,0 +1,74 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "module": "ESNext" + }, + "ts-node": { + "experimentalResolver": false + }, + "references": [ + { + "path": "../api-console-module/tsconfig.esm.json" + }, + { + "path": "../app/tsconfig.esm.json" + }, + { + "path": "../bson/tsconfig.esm.json" + }, + { + "path": "../core/tsconfig.esm.json" + }, + { + "path": "../core-rxjs/tsconfig.esm.json" + }, + { + "path": "../event/tsconfig.esm.json" + }, + { + "path": "../broker/tsconfig.esm.json" + }, + { + "path": "../framework/tsconfig.esm.json" + }, + { + "path": "../http/tsconfig.esm.json" + }, + { + "path": "../injector/tsconfig.esm.json" + }, + { + "path": "../logger/tsconfig.esm.json" + }, + { + "path": "../mongo/tsconfig.esm.json" + }, + { + "path": "../orm/tsconfig.esm.json" + }, + { + "path": "../rpc/tsconfig.esm.json" + }, + { + "path": "../rpc-tcp/tsconfig.esm.json" + }, + { + "path": "../sql/tsconfig.esm.json" + }, + { + "path": "../sqlite/tsconfig.esm.json" + }, + { + "path": "../template/tsconfig.esm.json" + }, + { + "path": "../stopwatch/tsconfig.esm.json" + }, + { + "path": "../workflow/tsconfig.esm.json" + }, + { + "path": "../type/tsconfig.esm.json" + } + ] +} \ No newline at end of file diff --git a/packages/example-app/tsconfig.json b/packages/example-app/tsconfig.json index 24286328b..3b5bb7dd4 100644 --- a/packages/example-app/tsconfig.json +++ b/packages/example-app/tsconfig.json @@ -17,6 +17,9 @@ "jsx": "react-jsx", "jsxImportSource": "@deepkit/template" }, + "ts-node": { + "experimentalResolver": true + }, "reflection": true, "includes": [ "*.ts", diff --git a/packages/framework-debug-api/index.ts b/packages/framework-debug-api/index.ts index 7452657b1..a8625cc45 100644 --- a/packages/framework-debug-api/index.ts +++ b/packages/framework-debug-api/index.ts @@ -8,6 +8,6 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/model'; -export * from './src/api'; -export * from './src/stopwatch-encoding'; +export * from './src/model.js'; +export * from './src/api.js'; +export * from './src/stopwatch-encoding.js'; diff --git a/packages/framework-debug-api/package-lock.json b/packages/framework-debug-api/package-lock.json index 11364df2a..61f8da098 100644 --- a/packages/framework-debug-api/package-lock.json +++ b/packages/framework-debug-api/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/framework-debug-api", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "devDependencies": { "rxjs": "~6.6.0" diff --git a/packages/framework-debug-api/package.json b/packages/framework-debug-api/package.json index 29e6a4244..00f25e383 100644 --- a/packages/framework-debug-api/package.json +++ b/packages/framework-debug-api/package.json @@ -45,7 +45,10 @@ "@deepkit/type": "^1.0.1-alpha.75", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/framework-debug-api/src/api.ts b/packages/framework-debug-api/src/api.ts index 9ed22dcf5..7971caf82 100644 --- a/packages/framework-debug-api/src/api.ts +++ b/packages/framework-debug-api/src/api.ts @@ -9,7 +9,7 @@ */ import { ControllerSymbol } from '@deepkit/rpc'; -import { DebugRequest } from './model'; +import { DebugRequest } from './model.js'; import { Subject } from 'rxjs'; import { deserializeType, entity, Excluded, Type } from '@deepkit/type'; diff --git a/packages/framework-debug-api/tsconfig.json b/packages/framework-debug-api/tsconfig.json index a1423efaa..1531fcbad 100644 --- a/packages/framework-debug-api/tsconfig.json +++ b/packages/framework-debug-api/tsconfig.json @@ -56,4 +56,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/framework-debug-gui/e2e/src/app.e2e-spec.ts b/packages/framework-debug-gui/e2e/src/app.e2e-spec.ts index 9d355da3b..ac8d0d3a0 100644 --- a/packages/framework-debug-gui/e2e/src/app.e2e-spec.ts +++ b/packages/framework-debug-gui/e2e/src/app.e2e-spec.ts @@ -1,5 +1,5 @@ import { browser, logging } from 'protractor'; -import { AppPage } from './app.po'; +import { AppPage } from './app.po.js'; describe('workspace-project App', () => { let page: AppPage; diff --git a/packages/framework-debug-gui/extra-webpack.config.js b/packages/framework-debug-gui/extra-webpack.config.js index 9bac881f7..e0d23dd19 100644 --- a/packages/framework-debug-gui/extra-webpack.config.js +++ b/packages/framework-debug-gui/extra-webpack.config.js @@ -1,3 +1,5 @@ +const ResolveTypeScriptPlugin = require("resolve-typescript-plugin"); + module.exports = { resolve: { fallback: { @@ -6,6 +8,9 @@ module.exports = { path: false, process: false, '@deepkit/logger': false - } + }, + plugins: [new ResolveTypeScriptPlugin({ + includeNodeModules: true + })] } } diff --git a/packages/framework-debug-gui/package.json b/packages/framework-debug-gui/package.json index a617bc838..dfc434982 100644 --- a/packages/framework-debug-gui/package.json +++ b/packages/framework-debug-gui/package.json @@ -72,6 +72,7 @@ "pixi.js": "^5.3.8", "prismjs": "^1.24.1", "protractor": "~7.0.0", + "resolve-typescript-plugin": "^1.2.0", "rxjs": "~6.6.0", "ts-node": "~8.3.0", "tslib": "^2.0.0", diff --git a/packages/framework-debug-gui/src/app/app-routing.module.ts b/packages/framework-debug-gui/src/app/app-routing.module.ts index 7d892c7a8..3b07ffa05 100644 --- a/packages/framework-debug-gui/src/app/app-routing.module.ts +++ b/packages/framework-debug-gui/src/app/app-routing.module.ts @@ -10,13 +10,13 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { ConfigurationComponent } from './views/configuration/configuration.component'; -import { HttpComponent } from './views/http/http.component'; -import { RpcComponent } from './views/rpc/rpc.component'; -import { EventsComponent } from './views/events/events.component'; -import { HttpRequestComponent } from './views/http/request/http-request.component'; -import { ProfileComponent } from './views/profile/profile.component'; -import { ModulesComponent } from './views/modules/modules.component'; +import { ConfigurationComponent } from './views/configuration/configuration.component.js'; +import { HttpComponent } from './views/http/http.component.js'; +import { RpcComponent } from './views/rpc/rpc.component.js'; +import { EventsComponent } from './views/events/events.component.js'; +import { HttpRequestComponent } from './views/http/request/http-request.component.js'; +import { ProfileComponent } from './views/profile/profile.component.js'; +import { ModulesComponent } from './views/modules/modules.component.js'; const routes: Routes = [ { path: '', pathMatch: 'full', redirectTo: 'configuration' }, diff --git a/packages/framework-debug-gui/src/app/app.component.spec.ts b/packages/framework-debug-gui/src/app/app.component.spec.ts index fc86d4efa..0e197ae10 100644 --- a/packages/framework-debug-gui/src/app/app.component.spec.ts +++ b/packages/framework-debug-gui/src/app/app.component.spec.ts @@ -10,7 +10,7 @@ import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { AppComponent } from './app.component'; +import { AppComponent } from './app.component.js'; describe('AppComponent', () => { beforeEach(async () => { diff --git a/packages/framework-debug-gui/src/app/app.component.ts b/packages/framework-debug-gui/src/app/app.component.ts index ddf06b91d..ed31330b8 100644 --- a/packages/framework-debug-gui/src/app/app.component.ts +++ b/packages/framework-debug-gui/src/app/app.component.ts @@ -12,7 +12,7 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { DuiApp, observe } from '@deepkit/desktop-ui'; import { Database, DebugRequest } from '@deepkit/framework-debug-api'; import { Collection } from '@deepkit/rpc'; -import { ControllerClient } from './client'; +import { ControllerClient } from './client.js'; import { Router } from '@angular/router'; @Component({ diff --git a/packages/framework-debug-gui/src/app/app.module.ts b/packages/framework-debug-gui/src/app/app.module.ts index e69b4bad0..594ced170 100644 --- a/packages/framework-debug-gui/src/app/app.module.ts +++ b/packages/framework-debug-gui/src/app/app.module.ts @@ -10,8 +10,8 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; +import { AppRoutingModule } from './app-routing.module.js'; +import { AppComponent } from './app.component.js'; import { DuiAppModule, DuiButtonModule, @@ -25,22 +25,22 @@ import { DuiTableModule, DuiWindowModule, } from '@deepkit/desktop-ui'; -import { ConfigurationComponent } from './views/configuration/configuration.component'; -import { HttpComponent } from './views/http/http.component'; -import { ControllerClient } from './client'; +import { ConfigurationComponent } from './views/configuration/configuration.component.js'; +import { HttpComponent } from './views/http/http.component.js'; +import { ControllerClient } from './client.js'; import { FormsModule } from '@angular/forms'; -import { RpcComponent } from './views/rpc/rpc.component'; -import { WorkflowCardComponent, WorkflowComponent } from './components/workflow.component'; -import { EventsComponent } from './views/events/events.component'; +import { RpcComponent } from './views/rpc/rpc.component.js'; +import { WorkflowCardComponent, WorkflowComponent } from './components/workflow.component.js'; +import { EventsComponent } from './views/events/events.component.js'; import { DeepkitClient } from '@deepkit/rpc'; import { OverlayModule } from '@angular/cdk/overlay'; -import { HttpRequestComponent } from './views/http/request/http-request.component'; +import { HttpRequestComponent } from './views/http/request/http-request.component.js'; import { OrmBrowserModule } from '@deepkit/orm-browser-gui'; import { ApiConsoleModule } from '@deepkit/api-console-gui'; -import { ProfileComponent } from './views/profile/profile.component'; -import { ProfileTimelineComponent } from './views/profile/timeline.component'; -import { ModulesComponent } from './views/modules/modules.component'; -import { ModuleDetailComponent, ModuleDetailServiceComponent } from './views/modules/module-detail.component'; +import { ProfileComponent } from './views/profile/profile.component.js'; +import { ProfileTimelineComponent } from './views/profile/timeline.component.js'; +import { ModulesComponent } from './views/modules/modules.component.js'; +import { ModuleDetailComponent, ModuleDetailServiceComponent } from './views/modules/module-detail.component.js'; import { DeepkitUIModule } from '@deepkit/ui-library'; @NgModule({ diff --git a/packages/framework-debug-gui/src/app/views/configuration/configuration.component.ts b/packages/framework-debug-gui/src/app/views/configuration/configuration.component.ts index 512c620e2..3583e91ef 100644 --- a/packages/framework-debug-gui/src/app/views/configuration/configuration.component.ts +++ b/packages/framework-debug-gui/src/app/views/configuration/configuration.component.ts @@ -9,7 +9,7 @@ */ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { ConfigOption } from '@deepkit/framework-debug-api'; @Component({ diff --git a/packages/framework-debug-gui/src/app/views/events/events.component.ts b/packages/framework-debug-gui/src/app/views/events/events.component.ts index bbd8a7313..04761b88a 100644 --- a/packages/framework-debug-gui/src/app/views/events/events.component.ts +++ b/packages/framework-debug-gui/src/app/views/events/events.component.ts @@ -9,7 +9,7 @@ */ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { Event } from '@deepkit/framework-debug-api'; @Component({ diff --git a/packages/framework-debug-gui/src/app/views/http/http.component.ts b/packages/framework-debug-gui/src/app/views/http/http.component.ts index 1beafb807..55fa979ed 100644 --- a/packages/framework-debug-gui/src/app/views/http/http.component.ts +++ b/packages/framework-debug-gui/src/app/views/http/http.component.ts @@ -9,7 +9,7 @@ */ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { Route, Workflow } from '@deepkit/framework-debug-api'; @Component({ diff --git a/packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts b/packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts index 836003bfd..8d4cb45ca 100644 --- a/packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts +++ b/packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts @@ -10,7 +10,7 @@ import { ChangeDetectorRef, Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { ControllerClient } from '../../../client'; +import { ControllerClient } from '../../../client.js'; import { EntitySubject } from '@deepkit/rpc'; import { DebugRequest, Workflow } from '@deepkit/framework-debug-api'; diff --git a/packages/framework-debug-gui/src/app/views/modules/module-detail.component.ts b/packages/framework-debug-gui/src/app/views/modules/module-detail.component.ts index 0175ad02c..5a41f1a28 100644 --- a/packages/framework-debug-gui/src/app/views/modules/module-detail.component.ts +++ b/packages/framework-debug-gui/src/app/views/modules/module-detail.component.ts @@ -2,7 +2,7 @@ import { Component, Input, OnChanges } from '@angular/core'; import { ModuleApi, ModuleService } from '@deepkit/framework-debug-api'; import { stringifyType } from '@deepkit/type'; import { trackByIndex } from '@deepkit/ui-library'; -import { ModuleImportedService } from '../../../../../framework-debug-api/src/api'; +import { ModuleImportedService } from '../../../../../framework-debug-api/src/api.js'; @Component({ selector: 'module-detail-service', diff --git a/packages/framework-debug-gui/src/app/views/modules/modules.component.ts b/packages/framework-debug-gui/src/app/views/modules/modules.component.ts index 8d6ba9db2..90fa1225d 100644 --- a/packages/framework-debug-gui/src/app/views/modules/modules.component.ts +++ b/packages/framework-debug-gui/src/app/views/modules/modules.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy } from '@angular/core'; import { ModuleApi } from '@deepkit/framework-debug-api'; import { LiveSubject } from '@deepkit/ui-library'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { Subscription } from 'rxjs'; @Component({ diff --git a/packages/framework-debug-gui/src/app/views/profile/frame-container.ts b/packages/framework-debug-gui/src/app/views/profile/frame-container.ts index 9ddba5f4c..3ebd17d1a 100644 --- a/packages/framework-debug-gui/src/app/views/profile/frame-container.ts +++ b/packages/framework-debug-gui/src/app/views/profile/frame-container.ts @@ -1,6 +1,6 @@ import { BrowserText } from '@deepkit/desktop-ui'; import { Container, Graphics, Sprite, Text, Texture } from 'pixi.js'; -import { defaultColors, frameColors, FrameItem } from './frame'; +import { defaultColors, frameColors, FrameItem } from './frame.js'; export class TextCalc { static browserText?: BrowserText; diff --git a/packages/framework-debug-gui/src/app/views/profile/profile.component.ts b/packages/framework-debug-gui/src/app/views/profile/profile.component.ts index 6fe1c636c..405599050 100644 --- a/packages/framework-debug-gui/src/app/views/profile/profile.component.ts +++ b/packages/framework-debug-gui/src/app/views/profile/profile.component.ts @@ -1,11 +1,11 @@ import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { decodeFrameData, decodeFrames } from '@deepkit/framework-debug-api'; import { Application, Container, Graphics, InteractionEvent, Rectangle, Text, TextStyle } from 'pixi.js'; import { FrameCategory, FrameEnd, FrameStart } from '@deepkit/stopwatch'; import * as Hammer from 'hammerjs'; -import { formatTime, FrameItem, FrameParser } from './frame'; -import { FrameContainer } from './frame-container'; +import { formatTime, FrameItem, FrameParser } from './frame.js'; +import { FrameContainer } from './frame-container.js'; import { Subject } from 'rxjs'; import { ClientProgress } from '@deepkit/rpc'; diff --git a/packages/framework-debug-gui/src/app/views/profile/timeline.component.ts b/packages/framework-debug-gui/src/app/views/profile/timeline.component.ts index 5834caa18..3adc4fb4d 100644 --- a/packages/framework-debug-gui/src/app/views/profile/timeline.component.ts +++ b/packages/framework-debug-gui/src/app/views/profile/timeline.component.ts @@ -1,8 +1,8 @@ import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { Application, Container, Rectangle, Text } from 'pixi.js'; -import { formatTime, FrameItem, FrameParser } from './frame'; -import { FrameContainer } from './frame-container'; +import { formatTime, FrameItem, FrameParser } from './frame.js'; +import { FrameContainer } from './frame-container.js'; import { FrameCategory } from '@deepkit/stopwatch'; class TimelineState { diff --git a/packages/framework-debug-gui/src/app/views/rpc/rpc.component.ts b/packages/framework-debug-gui/src/app/views/rpc/rpc.component.ts index cfc18a5b6..2e0c646c0 100644 --- a/packages/framework-debug-gui/src/app/views/rpc/rpc.component.ts +++ b/packages/framework-debug-gui/src/app/views/rpc/rpc.component.ts @@ -9,7 +9,7 @@ */ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ControllerClient } from '../../client'; +import { ControllerClient } from '../../client.js'; import { RpcAction, Workflow } from '@deepkit/framework-debug-api'; @Component({ diff --git a/packages/framework-debug-gui/src/main.ts b/packages/framework-debug-gui/src/main.ts index 9f5050fec..d107dde82 100644 --- a/packages/framework-debug-gui/src/main.ts +++ b/packages/framework-debug-gui/src/main.ts @@ -2,8 +2,8 @@ import 'reflect-metadata'; import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppModule } from './app/app.module.js'; +import { environment } from './environments/environment.js'; if (environment.production) { enableProdMode(); diff --git a/packages/framework-debug-gui/src/polyfills.ts b/packages/framework-debug-gui/src/polyfills.ts index 36902c0aa..5d6dde549 100644 --- a/packages/framework-debug-gui/src/polyfills.ts +++ b/packages/framework-debug-gui/src/polyfills.ts @@ -37,7 +37,7 @@ * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; + * import './zone-flags.js'; * * The flags allowed in zone-flags.ts are listed here. * diff --git a/packages/framework-debug-gui/tsconfig.json b/packages/framework-debug-gui/tsconfig.json index b587c51a4..59a084318 100644 --- a/packages/framework-debug-gui/tsconfig.json +++ b/packages/framework-debug-gui/tsconfig.json @@ -27,6 +27,9 @@ "strictTemplates": true }, "references": [ + { + "path": "../api-console-api/tsconfig.json" + }, { "path": "../bson/tsconfig.json" }, @@ -40,7 +43,7 @@ "path": "../crypto/tsconfig.json" }, { - "path": "../api-console-api/tsconfig.json" + "path": "../event/tsconfig.json" }, { "path": "../framework-debug-api/tsconfig.json" @@ -68,6 +71,12 @@ }, { "path": "../type/tsconfig.json" + }, + { + "path": "../type-compiler/tsconfig.json" + }, + { + "path": "../ui-library/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/framework-examples/tsconfig.json b/packages/framework-examples/tsconfig.json index 5b054f1fb..0cac805ab 100644 --- a/packages/framework-examples/tsconfig.json +++ b/packages/framework-examples/tsconfig.json @@ -38,9 +38,21 @@ { "path": "../type/tsconfig.json" }, + { + "path": "../app/tsconfig.json" + }, + { + "path": "../event/tsconfig.json" + }, + { + "path": "../http/tsconfig.json" + }, { "path": "../mongo/tsconfig.json" }, + { + "path": "../logger/tsconfig.json" + }, { "path": "../orm/tsconfig.json" }, @@ -51,4 +63,4 @@ "path": "../sqlite/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/framework-integration/package.json b/packages/framework-integration/package.json index 7c2759d49..bfbef540e 100644 --- a/packages/framework-integration/package.json +++ b/packages/framework-integration/package.json @@ -42,7 +42,10 @@ "@types/tmp": "^0.0.33", "@types/ws": "^7.4.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/framework-integration/tests/controller-basic.spec.ts b/packages/framework-integration/tests/controller-basic.spec.ts index 7b8b32a14..3b1036cfd 100644 --- a/packages/framework-integration/tests/controller-basic.spec.ts +++ b/packages/framework-integration/tests/controller-basic.spec.ts @@ -1,6 +1,6 @@ import { afterAll, expect, jest, test } from '@jest/globals'; import { ClientProgress, JSONError, rpc } from '@deepkit/rpc'; -import { appModuleForControllers, closeAllCreatedServers, createServerClientPair, subscribeAndWait } from './util'; +import { appModuleForControllers, closeAllCreatedServers, createServerClientPair, subscribeAndWait } from './util.js'; import { Observable } from 'rxjs'; import { bufferCount, first, skip } from 'rxjs/operators'; import { ObserverTimer } from '@deepkit/core-rxjs'; diff --git a/packages/framework-integration/tests/file.spec.ts b/packages/framework-integration/tests/file.spec.ts index 51e5d1be6..9669fe6a8 100644 --- a/packages/framework-integration/tests/file.spec.ts +++ b/packages/framework-integration/tests/file.spec.ts @@ -1,6 +1,6 @@ // import { expect, test, beforeAll } from '@jest/globals'; // import { EntityStorage, FS } from '@deepkit/fs'; -// import { appModuleForControllers, closeAllCreatedServers, createServerClientPair } from './util'; +// import { appModuleForControllers, closeAllCreatedServers, createServerClientPair } from './util.js'; // import { sleep } from '@deepkit/core'; // import { Buffer } from 'buffer'; // import { arrayBufferTo } from '@deepkit/type'; diff --git a/packages/framework-integration/tests/peer2peer.spec.ts b/packages/framework-integration/tests/peer2peer.spec.ts index 1ba6417ed..f4d748665 100644 --- a/packages/framework-integration/tests/peer2peer.spec.ts +++ b/packages/framework-integration/tests/peer2peer.spec.ts @@ -1,6 +1,6 @@ // import { afterAll, expect, test } from '@jest/globals'; // import { Entity, f } from '@deepkit/type'; -// import { appModuleForControllers, closeAllCreatedServers, createServerClientPair } from './util'; +// import { appModuleForControllers, closeAllCreatedServers, createServerClientPair } from './util.js'; // import { createModule, DeepkitRpcSecurity } from '@deepkit/framework'; // import { Observable } from 'rxjs'; // import { sleep } from '@deepkit/core'; diff --git a/packages/framework-integration/tsconfig.json b/packages/framework-integration/tsconfig.json index d18252e20..a26b34a64 100644 --- a/packages/framework-integration/tsconfig.json +++ b/packages/framework-integration/tsconfig.json @@ -31,18 +31,42 @@ { "path": "../rpc/tsconfig.json" }, + { + "path": "../rpc-tcp/tsconfig.json" + }, + { + "path": "../broker/tsconfig.json" + }, { "path": "../framework/tsconfig.json" }, { "path": "../app/tsconfig.json" }, + { + "path": "../bson/tsconfig.json" + }, { "path": "../type/tsconfig.json" }, + { + "path": "../http/tsconfig.json" + }, + { + "path": "../event/tsconfig.json" + }, + { + "path": "../logger/tsconfig.json" + }, { "path": "../injector/tsconfig.json" }, + { + "path": "../workflow/tsconfig.json" + }, + { + "path": "../stopwatch/tsconfig.json" + }, { "path": "../orm/tsconfig.json" }, @@ -53,4 +77,4 @@ "path": "../sqlite/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/framework/index.ts b/packages/framework/index.ts index e49e97491..137d780a4 100644 --- a/packages/framework/index.ts +++ b/packages/framework/index.ts @@ -8,16 +8,16 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/session'; -export * from './src/application-server'; -export * from './src/worker'; -export * from './src/database/database-listener'; -// export * from './src/database/live-database'; -export * from './src/orm-browser/controller'; -export * from './src/rpc'; -export * from './src/module.config'; -export * from './src/module'; -export * from './src/crud'; -export * from './src/testing'; -export * from './src/broker/broker'; -export * from './src/broker/broker.config'; +export * from './src/session.js'; +export * from './src/application-server.js'; +export * from './src/worker.js'; +export * from './src/database/database-listener.js'; +// export * from './src/database/live-database.js'; +export * from './src/orm-browser/controller.js'; +export * from './src/rpc.js'; +export * from './src/module.config.js'; +export * from './src/module.js'; +export * from './src/crud.js'; +export * from './src/testing.js'; +export * from './src/broker/broker.js'; +export * from './src/broker/broker.config.js'; diff --git a/packages/framework/loader.ts b/packages/framework/loader.ts index 305a90293..83296f703 100644 --- a/packages/framework/loader.ts +++ b/packages/framework/loader.ts @@ -2,7 +2,7 @@ import * as tsNode from 'ts-node/esm'; import { optimizeJSX } from '@deepkit/template'; import { inDebugMode } from '@deepkit/core'; -import { importedFiles } from './src/watch'; +import { importedFiles } from './src/watch.js'; export async function resolve(specifier: string, context: { parentURL: string }, defaultResolve: typeof resolve): Promise<{ url: string }> { const res = await tsNode.resolve(specifier, context, defaultResolve); diff --git a/packages/framework/package.json b/packages/framework/package.json index 64f18bde3..10ec2e421 100644 --- a/packages/framework/package.json +++ b/packages/framework/package.json @@ -45,6 +45,7 @@ "@deepkit/workflow": "^1.0.1-alpha.13" }, "dependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/api-console-module": "^1.0.1-alpha.75", "@deepkit/framework-debug-api": "^1.0.1-alpha.75", "@deepkit/framework-debug-gui": "^1.0.1-alpha.75", @@ -95,7 +96,10 @@ "@types/ws": "^7.4.0", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/framework/src/application-server.ts b/packages/framework/src/application-server.ts index f83abf868..10c4b6aa9 100644 --- a/packages/framework/src/application-server.ts +++ b/packages/framework/src/application-server.ts @@ -14,10 +14,10 @@ import cluster from 'cluster'; import { HttpRouter } from '@deepkit/http'; import { BaseEvent, EventDispatcher, eventDispatcher, EventToken } from '@deepkit/event'; import { InjectorContext } from '@deepkit/injector'; -import { FrameworkConfig } from './module.config'; +import { FrameworkConfig } from './module.config.js'; import { LoggerInterface } from '@deepkit/logger'; -import { createRpcConnection, WebWorker, WebWorkerFactory } from './worker'; -import { RpcControllers } from './rpc'; +import { createRpcConnection, WebWorker, WebWorkerFactory } from './worker.js'; +import { RpcControllers } from './rpc.js'; import '@deepkit/type'; export class ServerBootstrapEvent extends BaseEvent { diff --git a/packages/framework/src/broker/app-locker.ts b/packages/framework/src/broker/app-locker.ts index 487f2720d..85207fa8c 100644 --- a/packages/framework/src/broker/app-locker.ts +++ b/packages/framework/src/broker/app-locker.ts @@ -9,7 +9,7 @@ */ import { AsyncSubscription } from '@deepkit/core-rxjs'; -import { Broker } from './broker'; +import { Broker } from './broker.js'; export class AppLock { constructor(protected subscription: AsyncSubscription) { diff --git a/packages/framework/src/broker/broker.module.ts b/packages/framework/src/broker/broker.module.ts index 2cdb97a87..9afc09e20 100644 --- a/packages/framework/src/broker/broker.module.ts +++ b/packages/framework/src/broker/broker.module.ts @@ -8,12 +8,12 @@ * You should have received a copy of the MIT License along with this program. */ -import { AppLocker } from './app-locker'; +import { AppLocker } from './app-locker.js'; import { createModule } from '@deepkit/app'; import { eventDispatcher } from '@deepkit/event'; -import { onServerMainBootstrap, onServerMainShutdown } from '../application-server'; -import { BrokerConfig } from './broker.config'; -import { Broker, BrokerServer } from './broker'; +import { onServerMainBootstrap, onServerMainShutdown } from '../application-server.js'; +import { BrokerConfig } from './broker.config.js'; +import { Broker, BrokerServer } from './broker.js'; import { LoggerInterface } from '@deepkit/logger'; export class BrokerListener { diff --git a/packages/framework/src/broker/broker.ts b/packages/framework/src/broker/broker.ts index b3c66e28d..fbcc4bbf4 100644 --- a/packages/framework/src/broker/broker.ts +++ b/packages/framework/src/broker/broker.ts @@ -11,7 +11,7 @@ import { BrokerChannel, BrokerClient, BrokerKernel } from '@deepkit/broker'; import { ClassType } from '@deepkit/core'; import { IdInterface, RpcDirectClientAdapter } from '@deepkit/rpc'; -import { BrokerConfig } from './broker.config'; +import { BrokerConfig } from './broker.config.js'; import { RpcNetTcpClientAdapter, RpcNetTcpServer, RpcTcpClientAdapter, RpcTcpServer } from '@deepkit/rpc-tcp'; import { MongoId, ReflectionClass, Type, typeOf, UUID } from '@deepkit/type'; diff --git a/packages/framework/src/cli/app-config.ts b/packages/framework/src/cli/app-config.ts index 38e069fb8..811b7cce6 100644 --- a/packages/framework/src/cli/app-config.ts +++ b/packages/framework/src/cli/app-config.ts @@ -9,7 +9,7 @@ */ import { cli, Command } from '@deepkit/app'; -import { DebugController } from '../debug/debug.controller'; +import { DebugController } from '../debug/debug.controller.js'; import { ConfigOption } from "@deepkit/framework-debug-api"; import { ReflectionClass } from "@deepkit/type"; import { createTable } from 'nice-table'; diff --git a/packages/framework/src/cli/debug-debug-frames.ts b/packages/framework/src/cli/debug-debug-frames.ts index 863fb324d..591daa05a 100644 --- a/packages/framework/src/cli/debug-debug-frames.ts +++ b/packages/framework/src/cli/debug-debug-frames.ts @@ -12,7 +12,7 @@ import { cli, Command, flag } from '@deepkit/app'; import { join } from 'path'; import { readFileSync, unlinkSync } from 'fs'; import { decodeFrameData, decodeFrames } from '@deepkit/framework-debug-api'; -import { FrameworkConfig } from '../module.config'; +import { FrameworkConfig } from '../module.config.js'; import { LoggerInterface } from '@deepkit/logger'; @cli.controller('debug:debug:frames', {}) diff --git a/packages/framework/src/cli/server-start.ts b/packages/framework/src/cli/server-start.ts index c8e74a057..1414874e5 100644 --- a/packages/framework/src/cli/server-start.ts +++ b/packages/framework/src/cli/server-start.ts @@ -8,10 +8,10 @@ * You should have received a copy of the MIT License along with this program. */ -import { ApplicationServer } from '../application-server'; +import { ApplicationServer } from '../application-server.js'; import { AppModule, cli, Command, flag, ServiceContainer } from '@deepkit/app'; import { DefaultFormatter, Logger, LoggerInterface } from '@deepkit/logger'; -import { FrameworkModule } from '../module'; +import { FrameworkModule } from '../module.js'; @cli.controller('server:start', { description: 'Starts the application server. If HTTP or RPC controllers or a publicDir are provided this will include an HTTP listener' diff --git a/packages/framework/src/database/database-listener.ts b/packages/framework/src/database/database-listener.ts index 7afc68a34..8b9398567 100644 --- a/packages/framework/src/database/database-listener.ts +++ b/packages/framework/src/database/database-listener.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { onServerMainBootstrap, onServerMainShutdown } from '../application-server'; +import { onServerMainBootstrap, onServerMainShutdown } from '../application-server.js'; import { eventDispatcher } from '@deepkit/event'; import { LoggerInterface } from '@deepkit/logger'; import { DatabaseRegistry } from '@deepkit/orm'; diff --git a/packages/framework/src/debug/broker.ts b/packages/framework/src/debug/broker.ts index 4a782a89e..e7d99f353 100644 --- a/packages/framework/src/debug/broker.ts +++ b/packages/framework/src/debug/broker.ts @@ -1,9 +1,9 @@ -import { BaseBroker } from '../broker/broker'; +import { BaseBroker } from '../broker/broker.js'; import { eventDispatcher } from '@deepkit/event'; -import { onServerMainBootstrap, onServerMainShutdown } from '../application-server'; +import { onServerMainBootstrap, onServerMainShutdown } from '../application-server.js'; import { RpcNetTcpClientAdapter, RpcNetTcpServer } from '@deepkit/rpc-tcp'; import { BrokerKernel } from '@deepkit/broker'; -import { FrameworkConfig } from '../module.config'; +import { FrameworkConfig } from '../module.config.js'; export class DebugBroker extends BaseBroker { constructor(brokerHost: FrameworkConfig['debugBrokerHost']) { diff --git a/packages/framework/src/debug/debug.controller.ts b/packages/framework/src/debug/debug.controller.ts index 77fbec878..0d9ab008c 100644 --- a/packages/framework/src/debug/debug.controller.ts +++ b/packages/framework/src/debug/debug.controller.ts @@ -29,13 +29,13 @@ import { EventDispatcher, isEventListenerContainerEntryService } from '@deepkit/ import { DatabaseAdapter, DatabaseRegistry } from '@deepkit/orm'; import { readFileSync, statSync, truncateSync } from 'fs'; import { join } from 'path'; -import { FrameworkConfig } from '../module.config'; -import { FileStopwatchStore } from './stopwatch/store'; +import { FrameworkConfig } from '../module.config.js'; +import { FileStopwatchStore } from './stopwatch/store.js'; import { Subject } from 'rxjs'; import { unlink } from 'fs/promises'; import { getScope, resolveToken, Token } from '@deepkit/injector'; import { AppModule, ServiceContainer } from '@deepkit/app'; -import { RpcControllers } from '../rpc'; +import { RpcControllers } from '../rpc.js'; import { ReflectionClass, serializeType, stringifyType } from '@deepkit/type'; @rpc.controller(DebugControllerInterface) diff --git a/packages/framework/src/debug/http-debug.controller.ts b/packages/framework/src/debug/http-debug.controller.ts index 1f18f07eb..dfdefe812 100644 --- a/packages/framework/src/debug/http-debug.controller.ts +++ b/packages/framework/src/debug/http-debug.controller.ts @@ -8,14 +8,17 @@ * You should have received a copy of the MIT License along with this program. */ +import { getDirname } from "@deepkit/platform" import { registerStaticHttpController } from '@deepkit/http'; import { AppModule, findParentPath } from '@deepkit/app'; +const _dirname = getDirname(); + export function registerDebugHttpController(module: AppModule, path: string): void { - const localPath = findParentPath('node_modules/@deepkit/framework-debug-gui/dist/framework-debug-gui', __dirname); + const localPath = findParentPath('node_modules/@deepkit/framework-debug-gui/dist/framework-debug-gui', _dirname); if (localPath) { registerStaticHttpController(module, {path, localPath, groups: ['app-static'], controllerName: 'FrameworkDebuggerController'}); } else { - console.log('Warning: node_modules/@deepkit/framework-debug-gui no build found in ' + __dirname); + console.log('Warning: node_modules/@deepkit/framework-debug-gui no build found in ' + _dirname); } } diff --git a/packages/framework/src/debug/stopwatch/store.ts b/packages/framework/src/debug/stopwatch/store.ts index 622aad5d1..49095ee78 100644 --- a/packages/framework/src/debug/stopwatch/store.ts +++ b/packages/framework/src/debug/stopwatch/store.ts @@ -3,11 +3,11 @@ import { appendFile, existsSync, readFileSync } from 'fs'; import { join } from 'path'; import { decodeFrames, encodeFrameData, encodeFrames } from '@deepkit/framework-debug-api'; import { asyncOperation, Mutex } from '@deepkit/core'; -import { FrameworkConfig } from '../../module.config'; -import { Zone } from '../../zone'; +import { FrameworkConfig } from '../../module.config.js'; +import { Zone } from '../../zone.js'; import cluster from 'cluster'; import { performance } from 'perf_hooks'; -import { DebugBroker } from '../broker'; +import { DebugBroker } from '../broker.js'; export class FileStopwatchStore extends StopwatchStore { protected lastSync?: any; diff --git a/packages/framework/src/module.ts b/packages/framework/src/module.ts index 0de7ad3d3..70d8aad66 100644 --- a/packages/framework/src/module.ts +++ b/packages/framework/src/module.ts @@ -12,34 +12,34 @@ import { ClassType, isClass, isPrototypeOfBase, ProcessLocker } from '@deepkit/c import { EventDispatcher } from '@deepkit/event'; import { mkdirSync } from 'fs'; import { join } from 'path'; -import { ApplicationServer, ApplicationServerListener } from './application-server'; -import { BrokerModule } from './broker/broker.module'; -import { DebugRouterController } from './cli/debug-router'; -import { DebugDIController } from './cli/debug-di'; -import { ServerStartController } from './cli/server-start'; -import { DebugController } from './debug/debug.controller'; -import { registerDebugHttpController } from './debug/http-debug.controller'; +import { ApplicationServer, ApplicationServerListener } from './application-server.js'; +import { BrokerModule } from './broker/broker.module.js'; +import { DebugRouterController } from './cli/debug-router.js'; +import { DebugDIController } from './cli/debug-di.js'; +import { ServerStartController } from './cli/server-start.js'; +import { DebugController } from './debug/debug.controller.js'; +import { registerDebugHttpController } from './debug/http-debug.controller.js'; import { HttpLogger, HttpModule, HttpRequest, serveStaticListener } from '@deepkit/http'; import { InjectorContext, injectorReference, ProviderWithScope, Token } from '@deepkit/injector'; -import { FrameworkConfig } from './module.config'; +import { FrameworkConfig } from './module.config.js'; import { ConsoleTransport, Logger, LoggerInterface } from '@deepkit/logger'; -import { SessionHandler } from './session'; -import { RpcServer, WebWorkerFactory } from './worker'; +import { SessionHandler } from './session.js'; +import { RpcServer, WebWorkerFactory } from './worker.js'; import { Stopwatch } from '@deepkit/stopwatch'; -import { OrmBrowserController } from './orm-browser/controller'; -import { DatabaseListener } from './database/database-listener'; +import { OrmBrowserController } from './orm-browser/controller.js'; +import { DatabaseListener } from './database/database-listener.js'; import { Database, DatabaseRegistry } from '@deepkit/orm'; import { MigrationCreateController, MigrationDownCommand, MigrationPendingCommand, MigrationProvider, MigrationUpCommand } from '@deepkit/sql/commands'; -import { FileStopwatchStore } from './debug/stopwatch/store'; -import { DebugDebugFramesCommand } from './cli/debug-debug-frames'; +import { FileStopwatchStore } from './debug/stopwatch/store.js'; +import { DebugDebugFramesCommand } from './cli/debug-debug-frames.js'; import { ConnectionWriter, rpcClass, RpcKernel, RpcKernelBaseConnection, RpcKernelConnection, RpcKernelSecurity, SessionState } from '@deepkit/rpc'; -import { AppConfigController } from './cli/app-config'; -import { Zone } from './zone'; -import { DebugBroker, DebugBrokerListener } from './debug/broker'; +import { AppConfigController } from './cli/app-config.js'; +import { Zone } from './zone.js'; +import { DebugBroker, DebugBrokerListener } from './debug/broker.js'; import { ApiConsoleModule } from '@deepkit/api-console-module'; import { AppModule, createModule } from '@deepkit/app'; -import { RpcControllers, RpcInjectorContext, RpcKernelWithStopwatch } from './rpc'; -import { normalizeDirectory } from './utils'; +import { RpcControllers, RpcInjectorContext, RpcKernelWithStopwatch } from './rpc.js'; +import { normalizeDirectory } from './utils.js'; export class FrameworkModule extends createModule({ config: FrameworkConfig, diff --git a/packages/framework/src/testing.ts b/packages/framework/src/testing.ts index c53cbbe18..232a907ad 100644 --- a/packages/framework/src/testing.ts +++ b/packages/framework/src/testing.ts @@ -12,14 +12,14 @@ import { BrokerKernel } from '@deepkit/broker'; import { ClassType } from '@deepkit/core'; import { ConsoleTransport, Logger, MemoryLoggerTransport } from '@deepkit/logger'; import { Database, DatabaseRegistry, MemoryDatabaseAdapter } from '@deepkit/orm'; -import { ApplicationServer } from './application-server'; -import { Broker, BrokerServer, DirectBroker } from './broker/broker'; +import { ApplicationServer } from './application-server.js'; +import { Broker, BrokerServer, DirectBroker } from './broker/broker.js'; import { injectorReference } from '@deepkit/injector'; import { App, AppModule, RootAppModule, RootModuleDefinition } from '@deepkit/app'; -import { WebMemoryWorkerFactory, WebWorkerFactory } from './worker'; +import { WebMemoryWorkerFactory, WebWorkerFactory } from './worker.js'; import { HttpKernel, MemoryHttpResponse, RequestBuilder } from '@deepkit/http'; import { RpcClient } from '@deepkit/rpc'; -import { FrameworkModule } from './module'; +import { FrameworkModule } from './module.js'; /** * @deprecated use {@link MemoryHttpResponse} instead diff --git a/packages/framework/src/worker.ts b/packages/framework/src/worker.ts index fad094326..aa9e46a7a 100644 --- a/packages/framework/src/worker.ts +++ b/packages/framework/src/worker.ts @@ -18,7 +18,7 @@ import type { Server as WebSocketServer, ServerOptions as WebSocketServerOptions import { HttpKernel, HttpRequest, HttpResponse } from '@deepkit/http'; import { InjectorContext } from '@deepkit/injector'; -import { RpcControllers, RpcInjectorContext } from './rpc'; +import { RpcControllers, RpcInjectorContext } from './rpc.js'; import { SecureContextOptions, TlsOptions } from 'tls'; // @ts-ignore diff --git a/packages/framework/tests/application-server.spec.ts b/packages/framework/tests/application-server.spec.ts index 136dde1fe..69120613c 100644 --- a/packages/framework/tests/application-server.spec.ts +++ b/packages/framework/tests/application-server.spec.ts @@ -1,13 +1,13 @@ import { rpc } from '@deepkit/rpc'; import { afterEach, describe, expect, it, jest, test } from '@jest/globals'; import { InjectorContext } from '@deepkit/injector'; -import { createTestingApp } from '../src/testing'; -import { ApplicationServer } from '../src/application-server'; +import { createTestingApp } from '../src/testing.js'; +import { ApplicationServer } from '../src/application-server.js'; import { ConsoleTransport, Logger, MemoryLoggerTransport } from '@deepkit/logger'; -import { FrameworkModule } from '../src/module'; -import { RpcServer, RpcServerInterface, WebWorker } from '../src/worker'; +import { FrameworkModule } from '../src/module.js'; +import { RpcServer, RpcServerInterface, WebWorker } from '../src/worker.js'; import { HttpRequest } from '@deepkit/http'; -import { BrokerModule } from '../src/broker/broker.module'; +import { BrokerModule } from '../src/broker/broker.module.js'; import { App } from '@deepkit/app'; jest.mock('ws', () => { diff --git a/packages/framework/tests/broker.spec.ts b/packages/framework/tests/broker.spec.ts index e66cd9cac..67b7e6392 100644 --- a/packages/framework/tests/broker.spec.ts +++ b/packages/framework/tests/broker.spec.ts @@ -3,7 +3,7 @@ import { sleep } from '@deepkit/core'; import { cast, entity, PrimaryKey, UUID, uuid } from '@deepkit/type'; import { expect, test } from '@jest/globals'; import { BehaviorSubject } from 'rxjs'; -import { DirectBroker, EntityChannelMessageType } from '../src/broker/broker'; +import { DirectBroker, EntityChannelMessageType } from '../src/broker/broker.js'; test('entity channel number', async () => { const kernel = new BrokerKernel(); diff --git a/packages/framework/tests/http.spec.ts b/packages/framework/tests/http.spec.ts index 8619fe387..adf9db80a 100644 --- a/packages/framework/tests/http.spec.ts +++ b/packages/framework/tests/http.spec.ts @@ -1,5 +1,5 @@ import { App } from '@deepkit/app'; -import { FrameworkModule } from '../src/module'; +import { FrameworkModule } from '../src/module.js'; import { expect, test } from '@jest/globals'; import { HttpKernel, HttpRequest, HttpRouterRegistry } from '@deepkit/http'; import { Logger } from '@deepkit/logger'; diff --git a/packages/framework/tests/router.spec.ts b/packages/framework/tests/router.spec.ts index 3f9442d8e..0146cccfe 100644 --- a/packages/framework/tests/router.spec.ts +++ b/packages/framework/tests/router.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { http, HttpKernel, HttpRegExp, HttpRequest, JSONResponse, RouteParameterResolverContext } from '@deepkit/http'; import { App } from '@deepkit/app'; -import { FrameworkModule } from '../src/module'; +import { FrameworkModule } from '../src/module.js'; test('router parameters', async () => { class Controller2 { diff --git a/packages/framework/tests/rpc.spec.ts b/packages/framework/tests/rpc.spec.ts index 3b788a5e2..246d9d731 100644 --- a/packages/framework/tests/rpc.spec.ts +++ b/packages/framework/tests/rpc.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { ControllerSymbol, rpc, RpcKernelConnection, RpcKernelSecurity, Session, SessionState } from '@deepkit/rpc'; -import { createTestingApp } from '../src/testing'; +import { createTestingApp } from '../src/testing.js'; import { AppModule } from '@deepkit/app'; test('di', async () => { diff --git a/packages/framework/tests/service-container.spec.ts b/packages/framework/tests/service-container.spec.ts index bea509955..bfda6f471 100644 --- a/packages/framework/tests/service-container.spec.ts +++ b/packages/framework/tests/service-container.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { rpc } from '@deepkit/rpc'; import { App, AppModule, createModule, ServiceContainer } from '@deepkit/app'; -import { FrameworkModule } from '../src/module'; +import { FrameworkModule } from '../src/module.js'; import { Database, DatabaseEvent, DatabaseRegistry, MemoryDatabaseAdapter, Query } from '@deepkit/orm'; import { EventDispatcher } from '@deepkit/event'; import { PrimaryKey } from '@deepkit/type'; diff --git a/packages/framework/tests/zone.spec.ts b/packages/framework/tests/zone.spec.ts index 594c9bc80..05006ee26 100644 --- a/packages/framework/tests/zone.spec.ts +++ b/packages/framework/tests/zone.spec.ts @@ -1,6 +1,6 @@ import { sleep } from '@deepkit/core'; import { expect, test } from '@jest/globals'; -import { Zone } from '../src/zone'; +import { Zone } from '../src/zone.js'; test('zone', async () => { diff --git a/packages/framework/tsconfig.esm.json b/packages/framework/tsconfig.esm.json index 68b9e9455..62ebc02cc 100644 --- a/packages/framework/tsconfig.esm.json +++ b/packages/framework/tsconfig.esm.json @@ -5,6 +5,9 @@ "module": "ES2020" }, "references": [ + { + "path": "../platform/tsconfig.esm.json" + }, { "path": "../api-console-module/tsconfig.esm.json" }, diff --git a/packages/framework/tsconfig.json b/packages/framework/tsconfig.json index 4970da0da..e7d3eedcd 100644 --- a/packages/framework/tsconfig.json +++ b/packages/framework/tsconfig.json @@ -30,6 +30,9 @@ "loader.ts" ], "references": [ + { + "path": "../platform/tsconfig.json" + }, { "path": "../api-console-module/tsconfig.json" }, @@ -97,4 +100,4 @@ "path": "../workflow/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/fs/index.ts b/packages/fs/index.ts index 317849e3c..fc90809eb 100644 --- a/packages/fs/index.ts +++ b/packages/fs/index.ts @@ -8,4 +8,4 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/fs.module' +export * from './src/fs.module.js' diff --git a/packages/fs/package-lock.json b/packages/fs/package-lock.json index ec02ee3d7..29f7c8ad0 100644 --- a/packages/fs/package-lock.json +++ b/packages/fs/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/fs", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.73", "license": "MIT", "dependencies": { "fs-extra": "^9.0.1", diff --git a/packages/fs/package.json b/packages/fs/package.json index 9439797c0..8988629d9 100644 --- a/packages/fs/package.json +++ b/packages/fs/package.json @@ -25,7 +25,10 @@ "devDependencies": { "@types/fs-extra": "^9.0.1" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/fs/src/fs.module.ts b/packages/fs/src/fs.module.ts index 56e271009..f387e1224 100644 --- a/packages/fs/src/fs.module.ts +++ b/packages/fs/src/fs.module.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { FsConfig } from './fs.config'; +import { FsConfig } from './fs.config.js'; import { Database, DatabaseAdapter } from '@deepkit/orm'; import { AppModule } from '@deepkit/app'; import { injectable } from '@deepkit/injector'; diff --git a/packages/fs/tests/fs.spec.ts b/packages/fs/tests/fs.spec.ts index af2861286..89c99edbe 100644 --- a/packages/fs/tests/fs.spec.ts +++ b/packages/fs/tests/fs.spec.ts @@ -1,13 +1,13 @@ // import 'jest'; -// import {FS, getMd5} from "../src/fs"; -// import {Exchange} from "../src/exchange"; +// import {FS, getMd5} from "../src/fs.js"; +// import {Exchange} from "../src/exchange.js"; // import {pathExists, readFile, remove} from 'fs-extra'; -// import {ExchangeDatabase, ExchangeNotifyPolicy} from "../src/exchange-database"; +// import {ExchangeDatabase, ExchangeNotifyPolicy} from "../src/exchange-database.js"; // import {ClassType} from '@deepkit/core'; // import {Connection, Database} from '@deepkit/mongo'; // import {FileType} from "@deepkit/framework-shared"; -// import {ProcessLocker} from "../src/process-locker"; -// import {ExchangeServer} from "../src/exchange-server"; +// import {ProcessLocker} from "../src/process-locker.js"; +// import {ExchangeServer} from "../src/exchange-server.js"; // // jest.setTimeout(100_000); // diff --git a/packages/http/index.ts b/packages/http/index.ts index 3459574e2..f4f642557 100644 --- a/packages/http/index.ts +++ b/packages/http/index.ts @@ -1,13 +1,13 @@ -export * from './src/decorator'; -export * from './src/http'; -export * from './src/model'; -export * from './src/logger'; -export * from './src/router'; -export * from './src/static-serving'; -export * from './src/kernel'; -export * from './src/module'; -export * from './src/module.config'; -export * from './src/controllers'; -export * from './src/middleware'; -export * from './src/filter'; -export * from './src/utils'; +export * from './src/decorator.js'; +export * from './src/http.js'; +export * from './src/model.js'; +export * from './src/logger.js'; +export * from './src/router.js'; +export * from './src/static-serving.js'; +export * from './src/kernel.js'; +export * from './src/module.js'; +export * from './src/module.config.js'; +export * from './src/controllers.js'; +export * from './src/middleware.js'; +export * from './src/filter.js'; +export * from './src/utils.js'; diff --git a/packages/http/package-lock.json b/packages/http/package-lock.json index 93e16703e..a06c86ca3 100644 --- a/packages/http/package-lock.json +++ b/packages/http/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/http", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.73", "license": "MIT", "dependencies": { "formidable": "^2.0.1", diff --git a/packages/http/package.json b/packages/http/package.json index aee232b04..b2db9489c 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -22,6 +22,7 @@ "build": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json" }, "peerDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.13", "@deepkit/core": "^1.0.1-alpha.13", "@deepkit/event": "^1.0.1-alpha.13", @@ -38,6 +39,7 @@ "send": "^0.18.0" }, "devDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.75", "@deepkit/core": "^1.0.1-alpha.75", "@deepkit/event": "^1.0.1-alpha.75", @@ -50,13 +52,13 @@ "@types/node": "14.14.28", "@types/send": "^0.14.6" }, - "jest": { - "transform": { - "^.+\\.(ts|tsx)$": "ts-jest" - }, + "jest": { "moduleNameMapper": { "(.+)\\.js": "$1" }, + "transform": { + "^.+\\.(ts|tsx)$": "ts-jest" + }, "resolver": "../../jest-resolver.js", "testMatch": [ "**/tests/**/*.spec.ts" diff --git a/packages/http/src/decorator.ts b/packages/http/src/decorator.ts index 522a9ad6f..ee3229169 100644 --- a/packages/http/src/decorator.ts +++ b/packages/http/src/decorator.ts @@ -27,8 +27,8 @@ import { Type, UnionToIntersection } from '@deepkit/type'; -import { RouteParameterResolver } from './router'; -import { httpMiddleware, HttpMiddleware, HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware'; +import { RouteParameterResolver } from './router.js'; +import { httpMiddleware, HttpMiddleware, HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware.js'; type HttpActionMiddleware = (() => HttpMiddlewareConfig) | ClassType | HttpMiddlewareFn; diff --git a/packages/http/src/filter.ts b/packages/http/src/filter.ts index 5252ba4f1..3e2202ed6 100644 --- a/packages/http/src/filter.ts +++ b/packages/http/src/filter.ts @@ -1,6 +1,6 @@ import { ClassType } from '@deepkit/core'; import { AppModule } from '@deepkit/app'; -import { RouteConfig, HttpRouter } from './router'; +import { RouteConfig, HttpRouter } from './router.js'; export interface HttpRouteFilterRoute { path?: string; diff --git a/packages/http/src/http.ts b/packages/http/src/http.ts index 11c3aac63..9a953d7c0 100644 --- a/packages/http/src/http.ts +++ b/packages/http/src/http.ts @@ -11,12 +11,12 @@ import { asyncOperation, ClassType, CustomError, getClassName, getClassTypeFromInstance, isClassInstance } from '@deepkit/core'; import { OutgoingHttpHeaders, ServerResponse } from 'http'; import { eventDispatcher } from '@deepkit/event'; -import { HttpRequest, HttpResponse } from './model'; +import { HttpRequest, HttpResponse } from './model.js'; import { InjectorContext } from '@deepkit/injector'; import { LoggerInterface } from '@deepkit/logger'; -import { HttpRouter, RouteConfig, RouteParameterResolverForInjector } from './router'; +import { HttpRouter, RouteConfig, RouteParameterResolverForInjector } from './router.js'; import { createWorkflow, WorkflowEvent } from '@deepkit/workflow'; -import type { ElementStruct, render } from '@deepkit/template'; +import type { ElementStruct, render as Render } from '@deepkit/template'; import { FrameCategory, Stopwatch } from '@deepkit/stopwatch'; import { getSerializeFunction, hasTypeInformation, ReflectionKind, resolveReceiveType, SerializationError, serialize, serializer, ValidationError } from '@deepkit/type'; import stream from 'stream'; @@ -25,12 +25,21 @@ export function isElementStruct(v: any): v is ElementStruct { return 'object' === typeof v && v.hasOwnProperty('render') && v.hasOwnProperty('attributes') && !v.slice; } -let templateRender: typeof render; +let templateRender: typeof Render; -function getTemplateRender(): typeof render { +async function getTemplateRender(): Promise { if (!templateRender) { - const template = require('@deepkit/template'); - templateRender = template.render; + // @ts-ignore + if(global.require) { + // CommonJS version + const { render } = require('@deepkit/template'); + templateRender = render; + } else { + // ESM version + const { render } = await import('@deepkit/template'); + templateRender = render; + } + } return templateRender; @@ -654,7 +663,7 @@ export class HttpListener { } if (isElementStruct(result)) { - const html = await getTemplateRender()(event.injectorContext.getRootInjector(), result, this.stopwatch ? this.stopwatch : undefined); + const html = await (await getTemplateRender())(event.injectorContext.getRootInjector(), result, this.stopwatch ? this.stopwatch : undefined); result = new HtmlResponse(html, 200).header('Content-Type', 'text/html; charset=utf-8'); } if (result instanceof stream.Readable) { diff --git a/packages/http/src/kernel.ts b/packages/http/src/kernel.ts index b1bf58281..a7b879d93 100644 --- a/packages/http/src/kernel.ts +++ b/packages/http/src/kernel.ts @@ -1,9 +1,9 @@ import { InjectorContext } from '@deepkit/injector'; -import { HttpRouter } from './router'; +import { HttpRouter } from './router.js'; import { EventDispatcher } from '@deepkit/event'; import { LoggerInterface } from '@deepkit/logger'; -import { HttpRequest, HttpResponse, MemoryHttpResponse, RequestBuilder } from './model'; -import { HttpRequestEvent, httpWorkflow } from './http'; +import { HttpRequest, HttpResponse, MemoryHttpResponse, RequestBuilder } from './model.js'; +import { HttpRequestEvent, httpWorkflow } from './http.js'; import { FrameCategory, Stopwatch } from '@deepkit/stopwatch'; import { unlink } from 'fs'; diff --git a/packages/http/src/logger.ts b/packages/http/src/logger.ts index aef1d0eb7..f821b44f5 100644 --- a/packages/http/src/logger.ts +++ b/packages/http/src/logger.ts @@ -1,6 +1,6 @@ import { LoggerInterface } from '@deepkit/logger'; import { eventDispatcher } from '@deepkit/event'; -import { httpWorkflow } from './http'; +import { httpWorkflow } from './http.js'; export class HttpLogger { constructor(private logger: LoggerInterface) { diff --git a/packages/http/src/middleware.ts b/packages/http/src/middleware.ts index 2e3ddcbd0..fc5ede289 100644 --- a/packages/http/src/middleware.ts +++ b/packages/http/src/middleware.ts @@ -1,7 +1,7 @@ import { ClassType, isClass } from '@deepkit/core'; import { AppModule } from '@deepkit/app'; import { createFreeDecoratorContext } from '@deepkit/type'; -import { HttpRequest, HttpResponse } from './model'; +import { HttpRequest, HttpResponse } from './model.js'; import { InjectorModule } from '@deepkit/injector'; export type HttpMiddlewareFn = (req: HttpRequest, res: HttpResponse, next: (err?: any) => void) => void | Promise; diff --git a/packages/http/src/model.ts b/packages/http/src/model.ts index 81778cdfe..45a9ddcbb 100644 --- a/packages/http/src/model.ts +++ b/packages/http/src/model.ts @@ -9,7 +9,7 @@ */ import { IncomingMessage, OutgoingHttpHeader, OutgoingHttpHeaders, ServerResponse } from 'http'; -import { UploadedFile } from './router'; +import { UploadedFile } from './router.js'; import * as querystring from 'querystring'; import { Writable } from 'stream'; import { metaAnnotation, ReflectionKind, Type, ValidationErrorItem } from '@deepkit/type'; diff --git a/packages/http/src/module.ts b/packages/http/src/module.ts index 3b438f7b2..25a4d2559 100644 --- a/packages/http/src/module.ts +++ b/packages/http/src/module.ts @@ -1,15 +1,15 @@ -import { HttpListener, HttpResultFormatter, httpWorkflow } from './http'; -import { HttpConfig } from './module.config'; +import { HttpListener, HttpResultFormatter, httpWorkflow } from './http.js'; +import { HttpConfig } from './module.config.js'; import { AppModule, createModule } from '@deepkit/app'; -import { HttpRouter, HttpRouterRegistry } from './router'; -import { HttpKernel } from './kernel'; -import { HttpRouterFilterResolver } from './filter'; -import { HttpControllers } from './controllers'; +import { HttpRouter, HttpRouterRegistry } from './router.js'; +import { HttpKernel } from './kernel.js'; +import { HttpRouterFilterResolver } from './filter.js'; +import { HttpControllers } from './controllers.js'; import { ConsoleTransport, Logger } from '@deepkit/logger'; -import { HttpRequest, HttpResponse } from './model'; +import { HttpRequest, HttpResponse } from './model.js'; import '@deepkit/type'; import { ClassType } from '@deepkit/core'; -import { httpClass } from './decorator'; +import { httpClass } from './decorator.js'; export class HttpModule extends createModule({ config: HttpConfig, diff --git a/packages/http/src/router.ts b/packages/http/src/router.ts index b0ed9d9a3..2afdd789c 100644 --- a/packages/http/src/router.ts +++ b/packages/http/src/router.ts @@ -30,13 +30,13 @@ import { } from '@deepkit/type'; // @ts-ignore import formidable from 'formidable'; -import { HttpAction, httpClass, HttpController, HttpDecorator } from './decorator'; -import { BodyValidationError, getRegExp, HttpRequest, HttpRequestQuery, HttpRequestResolvedParameters, ValidatedBody } from './model'; +import { HttpAction, httpClass, HttpController, HttpDecorator } from './decorator.js'; +import { BodyValidationError, getRegExp, HttpRequest, HttpRequestQuery, HttpRequestResolvedParameters, ValidatedBody } from './model.js'; import { InjectorContext, InjectorModule, TagRegistry } from '@deepkit/injector'; import { Logger, LoggerInterface } from '@deepkit/logger'; -import { HttpControllers } from './controllers'; +import { HttpControllers } from './controllers.js'; import { MiddlewareRegistry, MiddlewareRegistryEntry } from '@deepkit/app'; -import { HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware'; +import { HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware.js'; //@ts-ignore import qs from 'qs'; diff --git a/packages/http/src/static-serving.ts b/packages/http/src/static-serving.ts index 732efc6ad..7fa959c8b 100644 --- a/packages/http/src/static-serving.ts +++ b/packages/http/src/static-serving.ts @@ -8,17 +8,17 @@ * You should have received a copy of the MIT License along with this program. */ -import { http } from './decorator'; +import { http } from './decorator.js'; import { join } from 'path'; import { readFileSync, stat } from 'fs'; -import { HtmlResponse, httpWorkflow } from './http'; +import { HtmlResponse, httpWorkflow } from './http.js'; import { AppModule } from '@deepkit/app'; -import { normalizeDirectory } from './utils'; +import { normalizeDirectory } from './utils.js'; import { ClassType, urlJoin } from '@deepkit/core'; -import { HttpRequest, HttpResponse } from './model'; +import { HttpRequest, HttpResponse } from './model.js'; import send from 'send'; import { eventDispatcher } from '@deepkit/event'; -import { RouteConfig, HttpRouter } from './router'; +import { RouteConfig, HttpRouter } from './router.js'; export function serveStaticListener(module: AppModule, path: string, localPath: string = path): ClassType { class HttpRequestStaticServingListener { diff --git a/packages/http/tests/filter.spec.ts b/packages/http/tests/filter.spec.ts index dcf70f29b..a880f76c8 100644 --- a/packages/http/tests/filter.spec.ts +++ b/packages/http/tests/filter.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { HttpRouter } from '../src/router'; -import { HttpRouteFilter, HttpRouterFilterResolver } from '../src/filter'; -import { http } from '../src/decorator'; +import { HttpRouter } from '../src/router.js'; +import { HttpRouteFilter, HttpRouterFilterResolver } from '../src/filter.js'; +import { http } from '../src/decorator.js'; import { createModule } from '@deepkit/app'; test('filter by controller', async () => { diff --git a/packages/http/tests/middleware.spec.ts b/packages/http/tests/middleware.spec.ts index c36662583..ac9cab3c3 100644 --- a/packages/http/tests/middleware.spec.ts +++ b/packages/http/tests/middleware.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from '@jest/globals'; -import { http } from '../src/decorator'; -import { createHttpKernel } from './utils'; -import { HttpMiddleware, httpMiddleware } from '../src/middleware'; -import { HttpRequest, HttpResponse } from '../src/model'; +import { http } from '../src/decorator.js'; +import { createHttpKernel } from './utils.js'; +import { HttpMiddleware, httpMiddleware } from '../src/middleware.js'; +import { HttpRequest, HttpResponse } from '../src/model.js'; import { AppModule } from '@deepkit/app'; import { sleep } from '@deepkit/core'; diff --git a/packages/http/tests/model.spec.ts b/packages/http/tests/model.spec.ts index 121845c43..cfd847c9e 100644 --- a/packages/http/tests/model.spec.ts +++ b/packages/http/tests/model.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { HttpRequest } from '../src/model'; +import { HttpRequest } from '../src/model.js'; test('request model json', async () => { const request = HttpRequest.POST('/').json({ hello: 'world' }).build(); diff --git a/packages/http/tests/module.spec.ts b/packages/http/tests/module.spec.ts index bf8eba04f..cf3312309 100644 --- a/packages/http/tests/module.spec.ts +++ b/packages/http/tests/module.spec.ts @@ -1,9 +1,9 @@ import { App } from '@deepkit/app'; import { expect, test } from '@jest/globals'; -import { HttpModule } from '../src/module'; -import { HttpKernel } from '../src/kernel'; -import { HttpRequest } from '../src/model'; -import { http } from '../src/decorator'; +import { HttpModule } from '../src/module.js'; +import { HttpKernel } from '../src/kernel.js'; +import { HttpRequest } from '../src/model.js'; +import { http } from '../src/decorator.js'; import { httpWorkflow } from '../src/http.js'; test('module basic functionality', async () => { diff --git a/packages/http/tests/parameter-resolver.spec.ts b/packages/http/tests/parameter-resolver.spec.ts index 0224313fc..2edf209db 100644 --- a/packages/http/tests/parameter-resolver.spec.ts +++ b/packages/http/tests/parameter-resolver.spec.ts @@ -1,9 +1,9 @@ import { App, AppModule } from '@deepkit/app'; import { expect, jest, test } from '@jest/globals'; -import { http } from '../src/decorator'; -import { HttpRequest } from '../src/model'; -import { RouteConfig, RouteParameterResolver, RouteParameterResolverContext, } from '../src/router'; -import { createHttpKernel } from './utils'; +import { http } from '../src/decorator.js'; +import { HttpRequest } from '../src/model.js'; +import { RouteConfig, RouteParameterResolver, RouteParameterResolverContext, } from '../src/router.js'; +import { createHttpKernel } from './utils.js'; import { HttpModule } from '../src/module.js'; import { HttpKernel } from '../src/kernel.js'; diff --git a/packages/http/tests/router.spec.ts b/packages/http/tests/router.spec.ts index d2b41bbcc..ded42c16e 100644 --- a/packages/http/tests/router.spec.ts +++ b/packages/http/tests/router.spec.ts @@ -1,11 +1,11 @@ import { expect, test } from '@jest/globals'; -import { dotToUrlPath, HttpRouter, RouteClassControllerAction, RouteParameterResolverContext, UploadedFile } from '../src/router'; -import { http, httpClass } from '../src/decorator'; -import { HtmlResponse, HttpBadRequestError, httpWorkflow, JSONResponse, Response } from '../src/http'; +import { dotToUrlPath, HttpRouter, RouteClassControllerAction, RouteParameterResolverContext, UploadedFile } from '../src/router.js'; +import { http, httpClass } from '../src/decorator.js'; +import { HtmlResponse, HttpBadRequestError, httpWorkflow, JSONResponse, Response } from '../src/http.js'; import { eventDispatcher } from '@deepkit/event'; -import { HttpBody, HttpBodyValidation, HttpQueries, HttpQuery, HttpRegExp, HttpRequest } from '../src/model'; +import { HttpBody, HttpBodyValidation, HttpQueries, HttpQuery, HttpRegExp, HttpRequest } from '../src/model.js'; import { getClassName, isObject, sleep } from '@deepkit/core'; -import { createHttpKernel } from './utils'; +import { createHttpKernel } from './utils.js'; import { Group, MinLength, PrimaryKey, Reference } from '@deepkit/type'; import { Readable } from 'stream'; diff --git a/packages/http/tests/utils.ts b/packages/http/tests/utils.ts index 3e12e1791..295bfc7d7 100644 --- a/packages/http/tests/utils.ts +++ b/packages/http/tests/utils.ts @@ -1,9 +1,9 @@ import { ClassType, isArray, isClass, isFunction } from '@deepkit/core'; import { ProviderWithScope } from '@deepkit/injector'; -import { HttpKernel } from '../src/kernel'; +import { HttpKernel } from '../src/kernel.js'; import { App, AppModule, MiddlewareFactory } from '@deepkit/app'; import { EventListener } from '@deepkit/event'; -import { HttpModule } from '../src/module'; +import { HttpModule } from '../src/module.js'; import { HttpRouterRegistry } from '../src/router.js'; export function createHttpKernel( diff --git a/packages/http/tsconfig.json b/packages/http/tsconfig.json index a2ce83c02..5719d5000 100644 --- a/packages/http/tsconfig.json +++ b/packages/http/tsconfig.json @@ -50,4 +50,4 @@ "path": "../workflow/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/injector/package-lock.json b/packages/injector/package-lock.json index 586019588..61cb7b2b8 100644 --- a/packages/injector/package-lock.json +++ b/packages/injector/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/injector", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "devDependencies": { "benchmark": "^2.1.4" diff --git a/packages/injector/package.json b/packages/injector/package.json index de1d922f5..83d9e6ee9 100644 --- a/packages/injector/package.json +++ b/packages/injector/package.json @@ -30,14 +30,14 @@ "@deepkit/type": "^1.0.1-alpha.75", "benchmark": "^2.1.4" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, - "moduleNameMapper": { - "(.+)\\.js": "$1" - }, "testMatch": [ "**/tests/**/*.spec.ts" ] diff --git a/packages/injector/tests/injector.spec.ts b/packages/injector/tests/injector.spec.ts index ca24c8fb5..7ebf220dc 100644 --- a/packages/injector/tests/injector.spec.ts +++ b/packages/injector/tests/injector.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { CircularDependencyError, injectedFunction, Injector, InjectorContext } from '../src/injector'; -import { InjectorModule } from '../src/module'; +import { CircularDependencyError, injectedFunction, Injector, InjectorContext } from '../src/injector.js'; +import { InjectorModule } from '../src/module.js'; import { ReflectionClass, ReflectionKind } from '@deepkit/type'; -import { Inject } from '../src/types'; -import { provide } from '../src/provider'; +import { Inject } from '../src/types.js'; +import { provide } from '../src/provider.js'; export const a = 'asd'; diff --git a/packages/injector/tests/injector2.spec.ts b/packages/injector/tests/injector2.spec.ts index 507400937..fe1fd1565 100644 --- a/packages/injector/tests/injector2.spec.ts +++ b/packages/injector/tests/injector2.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { Injector, InjectorContext, injectorReference } from '../src/injector'; -import { provide, Tag } from '../src/provider'; -import { InjectorModule } from '../src/module'; +import { Injector, InjectorContext, injectorReference } from '../src/injector.js'; +import { provide, Tag } from '../src/provider.js'; +import { InjectorModule } from '../src/module.js'; import { typeOf } from '@deepkit/type'; -import { Inject } from '../src/types'; +import { Inject } from '../src/types.js'; test('basic', () => { class Service { diff --git a/packages/injector/tsconfig.json b/packages/injector/tsconfig.json index f1fa49e72..70dda2e2e 100644 --- a/packages/injector/tsconfig.json +++ b/packages/injector/tsconfig.json @@ -30,4 +30,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/logger/index.ts b/packages/logger/index.ts index 958190720..3ca2427af 100644 --- a/packages/logger/index.ts +++ b/packages/logger/index.ts @@ -1,2 +1,2 @@ -export * from './src/logger'; -export * from './src/memory-logger'; \ No newline at end of file +export * from './src/logger.js'; +export * from './src/memory-logger.js'; diff --git a/packages/logger/package-lock.json b/packages/logger/package-lock.json index 36ce8132f..b6c31a8ef 100644 --- a/packages/logger/package-lock.json +++ b/packages/logger/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/logger", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/format-util": "^1.0.1", diff --git a/packages/logger/package.json b/packages/logger/package.json index 267040487..55edf6401 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -33,7 +33,10 @@ "devDependencies": { "@deepkit/core": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/logger/src/memory-logger.ts b/packages/logger/src/memory-logger.ts index 11159d290..0e13974fc 100644 --- a/packages/logger/src/memory-logger.ts +++ b/packages/logger/src/memory-logger.ts @@ -1,4 +1,4 @@ -import { LoggerTransport, LogMessage } from './logger'; +import { LoggerTransport, LogMessage } from './logger.js'; export class MemoryLoggerTransport implements LoggerTransport { public messages: LogMessage[] = []; diff --git a/packages/logger/tests/logger.spec.ts b/packages/logger/tests/logger.spec.ts index 5908321db..58498eaeb 100644 --- a/packages/logger/tests/logger.spec.ts +++ b/packages/logger/tests/logger.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { Logger, LoggerLevel, ScopeFormatter } from '../src/logger'; -import { MemoryLoggerTransport } from '../src/memory-logger'; +import { Logger, LoggerLevel, ScopeFormatter } from '../src/logger.js'; +import { MemoryLoggerTransport } from '../src/memory-logger.js'; test('log level', () => { const logger = new Logger(); diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index e4b20f489..641e015b9 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -26,4 +26,4 @@ "path": "../core/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/mongo/index.ts b/packages/mongo/index.ts index 57e03f57f..a4cdc2205 100644 --- a/packages/mongo/index.ts +++ b/packages/mongo/index.ts @@ -8,10 +8,10 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/mapping'; -export * from './src/adapter'; -export * from './src/persistence'; -export * from './src/query.model'; -export * from './src/query.resolver'; -export * from './src/query'; -export * from './src/client/client'; +export * from './src/mapping.js'; +export * from './src/adapter.js'; +export * from './src/persistence.js'; +export * from './src/query.model.js'; +export * from './src/query.resolver.js'; +export * from './src/query.js'; +export * from './src/client/client.js'; diff --git a/packages/mongo/package-lock.json b/packages/mongo/package-lock.json index 2e0766bb9..f9fac1f0e 100644 --- a/packages/mongo/package-lock.json +++ b/packages/mongo/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/mongo", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "saslprep": "^1.0.3", @@ -55,15 +55,15 @@ }, "../bson": { "name": "@deepkit/bson", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "peer": true, "dependencies": { - "@deepkit/crypto": "^1.0.1-alpha.65" + "@deepkit/crypto": "^1.0.1-alpha.72" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/bson": "^4.0.3", "@types/node": "14.14.28", "bson": "^4.4.0", @@ -738,7 +738,7 @@ }, "../core": { "name": "@deepkit/core", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, @@ -788,20 +788,20 @@ }, "../crypto": { "name": "@deepkit/crypto", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "license": "MIT", "peer": true }, "../event": { "name": "@deepkit/event", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/type": "^1.0.1-alpha.71" + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72" }, "peerDependencies": { "@deepkit/core": "^1.0.1-alpha.13", @@ -823,13 +823,13 @@ }, "../injector": { "name": "@deepkit/injector", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "benchmark": "^2.1.4" }, "peerDependencies": { @@ -869,7 +869,7 @@ }, "../logger": { "name": "@deepkit/logger", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, @@ -879,7 +879,7 @@ "format-util": "^1.0.5" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65" + "@deepkit/core": "^1.0.1-alpha.72" }, "peerDependencies": { "@deepkit/core": "^1.0.1-alpha.13" @@ -936,20 +936,20 @@ }, "../orm": { "name": "@deepkit/orm", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "peer": true, "dependencies": { - "@deepkit/topsort": "^1.0.1-alpha.65", + "@deepkit/topsort": "^1.0.1-alpha.72", "sift": "^7.0.1" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/event": "^1.0.1-alpha.71", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/logger": "^1.0.1-alpha.65", - "@deepkit/stopwatch": "^1.0.1-alpha.71", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/event": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/logger": "^1.0.1-alpha.72", + "@deepkit/stopwatch": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/sqlstring": "^2.2.1", "conditional-type-checks": "^1.0.5" }, @@ -1061,13 +1061,13 @@ }, "../stopwatch": { "name": "@deepkit/stopwatch", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71" + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72" }, "peerDependencies": { "@deepkit/core": "^1.0.1-alpha.13", @@ -1084,25 +1084,25 @@ }, "../topsort": { "name": "@deepkit/topsort", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "license": "MIT", "peer": true }, "../type": { "name": "@deepkit/type", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/uuid": "^8.3.0", "buffer": "^5.2.1", "uuid": "^8.3.2" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@typescript/vfs": "^1.3.5", @@ -1531,9 +1531,9 @@ "@deepkit/bson": { "version": "file:../bson", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/crypto": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/crypto": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/bson": "^4.0.3", "@types/node": "14.14.28", "bson": "^4.4.0", @@ -1573,9 +1573,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2177,13 +2177,13 @@ "@deepkit/orm": { "version": "file:../orm", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/event": "^1.0.1-alpha.71", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/logger": "^1.0.1-alpha.65", - "@deepkit/stopwatch": "^1.0.1-alpha.71", - "@deepkit/topsort": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/event": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/logger": "^1.0.1-alpha.72", + "@deepkit/stopwatch": "^1.0.1-alpha.72", + "@deepkit/topsort": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/sqlstring": "^2.2.1", "conditional-type-checks": "^1.0.5", "sift": "^7.0.1" @@ -2222,9 +2222,9 @@ "@deepkit/event": { "version": "file:../event", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/type": "^1.0.1-alpha.71" + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72" }, "dependencies": { "@deepkit/core": { @@ -2260,8 +2260,8 @@ "@deepkit/injector": { "version": "file:../injector", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "benchmark": "^2.1.4" }, "dependencies": { @@ -2298,9 +2298,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2426,9 +2426,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2535,8 +2535,8 @@ "@deepkit/injector": { "version": "file:../injector", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "benchmark": "^2.1.4" }, "dependencies": { @@ -2573,9 +2573,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2701,7 +2701,7 @@ "@deepkit/logger": { "version": "file:../logger", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", + "@deepkit/core": "^1.0.1-alpha.72", "@types/format-util": "^1.0.1", "ansi-styles": "^4.3.0", "format-util": "^1.0.5" @@ -2773,8 +2773,8 @@ "@deepkit/stopwatch": { "version": "file:../stopwatch", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71" + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72" }, "dependencies": { "@deepkit/core": { @@ -2810,9 +2810,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2922,9 +2922,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -3045,9 +3045,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", diff --git a/packages/mongo/package.json b/packages/mongo/package.json index a5ab58ee1..a7133a304 100644 --- a/packages/mongo/package.json +++ b/packages/mongo/package.json @@ -44,7 +44,10 @@ "@types/node": "14.14.28", "mongodb": "3.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/mongo/src/adapter.ts b/packages/mongo/src/adapter.ts index 452f0fd60..1d539d92a 100644 --- a/packages/mongo/src/adapter.ts +++ b/packages/mongo/src/adapter.ts @@ -10,15 +10,15 @@ import { DatabaseAdapter, DatabaseAdapterQueryFactory, DatabaseEntityRegistry, DatabaseSession, OrmEntity } from '@deepkit/orm'; import { AbstractClassType, ClassType } from '@deepkit/core'; -import { MongoDatabaseQuery } from './query'; -import { MongoPersistence } from './persistence'; -import { MongoClient } from './client/client'; -import { DeleteCommand } from './client/command/delete'; -import { MongoQueryResolver } from './query.resolver'; -import { MongoDatabaseTransaction } from './client/connection'; -import { CreateIndex, CreateIndexesCommand } from './client/command/createIndexes'; -import { DropIndexesCommand } from './client/command/dropIndexes'; -import { CreateCollectionCommand } from './client/command/createCollection'; +import { MongoDatabaseQuery } from './query.js'; +import { MongoPersistence } from './persistence.js'; +import { MongoClient } from './client/client.js'; +import { DeleteCommand } from './client/command/delete.js'; +import { MongoQueryResolver } from './query.resolver.js'; +import { MongoDatabaseTransaction } from './client/connection.js'; +import { CreateIndex, CreateIndexesCommand } from './client/command/createIndexes.js'; +import { DropIndexesCommand } from './client/command/dropIndexes.js'; +import { CreateCollectionCommand } from './client/command/createCollection.js'; import { entity, ReceiveType, ReflectionClass } from '@deepkit/type'; export class MongoDatabaseQueryFactory extends DatabaseAdapterQueryFactory { diff --git a/packages/mongo/src/client/client.ts b/packages/mongo/src/client/client.ts index 96961bf90..49088e5da 100644 --- a/packages/mongo/src/client/client.ts +++ b/packages/mongo/src/client/client.ts @@ -8,14 +8,14 @@ * You should have received a copy of the MIT License along with this program. */ -import { ConnectionRequest, MongoConnection, MongoConnectionPool, MongoDatabaseTransaction } from './connection'; -import { isErrorRetryableRead, isErrorRetryableWrite, MongoError } from './error'; +import { ConnectionRequest, MongoConnection, MongoConnectionPool, MongoDatabaseTransaction } from './connection.js'; +import { isErrorRetryableRead, isErrorRetryableWrite, MongoError } from './error.js'; import { sleep } from '@deepkit/core'; -import { Command } from './command/command'; -import { DropDatabaseCommand } from './command/dropDatabase'; -import { MongoClientConfig } from './config'; +import { Command } from './command/command.js'; +import { DropDatabaseCommand } from './command/dropDatabase.js'; +import { MongoClientConfig } from './config.js'; import { ReflectionClass } from '@deepkit/type'; -import { mongoBinarySerializer } from '../mongo-serializer'; +import { mongoBinarySerializer } from '../mongo-serializer.js'; import { BSONBinarySerializer } from '@deepkit/bson'; export class MongoClient { diff --git a/packages/mongo/src/client/command/abortTransaction.ts b/packages/mongo/src/client/command/abortTransaction.ts index 0632f1eb7..cefc9ea81 100644 --- a/packages/mongo/src/client/command/abortTransaction.ts +++ b/packages/mongo/src/client/command/abortTransaction.ts @@ -9,9 +9,9 @@ */ import { UUID } from '@deepkit/type'; -import { BaseResponse, Command } from './command'; -import { MongoClientConfig } from '../config'; -import { Host } from '../host'; +import { BaseResponse, Command } from './command.js'; +import { MongoClientConfig } from '../config.js'; +import { Host } from '../host.js'; interface Request { abortTransaction: number, diff --git a/packages/mongo/src/client/command/aggregate.ts b/packages/mongo/src/client/command/aggregate.ts index 293df84b1..56b9833fa 100644 --- a/packages/mongo/src/client/command/aggregate.ts +++ b/packages/mongo/src/client/command/aggregate.ts @@ -9,9 +9,9 @@ */ import { toFastProperties } from '@deepkit/core'; -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { InlineRuntimeType, ReflectionClass, Type, typeOf, UUID } from '@deepkit/type'; -import { MongoError } from '../error'; +import { MongoError } from '../error.js'; interface AggregateMessage { aggregate: string; diff --git a/packages/mongo/src/client/command/auth/auth.ts b/packages/mongo/src/client/command/auth/auth.ts index 44f42fe57..9fce46e48 100644 --- a/packages/mongo/src/client/command/auth/auth.ts +++ b/packages/mongo/src/client/command/auth/auth.ts @@ -8,8 +8,8 @@ * You should have received a copy of the MIT License along with this program. */ -import { MongoClientConfig } from '../../config'; -import { Command } from '../command'; +import { MongoClientConfig } from '../../config.js'; +import { Command } from '../command.js'; export interface MongoAuth { auth(command: Command, config: MongoClientConfig): Promise; diff --git a/packages/mongo/src/client/command/auth/scram.ts b/packages/mongo/src/client/command/auth/scram.ts index 49f75ca5e..fccf76ab2 100644 --- a/packages/mongo/src/client/command/auth/scram.ts +++ b/packages/mongo/src/client/command/auth/scram.ts @@ -9,10 +9,10 @@ */ import { createHash, createHmac, pbkdf2Sync, randomBytes, timingSafeEqual } from 'crypto'; -import { MongoAuth } from './auth'; -import { MongoClientConfig } from '../../config'; -import { BaseResponse, Command } from '../command'; -import { MongoError } from '../../error'; +import { MongoAuth } from './auth.js'; +import { MongoClientConfig } from '../../config.js'; +import { BaseResponse, Command } from '../command.js'; +import { MongoError } from '../../error.js'; // @ts-ignore import saslprep from 'saslprep'; diff --git a/packages/mongo/src/client/command/auth/x509.ts b/packages/mongo/src/client/command/auth/x509.ts index 41b9870d6..2f18956b4 100644 --- a/packages/mongo/src/client/command/auth/x509.ts +++ b/packages/mongo/src/client/command/auth/x509.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { MongoAuth } from './auth'; -import { BaseResponse, Command } from '../command'; -import { MongoClientConfig } from '../../config'; +import { MongoAuth } from './auth.js'; +import { BaseResponse, Command } from '../command.js'; +import { MongoClientConfig } from '../../config.js'; interface AuthenticateCommand { authenticate: 1; diff --git a/packages/mongo/src/client/command/command.ts b/packages/mongo/src/client/command/command.ts index e33086811..320afb260 100644 --- a/packages/mongo/src/client/command/command.ts +++ b/packages/mongo/src/client/command/command.ts @@ -9,13 +9,13 @@ */ import { asyncOperation, getClassName } from '@deepkit/core'; -import { handleErrorResponse, MongoError } from '../error'; -import { MongoClientConfig } from '../config'; -import { Host } from '../host'; -import type { MongoDatabaseTransaction } from '../connection'; +import { handleErrorResponse, MongoError } from '../error.js'; +import { MongoClientConfig } from '../config.js'; +import { Host } from '../host.js'; +import type { MongoDatabaseTransaction } from '../connection.js'; import { ReceiveType, ReflectionClass, resolveReceiveType, SerializationError, stringifyType, Type, typeOf, ValidationError } from '@deepkit/type'; import { BSONDeserializer, deserializeBSONWithoutOptimiser, getBSONDeserializer } from '@deepkit/bson'; -import { mongoBinarySerializer } from '../../mongo-serializer'; +import { mongoBinarySerializer } from '../../mongo-serializer.js'; import { inspect } from 'util'; export interface CommandMessageResponseCallbackResult { diff --git a/packages/mongo/src/client/command/commitTransaction.ts b/packages/mongo/src/client/command/commitTransaction.ts index 916e6903f..0f9803b48 100644 --- a/packages/mongo/src/client/command/commitTransaction.ts +++ b/packages/mongo/src/client/command/commitTransaction.ts @@ -9,9 +9,9 @@ */ import { UUID } from '@deepkit/type'; -import { BaseResponse, Command } from './command'; -import { MongoClientConfig } from '../config'; -import { Host } from '../host'; +import { BaseResponse, Command } from './command.js'; +import { MongoClientConfig } from '../config.js'; +import { Host } from '../host.js'; interface Request { commitTransaction: number; diff --git a/packages/mongo/src/client/command/count.ts b/packages/mongo/src/client/command/count.ts index 54d7f8c2f..177036581 100644 --- a/packages/mongo/src/client/command/count.ts +++ b/packages/mongo/src/client/command/count.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass, UUID } from '@deepkit/type'; interface CountResponse extends BaseResponse { diff --git a/packages/mongo/src/client/command/createCollection.ts b/packages/mongo/src/client/command/createCollection.ts index 353f22732..5060fc026 100644 --- a/packages/mongo/src/client/command/createCollection.ts +++ b/packages/mongo/src/client/command/createCollection.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass } from '@deepkit/type'; interface RequestSchema { diff --git a/packages/mongo/src/client/command/createIndexes.ts b/packages/mongo/src/client/command/createIndexes.ts index 705b5cc09..9541d0c13 100644 --- a/packages/mongo/src/client/command/createIndexes.ts +++ b/packages/mongo/src/client/command/createIndexes.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass } from '@deepkit/type'; -import { MongoError } from '../error'; +import { MongoError } from '../error.js'; export interface CreateIndex { key: { [name: string]: 1 }, diff --git a/packages/mongo/src/client/command/delete.ts b/packages/mongo/src/client/command/delete.ts index 435277229..d3b9cdb36 100644 --- a/packages/mongo/src/client/command/delete.ts +++ b/packages/mongo/src/client/command/delete.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass, UUID } from '@deepkit/type'; interface DeleteResponse extends BaseResponse { diff --git a/packages/mongo/src/client/command/dropDatabase.ts b/packages/mongo/src/client/command/dropDatabase.ts index e8402f1eb..901a9406b 100644 --- a/packages/mongo/src/client/command/dropDatabase.ts +++ b/packages/mongo/src/client/command/dropDatabase.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { Command } from './command'; +import { Command } from './command.js'; import { ReflectionClass } from '@deepkit/type'; interface DropDatabase { diff --git a/packages/mongo/src/client/command/dropIndexes.ts b/packages/mongo/src/client/command/dropIndexes.ts index 9b4285cef..a25420a60 100644 --- a/packages/mongo/src/client/command/dropIndexes.ts +++ b/packages/mongo/src/client/command/dropIndexes.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass } from '@deepkit/type'; interface RequestSchema { diff --git a/packages/mongo/src/client/command/empty.ts b/packages/mongo/src/client/command/empty.ts index 19690fd2f..ae3973aaa 100644 --- a/packages/mongo/src/client/command/empty.ts +++ b/packages/mongo/src/client/command/empty.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { Command } from './command'; +import { Command } from './command.js'; export class EmptyCommand extends Command { diff --git a/packages/mongo/src/client/command/find.ts b/packages/mongo/src/client/command/find.ts index a8cfc675e..680e50e0b 100644 --- a/packages/mongo/src/client/command/find.ts +++ b/packages/mongo/src/client/command/find.ts @@ -8,11 +8,11 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { toFastProperties } from '@deepkit/core'; -import { DEEP_SORT } from '../../query.model'; +import { DEEP_SORT } from '../../query.model.js'; import { InlineRuntimeType, ReflectionClass, ReflectionKind, typeOf, TypeUnion, UUID } from '@deepkit/type'; -import { MongoError } from '../error'; +import { MongoError } from '../error.js'; interface FindSchema { find: string; diff --git a/packages/mongo/src/client/command/findAndModify.ts b/packages/mongo/src/client/command/findAndModify.ts index cd9184974..97aa6946a 100644 --- a/packages/mongo/src/client/command/findAndModify.ts +++ b/packages/mongo/src/client/command/findAndModify.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass, UUID } from '@deepkit/type'; interface FindAndModifyResponse extends BaseResponse { diff --git a/packages/mongo/src/client/command/handshake.ts b/packages/mongo/src/client/command/handshake.ts index 82583a80c..5e8916678 100644 --- a/packages/mongo/src/client/command/handshake.ts +++ b/packages/mongo/src/client/command/handshake.ts @@ -8,15 +8,15 @@ * You should have received a copy of the MIT License along with this program. */ -import { Command } from './command'; -import { IsMasterResponse } from './ismaster'; -import { MongoClientConfig } from '../config'; -import { Host, HostType } from '../host'; -import { Sha1ScramAuth, Sha256ScramAuth } from './auth/scram'; +import { Command } from './command.js'; +import { IsMasterResponse } from './ismaster.js'; +import { MongoClientConfig } from '../config.js'; +import { Host, HostType } from '../host.js'; +import { Sha1ScramAuth, Sha256ScramAuth } from './auth/scram.js'; import { ClassType } from '@deepkit/core'; -import { MongoError } from '../error'; -import { MongoAuth } from './auth/auth'; -import { X509Auth } from './auth/x509'; +import { MongoError } from '../error.js'; +import { MongoAuth } from './auth/auth.js'; +import { X509Auth } from './auth/x509.js'; interface IsMasterSchema { isMaster: number; diff --git a/packages/mongo/src/client/command/insert.ts b/packages/mongo/src/client/command/insert.ts index 12062c86b..73070ba5b 100644 --- a/packages/mongo/src/client/command/insert.ts +++ b/packages/mongo/src/client/command/insert.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { toFastProperties } from '@deepkit/core'; import { InlineRuntimeType, ReflectionClass, typeOf, UUID } from '@deepkit/type'; diff --git a/packages/mongo/src/client/command/ismaster.ts b/packages/mongo/src/client/command/ismaster.ts index 6c8bb1a32..d18b7270e 100644 --- a/packages/mongo/src/client/command/ismaster.ts +++ b/packages/mongo/src/client/command/ismaster.ts @@ -10,9 +10,9 @@ //see https://docs.mongodb.com/manual/reference/command/isMaster/ //we add only fields we really need to increase parsing time. -import { BaseResponse, Command } from './command'; -import { MongoClientConfig } from '../config'; -import { Host } from '../host'; +import { BaseResponse, Command } from './command.js'; +import { MongoClientConfig } from '../config.js'; +import { Host } from '../host.js'; export interface IsMasterResponse extends BaseResponse { ismaster: boolean; diff --git a/packages/mongo/src/client/command/startSession.ts b/packages/mongo/src/client/command/startSession.ts index bf98a1c0a..3226b2ebb 100644 --- a/packages/mongo/src/client/command/startSession.ts +++ b/packages/mongo/src/client/command/startSession.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; -import { MongoClientConfig } from '../config'; -import { Host } from '../host'; +import { BaseResponse, Command } from './command.js'; +import { MongoClientConfig } from '../config.js'; +import { Host } from '../host.js'; import { UUID } from '@deepkit/type'; interface SessionResponse extends BaseResponse { diff --git a/packages/mongo/src/client/command/update.ts b/packages/mongo/src/client/command/update.ts index 659c8997c..d3174cad1 100644 --- a/packages/mongo/src/client/command/update.ts +++ b/packages/mongo/src/client/command/update.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseResponse, Command } from './command'; +import { BaseResponse, Command } from './command.js'; import { ReflectionClass, UUID } from '@deepkit/type'; interface UpdateResponse extends BaseResponse { diff --git a/packages/mongo/src/client/config.ts b/packages/mongo/src/client/config.ts index c1b307879..992256381 100644 --- a/packages/mongo/src/client/config.ts +++ b/packages/mongo/src/client/config.ts @@ -8,13 +8,13 @@ * You should have received a copy of the MIT License along with this program. */ -import { Host } from './host'; -import { ConnectionOptions } from './options'; +import { Host } from './host.js'; +import { ConnectionOptions } from './options.js'; import { parse as parseUrl } from 'url'; import { parse as parseQueryString } from 'querystring'; -import { MongoError } from './error'; +import { MongoError } from './error.js'; import { arrayRemoveItem, eachPair, singleStack } from '@deepkit/core'; -import { resolveSrvHosts } from './dns'; +import { resolveSrvHosts } from './dns.js'; import { ReflectionClass, validatedDeserialize } from '@deepkit/type'; /** diff --git a/packages/mongo/src/client/connection.ts b/packages/mongo/src/client/connection.ts index 380859df2..9ac939705 100644 --- a/packages/mongo/src/client/connection.ts +++ b/packages/mongo/src/client/connection.ts @@ -9,21 +9,21 @@ */ import { arrayRemoveItem, asyncOperation } from '@deepkit/core'; -import { Host } from './host'; +import { Host } from './host.js'; import { createConnection, Socket } from 'net'; import { connect as createTLSConnection, TLSSocket } from 'tls'; -import { Command } from './command/command'; +import { Command } from './command/command.js'; import { stringifyType, Type, uuid } from '@deepkit/type'; import { BSONBinarySerializer, getBSONSerializer, getBSONSizer, Writer } from '@deepkit/bson'; -import { HandshakeCommand } from './command/handshake'; -import { MongoClientConfig } from './config'; -import { MongoError } from './error'; +import { HandshakeCommand } from './command/handshake.js'; +import { MongoClientConfig } from './config.js'; +import { MongoError } from './error.js'; // @ts-ignore import * as turbo from 'turbo-net'; import { DatabaseTransaction } from '@deepkit/orm'; -import { CommitTransactionCommand } from './command/commitTransaction'; -import { AbortTransactionCommand } from './command/abortTransaction'; +import { CommitTransactionCommand } from './command/commitTransaction.js'; +import { AbortTransactionCommand } from './command/abortTransaction.js'; export enum MongoConnectionStatus { pending = 'pending', diff --git a/packages/mongo/src/client/error.ts b/packages/mongo/src/client/error.ts index 300a7a437..bbc1b17c5 100644 --- a/packages/mongo/src/client/error.ts +++ b/packages/mongo/src/client/error.ts @@ -9,7 +9,7 @@ */ import { CustomError } from '@deepkit/core'; -import { BaseResponse } from './command/command'; +import { BaseResponse } from './command/command.js'; import { DatabaseError, UniqueConstraintFailure } from '@deepkit/orm'; diff --git a/packages/mongo/src/mapping.ts b/packages/mongo/src/mapping.ts index aca86556d..cda6c55c7 100644 --- a/packages/mongo/src/mapping.ts +++ b/packages/mongo/src/mapping.ts @@ -10,10 +10,10 @@ import { deserialize, ReflectionClass, resolvePath, serialize, serializer } from '@deepkit/type'; import { ClassType } from '@deepkit/core'; -import './mongo-serializer'; -import { mongoSerializer } from './mongo-serializer'; +import './mongo-serializer.js'; +import { mongoSerializer } from './mongo-serializer.js'; import { convertQueryFilter, QueryCustomFields, QueryFieldNames } from '@deepkit/orm'; -import { FilterQuery } from './query.model'; +import { FilterQuery } from './query.model.js'; export function convertClassQueryToMongo>( classType: ReflectionClass | ClassType, diff --git a/packages/mongo/src/persistence.ts b/packages/mongo/src/persistence.ts index 305203819..b4236704f 100644 --- a/packages/mongo/src/persistence.ts +++ b/packages/mongo/src/persistence.ts @@ -9,19 +9,19 @@ */ import { DatabasePersistence, DatabasePersistenceChangeSet, DatabaseSession, getClassState, getInstanceState, OrmEntity } from '@deepkit/orm'; -import { convertClassQueryToMongo } from './mapping'; -import { FilterQuery } from './query.model'; -import { MongoClient } from './client/client'; -import { InsertCommand } from './client/command/insert'; -import { UpdateCommand } from './client/command/update'; -import { DeleteCommand } from './client/command/delete'; -import { FindAndModifyCommand } from './client/command/findAndModify'; +import { convertClassQueryToMongo } from './mapping.js'; +import { FilterQuery } from './query.model.js'; +import { MongoClient } from './client/client.js'; +import { InsertCommand } from './client/command/insert.js'; +import { UpdateCommand } from './client/command/update.js'; +import { DeleteCommand } from './client/command/delete.js'; +import { FindAndModifyCommand } from './client/command/findAndModify.js'; import { empty } from '@deepkit/core'; -import { FindCommand } from './client/command/find'; -import { MongoConnection } from './client/connection'; +import { FindCommand } from './client/command/find.js'; +import { MongoConnection } from './client/connection.js'; import { getPartialSerializeFunction, ReflectionClass } from '@deepkit/type'; import { ObjectId } from '@deepkit/bson'; -import { mongoSerializer } from './mongo-serializer'; +import { mongoSerializer } from './mongo-serializer.js'; export class MongoPersistence extends DatabasePersistence { protected connection?: MongoConnection; diff --git a/packages/mongo/src/query.resolver.ts b/packages/mongo/src/query.resolver.ts index 1784c6034..4052ce60d 100644 --- a/packages/mongo/src/query.resolver.ts +++ b/packages/mongo/src/query.resolver.ts @@ -10,19 +10,19 @@ import { DatabaseAdapter, DatabaseSession, DeleteResult, Formatter, GenericQueryResolver, OrmEntity, PatchResult } from '@deepkit/orm'; import { Changes, getPartialSerializeFunction, ReflectionClass, ReflectionKind, ReflectionVisibility, resolveForeignReflectionClass, serializer, typeOf } from '@deepkit/type'; -import { MongoClient } from './client/client'; -import { AggregateCommand } from './client/command/aggregate'; -import { CountCommand } from './client/command/count'; -import { DeleteCommand } from './client/command/delete'; -import { FindCommand } from './client/command/find'; -import { FindAndModifyCommand } from './client/command/findAndModify'; -import { UpdateCommand } from './client/command/update'; -import { convertClassQueryToMongo } from './mapping'; -import { DEEP_SORT, FilterQuery, MongoQueryModel } from './query.model'; -import { MongoConnection } from './client/connection'; -import { MongoDatabaseAdapter } from './adapter'; +import { MongoClient } from './client/client.js'; +import { AggregateCommand } from './client/command/aggregate.js'; +import { CountCommand } from './client/command/count.js'; +import { DeleteCommand } from './client/command/delete.js'; +import { FindCommand } from './client/command/find.js'; +import { FindAndModifyCommand } from './client/command/findAndModify.js'; +import { UpdateCommand } from './client/command/update.js'; +import { convertClassQueryToMongo } from './mapping.js'; +import { DEEP_SORT, FilterQuery, MongoQueryModel } from './query.model.js'; +import { MongoConnection } from './client/connection.js'; +import { MongoDatabaseAdapter } from './adapter.js'; import { empty } from '@deepkit/core'; -import { mongoSerializer } from './mongo-serializer'; +import { mongoSerializer } from './mongo-serializer.js'; export function getMongoFilter(classSchema: ReflectionClass, model: MongoQueryModel): any { return convertClassQueryToMongo(classSchema, (model.filter || {}) as FilterQuery, {}, { diff --git a/packages/mongo/src/query.ts b/packages/mongo/src/query.ts index 5b1b1df12..77b5b1a48 100644 --- a/packages/mongo/src/query.ts +++ b/packages/mongo/src/query.ts @@ -9,7 +9,7 @@ */ import { OrmEntity, Query } from '@deepkit/orm'; -import { MongoQueryModel } from './query.model'; +import { MongoQueryModel } from './query.model.js'; export class MongoDatabaseQuery = MongoQueryModel> extends Query { diff --git a/packages/mongo/tests/client/client.spec.ts b/packages/mongo/tests/client/client.spec.ts index ca18a988b..4486e31d7 100644 --- a/packages/mongo/tests/client/client.spec.ts +++ b/packages/mongo/tests/client/client.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { MongoClient } from '../../src/client/client'; -import { HostType } from '../../src/client/host'; -import { IsMasterCommand } from '../../src/client/command/ismaster'; +import { MongoClient } from '../../src/client/client.js'; +import { HostType } from '../../src/client/host.js'; +import { IsMasterCommand } from '../../src/client/command/ismaster.js'; import { sleep } from '@deepkit/core'; -import { ConnectionOptions } from '../../src/client/options'; +import { ConnectionOptions } from '../../src/client/options.js'; import { cast, validatedDeserialize } from '@deepkit/type'; test('ConnectionOptions', async () => { diff --git a/packages/mongo/tests/client/connection-string.spec.ts b/packages/mongo/tests/client/connection-string.spec.ts index bcfe16d17..10c75c9e7 100644 --- a/packages/mongo/tests/client/connection-string.spec.ts +++ b/packages/mongo/tests/client/connection-string.spec.ts @@ -1,5 +1,5 @@ import {expect, test} from '@jest/globals'; -import {MongoClientConfig} from '../../src/client/config'; +import {MongoClientConfig} from '../../src/client/config.js'; test('connection string basic', async () => { { diff --git a/packages/mongo/tests/client/mong-env.spec.ts b/packages/mongo/tests/client/mong-env.spec.ts index 0cfefcbb9..a69d96a7e 100644 --- a/packages/mongo/tests/client/mong-env.spec.ts +++ b/packages/mongo/tests/client/mong-env.spec.ts @@ -1,5 +1,5 @@ import {expect, test} from '@jest/globals'; -import {MongoEnv} from './env-setup'; +import {MongoEnv} from './env-setup.js'; // jest.setTimeout(213123); diff --git a/packages/mongo/tests/database.spec.ts b/packages/mongo/tests/database.spec.ts index 1fc1acf6e..7392d3a0a 100644 --- a/packages/mongo/tests/database.spec.ts +++ b/packages/mongo/tests/database.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { Database } from '@deepkit/orm'; -import { MongoDatabaseAdapter } from '../src/adapter'; +import { MongoDatabaseAdapter } from '../src/adapter.js'; import { entity, MongoId, PrimaryKey } from '@deepkit/type'; test('simple', async () => { diff --git a/packages/mongo/tests/document-scenario/DocumentClass.ts b/packages/mongo/tests/document-scenario/DocumentClass.ts index 2ffcba263..2b6423249 100644 --- a/packages/mongo/tests/document-scenario/DocumentClass.ts +++ b/packages/mongo/tests/document-scenario/DocumentClass.ts @@ -1,5 +1,5 @@ -import {PageCollection} from './PageCollection'; -import {PageClass} from './PageClass'; +import {PageCollection} from './PageCollection.js'; +import {PageClass} from './PageClass.js'; import {t, ParentReference} from '@deepkit/type'; import {Forward} from '@deepkit/core'; diff --git a/packages/mongo/tests/document-scenario/PageClass.ts b/packages/mongo/tests/document-scenario/PageClass.ts index d8485e65b..4b3a55468 100644 --- a/packages/mongo/tests/document-scenario/PageClass.ts +++ b/packages/mongo/tests/document-scenario/PageClass.ts @@ -1,5 +1,5 @@ -import {PageCollection} from "./PageCollection"; -import {DocumentClass} from "./DocumentClass"; +import {PageCollection} from "./PageCollection.js"; +import {DocumentClass} from "./DocumentClass.js"; import {Entity, t, ParentReference, uuid} from '@deepkit/type'; @Entity('PageClass') diff --git a/packages/mongo/tests/document-scenario/PageCollection.ts b/packages/mongo/tests/document-scenario/PageCollection.ts index db8354535..b68b0561f 100644 --- a/packages/mongo/tests/document-scenario/PageCollection.ts +++ b/packages/mongo/tests/document-scenario/PageCollection.ts @@ -1,4 +1,4 @@ -import {PageClass} from "./PageClass"; +import {PageClass} from "./PageClass.js"; import {t} from "@deepkit/type"; export class PageCollection { diff --git a/packages/mongo/tests/factory.ts b/packages/mongo/tests/factory.ts index de5b2314a..d94448e46 100644 --- a/packages/mongo/tests/factory.ts +++ b/packages/mongo/tests/factory.ts @@ -1,6 +1,6 @@ import { Database } from '@deepkit/orm'; import { DatabaseFactory } from '@deepkit/orm-integration'; -import { MongoDatabaseAdapter } from '../src/adapter'; +import { MongoDatabaseAdapter } from '../src/adapter.js'; export const databaseFactory: DatabaseFactory = async (entities): Promise => { const adapter = new MongoDatabaseAdapter('mongodb://localhost/orm-integration'); diff --git a/packages/mongo/tests/integration.spec.ts b/packages/mongo/tests/integration.spec.ts index 516c6f273..8cceceaf2 100644 --- a/packages/mongo/tests/integration.spec.ts +++ b/packages/mongo/tests/integration.spec.ts @@ -1,6 +1,6 @@ import { test } from '@jest/globals'; import { runIntegrationTests } from '@deepkit/orm-integration'; -import { databaseFactory } from './factory'; +import { databaseFactory } from './factory.js'; runIntegrationTests(databaseFactory); diff --git a/packages/mongo/tests/mongo-query.spec.ts b/packages/mongo/tests/mongo-query.spec.ts index f939307a9..ffb59af8e 100644 --- a/packages/mongo/tests/mongo-query.spec.ts +++ b/packages/mongo/tests/mongo-query.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { convertClassQueryToMongo, convertPlainQueryToMongo } from '../index'; +import { convertClassQueryToMongo, convertPlainQueryToMongo } from '../index.js'; import { Embedded, PrimaryKey, Reference } from '@deepkit/type'; class SimpleConfig { diff --git a/packages/mongo/tests/mongo-testcase-a.spec.ts b/packages/mongo/tests/mongo-testcase-a.spec.ts index ce007217d..98b514a55 100644 --- a/packages/mongo/tests/mongo-testcase-a.spec.ts +++ b/packages/mongo/tests/mongo-testcase-a.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { BackReference, entity, Index, PrimaryKey, Reference, ReflectionClass, resolveForeignReflectionClass, UUID, uuid } from '@deepkit/type'; import { getInstanceStateFromItem, hydrateEntity } from '@deepkit/orm'; -import { createDatabase } from './utils'; +import { createDatabase } from './utils.js'; Error.stackTraceLimit = 20; diff --git a/packages/mongo/tests/mongo-testcase-b.spec.ts b/packages/mongo/tests/mongo-testcase-b.spec.ts index 5cbbc8afc..8ff89233c 100644 --- a/packages/mongo/tests/mongo-testcase-b.spec.ts +++ b/packages/mongo/tests/mongo-testcase-b.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { User } from './testcase-b/user'; -import { createDatabase } from './utils'; +import { User } from './testcase-b/user.js'; +import { createDatabase } from './utils.js'; async function setupTestCase(name: string) { const db = await createDatabase(name); diff --git a/packages/mongo/tests/mongo.spec.ts b/packages/mongo/tests/mongo.spec.ts index 67619cd98..0ce058989 100644 --- a/packages/mongo/tests/mongo.spec.ts +++ b/packages/mongo/tests/mongo.spec.ts @@ -15,8 +15,8 @@ import { uuid, } from '@deepkit/type'; import { getInstanceStateFromItem } from '@deepkit/orm'; -import { SimpleModel, SuperSimple } from './entities'; -import { createDatabase } from './utils'; +import { SimpleModel, SuperSimple } from './entities.js'; +import { createDatabase } from './utils.js'; Error.stackTraceLimit = 100; diff --git a/packages/mongo/tests/references.spec.ts b/packages/mongo/tests/references.spec.ts index 1e4d84ed5..7b185e3b6 100644 --- a/packages/mongo/tests/references.spec.ts +++ b/packages/mongo/tests/references.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { BackReference, entity, PrimaryKey, Reference, ReflectionClass } from '@deepkit/type'; -import { createDatabase } from './utils'; +import { createDatabase } from './utils.js'; import { getInstanceStateFromItem } from '@deepkit/orm'; @entity.name('image') diff --git a/packages/mongo/tests/testcase-b/credentials.ts b/packages/mongo/tests/testcase-b/credentials.ts index ffb4d7856..17a4df82e 100644 --- a/packages/mongo/tests/testcase-b/credentials.ts +++ b/packages/mongo/tests/testcase-b/credentials.ts @@ -1,5 +1,5 @@ import { entity, PrimaryKey, Reference, t, UUID, uuid } from '@deepkit/type'; -import { User } from './user'; +import { User } from './user.js'; @entity.name('b-user-credentials') export class UserCredentials { diff --git a/packages/mongo/tests/testcase-b/user.ts b/packages/mongo/tests/testcase-b/user.ts index 3e57eabd5..910f6a666 100644 --- a/packages/mongo/tests/testcase-b/user.ts +++ b/packages/mongo/tests/testcase-b/user.ts @@ -1,5 +1,5 @@ import { BackReference, entity, PrimaryKey, UUID, uuid } from '@deepkit/type'; -import { UserCredentials } from './credentials'; +import { UserCredentials } from './credentials.js'; @entity.name('b-user') export class User { diff --git a/packages/mongo/tests/utils.ts b/packages/mongo/tests/utils.ts index abb9416c2..54746bc26 100644 --- a/packages/mongo/tests/utils.ts +++ b/packages/mongo/tests/utils.ts @@ -1,6 +1,6 @@ import { afterEach } from '@jest/globals'; import { Database } from '@deepkit/orm'; -import { MongoDatabaseAdapter } from '../src/adapter'; +import { MongoDatabaseAdapter } from '../src/adapter.js'; import { performance } from 'perf_hooks'; /** diff --git a/packages/mongo/tsconfig.json b/packages/mongo/tsconfig.json index cd85563f6..d4bb0c87f 100644 --- a/packages/mongo/tsconfig.json +++ b/packages/mongo/tsconfig.json @@ -41,4 +41,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/mysql/index.ts b/packages/mysql/index.ts index 6e9b6706f..e957bfa77 100644 --- a/packages/mysql/index.ts +++ b/packages/mysql/index.ts @@ -8,4 +8,4 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/mysql-adapter'; +export * from './src/mysql-adapter.js'; diff --git a/packages/mysql/package-lock.json b/packages/mysql/package-lock.json index ced57f953..6b6f5d610 100644 --- a/packages/mysql/package-lock.json +++ b/packages/mysql/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/mysql", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "mariadb": "^2.5.2" diff --git a/packages/mysql/package.json b/packages/mysql/package.json index 2a5f8e82f..59b4920f4 100644 --- a/packages/mysql/package.json +++ b/packages/mysql/package.json @@ -40,7 +40,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/mysql/src/mysql-adapter.ts b/packages/mysql/src/mysql-adapter.ts index e5623992e..4cee6f059 100644 --- a/packages/mysql/src/mysql-adapter.ts +++ b/packages/mysql/src/mysql-adapter.ts @@ -23,7 +23,7 @@ import { SQLStatement } from '@deepkit/sql'; import { DatabaseLogger, DatabasePersistenceChangeSet, DatabaseSession, DatabaseTransaction, DeleteResult, OrmEntity, PatchResult, UniqueConstraintFailure } from '@deepkit/orm'; -import { MySQLPlatform } from './mysql-platform'; +import { MySQLPlatform } from './mysql-platform.js'; import { Changes, getPartialSerializeFunction, getSerializeFunction, ReceiveType, ReflectionClass, resolvePath, resolveReceiveType } from '@deepkit/type'; import { AbstractClassType, asyncOperation, ClassType, empty, isArray } from '@deepkit/core'; import { FrameCategory, Stopwatch } from '@deepkit/stopwatch'; diff --git a/packages/mysql/src/mysql-platform.ts b/packages/mysql/src/mysql-platform.ts index 5da7c13f1..b76fb7251 100644 --- a/packages/mysql/src/mysql-platform.ts +++ b/packages/mysql/src/mysql-platform.ts @@ -9,10 +9,10 @@ */ import { Pool } from 'mariadb'; -import { mySqlSerializer } from './mysql-serializer'; +import { mySqlSerializer } from './mysql-serializer.js'; import { isUUIDType, ReflectionKind, ReflectionProperty, Serializer, TypeNumberBrand } from '@deepkit/type'; import { Column, DefaultPlatform, isSet } from '@deepkit/sql'; -import { MysqlSchemaParser } from './mysql-schema-parser'; +import { MysqlSchemaParser } from './mysql-schema-parser.js'; export class MySQLPlatform extends DefaultPlatform { protected override defaultSqlType = 'longtext'; diff --git a/packages/mysql/tests/factory.ts b/packages/mysql/tests/factory.ts index eb5d22196..7aea855d3 100644 --- a/packages/mysql/tests/factory.ts +++ b/packages/mysql/tests/factory.ts @@ -1,5 +1,5 @@ import { Database } from '@deepkit/orm'; -import { MySQLDatabaseAdapter } from '../src/mysql-adapter'; +import { MySQLDatabaseAdapter } from '../src/mysql-adapter.js'; export async function databaseFactory(entities): Promise> { const adapter = new MySQLDatabaseAdapter({ host: 'localhost', database: 'default', user: 'root' }); diff --git a/packages/mysql/tests/integration.spec.ts b/packages/mysql/tests/integration.spec.ts index 516c6f273..8cceceaf2 100644 --- a/packages/mysql/tests/integration.spec.ts +++ b/packages/mysql/tests/integration.spec.ts @@ -1,6 +1,6 @@ import { test } from '@jest/globals'; import { runIntegrationTests } from '@deepkit/orm-integration'; -import { databaseFactory } from './factory'; +import { databaseFactory } from './factory.js'; runIntegrationTests(databaseFactory); diff --git a/packages/mysql/tests/migration.spec.ts b/packages/mysql/tests/migration.spec.ts index 1a5e9a94a..8e842afd7 100644 --- a/packages/mysql/tests/migration.spec.ts +++ b/packages/mysql/tests/migration.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { AutoIncrement, Entity, float32, int16, int32, int8, integer, MySQL, PrimaryKey, Reference, typeOf, uint16, uint32, uint8, Unique, UUID } from '@deepkit/type'; import { schemaMigrationRoundTrip } from '@deepkit/sql'; -import { MySQLDatabaseAdapter } from '../src/mysql-adapter'; +import { MySQLDatabaseAdapter } from '../src/mysql-adapter.js'; import { DatabaseEntityRegistry } from '@deepkit/orm'; test('mysql custom type', async () => { diff --git a/packages/mysql/tests/mysql.spec.ts b/packages/mysql/tests/mysql.spec.ts index 0043659c6..b36a0db1b 100644 --- a/packages/mysql/tests/mysql.spec.ts +++ b/packages/mysql/tests/mysql.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { createPool } from 'mariadb'; -import { MySQLConnectionPool, MySQLDatabaseAdapter } from '../src/mysql-adapter'; +import { MySQLConnectionPool, MySQLDatabaseAdapter } from '../src/mysql-adapter.js'; import { Database } from '@deepkit/orm'; import { AutoIncrement, cast, entity, PrimaryKey } from '@deepkit/type'; diff --git a/packages/mysql/tests/transaction.spec.ts b/packages/mysql/tests/transaction.spec.ts index 2fa6b61c5..bf74bb870 100644 --- a/packages/mysql/tests/transaction.spec.ts +++ b/packages/mysql/tests/transaction.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { AutoIncrement, entity, PrimaryKey } from '@deepkit/type'; -import { databaseFactory } from './factory'; +import { databaseFactory } from './factory.js'; test('transaction', async () => { @entity.collection('users') diff --git a/packages/orm-browser-api/index.ts b/packages/orm-browser-api/index.ts index 9f5b3a8de..0dd02b259 100644 --- a/packages/orm-browser-api/index.ts +++ b/packages/orm-browser-api/index.ts @@ -8,5 +8,5 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/api'; -export * from './src/faker'; +export * from './src/api.js'; +export * from './src/faker.js'; diff --git a/packages/orm-browser-api/package.json b/packages/orm-browser-api/package.json index 92c2849a9..d4fce1b26 100644 --- a/packages/orm-browser-api/package.json +++ b/packages/orm-browser-api/package.json @@ -31,7 +31,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/orm-browser-api/src/api.ts b/packages/orm-browser-api/src/api.ts index 36a5d3b1e..0fbef1d06 100644 --- a/packages/orm-browser-api/src/api.ts +++ b/packages/orm-browser-api/src/api.ts @@ -10,7 +10,7 @@ import { ControllerSymbol } from '@deepkit/rpc'; import { ChangesInterface, deserializeType, entity, ReflectionClass } from '@deepkit/type'; -import { FakerTypes } from './faker'; +import { FakerTypes } from './faker.js'; export type DatabaseCommit = { [dbName: string]: { diff --git a/packages/orm-browser-api/tsconfig.json b/packages/orm-browser-api/tsconfig.json index 2e1b6428f..8d777c598 100644 --- a/packages/orm-browser-api/tsconfig.json +++ b/packages/orm-browser-api/tsconfig.json @@ -37,4 +37,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/orm-browser-example/bookstore/user-credentials.ts b/packages/orm-browser-example/bookstore/user-credentials.ts index f5ec1a30f..354a41007 100644 --- a/packages/orm-browser-example/bookstore/user-credentials.ts +++ b/packages/orm-browser-example/bookstore/user-credentials.ts @@ -1,5 +1,5 @@ import { entity, PrimaryKey, Reference } from '@deepkit/type'; -import { User } from './user'; +import { User } from './user.js'; @entity.name('user-credentials') diff --git a/packages/orm-browser-example/bookstore/user.ts b/packages/orm-browser-example/bookstore/user.ts index 207e5d5ee..fa160a3ba 100644 --- a/packages/orm-browser-example/bookstore/user.ts +++ b/packages/orm-browser-example/bookstore/user.ts @@ -1,6 +1,6 @@ import { AutoIncrement, BackReference, entity, MinLength, PrimaryKey, Reference } from '@deepkit/type'; -import { UserCredentials } from './user-credentials'; -import { Group } from './group'; +import { UserCredentials } from './user-credentials.js'; +import { Group } from './group.js'; @entity.name('user') export class User { diff --git a/packages/orm-browser-example/database.ts b/packages/orm-browser-example/database.ts index 74ba6a0e9..4205ef094 100644 --- a/packages/orm-browser-example/database.ts +++ b/packages/orm-browser-example/database.ts @@ -2,9 +2,9 @@ import 'reflect-metadata'; import { AutoIncrement, Entity, entity, PrimaryKey, uuid } from '@deepkit/type'; import { Database } from '@deepkit/orm'; import { SQLiteDatabaseAdapter } from '@deepkit/sqlite'; -import { User, UserGroup } from './bookstore/user'; -import { Group } from './bookstore/group'; -import { UserCredentials } from './bookstore/user-credentials'; +import { User, UserGroup } from './bookstore/user.js'; +import { Group } from './bookstore/group.js'; +import { UserCredentials } from './bookstore/user-credentials.js'; import { Reference } from '@deepkit/type'; import { UUID } from '@deepkit/type'; //import { MongoDatabaseAdapter } from '@deepkit/mongo'; diff --git a/packages/orm-browser-example/package.json b/packages/orm-browser-example/package.json index 36dd51034..48e87a727 100644 --- a/packages/orm-browser-example/package.json +++ b/packages/orm-browser-example/package.json @@ -24,7 +24,10 @@ "devDependencies": { "reflect-metadata": "^0.1.13" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/orm-browser-example/tsconfig.json b/packages/orm-browser-example/tsconfig.json index 3808e5347..de5bb071b 100644 --- a/packages/orm-browser-example/tsconfig.json +++ b/packages/orm-browser-example/tsconfig.json @@ -43,4 +43,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/orm-browser-gui/e2e/src/app.e2e-spec.ts b/packages/orm-browser-gui/e2e/src/app.e2e-spec.ts index 927d4436f..c7b377dbf 100644 --- a/packages/orm-browser-gui/e2e/src/app.e2e-spec.ts +++ b/packages/orm-browser-gui/e2e/src/app.e2e-spec.ts @@ -1,5 +1,5 @@ import { browser, logging } from 'protractor'; -import { AppPage } from './app.po'; +import { AppPage } from './app.po.js'; describe('workspace-project App', () => { let page: AppPage; diff --git a/packages/orm-browser-gui/extra-webpack.config.js b/packages/orm-browser-gui/extra-webpack.config.js index 9bac881f7..e0d23dd19 100644 --- a/packages/orm-browser-gui/extra-webpack.config.js +++ b/packages/orm-browser-gui/extra-webpack.config.js @@ -1,3 +1,5 @@ +const ResolveTypeScriptPlugin = require("resolve-typescript-plugin"); + module.exports = { resolve: { fallback: { @@ -6,6 +8,9 @@ module.exports = { path: false, process: false, '@deepkit/logger': false - } + }, + plugins: [new ResolveTypeScriptPlugin({ + includeNodeModules: true + })] } } diff --git a/packages/orm-browser-gui/index.ts b/packages/orm-browser-gui/index.ts index 44ca09b21..e720c11f1 100644 --- a/packages/orm-browser-gui/index.ts +++ b/packages/orm-browser-gui/index.ts @@ -1 +1 @@ -export * from './src/app/orm-browser.module'; +export * from './src/app/orm-browser.module.js'; diff --git a/packages/orm-browser-gui/package-lock.json b/packages/orm-browser-gui/package-lock.json index 462fa85c9..3419685f2 100644 --- a/packages/orm-browser-gui/package-lock.json +++ b/packages/orm-browser-gui/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/orm-browser-gui", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.74", "devDependencies": { "@angular-builders/custom-webpack": "^12.1.0", "@angular-devkit/build-angular": "~12.1.1", @@ -39,6 +39,7 @@ "karma-jasmine-html-reporter": "~1.6.0", "panzoom": "^9.4.2", "protractor": "~7.0.0", + "resolve-typescript-plugin": "^1.2.0", "rxjs": "^6.6.7", "ts-node": "~8.3.0", "tslib": "^2.3.0", @@ -13800,6 +13801,27 @@ "node": ">=4" } }, + "node_modules/resolve-typescript-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/resolve-typescript-plugin/-/resolve-typescript-plugin-1.2.0.tgz", + "integrity": "sha512-f0tu3fDdKcSmbgpLDNBKiMYPPG7D19tYCnph9B7GIlMMIWnbiLjAqqPXZVeO3POQSNF7ZYK4Ox+Gmvo116ERWQ==", + "dev": true, + "dependencies": { + "tslib": "2.3.1" + }, + "engines": { + "node": "^12 || ^14 || >=16" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/resolve-typescript-plugin/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -28134,6 +28156,23 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "resolve-typescript-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/resolve-typescript-plugin/-/resolve-typescript-plugin-1.2.0.tgz", + "integrity": "sha512-f0tu3fDdKcSmbgpLDNBKiMYPPG7D19tYCnph9B7GIlMMIWnbiLjAqqPXZVeO3POQSNF7ZYK4Ox+Gmvo116ERWQ==", + "dev": true, + "requires": { + "tslib": "2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", diff --git a/packages/orm-browser-gui/package.json b/packages/orm-browser-gui/package.json index a64c998dd..6f68b6a2f 100644 --- a/packages/orm-browser-gui/package.json +++ b/packages/orm-browser-gui/package.json @@ -62,6 +62,7 @@ "karma-jasmine-html-reporter": "~1.6.0", "panzoom": "^9.4.2", "protractor": "~7.0.0", + "resolve-typescript-plugin": "^1.2.0", "rxjs": "^6.6.7", "ts-node": "~8.3.0", "tslib": "^2.3.0", diff --git a/packages/orm-browser-gui/src/app/app.component.ts b/packages/orm-browser-gui/src/app/app.component.ts index a1f5e7851..aca4bfdcf 100644 --- a/packages/orm-browser-gui/src/app/app.component.ts +++ b/packages/orm-browser-gui/src/app/app.component.ts @@ -10,8 +10,8 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { DuiApp } from '@deepkit/desktop-ui'; -import { BrowserState } from './browser-state'; -import { ControllerClient } from './client'; +import { BrowserState } from './browser-state.js'; +import { ControllerClient } from './client.js'; @Component({ selector: 'app-root', diff --git a/packages/orm-browser-gui/src/app/app.module.ts b/packages/orm-browser-gui/src/app/app.module.ts index 109e77454..bfe006946 100644 --- a/packages/orm-browser-gui/src/app/app.module.ts +++ b/packages/orm-browser-gui/src/app/app.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { AppComponent } from './app.component'; -import { OrmBrowserModule } from './orm-browser.module'; +import { AppComponent } from './app.component.js'; +import { OrmBrowserModule } from './orm-browser.module.js'; import { RouterModule } from '@angular/router'; import { DuiAppModule, DuiButtonModule, DuiIconModule, DuiListModule, DuiWindowModule } from '@deepkit/desktop-ui'; diff --git a/packages/orm-browser-gui/src/app/browser-state.ts b/packages/orm-browser-gui/src/app/browser-state.ts index 2b5a3fcd7..ed16db498 100644 --- a/packages/orm-browser-gui/src/app/browser-state.ts +++ b/packages/orm-browser-gui/src/app/browser-state.ts @@ -12,7 +12,7 @@ import { TypePropertySignature, ValidatorError } from '@deepkit/type'; -import { ControllerClient } from './client'; +import { ControllerClient } from './client.js'; import { Progress } from '@deepkit/rpc'; import { getInstanceStateFromItem } from '@deepkit/orm'; diff --git a/packages/orm-browser-gui/src/app/components/browser-cell.component.ts b/packages/orm-browser-gui/src/app/components/browser-cell.component.ts index 14385f3ba..e90f55375 100644 --- a/packages/orm-browser-gui/src/app/components/browser-cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/browser-cell.component.ts @@ -1,8 +1,8 @@ import { Component, Input } from '@angular/core'; import { Changes, isAutoIncrementType, TypeProperty, TypePropertySignature } from '@deepkit/type'; -import { BrowserEntityState, BrowserState, ValidationErrors } from '../browser-state'; +import { BrowserEntityState, BrowserState, ValidationErrors } from '../browser-state.js'; import { getInstanceStateFromItem } from '@deepkit/orm'; -import { isRequired } from '../utils'; +import { isRequired } from '../utils.js'; @Component({ selector: 'orm-browser-cell', diff --git a/packages/orm-browser-gui/src/app/components/cell/array-cell.component.ts b/packages/orm-browser-gui/src/app/components/cell/array-cell.component.ts index deaa66b11..e01d4ac27 100644 --- a/packages/orm-browser-gui/src/app/components/cell/array-cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/cell/array-cell.component.ts @@ -1,7 +1,7 @@ import { Component, ComponentFactoryResolver, ComponentRef, Input, OnChanges, OnInit, ViewContainerRef } from '@angular/core'; import { isArray } from '@deepkit/core'; import { TypeArray } from '@deepkit/type'; -import { inputRegistry } from '../../registry'; +import { inputRegistry } from '../../registry.js'; @Component({ template: ``, diff --git a/packages/orm-browser-gui/src/app/components/cell/binary-cell.component.ts b/packages/orm-browser-gui/src/app/components/cell/binary-cell.component.ts index 8d4f8340d..e4847191e 100644 --- a/packages/orm-browser-gui/src/app/components/cell/binary-cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/cell/binary-cell.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from '@angular import { fromBuffer } from 'file-type/browser'; import * as FileSaver from 'file-saver'; import { Type } from '@deepkit/type'; -import { TypeDecoration } from './utils'; +import { TypeDecoration } from './utils.js'; @Component({ selector: 'orm-browser-binary-cell', diff --git a/packages/orm-browser-gui/src/app/components/cell/cell.component.ts b/packages/orm-browser-gui/src/app/components/cell/cell.component.ts index 7c4745a07..22f05d7e5 100644 --- a/packages/orm-browser-gui/src/app/components/cell/cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/cell/cell.component.ts @@ -1,7 +1,7 @@ import { Component, ComponentFactoryResolver, ComponentRef, Input, OnChanges, OnDestroy, ViewContainerRef } from '@angular/core'; import { Type } from '@deepkit/type'; -import { cellRegistry } from '../../registry'; -import { TypeDecoration } from './utils'; +import { cellRegistry } from '../../registry.js'; +import { TypeDecoration } from './utils.js'; @Component({ selector: 'orm-browser-property-view', diff --git a/packages/orm-browser-gui/src/app/components/cell/class-cell.component.ts b/packages/orm-browser-gui/src/app/components/cell/class-cell.component.ts index 0d04938b7..af3abe764 100644 --- a/packages/orm-browser-gui/src/app/components/cell/class-cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/cell/class-cell.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from '@angular/core'; import { isReferenceType, ReflectionClass, TypeClass, TypeObjectLiteral } from '@deepkit/type'; -import { objToString } from './utils'; -import { BrowserState } from '../../browser-state'; +import { objToString } from './utils.js'; +import { BrowserState } from '../../browser-state.js'; @Component({ template: `{{label}}` diff --git a/packages/orm-browser-gui/src/app/components/cell/json-cell.component.ts b/packages/orm-browser-gui/src/app/components/cell/json-cell.component.ts index 8bce91c28..aabaf75eb 100644 --- a/packages/orm-browser-gui/src/app/components/cell/json-cell.component.ts +++ b/packages/orm-browser-gui/src/app/components/cell/json-cell.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from '@angular/core'; import { isArray, isObject } from '@deepkit/core'; -import { objToString } from './utils'; -import { BrowserState } from '../../browser-state'; +import { objToString } from './utils.js'; +import { BrowserState } from '../../browser-state.js'; @Component({ selector: 'orm-browser-json-cell', diff --git a/packages/orm-browser-gui/src/app/components/database-graph.component.ts b/packages/orm-browser-gui/src/app/components/database-graph.component.ts index acd990e26..06c21adb5 100644 --- a/packages/orm-browser-gui/src/app/components/database-graph.component.ts +++ b/packages/orm-browser-gui/src/app/components/database-graph.component.ts @@ -12,7 +12,7 @@ import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input, OnChang import { DatabaseInfo } from '@deepkit/orm-browser-api'; import { graphlib, layout } from 'dagre'; import { default as createPanZoom, PanZoom } from 'panzoom'; -import { BrowserText } from './browser-text'; +import { BrowserText } from './browser-text.js'; import { isAutoIncrementType, isBackReferenceType, diff --git a/packages/orm-browser-gui/src/app/components/database-seed-properties.component.ts b/packages/orm-browser-gui/src/app/components/database-seed-properties.component.ts index 03da87fa2..cc931db3b 100644 --- a/packages/orm-browser-gui/src/app/components/database-seed-properties.component.ts +++ b/packages/orm-browser-gui/src/app/components/database-seed-properties.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { EntityPropertySeed, FakerTypes } from '@deepkit/orm-browser-api'; -import { autoTypes } from './seed'; +import { autoTypes } from './seed.js'; import { ReflectionClass } from '@deepkit/type'; -import { showTypeString } from '../utils'; +import { showTypeString } from '../utils.js'; @Component({ selector: 'orm-browser-seed-properties', diff --git a/packages/orm-browser-gui/src/app/components/database-seed-property.component.ts b/packages/orm-browser-gui/src/app/components/database-seed-property.component.ts index 09459ba27..979ffb2ed 100644 --- a/packages/orm-browser-gui/src/app/components/database-seed-property.component.ts +++ b/packages/orm-browser-gui/src/app/components/database-seed-property.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { FakerTypeDialogComponent } from './dialog/faker-type-dialog.component'; +import { FakerTypeDialogComponent } from './dialog/faker-type-dialog.component.js'; import { EntityPropertySeed, FakerTypes } from '@deepkit/orm-browser-api'; import { DuiDialog } from '@deepkit/desktop-ui'; import { empty } from '@deepkit/core'; diff --git a/packages/orm-browser-gui/src/app/components/database-seed.component.ts b/packages/orm-browser-gui/src/app/components/database-seed.component.ts index 99aa7e1bb..54b5021ff 100644 --- a/packages/orm-browser-gui/src/app/components/database-seed.component.ts +++ b/packages/orm-browser-gui/src/app/components/database-seed.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectorRef, Component, Input, OnChanges } from '@angular/core'; import { DatabaseInfo, EntityPropertySeed, FakerTypes, SeedDatabase } from '@deepkit/orm-browser-api'; -import { trackByIndex, trackBySchema } from '../utils'; -import { ControllerClient } from '../client'; -import { BrowserState } from '../browser-state'; +import { trackByIndex, trackBySchema } from '../utils.js'; +import { ControllerClient } from '../client.js'; +import { BrowserState } from '../browser-state.js'; import { DuiDialog } from '@deepkit/desktop-ui'; -import { FakerTypeDialogComponent } from './dialog/faker-type-dialog.component'; +import { FakerTypeDialogComponent } from './dialog/faker-type-dialog.component.js'; import { ReflectionClass } from '@deepkit/type'; @Component({ diff --git a/packages/orm-browser-gui/src/app/components/edit/array-input.component.ts b/packages/orm-browser-gui/src/app/components/edit/array-input.component.ts index 0ac6b9bee..c089b3a69 100644 --- a/packages/orm-browser-gui/src/app/components/edit/array-input.component.ts +++ b/packages/orm-browser-gui/src/app/components/edit/array-input.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { defaultValue, Type, TypeArray } from '@deepkit/type'; import { isArray } from '@deepkit/core'; -import { trackByIndex } from '../../utils'; +import { trackByIndex } from '../../utils.js'; @Component({ template: ` diff --git a/packages/orm-browser-gui/src/app/components/edit/class-input.component.ts b/packages/orm-browser-gui/src/app/components/edit/class-input.component.ts index 409c6c70d..14740c89b 100644 --- a/packages/orm-browser-gui/src/app/components/edit/class-input.component.ts +++ b/packages/orm-browser-gui/src/app/components/edit/class-input.component.ts @@ -13,8 +13,8 @@ import { serialize, Type } from '@deepkit/type'; -import { BrowserState } from '../../browser-state'; -import { getParentProperty } from '../../utils'; +import { BrowserState } from '../../browser-state.js'; +import { getParentProperty } from '../../utils.js'; @Component({ template: ` diff --git a/packages/orm-browser-gui/src/app/components/edit/input.component.ts b/packages/orm-browser-gui/src/app/components/edit/input.component.ts index 8f5381e15..05840a3fb 100644 --- a/packages/orm-browser-gui/src/app/components/edit/input.component.ts +++ b/packages/orm-browser-gui/src/app/components/edit/input.component.ts @@ -2,8 +2,8 @@ import { Component, ComponentFactoryResolver, ComponentRef, EventEmitter, Input, import { TableComponent, unsubscribe } from '@deepkit/desktop-ui'; import { Type } from '@deepkit/type'; import { Subscription } from 'rxjs'; -import { inputRegistry } from '../../registry'; -import { isProperty } from '../../utils'; +import { inputRegistry } from '../../registry.js'; +import { isProperty } from '../../utils.js'; @Component({ selector: 'orm-browser-property-editing', diff --git a/packages/orm-browser-gui/src/app/components/filter.compoment.ts b/packages/orm-browser-gui/src/app/components/filter.compoment.ts index 4aca07350..ae43fa39b 100644 --- a/packages/orm-browser-gui/src/app/components/filter.compoment.ts +++ b/packages/orm-browser-gui/src/app/components/filter.compoment.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { trackByIndex } from '../utils'; +import { trackByIndex } from '../utils.js'; import { arrayRemoveItem } from '@deepkit/core'; -import { FilterItem } from '../browser-state'; +import { FilterItem } from '../browser-state.js'; import { isBackReferenceType, ReflectionClass, ReflectionKind, Type, TypeProperty, TypePropertySignature } from '@deepkit/type'; @Component({ diff --git a/packages/orm-browser-gui/src/app/components/list.component.ts b/packages/orm-browser-gui/src/app/components/list.component.ts index bbe72d265..3bcd6d244 100644 --- a/packages/orm-browser-gui/src/app/components/list.component.ts +++ b/packages/orm-browser-gui/src/app/components/list.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { BrowserState } from '../browser-state'; -import { ControllerClient } from '../client'; -import { trackByDatabase, trackBySchema } from '../utils'; +import { BrowserState } from '../browser-state.js'; +import { ControllerClient } from '../client.js'; +import { trackByDatabase, trackBySchema } from '../utils.js'; import { detectChangesNextFrame } from '@deepkit/desktop-ui'; @Component({ diff --git a/packages/orm-browser-gui/src/app/components/property.component.ts b/packages/orm-browser-gui/src/app/components/property.component.ts index d866ef9dd..8bc87de85 100644 --- a/packages/orm-browser-gui/src/app/components/property.component.ts +++ b/packages/orm-browser-gui/src/app/components/property.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; import { defaultValue, isAutoIncrementType, Type } from '@deepkit/type'; -import { isRequired } from '../utils'; +import { isRequired } from '../utils.js'; @Component({ selector: 'orm-browser-property', diff --git a/packages/orm-browser-gui/src/app/orm-browser.module.ts b/packages/orm-browser-gui/src/app/orm-browser.module.ts index b3019db2e..8d911d2fa 100644 --- a/packages/orm-browser-gui/src/app/orm-browser.module.ts +++ b/packages/orm-browser-gui/src/app/orm-browser.module.ts @@ -18,38 +18,38 @@ import { DuiWindowModule } from '@deepkit/desktop-ui'; import { OverlayModule } from '@angular/cdk/overlay'; -import { DatabaseComponent } from './views/database.component'; -import { DatabaseBrowserComponent } from './views/database-browser.component'; -import { DatabaseGraphComponent } from './components/database-graph.component'; -import { InputEditingComponent } from './components/edit/input.component'; -import { StringInputComponent } from './components/edit/string-input.component'; -import { DateInputComponent } from './components/edit/date-input.component'; -import { CellComponent } from './components/cell/cell.component'; -import { StringCellComponent } from './components/cell/string-cell.component'; -import { DateCellComponent } from './components/cell/date-cell.component'; -import { DatabaseBrowserListComponent } from './components/list.component'; -import { ClassCellComponent } from './components/cell/class-cell.component'; -import { ClassInputComponent } from './components/edit/class-input.component'; -import { EnumCellComponent } from './components/cell/enum-cell.component'; -import { EnumInputComponent } from './components/edit/enum-input.component'; -import { DatabaseCommitComponent } from './views/database-commit.component'; -import { FilterComponent, FilterItemComponent } from './components/filter.compoment'; -import { JsonEditDialogComponent } from './components/dialog/json-edit-dialog.component'; -import { ArrayInputComponent } from './components/edit/array-input.component'; -import { ArrayCellComponent } from './components/cell/array-cell.component'; -import { JsonInputComponent } from './components/edit/json-input.component'; -import { JsonCellComponent } from './components/cell/json-cell.component'; -import { BinaryInputComponent } from './components/edit/binary-input.component'; -import { BinaryCellComponent } from './components/cell/binary-cell.component'; -import { BrowserCellComponent } from './components/browser-cell.component'; +import { DatabaseComponent } from './views/database.component.js'; +import { DatabaseBrowserComponent } from './views/database-browser.component.js'; +import { DatabaseGraphComponent } from './components/database-graph.component.js'; +import { InputEditingComponent } from './components/edit/input.component.js'; +import { StringInputComponent } from './components/edit/string-input.component.js'; +import { DateInputComponent } from './components/edit/date-input.component.js'; +import { CellComponent } from './components/cell/cell.component.js'; +import { StringCellComponent } from './components/cell/string-cell.component.js'; +import { DateCellComponent } from './components/cell/date-cell.component.js'; +import { DatabaseBrowserListComponent } from './components/list.component.js'; +import { ClassCellComponent } from './components/cell/class-cell.component.js'; +import { ClassInputComponent } from './components/edit/class-input.component.js'; +import { EnumCellComponent } from './components/cell/enum-cell.component.js'; +import { EnumInputComponent } from './components/edit/enum-input.component.js'; +import { DatabaseCommitComponent } from './views/database-commit.component.js'; +import { FilterComponent, FilterItemComponent } from './components/filter.compoment.js'; +import { JsonEditDialogComponent } from './components/dialog/json-edit-dialog.component.js'; +import { ArrayInputComponent } from './components/edit/array-input.component.js'; +import { ArrayCellComponent } from './components/cell/array-cell.component.js'; +import { JsonInputComponent } from './components/edit/json-input.component.js'; +import { JsonCellComponent } from './components/cell/json-cell.component.js'; +import { BinaryInputComponent } from './components/edit/binary-input.component.js'; +import { BinaryCellComponent } from './components/cell/binary-cell.component.js'; +import { BrowserCellComponent } from './components/browser-cell.component.js'; import { FormsModule } from '@angular/forms'; -import { BrowserState } from './browser-state'; -import { ControllerClient } from './client'; -import { PropertyComponent } from './components/property.component'; -import { DatabaseSeedComponent } from './components/database-seed.component'; -import { FakerTypeDialogComponent } from './components/dialog/faker-type-dialog.component'; -import { DatabaseSeedPropertyComponent } from './components/database-seed-property.component'; -import { DatabaseSeedPropertiesComponent } from './components/database-seed-properties.component'; +import { BrowserState } from './browser-state.js'; +import { ControllerClient } from './client.js'; +import { PropertyComponent } from './components/property.component.js'; +import { DatabaseSeedComponent } from './components/database-seed.component.js'; +import { FakerTypeDialogComponent } from './components/dialog/faker-type-dialog.component.js'; +import { DatabaseSeedPropertyComponent } from './components/database-seed-property.component.js'; +import { DatabaseSeedPropertiesComponent } from './components/database-seed-properties.component.js'; import { RouterModule } from '@angular/router'; import { DeepkitClient } from '@deepkit/rpc'; diff --git a/packages/orm-browser-gui/src/app/registry.ts b/packages/orm-browser-gui/src/app/registry.ts index 4f5f0e31e..5bc26be23 100644 --- a/packages/orm-browser-gui/src/app/registry.ts +++ b/packages/orm-browser-gui/src/app/registry.ts @@ -1,19 +1,19 @@ import { ClassType, getClassName } from '@deepkit/core'; import { isMongoIdType, isSetType, isUUIDType, ReflectionKind, TypeRegistry } from '@deepkit/type'; -import { ClassCellComponent } from './components/cell/class-cell.component'; -import { DateCellComponent } from './components/cell/date-cell.component'; -import { EnumCellComponent } from './components/cell/enum-cell.component'; -import { StringCellComponent } from './components/cell/string-cell.component'; -import { ClassInputComponent } from './components/edit/class-input.component'; -import { DateInputComponent } from './components/edit/date-input.component'; -import { EnumInputComponent } from './components/edit/enum-input.component'; -import { StringInputComponent } from './components/edit/string-input.component'; -import { ArrayInputComponent } from './components/edit/array-input.component'; -import { ArrayCellComponent } from './components/cell/array-cell.component'; -import { JsonInputComponent } from './components/edit/json-input.component'; -import { JsonCellComponent } from './components/cell/json-cell.component'; -import { BinaryInputComponent } from './components/edit/binary-input.component'; -import { BinaryCellComponent } from './components/cell/binary-cell.component'; +import { ClassCellComponent } from './components/cell/class-cell.component.js'; +import { DateCellComponent } from './components/cell/date-cell.component.js'; +import { EnumCellComponent } from './components/cell/enum-cell.component.js'; +import { StringCellComponent } from './components/cell/string-cell.component.js'; +import { ClassInputComponent } from './components/edit/class-input.component.js'; +import { DateInputComponent } from './components/edit/date-input.component.js'; +import { EnumInputComponent } from './components/edit/enum-input.component.js'; +import { StringInputComponent } from './components/edit/string-input.component.js'; +import { ArrayInputComponent } from './components/edit/array-input.component.js'; +import { ArrayCellComponent } from './components/cell/array-cell.component.js'; +import { JsonInputComponent } from './components/edit/json-input.component.js'; +import { JsonCellComponent } from './components/cell/json-cell.component.js'; +import { BinaryInputComponent } from './components/edit/binary-input.component.js'; +import { BinaryCellComponent } from './components/cell/binary-cell.component.js'; export const inputRegistry = new TypeRegistry(); diff --git a/packages/orm-browser-gui/src/app/views/database-browser.component.ts b/packages/orm-browser-gui/src/app/views/database-browser.component.ts index c56b65406..7f031dd5d 100644 --- a/packages/orm-browser-gui/src/app/views/database-browser.component.ts +++ b/packages/orm-browser-gui/src/app/views/database-browser.component.ts @@ -12,12 +12,12 @@ import { validate } from '@deepkit/type'; import { Subscription } from 'rxjs'; -import { BrowserEntityState, BrowserQuery, BrowserState, ValidationErrors, } from '../browser-state'; +import { BrowserEntityState, BrowserQuery, BrowserState, ValidationErrors, } from '../browser-state.js'; import { DatabaseInfo } from '@deepkit/orm-browser-api'; import { getInstanceStateFromItem } from '@deepkit/orm'; -import { ControllerClient } from '../client'; +import { ControllerClient } from '../client.js'; import { arrayRemoveItem, isArray } from '@deepkit/core'; -import { showTypeString, trackByIndex } from '../utils'; +import { showTypeString, trackByIndex } from '../utils.js'; import { ClientProgress } from '@deepkit/rpc'; import { ActivatedRoute } from '@angular/router'; diff --git a/packages/orm-browser-gui/src/app/views/database-commit.component.ts b/packages/orm-browser-gui/src/app/views/database-commit.component.ts index d5ae37ab6..579329361 100644 --- a/packages/orm-browser-gui/src/app/views/database-commit.component.ts +++ b/packages/orm-browser-gui/src/app/views/database-commit.component.ts @@ -2,8 +2,8 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { empty, size } from '@deepkit/core'; import { DialogComponent, DuiDialog } from '@deepkit/desktop-ui'; import { Changes } from '@deepkit/type'; -import { BrowserState } from '../browser-state'; -import { ControllerClient } from '../client'; +import { BrowserState } from '../browser-state.js'; +import { ControllerClient } from '../client.js'; @Component({ template: ` diff --git a/packages/orm-browser-gui/src/app/views/database.component.ts b/packages/orm-browser-gui/src/app/views/database.component.ts index a65d9933b..23017f6da 100644 --- a/packages/orm-browser-gui/src/app/views/database.component.ts +++ b/packages/orm-browser-gui/src/app/views/database.component.ts @@ -2,9 +2,9 @@ import { ChangeDetectorRef, Component, Input, OnDestroy, Optional } from '@angul import { DuiDialog, unsubscribe } from '@deepkit/desktop-ui'; import { DatabaseInfo } from '@deepkit/orm-browser-api'; import { empty } from '@deepkit/core'; -import { BrowserState } from '../browser-state'; -import { ControllerClient } from '../client'; -import { trackByIndex, trackByProperty } from '../utils'; +import { BrowserState } from '../browser-state.js'; +import { ControllerClient } from '../client.js'; +import { trackByIndex, trackByProperty } from '../utils.js'; import { ActivatedRoute } from '@angular/router'; import { Subscription } from 'rxjs'; diff --git a/packages/orm-browser-gui/src/main.ts b/packages/orm-browser-gui/src/main.ts index 9f5050fec..d107dde82 100644 --- a/packages/orm-browser-gui/src/main.ts +++ b/packages/orm-browser-gui/src/main.ts @@ -2,8 +2,8 @@ import 'reflect-metadata'; import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppModule } from './app/app.module.js'; +import { environment } from './environments/environment.js'; if (environment.production) { enableProdMode(); diff --git a/packages/orm-browser-gui/src/polyfills.ts b/packages/orm-browser-gui/src/polyfills.ts index 871ef3076..89942317d 100644 --- a/packages/orm-browser-gui/src/polyfills.ts +++ b/packages/orm-browser-gui/src/polyfills.ts @@ -37,7 +37,7 @@ * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; + * import './zone-flags.js'; * * The flags allowed in zone-flags.ts are listed here. * diff --git a/packages/orm-browser-gui/tsconfig.json b/packages/orm-browser-gui/tsconfig.json index 3cbc9f531..47732b029 100644 --- a/packages/orm-browser-gui/tsconfig.json +++ b/packages/orm-browser-gui/tsconfig.json @@ -38,6 +38,9 @@ { "path": "../crypto/tsconfig.json" }, + { + "path": "../event/tsconfig.json" + }, { "path": "../injector/tsconfig.json" }, diff --git a/packages/orm-browser/main.ts b/packages/orm-browser/main.ts index c5a35dfa4..0a21547e5 100755 --- a/packages/orm-browser/main.ts +++ b/packages/orm-browser/main.ts @@ -1,12 +1,15 @@ #!/usr/bin/env node import 'reflect-metadata'; +import { getDirname } from "@deepkit/platform" import { FrameworkModule, OrmBrowserController } from '@deepkit/framework'; import { App, AppModule, findParentPath } from '@deepkit/app'; import { Database, DatabaseRegistry } from '@deepkit/orm'; import { registerStaticHttpController } from '@deepkit/http'; import { InjectorContext } from '@deepkit/injector'; +const _dirname = getDirname(); + Database.registry = []; const databaseRegistry = new DatabaseRegistry(InjectorContext.forProviders([])); databaseRegistry.readDatabase(process.argv.slice(2)); @@ -24,8 +27,8 @@ const appModule = new AppModule({ }) ] }).setup((module, config) => { - const localPath = findParentPath('node_modules/@deepkit/orm-browser-gui/dist/orm-browser-gui', __dirname); - if (!localPath) throw new Error('node_modules/@deepkit/orm-browser-gui not installed in ' + __dirname); + const localPath = findParentPath('node_modules/@deepkit/orm-browser-gui/dist/orm-browser-gui', _dirname); + if (!localPath) throw new Error('node_modules/@deepkit/orm-browser-gui not installed in ' + _dirname); registerStaticHttpController(module, {path: '/', localPath, controllerName: 'OrmBrowserController'}); }); diff --git a/packages/orm-browser/package-lock.json b/packages/orm-browser/package-lock.json index 91d92e3d5..facceee99 100644 --- a/packages/orm-browser/package-lock.json +++ b/packages/orm-browser/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/orm-browser", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.73", "license": "MIT", "bin": { "deepkit-orm-browser": "dist/cjs/main.js" diff --git a/packages/orm-browser/package.json b/packages/orm-browser/package.json index 801ad06cc..a8e4fe35c 100644 --- a/packages/orm-browser/package.json +++ b/packages/orm-browser/package.json @@ -14,6 +14,7 @@ "author": "Marc J. Schmidt ", "license": "MIT", "dependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.75", "@deepkit/broker": "^1.0.1-alpha.75", "@deepkit/bson": "^1.0.1-alpha.75", @@ -34,7 +35,10 @@ "@types/faker": "5.1.6", "reflect-metadata": "^0.1.13" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/orm-browser/tsconfig.json b/packages/orm-browser/tsconfig.json index c1f5bbda9..025b8268a 100644 --- a/packages/orm-browser/tsconfig.json +++ b/packages/orm-browser/tsconfig.json @@ -21,6 +21,9 @@ "main.ts" ], "references": [ + { + "path": "../platform/tsconfig.json" + }, { "path": "../app/tsconfig.json" }, diff --git a/packages/orm-integration/index.ts b/packages/orm-integration/index.ts index a15f5fd9a..8cc0527a9 100644 --- a/packages/orm-integration/index.ts +++ b/packages/orm-integration/index.ts @@ -1,28 +1,28 @@ -import { bookstoreTests } from './src/bookstore'; +import { bookstoreTests } from './src/bookstore.js'; import { test } from '@jest/globals'; -import { variousTests } from './src/various'; -import { companyTests } from './src/company'; -import { usersTests } from './src/users'; -import { activeRecordTests } from './src/active-record'; -import { softDeleteTests } from './src/soft-delete'; -import { aggregateTest } from './src/aggregate'; -import { DatabaseFactory } from './src/test'; +import { variousTests } from './src/various.js'; +import { companyTests } from './src/company.js'; +import { usersTests } from './src/users.js'; +import { activeRecordTests } from './src/active-record.js'; +import { softDeleteTests } from './src/soft-delete.js'; +import { aggregateTest } from './src/aggregate.js'; +import { DatabaseFactory } from './src/test.js'; -export * from './src/bookstore'; -export * from './src/active-record'; -export * from './src/soft-delete'; -export * from './src/aggregate'; -export * from './src/users'; +export * from './src/bookstore.js'; +export * from './src/active-record.js'; +export * from './src/soft-delete.js'; +export * from './src/aggregate.js'; +export * from './src/users.js'; -export * from './src/various'; -export * from './src/test'; -export * from './src/active-record/book-tag'; -export * from './src/active-record/book'; -export * from './src/active-record/tag'; -export * from './src/bookstore/group'; -export * from './src/bookstore/user'; -export * from './src/bookstore/user-credentials'; -export * from './src/company'; +export * from './src/various.js'; +export * from './src/test.js'; +export * from './src/active-record/book-tag.js'; +export * from './src/active-record/book.js'; +export * from './src/active-record/tag.js'; +export * from './src/bookstore/group.js'; +export * from './src/bookstore/user.js'; +export * from './src/bookstore/user-credentials.js'; +export * from './src/company.js'; export function runIntegrationTests(databaseFactory: DatabaseFactory) { for (const i in bookstoreTests) { diff --git a/packages/orm-integration/package.json b/packages/orm-integration/package.json index 854c85eda..d625ed797 100644 --- a/packages/orm-integration/package.json +++ b/packages/orm-integration/package.json @@ -21,7 +21,10 @@ "@deepkit/orm": "^1.0.1-alpha.0", "@deepkit/sql": "^1.0.1-alpha.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/orm-integration/src/active-record.ts b/packages/orm-integration/src/active-record.ts index 6d319a8b0..96d1da607 100644 --- a/packages/orm-integration/src/active-record.ts +++ b/packages/orm-integration/src/active-record.ts @@ -1,10 +1,10 @@ import { expect } from '@jest/globals'; -import { User, UserGroup } from './bookstore/user'; -import { Book } from './active-record/book'; -import { Tag } from './active-record/tag'; -import { BookTag } from './active-record/book-tag'; -import { Group } from './bookstore/group'; -import { DatabaseFactory } from './test'; +import { User, UserGroup } from './bookstore/user.js'; +import { Book } from './active-record/book.js'; +import { Tag } from './active-record/tag.js'; +import { BookTag } from './active-record/book-tag.js'; +import { Group } from './bookstore/group.js'; +import { DatabaseFactory } from './test.js'; export const activeRecordTests = { async basics(databaseFactory: DatabaseFactory) { diff --git a/packages/orm-integration/src/active-record/book-tag.ts b/packages/orm-integration/src/active-record/book-tag.ts index 695e98dff..4528b28b6 100644 --- a/packages/orm-integration/src/active-record/book-tag.ts +++ b/packages/orm-integration/src/active-record/book-tag.ts @@ -1,7 +1,7 @@ import { AutoIncrement, entity, PrimaryKey, Reference } from '@deepkit/type'; import { ActiveRecord } from '@deepkit/orm'; -import { Book } from './book'; -import { Tag } from './tag'; +import { Book } from './book.js'; +import { Tag } from './tag.js'; @entity.name('active-record-book-tag').index(['book', 'tag']) export class BookTag extends ActiveRecord { diff --git a/packages/orm-integration/src/active-record/book.ts b/packages/orm-integration/src/active-record/book.ts index 13c88518e..33478ee06 100644 --- a/packages/orm-integration/src/active-record/book.ts +++ b/packages/orm-integration/src/active-record/book.ts @@ -1,8 +1,8 @@ import { ActiveRecord } from '@deepkit/orm'; import { AutoIncrement, BackReference, entity, PrimaryKey, Reference } from '@deepkit/type'; -import { User } from '../bookstore/user'; -import { BookTag } from './book-tag'; -import { Tag } from './tag'; +import { User } from '../bookstore/user.js'; +import { BookTag } from './book-tag.js'; +import { Tag } from './tag.js'; @entity.name('active-record-book') export class Book extends ActiveRecord { diff --git a/packages/orm-integration/src/aggregate.ts b/packages/orm-integration/src/aggregate.ts index 1f3d9e7e1..51dbb9173 100644 --- a/packages/orm-integration/src/aggregate.ts +++ b/packages/orm-integration/src/aggregate.ts @@ -1,4 +1,4 @@ -import { DatabaseFactory } from './test'; +import { DatabaseFactory } from './test.js'; import { cast, PrimaryKey } from '@deepkit/type'; import { expect } from '@jest/globals'; diff --git a/packages/orm-integration/src/bookstore.ts b/packages/orm-integration/src/bookstore.ts index 68cb1a114..f082da3b3 100644 --- a/packages/orm-integration/src/bookstore.ts +++ b/packages/orm-integration/src/bookstore.ts @@ -1,11 +1,11 @@ import { expect } from '@jest/globals'; import { assertType, AutoIncrement, BackReference, cast, entity, PrimaryKey, Reference, ReflectionClass, ReflectionKind, UUID, uuid } from '@deepkit/type'; -import { User, UserGroup } from './bookstore/user'; -import { UserCredentials } from './bookstore/user-credentials'; +import { User, UserGroup } from './bookstore/user.js'; +import { UserCredentials } from './bookstore/user-credentials.js'; import { atomicChange, DatabaseSession, getInstanceStateFromItem, Query } from '@deepkit/orm'; import { isArray } from '@deepkit/core'; -import { Group } from './bookstore/group'; -import { DatabaseFactory } from './test'; +import { Group } from './bookstore/group.js'; +import { DatabaseFactory } from './test.js'; interface BookModeration { locked: boolean; diff --git a/packages/orm-integration/src/bookstore/user-credentials.ts b/packages/orm-integration/src/bookstore/user-credentials.ts index 48e66ff50..d24dbbc30 100644 --- a/packages/orm-integration/src/bookstore/user-credentials.ts +++ b/packages/orm-integration/src/bookstore/user-credentials.ts @@ -1,5 +1,5 @@ import { entity, PrimaryKey, Reference } from '@deepkit/type'; -import { User } from './user'; +import { User } from './user.js'; @entity.name('user-credentials') export class UserCredentials { diff --git a/packages/orm-integration/src/bookstore/user.ts b/packages/orm-integration/src/bookstore/user.ts index 61da0c4d7..81c644eeb 100644 --- a/packages/orm-integration/src/bookstore/user.ts +++ b/packages/orm-integration/src/bookstore/user.ts @@ -1,6 +1,6 @@ import { AutoIncrement, BackReference, entity, PrimaryKey, Reference } from '@deepkit/type'; -import { UserCredentials } from './user-credentials'; -import { Group } from './group'; +import { UserCredentials } from './user-credentials.js'; +import { Group } from './group.js'; @entity.name('user') export class User { diff --git a/packages/orm-integration/src/company.ts b/packages/orm-integration/src/company.ts index 0442f8713..d217165a5 100644 --- a/packages/orm-integration/src/company.ts +++ b/packages/orm-integration/src/company.ts @@ -1,6 +1,6 @@ import { AutoIncrement, cast, entity, PrimaryKey, Reference, t } from '@deepkit/type'; import { expect } from '@jest/globals'; -import { DatabaseFactory } from './test'; +import { DatabaseFactory } from './test.js'; @entity.collection('persons') abstract class Person { diff --git a/packages/orm-integration/src/soft-delete.ts b/packages/orm-integration/src/soft-delete.ts index d18f93da8..8bf85846c 100644 --- a/packages/orm-integration/src/soft-delete.ts +++ b/packages/orm-integration/src/soft-delete.ts @@ -1,6 +1,6 @@ import { SoftDelete, SoftDeleteQuery, SoftDeleteSession } from '@deepkit/orm'; import { AutoIncrement, cast, entity, PrimaryKey } from '@deepkit/type'; -import { DatabaseFactory } from './test'; +import { DatabaseFactory } from './test.js'; import { expect } from '@jest/globals'; export const softDeleteTests = { diff --git a/packages/orm-integration/src/users.ts b/packages/orm-integration/src/users.ts index 0d00cd209..06ac429c5 100644 --- a/packages/orm-integration/src/users.ts +++ b/packages/orm-integration/src/users.ts @@ -1,4 +1,4 @@ -import { DatabaseFactory } from './test'; +import { DatabaseFactory } from './test.js'; import { AutoIncrement, BackReference, entity, PrimaryKey, Reference } from '@deepkit/type'; import { expect } from '@jest/globals'; import { getObjectKeysSize } from '@deepkit/core'; diff --git a/packages/orm-integration/src/various.ts b/packages/orm-integration/src/various.ts index b2b2f887c..b6d19365d 100644 --- a/packages/orm-integration/src/various.ts +++ b/packages/orm-integration/src/various.ts @@ -1,7 +1,7 @@ import { expect } from '@jest/globals'; import { AutoIncrement, cast, entity, isReferenceInstance, PrimaryKey, Reference, Unique } from '@deepkit/type'; import { identifier, sql, SQLDatabaseAdapter } from '@deepkit/sql'; -import { DatabaseFactory } from './test'; +import { DatabaseFactory } from './test.js'; import { isDatabaseOf, UniqueConstraintFailure } from '@deepkit/orm'; import { randomBytes } from 'crypto'; diff --git a/packages/orm-integration/tsconfig.json b/packages/orm-integration/tsconfig.json index 842f42cd4..ab05b6879 100644 --- a/packages/orm-integration/tsconfig.json +++ b/packages/orm-integration/tsconfig.json @@ -35,4 +35,4 @@ "path": "../sql/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/orm/browser.ts b/packages/orm/browser.ts index da4303568..65ab333d9 100644 --- a/packages/orm/browser.ts +++ b/packages/orm/browser.ts @@ -8,19 +8,19 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/database'; -export * from './src/database-adapter'; -export * from './src/database-session'; -export * from './src/identity-map'; -export * from './src/formatter'; -export * from './src/query'; -export * from './src/query-filter'; -export * from './src/utils'; -export * from './src/memory-db'; -export * from './src/type'; -export * from './src/logger'; -export * from './src/event'; -export * from './src/reference'; -export * from './src/plugin/soft-delete'; +export * from './src/database.js'; +export * from './src/database-adapter.js'; +export * from './src/database-session.js'; +export * from './src/identity-map.js'; +export * from './src/formatter.js'; +export * from './src/query.js'; +export * from './src/query-filter.js'; +export * from './src/utils.js'; +export * from './src/memory-db.js'; +export * from './src/type.js'; +export * from './src/logger.js'; +export * from './src/event.js'; +export * from './src/reference.js'; +export * from './src/plugin/soft-delete.js'; export { atomicChange } from '@deepkit/type'; diff --git a/packages/orm/index.ts b/packages/orm/index.ts index 5521c103c..42955622d 100644 --- a/packages/orm/index.ts +++ b/packages/orm/index.ts @@ -8,20 +8,20 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/database'; -export * from './src/database-adapter'; -export * from './src/database-session'; -export * from './src/database-registry'; -export * from './src/identity-map'; -export * from './src/formatter'; -export * from './src/query'; -export * from './src/query-filter'; -export * from './src/utils'; -export * from './src/memory-db'; -export * from './src/type'; -export * from './src/logger'; -export * from './src/event'; -export * from './src/reference'; -export * from './src/plugin/soft-delete'; +export * from './src/database.js'; +export * from './src/database-adapter.js'; +export * from './src/database-session.js'; +export * from './src/database-registry.js'; +export * from './src/identity-map.js'; +export * from './src/formatter.js'; +export * from './src/query.js'; +export * from './src/query-filter.js'; +export * from './src/utils.js'; +export * from './src/memory-db.js'; +export * from './src/type.js'; +export * from './src/logger.js'; +export * from './src/event.js'; +export * from './src/reference.js'; +export * from './src/plugin/soft-delete.js'; export { atomicChange } from '@deepkit/type'; diff --git a/packages/orm/package-lock.json b/packages/orm/package-lock.json index d2c92ccfd..390df570b 100644 --- a/packages/orm/package-lock.json +++ b/packages/orm/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/orm", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "sift": "^7.0.1" diff --git a/packages/orm/package.json b/packages/orm/package.json index 743584062..c987b689c 100644 --- a/packages/orm/package.json +++ b/packages/orm/package.json @@ -46,14 +46,14 @@ "@types/sqlstring": "^2.2.1", "conditional-type-checks": "^1.0.5" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, - "moduleNameMapper": { - "(.+)\\.js": "$1" - }, "testMatch": [ "**/tests/**/*.spec.ts" ] diff --git a/packages/orm/src/database-adapter.ts b/packages/orm/src/database-adapter.ts index f13c924a0..e369a005a 100644 --- a/packages/orm/src/database-adapter.ts +++ b/packages/orm/src/database-adapter.ts @@ -8,11 +8,11 @@ * You should have received a copy of the MIT License along with this program. */ -import { OrmEntity } from './type'; +import { OrmEntity } from './type.js'; import { AbstractClassType, arrayRemoveItem, ClassType, getClassName, getClassTypeFromInstance, isClass, stringifyValueWithType } from '@deepkit/core'; import { is, isSameType, ItemChanges, PrimaryKeyFields, ReceiveType, ReflectionClass, ReflectionKind, stringifyType, Type } from '@deepkit/type'; -import { Query } from './query'; -import { DatabaseSession, DatabaseTransaction } from './database-session'; +import { Query } from './query.js'; +import { DatabaseSession, DatabaseTransaction } from './database-session.js'; export abstract class DatabaseAdapterQueryFactory { abstract createQuery(type?: ReceiveType | ClassType | AbstractClassType | ReflectionClass): Query; diff --git a/packages/orm/src/database-registry.ts b/packages/orm/src/database-registry.ts index 3dcfc8ee3..ec9bf7f6a 100644 --- a/packages/orm/src/database-registry.ts +++ b/packages/orm/src/database-registry.ts @@ -10,7 +10,7 @@ import { ClassType, getClassName, getClassTypeFromInstance } from '@deepkit/core'; import { InjectorContext, InjectorModule } from '@deepkit/injector'; -import { Database } from './database'; +import { Database } from './database.js'; import { isAbsolute, join } from 'path'; import { ReflectionClass } from '@deepkit/type'; diff --git a/packages/orm/src/database-session.ts b/packages/orm/src/database-session.ts index bde76b770..7dee5dec3 100644 --- a/packages/orm/src/database-session.ts +++ b/packages/orm/src/database-session.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import type { DatabaseAdapter, DatabasePersistence, DatabasePersistenceChangeSet } from './database-adapter'; -import { DatabaseEntityRegistry } from './database-adapter'; -import { DatabaseValidationError, OrmEntity } from './type'; +import type { DatabaseAdapter, DatabasePersistence, DatabasePersistenceChangeSet } from './database-adapter.js'; +import { DatabaseEntityRegistry } from './database-adapter.js'; +import { DatabaseValidationError, OrmEntity } from './type.js'; import { AbstractClassType, ClassType, CustomError } from '@deepkit/core'; import { getPrimaryKeyExtractor, @@ -24,12 +24,12 @@ import { validate } from '@deepkit/type'; import { GroupArraySort } from '@deepkit/topsort'; -import { getClassState, getInstanceState, getNormalizedPrimaryKey, IdentityMap } from './identity-map'; -import { getClassSchemaInstancePairs } from './utils'; -import { HydratorFn } from './formatter'; -import { getReference } from './reference'; -import { UnitOfWorkCommitEvent, UnitOfWorkEvent, UnitOfWorkUpdateEvent } from './event'; -import { DatabaseLogger } from './logger'; +import { getClassState, getInstanceState, getNormalizedPrimaryKey, IdentityMap } from './identity-map.js'; +import { getClassSchemaInstancePairs } from './utils.js'; +import { HydratorFn } from './formatter.js'; +import { getReference } from './reference.js'; +import { UnitOfWorkCommitEvent, UnitOfWorkEvent, UnitOfWorkUpdateEvent } from './event.js'; +import { DatabaseLogger } from './logger.js'; import { Stopwatch } from '@deepkit/stopwatch'; import { EventDispatcher, EventDispatcherInterface, EventToken } from '@deepkit/event'; diff --git a/packages/orm/src/database.ts b/packages/orm/src/database.ts index 2ffd58ae7..9853d8d7a 100644 --- a/packages/orm/src/database.ts +++ b/packages/orm/src/database.ts @@ -21,15 +21,15 @@ import { resolveReceiveType, Type } from '@deepkit/type'; -import { DatabaseAdapter, DatabaseEntityRegistry } from './database-adapter'; -import { DatabaseSession } from './database-session'; -import { DatabaseLogger } from './logger'; -import { Query } from './query'; -import { getReference } from './reference'; -import { OrmEntity } from './type'; -import { VirtualForeignKeyConstraint } from './virtual-foreign-key-constraint'; +import { DatabaseAdapter, DatabaseEntityRegistry } from './database-adapter.js'; +import { DatabaseSession } from './database-session.js'; +import { DatabaseLogger } from './logger.js'; +import { Query } from './query.js'; +import { getReference } from './reference.js'; +import { OrmEntity } from './type.js'; +import { VirtualForeignKeyConstraint } from './virtual-foreign-key-constraint.js'; import { Stopwatch } from '@deepkit/stopwatch'; -import { getNormalizedPrimaryKey } from './identity-map'; +import { getNormalizedPrimaryKey } from './identity-map.js'; import { EventDispatcher, EventDispatcherUnsubscribe, EventListenerCallback, EventToken } from '@deepkit/event'; /** diff --git a/packages/orm/src/event.ts b/packages/orm/src/event.ts index 3f3fd9b63..2f729b9e8 100644 --- a/packages/orm/src/event.ts +++ b/packages/orm/src/event.ts @@ -12,10 +12,10 @@ import { ClassType } from '@deepkit/core'; import { BaseEvent } from '@deepkit/event'; import type { Changes } from '@deepkit/type'; import { PrimaryKeyType, ReflectionClass } from '@deepkit/type'; -import type { DatabasePersistenceChangeSet } from './database-adapter'; -import type { DatabaseSession } from './database-session'; -import type { Query } from './query'; -import type { DeleteResult, PatchResult } from './type'; +import type { DatabasePersistenceChangeSet } from './database-adapter.js'; +import type { DatabaseSession } from './database-session.js'; +import type { Query } from './query.js'; +import type { DeleteResult, PatchResult } from './type.js'; export class DatabaseEvent extends BaseEvent { stopped = false; diff --git a/packages/orm/src/formatter.ts b/packages/orm/src/formatter.ts index c26963b50..2aa4c2cc7 100644 --- a/packages/orm/src/formatter.ts +++ b/packages/orm/src/formatter.ts @@ -27,10 +27,10 @@ import { UnpopulatedCheck, unpopulatedSymbol } from '@deepkit/type'; -import { DatabaseQueryModel } from './query'; +import { DatabaseQueryModel } from './query.js'; import { capitalize, ClassType } from '@deepkit/core'; -import { ClassState, getClassState, getInstanceState, IdentityMap, PKHash } from './identity-map'; -import { getReference } from './reference'; +import { ClassState, getClassState, getInstanceState, IdentityMap, PKHash } from './identity-map.js'; +import { getReference } from './reference.js'; export type HydratorFn = (item: any) => Promise; diff --git a/packages/orm/src/identity-map.ts b/packages/orm/src/identity-map.ts index 9bde9aa95..1ac567cd5 100644 --- a/packages/orm/src/identity-map.ts +++ b/packages/orm/src/identity-map.ts @@ -18,7 +18,7 @@ import { JSONPartial, ReflectionClass } from '@deepkit/type'; -import { OrmEntity } from './type'; +import { OrmEntity } from './type.js'; import { getClassTypeFromInstance, isObject, toFastProperties } from '@deepkit/core'; export function getNormalizedPrimaryKey(schema: ReflectionClass, primaryKey: any) { diff --git a/packages/orm/src/memory-db.ts b/packages/orm/src/memory-db.ts index da92bdae3..8de785327 100644 --- a/packages/orm/src/memory-db.ts +++ b/packages/orm/src/memory-db.ts @@ -8,15 +8,15 @@ * You should have received a copy of the MIT License along with this program. */ -import { DatabaseSession, DatabaseTransaction } from './database-session'; -import { DatabaseQueryModel, GenericQueryResolver, Query } from './query'; +import { DatabaseSession, DatabaseTransaction } from './database-session.js'; +import { DatabaseQueryModel, GenericQueryResolver, Query } from './query.js'; import { Changes, getSerializeFunction, ReceiveType, ReflectionClass, resolvePath, serialize, Serializer } from '@deepkit/type'; import { AbstractClassType, deletePathValue, getPathValue, setPathValue } from '@deepkit/core'; -import { DatabaseAdapter, DatabaseAdapterQueryFactory, DatabaseEntityRegistry, DatabasePersistence, DatabasePersistenceChangeSet } from './database-adapter'; -import { DeleteResult, OrmEntity, PatchResult } from './type'; -import { findQueryList } from './utils'; -import { convertQueryFilter } from './query-filter'; -import { Formatter } from './formatter'; +import { DatabaseAdapter, DatabaseAdapterQueryFactory, DatabaseEntityRegistry, DatabasePersistence, DatabasePersistenceChangeSet } from './database-adapter.js'; +import { DeleteResult, OrmEntity, PatchResult } from './type.js'; +import { findQueryList } from './utils.js'; +import { convertQueryFilter } from './query-filter.js'; +import { Formatter } from './formatter.js'; type SimpleStore = { items: Map, autoIncrement: number }; diff --git a/packages/orm/src/plugin/soft-delete.ts b/packages/orm/src/plugin/soft-delete.ts index c55207fef..46b2a22f8 100644 --- a/packages/orm/src/plugin/soft-delete.ts +++ b/packages/orm/src/plugin/soft-delete.ts @@ -10,11 +10,11 @@ import { ClassType } from '@deepkit/core'; import { EventDispatcherUnsubscribe } from '@deepkit/event'; -import { DatabaseSession } from '../database-session'; -import { Database } from '../database'; -import { DatabaseAdapter } from '../database-adapter'; -import { Query } from '../query'; -import { OrmEntity } from '../type'; +import { DatabaseSession } from '../database-session.js'; +import { Database } from '../database.js'; +import { DatabaseAdapter } from '../database-adapter.js'; +import { Query } from '../query.js'; +import { OrmEntity } from '../type.js'; import { ReflectionClass } from '@deepkit/type'; interface SoftDeleteEntity extends OrmEntity { diff --git a/packages/orm/src/query-filter.ts b/packages/orm/src/query-filter.ts index 41ce2a2e9..68170ab37 100644 --- a/packages/orm/src/query-filter.ts +++ b/packages/orm/src/query-filter.ts @@ -10,7 +10,7 @@ import { ReflectionClass, ReflectionKind, ReflectionProperty } from '@deepkit/type'; import { ClassType, isArray, isPlainObject } from '@deepkit/core'; -import { FilterQuery } from './query'; +import { FilterQuery } from './query.js'; export type Converter = (convertClass: ReflectionClass, path: string, value: any) => any; export type QueryFieldNames = { [name: string]: boolean }; diff --git a/packages/orm/src/query.ts b/packages/orm/src/query.ts index bd5dc23cf..bec5baf6f 100644 --- a/packages/orm/src/query.ts +++ b/packages/orm/src/query.ts @@ -23,11 +23,11 @@ import { resolveForeignReflectionClass } from '@deepkit/type'; import { Subject } from 'rxjs'; -import { DatabaseAdapter } from './database-adapter'; -import { DatabaseSession } from './database-session'; -import { QueryDatabaseDeleteEvent, QueryDatabaseEvent, QueryDatabasePatchEvent } from './event'; -import { DeleteResult, OrmEntity, PatchResult } from './type'; -import { FieldName, FlattenIfArray, Replace, Resolve } from './utils'; +import { DatabaseAdapter } from './database-adapter.js'; +import { DatabaseSession } from './database-session.js'; +import { QueryDatabaseDeleteEvent, QueryDatabaseEvent, QueryDatabasePatchEvent } from './event.js'; +import { DeleteResult, OrmEntity, PatchResult } from './type.js'; +import { FieldName, FlattenIfArray, Replace, Resolve } from './utils.js'; import { FrameCategory } from '@deepkit/stopwatch'; import { EventToken } from '@deepkit/event'; diff --git a/packages/orm/src/reference.ts b/packages/orm/src/reference.ts index e872871cf..aee8a8757 100644 --- a/packages/orm/src/reference.ts +++ b/packages/orm/src/reference.ts @@ -10,7 +10,7 @@ import { ClassType } from '@deepkit/core'; import { createReference, getPrimaryKeyHashGenerator, ReflectionClass } from '@deepkit/type'; -import { IdentityMap } from './identity-map'; +import { IdentityMap } from './identity-map.js'; export function getReference( reflectionClass: ReflectionClass, diff --git a/packages/orm/src/utils.ts b/packages/orm/src/utils.ts index 1c9ac54ab..6abcc39f2 100644 --- a/packages/orm/src/utils.ts +++ b/packages/orm/src/utils.ts @@ -9,10 +9,10 @@ */ import { Changes, ReflectionClass } from '@deepkit/type'; -import { OrmEntity } from './type'; +import { OrmEntity } from './type.js'; import sift from 'sift'; -import { FilterQuery } from './query'; -import { getInstanceStateFromItem } from './identity-map'; +import { FilterQuery } from './query.js'; +import { getInstanceStateFromItem } from './identity-map.js'; import { getClassTypeFromInstance } from '@deepkit/core'; export type FlattenIfArray = T extends Array ? T[0] : T; diff --git a/packages/orm/src/virtual-foreign-key-constraint.ts b/packages/orm/src/virtual-foreign-key-constraint.ts index 8bad37af2..2004a2983 100644 --- a/packages/orm/src/virtual-foreign-key-constraint.ts +++ b/packages/orm/src/virtual-foreign-key-constraint.ts @@ -8,8 +8,8 @@ * You should have received a copy of the MIT License along with this program. */ -import type { QueryDatabaseDeleteEvent, QueryDatabasePatchEvent, UnitOfWorkEvent, UnitOfWorkUpdateEvent } from './event'; -import type { Database } from './database'; +import type { QueryDatabaseDeleteEvent, QueryDatabasePatchEvent, UnitOfWorkEvent, UnitOfWorkUpdateEvent } from './event.js'; +import type { Database } from './database.js'; import { ReflectionClass, ReflectionProperty } from '@deepkit/type'; type IncomingReference = { classSchema: ReflectionClass, property: ReflectionProperty }; diff --git a/packages/orm/tests/change-detection.spec.ts b/packages/orm/tests/change-detection.spec.ts index ef3f85835..1b9e71fa4 100644 --- a/packages/orm/tests/change-detection.spec.ts +++ b/packages/orm/tests/change-detection.spec.ts @@ -1,11 +1,11 @@ import { expect, test } from '@jest/globals'; import { atomicChange, deserialize, PrimaryKey, Reference, ReflectionClass, serializer } from '@deepkit/type'; -import { Formatter } from '../src/formatter'; -import { DatabaseQueryModel } from '../src/query'; -import { DatabaseSession } from '../src/database-session'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; -import { getClassState, getInstanceStateFromItem } from '../src/identity-map'; -import { buildChangesFromInstance } from '../src/utils'; +import { Formatter } from '../src/formatter.js'; +import { DatabaseQueryModel } from '../src/query.js'; +import { DatabaseSession } from '../src/database-session.js'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; +import { getClassState, getInstanceStateFromItem } from '../src/identity-map.js'; +import { buildChangesFromInstance } from '../src/utils.js'; test('change-detection', () => { class Image { diff --git a/packages/orm/tests/database.spec.ts b/packages/orm/tests/database.spec.ts index e72672b4d..025dc43a2 100644 --- a/packages/orm/tests/database.spec.ts +++ b/packages/orm/tests/database.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; -import { Database } from '../src/database'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; +import { Database } from '../src/database.js'; import { deserialize, entity, PrimaryKey, t, validate, ValidatorError } from '@deepkit/type'; test('memory-db', async () => { diff --git a/packages/orm/tests/events.spec.ts b/packages/orm/tests/events.spec.ts index 591c38b59..a5fe3b4bc 100644 --- a/packages/orm/tests/events.spec.ts +++ b/packages/orm/tests/events.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { Database } from '../src/database'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; +import { Database } from '../src/database.js'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; import { AutoIncrement, PrimaryKey, ReflectionClass, t } from '@deepkit/type'; import { DatabaseSession } from '../src/database-session.js'; diff --git a/packages/orm/tests/identity-map.spec.ts b/packages/orm/tests/identity-map.spec.ts index e97bf6688..b0b91a895 100644 --- a/packages/orm/tests/identity-map.spec.ts +++ b/packages/orm/tests/identity-map.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { BaseQuery, Formatter, getInstanceStateFromItem, getNormalizedPrimaryKey } from '../index'; -import { getReference } from '../src/reference'; +import { BaseQuery, Formatter, getInstanceStateFromItem, getNormalizedPrimaryKey } from '../index.js'; +import { getReference } from '../src/reference.js'; import { PrimaryKey, Reference, ReflectionClass, serializer } from '@deepkit/type'; import { getClassTypeFromInstance } from '@deepkit/core'; diff --git a/packages/orm/tests/query.spec.ts b/packages/orm/tests/query.spec.ts index f34573a5a..d3de0fd91 100644 --- a/packages/orm/tests/query.spec.ts +++ b/packages/orm/tests/query.spec.ts @@ -1,9 +1,9 @@ import { deserialize, PrimaryKey } from '@deepkit/type'; import { expect, test } from '@jest/globals'; import { assert, IsExact } from 'conditional-type-checks'; -import { Database } from '../src/database'; -import { MemoryDatabaseAdapter, MemoryQuery } from '../src/memory-db'; -import { Query } from '../src/query'; +import { Database } from '../src/database.js'; +import { MemoryDatabaseAdapter, MemoryQuery } from '../src/memory-db.js'; +import { Query } from '../src/query.js'; test('query select', async () => { class s { @@ -65,7 +65,7 @@ test('query filter', async () => { expect(results).toHaveLength(3); expect(results).toMatchObject([{ id: 1 }, { id: 2 }, { id: 3 }]); } - + }); test('query lift', async () => { diff --git a/packages/orm/tests/receive-type.spec.ts b/packages/orm/tests/receive-type.spec.ts index ee990f2f8..7022ae6b8 100644 --- a/packages/orm/tests/receive-type.spec.ts +++ b/packages/orm/tests/receive-type.spec.ts @@ -1,7 +1,7 @@ import { PrimaryKey } from '@deepkit/type'; import { test } from '@jest/globals'; -import { Database } from '../src/database'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; +import { Database } from '../src/database.js'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; test('query', () => { interface User { diff --git a/packages/orm/tests/soft-delete.spec.ts b/packages/orm/tests/soft-delete.spec.ts index b87815c75..25842db29 100644 --- a/packages/orm/tests/soft-delete.spec.ts +++ b/packages/orm/tests/soft-delete.spec.ts @@ -1,10 +1,10 @@ import { AutoIncrement, deserialize, entity, PrimaryKey } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { getInstanceStateFromItem } from '../src/identity-map'; -import { Database } from '../src/database'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; -import { SoftDelete, SoftDeleteQuery, SoftDeleteSession } from '../src/plugin/soft-delete'; -import { Query } from '../src/query'; +import { getInstanceStateFromItem } from '../src/identity-map.js'; +import { Database } from '../src/database.js'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; +import { SoftDelete, SoftDeleteQuery, SoftDeleteSession } from '../src/plugin/soft-delete.js'; +import { Query } from '../src/query.js'; test('soft-delete query', async () => { class s { diff --git a/packages/orm/tests/transaction.spec.ts b/packages/orm/tests/transaction.spec.ts index 8f1aa1cb8..d9ba8ae50 100644 --- a/packages/orm/tests/transaction.spec.ts +++ b/packages/orm/tests/transaction.spec.ts @@ -1,6 +1,6 @@ import { test } from '@jest/globals'; -import { Database } from '../src/database'; -import { MemoryDatabaseAdapter } from '../src/memory-db'; +import { Database } from '../src/database.js'; +import { MemoryDatabaseAdapter } from '../src/memory-db.js'; test('api', async () => { const database = new Database(new MemoryDatabaseAdapter()); diff --git a/packages/orm/tsconfig.esm.json b/packages/orm/tsconfig.esm.json index bbcc0a26f..e784328c7 100644 --- a/packages/orm/tsconfig.esm.json +++ b/packages/orm/tsconfig.esm.json @@ -11,6 +11,9 @@ { "path": "../core/tsconfig.esm.json" }, + { + "path": "../event/tsconfig.esm.json" + }, { "path": "../injector/tsconfig.esm.json" }, diff --git a/packages/orm/tsconfig.json b/packages/orm/tsconfig.json index e185d84aa..5c8f05f84 100644 --- a/packages/orm/tsconfig.json +++ b/packages/orm/tsconfig.json @@ -30,6 +30,9 @@ { "path": "../core/tsconfig.json" }, + { + "path": "../event/tsconfig.json" + }, { "path": "../injector/tsconfig.json" }, @@ -43,4 +46,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/platform/README.md b/packages/platform/README.md new file mode 100644 index 000000000..d8954a3e9 --- /dev/null +++ b/packages/platform/README.md @@ -0,0 +1,107 @@ +# @deepkit/platform + +The purpose of this module is to replace platform-dependent methods with platform-independent methods, +so that Deekit can run on as many runtime bindings as possible in the future, such as [Node.js](https://nodejs.org) (CJS and ESM), [Deno](https://deno.land/), [Gjs](https://gjs.guide/), [Cloudflare Workers](https://workers.cloudflare.com/), [Bun](https://bun.sh/), [Netlify Functions](https://www.netlify.com/products/#netlify-edge-functions) and more. + + +## State + +| Replaces | Runtime | Type | Replacement | +|--------------|---------|---------|-----------------| +| `__dirname` | Node.js | CJS | `getDirname()` | +| `__filename` | Node.js | CJS | `getFilename()` | + +## Installation + +On Node.js and GJS you can install the package as with NPM: + +``` +npm install @deepkit/platform --save +``` + +On Deno you just need to import this package. + +## Usage + +Please do not use `getDirname` and `getFilename` in nested other methods, instead always use them in the root of your file, otherwise it may return wrong results. + +### Node.js ESM + +```js +// node /path/to/the/script.mjs +import { getDirname, getFilename } from '@deepkit/platform' + +console.log(getDirname()) // outputs "/path/to/the" +console.log(getFilename()) // outputs "/path/to/the/script.mjs" +``` + +### Node.js CJS + +```js +// node /path/to/the/script.cjs +const { getDirname, getFilename } = require('@deepkit/platform'); + +console.log(getDirname() === __dirname) // true +console.log(getFilename() === __filename) // true +``` + +### Deno + +```ts +// deno run /path/to/the/script.ts +import { getDirname, getFilename } from 'https://raw.githubusercontent.com/deepkit/deepkit-framework/master/packages/platform/mod.ts'; + +console.log(getDirname()); // outputs "/path/to/the" +console.log(getFilename()); // outputs "/path/to/the/script.ts" +``` + +### GJS + +You can use NPM packages in GJS you can use a bundler like [esbuild](https://esbuild.github.io/) or import the files directly like this: + +```js +// gjs -m path/to/the/script.js +const { getDirname, getFilename } = from './node_modules/@deepkit/platform/dist/esm/index.js'; +console.log(getDirname()); // outputs "/path/to/the" +console.log(getFilename()); // outputs "/path/to/the/script.js" +``` + +### Tests + +This module has been tested on the following platforms: + +| Runtime | Type | Platform | State | +|---------|--------|----------|----------| +| Node.js | CJS | Linux | ✔ | +| Node.js | CJS | MacOS | ✔ | +| Node.js | CJS | Windows | ✔ | +| Node.js | ESM | Linux | ✔ | +| Node.js | ESM | MacOS | ✔ | +| Node.js | ESM | Windows | ✔ | +| Deno | ESM | Linux | ✔ | +| Deno | ESM | MacOS | ✔ | +| Deno | ESM | Windows | ✔ | +| Gjs | ESM | Linux | ✔ | +| Gjs | ESM | MacOS | UNTESTED | +| Gjs | ESM | Windows | UNTESTED | +| Chrome | ESM | Browser | ✔ | +| Chrome | CJS | Browser | ✔ | + +You can run all tests with: + +``` +npm run test +``` + +Or the tests for a special runtime: + +``` +npm run test:node +npm run test:deno +npm run test:gjs +npm run test:browser´ +``` + +### Contributions + +Contributions for more platforms and other replacement methods are welcome :) diff --git a/packages/platform/dist/esm/package.json b/packages/platform/dist/esm/package.json new file mode 100644 index 000000000..1632c2c4d --- /dev/null +++ b/packages/platform/dist/esm/package.json @@ -0,0 +1 @@ +{"type": "module"} \ No newline at end of file diff --git a/packages/platform/index.ts b/packages/platform/index.ts new file mode 100644 index 000000000..4df73b330 --- /dev/null +++ b/packages/platform/index.ts @@ -0,0 +1 @@ +export * from './src/index.js'; diff --git a/packages/platform/mod.ts b/packages/platform/mod.ts new file mode 100644 index 000000000..a8751fbe4 --- /dev/null +++ b/packages/platform/mod.ts @@ -0,0 +1,2 @@ +// Export for deno +export * from './src/index.ts'; \ No newline at end of file diff --git a/packages/platform/package-lock.json b/packages/platform/package-lock.json new file mode 100644 index 000000000..ed1fe88eb --- /dev/null +++ b/packages/platform/package-lock.json @@ -0,0 +1,3387 @@ +{ + "name": "@deepkit/platform", + "version": "1.0.1-alpha.74", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@deepkit/platform", + "version": "1.0.1-alpha.74", + "license": "MIT", + "devDependencies": { + "chai": "^4.3.6", + "esbuild": "^0.14.49", + "mocha": "^10.0.0", + "mocha-headless-chrome": "^4.0.0", + "typescript": "^4.7.4" + } + }, + "node_modules/@types/node": { + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz", + "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==", + "dev": true, + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.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.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "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/args": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", + "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", + "dev": true, + "dependencies": { + "camelcase": "5.0.0", + "chalk": "2.4.2", + "leven": "2.1.0", + "mri": "1.1.4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/args/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/args/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/args/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/args/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/args/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/args/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/args/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "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/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/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "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/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "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==", + "dev": true, + "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/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "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.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "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/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "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/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/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/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==", + "dev": 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": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "dev": true + }, + "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/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/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/esbuild": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz", + "integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "esbuild-android-64": "0.14.49", + "esbuild-android-arm64": "0.14.49", + "esbuild-darwin-64": "0.14.49", + "esbuild-darwin-arm64": "0.14.49", + "esbuild-freebsd-64": "0.14.49", + "esbuild-freebsd-arm64": "0.14.49", + "esbuild-linux-32": "0.14.49", + "esbuild-linux-64": "0.14.49", + "esbuild-linux-arm": "0.14.49", + "esbuild-linux-arm64": "0.14.49", + "esbuild-linux-mips64le": "0.14.49", + "esbuild-linux-ppc64le": "0.14.49", + "esbuild-linux-riscv64": "0.14.49", + "esbuild-linux-s390x": "0.14.49", + "esbuild-netbsd-64": "0.14.49", + "esbuild-openbsd-64": "0.14.49", + "esbuild-sunos-64": "0.14.49", + "esbuild-windows-32": "0.14.49", + "esbuild-windows-64": "0.14.49", + "esbuild-windows-arm64": "0.14.49" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", + "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", + "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", + "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", + "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", + "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", + "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", + "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", + "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", + "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", + "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", + "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", + "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", + "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", + "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", + "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", + "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", + "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", + "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", + "integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", + "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "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-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/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "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==", + "dev": true, + "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/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "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.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "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==", + "dev": true, + "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/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/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "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/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==", + "dev": true + }, + "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==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "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-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "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-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/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/leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/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.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "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/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "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-headless-chrome": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mocha-headless-chrome/-/mocha-headless-chrome-4.0.0.tgz", + "integrity": "sha512-Kw4/Sn3NgV3J2/DBuJrMGdxoul4YLl1RpTR+gftb3TNFXCcJZ1eAjAiMLzl5zd2Oa/w9Iu2V6hwTNOpcdf9VSg==", + "dev": true, + "dependencies": { + "args": "^5.0.1", + "mkdirp": "^1.0.4", + "puppeteer": "^13.1.3" + }, + "bin": { + "mocha-headless-chrome": "bin/start" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/mri": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "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/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/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "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/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/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/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.981744", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.5.0" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "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/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "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/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "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==", + "dev": true, + "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/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "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/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "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==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "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/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/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "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/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/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": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "engines": { + "node": ">=10.0.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/yargs-unparser/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/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "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" + } + } + }, + "dependencies": { + "@types/node": { + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz", + "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==", + "dev": true, + "optional": true + }, + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "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 + }, + "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 + }, + "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, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "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 + }, + "args": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", + "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", + "dev": true, + "requires": { + "camelcase": "5.0.0", + "chalk": "2.4.2", + "leven": "2.1.0", + "mri": "1.1.4" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "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 + }, + "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 + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "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, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "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 + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true + }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "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, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.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" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "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, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "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, + "requires": { + "color-name": "~1.1.4" + } + }, + "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 + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "requires": { + "node-fetch": "2.6.7" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "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 + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "dev": true + }, + "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 + }, + "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 + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "esbuild": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz", + "integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==", + "dev": true, + "requires": { + "esbuild-android-64": "0.14.49", + "esbuild-android-arm64": "0.14.49", + "esbuild-darwin-64": "0.14.49", + "esbuild-darwin-arm64": "0.14.49", + "esbuild-freebsd-64": "0.14.49", + "esbuild-freebsd-arm64": "0.14.49", + "esbuild-linux-32": "0.14.49", + "esbuild-linux-64": "0.14.49", + "esbuild-linux-arm": "0.14.49", + "esbuild-linux-arm64": "0.14.49", + "esbuild-linux-mips64le": "0.14.49", + "esbuild-linux-ppc64le": "0.14.49", + "esbuild-linux-riscv64": "0.14.49", + "esbuild-linux-s390x": "0.14.49", + "esbuild-netbsd-64": "0.14.49", + "esbuild-openbsd-64": "0.14.49", + "esbuild-sunos-64": "0.14.49", + "esbuild-windows-32": "0.14.49", + "esbuild-windows-64": "0.14.49", + "esbuild-windows-arm64": "0.14.49" + } + }, + "esbuild-android-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", + "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", + "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", + "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", + "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", + "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", + "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", + "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", + "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", + "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", + "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", + "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", + "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", + "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", + "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", + "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", + "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", + "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", + "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", + "integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", + "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", + "dev": true, + "optional": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "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 + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "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, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "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 + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "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 + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "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, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "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 + }, + "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 + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "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, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "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 + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "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 + }, + "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 + }, + "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, + "requires": { + "argparse": "^2.0.1" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==", + "dev": true + }, + "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, + "requires": { + "p-locate": "^5.0.0" + } + }, + "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, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, + "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, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "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" + } + }, + "mocha-headless-chrome": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mocha-headless-chrome/-/mocha-headless-chrome-4.0.0.tgz", + "integrity": "sha512-Kw4/Sn3NgV3J2/DBuJrMGdxoul4YLl1RpTR+gftb3TNFXCcJZ1eAjAiMLzl5zd2Oa/w9Iu2V6hwTNOpcdf9VSg==", + "dev": true, + "requires": { + "args": "^5.0.1", + "mkdirp": "^1.0.4", + "puppeteer": "^13.1.3" + } + }, + "mri": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", + "dev": true + }, + "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 + }, + "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 + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "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, + "requires": { + "wrappy": "1" + } + }, + "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, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "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, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "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 + }, + "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==", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "puppeteer": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", + "dev": true, + "requires": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.981744", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.5.0" + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "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 + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "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==", + "dev": true + }, + "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, + "requires": { + "randombytes": "^2.1.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "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, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "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, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "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 + }, + "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, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "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 + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "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 + }, + "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, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "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, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "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 + }, + "ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "requires": {} + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "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" + } + }, + "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 + }, + "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, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "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 + } + } +} diff --git a/packages/platform/package.json b/packages/platform/package.json new file mode 100644 index 000000000..99d8b52ca --- /dev/null +++ b/packages/platform/package.json @@ -0,0 +1,62 @@ +{ + "name": "@deepkit/platform", + "version": "1.0.1-alpha.75", + "description": "Deepkit cross platform library", + "type": "commonjs", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/cjs/index.d.ts", + "exports": { + ".": { + "require": "./dist/cjs/index.js", + "default": "./dist/esm/index.js" + } + }, + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/deepkit/deepkit-framework", + "contributors": [ + { + "name" : "Pascal Garber", + "email" : "pascal@artandcode.studio" + } + ], + "license": "MIT", + "files": [ + "/dist" + ], + "scripts": { + "clear": "rm -rf dist", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc", + "build:esm": "tsc --project tsconfig.esm.json", + "test": "npm run test:node && npm run test:deno && npm run test:gjs && npm run test:browser", + "test:node": "mocha test/node", + "test:gjs": "node test/browser/esbuild.mjs && gjs -m ./test/gjs/base.test.mjs", + "test:deno": "deno test ./test/deno/base.test.mjs", + "test:browser": "npm run test:browser:esm && npm run test:browser:cjs", + "test:browser:esm": "node test/browser/esbuild.mjs && mocha-headless-chrome --timeout 120000 --polling 1000 -f ./test/browser/index.html", + "test:browser:cjs": "node test/browser/esbuild.cjs && mocha-headless-chrome --timeout 120000 --polling 1000 -f ./test/browser/index.html" + }, + "keywords": [ + "deepkit", + "platform", + "dirname", + "filename", + "cross-platform", + "esm", + "cjs", + "node", + "deno", + "gjs" + ], + "devDependencies": { + "chai": "^4.3.6", + "esbuild": "^0.14.49", + "mocha": "^10.0.0", + "mocha-headless-chrome": "^4.0.0", + "typescript": "^4.7.4" + } +} diff --git a/packages/platform/src/index.ts b/packages/platform/src/index.ts new file mode 100644 index 000000000..479c13dc9 --- /dev/null +++ b/packages/platform/src/index.ts @@ -0,0 +1,89 @@ +const DIRNAME_POSIX_REGEX = /^((?:\.(?![^\/]))|(?:(?:\/?|)(?:[\s\S]*?)))(?:\/+?|)(?:(?:\.{1,2}|[^\/]+?|)(?:\.[^.\/]*|))(?:[\/]*)$/; +const DIRNAME_WIN32_REGEX = /^((?:\.(?![^\\]))|(?:(?:\\?|)(?:[\s\S]*?)))(?:\\+?|)(?:(?:\.{1,2}|[^\\]+?|)(?:\.[^.\\]*|))(?:[\\]*)$/; +const EXTRACT_PATH_REGEX = /@?(?[file:\/\/]?[^\(\s]+):[0-9]+:[0-9]+/; +const WIN_POSIX_DRIVE_REGEX = /^\/[A-Z]:\/*/; + +const pathDirname = (path: string) => { + let dirname = DIRNAME_POSIX_REGEX.exec(path)?.[1]; + + if (!dirname) { + dirname = DIRNAME_WIN32_REGEX.exec(path)?.[1]; + } + + if(!dirname) { + throw new Error(`Can't extract dirname from ${path}`); + } + + return dirname; +} + +const getPathFromErrorStack = () => { + let path = ''; + const stack = new Error().stack; + + if(!stack) { + console.warn("Error has no stack!"); + return path; + } + + // Node.js + let initiator: string | undefined = stack.split('\n').slice(4, 5)[0]; + + // Other + if(!initiator) { + initiator = stack.split('\n').slice(3, 4)[0]; + } + + if (initiator) { + path = EXTRACT_PATH_REGEX.exec(initiator)?.groups?.path || ''; + } + + if(!initiator || !path) { + console.warn("Can't get path from error stack!"); + } + + return path; +} + + +const getPath = () => { + let path = getPathFromErrorStack(); + + // Remove protocol + const protocol = "file://"; + if (path.indexOf(protocol) >= 0) { + path = path.slice(protocol.length); + } + + // Transform to win32 path + if (WIN_POSIX_DRIVE_REGEX.test(path)) { + path = path.slice(1).replace(/\//g, '\\'); + } + + return path; +} + +/** + * Cross platform implementation for `__dirname`. + * + * @note Please do not use this method in nested other methods, + * instead always use it in the root of your file, otherwise it may return wrong results. + * @returns What `__dirname` would return in CJS + */ +export const getDirname = () => { + let path = getPath(); + const dirname = pathDirname(path) + return dirname +} + +/** + * Cross platform implementation for `__filename`. + * + * @note Please do not use this method in nested other methods, + * instead always use it in the root of your file, otherwise it may return wrong results. + * @returns What `__filename` would return in CJS + */ +export const getFilename = () => { + let filename = getPath(); + return filename +} diff --git a/packages/platform/test/browser/esbuild.cjs b/packages/platform/test/browser/esbuild.cjs new file mode 100755 index 000000000..43d666928 --- /dev/null +++ b/packages/platform/test/browser/esbuild.cjs @@ -0,0 +1,9 @@ +#! /usr/bin/env node +const { build } = require("esbuild"); + +build({ + entryPoints: [__dirname + '/src/base.test.cjs'], + outdir: __dirname, + bundle: true, + format: 'iife', +}); diff --git a/packages/platform/test/browser/esbuild.mjs b/packages/platform/test/browser/esbuild.mjs new file mode 100755 index 000000000..21c1e4309 --- /dev/null +++ b/packages/platform/test/browser/esbuild.mjs @@ -0,0 +1,12 @@ +#! /usr/bin/env node +import { build } from "esbuild"; +import { getDirname } from "../../dist/esm/index.js"; +const crossDirname = getDirname(); + +await build({ + entryPoints: [crossDirname + '/src/base.test.mjs'], + outdir: crossDirname, + bundle: true, + target: ['chrome58', 'firefox57', 'safari11', 'edge16'], + format: 'iife', +}); diff --git a/packages/platform/test/browser/index.html b/packages/platform/test/browser/index.html new file mode 100644 index 000000000..306a2faad --- /dev/null +++ b/packages/platform/test/browser/index.html @@ -0,0 +1,23 @@ + + + + + Mocha Tests + + + + +
+ + + + + + + + + diff --git a/packages/platform/test/browser/src/base.test.cjs b/packages/platform/test/browser/src/base.test.cjs new file mode 100644 index 000000000..edfc6f383 --- /dev/null +++ b/packages/platform/test/browser/src/base.test.cjs @@ -0,0 +1,19 @@ +const { getDirname, getFilename } = require('../../../dist/cjs/index.js'); +const { expect } = require('chai'); + +describe('Browser CJS', () => { + it('getDirname() should be a string', function () { + console.debug("\tgetDirname() \t->", getDirname()); + expect(getDirname()).to.be.a("string"); + }); + + it('getFilename() should be a string', function () { + console.debug("\tgetFilename() \t->", getFilename()); + expect(getFilename()).to.be.a("string"); + }); + + it('getFilename() should end with "base.test.js"', function () { + expect(getFilename().endsWith('base.test.js')).to.be.true; + }); + +}); diff --git a/packages/platform/test/browser/src/base.test.mjs b/packages/platform/test/browser/src/base.test.mjs new file mode 100644 index 000000000..384a15aed --- /dev/null +++ b/packages/platform/test/browser/src/base.test.mjs @@ -0,0 +1,19 @@ +import { getDirname, getFilename } from '../../../dist/esm/index.js'; +import { expect } from 'chai'; + +describe('Browser ESM', () => { + it('getDirname() should be a string', function () { + console.debug("\tgetDirname() \t->", getDirname()); + expect(getDirname()).to.be.a("string"); + }); + + it('getFilename() should be a string', function () { + console.debug("\tgetFilename() \t->", getFilename()); + expect(getFilename()).to.be.a("string"); + }); + + it('getFilename() should end with "base.test.js"', function () { + expect(getFilename().endsWith('base.test.js')).to.be.true; + }); + +}); diff --git a/packages/platform/test/browser/vendor/chai.min.js b/packages/platform/test/browser/vendor/chai.min.js new file mode 100644 index 000000000..4b05e4804 --- /dev/null +++ b/packages/platform/test/browser/vendor/chai.min.js @@ -0,0 +1,2 @@ +// https://cdnjs.cloudflare.com/ajax/libs/chai/4.3.6/chai.min.js +!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).chai=e()}(function(){return function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var c="function"==typeof require&&require,e=0;e":r=n=":r=n<=e;break;case"<":r=e=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"!==n)return t;e=Object.keys(e);return"{ Object ("+(2=n)return n;for(var o=[],r=0;r<=e.length;r++)o[r]=Array(t.length+1).fill(0),o[r][0]=r;for(var i=0;i=n?o[r][i]=n:o[r][i]=Math.min(o[r-1][i]+1,o[r][i-1]+1,o[r-1][i-1]+(s===t.charCodeAt(i-1)?0:1));return o[e.length][t.length]}(n,e,r))e.length)&&(t=e.length);for(var n=0,o=new Array(t);ns)break;if(a+=d,!l&&!h&&y+c.length>=s){u="".concat(g,"(").concat(e.length-f-1,")");break}u=""}return"".concat(a).concat(u)}function l(e,t){var n=r(e,2),o=n[0],e=n[1];return t.truncate-=2,"string"==typeof o?o=(n=o).match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?n:JSON.stringify(n).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"):"number"!=typeof o&&(o="[".concat(t.inspect(o,t),"]")),t.truncate-=o.length,e=t.inspect(e,t),"".concat(o,": ").concat(e)}var s=Function.prototype.toString,h=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;var p=function(e){if("function"!=typeof e)return null;var t,n="";return void 0===Function.prototype.name&&void 0===e.name?(t=s.call(e).match(h))&&(n=t[1]):n=e.name,n};function t(t,e){var n=(a=t,"function"==typeof Buffer&&a instanceof Buffer?"Buffer":a[Symbol.toStringTag]||p(a.constructor));e.truncate-=n.length+4;var o=Object.keys(t).slice(t.length);if(!t.length&&!o.length)return"".concat(n,"[]");for(var r="",i=0;i ").concat(n)}var b=Number.isNaN||function(e){return e!=e};function m(e,t){return b(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):0===e?t.stylize(1/e==1/0?"+0":"-0","number"):t.stylize(c(e,t.truncate),"number")}function w(e,t){e=c(e.toString(),t.truncate-1);return e!==g&&(e+="n"),t.stylize(e,"bigint")}var v=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),x={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},O=16,j=4;function S(e){return x[e]||"\\u".concat("0000".concat(e.charCodeAt(0).toString(O)).slice(-j))}function M(e,t){return v.test(e)&&(e=e.replace(v,S)),t.stylize("'".concat(c(e,t.truncate-2),"'"),"string")}function N(e){return"description"in Symbol.prototype?e.description?"Symbol(".concat(e.description,")"):"Symbol()":e.toString()}var P=function(){return"Promise{…}"};try{var k=process.binding("util"),E=k.getPromiseDetails,A=k.kPending,D=k.kRejected;Array.isArray(E(Promise.resolve()))&&(P=function(e,t){var n=r(E(e),2),e=n[0],n=n[1];return e===A?"Promise{}":"Promise".concat(e===D?"!":"","{").concat(t.inspect(n,t),"}")})}catch(e){}function I(t,e){var n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[];if(0===n.length&&0===o.length)return"{}";if(e.truncate-=4,e.seen=e.seen||[],0<=e.seen.indexOf(t))return"[Circular]";e.seen.push(t);n=u(n.map(function(e){return[e,t[e]]}),e,l),o=u(o.map(function(e){return[e,t[e]]}),e,l);e.seen.pop();e=n&&o?", ":"";return"{ ".concat(n).concat(e).concat(o," }")}var z=!("undefined"==typeof Symbol||!Symbol.toStringTag)&&Symbol.toStringTag;var C=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description"];function T(e,t){var n=r(e,2),e=n[0],n=n[1];return t.truncate-=3,n?"".concat(t.stylize(e,"yellow"),"=").concat(t.stylize('"'.concat(n,'"'),"string")):"".concat(t.stylize(e,"yellow"))}function q(e,t){return u(e,t,B,"\n")}function B(t,e){var n=t.getAttributeNames(),o=t.tagName.toLowerCase(),r=e.stylize("<".concat(o),"special"),i=e.stylize(">","special"),s=e.stylize(""),"special");e.truncate-=2*o.length+5;o="";0n&&(e="".concat(g,"(").concat(t.children.length,")")),"".concat(r).concat(o).concat(i).concat(e).concat(s)}var L="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("chai/inspect"):"@@chai/inspect",F=!1;try{var _=R("util"),F=!!_.inspect&&_.inspect.custom}catch(e){F=!1}var V=new WeakMap,K={},H={undefined:function(e,t){return t.stylize("undefined","undefined")},null:function(e,t){return t.stylize(null,"null")},boolean:function(e,t){return t.stylize(e,"boolean")},Boolean:function(e,t){return t.stylize(e,"boolean")},number:m,Number:m,bigint:w,BigInt:w,string:M,String:M,function:d,Function:d,symbol:N,Symbol:N,Array:function(t,e){var n=Object.keys(t).slice(t.length);if(!t.length&&!n.length)return"[]";e.truncate-=4;var o=u(t,e);e.truncate-=o.length;var r="";return n.length&&(r=u(n.map(function(e){return[e,t[e]]}),e,l)),"[ ".concat(o).concat(r?", ".concat(r):""," ]")},Date:function(e,t){var n=e.toJSON().split("T"),e=n[0];return t.stylize("".concat(e,"T").concat(c(n[1],t.truncate-e.length-1)),"date")},Map:function(e,t){var n;return e.size-1<=0?"Map{}":(t.truncate-=7,"Map{ ".concat(u((n=[],e.forEach(function(e,t){n.push([t,e])}),n),t,y)," }"))},Set:function(e,t){return 0===e.size?"Set{}":(t.truncate-=7,"Set{ ".concat(u((n=[],e.forEach(function(e){n.push(e)}),n),t)," }"));var n},RegExp:function(e,t){var n=e.toString().split("/")[2],o=t.truncate-(2+n.length),e=e.source;return t.stylize("/".concat(c(e,o),"/").concat(n),"regexp")},Promise:P,WeakSet:function(e,t){return t.stylize("WeakSet{…}","special")},WeakMap:function(e,t){return t.stylize("WeakMap{…}","special")},Arguments:function(e,t){return 0===e.length?"Arguments[]":(t.truncate-=13,"Arguments[ ".concat(u(e,t)," ]"))},Int8Array:t,Uint8Array:t,Uint8ClampedArray:t,Int16Array:t,Uint16Array:t,Int32Array:t,Uint32Array:t,Float32Array:t,Float64Array:t,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:function(t,e){var n=Object.getOwnPropertyNames(t).filter(function(e){return-1===C.indexOf(e)}),o=t.name;e.truncate-=o.length;var r="";return"string"==typeof t.message?r=c(t.message,e.truncate):n.unshift("message"),r=r?": ".concat(r):"",e.truncate-=r.length+5,e=u(n.map(function(e){return[e,t[e]]}),e,l),"".concat(o).concat(r).concat(e?" { ".concat(e," }"):"")},HTMLCollection:q,NodeList:q},U=Object.prototype.toString;function W(e,t){(t=function(e){var t=(u=0":s).length,"".concat(s).concat(I(i,r))):I(e,t):t.stylize(String(e),o)}e.custom=L,e.default=W,e.inspect=W,e.registerConstructor=function(e,t){return!V.has(e)&&(V.add(e,t),!0)},e.registerStringTag=function(e,t){return!(e in K)&&(K[e]=t,!0)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof t&&void 0!==e?o(t):o((n="undefined"!=typeof globalThis?globalThis:n||self).loupe={})},{util:void 0}],38:[function(e,t,n){"use strict";function o(e,t){return null!=e&&t in Object(e)}function r(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){if("constructor"===e||"__proto__"===e||"prototype"===e)return{};var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,"$1")}})}function i(e,t,n){var o=e,r=null;n=void 0===n?t.length:n;for(var i=0;in&&(o.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=o.length,n=n,"function"==typeof console.warn?console.warn(n):console.log(n))):(o=i[t]=r,++e._eventsCount),e}function fe(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function pe(e){var t=this._events;if(t){t=t[e];if("function"==typeof t)return 1;if(t)return t.length}return 0}function he(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}ue.prototype=Object.create(null),(f.EventEmitter=f).usingDomains=!1,f.prototype.domain=void 0,f.prototype._events=void 0,f.prototype._maxListeners=void 0,f.defaultMaxListeners=10,f.init=function(){this.domain=null,f.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ue,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},f.prototype.getMaxListeners=function(){return le(this)},f.prototype.emit=function(e){var t,r,n,i="error"===e,o=this._events;if(o)i=i&&null==o.error;else if(!i)return!1;if(s=this.domain,i){var s,i=arguments[1];if(s)return(i=i||new Error('Uncaught, unspecified "error" event')).domainEmitter=this,i.domain=s,i.domainThrown=!1,s.emit("error",i),!1;throw i instanceof Error?i:((s=new Error('Uncaught, unspecified "error" event. ('+i+")")).context=i,s)}if(!(t=o[e]))return!1;var a,u="function"==typeof t;switch(a=arguments.length){case 1:var l=t,c=u,f=this;if(c)l.call(f);else for(var p=l.length,P=he(l,p),h=0;h>18&63]+de[n>>12&63]+de[n>>6&63]+de[63&n]);return i.join("")}function Ee(e){ye||be();for(var t,r=e.length,n=r%3,i="",o=[],s=0,a=r-n;s>2])+de[t<<4&63]+"=="):2==n&&(t=(e[r-2]<<8)+e[r-1],i=(i=(i+=de[t>>10])+de[t>>4&63])+de[t<<2&63]+"="),o.push(i),o.join("")}function ve(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,p=r?-1:1,i=e[t+f];for(f+=p,o=i&(1<<-c)-1,i>>=-c,c+=a;0>=-c,c+=n;0>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,h=n?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-s))<1&&(s--,n*=2),2<=(t+=1<=s+c?f/n:f*Math.pow(2,1-c))*n&&(s++,n/=2),l<=s+c?(a=0,s=l):1<=s+c?(a=(t*n-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));8<=i;e[r+p]=255&a,p+=h,a/=256,i-=8);for(s=s<=Se())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Se().toString(16)+" bytes");return 0|e}function Ce(e){return null!=e&&e._isBuffer}function qe(e,t){if(Ce(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var r=(e="string"!=typeof e?""+e:e).length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Je(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ke(e).length;default:if(n)return Je(e).length;t=(""+t).toLowerCase(),n=!0}}function Oe(e,t,r){var n,i=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,s=t,a=r,u=o.length;(!a||a<0||u=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(Ce(t="string"==typeof t?p.from(t,n):t))return 0===t.length?-1:Ue(e,t,r,n,i);if("number"==typeof t)return t&=255,p.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):Ue(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ue(e,t,r,n,i){var o=1,s=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s/=o=2,a/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var l=-1,c=r;c>8,n=n%256,i.push(n),i.push(r);return i}(t,e.length-r),e,r,n)}function Ve(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}var p=n,h=p.length;if(h<=Me)return String.fromCharCode.apply(String,p);for(var d="",g=0;g"},p.prototype.compare=function(e,t,r,n,i){if(!Ce(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,s,a,u=!1;;)switch(n){case"hex":var l=this,c=e,f=t,p=r,h=(f=Number(f)||0,l.length-f);if((!p||h<(p=Number(p)))&&(p=h),(h=c.length)%2!=0)throw new TypeError("Invalid hex string");h/2e.length)throw new RangeError("Index out of range")}function Ge(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function He(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function ze(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ye(e,t,r,n,i){return i||ze(e,0,r,4),_e(e,t,r,n,23,4),r+4}function $e(e,t,r,n,i){return i||ze(e,0,r,8),_e(e,t,r,n,52,8),r+8}p.prototype.slice=function(e,t){var r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r>>8):Ge(this,e,t,!0),t+2},p.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ge(this,e,t,!1),t+2},p.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):He(this,e,t,!0),t+4},p.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):He(this,e,t,!1),t+4},p.prototype.writeIntLE=function(e,t,r,n){e=+e,t|=0,n||je(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},p.prototype.writeIntBE=function(e,t,r,n){e=+e,t|=0,n||je(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,s=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},p.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,1,127,-128),p.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},p.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ge(this,e,t,!0),t+2},p.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ge(this,e,t,!1),t+2},p.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):He(this,e,t,!0),t+4},p.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||je(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):He(this,e,t,!1),t+4},p.prototype.writeFloatLE=function(e,t,r){return Ye(this,e,t,!0,r)},p.prototype.writeFloatBE=function(e,t,r){return Ye(this,e,t,!1,r)},p.prototype.writeDoubleLE=function(e,t,r){return $e(this,e,t,!0,r)},p.prototype.writeDoubleBE=function(e,t,r){return $e(this,e,t,!1,r)},p.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i,o=(n=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(a=t;a>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Ke(e){var t=function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(We,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e);ye||be();var r,e=t.length;if(0>16&255,i[s++]=r>>8&255,i[s++]=255&r;return 2==n?(r=ge[t.charCodeAt(a)]<<2|ge[t.charCodeAt(a+1)]>>4,i[s++]=255&r):1==n&&(r=ge[t.charCodeAt(a)]<<10|ge[t.charCodeAt(a+1)]<<4|ge[t.charCodeAt(a+2)]>>2,i[s++]=r>>8&255,i[s++]=255&r),i}function Ze(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Qe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Xe(){throw new Error("setTimeout has not been defined")}function et(){throw new Error("clearTimeout has not been defined")}var tt=Xe,rt=et;function nt(t){if(tt===setTimeout)return setTimeout(t,0);if((tt===Xe||!tt)&&setTimeout)return(tt=setTimeout)(t,0);try{return tt(t,0)}catch(e){try{return tt.call(null,t,0)}catch(e){return tt.call(this,t,0)}}}"function"==typeof I.setTimeout&&(tt=setTimeout),"function"==typeof I.clearTimeout&&(rt=clearTimeout);var it,ot=[],st=!1,at=-1;function ut(){st&&it&&(st=!1,it.length?ot=it.concat(ot):at=-1,ot.length&<())}function lt(){if(!st){for(var e=nt(ut),t=(st=!0,ot.length);t;){for(it=ot,ot=[];++at>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var Qt=p.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Xt(e){this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,"");if(e&&!Qt(e))throw new Error("Unknown encoding: "+e);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=tr;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=rr;break;default:return void(this.write=er)}this.charBuffer=new p(6),this.charReceived=0,this.charLength=0}function er(e){return e.toString(this.encoding)}function tr(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function rr(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Xt.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},Xt.prototype.end=function(e){var t,r,n="";return e&&e.length&&(n=this.write(e)),this.charReceived&&(e=this.charReceived,t=this.charBuffer,r=this.encoding,n+=t.slice(0,e).toString(r)),n},r.ReadableState=nr;var b=Tt("stream");function nr(e,t){this.objectMode=!!(e=e||{}).objectMode,t instanceof Lr&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var t=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=t||0===t?t:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Zt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Xt(e.encoding),this.encoding=e.encoding)}function r(e){if(!(this instanceof r))return new r(e);this._readableState=new nr(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),f.call(this)}function ir(e,t,r,n,i){var o,s,a,u=function(e,t){var r=null;p.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);return u?e.emit("error",u):null===r?(t.reading=!1,u=e,(o=t).ended||(o.decoder&&(s=o.decoder.end())&&s.length&&(o.buffer.push(s),o.length+=o.objectMode?1:s.length),o.ended=!0,ar(u))):t.objectMode||r&&0t.highWaterMark&&(t.highWaterMark=(or<=(r=e)?r=or:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function ar(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(b("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ct(ur,e):ur(e))}function ur(e){b("emit readable"),e.emit("readable"),pr(e)}function lr(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(s);break}++n}return t.length-=n,i}:function(e,t){var r=p.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(s);break}++i}return t.length-=i,r})(e,t);return n}(e,t.buffer,t.decoder),r);var r}function dr(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return b("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?dr:ar)(this),null;if(0===(e=sr(e,t))&&t.ended)return 0===t.length&&dr(this),null;var n=t.needReadable;return b("need readable",n),(0===t.length||t.length-e{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Vr(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;)e.unshift("..");return e}function Mr(e){return jr.exec(e).slice(1)}var jr=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function Gr(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return(t?"/":"")+(e=Vr(Zr(e.split("/"),function(e){return!!e}),!t).join("/"))||"."}function Hr(e){var t=zr(e),r="/"===Qr(e,-1);return(e=(e=Vr(Zr(e.split("/"),function(e){return!!e}),!t).join("/"))||t?e:".")&&r&&(e+="/"),(t?"/":"")+e}function zr(e){return"/"===e.charAt(0)}function Yr(){return Hr(Zr(Array.prototype.slice.call(arguments,0),function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function $r(e,t){function r(e){for(var t=0;t=f&&p<=e+1)return c([{value:this.join(u),count:u.length}]);function n(){for(var e=-1*h;e<=h;e+=2){var t=void 0,r=d[e-1],n=d[e+1],i=(n?n.newPos:0)-e,o=(r&&(d[e-1]=void 0),r&&r.newPos+1=f&&p<=i+1)return c(function(e,t,r,n,i){for(var o=0,s=t.length,a=0,u=0;oe.length?t:e}),c.value=e.join(l)):c.value=e.join(r.slice(a,a+c.count)),a+=c.count,c.added||(u+=c.count))}var f=t[s-1];1e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=l.length-2&&o.length<=u.context&&(e=/\n$/.test(s),r=/\n$/.test(a),n=0==o.length&&d.length>t.oldLines,!e&&n&&0e.length)return!1;for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r"):n.removed&&t.push(""),t.push(function(e){return e=(e=(e=(e=e.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")}(n.value)),n.added?t.push(""):n.removed&&t.push("")}return t.join("")},_=Xr,Object.defineProperty(_,"__esModule",{value:!0}),Object.defineProperty(_,"Diff",{enumerable:!0,get:function(){return Wn.default}}),Object.defineProperty(_,"diffChars",{enumerable:!0,get:function(){return Jn.diffChars}}),Object.defineProperty(_,"diffWords",{enumerable:!0,get:function(){return Kn.diffWords}}),Object.defineProperty(_,"diffWordsWithSpace",{enumerable:!0,get:function(){return Kn.diffWordsWithSpace}}),Object.defineProperty(_,"diffLines",{enumerable:!0,get:function(){return Zn.diffLines}}),Object.defineProperty(_,"diffTrimmedLines",{enumerable:!0,get:function(){return Zn.diffTrimmedLines}}),Object.defineProperty(_,"diffSentences",{enumerable:!0,get:function(){return Qn.diffSentences}}),Object.defineProperty(_,"diffCss",{enumerable:!0,get:function(){return Xn.diffCss}}),Object.defineProperty(_,"diffJson",{enumerable:!0,get:function(){return ei.diffJson}}),Object.defineProperty(_,"canonicalize",{enumerable:!0,get:function(){return ei.canonicalize}}),Object.defineProperty(_,"diffArrays",{enumerable:!0,get:function(){return ti.diffArrays}}),Object.defineProperty(_,"applyPatch",{enumerable:!0,get:function(){return ri.applyPatch}}),Object.defineProperty(_,"applyPatches",{enumerable:!0,get:function(){return ri.applyPatches}}),Object.defineProperty(_,"parsePatch",{enumerable:!0,get:function(){return ni.parsePatch}}),Object.defineProperty(_,"merge",{enumerable:!0,get:function(){return ii.merge}}),Object.defineProperty(_,"structuredPatch",{enumerable:!0,get:function(){return oi.structuredPatch}}),Object.defineProperty(_,"createTwoFilesPatch",{enumerable:!0,get:function(){return oi.createTwoFilesPatch}}),Object.defineProperty(_,"createPatch",{enumerable:!0,get:function(){return oi.createPatch}}),Object.defineProperty(_,"convertChangesToDMP",{enumerable:!0,get:function(){return si.convertChangesToDMP}}),Object.defineProperty(_,"convertChangesToXML",{enumerable:!0,get:function(){return ai.convertChangesToXML}}),Wn=(_=o)&&_.__esModule?_:{default:_},Jn=a,Kn=u,Zn=h,Qn=l,Xn=d,ei=g,ti=pn,ri=m,ni=bn,ii=y,oi=w,si=Rn,ai=ui;function li(e,t){t=t||{};var r=typeof e;if(!("string"==r&&0>18&63]+yi[n>>12&63]+yi[n>>6&63]+yi[63&n]);return i.join("")}function Ti(e){Ei||vi();for(var t,r=e.length,n=r%3,i="",o=[],s=0,a=r-n;s>2])+yi[t<<4&63]+"=="):2==n&&(t=(e[r-2]<<8)+e[r-1],i=(i=(i+=yi[t>>10])+yi[t>>4&63])+yi[t<<2&63]+"="),o.push(i),o.join("")}function Ai(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,p=r?-1:1,i=e[t+f];for(f+=p,o=i&(1<<-c)-1,i>>=-c,c+=a;0>=-c,c+=n;0>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,h=n?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-s))<1&&(s--,n*=2),2<=(t+=1<=s+c?f/n:f*Math.pow(2,1-c))*n&&(s++,n/=2),l<=s+c?(a=0,s=l):1<=s+c?(a=(t*n-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));8<=i;e[r+p]=255&a,p+=h,a/=256,i-=8);for(s=s<=Ri())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ri().toString(16)+" bytes");return 0|e}function Pi(e){return null!=e&&e._isBuffer}function Ii(e,t){if(Pi(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var r=(e="string"!=typeof e?""+e:e).length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Qi(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Xi(e).length;default:if(n)return Qi(e).length;t=(""+t).toLowerCase(),n=!0}}function Ui(e,t,r){var n,i=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,s=t,a=r,u=o.length;(!a||a<0||u=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(Pi(t="string"==typeof t?E.from(t,n):t))return 0===t.length?-1:Vi(e,t,r,n,i);if("number"==typeof t)return t&=255,E.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):Vi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Vi(e,t,r,n,i){var o=1,s=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s/=o=2,a/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var l=-1,c=r;c>8,n=n%256,i.push(n),i.push(r);return i}(t,e.length-r),e,r,n)}function Gi(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}var p=n,h=p.length;if(h<=Hi)return String.fromCharCode.apply(String,p);for(var d="",g=0;g"},E.prototype.compare=function(e,t,r,n,i){if(!Pi(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,s,a,u=!1;;)switch(n){case"hex":var l=this,c=e,f=t,p=r,h=(f=Number(f)||0,l.length-f);if((!p||h<(p=Number(p)))&&(p=h),(h=c.length)%2!=0)throw new TypeError("Invalid hex string");h/2e.length)throw new RangeError("Index out of range")}function Yi(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function $i(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Wi(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ji(e,t,r,n,i){return i||Wi(e,0,r,4),Si(e,t,r,n,23,4),r+4}function Ki(e,t,r,n,i){return i||Wi(e,0,r,8),Si(e,t,r,n,52,8),r+8}E.prototype.slice=function(e,t){var r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r>>8):Yi(this,e,t,!0),t+2},E.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,2,65535,0),E.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yi(this,e,t,!1),t+2},E.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,4,4294967295,0),E.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$i(this,e,t,!0),t+4},E.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,4,4294967295,0),E.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$i(this,e,t,!1),t+4},E.prototype.writeIntLE=function(e,t,r,n){e=+e,t|=0,n||zi(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},E.prototype.writeIntBE=function(e,t,r,n){e=+e,t|=0,n||zi(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,s=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},E.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,1,127,-128),E.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},E.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,2,32767,-32768),E.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yi(this,e,t,!0),t+2},E.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,2,32767,-32768),E.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yi(this,e,t,!1),t+2},E.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,4,2147483647,-2147483648),E.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$i(this,e,t,!0),t+4},E.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||zi(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),E.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$i(this,e,t,!1),t+4},E.prototype.writeFloatLE=function(e,t,r){return Ji(this,e,t,!0,r)},E.prototype.writeFloatBE=function(e,t,r){return Ji(this,e,t,!1,r)},E.prototype.writeDoubleLE=function(e,t,r){return Ki(this,e,t,!0,r)},E.prototype.writeDoubleBE=function(e,t,r){return Ki(this,e,t,!1,r)},E.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i,o=(n=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(a=t;a>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Xi(e){var t=function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(Zi,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e);Ei||vi();var r,e=t.length;if(0>16&255,i[s++]=r>>8&255,i[s++]=255&r;return 2==n?(r=bi[t.charCodeAt(a)]<<2|bi[t.charCodeAt(a+1)]>>4,i[s++]=255&r):1==n&&(r=bi[t.charCodeAt(a)]<<10|bi[t.charCodeAt(a+1)]<<4|bi[t.charCodeAt(a+2)]>>2,i[s++]=r>>8&255,i[s++]=255&r),i}function eo(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function to(e){return null!=e&&(!!e._isBuffer||ro(e)||"function"==typeof(e=e).readFloatLE&&"function"==typeof e.slice&&ro(e.slice(0,0)))}function ro(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}o={};var _={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(n,i=21)=>(e=i)=>{let t="",r=e;for(;r--;)t+=n[Math.random()*n.length|0];return t}},a={exports:{}},u=a,h=i;function no(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=(No(e,r)?e:t)[r];return n}function io(e,t){var r="";return 55296<=e&&e<=57343||1114111>>10&1023|55296),e=56320|1023&e),r+So(e))}function oo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function so(e){return"&#"+e+";"}function ao(e,t){function r(e){return s(e.charCodeAt(0))}(t=no(t,ao.options)).strict&&wo.test(e)&&xo("forbidden code point");var n=t.encodeEverything,i=t.useNamedReferences,o=t.allowUnsafeSymbols,s=t.decimal?so:oo;return n?(e=e.replace(fo,function(e){return i&&No(go,e)?"&"+go[e]+";":r(e)}),i&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(e=e.replace(ho,function(e){return"&"+go[e]+";"}))):i?e=(e=(e=o?e:e.replace(mo,function(e){return"&"+go[e]+";"})).replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(ho,function(e){return"&"+go[e]+";"}):o||(e=e.replace(mo,r)),e.replace(co,function(e){var t=e.charCodeAt(0),e=e.charCodeAt(1);return s(1024*(t-55296)+e-56320+65536)}).replace(po,r)}function uo(e,p){var h=(p=no(p,uo.options)).strict;return h&&bo.test(e)&&xo("malformed character reference"),e.replace(Eo,function(e,t,r,n,i,o,s,a,u){var l,c,f;return t?vo[f=t]:r?(f=r,(t=n)&&p.isAttributeValue?(h&&"="==t&&xo("`&` did not start a character reference"),e):(h&&xo("named character reference was not terminated by a semicolon"),_o[f]+(t||""))):i?(r=i,c=o,h&&!c&&xo("character reference was not terminated by a semicolon"),l=parseInt(r,10),io(l,h)):s?(n=s,c=a,h&&!c&&xo("character reference was not terminated by a semicolon"),l=parseInt(n,16),io(l,h)):(h&&xo("named character reference was not terminated by a semicolon"),e)})}var lo=a.exports,u=u.exports==lo&&u,l="object"==typeof i&&i,co=(l.global!==l&&l.window!==l||(h=l),/[\uD800-\uDBFF][\uDC00-\uDFFF]/g),fo=/[\x01-\x7F]/g,po=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ho=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,go={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},mo=/["&'<>`]/g,yo={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},bo=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,wo=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Eo=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,vo={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},_o={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},To={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},Ao=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],So=String.fromCharCode,Do={}.hasOwnProperty,No=function(e,t){return Do.call(e,t)},Ro=function(e,t){for(var r=-1,n=e.length;++r\s*(?:\{((?:.|\n)*?)\s*\}|((?:.|\n)*))$/,"$1$2$3")).match(/^\n?( *)/)[1].length,r=e.match(/^\n?(\t*)/)[1].length,r=new RegExp("^\n?"+(r?"\t":" ")+"{"+(r||t)+"}","gm");return(e=e.replace(r,"")).trim()};var Po=T.canonicalType=function(e){return void 0===e?"undefined":null===e?"null":to(e)?"buffer":Object.prototype.toString.call(e).replace(/^\[.+\s(.+?)]$/,"$1").toLowerCase()};function Io(e,r,n){if(void 0===r)return l(e);var t,i=r*(n=n||1),o=Array.isArray(e)?"[":"{",s=Array.isArray(e)?"]":"}",a=("number"==typeof e.length?e:Object.keys(e)).length;function u(e,t){return new Array(t).join(e)}function l(e){switch(Po(e)){case"null":case"undefined":e="["+e+"]";break;case"array":case"object":e=Io(e,r,n+1);break;case"boolean":case"regexp":case"symbol":case"number":e=0===e&&1/e==-1/0?"-0":e.toString();break;case"bigint":e=e.toString()+"n";break;case"date":e="[Date: "+(isNaN(e.getTime())?e.toString():e.toISOString())+"]";break;case"buffer":var t=e.toJSON();e="[Buffer: "+Io(t=t.data&&t.type?t.data:t,2,n+1)+"]";break;default:e="[Function]"===e||"[Circular]"===e?e:JSON.stringify(e)}return e}for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(--a,o+="\n "+u(" ",i)+(Array.isArray(e)?"":'"'+t+'": ')+l(e[t])+(a?",":""));return o+(1!==o.length?"\n"+u(" ",--i)+s:s)}T.type=function(e){if(null===e)return"null";const t=new Set(["undefined","boolean","number","string","bigint","symbol"]);var r=typeof e;return"function"==r||t.has(r)?r:e instanceof String?"string":e instanceof Error?"error":Array.isArray(e)?"array":r},T.stringify=function(e){var t,r,n=Po(e);if(!~["object","array","function"].indexOf(n)){if("buffer"===n)return Io((t=E.prototype.toJSON.call(e)).data&&t.type?t.data:t,2).replace(/,(\n|$)/g,"$1");if("string"!==n||"object"!=typeof e)return Io(e);e=e.split("").reduce(function(e,t,r){return e[r]=t,e},{}),n="object"}for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return Io(T.canonicalize(e,null,n),2).replace(/,(\n|$)/g,"$1");return Oo(e,n)},T.canonicalize=function(t,r,e){var n,i;function o(e,t){r.push(e),t(),r.pop()}if(e=e||Po(t),-1!==(r=r||[]).indexOf(t))return"[Circular]";switch(e){case"undefined":case"buffer":case"null":n=t;break;case"array":o(t,function(){n=t.map(function(e){return T.canonicalize(e,r)})});break;case"function":for(i in t){n={};break}if(!n){n=Oo(t,e);break}case"object":n=n||{},o(t,function(){Object.keys(t).sort().forEach(function(e){n[e]=T.canonicalize(t[e],r)})});break;case"date":case"number":case"regexp":case"boolean":case"symbol":n=t;break;default:n=t+""}return n},T.stackTraceFilter=function(){var n,i="undefined"==typeof document?{node:!0}:{browser:!0},o=Co.sep;return i.node?n=T.cwd()+o:(n=("undefined"==typeof location?window.location:location).href.replace(/\/[^/]*$/,"/"),o="/"),function(e){return(e=(e=e.split("\n")).reduce(function(e,t){return~(r=t).indexOf("node_modules"+o+"mocha"+o)||~r.indexOf(o+"mocha.js")||~r.indexOf(o+"mocha.min.js")||i.node&&(~(r=t).indexOf("(timers.js:")||~r.indexOf("(events.js:")||~r.indexOf("(node.js:")||~r.indexOf("(module.js:")||~r.indexOf("GeneratorFunctionPrototype.next (native)"))||(/:\d+:\d+\)?$/.test(t)&&(t=t.replace("("+n,"(")),e.push(t)),e;var r},[])).join("\n")}},T.isPromise=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.then},T.clamp=function(e,t){return Math.min(Math.max(e,t[0]),t[1])},T.noop=function(){},T.createMap=function(e){return Object.assign.apply(null,[Object.create(null)].concat(Array.prototype.slice.call(arguments)))},T.defineConstants=function(e){if("object"===Po(e)&&Object.keys(e).length)return Object.freeze(T.createMap(e));throw new TypeError("Invalid argument; expected a non-empty object")},T.cwd=function(){return c.cwd()},T.isBrowser=function(){return Boolean(!0)},T.castArray=function(e){return void 0===e?[]:null===e?[null]:"object"!=typeof e||"function"!=typeof e[Symbol.iterator]&&void 0===e.length?[e]:Array.from(e)},T.constants=T.defineConstants({MOCHA_ID_PROP_NAME:Dc}),T.uniqueID=()=>Sc(),T.assignNewMochaID=e=>{const t=T.uniqueID();return Object.defineProperty(e,Dc,{get(){return t}}),e},T.getMochaID=e=>e&&"object"==typeof e?e[Dc]:void 0}function Uo(e){this.message=e}var Fo=se(Object.freeze({__proto__:null,default:{}})),d={info:"ℹ️",success:"✅",warning:"⚠️",error:"❌️"},g=se(Z);function Bo(e,t){t=t||{};var r=typeof e;if(!("string"==r&&0{if("%%"===e)return"%";n++;const r=u.formatters[t];return"function"==typeof r&&(t=i[n],e=r.call(o,t),i.splice(n,1),n--),e}),u.formatArgs.call(o,i);const r=o.log||u.log;r.apply(o,i)}}return a.namespace=e,a.useColors=u.useColors(),a.color=u.selectColor(e),a.extend=i,a.destroy=u.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==t?t:(r!==u.namespaces&&(r=u.namespaces,n=u.enabled(e)),n),set:e=>{t=e}}),"function"==typeof u.init&&u.init(a),a}function i(e,t){const r=u(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((u.debug=u).default=u).coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},u.disable=function(){var e=[...u.names.map(r),...u.skips.map(r).map(e=>"-"+e)].join(",");return u.enable(""),e},u.enable=function(e){u.save(e),u.namespaces=e,u.names=[],u.skips=[];let t;const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t{u[e]=t[e]}),u.names=[],u.skips=[],u.formatters={},u.selectColor=function(t){let r=0;for(let e=0;e{"%%"!==e&&(t++,"%c"===e&&(r=t))}),e.splice(r,0,n)}},Wo.save=function(e){try{e?Wo.storage.setItem("debug",e):Wo.storage.removeItem("debug")}catch(e){}},Wo.load=function(){let e;try{e=Wo.storage.getItem("debug")}catch(e){}!e&&void 0!==c&&"env"in c&&(e=c.env.DEBUG);return e},Wo.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},Wo.storage=function(){try{return localStorage}catch(e){}}(),Wo.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),Wo.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],Wo.log=console.debug||console.log||(()=>{}),$o.exports=m(Wo);const Nc=$o.exports["formatters"];Nc.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}const Jo=te["format"],Ko=(e,t)=>{c.emitWarning?c.emitWarning(e,t):W(function(){console.warn(t+": "+e)})},Zo=e=>{(e=String(e))&&!Zo.cache[e]&&(Zo.cache[e]=!0,Ko(e,"DeprecationWarning"))};Zo.cache={};var A={FATAL:"ERR_MOCHA_FATAL",INVALID_ARG_TYPE:"ERR_MOCHA_INVALID_ARG_TYPE",INVALID_ARG_VALUE:"ERR_MOCHA_INVALID_ARG_VALUE",INVALID_EXCEPTION:"ERR_MOCHA_INVALID_EXCEPTION",INVALID_INTERFACE:"ERR_MOCHA_INVALID_INTERFACE",INVALID_REPORTER:"ERR_MOCHA_INVALID_REPORTER",MULTIPLE_DONE:"ERR_MOCHA_MULTIPLE_DONE",NO_FILES_MATCH_PATTERN:"ERR_MOCHA_NO_FILES_MATCH_PATTERN",UNSUPPORTED:"ERR_MOCHA_UNSUPPORTED",INSTANCE_ALREADY_RUNNING:"ERR_MOCHA_INSTANCE_ALREADY_RUNNING",INSTANCE_ALREADY_DISPOSED:"ERR_MOCHA_INSTANCE_ALREADY_DISPOSED",FORBIDDEN_EXCLUSIVITY:"ERR_MOCHA_FORBIDDEN_EXCLUSIVITY",INVALID_PLUGIN_IMPLEMENTATION:"ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION",INVALID_PLUGIN_DEFINITION:"ERR_MOCHA_INVALID_PLUGIN_DEFINITION",TIMEOUT:"ERR_MOCHA_TIMEOUT",UNPARSABLE_FILE:"ERR_MOCHA_UNPARSABLE_FILE"};const Qo=new Set(Object.values(A));function Xo(e,t){e=new TypeError(e);return e.code=A.INVALID_REPORTER,e.reporter=t,e}function es(e,t){e=new Error(e);return e.code=A.INVALID_INTERFACE,e.interface=t,e}function ts(e,t,r){e=new TypeError(e);return e.code=A.INVALID_ARG_TYPE,e.argument=t,e.expected=r,e.actual=typeof t,e}function rs(e,t,r){switch(t){case"reporter":return Xo(e,r);case"ui":return es(e,r);default:throw new Error('unknown pluginType "'+t+'"')}}var bn={constants:A,createFatalError:function(e,t){return(e=new Error(e)).code=A.FATAL,e.valueType=typeof t,e.value=t,e},createForbiddenExclusivityError:function(e){return(e=new Error(e.isWorker?"`.only` is not supported in parallel mode":"`.only` forbidden by --forbid-only")).code=A.FORBIDDEN_EXCLUSIVITY,e},createInvalidArgumentTypeError:ts,createInvalidArgumentValueError:function(e,t,r,n){return(e=new TypeError(e)).code=A.INVALID_ARG_VALUE,e.argument=t,e.value=r,e.reason=void 0!==n?n:"is invalid",e},createInvalidExceptionError:function(e,t){return(e=new Error(e)).code=A.INVALID_EXCEPTION,e.valueType=typeof t,e.value=t,e},createInvalidInterfaceError:es,createInvalidLegacyPluginError:rs,createInvalidPluginDefinitionError:function(e,t){const r=new Error(e);return r.code=A.INVALID_PLUGIN_DEFINITION,r.pluginDef=t,r},createInvalidPluginError:function(...e){return Zo("Use createInvalidLegacyPluginError() instead"),rs(...e)},createInvalidPluginImplementationError:function(e,{pluginDef:t,pluginImpl:r}={}){const n=new Error(e);return n.code=A.INVALID_PLUGIN_IMPLEMENTATION,n.pluginDef=t,n.pluginImpl=r,n},createInvalidReporterError:Xo,createMissingArgumentError:ts,createMochaInstanceAlreadyDisposedError:function(e,t,r){return(e=new Error(e)).code=A.INSTANCE_ALREADY_DISPOSED,e.cleanReferencesAfterRun=t,e.instance=r,e},createMochaInstanceAlreadyRunningError:function(e,t){return(e=new Error(e)).code=A.INSTANCE_ALREADY_RUNNING,e.instance=t,e},createMultipleDoneError:function(t,e){try{r=Jo("<%s>",t.fullTitle()),t.parent.root&&(r+=" (of root suite)")}catch(e){r=Jo("<%s> (of unknown suite)",t.title)}var r=Jo("done() called multiple times in %s %s",t.type||"unknown runnable",r);return t.file&&(r+=Jo(" of file %s",t.file)),e&&(r+=Jo("; in addition, done() received error: %s",e)),(t=new Error(r)).code=A.MULTIPLE_DONE,t.valueType=typeof e,t.value=e,t},createNoFilesMatchPatternError:function(e,t){return(e=new Error(e)).code=A.NO_FILES_MATCH_PATTERN,e.pattern=t,e},createTimeoutError:function(e,t,r){const n=new Error(e);return n.code=A.TIMEOUT,n.timeout=t,n.file=r,n},createUnparsableFileError:function(e,t){return(e=new Error(e)).code=A.UNPARSABLE_FILE,e},createUnsupportedError:function(e){return(e=new Error(e)).code=A.UNSUPPORTED,e},deprecate:Zo,isMochaError:e=>Boolean(e&&"object"==typeof e&&Qo.has(e.code)),warn:e=>{e&&Ko(e)}},y=g.EventEmitter,ns=Uo,is=pn.exports("mocha:runnable"),os=li,ss=o;const{createInvalidExceptionError:as,createMultipleDoneError:us,createTimeoutError:ls}=bn;var cs=i.Date,fs=i.setTimeout,ps=i.clearTimeout,hs=Object.prototype.toString,w=S;function S(e,t){this.title=e,this.fn=t,this.body=(t||"").toString(),this.async=t&&t.length,this.sync=!this.async,this._timeout=2e3,this._slow=75,this._retries=-1,ss.assignNewMochaID(this),Object.defineProperty(this,"id",{get(){return ss.getMochaID(this)}}),this.reset()}ss.inherits(S,y),S.prototype.reset=function(){this.timedOut=!1,this._currentRetry=0,this.pending=!1,delete this.state,delete this.err},S.prototype.timeout=function(e){if(!arguments.length)return this._timeout;"string"==typeof e&&(e=os(e));var t=[0,Math.pow(2,31)-1];return e=ss.clamp(e,t),this._timeout=e===t[0]||e===t[1]?0:e,is("timeout %d",this._timeout),this.timer&&this.resetTimeout(),this},S.prototype.slow=function(e){return arguments.length&&void 0!==e?("string"==typeof e&&(e=os(e)),is("slow %d",e),this._slow=e,this):this._slow},S.prototype.skip=function(){throw this.pending=!0,new ns("sync skip; aborting execution")},S.prototype.isPending=function(){return this.pending||this.parent&&this.parent.isPending()},S.prototype.isFailed=function(){return!this.isPending()&&this.state===ds.STATE_FAILED},S.prototype.isPassed=function(){return!this.isPending()&&this.state===ds.STATE_PASSED},S.prototype.retries=function(e){if(!arguments.length)return this._retries;this._retries=e},S.prototype.currentRetry=function(e){if(!arguments.length)return this._currentRetry;this._currentRetry=e},S.prototype.fullTitle=function(){return this.titlePath().join(" ")},S.prototype.titlePath=function(){return this.parent.titlePath().concat([this.title])},S.prototype.clearTimeout=function(){ps(this.timer)},S.prototype.resetTimeout=function(){var e=this,t=this.timeout();0!==t&&(this.clearTimeout(),this.timer=fs(function(){0!==e.timeout()&&(e.callback(e._timeoutError(t)),e.timedOut=!0)},t))},S.prototype.globals=function(e){if(!arguments.length)return this._allowedGlobals;this._allowedGlobals=e},S.prototype.run=function(n){var i,e,t,o=this,s=new cs,r=this.ctx,a=!1;if(this.isPending())return n();function u(e){var t,r=o.timeout();if(!o.timedOut){if(i)return t=e,void(a||(a=!0,o.emit("error",us(o,t))));o.clearTimeout(),o.duration=new cs-s,i=!0,!e&&o.duration>r&&0{if(Ms(e))N("trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:",e),this.uncaught(e);else{N("trapped unhandled rejection from (probably) user code; re-emitting on process"),this._removeEventListener(c,"unhandledRejection",this.unhandled);try{c.emit("unhandledRejection",e,t)}finally{this._addEventListener(c,"unhandledRejection",this.unhandled)}}}}}function Hs(e){return e instanceof Error||e&&"string"==typeof e.message}function zs(e){return new Error(`the ${Ds.canonicalType(e)} ${Us(e)} was thrown, throw an Error :)`)}x.immediately=i.setImmediate||W,x.prototype._addEventListener=function(e,t,r){if(N("_addEventListener(): adding for event %s; %d current listeners",t,e.listenerCount(t)),this._eventListeners.has(e)&&this._eventListeners.get(e).has(t)&&this._eventListeners.get(e).get(t).has(r))N("warning: tried to attach duplicate event listener for %s",t);else{e.on(t,r);const n=this._eventListeners.has(e)?this._eventListeners.get(e):new Map,i=n.has(t)?n.get(t):new Set;i.add(r),n.set(t,i),this._eventListeners.set(e,n)}},x.prototype._removeEventListener=function(e,t,r){if(e.removeListener(t,r),this._eventListeners.has(e)){const n=this._eventListeners.get(e);if(n.has(t)){const i=n.get(t);i.delete(r),i.size||n.delete(t)}n.size||this._eventListeners.delete(e)}else N("trying to remove listener for untracked object %s",e)},x.prototype.dispose=function(){this.removeAllListeners(),this._eventListeners.forEach((e,r)=>{e.forEach((e,t)=>{e.forEach(e=>{r.removeListener(t,e)})})}),this._eventListeners.clear()},x.prototype.grep=function(e,t){return N("grep(): setting to %s",e),this._grep=e,this._invert=t,this.total=this.grepTotal(this.suite),this},x.prototype.grepTotal=function(e){var t=this,r=0;return e.eachTest(function(e){e=t._grep.test(e.fullTitle());(e=t._invert?!e:e)&&r++}),r},x.prototype.globalProps=function(){for(var e=Object.keys(i),t=0;t`'${e}'`).join(", "),this.fail(e,new Error(n)))))},x.prototype.fail=function(e,t,r){if(r=!0===r,!e.isPending()||r){if(this.state===R.STATE_STOPPED){if(t.code===js.MULTIPLE_DONE)throw t;throw Vs("Test failed after root suite execution completed!",t)}++this.failures,N("total number of failures: %d",this.failures),e.state=qs,Hs(t)||(t=zs(t));try{t.stack=this.fullStackTrace||!t.stack?t.stack:Is(t.stack)}catch(e){}this.emit(R.EVENT_TEST_FAIL,e,t)}},x.prototype.hook=function(s,a){if(this._opts.dryRun)return a();var u=this.suite,l=u.getHooks(s),c=this;x.immediately(function(){!function r(n){var i=l[n];if(!i)return a();function o(e){var t;e.originalTitle=e.originalTitle||e.title,e.ctx&&e.ctx.currentTest?e.title=`${e.originalTitle} for "${e.ctx.currentTest.title}"`:(t=e.parent.title||(e.parent.root?"{root}":""),e.title=e.originalTitle+` in "${t}"`)}(c.currentRunnable=i).ctx.currentTest=s===ks?i.parent.tests[0]:s===Ls?i.parent.tests[i.parent.tests.length-1]:c.test,o(i),i.allowUncaught=c.allowUncaught,c.emit(R.EVENT_HOOK_BEGIN,i),i.listeners("error").length||c._addEventListener(i,"error",function(e){c.fail(i,e)}),i.run(function(e){var t=i.error();if(t&&c.fail(c.test,t),i.pending)if(s===xs)c.test&&(c.test.pending=!0);else{if(s===Rs)return c.test&&(c.test.pending=!0),c.emit(R.EVENT_HOOK_END,i),i.pending=!1,a(new Error("abort hookDown"));if(s!==ks)return i.pending=!1,t=Bs("`this.skip` forbidden"),c.fail(i,t),a(t);u.tests.forEach(function(e){e.pending=!0}),u.suites.forEach(function(e){e.pending=!0}),l=[]}else if(e)return c.fail(i,e),a(e);c.emit(R.EVENT_HOOK_END,i),delete i.ctx.currentTest,o(i),r(++n)})}(0)})},x.prototype.hooks=function(t,n,i){var o=this,s=this.suite;!function r(e){if(!(o.suite=e))return o.suite=s,i();o.hook(t,function(e){var t;if(e)return t=o.suite,o.suite=s,i(e,t);r(n.pop())})}(n.pop())},x.prototype.hookUp=function(e,t){var r=[this.suite].concat(this.parents()).reverse();this.hooks(e,r,t)},x.prototype.hookDown=function(e,t){var r=[this.suite].concat(this.parents());this.hooks(e,r,t)},x.prototype.parents=function(){for(var e=this.suite,t=[];e.parent;)e=e.parent,t.push(e);return t},x.prototype.runTest=function(t){if(this._opts.dryRun)return x.immediately(t);var r=this,n=this.test;if(n){if(this.asyncOnly&&(n.asyncOnly=!0),this._addEventListener(n,"error",function(e){r.fail(n,e)}),this.allowUncaught)return n.allowUncaught=!0,n.run(t);try{n.run(t)}catch(e){t(e)}}},x.prototype.runTests=function(r,i){var n,o=this,s=r.tests.slice();function a(e,r,t){var n=o.suite;o.suite=t?r.parent:r,o.suite?o.hookUp(xs,function(e,t){if(o.suite=n,e)return a(0,t,!0);i(r)}):(o.suite=n,i(r))}function u(e,t){if(o.failures&&r._bail&&(s=[]),o._abort)return i();if(e)return a(0,t,!0);if(!(n=s.shift()))return i();e=o._grep.test(n.fullTitle());if(e=o._invert?!e:e){if(n.isPending())return o.forbidPending?o.fail(n,new Error("Pending test forbidden"),!0):(n.state=Ps,o.emit(R.EVENT_TEST_PENDING,n)),o.emit(R.EVENT_TEST_END,n),u();o.emit(R.EVENT_TEST_BEGIN,o.test=n),o.hookDown(Rs,function(e,t){var r;return n.isPending()?(o.forbidPending?o.fail(n,new Error("Pending test forbidden"),!0):(n.state=Ps,o.emit(R.EVENT_TEST_PENDING,n)),o.emit(R.EVENT_TEST_END,n),r=o.suite,o.suite=t||o.suite,o.hookUp(xs,function(e,t){o.suite=r,u(e,t)})):e?a(0,t,!1):(o.currentRunnable=o.test,void o.runTest(function(e){return(n=o.test).pending?(o.forbidPending?o.fail(n,new Error("Pending test forbidden"),!0):(n.state=Ps,o.emit(R.EVENT_TEST_PENDING,n)),o.emit(R.EVENT_TEST_END,n),o.hookUp(xs,u)):e?((t=n.currentRetry()){!this.total&&this._opts.failZero&&(this.failures=1),N("run(): root suite completed; emitting %s",R.EVENT_RUN_END),this.emit(R.EVENT_RUN_END)},i=()=>{N("run(): emitting %s",R.EVENT_RUN_BEGIN),this.emit(R.EVENT_RUN_BEGIN),N("run(): emitted %s",R.EVENT_RUN_BEGIN),this.runSuite(r,n)};t=()=>(N("run(): starting"),r.hasOnly()&&(r.filterOnly(),N("run(): filtered exclusive Runnables")),this.state=R.STATE_RUNNING,this._opts.delay&&(this.emit(R.EVENT_DELAY_END),N('run(): "delay" ended')),i());return this._opts.cleanReferencesAfterRun&&this.on(R.EVENT_SUITE_END,e=>{e.cleanReferences()}),this.on(R.EVENT_RUN_END,function(){this.state=R.STATE_STOPPED,N("run(): emitted %s",R.EVENT_RUN_END),e(this.failures)}),this._removeEventListener(c,"uncaughtException",this.uncaught),this._removeEventListener(c,"unhandledRejection",this.unhandled),this._addEventListener(c,"uncaughtException",this.uncaught),this._addEventListener(c,"unhandledRejection",this.unhandled),this._opts.delay?(this.emit(R.EVENT_DELAY_BEGIN,r),r.once(Cs,t),N("run(): waiting for green light due to --delay")):x.immediately(t),this},x.prototype.linkPartialObjects=function(e){return this},x.prototype.runAsync=async function(t={}){return new Promise(e=>{this.run(e,t)})},x.prototype.abort=function(){return N("abort(): aborting"),this._abort=!0,this},x.prototype.isParallelMode=function(){return!1},x.prototype.workerReporter=function(){throw Bs("workerReporter() not supported in serial mode")},x.constants=R;var L,Ys,$s,Ws,Js,Ks,Zs,k,Qs,Xs,ea,m=x;function ta(e){Ws.isString(e.actual)&&Ws.isString(e.expected)||(e.actual=Ws.stringify(e.actual),e.expected=Ws.stringify(e.expected))}function ra(e,t){var r=this.failures=[];if(!e)throw new TypeError("Missing runner argument");this.options=t||{},this.runner=e,this.stats=e.stats;t=this.options.reporterOption&&this.options.reporterOption.maxDiffSize;void 0===t||isNaN(Number(t))||(L.maxDiffSize=Number(t)),e.on(Js,function(e){e.duration>e.slow()?e.speed="slow":e.duration>e.slow()/2?e.speed="medium":e.speed="fast"}),e.on(Ks,function(e,t){Qs(t)&&ta(t),e.err&&t instanceof Error?e.err.multiple=(e.err.multiple||[]).concat(t):e.err=t,r.push(e)})}function na(t,e){return e.split("\n").map(function(e){return k(t,e)}).join("\n")}L=(y=t).exports,Ys=Xr,$s=li,Ws=o,u=Fo,e=d,_=m.constants,Js=_.EVENT_TEST_PASS,Ks=_.EVENT_TEST_FAIL,_=Ws.isBrowser(),L=y.exports=ra,Zs=_||c.stdout.isTTY&&c.stderr.isTTY,y=console.log,L.useColors=!_&&(u.stdout||void 0!==c.env.MOCHA_COLORS),L.inlineDiffs=!1,L.maxDiffSize=8192,L.colors={pass:90,fail:31,"bright pass":92,"bright fail":91,"bright yellow":93,pending:36,suite:0,"error title":0,"error message":31,"error stack":90,checkmark:32,fast:90,medium:33,slow:31,green:32,light:90,"diff gutter":90,"diff added":32,"diff removed":31,"diff added inline":"30;42","diff removed inline":"30;41"},L.symbols={ok:e.success,err:e.error,dot:".",comma:",",bang:"!"},k=L.color=function(e,t){return L.useColors?"["+L.colors[e]+"m"+t+"":String(t)},L.window={width:75},Zs&&(L.window.width=_?("innerHeight"in i?[i.innerHeight,i.innerWidth]:[640,480])[1]:c.stdout.getWindowSize(1)[0]),L.cursor={hide:function(){Zs&&c.stdout.write("[?25l")},show:function(){Zs&&c.stdout.write("[?25h")},deleteLine:function(){Zs&&c.stdout.write("")},beginningOfLine:function(){Zs&&c.stdout.write("")},CR:function(){Zs?(L.cursor.deleteLine(),L.cursor.beginningOfLine()):c.stdout.write("\r")}},Qs=L.showDiff=function(e){return e&&!1!==e.showDiff&&(t=e.actual,r=e.expected,ea.call(t)===ea.call(r))&&void 0!==e.expected;var t,r},Xs=L.generateDiff=function(t,r){try{var n=L.maxDiffSize,i=0;0',n()),++r,fa.consoleLog("%s

%s

",n(),pa.escape(e.title)),fa.consoleLog("%s
",n()))}),e.on(ma,function(e){e.root||(fa.consoleLog("%s
",n()),--r,fa.consoleLog("%s",n()),--r)}),e.on(ha,function(e){fa.consoleLog("%s
%s
",n(),pa.escape(e.title)),fa.consoleLog("%s
%s
",n(),pa.escape(e.file));e=pa.escape(pa.clean(e.body));fa.consoleLog("%s
%s
",n(),e)}),e.on(da,function(e,t){fa.consoleLog('%s
%s
',n(),pa.escape(e.title)),fa.consoleLog('%s
%s
',n(),pa.escape(e.file));e=pa.escape(pa.clean(e.body));fa.consoleLog('%s
%s
',n(),e),fa.consoleLog('%s
%s
',n(),pa.escape(t))})}fa=t.exports,pa=o,a=m.constants,ha=a.EVENT_TEST_PASS,da=a.EVENT_TEST_FAIL,ga=a.EVENT_SUITE_BEGIN,ma=a.EVENT_SUITE_END,(Z.exports=ya).description="HTML documentation";var ba,wa,Ea,va,_a,Ta,Aa,Sa,Xr={exports:{}};function Da(e,t){ba.call(this,e,t);var r=this,n=1,i="12";t&&t.reporterOptions&&t.reporterOptions.tapVersion&&(i=t.reporterOptions.tapVersion.toString()),this._producer=function(e){var t={12:new La,13:new ka}[e];if(t)return t;throw new Error("invalid or unsupported TAP version: "+JSON.stringify(e))}(i),e.once(va,function(){r._producer.writeVersion()}),e.on(Aa,function(){++n}),e.on(Ta,function(e){r._producer.writePending(n,e)}),e.on(wa,function(e){r._producer.writePass(n,e)}),e.on(Ea,function(e,t){r._producer.writeFail(n,e,t)}),e.once(_a,function(){r._producer.writeEpilogue(e.stats)})}function Na(e){return e.fullTitle().replace(/#/g,"")}function Ra(){var e=Array.from(arguments);e[0]+="\n",c.stdout.write(Sa.apply(null,e))}function xa(){}function La(){this.writeFail=function(e,t,r){xa.prototype.writeFail.call(this,e,t,r),r.message&&Ra(r.message.replace(/^/gm," ")),r.stack&&Ra(r.stack.replace(/^/gm," "))}}function ka(){function n(e){return Array(e+1).join(" ")}this.writeVersion=function(){Ra("TAP version 13")},this.writeFail=function(e,t,r){xa.prototype.writeFail.call(this,e,t,r),null==r.message&&null==r.stack||(Ra(n(1)+"---"),r.message&&(Ra(n(2)+"message: |-"),Ra(r.message.replace(/^/gm,n(3)))),r.stack&&(Ra(n(2)+"stack: |-"),Ra(r.stack.replace(/^/gm,n(3)))),Ra(n(1)+"..."))}}ba=t.exports,d=m.constants,wa=d.EVENT_TEST_PASS,Ea=d.EVENT_TEST_FAIL,va=d.EVENT_RUN_BEGIN,_a=d.EVENT_RUN_END,Ta=d.EVENT_TEST_PENDING,Aa=d.EVENT_TEST_END,d=o.inherits,Sa=te.format,d(Xr.exports=Da,ba),xa.prototype.writeVersion=function(){},xa.prototype.writePlan=function(e){Ra("%d..%d",1,e)},xa.prototype.writePass=function(e,t){Ra("ok %d %s",e,Na(t))},xa.prototype.writePending=function(e,t){Ra("ok %d %s # SKIP -",e,Na(t))},xa.prototype.writeFail=function(e,t,r){Ra("not ok %d %s",e,Na(t))},xa.prototype.writeEpilogue=function(e){Ra("# tests "+(e.passes+e.failures)),Ra("# pass "+e.passes),Ra("# fail "+e.failures),this.writePlan(e.passes+e.failures+e.pending)},d(La,xa),d(ka,xa),Da.description="TAP-compatible output";u={exports:{}},e=se(Object.freeze({__proto__:null,default:{}}));{_=u;var Ca=t.exports,qa=e,Oa=X;const qc=bn.createUnsupportedError,Oc=o;var y,Pa=(y=m.constants).EVENT_TEST_PASS,Ia=y.EVENT_TEST_PENDING,Ua=y.EVENT_TEST_FAIL,Fa=y.EVENT_TEST_END,Ba=y.EVENT_RUN_END;function Va(e,t={}){Ca.call(this,e,t);var r,n=this,i=[],o=[],s=[],a=[];if(t.reporterOption&&t.reporterOption.output){if(Oc.isBrowser())throw qc("file output not supported in browser");r=t.reporterOption.output}e.on(Fa,function(e){i.push(e)}),e.on(Pa,function(e){a.push(e)}),e.on(Ua,function(e){s.push(e)}),e.on(Ia,function(e){o.push(e)}),e.once(Ba,function(){var t={stats:n.stats,tests:i.map(Ma),pending:o.map(Ma),failures:s.map(Ma),passes:a.map(Ma)},t=(e.testResults=t,JSON.stringify(t,null,2));if(r)try{qa.mkdirSync(Oa.dirname(r),{recursive:!0}),qa.writeFileSync(r,t)}catch(e){console.error(`${Ca.symbols.err} [mocha] writing output to "${r}" failed: ${e.message}\n`),c.stdout.write(t)}else c.stdout.write(t)})}function Ma(e){var t,r,n,i=e.err||{};return i instanceof Error&&(t=i,r={},Object.getOwnPropertyNames(t).forEach(function(e){r[e]=t[e]},t),i=r),{title:e.title,fullTitle:e.fullTitle(),file:e.file,duration:e.duration,currentRetry:e.currentRetry(),speed:e.speed,err:(e=i,n=[],JSON.parse(JSON.stringify(e,function(e,t){if("object"==typeof t&&null!==t){if(-1!==n.indexOf(t))return""+t;n.push(t)}return t})))}}(_.exports=Va).description="single JSON object"}var ja,Ga,Ha,za,Ya,$a,Wa,Ja,Ka,Za,Qa,Xa,eu,g={exports:{}},h=tu;function tu(){this.percent=0,this.size(0),this.fontSize(11),this.font("helvetica, arial, sans-serif")}function ru(t,e){ja.call(this,t,e);var r,n,i,o=this,s=this.stats,e=iu(Xa),a=e.getElementsByTagName("li"),u=a[1].getElementsByTagName("em")[0],l=a[1].getElementsByTagName("a")[0],c=a[2].getElementsByTagName("em")[0],f=a[2].getElementsByTagName("a")[0],p=a[3].getElementsByTagName("em")[0],a=e.getElementsByTagName("canvas")[0],h=iu('
    '),d=[h],g=document.getElementById("mocha");function m(e){d[0]&&d[0].appendChild(e)}function y(){var e=s.tests/t.total*100|0,e=(r&&r.update(e).draw(n),new Qa-s.start);au(u,s.passes),au(c,s.failures),au(p,(e/1e3).toFixed(2))}a.getContext&&(i=window.devicePixelRatio||1,a.style.width=a.width,a.style.height=a.height,a.width*=i,a.height*=i,(n=a.getContext("2d")).scale(i,i),r=new Ha),g?(uu(l,"click",function(e){e.preventDefault(),su();e=/pass/.test(h.className)?"":" pass";h.className=h.className.replace(/fail|pass/g,"")+e,h.className.trim()&&ou("test pass")}),uu(f,"click",function(e){e.preventDefault(),su();e=/fail/.test(h.className)?"":" fail";h.className=h.className.replace(/fail|pass/g,"")+e,h.className.trim()&&ou("test fail")}),g.appendChild(e),g.appendChild(h),r&&r.size(40),t.on(Wa,function(e){e.root||(e=iu('
  • %s

  • ',o.suiteURL(e),Za(e.title)),d[0].appendChild(e),d.unshift(document.createElement("ul")),e.appendChild(d[0]))}),t.on(Ja,function(e){e.root?y():d.shift()}),t.on(Ya,function(e){var t=o.testURL(e),t=iu('
  • %e%ems '+eu+"

  • ",e.speed,e.title,e.duration,t);o.addCodeToggle(t,e.body),m(t),y()}),t.on($a,function(e){var t,r=iu('
  • %e '+eu+"

  • ",e.title,o.testURL(e)),n=e.err.toString();"[object Error]"===n&&(n=e.err.message),e.err.stack?t=-1===(t=e.err.stack.indexOf(e.err.message))?e.err.stack:e.err.stack.slice(e.err.message.length+t):e.err.sourceURL&&void 0!==e.err.line&&(t="\n("+e.err.sourceURL+":"+e.err.line+")"),t=t||"",e.err.htmlMessage&&t?r.appendChild(iu('
    %s\n
    %e
    ',e.err.htmlMessage,t)):e.err.htmlMessage?r.appendChild(iu('
    %s
    ',e.err.htmlMessage)):r.appendChild(iu('
    %e%e
    ',n,t)),o.addCodeToggle(r,e.body),m(r),y()}),t.on(Ka,function(e){m(iu('
  • %e

  • ',e.title)),y()})):document.body.appendChild(iu('
    %s
    ',"#mocha div missing, add it to your document"))}function nu(e){var t=(t=window.location.search)&&t.replace(/[?&]grep=[^&\s]*/g,"").replace(/^&/,"?");return window.location.pathname+(t?t+"&":"?")+"grep="+encodeURIComponent(za(e))}function iu(e){var r=arguments,t=document.createElement("div"),n=1;return t.innerHTML=e.replace(/%([se])/g,function(e,t){switch(t){case"s":return String(r[n++]);case"e":return Za(r[n++])}}),t.firstChild}function ou(e){for(var t=document.getElementsByClassName("suite"),r=0;r
  • passes: 0
  • failures: 0
  • duration: 0s
  • ',eu="‣",(g.exports=ru).prototype.suiteURL=function(e){return nu(e.fullTitle())},ru.prototype.testURL=function(e){return nu(e.fullTitle())},ru.prototype.addCodeToggle=function(e,t){uu(e.getElementsByTagName("h2")[0],"click",function(){r.style.display="none"===r.style.display?"block":"none"});var r=iu("
    %e
    ",Ga.clean(t));e.appendChild(r),r.style.display="none"},ru.browserOnly=!0;var lu,cu,fu,pu,hu,du,gu,mu,yu,te={exports:{}};function bu(e,t){lu.call(this,e,t);var r=0;e.on(cu,function(){lu.consoleLog()}),e.on(pu,function(e){c.stdout.write(mu("pass"," "+e.fullTitle()+": "))}),e.on(gu,function(e){var t=mu("checkmark"," -")+mu("pending"," %s");lu.consoleLog(t,e.fullTitle())}),e.on(du,function(e){var t=mu("checkmark"," "+lu.symbols.ok)+mu("pass"," %s: ")+mu(e.speed,"%dms");yu.CR(),lu.consoleLog(t,e.fullTitle(),e.duration)}),e.on(hu,function(e){yu.CR(),lu.consoleLog(mu("fail"," %d) %s"),++r,e.fullTitle())}),e.once(fu,this.epilogue.bind(this))}lu=t.exports,d=o.inherits,y=m.constants,cu=y.EVENT_RUN_BEGIN,fu=y.EVENT_RUN_END,pu=y.EVENT_TEST_BEGIN,hu=y.EVENT_TEST_FAIL,du=y.EVENT_TEST_PASS,gu=y.EVENT_TEST_PENDING,mu=lu.color,yu=lu.cursor,d(te.exports=bu,lu),bu.description='like "spec" reporter but flat';var wu,Eu,vu,_={exports:{}};function _u(e,t){wu.call(this,e,t),e.on(vu,function(){c.stdout.write(""),c.stdout.write("")}),e.once(Eu,this.epilogue.bind(this))}wu=t.exports,h=o.inherits,a=m.constants,Eu=a.EVENT_RUN_END,vu=a.EVENT_RUN_BEGIN,h(_.exports=_u,wu),_u.description="essentially just a summary";var Tu,Au,Su,Du,Nu,Ru,xu,Lu,ku,y={exports:{}};function Cu(e,t){Tu.call(this,e,t);var r=0,n=0;function i(){return Array(r).join(" ")}e.on(Au,function(){Tu.consoleLog()}),e.on(Du,function(e){++r,Tu.consoleLog(ku("suite","%s%s"),i(),e.title)}),e.on(Nu,function(){1===--r&&Tu.consoleLog()}),e.on(Lu,function(e){var t=i()+ku("pending"," - %s");Tu.consoleLog(t,e.title)}),e.on(xu,function(e){var t;"fast"===e.speed?(t=i()+ku("checkmark"," "+Tu.symbols.ok)+ku("pass"," %s"),Tu.consoleLog(t,e.title)):(t=i()+ku("checkmark"," "+Tu.symbols.ok)+ku("pass"," %s")+ku(e.speed," (%dms)"),Tu.consoleLog(t,e.title,e.duration))}),e.on(Ru,function(e){Tu.consoleLog(i()+ku("fail"," %d) %s"),++n,e.title)}),e.once(Su,this.epilogue.bind(this))}Tu=t.exports,d=m.constants,Au=d.EVENT_RUN_BEGIN,Su=d.EVENT_RUN_END,Du=d.EVENT_SUITE_BEGIN,Nu=d.EVENT_SUITE_END,Ru=d.EVENT_TEST_FAIL,xu=d.EVENT_TEST_PASS,Lu=d.EVENT_TEST_PENDING,d=o.inherits,ku=Tu.color,d(y.exports=Cu,Tu),Cu.description="hierarchical & verbose [default]";var qu,Ou,Pu,Iu,Uu,Fu,a={exports:{}};function Bu(e,t){qu.call(this,e,t);var r=this,t=.75*qu.window.width|0;this.nyanCatWidth=11;this.colorIndex=0,this.numberOfLines=4,this.rainbowColors=r.generateColors(),this.scoreboardWidth=5,this.tick=0,this.trajectories=[[],[],[],[]],this.trajectoryWidthMax=t-11,e.on(Ou,function(){qu.cursor.hide(),r.draw()}),e.on(Pu,function(){r.draw()}),e.on(Iu,function(){r.draw()}),e.on(Fu,function(){r.draw()}),e.once(Uu,function(){qu.cursor.show();for(var e=0;e=this.trajectoryWidthMax&&n.shift(),n.push(t)}},Bu.prototype.drawRainbow=function(){var t=this;this.trajectories.forEach(function(e){C("["+t.scoreboardWidth+"C"),C(e.join("")),C("\n")}),this.cursorUp(this.numberOfLines)},Bu.prototype.drawNyanCat=function(){var e,t="["+(this.scoreboardWidth+this.trajectories[0].length)+"C",r=(C(t),C("_,------,"),C("\n"),C(t),C("_|"+(this.tick?" ":" ")+"/\\_/\\ "),C("\n"),C(t),e=this.tick?"_":"__",this.tick?"~":"^");C(r+"|"+e+this.face()+" "),C("\n"),C(t),C((this.tick?" ":" ")+'"" "" '),C("\n"),this.cursorUp(this.numberOfLines)},Bu.prototype.face=function(){var e=this.stats;return e.failures?"( x .x)":e.pending?"( o .o)":e.passes?"( ^ .^)":"( - .-)"},Bu.prototype.cursorUp=function(e){C("["+e+"A")},Bu.prototype.cursorDown=function(e){C("["+e+"B")},Bu.prototype.generateColors=function(){for(var e=[],t=0;t<42;t++){var r=Math.floor(Math.PI/3),n=t*(1/6),i=Math.floor(3*Math.sin(n)+3),o=Math.floor(3*Math.sin(n+2*r)+3),n=Math.floor(3*Math.sin(n+4*r)+3);e.push(36*i+6*o+n+16)}return e},Bu.prototype.rainbowify=function(e){if(!qu.useColors)return e;var t=this.rainbowColors[this.colorIndex%this.rainbowColors.length];return this.colorIndex+=1,"[38;5;"+t+"m"+e+""},Bu.description='"nyan cat"';var Vu,Mu,ju,Gu,Hu,zu,Yu,$u,Wu,Ju,Ku,h={exports:{}};function Zu(e,t){Vu.call(this,e,t);var r,n=this.stats,i=[],o=this;if(t&&t.reporterOptions){if(t.reporterOptions.output){if(!Mu.createWriteStream)throw Gu("file output not supported in browser");Mu.mkdirSync(ju.dirname(t.reporterOptions.output),{recursive:!0}),o.fileStream=Mu.createWriteStream(t.reporterOptions.output)}r=t.reporterOptions.suiteName}r=r||"Mocha Tests",e.on($u,function(e){i.push(e)}),e.on(Hu,function(e){i.push(e)}),e.on(zu,function(e){i.push(e)}),e.once(Yu,function(){o.write(Qu("testsuite",{name:r,tests:n.tests,failures:0,errors:n.failures,skipped:n.tests-n.failures-n.passes,timestamp:(new Ku).toUTCString(),time:n.duration/1e3||0},!1)),i.forEach(function(e){o.test(e)}),o.write("")})}function Qu(e,t,r,n){var i,o,r=r?"/>":">",s=[];for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&s.push(o+'="'+Ju(t[o])+'"');return i="<"+e+(s.length?" "+s.join(" "):"")+r,n&&(i+=n+"\n')+(t=e.title,Array(r).join("#")+" "+t+"\n")}),e.on(nl,function(){--r}),e.on(il,function(e){var t=el.clean(e.body);n=(n=n+(e.title+".\n")+"\n```js\n")+t+"\n```\n\n"}),e.once(tl,function(){c.stdout.write("# TOC\n"),c.stdout.write(i(e.suite)),c.stdout.write(n)})}Xu=t.exports,el=o,d=m.constants,tl=d.EVENT_RUN_END,rl=d.EVENT_SUITE_BEGIN,nl=d.EVENT_SUITE_END,il=d.EVENT_TEST_PASS,(e.exports=ol).description="GitHub Flavored Markdown";var sl,al,ul,ll,cl,fl,d={exports:{}};function pl(e,r){sl.call(this,e,r);var t=this,n=.5*sl.window.width|0,i=e.total,o=0,s=-1,a=(r=r||{}).reporterOptions||{};r.open=a.open||"[",r.complete=a.complete||"▬",r.incomplete=a.incomplete||sl.symbols.dot,r.close=a.close||"]",r.verbose=a.verbose||!1,e.on(al,function(){c.stdout.write("\n"),fl.hide()}),e.on(ul,function(){var e=n*(++o/i)|0,t=n-e;e===s&&!r.verbose||(s=e,fl.CR(),c.stdout.write(""),c.stdout.write(cl("progress"," "+r.open)),c.stdout.write(Array(e).join(r.complete)),c.stdout.write(Array(t).join(r.incomplete)),c.stdout.write(cl("progress",r.close)),r.verbose&&c.stdout.write(cl("progress"," "+o+" of "+i)))}),e.once(ll,function(){fl.show(),c.stdout.write("\n"),t.epilogue()})}sl=t.exports,El=m.constants,al=El.EVENT_RUN_BEGIN,ul=El.EVENT_TEST_END,ll=El.EVENT_RUN_END,El=o.inherits,cl=sl.color,fl=sl.cursor,d.exports=pl,sl.colors.progress=90,El(pl,sl),pl.description="a progress bar";var hl,dl,gl,ml,yl,bl,wl,El={exports:{}};function vl(e,t){hl.call(this,e,t);var r=this,n=.75*hl.window.width|0,i=c.stdout,o=wl("plane","✈"),s=-1,a=0,u=0;function l(){var e=Array(n).join("-");return" "+wl("runway",e)}e.on(dl,function(){i.write("\n\n\n "),bl.hide()}),e.on(ml,function(e){var t=-1===s?n*++a/++u|0:s;e.state===yl&&(o=wl("plane crash","✈"),s=t),i.write("["+(n+1)+"D"),i.write(l()),i.write("\n "),i.write(wl("runway",Array(t).join("⋅"))),i.write(o),i.write(wl("runway",Array(n-t).join("⋅")+"\n")),i.write(l()),i.write("")}),e.once(gl,function(){bl.show(),c.stdout.write("\n"),r.epilogue()}),c.once("SIGINT",function(){bl.show(),W(function(){c.kill(c.pid,"SIGINT")})})}hl=t.exports,q=o.inherits,Nl=m.constants,dl=Nl.EVENT_RUN_BEGIN,gl=Nl.EVENT_RUN_END,ml=Nl.EVENT_TEST_END,yl=w.constants.STATE_FAILED,bl=hl.cursor,wl=hl.color,El.exports=vl,hl.colors.plane=0,hl.colors["plane crash"]=31,hl.colors.runway=90,q(vl,hl),vl.description="Unicode landing strip";var _l,Tl,Al,Sl,Dl,q,Nl={exports:{}};function Rl(e,t){_l.call(this,e,t);var r=this,n=e.total;e.once(Sl,function(){xl(["start",{total:n}])}),e.on(Tl,function(e){xl(["pass",Ll(e)])}),e.on(Al,function(e,t){(e=Ll(e)).err=t.message,e.stack=t.stack||null,xl(["fail",e])}),e.once(Dl,function(){xl(["end",r.stats])})}function xl(e){c.stdout.write(JSON.stringify(e)+"\n")}function Ll(e){return{title:e.title,fullTitle:e.fullTitle(),file:e.file,duration:e.duration,currentRetry:e.currentRetry(),speed:e.speed}}_l=t.exports,q=m.constants,Tl=q.EVENT_TEST_PASS,Al=q.EVENT_TEST_FAIL,Sl=q.EVENT_RUN_BEGIN,Dl=q.EVENT_RUN_END,(Nl.exports=Rl).description="newline delimited JSON events",(q=ee).Base=q.base=t.exports,q.Dot=q.dot=l.exports,q.Doc=q.doc=Z.exports,q.TAP=q.tap=Xr.exports,q.JSON=q.json=u.exports,q.HTML=q.html=g.exports,q.List=q.list=te.exports,q.Min=q.min=_.exports,q.Spec=q.spec=y.exports,q.Nyan=q.nyan=a.exports,q.XUnit=q.xunit=h.exports,q.Markdown=q.markdown=e.exports,q.Progress=q.progress=d.exports,q.Landing=q.landing=El.exports,q.JSONStream=q["json-stream"]=Nl.exports;var t={diff:!0,extension:["js","cjs","mjs"],package:"./package.json",reporter:"spec",slow:75,timeout:2e3,ui:"bdd","watch-ignore":["node_modules",".git"]},l=m.constants,kl=l.EVENT_TEST_PASS,Cl=l.EVENT_TEST_FAIL,ql=l.EVENT_SUITE_BEGIN,Ol=l.EVENT_RUN_BEGIN,Pl=l.EVENT_TEST_PENDING,Il=l.EVENT_RUN_END,Ul=l.EVENT_TEST_END,Fl=i.Date;function Bl(e){var t={suites:0,tests:0,passes:0,pending:0,failures:0};if(!e)throw new TypeError("Missing runner argument");e.stats=t,e.once(Ol,function(){t.start=new Fl}),e.on(ql,function(e){e.root||t.suites++}),e.on(kl,function(){t.passes++}),e.on(Cl,function(){t.failures++}),e.on(Pl,function(){t.pending++}),e.on(Ul,function(){t.tests++}),e.once(Il,function(){t.end=new Fl,t.duration=t.end-t.start})}var Z={},Xr={exports:{}},Vl=w,u=o,Ml=bn.createInvalidArgumentTypeError,jl=u.isString;const Gl=u.constants["MOCHA_ID_PROP_NAME"];g=Hl;function Hl(e,t){if(!jl(e))throw Ml('Test argument "title" should be a string. Received type "'+typeof e+'"',"title","string");this.type="test",Vl.call(this,e,t),this.reset()}u.inherits(Hl,Vl),Hl.prototype.reset=function(){Vl.prototype.reset.call(this),this.pending=!this.fn,delete this.state},Hl.prototype.retriedTest=function(e){if(!arguments.length)return this._retriedTest;this._retriedTest=e},Hl.prototype.markOnly=function(){this.parent.appendOnlyTest(this)},Hl.prototype.clone=function(){var e=new Hl(this.title,this.fn);return e.timeout(this.timeout()),e.slow(this.slow()),e.retries(this.retries()),e.currentRetry(this.currentRetry()),e.retriedTest(this.retriedTest()||this),e.globals(this.globals()),e.parent=this.parent,e.file=this.file,e.ctx=this.ctx,e},Hl.prototype.serialize=function(){return{$$currentRetry:this._currentRetry,$$fullTitle:this.fullTitle(),$$isPending:Boolean(this.pending),$$retriedTest:this._retriedTest||null,$$slow:this._slow,$$titlePath:this.titlePath(),body:this.body,duration:this.duration,err:this.err,parent:{$$fullTitle:this.parent.fullTitle(),[Gl]:this.parent.id},speed:this.speed,state:this.state,title:this.title,type:this.type,file:this.file,[Gl]:this.id}};function zl(n,t,i){return{runWithSuite:function(e){return function(){e.run()}},before:function(e,t){n[0].beforeAll(e,t)},after:function(e,t){n[0].afterAll(e,t)},beforeEach:function(e,t){n[0].beforeEach(e,t)},afterEach:function(e,t){n[0].afterEach(e,t)},suite:{only:function(e){if(i.options.forbidOnly)throw Jl(i);return e.isOnly=!0,this.create(e)},skip:function(e){return e.pending=!0,this.create(e)},create:function(e){var t,r=Yl.create(n[0],e.title);if(r.pending=Boolean(e.pending),r.file=e.file,n.unshift(r),e.isOnly&&r.markOnly(),r.pending&&i.options.forbidPending&&(t=r,!i.options.grep||i.options.grep&&i.options.grep.test(t.fullTitle())&&!i.options.invert))throw Wl("Pending test forbidden");if("function"==typeof e.fn)e.fn.call(r),n.shift();else{if(void 0===e.fn&&!r.pending)throw $l('Suite "'+r.fullTitle()+'" was defined but no callback was supplied. Supply a callback or explicitly skip the suite.',"callback","function");!e.fn&&r.pending&&n.shift()}return r}},test:{only:function(e,t){if(e.options.forbidOnly)throw Jl(e);return t.markOnly(),t},skip:function(e){t.test(e)}}}}var Yl=Rn.exports,$l=bn.createMissingArgumentError,Wl=bn.createUnsupportedError,Jl=bn.createForbiddenExclusivityError,Kl=g,Zl=Rn.exports.constants.EVENT_FILE_PRE_REQUIRE,te=(Xr.exports=function(e){var s=[e];e.on(Zl,function(r,n,i){var o=zl(s,r,i);r.before=o.before,r.after=o.after,r.beforeEach=o.beforeEach,r.afterEach=o.afterEach,r.run=i.options.delay&&o.runWithSuite(e),r.describe=r.context=function(e,t){return o.suite.create({title:e,file:n,fn:t})},r.xdescribe=r.xcontext=r.describe.skip=function(e,t){return o.suite.skip({title:e,file:n,fn:t})},r.describe.only=function(e,t){return o.suite.only({title:e,file:n,fn:t})},r.it=r.specify=function(e,t){var r=s[0],e=(r.isPending()&&(t=null),new Kl(e,t));return e.file=n,r.addTest(e),e},r.it.only=function(e,t){return o.test.only(i,r.it(e,t))},r.xit=r.xspecify=r.it.skip=function(e){return r.it(e)}})},Xr.exports.description="BDD or RSpec style [default]",{exports:{}}),Ql=g,Xl=Rn.exports.constants.EVENT_FILE_PRE_REQUIRE,_=(te.exports=function(e){var s=[e];e.on(Xl,function(r,n,i){var o=zl(s,r,i);r.setup=o.beforeEach,r.teardown=o.afterEach,r.suiteSetup=o.before,r.suiteTeardown=o.after,r.run=i.options.delay&&o.runWithSuite(e),r.suite=function(e,t){return o.suite.create({title:e,file:n,fn:t})},r.suite.skip=function(e,t){return o.suite.skip({title:e,file:n,fn:t})},r.suite.only=function(e,t){return o.suite.only({title:e,file:n,fn:t})},r.test=function(e,t){var r=s[0],e=(r.isPending()&&(t=null),new Ql(e,t));return e.file=n,r.addTest(e),e},r.test.only=function(e,t){return o.test.only(i,r.test(e,t))},r.test.skip=o.test.skip})},te.exports.description='traditional "suite"/"test" instead of BDD\'s "describe"/"it"',{exports:{}}),ec=g,tc=Rn.exports.constants.EVENT_FILE_PRE_REQUIRE,y=(_.exports=function(e){var s=[e];e.on(tc,function(r,n,i){var o=zl(s,r,i);r.before=o.before,r.after=o.after,r.beforeEach=o.beforeEach,r.afterEach=o.afterEach,r.run=i.options.delay&&o.runWithSuite(e),r.suite=function(e){return 1{var t=this.options.enableGlobalSetup&&this.hasGlobalSetupFixtures()?await this.runGlobalSetup(e):{},r=await e.runAsync({files:this.files,options:n});return this.options.enableGlobalTeardown&&this.hasGlobalTeardownFixtures()&&await this.runGlobalTeardown(e,{context:t}),r})(r).then(e=>{this._previousRunner=r,this._state=this._cleanReferencesAfterRun?hc.REFERENCES_CLEANED:hc.INIT,t=t||uc.noop,"function"==typeof i.done?i.done(e,t):t(e)}),r},P.prototype.rootHooks=function({beforeAll:e=[],beforeEach:t=[],afterAll:r=[],afterEach:n=[]}={}){return e=uc.castArray(e),t=uc.castArray(t),r=uc.castArray(r),n=uc.castArray(n),e.forEach(e=>{this.suite.beforeAll(e)}),t.forEach(e=>{this.suite.beforeEach(e)}),r.forEach(e=>{this.suite.afterAll(e)}),n.forEach(e=>{this.suite.afterEach(e)}),this},P.prototype.parallelMode=function(e=!0){if(uc.isBrowser())throw Bc("parallel mode is only supported in Node.js");e=Boolean(e);if(e===this.options.parallel&&this._lazyLoadFiles&&this._runnerClass!==O.Runner)return this;if(this._state!==hc.INIT)throw Bc("cannot change parallel mode after having called run()");return this.options.parallel=e,this._runnerClass=e?Fo:O.Runner,this.lazyLoadFiles(this._lazyLoadFiles||e)},P.prototype.lazyLoadFiles=function(e){return this._lazyLoadFiles=!0===e,pc("set lazy load to %s",e),this},P.prototype.globalSetup=function(e=[]){return e=uc.castArray(e),this.options.globalSetup=e,pc("configured %d global setup functions",e.length),this},P.prototype.globalTeardown=function(e=[]){return e=uc.castArray(e),this.options.globalTeardown=e,pc("configured %d global teardown functions",e.length),this},P.prototype.runGlobalSetup=async function(e={}){var t=this.options["globalSetup"];return t&&t.length&&(pc("run(): global setup starting"),await this._runGlobalFixtures(t,e),pc("run(): global setup complete")),e},P.prototype.runGlobalTeardown=async function(e={}){var t=this.options["globalTeardown"];return t&&t.length&&(pc("run(): global teardown starting"),await this._runGlobalFixtures(t,e)),pc("run(): global teardown complete"),e},P.prototype._runGlobalFixtures=async function(e=[],t={}){for await(const r of e)await r.call(t);return t},P.prototype.enableGlobalSetup=function(e=!0){return this.options.enableGlobalSetup=Boolean(e),this},P.prototype.enableGlobalTeardown=function(e=!0){return this.options.enableGlobalTeardown=Boolean(e),this},P.prototype.hasGlobalSetupFixtures=function(){return Boolean(this.options.globalSetup.length)},P.prototype.hasGlobalTeardownFixtures=function(){return Boolean(this.options.globalTeardown.length)}}c.stdout=re({label:!1});var dc,gc=function(e){return e.replace("?","").split("&").reduce(function(e,t){var r=t.indexOf("="),n=t.slice(0,r),t=t.slice(++r);return e[n]=decodeURIComponent(t.replace(/\+/g,"%20")),e},{})},mc=function(e){for(var t=document.getElementById("mocha").getElementsByTagName(e),r=0,n=t.length;r/g,">").replace(/\/\/(.*)/gm,'//$1').replace(/('.*?')/gm,'$1').replace(/(\d+\.\d+)/gm,'$1').replace(/(\d+)/gm,'$1').replace(/\bnew[ \t]+(\w+)/gm,'new $1').replace(/\b(function|new|throw|return|var|if|else)\b/gm,'$1')},yc=ht.exports,bc=new yc({reporter:"html"}),wc=i.Date,Ec=i.setTimeout,vc=(i.setInterval,i.clearTimeout,i.clearInterval,[]),_c=i.onerror,Tc=(c.removeListener=function(e,t){"uncaughtException"===e&&(i.onerror=_c||function(){},-1!==(e=vc.indexOf(t))&&vc.splice(e,1))},c.listenerCount=function(e){return"uncaughtException"===e?vc.length:0},c.on=function(e,n){"uncaughtException"===e&&(i.onerror=function(e,t,r){return n(new Error(e+" ("+t+":"+r+")")),!bc.options.allowUncaught},vc.push(n))},c.listeners=function(e){return"uncaughtException"===e?vc:[]},bc.suite.removeAllListeners("pre-require"),[]);function Ac(){for(var e=(new wc).getTime();Tc.length&&(new wc).getTime()-e<100;)Tc.shift()();dc=Tc.length?Ec(Ac,0):null}return yc.Runner.immediately=function(e){Tc.push(e),dc=dc||Ec(Ac,0)},bc.throwError=function(t){throw vc.forEach(function(e){e(t)}),t},bc.ui=function(e){return yc.prototype.ui.call(this,e),this.suite.emit("pre-require",i,null,this),this},bc.setup=function(t){!0===(t="string"==typeof t?{ui:t}:t).delay&&this.delay();var r=this;return Object.keys(t).filter(function(e){return"delay"!==e}).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)&&r[e](t[e])}),this},bc.run=function(r){var n=bc.options,e=(bc.globals("location"),gc(i.location.search||""));return e.grep&&bc.grep(e.grep),e.fgrep&&bc.fgrep(e.fgrep),e.invert&&bc.invert(),yc.prototype.run.call(bc,function(e){var t=i.document;t&&t.getElementById("mocha")&&!0!==n.noHighlighting&&mc("code"),r&&r(e)})},yc.process=c,i.Mocha=yc,i.mocha=bc,["describe","context","it","specify","xdescribe","xcontext","xit","xspecify","before","beforeEach","afterEach","after"].forEach(function(e){bc[e]=i[e]}),bc}); \ No newline at end of file diff --git a/packages/platform/test/deno/base.test.mjs b/packages/platform/test/deno/base.test.mjs new file mode 100644 index 000000000..76746046f --- /dev/null +++ b/packages/platform/test/deno/base.test.mjs @@ -0,0 +1,32 @@ +import { dirname as pathDirname, fromFileUrl } from "https://deno.land/std/path/mod.ts"; +import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; +import { getDirname, getFilename } from '../../mod.ts'; + +export const esmFilename = () => { + const __filename = fromFileUrl(import.meta.url); + return __filename; +}; + +export const esmDirname = () => { + return pathDirname(esmFilename()); +}; + +Deno.test("Deno getDirname", () => { + const crossDirname = getDirname(); + const _esmDirname = esmDirname(); + + console.log("Deno"); + console.log(`\tgetDirname() \t-> "${crossDirname}"`); + console.log(`\tesmDirname() \t-> "${_esmDirname}"`); + assertEquals(crossDirname, _esmDirname); +}); + +Deno.test("Deno getFilename", () => { + const crossFilename = getFilename(); + const _esmFilename = esmFilename(); + + console.log("Deno"); + console.log(`\tgetFilename() \t-> "${crossFilename}"`); + console.log(`\tesmFilename() \t-> "${_esmFilename}"`); + assertEquals(crossFilename, _esmFilename); +}); \ No newline at end of file diff --git a/packages/platform/test/gjs/base.test.mjs b/packages/platform/test/gjs/base.test.mjs new file mode 100644 index 000000000..6f6c58ea0 --- /dev/null +++ b/packages/platform/test/gjs/base.test.mjs @@ -0,0 +1,72 @@ +import GLib from 'gi://GLib'; +import { getDirname, getFilename } from '../../dist/esm/index.js'; +import { exit } from 'system'; +const byteArray = imports.byteArray; + +const RED = "\x1b[31m"; +const GREEN = "\x1b[32m"; +const RESET = "\x1b[0m"; + +const crossDirname = getDirname(); +const crossFilename = getFilename(); + +const getOriginalDirname = () => { + const rootDir = crossDirname; + let [res, out, err, status] = GLib.spawn_command_line_sync(`node ${rootDir}/get-original-dirname.js`); + err = err ? byteArray.toString(err) : err; + const __dirname = out ? byteArray.toString(out).trim() : undefined; + if (err) { + console.error(err); + } + return __dirname; +} + +const getOriginalFilename = () => { + return getOriginalDirname() + '/base.test.mjs'; +} + +let passing = 0; +let failed = 0; + +/////////// __dirname /////////// +{ + const __dirname = getOriginalDirname(); + + print("GJS"); + print(`\tgetDirname() \t-> "${crossDirname}"`); + print(`\t__dirname \t-> "${__dirname}"`); + + if (crossDirname === __dirname) { + print(`${GREEN}✔${RESET} getDirname() should return the same string as __dirname\n`) + passing++; + } else { + print(`${RED}failed${RESET}\n`); + failed++; + } +} + +/////////// __filename /////////// +{ + const __filename = getOriginalFilename(); + + print(`\tgetFilename() \t-> "${crossFilename}"`); + print(`\t__filename \t-> "${__filename}"`); + + if (crossFilename === __filename) { + print(`${GREEN}✔${RESET} getFilename() should return the same string as __filename\n`) + passing++; + } else { + print(`${RED}failed${RESET}\n`); + failed++; + } +} + +/////////// REPORT /////////// + +print(`${GREEN}${passing} passing${RESET}`); +print(`${failed > 0 ? RED : RESET}${failed} failed${RESET}`); + + +if(failed > 0) { + exit(1); +} \ No newline at end of file diff --git a/packages/platform/test/gjs/get-original-dirname.js b/packages/platform/test/gjs/get-original-dirname.js new file mode 100644 index 000000000..aba6a4714 --- /dev/null +++ b/packages/platform/test/gjs/get-original-dirname.js @@ -0,0 +1 @@ +console.log(__dirname); \ No newline at end of file diff --git a/packages/platform/test/node/base.test.cjs b/packages/platform/test/node/base.test.cjs new file mode 100644 index 000000000..2973b2acf --- /dev/null +++ b/packages/platform/test/node/base.test.cjs @@ -0,0 +1,16 @@ +const { getDirname, getFilename } = require('../../dist/cjs/index.js'); +const { expect } = require('chai'); + +describe('Node.js CJS', () => { + it('getDirname() should return the same string as __dirname', function () { + console.debug("\tgetDirname() \t->", getDirname()); + console.debug("\t__dirname \t->", __dirname); + expect(getDirname()).to.equal(__dirname); + }); + + it('getFilename() should return the same string as __filename', function () { + console.debug("\tgetFilename() \t->", getFilename()); + console.debug("\__filename \t->", __filename); + expect(getFilename()).to.equal(__filename); + }); +}); diff --git a/packages/platform/test/node/base.test.mjs b/packages/platform/test/node/base.test.mjs new file mode 100644 index 000000000..0351c3b37 --- /dev/null +++ b/packages/platform/test/node/base.test.mjs @@ -0,0 +1,27 @@ +import { getDirname, getFilename } from '../../dist/esm/index.js'; +import { fileURLToPath } from "url"; +import { dirname as pathDirname } from "path"; +import { expect } from 'chai'; + +export const esmFilename = () => { + const __filename = fileURLToPath(import.meta.url); + return __filename; +}; + +export const esmDirname = () => { + return pathDirname(esmFilename()); +}; + +describe('Node.js ESM', () => { + it('getDirname() should return the same string as esmDirname', function () { + console.debug("\tgetDirname() \t->", getDirname()); + console.debug("\tesmDirname() \t->", esmDirname()); + expect(getDirname()).to.equal(esmDirname(import.meta)); + }); + + it('getFilename() should return the same string as esmFilename', function () { + console.debug("\tgetFilename() \t->", getFilename()); + console.debug("\tesmFilename() \t->", esmFilename()); + expect(getFilename()).to.equal(esmFilename(import.meta)); + }); +}); diff --git a/packages/platform/tsconfig.esm.json b/packages/platform/tsconfig.esm.json new file mode 100644 index 000000000..ffac6ec56 --- /dev/null +++ b/packages/platform/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./dist/esm", + "module": "ES2020" + }, + "references": [] +} \ No newline at end of file diff --git a/packages/platform/tsconfig.json b/packages/platform/tsconfig.json new file mode 100644 index 000000000..3cf5412b2 --- /dev/null +++ b/packages/platform/tsconfig.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "moduleResolution": "node", + "target": "es2018", + "module": "CommonJS", + "esModuleInterop": true, + "outDir": "./dist/cjs", + "declaration": true, + "composite": true + }, + "include": [ + "src", + "index.ts" + ], + "references": [] +} \ No newline at end of file diff --git a/packages/postgres/index.ts b/packages/postgres/index.ts index f82d90288..5ab17f9f9 100644 --- a/packages/postgres/index.ts +++ b/packages/postgres/index.ts @@ -8,4 +8,4 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/postgres-adapter'; +export * from './src/postgres-adapter.js'; diff --git a/packages/postgres/package.json b/packages/postgres/package.json index a32ae597b..69e672ca5 100644 --- a/packages/postgres/package.json +++ b/packages/postgres/package.json @@ -44,7 +44,10 @@ "@deepkit/type": "^1.0.1-alpha.75", "@types/sqlstring": "^2.2.1" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/postgres/src/postgres-adapter.ts b/packages/postgres/src/postgres-adapter.ts index 41f9cddee..80e7dfe27 100644 --- a/packages/postgres/src/postgres-adapter.ts +++ b/packages/postgres/src/postgres-adapter.ts @@ -22,7 +22,7 @@ import { SQLStatement } from '@deepkit/sql'; import { DatabaseLogger, DatabasePersistenceChangeSet, DatabaseSession, DatabaseTransaction, DeleteResult, OrmEntity, PatchResult, UniqueConstraintFailure } from '@deepkit/orm'; -import { PostgresPlatform } from './postgres-platform'; +import { PostgresPlatform } from './postgres-platform.js'; import type { Pool, PoolClient, PoolConfig } from 'pg'; import pg from 'pg'; import { AbstractClassType, asyncOperation, ClassType, empty } from '@deepkit/core'; diff --git a/packages/postgres/src/postgres-platform.ts b/packages/postgres/src/postgres-platform.ts index d688cb58b..15b6cbb34 100644 --- a/packages/postgres/src/postgres-platform.ts +++ b/packages/postgres/src/postgres-platform.ts @@ -9,10 +9,10 @@ */ import { Column, DefaultPlatform, IndexModel, isSet, SqlPlaceholderStrategy, Table } from '@deepkit/sql'; -import { postgresSerializer } from './postgres-serializer'; +import { postgresSerializer } from './postgres-serializer.js'; import { isUUIDType, ReflectionClass, ReflectionKind, ReflectionProperty, Serializer, TypeNumberBrand } from '@deepkit/type'; -import { PostgresSchemaParser } from './postgres-schema-parser'; -import { PostgreSQLFilterBuilder } from './sql-filter-builder'; +import { PostgresSchemaParser } from './postgres-schema-parser.js'; +import { PostgreSQLFilterBuilder } from './sql-filter-builder.js'; import { isArray, isObject } from '@deepkit/core'; import sqlstring from 'sqlstring'; diff --git a/packages/postgres/tests/factory.ts b/packages/postgres/tests/factory.ts index 1ff704c05..795875ef2 100644 --- a/packages/postgres/tests/factory.ts +++ b/packages/postgres/tests/factory.ts @@ -1,6 +1,6 @@ import { Database } from '@deepkit/orm'; import { DatabaseFactory } from '@deepkit/orm-integration'; -import { PostgresDatabaseAdapter } from '../src/postgres-adapter'; +import { PostgresDatabaseAdapter } from '../src/postgres-adapter.js'; export const databaseFactory: DatabaseFactory = async (entities): Promise => { const adapter = new PostgresDatabaseAdapter({host: 'localhost', database: 'postgres', user: 'postgres'}); diff --git a/packages/postgres/tests/integration.spec.ts b/packages/postgres/tests/integration.spec.ts index 516c6f273..8cceceaf2 100644 --- a/packages/postgres/tests/integration.spec.ts +++ b/packages/postgres/tests/integration.spec.ts @@ -1,6 +1,6 @@ import { test } from '@jest/globals'; import { runIntegrationTests } from '@deepkit/orm-integration'; -import { databaseFactory } from './factory'; +import { databaseFactory } from './factory.js'; runIntegrationTests(databaseFactory); diff --git a/packages/postgres/tests/migration.spec.ts b/packages/postgres/tests/migration.spec.ts index d0ecc4b7a..268b88aa4 100644 --- a/packages/postgres/tests/migration.spec.ts +++ b/packages/postgres/tests/migration.spec.ts @@ -18,7 +18,7 @@ import { uint8, Unique } from '@deepkit/type'; -import { PostgresDatabaseAdapter } from '../src/postgres-adapter'; +import { PostgresDatabaseAdapter } from '../src/postgres-adapter.js'; import { DatabaseEntityRegistry } from '@deepkit/orm'; test('custom type', async () => { diff --git a/packages/rpc-tcp/index.ts b/packages/rpc-tcp/index.ts index 8b8fb4b26..7f169a8d0 100644 --- a/packages/rpc-tcp/index.ts +++ b/packages/rpc-tcp/index.ts @@ -1,2 +1,2 @@ -export * from './src/server'; -export * from './src/client'; \ No newline at end of file +export * from './src/server.js'; +export * from './src/client.js'; diff --git a/packages/rpc-tcp/package-lock.json b/packages/rpc-tcp/package-lock.json index 469a8dd91..82a929e99 100644 --- a/packages/rpc-tcp/package-lock.json +++ b/packages/rpc-tcp/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/rpc-tcp", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/ws": "^8.5.3", @@ -20,16 +20,16 @@ }, "../bson": { "name": "@deepkit/bson", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@deepkit/crypto": "^1.0.1-alpha.65" + "@deepkit/crypto": "^1.0.1-alpha.72" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/bson": "^4.0.3", "@types/node": "14.14.28", "bson": "^4.4.0", @@ -708,7 +708,7 @@ }, "../core": { "name": "@deepkit/core", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, @@ -722,12 +722,12 @@ }, "../core-rxjs": { "name": "@deepkit/core-rxjs", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", + "@deepkit/core": "^1.0.1-alpha.72", "rxjs": "~6.6.0" }, "peerDependencies": { @@ -798,20 +798,20 @@ }, "../crypto": { "name": "@deepkit/crypto", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true }, "../injector": { "name": "@deepkit/injector", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "benchmark": "^2.1.4" }, "peerDependencies": { @@ -851,7 +851,7 @@ }, "../logger": { "name": "@deepkit/logger", - "version": "1.0.1-alpha.65", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, @@ -861,7 +861,7 @@ "format-util": "^1.0.5" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65" + "@deepkit/core": "^1.0.1-alpha.72" }, "peerDependencies": { "@deepkit/core": "^1.0.1-alpha.13" @@ -918,20 +918,20 @@ }, "../rpc": { "name": "@deepkit/rpc", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "peer": true, "dependencies": { "dot-prop": "^5.1.1" }, "devDependencies": { - "@deepkit/bson": "^1.0.1-alpha.71", - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/core-rxjs": "^1.0.1-alpha.65", - "@deepkit/crypto": "^1.0.1-alpha.65", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/logger": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/bson": "^1.0.1-alpha.72", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/core-rxjs": "^1.0.1-alpha.72", + "@deepkit/crypto": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/logger": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/dot-prop": "^5.0.1", "@types/fs-extra": "^9.0.1", "@types/node": "14.14.28", @@ -1039,19 +1039,19 @@ }, "../type": { "name": "@deepkit/type", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/uuid": "^8.3.0", "buffer": "^5.2.1", "uuid": "^8.3.2" }, "devDependencies": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@typescript/vfs": "^1.3.5", @@ -1063,11 +1063,13 @@ }, "../type-compiler": { "name": "@deepkit/type-compiler", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, + "hasInstallScript": true, "license": "MIT", "peer": true, "dependencies": { + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@typescript/vfs": "^1.3.5", "lz-string": "^1.4.4", @@ -1185,7 +1187,7 @@ }, "../type-spec": { "name": "@deepkit/type-spec", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "dev": true, "license": "MIT", "peer": true @@ -1456,13 +1458,13 @@ "@deepkit/rpc": { "version": "file:../rpc", "requires": { - "@deepkit/bson": "^1.0.1-alpha.71", - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/core-rxjs": "^1.0.1-alpha.65", - "@deepkit/crypto": "^1.0.1-alpha.65", - "@deepkit/injector": "^1.0.1-alpha.71", - "@deepkit/logger": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/bson": "^1.0.1-alpha.72", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/core-rxjs": "^1.0.1-alpha.72", + "@deepkit/crypto": "^1.0.1-alpha.72", + "@deepkit/injector": "^1.0.1-alpha.72", + "@deepkit/logger": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/dot-prop": "^5.0.1", "@types/fs-extra": "^9.0.1", "@types/node": "14.14.28", @@ -1473,9 +1475,9 @@ "@deepkit/bson": { "version": "file:../bson", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/crypto": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/crypto": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "@types/bson": "^4.0.3", "@types/node": "14.14.28", "bson": "^4.4.0", @@ -1521,9 +1523,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -1569,6 +1571,7 @@ "@deepkit/type-compiler": { "version": "file:../type-compiler", "requires": { + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@typescript/vfs": "^1.3.5", "lz-string": "^1.4.4", @@ -2205,7 +2208,7 @@ "@deepkit/core-rxjs": { "version": "file:../core-rxjs", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", + "@deepkit/core": "^1.0.1-alpha.72", "rxjs": "~6.6.0" }, "dependencies": { @@ -2263,8 +2266,8 @@ "@deepkit/injector": { "version": "file:../injector", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type": "^1.0.1-alpha.72", "benchmark": "^2.1.4" }, "dependencies": { @@ -2304,9 +2307,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2352,6 +2355,7 @@ "@deepkit/type-compiler": { "version": "file:../type-compiler", "requires": { + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@typescript/vfs": "^1.3.5", "lz-string": "^1.4.4", @@ -2512,7 +2516,7 @@ "@deepkit/logger": { "version": "file:../logger", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", + "@deepkit/core": "^1.0.1-alpha.72", "@types/format-util": "^1.0.1", "ansi-styles": "^4.3.0", "format-util": "^1.0.5" @@ -2587,9 +2591,9 @@ "@deepkit/type": { "version": "file:../type", "requires": { - "@deepkit/core": "^1.0.1-alpha.65", - "@deepkit/type-compiler": "^1.0.1-alpha.71", - "@deepkit/type-spec": "^1.0.1-alpha.71", + "@deepkit/core": "^1.0.1-alpha.72", + "@deepkit/type-compiler": "^1.0.1-alpha.72", + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@types/node": "14.14.28", "@types/uuid": "^8.3.0", @@ -2635,6 +2639,7 @@ "@deepkit/type-compiler": { "version": "file:../type-compiler", "requires": { + "@deepkit/type-spec": "^1.0.1-alpha.72", "@types/lz-string": "^1.3.34", "@typescript/vfs": "^1.3.5", "lz-string": "^1.4.4", diff --git a/packages/rpc-tcp/package.json b/packages/rpc-tcp/package.json index c478d51e1..834dce580 100644 --- a/packages/rpc-tcp/package.json +++ b/packages/rpc-tcp/package.json @@ -32,7 +32,10 @@ "devDependencies": { "@deepkit/rpc": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/rpc/index.ts b/packages/rpc/index.ts index 65843be7a..158f76b50 100644 --- a/packages/rpc/index.ts +++ b/packages/rpc/index.ts @@ -8,17 +8,17 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/client/action'; -export * from './src/client/client-direct'; -export * from './src/client/client-websocket'; -export * from './src/client/client'; -export * from './src/client/message-subject'; -export * from './src/client/entity-state'; -export * from './src/server/action'; -export * from './src/server/kernel'; -export * from './src/server/security'; -export * from './src/collection'; -export * from './src/decorators'; -export * from './src/model'; -export * from './src/protocol'; -export * from './src/writer'; +export * from './src/client/action.js'; +export * from './src/client/client-direct.js'; +export * from './src/client/client-websocket.js'; +export * from './src/client/client.js'; +export * from './src/client/message-subject.js'; +export * from './src/client/entity-state.js'; +export * from './src/server/action.js'; +export * from './src/server/kernel.js'; +export * from './src/server/security.js'; +export * from './src/collection.js'; +export * from './src/decorators.js'; +export * from './src/model.js'; +export * from './src/protocol.js'; +export * from './src/writer.js'; diff --git a/packages/rpc/package-lock.json b/packages/rpc/package-lock.json index 509249e79..73ee372f9 100644 --- a/packages/rpc/package-lock.json +++ b/packages/rpc/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/rpc", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "dot-prop": "^5.1.1" diff --git a/packages/rpc/package.json b/packages/rpc/package.json index 5e01c2fb9..0008ab790 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -46,7 +46,10 @@ "@types/node": "14.14.28", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/rpc/src/client/action.ts b/packages/rpc/src/client/action.ts index 74ff15844..aa1c01977 100644 --- a/packages/rpc/src/client/action.ts +++ b/packages/rpc/src/client/action.ts @@ -11,7 +11,7 @@ import { asyncOperation, ClassType, toFastProperties } from '@deepkit/core'; import { BehaviorSubject, Observable, Subject, Subscriber } from 'rxjs'; import { skip } from 'rxjs/operators'; -import { Collection, CollectionQueryModelInterface, CollectionState } from '../collection'; +import { Collection, CollectionQueryModelInterface, CollectionState } from '../collection.js'; import { ActionObservableTypes, IdInterface, @@ -25,11 +25,11 @@ import { rpcResponseActionType, RpcTypes, WrappedV -} from '../model'; -import { rpcDecodeError, RpcMessage } from '../protocol'; -import { ClientProgress } from '../writer'; -import type { WritableClient } from './client'; -import { EntityState, EntitySubjectStore } from './entity-state'; +} from '../model.js'; +import { rpcDecodeError, RpcMessage } from '../protocol.js'; +import { ClientProgress } from '../writer.js'; +import type { WritableClient } from './client.js'; +import { EntityState, EntitySubjectStore } from './entity-state.js'; import { assertType, deserializeType, ReflectionKind, Type, TypeObjectLiteral, typeOf } from '@deepkit/type'; interface ResponseActionObservableError extends rpcActionObservableSubscribeId, WrappedV { diff --git a/packages/rpc/src/client/client-direct.ts b/packages/rpc/src/client/client-direct.ts index f8017f54d..2ca2cfad7 100644 --- a/packages/rpc/src/client/client-direct.ts +++ b/packages/rpc/src/client/client-direct.ts @@ -8,8 +8,8 @@ * You should have received a copy of the MIT License along with this program. */ -import { RpcKernel } from '../server/kernel'; -import { ClientTransportAdapter, RpcClient, TransportConnectionHooks } from './client'; +import { RpcKernel } from '../server/kernel.js'; +import { ClientTransportAdapter, RpcClient, TransportConnectionHooks } from './client.js'; import { InjectorContext } from '@deepkit/injector'; export class DirectClient extends RpcClient { diff --git a/packages/rpc/src/client/client-websocket.ts b/packages/rpc/src/client/client-websocket.ts index 780a9fcbd..4edab5aca 100644 --- a/packages/rpc/src/client/client-websocket.ts +++ b/packages/rpc/src/client/client-websocket.ts @@ -9,7 +9,7 @@ */ import { ClassType } from '@deepkit/core'; -import { ClientTransportAdapter, RpcClient, TransportConnectionHooks } from './client'; +import { ClientTransportAdapter, RpcClient, TransportConnectionHooks } from './client.js'; /** * A RpcClient that connects via WebSocket transport. diff --git a/packages/rpc/src/client/client.ts b/packages/rpc/src/client/client.ts index 34f868cdb..948270c8b 100644 --- a/packages/rpc/src/client/client.ts +++ b/packages/rpc/src/client/client.ts @@ -11,12 +11,12 @@ import { asyncOperation, ClassType, sleep } from '@deepkit/core'; import { ReceiveType, resolveReceiveType } from '@deepkit/type'; import { BehaviorSubject, Observable, Subject } from 'rxjs'; -import { ControllerDefinition, rpcAuthenticate, rpcClientId, rpcPeerDeregister, rpcPeerRegister, rpcResponseAuthenticate, RpcTypes } from '../model'; -import { createRpcMessage, createRpcMessagePeer, ErroredRpcMessage, RpcMessage, RpcMessageReader, RpcMessageRouteType } from '../protocol'; -import { RpcKernel, RpcKernelConnection } from '../server/kernel'; -import { ClientProgress, RpcMessageWriter, RpcMessageWriterOptions, SingleProgress } from '../writer'; -import { RpcActionClient, RpcControllerState } from './action'; -import { RpcMessageSubject } from './message-subject'; +import { ControllerDefinition, rpcAuthenticate, rpcClientId, rpcPeerDeregister, rpcPeerRegister, rpcResponseAuthenticate, RpcTypes } from '../model.js'; +import { createRpcMessage, createRpcMessagePeer, ErroredRpcMessage, RpcMessage, RpcMessageReader, RpcMessageRouteType } from '../protocol.js'; +import { RpcKernel, RpcKernelConnection } from '../server/kernel.js'; +import { ClientProgress, RpcMessageWriter, RpcMessageWriterOptions, SingleProgress } from '../writer.js'; +import { RpcActionClient, RpcControllerState } from './action.js'; +import { RpcMessageSubject } from './message-subject.js'; export class OfflineError extends Error { constructor(message: string = 'Offline') { diff --git a/packages/rpc/src/client/entity-state.ts b/packages/rpc/src/client/entity-state.ts index 19c423408..693d219b6 100644 --- a/packages/rpc/src/client/entity-state.ts +++ b/packages/rpc/src/client/entity-state.ts @@ -9,8 +9,8 @@ */ import { arrayRemoveItem, ClassType, deletePathValue, getPathValue, setPathValue } from '@deepkit/core'; -import { EntityPatch, EntitySubject, IdType, IdVersionInterface, rpcEntityPatch, rpcEntityRemove, RpcTypes } from '../model'; -import { RpcMessage } from '../protocol'; +import { EntityPatch, EntitySubject, IdType, IdVersionInterface, rpcEntityPatch, rpcEntityRemove, RpcTypes } from '../model.js'; +import { RpcMessage } from '../protocol.js'; import { getPartialSerializeFunction, ReflectionClass, serializer, TypeObjectLiteral } from '@deepkit/type'; export class EntitySubjectStore { diff --git a/packages/rpc/src/client/message-subject.ts b/packages/rpc/src/client/message-subject.ts index 0564f5e70..5e7743f63 100644 --- a/packages/rpc/src/client/message-subject.ts +++ b/packages/rpc/src/client/message-subject.ts @@ -10,8 +10,8 @@ import { asyncOperation, CustomError } from '@deepkit/core'; import { ReceiveType } from '@deepkit/type'; -import { RpcTypes } from '../model'; -import type { RpcMessage } from '../protocol'; +import { RpcTypes } from '../model.js'; +import type { RpcMessage } from '../protocol.js'; export class UnexpectedMessageType extends CustomError { } diff --git a/packages/rpc/src/collection.ts b/packages/rpc/src/collection.ts index 1dfb7957a..b03b10e17 100644 --- a/packages/rpc/src/collection.ts +++ b/packages/rpc/src/collection.ts @@ -16,7 +16,7 @@ import { ClassType, getClassName, isArray } from '@deepkit/core'; import { tearDown } from '@deepkit/core-rxjs'; import { ReplaySubject, Subject, TeardownLogic } from 'rxjs'; -import { EntitySubject, IdInterface } from './model'; +import { EntitySubject, IdInterface } from './model.js'; export type FilterParameters = { [name: string]: any | undefined }; diff --git a/packages/rpc/src/decorators.ts b/packages/rpc/src/decorators.ts index 0d8013605..030968642 100644 --- a/packages/rpc/src/decorators.ts +++ b/packages/rpc/src/decorators.ts @@ -10,7 +10,7 @@ import { ClassType } from '@deepkit/core'; import { ClassDecoratorResult, createClassDecoratorContext, createPropertyDecoratorContext, mergeDecorator, PropertyDecoratorResult } from '@deepkit/type'; -import { ControllerDefinition } from './model'; +import { ControllerDefinition } from './model.js'; class RpcController { name?: string; diff --git a/packages/rpc/src/protocol.ts b/packages/rpc/src/protocol.ts index 1e6bf98f5..153023835 100644 --- a/packages/rpc/src/protocol.ts +++ b/packages/rpc/src/protocol.ts @@ -10,8 +10,8 @@ import { deserializeBSONWithoutOptimiser, getBSONDeserializer, getBSONSerializer, getBSONSizer, Writer } from '@deepkit/bson'; import { ClassType } from '@deepkit/core'; -import { rpcChunk, rpcError, RpcTypes } from './model'; -import type { SingleProgress } from './writer'; +import { rpcChunk, rpcError, RpcTypes } from './model.js'; +import type { SingleProgress } from './writer.js'; import { deserialize, ReceiveType, ReflectionClass, serialize, Type, typeSettings } from '@deepkit/type'; export const enum RpcMessageRouteType { diff --git a/packages/rpc/src/server/action.ts b/packages/rpc/src/server/action.ts index f611b32f2..56af0bb8c 100644 --- a/packages/rpc/src/server/action.ts +++ b/packages/rpc/src/server/action.ts @@ -27,8 +27,8 @@ import { ValidationErrorItem } from '@deepkit/type'; import { isObservable, Observable, Subject, Subscription } from 'rxjs'; -import { Collection, CollectionEvent, CollectionQueryModel, CollectionQueryModelInterface, CollectionState } from '../collection'; -import { getActions } from '../decorators'; +import { Collection, CollectionEvent, CollectionQueryModel, CollectionQueryModelInterface, CollectionState } from '../collection.js'; +import { getActions } from '../decorators.js'; import { ActionMode, ActionObservableTypes, @@ -42,10 +42,10 @@ import { rpcResponseActionObservableSubscriptionError, rpcResponseActionType, RpcTypes, -} from '../model'; -import { rpcEncodeError, RpcMessage } from '../protocol'; -import { RpcMessageBuilder } from './kernel'; -import { RpcControllerAccess, RpcKernelSecurity, SessionState } from './security'; +} from '../model.js'; +import { rpcEncodeError, RpcMessage } from '../protocol.js'; +import { RpcMessageBuilder } from './kernel.js'; +import { RpcControllerAccess, RpcKernelSecurity, SessionState } from './security.js'; import { InjectorContext, InjectorModule } from '@deepkit/injector'; export type ActionTypes = { diff --git a/packages/rpc/src/server/kernel.ts b/packages/rpc/src/server/kernel.ts index 57e84e527..ab0aa5636 100644 --- a/packages/rpc/src/server/kernel.ts +++ b/packages/rpc/src/server/kernel.ts @@ -10,8 +10,8 @@ import { arrayRemoveItem, ClassType } from '@deepkit/core'; import { ReceiveType, resolveReceiveType, stringifyUuid, typeOf, writeUuid } from '@deepkit/type'; -import { RpcMessageSubject } from '../client/message-subject'; -import { AuthenticationError, ControllerDefinition, rpcAuthenticate, rpcClientId, rpcError, rpcPeerRegister, rpcResponseAuthenticate, RpcTypes } from '../model'; +import { RpcMessageSubject } from '../client/message-subject.js'; +import { AuthenticationError, ControllerDefinition, rpcAuthenticate, rpcClientId, rpcError, rpcPeerRegister, rpcResponseAuthenticate, RpcTypes } from '../model.js'; import { createBuffer, createRpcCompositeMessage, @@ -25,15 +25,15 @@ import { RpcMessage, RpcMessageReader, RpcMessageRouteType -} from '../protocol'; -import { RpcMessageWriter, RpcMessageWriterOptions } from '../writer'; -import { RpcServerAction } from './action'; -import { RpcKernelSecurity, SessionState } from './security'; -import { RpcActionClient, RpcControllerState } from '../client/action'; -import { RemoteController } from '../client/client'; +} from '../protocol.js'; +import { RpcMessageWriter, RpcMessageWriterOptions } from '../writer.js'; +import { RpcServerAction } from './action.js'; +import { RpcKernelSecurity, SessionState } from './security.js'; +import { RpcActionClient, RpcControllerState } from '../client/action.js'; +import { RemoteController } from '../client/client.js'; import { InjectorContext, InjectorModule } from '@deepkit/injector'; import { Logger, LoggerInterface } from '@deepkit/logger'; -import { rpcClass } from '../decorators'; +import { rpcClass } from '../decorators.js'; import { getClassName } from '@deepkit/core'; export class RpcCompositeMessage { diff --git a/packages/rpc/src/writer.ts b/packages/rpc/src/writer.ts index dbb6d46e2..8a0e57429 100644 --- a/packages/rpc/src/writer.ts +++ b/packages/rpc/src/writer.ts @@ -9,9 +9,9 @@ */ import { BehaviorSubject, Subject, Subscriber, Subscription, SubscriptionLike } from 'rxjs'; -import { rpcChunk, RpcTypes } from './model'; -import { createRpcMessage, readRpcMessage, RpcMessageReader } from './protocol'; -import type { RpcConnectionWriter } from './server/kernel'; +import { rpcChunk, RpcTypes } from './model.js'; +import { createRpcMessage, readRpcMessage, RpcMessageReader } from './protocol.js'; +import type { RpcConnectionWriter } from './server/kernel.js'; export class SingleProgress extends Subject { public done = false; diff --git a/packages/rpc/tests/back-controller.spec.ts b/packages/rpc/tests/back-controller.spec.ts index 25339b186..8cbfa97b9 100644 --- a/packages/rpc/tests/back-controller.spec.ts +++ b/packages/rpc/tests/back-controller.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { RpcKernel, RpcKernelConnection } from '../src/server/kernel'; -import { DirectClient } from '../src/client/client-direct'; -import { rpc } from '../src/decorators'; +import { RpcKernel, RpcKernelConnection } from '../src/server/kernel.js'; +import { DirectClient } from '../src/client/client-direct.js'; +import { rpc } from '../src/decorators.js'; test('back controller', async () => { class Controller { diff --git a/packages/rpc/tests/case/crud.spec.ts b/packages/rpc/tests/case/crud.spec.ts index 5c0efdf6d..dd32c67d5 100644 --- a/packages/rpc/tests/case/crud.spec.ts +++ b/packages/rpc/tests/case/crud.spec.ts @@ -1,8 +1,8 @@ import { entity } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { DirectClient } from '../../src/client/client-direct'; -import { rpc } from '../../src/decorators'; -import { RpcKernel } from '../../src/server/kernel'; +import { DirectClient } from '../../src/client/client-direct.js'; +import { rpc } from '../../src/decorators.js'; +import { RpcKernel } from '../../src/server/kernel.js'; @entity.name('purchase') export class Purchase { diff --git a/packages/rpc/tests/chunks.spec.ts b/packages/rpc/tests/chunks.spec.ts index 017a3574c..c27c7e509 100644 --- a/packages/rpc/tests/chunks.spec.ts +++ b/packages/rpc/tests/chunks.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; import { skip } from 'rxjs/operators'; -import { DirectClient } from '../src/client/client-direct'; -import { rpc } from '../src/decorators'; -import { RpcKernel } from '../src/server/kernel'; -import { ClientProgress } from '../src/writer'; +import { DirectClient } from '../src/client/client-direct.js'; +import { rpc } from '../src/decorators.js'; +import { RpcKernel } from '../src/server/kernel.js'; +import { ClientProgress } from '../src/writer.js'; test('chunks', async () => { @rpc.controller('test') diff --git a/packages/rpc/tests/collection.spec.ts b/packages/rpc/tests/collection.spec.ts index ca1ae6d65..5a7111f90 100644 --- a/packages/rpc/tests/collection.spec.ts +++ b/packages/rpc/tests/collection.spec.ts @@ -1,9 +1,9 @@ import { entity } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { DirectClient } from '../src/client/client-direct'; -import { Collection } from '../src/collection'; -import { rpc } from '../src/decorators'; -import { RpcKernel } from '../src/server/kernel'; +import { DirectClient } from '../src/client/client-direct.js'; +import { Collection } from '../src/collection.js'; +import { rpc } from '../src/decorators.js'; +import { RpcKernel } from '../src/server/kernel.js'; import { sleep } from '@deepkit/core'; test('collection basic', () => { diff --git a/packages/rpc/tests/controller.spec.ts b/packages/rpc/tests/controller.spec.ts index e1051fe74..ad390e594 100644 --- a/packages/rpc/tests/controller.spec.ts +++ b/packages/rpc/tests/controller.spec.ts @@ -1,9 +1,9 @@ import { assertType, entity, Positive, ReflectionClass, ReflectionKind } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { DirectClient } from '../src/client/client-direct'; -import { getActions, rpc } from '../src/decorators'; -import { RpcKernel, RpcKernelConnection } from '../src/server/kernel'; -import { Session, SessionState } from '../src/server/security'; +import { DirectClient } from '../src/client/client-direct.js'; +import { getActions, rpc } from '../src/decorators.js'; +import { RpcKernel, RpcKernelConnection } from '../src/server/kernel.js'; +import { Session, SessionState } from '../src/server/security.js'; import { BehaviorSubject } from 'rxjs'; import { getClassName } from '@deepkit/core'; diff --git a/packages/rpc/tests/entity-state.spec.ts b/packages/rpc/tests/entity-state.spec.ts index 9476c8d05..36aa1ec15 100644 --- a/packages/rpc/tests/entity-state.spec.ts +++ b/packages/rpc/tests/entity-state.spec.ts @@ -1,10 +1,10 @@ import { cast, entity, ReflectionClass } from '@deepkit/type'; import { expect, test } from '@jest/globals'; -import { EntitySubject, rpcEntityPatch, RpcTypes } from '../src/model'; -import { DirectClient } from '../src/client/client-direct'; -import { EntitySubjectStore } from '../src/client/entity-state'; -import { rpc } from '../src/decorators'; -import { RpcKernel, RpcKernelConnection } from '../src/server/kernel'; +import { EntitySubject, rpcEntityPatch, RpcTypes } from '../src/model.js'; +import { DirectClient } from '../src/client/client-direct.js'; +import { EntitySubjectStore } from '../src/client/entity-state.js'; +import { rpc } from '../src/decorators.js'; +import { RpcKernel, RpcKernelConnection } from '../src/server/kernel.js'; import { InjectorContext } from '@deepkit/injector'; test('EntitySubjectStore multi', () => { diff --git a/packages/rpc/tests/model.spec.ts b/packages/rpc/tests/model.spec.ts index ecdfcd05b..eb4772a15 100644 --- a/packages/rpc/tests/model.spec.ts +++ b/packages/rpc/tests/model.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { EntitySubject, isEntitySubject } from '../src/model'; +import { EntitySubject, isEntitySubject } from '../src/model.js'; test('entitySubject', async () => { class User { diff --git a/packages/rpc/tests/observable.spec.ts b/packages/rpc/tests/observable.spec.ts index 531936c91..4d56c3e1c 100644 --- a/packages/rpc/tests/observable.spec.ts +++ b/packages/rpc/tests/observable.spec.ts @@ -3,9 +3,9 @@ import { entity } from '@deepkit/type'; import { expect, test } from '@jest/globals'; import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs'; import { first, take } from 'rxjs/operators'; -import { DirectClient } from '../src/client/client-direct'; -import { rpc } from '../src/decorators'; -import { RpcKernel } from '../src/server/kernel'; +import { DirectClient } from '../src/client/client-direct.js'; +import { rpc } from '../src/decorators.js'; +import { RpcKernel } from '../src/server/kernel.js'; test('observable basics', async () => { @entity.name('model') diff --git a/packages/rpc/tests/rpc.spec.ts b/packages/rpc/tests/rpc.spec.ts index 277347f13..0aca69480 100644 --- a/packages/rpc/tests/rpc.spec.ts +++ b/packages/rpc/tests/rpc.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { Progress, RpcMessageWriter, RpcMessageWriterOptions } from '../src/writer'; -import { DirectClient } from '../src/client/client-direct'; -import { rpc } from '../src/decorators'; +import { Progress, RpcMessageWriter, RpcMessageWriterOptions } from '../src/writer.js'; +import { DirectClient } from '../src/client/client-direct.js'; +import { rpc } from '../src/decorators.js'; import { createRpcCompositeMessage, createRpcCompositeMessageSourceDest, @@ -14,9 +14,9 @@ import { RpcMessage, RpcMessageReader, RpcMessageRouteType -} from '../src/protocol'; -import { RpcKernel } from '../src/server/kernel'; -import { RpcTypes } from '../src/model'; +} from '../src/protocol.js'; +import { RpcKernel } from '../src/server/kernel.js'; +import { RpcTypes } from '../src/model.js'; import { Writer } from '@deepkit/bson'; import { typeOf } from '@deepkit/type'; diff --git a/packages/rpc/tests/security.spec.ts b/packages/rpc/tests/security.spec.ts index d33ce9a63..cddb64844 100644 --- a/packages/rpc/tests/security.spec.ts +++ b/packages/rpc/tests/security.spec.ts @@ -1,11 +1,10 @@ import { expect, test } from '@jest/globals'; -import { AsyncDirectClient, DirectClient } from '../src/client/client-direct'; -import { rpc } from '../src/decorators'; -import { RpcKernel, RpcKernelConnection } from '../src/server/kernel'; -import { RpcKernelSecurity, Session } from '../src/server/security'; -import { AuthenticationError } from '../src/model'; -import { MemoryLoggerTransport } from '../../logger'; -import { Logger } from '@deepkit/logger'; +import { AsyncDirectClient, DirectClient } from '../src/client/client-direct.js'; +import { rpc } from '../src/decorators.js'; +import { RpcKernel, RpcKernelConnection } from '../src/server/kernel.js'; +import { RpcKernelSecurity, Session } from '../src/server/security.js'; +import { AuthenticationError } from '../src/model.js'; +import { Logger, MemoryLoggerTransport } from '@deepkit/logger'; test('authentication', async () => { class Controller { diff --git a/packages/rpc/tsconfig.json b/packages/rpc/tsconfig.json index 6a4610e45..d8e8290fb 100644 --- a/packages/rpc/tsconfig.json +++ b/packages/rpc/tsconfig.json @@ -43,4 +43,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/skeleton/index.ts b/packages/skeleton/index.ts index d2ccdcd8b..349369c9f 100644 --- a/packages/skeleton/index.ts +++ b/packages/skeleton/index.ts @@ -1 +1 @@ -export * from './src/foo'; +export * from './src/foo.js'; diff --git a/packages/skeleton/package.json b/packages/skeleton/package.json index 8f3a98b0c..9e9954504 100644 --- a/packages/skeleton/package.json +++ b/packages/skeleton/package.json @@ -30,7 +30,10 @@ "devDependencies": { "@deepkit/core": "^1.0.1-alpha.13" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/skeleton/tests/foo.spec.ts b/packages/skeleton/tests/foo.spec.ts index 3377a4c48..d1e55bc26 100644 --- a/packages/skeleton/tests/foo.spec.ts +++ b/packages/skeleton/tests/foo.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@jest/globals'; -import { foo } from '../src/foo'; +import { foo } from '../src/foo.js'; test('foo', () => { expect(foo()).toBe('bar'); diff --git a/packages/sql/browser.ts b/packages/sql/browser.ts index 17a79e70c..ccbe8843a 100644 --- a/packages/sql/browser.ts +++ b/packages/sql/browser.ts @@ -8,12 +8,12 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/sql-builder'; -export * from './src/sql-adapter'; -export * from './src/sql-filter-builder'; +export * from './src/sql-builder.js'; +export * from './src/sql-adapter.js'; +export * from './src/sql-filter-builder.js'; -export * from './src/schema/table'; -export * from './src/reverse/schema-parser'; -export * from './src/platform/default-platform'; -export * from './src/serializer/sql-serializer'; +export * from './src/schema/table.js'; +export * from './src/reverse/schema-parser.js'; +export * from './src/platform/default-platform.js'; +export * from './src/serializer/sql-serializer.js'; diff --git a/packages/sql/commands.ts b/packages/sql/commands.ts index 4b3f5c722..fcf3d4fce 100644 --- a/packages/sql/commands.ts +++ b/packages/sql/commands.ts @@ -1,5 +1,5 @@ -export * from './src/cli/migration-create-command'; -export * from './src/cli/migration-down-command'; -export * from './src/cli/migration-up-command'; -export * from './src/cli/migration-pending-command'; -export * from './src/migration/migration-provider'; +export * from './src/cli/migration-create-command.js'; +export * from './src/cli/migration-down-command.js'; +export * from './src/cli/migration-up-command.js'; +export * from './src/cli/migration-pending-command.js'; +export * from './src/migration/migration-provider.js'; diff --git a/packages/sql/index.ts b/packages/sql/index.ts index 36e9ac539..7fdbfbfc1 100644 --- a/packages/sql/index.ts +++ b/packages/sql/index.ts @@ -8,16 +8,16 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/sql-builder'; -export * from './src/sql-adapter'; -export * from './src/sql-filter-builder'; +export * from './src/sql-builder.js'; +export * from './src/sql-adapter.js'; +export * from './src/sql-filter-builder.js'; -export * from './src/migration/migration'; -export * from './src/migration/migration-provider'; +export * from './src/migration/migration.js'; +export * from './src/migration/migration-provider.js'; -export * from './src/test'; -export * from './src/schema/table'; -export * from './src/reverse/schema-parser'; -export * from './src/platform/default-platform'; -export * from './src/serializer/sql-serializer'; +export * from './src/test.js'; +export * from './src/schema/table.js'; +export * from './src/reverse/schema-parser.js'; +export * from './src/platform/default-platform.js'; +export * from './src/serializer/sql-serializer.js'; diff --git a/packages/sql/main.ts b/packages/sql/main.ts index 99a119e4e..89e63e01f 100755 --- a/packages/sql/main.ts +++ b/packages/sql/main.ts @@ -1,5 +1,5 @@ #!/usr/bin/env node import { App } from '@deepkit/app'; -import { appModule } from './src/app.module'; +import { appModule } from './src/app.module.js'; App.fromModule(appModule).run(); diff --git a/packages/sql/package-lock.json b/packages/sql/package-lock.json index 85e5c3457..2f0e5582a 100644 --- a/packages/sql/package-lock.json +++ b/packages/sql/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/sql", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/sqlstring": "^2.2.1", diff --git a/packages/sql/package.json b/packages/sql/package.json index 23e5c17ff..7821e3660 100644 --- a/packages/sql/package.json +++ b/packages/sql/package.json @@ -31,6 +31,7 @@ "author": "Marc J. Schmidt ", "license": "MIT", "peerDependencies": { + "@deepkit/platform": "^1.0.1-alpha.75", "@deepkit/app": "^1.0.1-alpha.13", "@deepkit/core": "^1.0.1-alpha.13", "@deepkit/injector": "^1.0.1-alpha.13", @@ -55,7 +56,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/sql/src/app.module.ts b/packages/sql/src/app.module.ts index 93db8ada5..e0153316f 100644 --- a/packages/sql/src/app.module.ts +++ b/packages/sql/src/app.module.ts @@ -2,11 +2,11 @@ import { AppModule } from '@deepkit/app'; import { ConsoleTransport, Logger } from '@deepkit/logger'; import { InjectorContext } from '@deepkit/injector'; import { DatabaseRegistry } from '@deepkit/orm'; -import { MigrationCreateController } from './cli/migration-create-command'; -import { MigrationDownCommand } from './cli/migration-down-command'; -import { MigrationUpCommand } from './cli/migration-up-command'; -import { MigrationPendingCommand } from './cli/migration-pending-command'; -import { MigrationProvider } from './migration/migration-provider'; +import { MigrationCreateController } from './cli/migration-create-command.js'; +import { MigrationDownCommand } from './cli/migration-down-command.js'; +import { MigrationUpCommand } from './cli/migration-up-command.js'; +import { MigrationPendingCommand } from './cli/migration-pending-command.js'; +import { MigrationProvider } from './migration/migration-provider.js'; export const appModule = new AppModule({ providers: [ diff --git a/packages/sql/src/cli/migration-create-command.ts b/packages/sql/src/cli/migration-create-command.ts index 395a931b2..c637aab7d 100644 --- a/packages/sql/src/cli/migration-create-command.ts +++ b/packages/sql/src/cli/migration-create-command.ts @@ -13,10 +13,10 @@ import { existsSync, mkdirSync, writeFileSync } from 'fs'; import { dirname, join } from 'path'; import { cli, Command, flag } from '@deepkit/app'; import { LoggerInterface } from '@deepkit/logger'; -import { SQLDatabaseAdapter } from '../sql-adapter'; -import { DatabaseComparator, DatabaseModel } from '../schema/table'; -import { MigrationProvider } from '../migration/migration-provider'; -import { BaseCommand } from './base-command'; +import { SQLDatabaseAdapter } from '../sql-adapter.js'; +import { DatabaseComparator, DatabaseModel } from '../schema/table.js'; +import { MigrationProvider } from '../migration/migration-provider.js'; +import { BaseCommand } from './base-command.js'; function serializeSQLLine(sql: string): string { return '`' + sql.replace(/`/g, '\\`') + '`'; diff --git a/packages/sql/src/cli/migration-down-command.ts b/packages/sql/src/cli/migration-down-command.ts index 22b40bbc5..a78609e7c 100644 --- a/packages/sql/src/cli/migration-down-command.ts +++ b/packages/sql/src/cli/migration-down-command.ts @@ -11,9 +11,9 @@ import { indent } from '@deepkit/core'; import { cli, flag } from '@deepkit/app'; import { LoggerInterface } from '@deepkit/logger'; -import { MigrationProvider } from '../migration/migration-provider'; -import { SQLDatabaseAdapter, SqlMigrationHandler } from '../sql-adapter'; -import { BaseCommand } from './base-command'; +import { MigrationProvider } from '../migration/migration-provider.js'; +import { SQLDatabaseAdapter, SqlMigrationHandler } from '../sql-adapter.js'; +import { BaseCommand } from './base-command.js'; @cli.controller('migration:down', { description: 'Executes down migration, reverting old migration files.' diff --git a/packages/sql/src/cli/migration-pending-command.ts b/packages/sql/src/cli/migration-pending-command.ts index c86bbc325..69f5ad7b4 100644 --- a/packages/sql/src/cli/migration-pending-command.ts +++ b/packages/sql/src/cli/migration-pending-command.ts @@ -11,9 +11,9 @@ import { cli, flag } from '@deepkit/app'; import { empty } from '@deepkit/core'; import { LoggerInterface } from '@deepkit/logger'; -import { MigrationProvider } from '../migration/migration-provider'; -import { SqlMigrationHandler } from '../sql-adapter'; -import { BaseCommand } from './base-command'; +import { MigrationProvider } from '../migration/migration-provider.js'; +import { SqlMigrationHandler } from '../sql-adapter.js'; +import { BaseCommand } from './base-command.js'; @cli.controller('migration:pending', { description: 'Shows pending migration files.' diff --git a/packages/sql/src/cli/migration-up-command.ts b/packages/sql/src/cli/migration-up-command.ts index 8585a156b..88b77dcb5 100644 --- a/packages/sql/src/cli/migration-up-command.ts +++ b/packages/sql/src/cli/migration-up-command.ts @@ -11,9 +11,9 @@ import { indent } from '@deepkit/core'; import { cli, flag } from '@deepkit/app'; import { LoggerInterface } from '@deepkit/logger'; -import { MigrationProvider } from '../migration/migration-provider'; -import { SQLDatabaseAdapter, SqlMigrationHandler } from '../sql-adapter'; -import { BaseCommand } from './base-command'; +import { MigrationProvider } from '../migration/migration-provider.js'; +import { SQLDatabaseAdapter, SqlMigrationHandler } from '../sql-adapter.js'; +import { BaseCommand } from './base-command.js'; @cli.controller('migration:up', { description: 'Executes pending migration files. Use migration:pending to see which are pending.' diff --git a/packages/sql/src/migration/migration-provider.ts b/packages/sql/src/migration/migration-provider.ts index c1e9da711..e036b8380 100644 --- a/packages/sql/src/migration/migration-provider.ts +++ b/packages/sql/src/migration/migration-provider.ts @@ -12,7 +12,7 @@ import { ClassType } from '@deepkit/core'; import { Database, DatabaseRegistry } from '@deepkit/orm'; import glob from 'fast-glob'; import { basename, join } from 'path'; -import { Migration } from './migration'; +import { Migration } from './migration.js'; export class MigrationProvider { protected databaseMap = new Map>(); diff --git a/packages/sql/src/platform/default-platform.ts b/packages/sql/src/platform/default-platform.ts index 1d46f6fde..c7d6a0300 100644 --- a/packages/sql/src/platform/default-platform.ts +++ b/packages/sql/src/platform/default-platform.ts @@ -8,13 +8,13 @@ * You should have received a copy of the MIT License along with this program. */ -import { Column, ColumnDiff, DatabaseDiff, DatabaseModel, ForeignKey, IndexModel, Table, TableDiff } from '../schema/table'; +import { Column, ColumnDiff, DatabaseDiff, DatabaseModel, ForeignKey, IndexModel, Table, TableDiff } from '../schema/table.js'; import sqlstring from 'sqlstring'; import { ClassType, isArray, isObject } from '@deepkit/core'; -import { sqlSerializer } from '../serializer/sql-serializer'; -import { parseType, SchemaParser } from '../reverse/schema-parser'; -import { SQLFilterBuilder } from '../sql-filter-builder'; -import { Sql } from '../sql-builder'; +import { sqlSerializer } from '../serializer/sql-serializer.js'; +import { parseType, SchemaParser } from '../reverse/schema-parser.js'; +import { SQLFilterBuilder } from '../sql-filter-builder.js'; +import { Sql } from '../sql-builder.js'; import { binaryTypes, databaseAnnotation, getTypeJitContainer, ReflectionClass, ReflectionKind, ReflectionProperty, Serializer, Type } from '@deepkit/type'; import { DatabaseEntityRegistry } from '@deepkit/orm'; diff --git a/packages/sql/src/reverse/schema-parser.ts b/packages/sql/src/reverse/schema-parser.ts index 7cdc857e5..2c6806c47 100644 --- a/packages/sql/src/reverse/schema-parser.ts +++ b/packages/sql/src/reverse/schema-parser.ts @@ -8,9 +8,9 @@ * You should have received a copy of the MIT License along with this program. */ -import { Column, DatabaseModel } from '../schema/table'; -import { SQLConnection } from '../sql-adapter'; -import { DefaultPlatform } from '../platform/default-platform'; +import { Column, DatabaseModel } from '../schema/table.js'; +import { SQLConnection } from '../sql-adapter.js'; +import { DefaultPlatform } from '../platform/default-platform.js'; const type3Regex = /^([^(]+)\(\s*(\d+)\s*,\s*(\d+)\s*\)$/; const type2Regex = /^([^(]+)\(\s*(\d+)\s*\)$/; diff --git a/packages/sql/src/schema/table.ts b/packages/sql/src/schema/table.ts index b0aaaa231..75c0892e4 100644 --- a/packages/sql/src/schema/table.ts +++ b/packages/sql/src/schema/table.ts @@ -9,7 +9,7 @@ */ import { arrayRemoveItem } from '@deepkit/core'; -import { cyrb53 } from '../hash'; +import { cyrb53 } from '../hash.js'; import { genericEqual, ReflectionClass, ReflectionProperty } from '@deepkit/type'; export class DatabaseModel { diff --git a/packages/sql/src/sql-adapter.ts b/packages/sql/src/sql-adapter.ts index 519414d7e..9dd3affa9 100644 --- a/packages/sql/src/sql-adapter.ts +++ b/packages/sql/src/sql-adapter.ts @@ -34,11 +34,11 @@ import { } from '@deepkit/orm'; import { AbstractClassType, ClassType, isArray, isClass } from '@deepkit/core'; import { Changes, getPartialSerializeFunction, getSerializeFunction, ReceiveType, ReflectionClass } from '@deepkit/type'; -import { DefaultPlatform, SqlPlaceholderStrategy } from './platform/default-platform'; -import { SqlBuilder } from './sql-builder'; -import { SqlFormatter } from './sql-formatter'; -import { sqlSerializer } from './serializer/sql-serializer'; -import { DatabaseComparator, DatabaseModel } from './schema/table'; +import { DefaultPlatform, SqlPlaceholderStrategy } from './platform/default-platform.js'; +import { SqlBuilder } from './sql-builder.js'; +import { SqlFormatter } from './sql-formatter.js'; +import { sqlSerializer } from './serializer/sql-serializer.js'; +import { DatabaseComparator, DatabaseModel } from './schema/table.js'; import { Stopwatch } from '@deepkit/stopwatch'; export type SORT_TYPE = SORT_ORDER | { $meta: 'textScore' }; diff --git a/packages/sql/src/sql-builder.ts b/packages/sql/src/sql-builder.ts index 02b6afea7..364b16bf0 100644 --- a/packages/sql/src/sql-builder.ts +++ b/packages/sql/src/sql-builder.ts @@ -8,11 +8,11 @@ * You should have received a copy of the MIT License along with this program. */ -import { SQLQueryModel } from './sql-adapter'; -import { DefaultPlatform, SqlPlaceholderStrategy } from './platform/default-platform'; +import { SQLQueryModel } from './sql-adapter.js'; +import { DefaultPlatform, SqlPlaceholderStrategy } from './platform/default-platform.js'; import { getPrimaryKeyHashGenerator, ReflectionClass, ReflectionProperty } from '@deepkit/type'; import { DatabaseJoinModel, DatabaseQueryModel } from '@deepkit/orm'; -import { getSqlFilter } from './filter'; +import { getSqlFilter } from './filter.js'; type ConvertDataToDict = (row: any) => { hash: string, item: { [name: string]: any } } | undefined; diff --git a/packages/sql/src/sql-filter-builder.ts b/packages/sql/src/sql-filter-builder.ts index bda616af1..5291fb75e 100644 --- a/packages/sql/src/sql-filter-builder.ts +++ b/packages/sql/src/sql-filter-builder.ts @@ -10,7 +10,7 @@ import { isArray, isPlainObject } from '@deepkit/core'; import { isBackReferenceType, isReferenceType, ReflectionClass, ReflectionKind, resolvePath, Serializer, Type } from '@deepkit/type'; -import { SqlPlaceholderStrategy } from './platform/default-platform'; +import { SqlPlaceholderStrategy } from './platform/default-platform.js'; type Filter = { [name: string]: any }; diff --git a/packages/sql/src/test.ts b/packages/sql/src/test.ts index e00bade9b..49561bae4 100644 --- a/packages/sql/src/test.ts +++ b/packages/sql/src/test.ts @@ -1,6 +1,6 @@ import { ClassType } from '@deepkit/core'; -import { SQLDatabaseAdapter } from './sql-adapter'; -import { DatabaseModel, TableComparator } from './schema/table'; +import { SQLDatabaseAdapter } from './sql-adapter.js'; +import { DatabaseModel, TableComparator } from './schema/table.js'; import { Database, DatabaseEntityRegistry } from '@deepkit/orm'; import { ReflectionClass, Type } from '@deepkit/type'; diff --git a/packages/sql/tests/inheritance.spec.ts b/packages/sql/tests/inheritance.spec.ts index 058d5a284..c3f6dd6c8 100644 --- a/packages/sql/tests/inheritance.spec.ts +++ b/packages/sql/tests/inheritance.spec.ts @@ -1,7 +1,7 @@ import { AutoIncrement, entity, PrimaryKey, ReflectionKind } from '@deepkit/type'; -import { SchemaParser } from '../src/reverse/schema-parser'; -import { DatabaseModel } from '../src/schema/table'; -import { DefaultPlatform } from '../src/platform/default-platform'; +import { SchemaParser } from '../src/reverse/schema-parser.js'; +import { DatabaseModel } from '../src/schema/table.js'; +import { DefaultPlatform } from '../src/platform/default-platform.js'; import { expect, test } from '@jest/globals'; import { DatabaseEntityRegistry } from '@deepkit/orm'; diff --git a/packages/sql/tests/migration.spec.ts b/packages/sql/tests/migration.spec.ts index ac70ea66a..308f439c6 100644 --- a/packages/sql/tests/migration.spec.ts +++ b/packages/sql/tests/migration.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from '@jest/globals'; import { AutoIncrement, entity, Index, PrimaryKey, Reference, ReflectionClass, ReflectionKind, Unique } from '@deepkit/type'; -import { DatabaseModel, IndexModel } from '../src/schema/table'; -import { DefaultPlatform } from '../src/platform/default-platform'; -import { SchemaParser } from '../src/reverse/schema-parser'; +import { DatabaseModel, IndexModel } from '../src/schema/table.js'; +import { DefaultPlatform } from '../src/platform/default-platform.js'; +import { SchemaParser } from '../src/reverse/schema-parser.js'; import { DatabaseEntityRegistry } from '@deepkit/orm'; @entity.name('user') diff --git a/packages/sql/tests/setup.ts b/packages/sql/tests/setup.ts index 5fc17b4fb..14db97ee3 100644 --- a/packages/sql/tests/setup.ts +++ b/packages/sql/tests/setup.ts @@ -1,6 +1,6 @@ import { Database } from '@deepkit/orm'; import { ClassType } from '@deepkit/core'; -import { SQLDatabaseAdapter } from '../src/sql-adapter'; +import { SQLDatabaseAdapter } from '../src/sql-adapter.js'; import { ReflectionClass } from '@deepkit/type'; export async function createSetup(adapter: SQLDatabaseAdapter, schemas: (ReflectionClass | ClassType)[]) { diff --git a/packages/sql/tests/sql-query.spec.ts b/packages/sql/tests/sql-query.spec.ts index e68afbd04..72d2f2f1c 100644 --- a/packages/sql/tests/sql-query.spec.ts +++ b/packages/sql/tests/sql-query.spec.ts @@ -1,12 +1,12 @@ import { expect, test } from '@jest/globals'; import { entity, ReflectionClass, ReflectionKind, serializer } from '@deepkit/type'; -import { SQLFilterBuilder } from '../src/sql-filter-builder'; +import { SQLFilterBuilder } from '../src/sql-filter-builder.js'; import { escape } from 'sqlstring'; -import { sql, SQLQueryModel } from '../src/sql-adapter'; -import { DefaultPlatform, SqlPlaceholderStrategy } from '../src/platform/default-platform'; -import { SchemaParser } from '../src/reverse/schema-parser'; -import { DatabaseModel } from '../src/schema/table'; -import { SqlBuilder } from '../src/sql-builder'; +import { sql, SQLQueryModel } from '../src/sql-adapter.js'; +import { DefaultPlatform, SqlPlaceholderStrategy } from '../src/platform/default-platform.js'; +import { SchemaParser } from '../src/reverse/schema-parser.js'; +import { DatabaseModel } from '../src/schema/table.js'; +import { SqlBuilder } from '../src/sql-builder.js'; function quoteId(value: string): string { return value; diff --git a/packages/sql/tsconfig.json b/packages/sql/tsconfig.json index 49d826b64..4b5aacb5c 100644 --- a/packages/sql/tsconfig.json +++ b/packages/sql/tsconfig.json @@ -49,4 +49,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/sqlite/index.ts b/packages/sqlite/index.ts index 437ff86d4..e6fa12dc8 100644 --- a/packages/sqlite/index.ts +++ b/packages/sqlite/index.ts @@ -8,6 +8,6 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/sqlite-adapter'; -export * from './src/sqlite-platform'; -export * from './src/sqlite-serializer'; +export * from './src/sqlite-adapter.js'; +export * from './src/sqlite-platform.js'; +export * from './src/sqlite-serializer.js'; diff --git a/packages/sqlite/package-lock.json b/packages/sqlite/package-lock.json index 98c8961ce..449330284 100644 --- a/packages/sqlite/package-lock.json +++ b/packages/sqlite/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/sqlite", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/better-sqlite3": "^5.4.1", diff --git a/packages/sqlite/package.json b/packages/sqlite/package.json index 00f9528a7..77a20c2fa 100644 --- a/packages/sqlite/package.json +++ b/packages/sqlite/package.json @@ -42,7 +42,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "runner": "../../jest-serial-runner.js", "testEnvironment": "node", "transform": { diff --git a/packages/sqlite/src/sqlite-adapter.ts b/packages/sqlite/src/sqlite-adapter.ts index 5d4d3d976..af08bd67b 100644 --- a/packages/sqlite/src/sqlite-adapter.ts +++ b/packages/sqlite/src/sqlite-adapter.ts @@ -36,7 +36,7 @@ import { } from '@deepkit/sql'; import { Changes, getPartialSerializeFunction, getSerializeFunction, ReceiveType, ReflectionClass, resolvePath } from '@deepkit/type'; import sqlite3 from 'better-sqlite3'; -import { SQLitePlatform } from './sqlite-platform'; +import { SQLitePlatform } from './sqlite-platform.js'; import { FrameCategory, Stopwatch } from '@deepkit/stopwatch'; export class SQLiteStatement extends SQLStatement { diff --git a/packages/sqlite/src/sqlite-platform.ts b/packages/sqlite/src/sqlite-platform.ts index 457e232b3..04381e90e 100644 --- a/packages/sqlite/src/sqlite-platform.ts +++ b/packages/sqlite/src/sqlite-platform.ts @@ -10,9 +10,9 @@ import { Column, DefaultPlatform, ForeignKey, isSet, Sql, Table, TableDiff } from '@deepkit/sql'; import { isDateType, isIntegerType, isMapType, isSetType, isUUIDType, ReflectionClass, ReflectionKind, ReflectionProperty, Serializer, Type } from '@deepkit/type'; -import { SQLiteSchemaParser } from './sqlite-schema-parser'; -import { sqliteSerializer } from './sqlite-serializer'; -import { SQLiteFilterBuilder } from './sql-filter-builder.sqlite'; +import { SQLiteSchemaParser } from './sqlite-schema-parser.js'; +import { sqliteSerializer } from './sqlite-serializer.js'; +import { SQLiteFilterBuilder } from './sql-filter-builder.sqlite.js'; import { isArray, isObject } from '@deepkit/core'; import sqlstring from 'sqlstring-sqlite'; diff --git a/packages/sqlite/src/sqlite-schema-parser.ts b/packages/sqlite/src/sqlite-schema-parser.ts index 8cfbde020..e5063510f 100644 --- a/packages/sqlite/src/sqlite-schema-parser.ts +++ b/packages/sqlite/src/sqlite-schema-parser.ts @@ -10,7 +10,7 @@ import { DatabaseModel, ForeignKey, Table, parseType, SchemaParser, Column } from '@deepkit/sql'; import { arrayRemoveItem } from '@deepkit/core'; -import { isJsonLike } from './sqlite-platform'; +import { isJsonLike } from './sqlite-platform.js'; export class SQLiteSchemaParser extends SchemaParser { async parse(database: DatabaseModel, limitTableNames?: string[]) { diff --git a/packages/sqlite/tests/factory.ts b/packages/sqlite/tests/factory.ts index a3306dd28..673df816d 100644 --- a/packages/sqlite/tests/factory.ts +++ b/packages/sqlite/tests/factory.ts @@ -1,6 +1,6 @@ import { Database } from '@deepkit/orm'; import { DatabaseFactory } from '@deepkit/orm-integration'; -import { SQLiteDatabaseAdapter } from '../src/sqlite-adapter'; +import { SQLiteDatabaseAdapter } from '../src/sqlite-adapter.js'; import { mkdtempSync } from 'fs'; import { join } from 'path'; diff --git a/packages/sqlite/tests/integration.spec.ts b/packages/sqlite/tests/integration.spec.ts index 516c6f273..8cceceaf2 100644 --- a/packages/sqlite/tests/integration.spec.ts +++ b/packages/sqlite/tests/integration.spec.ts @@ -1,6 +1,6 @@ import { test } from '@jest/globals'; import { runIntegrationTests } from '@deepkit/orm-integration'; -import { databaseFactory } from './factory'; +import { databaseFactory } from './factory.js'; runIntegrationTests(databaseFactory); diff --git a/packages/sqlite/tests/migration.spec.ts b/packages/sqlite/tests/migration.spec.ts index 3bb70be46..98c8cee0c 100644 --- a/packages/sqlite/tests/migration.spec.ts +++ b/packages/sqlite/tests/migration.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { schemaMigrationRoundTrip } from '@deepkit/sql'; import { AutoIncrement, Entity, integer, MySQL, PrimaryKey, Reference, SQLite, typeOf, Unique } from '@deepkit/type'; -import { SQLiteDatabaseAdapter } from '../src/sqlite-adapter'; +import { SQLiteDatabaseAdapter } from '../src/sqlite-adapter.js'; import { DatabaseEntityRegistry } from '@deepkit/orm'; test('custom type', async () => { diff --git a/packages/sqlite/tests/sqlite.spec.ts b/packages/sqlite/tests/sqlite.spec.ts index 36716baa1..76e1be562 100644 --- a/packages/sqlite/tests/sqlite.spec.ts +++ b/packages/sqlite/tests/sqlite.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from '@jest/globals'; -import { SQLitePlatform } from '../src/sqlite-platform'; -import { databaseFactory } from './factory'; +import { SQLitePlatform } from '../src/sqlite-platform.js'; +import { databaseFactory } from './factory.js'; import { User, UserCredentials } from '@deepkit/orm-integration'; -import { SQLiteDatabaseAdapter, SQLiteDatabaseTransaction } from '../src/sqlite-adapter'; +import { SQLiteDatabaseAdapter, SQLiteDatabaseTransaction } from '../src/sqlite-adapter.js'; import { sleep } from '@deepkit/core'; import { AutoIncrement, cast, Entity, entity, PrimaryKey, Reference, ReflectionClass, serialize, typeOf, UUID, uuid } from '@deepkit/type'; import { Database, DatabaseEntityRegistry } from '@deepkit/orm'; diff --git a/packages/stopwatch/index.ts b/packages/stopwatch/index.ts index 5f9bc5d8f..a77a837c7 100644 --- a/packages/stopwatch/index.ts +++ b/packages/stopwatch/index.ts @@ -1,2 +1,2 @@ -export * from './src/stopwatch'; -export * from './src/types'; +export * from './src/stopwatch.js'; +export * from './src/types.js'; diff --git a/packages/stopwatch/package.json b/packages/stopwatch/package.json index 1856727aa..a81c7628e 100644 --- a/packages/stopwatch/package.json +++ b/packages/stopwatch/package.json @@ -29,7 +29,10 @@ "@deepkit/core": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/stopwatch/src/stopwatch.ts b/packages/stopwatch/src/stopwatch.ts index 0471cc5a5..b2e372ddb 100644 --- a/packages/stopwatch/src/stopwatch.ts +++ b/packages/stopwatch/src/stopwatch.ts @@ -7,7 +7,7 @@ * * You should have received a copy of the MIT License along with this program. */ -import { FrameCategory, FrameCategoryModel, FrameData, FrameEnd, FrameStart, FrameType } from './types'; +import { FrameCategory, FrameCategoryModel, FrameData, FrameEnd, FrameStart, FrameType } from './types.js'; export abstract class StopwatchStore { public frameQueue: (FrameStart | FrameEnd)[] = []; diff --git a/packages/stopwatch/tests/stopwatch.spec.ts b/packages/stopwatch/tests/stopwatch.spec.ts index 8f7e7adfc..0e95815d7 100644 --- a/packages/stopwatch/tests/stopwatch.spec.ts +++ b/packages/stopwatch/tests/stopwatch.spec.ts @@ -1,5 +1,5 @@ -import { Stopwatch, StopwatchStore } from '../src/stopwatch'; -import { FrameCategory } from '../src/types'; +import { Stopwatch, StopwatchStore } from '../src/stopwatch.js'; +import { FrameCategory } from '../src/types.js'; import { expect, test } from '@jest/globals'; class Store extends StopwatchStore { diff --git a/packages/stopwatch/tsconfig.json b/packages/stopwatch/tsconfig.json index b3200504a..ed2c80830 100644 --- a/packages/stopwatch/tsconfig.json +++ b/packages/stopwatch/tsconfig.json @@ -29,4 +29,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/template/index.ts b/packages/template/index.ts index 1ff4fdf52..1b7bc3918 100644 --- a/packages/template/index.ts +++ b/packages/template/index.ts @@ -1,2 +1,2 @@ -export * from './src/template'; -export * from './src/optimize-tsx'; +export * from './src/template.js'; +export * from './src/optimize-tsx.js'; diff --git a/packages/template/jsx-runtime.ts b/packages/template/jsx-runtime.ts index 1af8d6f83..f48fc9634 100644 --- a/packages/template/jsx-runtime.ts +++ b/packages/template/jsx-runtime.ts @@ -1,11 +1,11 @@ /// -import { Attributes, createElement, Element, html } from './src/template'; -import { escape, escapeAttribute, safe, safeString } from './src/utils'; -import './src/optimize-tsx'; +import { Attributes, createElement, Element, html } from './src/template.js'; +import { escape, escapeAttribute, safe, safeString } from './src/utils.js'; +import './src/optimize-tsx.js'; -export { createElement, html } from './src/template'; -export { escape, escapeAttribute, safeString, safe } from './src/utils'; +export { createElement, html } from './src/template.js'; +export { escape, escapeAttribute, safeString, safe } from './src/utils.js'; export function jsx(element: Element, attributes?: Attributes | string | null) { return { render: element, attributes }; @@ -15,9 +15,14 @@ export function jsxs(element: Element, attributes?: Attributes | string | null) return { render: element, attributes }; } +const jsxFragment: string | undefined = undefined; + jsx.createElement = createElement; jsx.html = html; jsx.escape = escape; jsx.escapeAttribute = escapeAttribute; jsx.safeString = safeString; jsx.safe = safe; +jsx.Fragment = jsxFragment as string | undefined; + +export { jsxFragment as Fragment } \ No newline at end of file diff --git a/packages/template/package-lock.json b/packages/template/package-lock.json index 66b704a05..4084e0e3b 100644 --- a/packages/template/package-lock.json +++ b/packages/template/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/template", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/estree": "^0.0.45", diff --git a/packages/template/package.json b/packages/template/package.json index 2c4fecd1d..30a48bc40 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -41,7 +41,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/template/src/optimize-tsx.ts b/packages/template/src/optimize-tsx.ts index 314698b6b..7c8606428 100644 --- a/packages/template/src/optimize-tsx.ts +++ b/packages/template/src/optimize-tsx.ts @@ -30,8 +30,8 @@ import type { // @ts-ignore import abstractSyntaxTree from 'abstract-syntax-tree'; import { inDebugMode } from '@deepkit/core'; -import { escape, escapeHtml } from './utils'; -import { voidElements } from './template'; +import { escape, escapeHtml } from './utils.js'; +import { voidElements } from './template.js'; const { parse, generate, replace } = abstractSyntaxTree; diff --git a/packages/template/src/template.ts b/packages/template/src/template.ts index 09c601c99..0e6ce7a35 100644 --- a/packages/template/src/template.ts +++ b/packages/template/src/template.ts @@ -8,10 +8,10 @@ * You should have received a copy of the MIT License along with this program. */ import { ClassType, getClassName, isArray, isClass } from '@deepkit/core'; -import './optimize-tsx'; +import './optimize-tsx.js'; import { injectedFunction, Injector, Resolver } from '@deepkit/injector'; import { FrameCategory, Stopwatch } from '@deepkit/stopwatch'; -import { escapeAttribute, escapeHtml, safeString } from './utils'; +import { escapeAttribute, escapeHtml, safeString } from './utils.js'; import { reflect, ReflectionClass, ReflectionKind, Type } from '@deepkit/type'; export type Attributes = { diff --git a/packages/template/tsconfig.json b/packages/template/tsconfig.json index a1844f693..9d1671b04 100644 --- a/packages/template/tsconfig.json +++ b/packages/template/tsconfig.json @@ -38,4 +38,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/topsort/index.ts b/packages/topsort/index.ts index 9cbfc1a54..331c61b53 100644 --- a/packages/topsort/index.ts +++ b/packages/topsort/index.ts @@ -8,6 +8,6 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/array-sort'; -export * from './src/group-array-sort'; -export * from './src/base'; +export * from './src/array-sort.js'; +export * from './src/group-array-sort.js'; +export * from './src/base.js'; diff --git a/packages/topsort/package.json b/packages/topsort/package.json index e96dfe935..5f46fee92 100644 --- a/packages/topsort/package.json +++ b/packages/topsort/package.json @@ -22,7 +22,10 @@ "repository": "https://github.com/deepkit/deepkit-framework", "author": "Marc J. Schmidt ", "license": "MIT", - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/topsort/src/array-sort.ts b/packages/topsort/src/array-sort.ts index cca0785de..64bf163dc 100644 --- a/packages/topsort/src/array-sort.ts +++ b/packages/topsort/src/array-sort.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseImplementation, ElementNotFoundException } from './base'; +import { BaseImplementation, ElementNotFoundException } from './base.js'; interface ItemElement { item: T, diff --git a/packages/topsort/src/group-array-sort.ts b/packages/topsort/src/group-array-sort.ts index 6e604a5cf..cf67a288a 100644 --- a/packages/topsort/src/group-array-sort.ts +++ b/packages/topsort/src/group-array-sort.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -import { BaseImplementation, ElementNotFoundException } from './base'; +import { BaseImplementation, ElementNotFoundException } from './base.js'; interface ItemElement { item: T; diff --git a/packages/topsort/tests/group-sort.spec.ts b/packages/topsort/tests/group-sort.spec.ts index b934f5bde..520ebb87a 100644 --- a/packages/topsort/tests/group-sort.spec.ts +++ b/packages/topsort/tests/group-sort.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { GroupArraySort } from '../src/group-array-sort'; -import { CircularDependencyException, ElementNotFoundException } from '../src/base'; -import { bench } from './utils'; +import { GroupArraySort } from '../src/group-array-sort.js'; +import { CircularDependencyException, ElementNotFoundException } from '../src/base.js'; +import { bench } from './utils.js'; import { fail } from 'assert'; function getElementsGroup(count: number) { diff --git a/packages/topsort/tests/sort.spec.ts b/packages/topsort/tests/sort.spec.ts index 84f424d5f..538be2820 100644 --- a/packages/topsort/tests/sort.spec.ts +++ b/packages/topsort/tests/sort.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { ArraySort } from '../src/array-sort'; -import { bench } from './utils'; -import { CircularDependencyException, ElementNotFoundException } from '../src/base'; +import { ArraySort } from '../src/array-sort.js'; +import { bench } from './utils.js'; +import { CircularDependencyException, ElementNotFoundException } from '../src/base.js'; import { fail } from 'assert'; function getElementsFlat(count: number) { diff --git a/packages/type-angular/index.ts b/packages/type-angular/index.ts index c3317e1ae..cb9c36833 100644 --- a/packages/type-angular/index.ts +++ b/packages/type-angular/index.ts @@ -8,4 +8,4 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/form'; +export * from './src/form.js'; diff --git a/packages/type-angular/package-lock.json b/packages/type-angular/package-lock.json index 45c97d4d2..9a136308c 100644 --- a/packages/type-angular/package-lock.json +++ b/packages/type-angular/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/type-angular", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "devDependencies": { "@angular/core": "~10.2.3 || ~11.0.0", diff --git a/packages/type-angular/package.json b/packages/type-angular/package.json index 22cf9878e..e88003dc6 100644 --- a/packages/type-angular/package.json +++ b/packages/type-angular/package.json @@ -23,7 +23,10 @@ "@deepkit/type": "^1.0.1-alpha.75", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/type-compiler/index.ts b/packages/type-compiler/index.ts index dc8fbfcc8..7a00b82e9 100644 --- a/packages/type-compiler/index.ts +++ b/packages/type-compiler/index.ts @@ -8,5 +8,5 @@ * You should have received a copy of the MIT License along with this program. */ -export * from './src/compiler'; -export * from './src/loader'; +export * from './src/compiler.js'; +export * from './src/loader.js'; diff --git a/packages/type-compiler/package-lock.json b/packages/type-compiler/package-lock.json index b6b5f0e27..81f848288 100644 --- a/packages/type-compiler/package-lock.json +++ b/packages/type-compiler/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/type-compiler", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/lz-string": "^1.3.34", diff --git a/packages/type-compiler/package.json b/packages/type-compiler/package.json index f82cecbff..a6eddbf3f 100644 --- a/packages/type-compiler/package.json +++ b/packages/type-compiler/package.json @@ -30,6 +30,7 @@ "typescript": "~" }, "dependencies": { + "@deepkit/core": "^1.0.1-alpha.74", "@deepkit/type-spec": "^1.0.1-alpha.74", "@types/lz-string": "^1.3.34", "@typescript/vfs": "^1.3.5", @@ -37,7 +38,10 @@ "strip-json-comments": "^3.1.1", "ts-clone-node": "^0.3.29" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" @@ -45,9 +49,6 @@ "testMatch": [ "**/tests/**/*.spec.ts" ], - "moduleNameMapper": { - "(.+)\\.js": "$1" - }, "globals": { "ts-jest": { "tsconfig": "/tsconfig.test.json" diff --git a/packages/type-compiler/src/compiler.ts b/packages/type-compiler/src/compiler.ts index 0a3a98431..4f60920af 100644 --- a/packages/type-compiler/src/compiler.ts +++ b/packages/type-compiler/src/compiler.ts @@ -850,7 +850,7 @@ export class ReflectionTransformer implements CustomTransformer { )], NodeFlags.Const)); embedTopExpression.push(variable); } else { - //import {identifier} from './bar' + //import {identifier} from './bar.js' // import { identifier as identifier } is used to avoid automatic elision of imports (in angular builds for example) // that's probably a bit unstable. const specifier = this.f.createImportSpecifier(false, imp.identifier, imp.identifier); diff --git a/packages/type-compiler/src/reflection-ast.ts b/packages/type-compiler/src/reflection-ast.ts index a313144e1..e6e876fe9 100644 --- a/packages/type-compiler/src/reflection-ast.ts +++ b/packages/type-compiler/src/reflection-ast.ts @@ -40,7 +40,7 @@ import { unescapeLeadingUnderscores } from 'typescript'; import { cloneNode as tsNodeClone, CloneNodeHook } from 'ts-clone-node'; -import { SourceFile } from './ts-types'; +import { SourceFile } from './ts-types.js'; export type PackExpression = Expression | string | number | boolean | bigint; diff --git a/packages/type-compiler/tests/transform.spec.ts b/packages/type-compiler/tests/transform.spec.ts index 68741fb1b..f17196a61 100644 --- a/packages/type-compiler/tests/transform.spec.ts +++ b/packages/type-compiler/tests/transform.spec.ts @@ -1,12 +1,12 @@ import * as ts from 'typescript'; import { createSourceFile, ScriptTarget } from 'typescript'; import { expect, test } from '@jest/globals'; -import { ReflectionTransformer } from '../src/compiler'; -import { transform } from './utils'; +import { ReflectionTransformer } from '../src/compiler.js'; +import { transform } from './utils.js'; test('transform simple', () => { const sourceFile = createSourceFile('app.ts', ` - import { Logger } from './logger'; + import { Logger } from './logger.js'; function fn(logger: Logger) {} `, ScriptTarget.ESNext); @@ -26,7 +26,7 @@ test('transform util', () => { test('resolve import ts', () => { const res = transform({ 'app': ` - import { Logger } from './logger'; + import { Logger } from './logger.js'; function fn(logger: Logger) {} `, 'logger': `export class Logger {}` @@ -40,7 +40,7 @@ test('resolve import ts', () => { test('resolve import d.ts', () => { const res = transform({ 'app': ` - import { Logger } from './logger'; + import { Logger } from './logger.js'; function fn(logger: Logger) {} `, 'logger.d.ts': `export declare class Logger {}` diff --git a/packages/type-compiler/tests/transpile.spec.ts b/packages/type-compiler/tests/transpile.spec.ts index 6fe6f8ab8..c56c4d10d 100644 --- a/packages/type-compiler/tests/transpile.spec.ts +++ b/packages/type-compiler/tests/transpile.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { transpile, transpileAndRun } from './utils'; +import { transpile, transpileAndRun } from './utils.js'; test('function __type', () => { const res = transpile({ app: `function log(message: string) {}` }); @@ -10,7 +10,7 @@ test('function __type', () => { test('resolve import ts', () => { const res = transpile({ 'app': ` - import { Logger } from './logger'; + import { Logger } from './logger.js'; function fn(logger: Logger) {} `, 'logger': `export class Logger {}` @@ -24,7 +24,7 @@ test('resolve import ts', () => { test('resolve import d.ts', () => { const res = transpile({ 'app': ` - import { Logger } from './logger'; + import { Logger } from './logger.js'; function fn(logger: Logger) {} `, 'logger.d.ts': `export declare class Logger {}` diff --git a/packages/type-compiler/tests/utils.ts b/packages/type-compiler/tests/utils.ts index b00f3345e..107515c8a 100644 --- a/packages/type-compiler/tests/utils.ts +++ b/packages/type-compiler/tests/utils.ts @@ -1,15 +1,15 @@ import * as ts from 'typescript'; import { createSourceFile, getPreEmitDiagnostics, ScriptTarget, TransformationContext } from 'typescript'; import { createSystem, createVirtualCompilerHost, knownLibFilesForCompilerOptions } from '@typescript/vfs'; -import { ReflectionTransformer } from '../src/compiler'; +import { ReflectionTransformer } from '../src/compiler.js'; import { readFileSync } from 'fs'; import { dirname, join } from 'path'; -import { first } from '@deepkit/core'; -const defaultLibLocation = __dirname + '/node_modules/typescript/lib/'; +const _dirname = __dirname; +const defaultLibLocation = _dirname + '/node_modules/typescript/lib/'; function fullPath(fileName: string): string { - return __dirname + '/' + fileName + (fileName.includes('.') ? '' : '.ts'); + return _dirname + '/' + fileName + (fileName.includes('.') ? '' : '.ts'); } function readLibs(compilerOptions: ts.CompilerOptions, files: Map) { @@ -109,7 +109,7 @@ export function transpile(files: Record, options: ts.CompilerOpt const res: Record = {}; program.emit(undefined, (fileName, data) => { - res[fileName.slice(__dirname.length + 1).replace(/\.js$/, '')] = data; + res[fileName.slice(_dirname.length + 1).replace(/\.js$/, '')] = data; }, undefined, undefined, { before: [(context: TransformationContext) => new ReflectionTransformer(context).forHost(host.compilerHost).withReflectionMode('always')], }); diff --git a/packages/type-compiler/tsconfig.esm.json b/packages/type-compiler/tsconfig.esm.json index 5a29fcba1..ee09631d7 100644 --- a/packages/type-compiler/tsconfig.esm.json +++ b/packages/type-compiler/tsconfig.esm.json @@ -6,7 +6,10 @@ }, "references": [ { - "path": "../type-spec/tsconfig.json" + "path": "../core/tsconfig.esm.json" + }, + { + "path": "../type-spec/tsconfig.esm.json" } ] -} +} \ No newline at end of file diff --git a/packages/type-compiler/tsconfig.json b/packages/type-compiler/tsconfig.json index e413115a6..6238d1b5d 100644 --- a/packages/type-compiler/tsconfig.json +++ b/packages/type-compiler/tsconfig.json @@ -22,8 +22,11 @@ "index.ts" ], "references": [ + { + "path": "../core/tsconfig.json" + }, { "path": "../type-spec/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/type-spec/package.json b/packages/type-spec/package.json index 8f38dc26b..0bd05d598 100644 --- a/packages/type-spec/package.json +++ b/packages/type-spec/package.json @@ -22,7 +22,10 @@ "repository": "https://github.com/deepkit/deepkit-framework", "author": "Marc J. Schmidt ", "license": "MIT", - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" diff --git a/packages/type-spec/tsconfig.esm.json b/packages/type-spec/tsconfig.esm.json index 26b81a50b..ffac6ec56 100644 --- a/packages/type-spec/tsconfig.esm.json +++ b/packages/type-spec/tsconfig.esm.json @@ -4,6 +4,5 @@ "outDir": "./dist/esm", "module": "ES2020" }, - "references": [ - ] -} + "references": [] +} \ No newline at end of file diff --git a/packages/type-spec/tsconfig.json b/packages/type-spec/tsconfig.json index d2583ab90..53e324eba 100644 --- a/packages/type-spec/tsconfig.json +++ b/packages/type-spec/tsconfig.json @@ -21,6 +21,5 @@ "tests", "index.ts" ], - "references": [ - ] -} + "references": [] +} \ No newline at end of file diff --git a/packages/type/package-lock.json b/packages/type/package-lock.json index e1b910c41..13e455933 100644 --- a/packages/type/package-lock.json +++ b/packages/type/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@deepkit/type", - "version": "1.0.1-alpha.71", + "version": "1.0.1-alpha.72", "license": "MIT", "dependencies": { "@types/uuid": "^8.3.0", diff --git a/packages/type/package.json b/packages/type/package.json index 9ec191ae4..e6e524b68 100644 --- a/packages/type/package.json +++ b/packages/type/package.json @@ -39,7 +39,10 @@ "@typescript/vfs": "^1.3.5", "lz-string": "^1.4.4" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "testEnvironment": "node", "transform": { "^.+\\.(ts|tsx)$": "ts-jest" @@ -47,9 +50,6 @@ "testMatch": [ "**/tests/**/*.spec.ts" ], - "moduleNameMapper": { - "(.+)\\.js": "$1" - }, "globals": { "ts-jest": { "tsconfig": "/tsconfig.test.json" diff --git a/packages/type/src/inheritance.ts b/packages/type/src/inheritance.ts index 495197657..c8777e69a 100644 --- a/packages/type/src/inheritance.ts +++ b/packages/type/src/inheritance.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ -// import { ClassSchema, PropertySchema } from './model'; +// import { ClassSchema, PropertySchema } from './model.js'; // // // export function findCommonDiscriminant(classSchemas: ClassSchema[]): string | undefined { diff --git a/packages/type/tests/advanced.spec.ts b/packages/type/tests/advanced.spec.ts index 312525165..1e8804c16 100644 --- a/packages/type/tests/advanced.spec.ts +++ b/packages/type/tests/advanced.spec.ts @@ -9,10 +9,10 @@ */ import { expect, test } from '@jest/globals'; -import { typeOf } from '../src/reflection/reflection'; -import { assertType, ReflectionKind, stringifyResolvedType, Type } from '../src/reflection/type'; -import { serialize } from '../src/serializer-facade'; -import { expectEqualType } from './utils'; +import { typeOf } from '../src/reflection/reflection.js'; +import { assertType, ReflectionKind, stringifyResolvedType, Type } from '../src/reflection/type.js'; +import { serialize } from '../src/serializer-facade.js'; +import { expectEqualType } from './utils.js'; test('array stack', () => { type Pop = T extends [...infer U, unknown] ? U : never diff --git a/packages/type/tests/change-detection.spec.ts b/packages/type/tests/change-detection.spec.ts index add6a9182..a599e8b6a 100644 --- a/packages/type/tests/change-detection.spec.ts +++ b/packages/type/tests/change-detection.spec.ts @@ -1,10 +1,10 @@ import { expect, test } from '@jest/globals'; -import { deserialize } from '../src/serializer-facade'; -import { createSnapshot } from '../src/snapshot'; -import { ReflectionClass, resolveClassType, typeOf } from '../src/reflection/reflection'; -import { buildChanges } from '../src/change-detector'; -import { atomicChange } from '../src/changes'; -import { ReflectionKind } from '../src/reflection/type'; +import { deserialize } from '../src/serializer-facade.js'; +import { createSnapshot } from '../src/snapshot.js'; +import { ReflectionClass, resolveClassType, typeOf } from '../src/reflection/reflection.js'; +import { buildChanges } from '../src/change-detector.js'; +import { atomicChange } from '../src/changes.js'; +import { ReflectionKind } from '../src/reflection/type.js'; test('change-detection string', () => { interface s { diff --git a/packages/type/tests/compiler.spec.ts b/packages/type/tests/compiler.spec.ts index 3ba965195..0ac511d39 100644 --- a/packages/type/tests/compiler.spec.ts +++ b/packages/type/tests/compiler.spec.ts @@ -3,7 +3,7 @@ import { describe, expect, test } from '@jest/globals'; import * as ts from 'typescript'; import { getPreEmitDiagnostics, ModuleKind, ScriptTarget, TransformationContext, transpileModule } from 'typescript'; import { DeclarationTransformer, ReflectionTransformer, transformer } from '@deepkit/type-compiler'; -import { reflect, reflect as reflect2, ReflectionClass, removeTypeName, typeOf as typeOf2 } from '../src/reflection/reflection'; +import { reflect, reflect as reflect2, ReflectionClass, removeTypeName, typeOf as typeOf2 } from '../src/reflection/reflection.js'; import { assertType, defaultAnnotation, @@ -18,11 +18,11 @@ import { TypeObjectLiteral, TypeProperty, TypeUnion -} from '../src/reflection/type'; +} from '../src/reflection/type.js'; import { ReflectionOp } from '@deepkit/type-spec'; import { ClassType, isObject } from '@deepkit/core'; -import { pack, resolveRuntimeType, typeInfer } from '../src/reflection/processor'; -import { expectEqualType } from './utils'; +import { pack, resolveRuntimeType, typeInfer } from '../src/reflection/processor.js'; +import { expectEqualType } from './utils.js'; import { createSystem, createVirtualCompilerHost, knownLibFilesForCompilerOptions } from '@typescript/vfs'; import { dirname, join } from 'path'; import { readFileSync } from 'fs'; @@ -184,30 +184,30 @@ const tests: [code: string | { [file: string]: string }, contains: string | stri // [`class Entity { p: Record; }`, `['p', ${packString([ReflectionOp.number, ReflectionOp.number, ReflectionOp.indexSignature, ReflectionOp.objectLiteral, ReflectionOp.property, 0, ReflectionOp.class])}]`], // // [{ - // app: `import {MyEnum} from './enum'; class Entity { p: MyEnum;}`, + // app: `import {MyEnum} from './enum.js'; class Entity { p: MyEnum;}`, // enum: `export enum MyEnum {}` // }, `[() => MyEnum, 'p', ${packString([ReflectionOp.enum, 0, ReflectionOp.property, 1, ReflectionOp.class])}]`], // // [{ - // app: `import {Model} from './model'; class Entity { p: Model;}`, + // app: `import {Model} from './model.js'; class Entity { p: Model;}`, // model: `export class Model {}` // }, `[() => Model, 'p', ${packString([ReflectionOp.classReference, 0, ReflectionOp.property, 1, ReflectionOp.class])}]`], // [{ - // app: `import {Pattern} from './model'; class Entity { p: Pattern;}`, + // app: `import {Pattern} from './model.js'; class Entity { p: Pattern;}`, // model: `export const REGEX = /abc/;\nexport type Pattern = {regex: typeof REGEX};` - // }, `import { REGEX } from './model'`], + // }, `import { REGEX } from './model.js'`], // [{ - // app: `import {Pattern} from './model'; class Entity { p: Pattern;}`, + // app: `import {Pattern} from './model.js'; class Entity { p: Pattern;}`, // model: `export const REGEX = /abc/;\ntype M = {name: T, regex: typeof REGEX}; type Pattern = M;` - // }, `import { REGEX } from './model'`], + // }, `import { REGEX } from './model.js'`], // [{ - // app: `import {Email} from './validator'; class Entity { p: Email;}`, + // app: `import {Email} from './validator.js'; class Entity { p: Email;}`, // validator: ` // export const REGEX = /abc/; // export type ValidatorMeta = { __meta?: { id: 'validator', name: Name, args: Args } } // export type Pattern = ValidatorMeta<'pattern', [T]> // export type Email = string & Pattern;` - // }, `import { EMAIL_REGEX } from './validator';`], + // }, `import { EMAIL_REGEX } from './validator.js';`], // // [`export interface MyInterface {id: number}; class Controller { public p: MyInterface[] = [];}`, // [ @@ -247,45 +247,45 @@ const tests: [code: string | { [file: string]: string }, contains: string | stri // // // Imported interfaces/types will be erased and inlined // [{ - // app: `import {Type} from './model'; class Entity { p: Type[];}`, + // app: `import {Type} from './model.js'; class Entity { p: Type[];}`, // model: `export type Type = {title: string}` // }, [ - // `!./model`, `!import {Type} from './model'`, + // `!./model`, `!import {Type} from './model.js'`, // `['title', 'p', ${packString([ReflectionOp.frame, ReflectionOp.string, ReflectionOp.propertySignature, 0, ReflectionOp.objectLiteral, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.class])}]`, // ]], // // [{ - // app: `import {Message, Model} from './model'; class Entity { p: Message[]; m: Model[];}`, + // app: `import {Message, Model} from './model.js'; class Entity { p: Message[]; m: Model[];}`, // model: `export type Message = number; export class Model {};` - // }, [`import { Model } from './model'`, `[__ΩMessage, 'p', () => Model, 'm', ${packString([ + // }, [`import { Model } from './model.js'`, `[__ΩMessage, 'p', () => Model, 'm', ${packString([ // ReflectionOp.inline, 0, ReflectionOp.array, ReflectionOp.property, 1, // ReflectionOp.classReference, 2, ReflectionOp.array, ReflectionOp.property, 3, ReflectionOp.class])}]`]], // // [{ - // app: `import {Type} from './model'; class Entity { p: Type[];}`, + // app: `import {Type} from './model.js'; class Entity { p: Type[];}`, // model: `export interface Type {title: string}` - // }, [`!./model`, `!import {Type} from './model'`]], + // }, [`!./model`, `!import {Type} from './model.js'`]], // // // multiple exports can be resolved // [{ - // app: `import {Type, Model} from './myPackage'; class Entity { p: Type[]; p2: Model[]};`, - // myPackage: `export * from './myPackageModel';`, + // app: `import {Type, Model} from './myPackage.js'; class Entity { p: Type[]; p2: Model[]};`, + // myPackage: `export * from './myPackageModel.js';`, // myPackageModel: `export interface Type {title: string}; export class Model {}` - // }, [`import { Model } from './myPackage'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ + // }, [`import { Model } from './myPackage.js'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ // ReflectionOp.inline, 0, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.classReference, 2, ReflectionOp.array, ReflectionOp.property, 3, ReflectionOp.class])}]`]], // // [{ - // app: `import {Type, Model} from './myPackage'; class Entity { p: Type[]; p2: Model[]};`, - // myPackage: `export {Model, Type} from './myPackageModel';`, + // app: `import {Type, Model} from './myPackage.js'; class Entity { p: Type[]; p2: Model[]};`, + // myPackage: `export {Model, Type} from './myPackageModel.js';`, // myPackageModel: `export interface Type {title: string}; export class Model {}` - // }, [`import { Model } from './myPackage'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ + // }, [`import { Model } from './myPackage.js'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ // ReflectionOp.inline, 0, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.classReference, 2, ReflectionOp.array, ReflectionOp.property, 3, ReflectionOp.class])}]`]], // // [{ - // app: `import {Type, Model} from './myPackage'; class Entity { p: Type[]; p2: Model[]};`, - // myPackage: `export {MM as Model, TT as Type} from './myPackageModel';`, + // app: `import {Type, Model} from './myPackage.js'; class Entity { p: Type[]; p2: Model[]};`, + // myPackage: `export {MM as Model, TT as Type} from './myPackageModel.js';`, // myPackageModel: `export interface TT {title: string}; export class MM {}` - // }, [`import { Model } from './myPackage'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ + // }, [`import { Model } from './myPackage.js'`, `[__ΩType, 'p', () => Model, 'p2', ${packString([ // ReflectionOp.inline, 0, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.classReference, 2, ReflectionOp.array, ReflectionOp.property, 3, ReflectionOp.class])}]`]], // // [` @@ -302,9 +302,9 @@ const tests: [code: string | { [file: string]: string }, contains: string | stri // // // erasable types will be kept // [{ - // app: `import {Model} from './model'; class Entity { p: Model[];}`, + // app: `import {Model} from './model.js'; class Entity { p: Model[];}`, // model: `export class Model {}` - // }, [`[() => Model, 'p', ${packString([ReflectionOp.classReference, 0, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.class])}]`, `import { Model } from './model';`]], + // }, [`[() => Model, 'p', ${packString([ReflectionOp.classReference, 0, ReflectionOp.array, ReflectionOp.property, 1, ReflectionOp.class])}]`, `import { Model } from './model.js';`]], // // //functions // [`const fn = (param: string): void {}`, `const fn = Object.assign((param) => { }, { __type: ['param', '', ${packString([ReflectionOp.string, ReflectionOp.parameter, 0, ReflectionOp.void, ReflectionOp.function, 1])}] })`], @@ -1684,7 +1684,7 @@ test('InstanceType', () => { test('import types named import esm simple', () => { const js = transpile({ 'app': ` - import {User} from './user'; + import {User} from './user.js'; typeOf(); `, 'user': `export interface User {id: number}` @@ -1701,7 +1701,7 @@ test('import types named import esm simple', () => { test('import types named import esm', () => { const js = transpile({ 'app': ` - import {User} from './user'; + import {User} from './user.js'; export type bla = string; export const hi = 'yes'; type a = Partial; diff --git a/packages/type/tests/complex-filter.spec.ts b/packages/type/tests/complex-filter.spec.ts index dc018ab60..b49c59144 100644 --- a/packages/type/tests/complex-filter.spec.ts +++ b/packages/type/tests/complex-filter.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { typeOf } from '../src/reflection/reflection'; -import { cast } from '../src/serializer-facade'; +import { typeOf } from '../src/reflection/reflection.js'; +import { cast } from '../src/serializer-facade.js'; type BSONTypeAlias = | 'number' diff --git a/packages/type/tests/conditional-type.spec.ts b/packages/type/tests/conditional-type.spec.ts index d1f070a3b..3c8b7728f 100644 --- a/packages/type/tests/conditional-type.spec.ts +++ b/packages/type/tests/conditional-type.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { removeTypeName, typeOf } from '../src/reflection/reflection'; -import { ReflectionKind } from '../src/reflection/type'; -import { expectEqualType } from './utils'; +import { removeTypeName, typeOf } from '../src/reflection/reflection.js'; +import { ReflectionKind } from '../src/reflection/type.js'; +import { expectEqualType } from './utils.js'; test('distributed conditional type', () => { //when T is naked, it will be distributed diff --git a/packages/type/tests/decorator-builder.spec.ts b/packages/type/tests/decorator-builder.spec.ts index 01cbeb7a9..663098db8 100644 --- a/packages/type/tests/decorator-builder.spec.ts +++ b/packages/type/tests/decorator-builder.spec.ts @@ -6,7 +6,7 @@ import { createPropertyDecoratorContext, DecoratorAndFetchSignature, DualDecorator, ExtractApiDataType, ExtractClass, FluidDecorator, isDecoratorContext, mergeDecorator, PropertyDecoratorFn, PropertyDecoratorResult -} from '../src/decorator-builder'; +} from '../src/decorator-builder.js'; test('without host', () => { class Dec1Model { diff --git a/packages/type/tests/default.spec.ts b/packages/type/tests/default.spec.ts index 53717b6a1..981e48be1 100644 --- a/packages/type/tests/default.spec.ts +++ b/packages/type/tests/default.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { typeOf } from '../src/reflection/reflection'; -import { defaultValue } from '../src/default'; +import { typeOf } from '../src/reflection/reflection.js'; +import { defaultValue } from '../src/default.js'; test('default basic', () => { expect(defaultValue(typeOf())).toBe(undefined); diff --git a/packages/type/tests/document-scenario/document.ts b/packages/type/tests/document-scenario/document.ts index df93af3cc..3b322ea27 100644 --- a/packages/type/tests/document-scenario/document.ts +++ b/packages/type/tests/document-scenario/document.ts @@ -1,4 +1,4 @@ -import { uuid } from '../../src/utils'; +import { uuid } from '../../src/utils.js'; type MongoId = string & {__mongoId?: true}; type Primary = {__primary?: true}; diff --git a/packages/type/tests/generics.spec.ts b/packages/type/tests/generics.spec.ts index 8fd2f04c2..b30a906d3 100644 --- a/packages/type/tests/generics.spec.ts +++ b/packages/type/tests/generics.spec.ts @@ -9,10 +9,10 @@ */ import { expect, test } from '@jest/globals'; -import { typeInfer } from '../src/reflection/processor'; -import { removeTypeName, typeOf } from '../src/reflection/reflection'; -import { assertType, ReflectionKind, ReflectionVisibility, Type, Widen } from '../src/reflection/type'; -import { expectEqualType } from './utils'; +import { typeInfer } from '../src/reflection/processor.js'; +import { removeTypeName, typeOf } from '../src/reflection/reflection.js'; +import { assertType, ReflectionKind, ReflectionVisibility, Type, Widen } from '../src/reflection/type.js'; +import { expectEqualType } from './utils.js'; test('infer T from function primitive', () => { function fn(v: T) { diff --git a/packages/type/tests/integration.spec.ts b/packages/type/tests/integration.spec.ts index 49b823882..b3d92d74b 100644 --- a/packages/type/tests/integration.spec.ts +++ b/packages/type/tests/integration.spec.ts @@ -10,8 +10,8 @@ import { ClassType } from '@deepkit/core'; import { expect, test } from '@jest/globals'; -import { entity, t } from '../src/decorator'; -import { propertiesOf, reflect, ReflectionClass, ReflectionFunction, ReflectionMethod, typeOf, valuesOf } from '../src/reflection/reflection'; +import { entity, t } from '../src/decorator.js'; +import { propertiesOf, reflect, ReflectionClass, ReflectionFunction, ReflectionMethod, typeOf, valuesOf } from '../src/reflection/reflection.js'; import { annotateClass, assertType, @@ -49,13 +49,13 @@ import { TypeObjectLiteral, TypeTuple, Unique -} from '../src/reflection/type'; +} from '../src/reflection/type.js'; import { TypeNumberBrand } from '@deepkit/type-spec'; -import { validate, ValidatorError } from '../src/validator'; -import { expectEqualType } from './utils'; -import { MyAlias } from './types'; -import { resolveRuntimeType } from '../src/reflection/processor'; -import { uuid } from '../src/utils'; +import { validate, ValidatorError } from '../src/validator.js'; +import { expectEqualType } from './utils.js'; +import { MyAlias } from './types.js'; +import { resolveRuntimeType } from '../src/reflection/processor.js'; +import { uuid } from '../src/utils.js'; test('class', () => { class Entity { diff --git a/packages/type/tests/mixin.spec.ts b/packages/type/tests/mixin.spec.ts index 5b9abf0e9..8fe3a9bbb 100644 --- a/packages/type/tests/mixin.spec.ts +++ b/packages/type/tests/mixin.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { mixin } from '../src/mixin'; -import { assertType, AutoIncrement, PrimaryKey, ReflectionKind, resolveTypeMembers } from '../src/reflection/type'; -import { MinLength } from '../src/validator'; -import { reflect, ReflectionClass } from '../src/reflection/reflection'; -import { deserialize } from '../src/serializer-facade'; +import { mixin } from '../src/mixin.js'; +import { assertType, AutoIncrement, PrimaryKey, ReflectionKind, resolveTypeMembers } from '../src/reflection/type.js'; +import { MinLength } from '../src/validator.js'; +import { reflect, ReflectionClass } from '../src/reflection/reflection.js'; +import { deserialize } from '../src/serializer-facade.js'; test('mixin base', () => { class Timestampable { diff --git a/packages/type/tests/pack.spec.ts b/packages/type/tests/pack.spec.ts index 136bd8e42..f906fa32f 100644 --- a/packages/type/tests/pack.spec.ts +++ b/packages/type/tests/pack.spec.ts @@ -1,6 +1,6 @@ /** @reflection never */ import { expect, test } from '@jest/globals'; -import { pack, unpack } from '../src/reflection/processor'; +import { pack, unpack } from '../src/reflection/processor.js'; import { ReflectionOp } from '@deepkit/type-spec'; Error.stackTraceLimit = 200; diff --git a/packages/type/tests/path.spec.ts b/packages/type/tests/path.spec.ts index 56dac767c..dd7ee6f8d 100644 --- a/packages/type/tests/path.spec.ts +++ b/packages/type/tests/path.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { pathResolver } from '../src/path'; -import { ReflectionKind } from '../src/reflection/type'; +import { pathResolver } from '../src/path.js'; +import { ReflectionKind } from '../src/reflection/type.js'; test('pathResolver object literal', () => { type t = { a: string, b: number }; diff --git a/packages/type/tests/performance-issue1.spec.ts b/packages/type/tests/performance-issue1.spec.ts index c5100f887..d57a4374b 100644 --- a/packages/type/tests/performance-issue1.spec.ts +++ b/packages/type/tests/performance-issue1.spec.ts @@ -9,14 +9,14 @@ */ import { test } from '@jest/globals'; import { AbstractClassType, arrayRemoveItem, ClassType, CompilerContext, CustomError, getClassName, isClass, isFunction, urlJoin } from '@deepkit/core'; -import { isExtendable } from '../src/reflection/extends'; -import { ReceiveType, reflect, resolveReceiveType } from '../src/reflection/reflection'; -import { isType, metaAnnotation, ReflectionKind, Type } from '../src/reflection/type'; +import { isExtendable } from '../src/reflection/extends.js'; +import { ReceiveType, reflect, resolveReceiveType } from '../src/reflection/reflection.js'; +import { isType, metaAnnotation, ReflectionKind, Type } from '../src/reflection/type.js'; import { IncomingMessage, ServerResponse } from 'http'; import { Writable } from 'stream'; import querystring from 'querystring'; -import { entity } from '../src/decorator'; -import { SerializationOptions, Serializer } from '../src/serializer'; +import { entity } from '../src/decorator.js'; +import { SerializationOptions, Serializer } from '../src/serializer.js'; export interface ProviderBase { /** diff --git a/packages/type/tests/processor.spec.ts b/packages/type/tests/processor.spec.ts index 8e816a1e2..ae39bcaa5 100644 --- a/packages/type/tests/processor.spec.ts +++ b/packages/type/tests/processor.spec.ts @@ -1,10 +1,10 @@ /** @reflection never */ import { expect, test } from '@jest/globals'; -import { pack } from '../src/reflection/processor'; -import { copyAndSetParent, ParentLessType, ReflectionKind, ReflectionVisibility, TypeObjectLiteral, TypePropertySignature, TypeUnion } from '../src/reflection/type'; +import { pack } from '../src/reflection/processor.js'; +import { copyAndSetParent, ParentLessType, ReflectionKind, ReflectionVisibility, TypeObjectLiteral, TypePropertySignature, TypeUnion } from '../src/reflection/type.js'; import { MappedModifier, ReflectionOp } from '@deepkit/type-spec'; -import { isExtendable } from '../src/reflection/extends'; -import { assertValidParent, expectEqualType, expectType } from './utils'; +import { isExtendable } from '../src/reflection/extends.js'; +import { assertValidParent, expectEqualType, expectType } from './utils.js'; Error.stackTraceLimit = 200; diff --git a/packages/type/tests/receive-type.spec.ts b/packages/type/tests/receive-type.spec.ts index 8d27bd154..522497037 100644 --- a/packages/type/tests/receive-type.spec.ts +++ b/packages/type/tests/receive-type.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { ReceiveType, resolveReceiveType, typeOf } from '../src/reflection/reflection'; -import { ReflectionKind, Type } from '../src/reflection/type'; +import { ReceiveType, resolveReceiveType, typeOf } from '../src/reflection/reflection.js'; +import { ReflectionKind, Type } from '../src/reflection/type.js'; test('typeOf', () => { const type = typeOf(); diff --git a/packages/type/tests/serializer-api.spec.ts b/packages/type/tests/serializer-api.spec.ts index 0e0ce6c7b..dab7b266b 100644 --- a/packages/type/tests/serializer-api.spec.ts +++ b/packages/type/tests/serializer-api.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from '@jest/globals'; -import { EmptySerializer, executeTemplates, Serializer, TemplateRegistry, TemplateState, TypeGuardRegistry } from '../src/serializer'; -import { ReflectionKind } from '../src/reflection/type'; +import { EmptySerializer, executeTemplates, Serializer, TemplateRegistry, TemplateState, TypeGuardRegistry } from '../src/serializer.js'; +import { ReflectionKind } from '../src/reflection/type.js'; import { CompilerContext } from '@deepkit/core'; -import { deserialize } from '../src/serializer-facade'; +import { deserialize } from '../src/serializer-facade.js'; test('TypeGuardRegistry', () => { const serializer = new Serializer(); diff --git a/packages/type/tests/serializer.spec.ts b/packages/type/tests/serializer.spec.ts index d53b6059b..6cd2e22bc 100644 --- a/packages/type/tests/serializer.spec.ts +++ b/packages/type/tests/serializer.spec.ts @@ -8,7 +8,7 @@ * You should have received a copy of the MIT License along with this program. */ import { expect, test } from '@jest/globals'; -import { reflect, ReflectionClass, typeOf } from '../src/reflection/reflection'; +import { reflect, ReflectionClass, typeOf } from '../src/reflection/reflection.js'; import { assertType, AutoIncrement, @@ -26,13 +26,13 @@ import { SignedBinaryBigInt, TypeProperty, TypePropertySignature -} from '../src/reflection/type'; -import { createSerializeFunction, getSerializeFunction, NamingStrategy, serializer } from '../src/serializer'; -import { cast, deserialize, serialize } from '../src/serializer-facade'; +} from '../src/reflection/type.js'; +import { createSerializeFunction, getSerializeFunction, NamingStrategy, serializer } from '../src/serializer.js'; +import { cast, deserialize, serialize } from '../src/serializer-facade.js'; import { getClassName } from '@deepkit/core'; -import { entity, t } from '../src/decorator'; -import { Alphanumeric, MaxLength, MinLength, ValidationError } from '../src/validator'; -import { StatEnginePowerUnit, StatWeightUnit } from './types'; +import { entity, t } from '../src/decorator.js'; +import { Alphanumeric, MaxLength, MinLength, ValidationError } from '../src/validator.js'; +import { StatEnginePowerUnit, StatWeightUnit } from './types.js'; import { parametersToTuple } from '../src/reflection/extends.js'; test('deserializer', () => { diff --git a/packages/type/tests/simple-decorator.spec.ts b/packages/type/tests/simple-decorator.spec.ts index bb640c2d5..eb3bed4c5 100644 --- a/packages/type/tests/simple-decorator.spec.ts +++ b/packages/type/tests/simple-decorator.spec.ts @@ -9,8 +9,8 @@ */ import { expect, test } from '@jest/globals'; -import { typeOf } from '../src/reflection/reflection'; -import { PrimaryKey, primaryKeyAnnotation } from '../src/reflection/type'; +import { typeOf } from '../src/reflection/reflection.js'; +import { PrimaryKey, primaryKeyAnnotation } from '../src/reflection/type.js'; test('primary key', () => { type t = number & PrimaryKey; diff --git a/packages/type/tests/snapshot.spec.ts b/packages/type/tests/snapshot.spec.ts index 708dad755..8bf03ebc7 100644 --- a/packages/type/tests/snapshot.spec.ts +++ b/packages/type/tests/snapshot.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { getConverterForSnapshot, getPrimaryKeyExtractor, getPrimaryKeyHashGenerator } from '../src/snapshot'; -import { PrimaryKey, Reference } from '../src/reflection/type'; -import { ReflectionClass } from '../src/reflection/reflection'; +import { getConverterForSnapshot, getPrimaryKeyExtractor, getPrimaryKeyHashGenerator } from '../src/snapshot.js'; +import { PrimaryKey, Reference } from '../src/reflection/type.js'; +import { ReflectionClass } from '../src/reflection/reflection.js'; class Image { title: string = ''; diff --git a/packages/type/tests/standard-functions.spec.ts b/packages/type/tests/standard-functions.spec.ts index 5e9a405f5..b72d6da98 100644 --- a/packages/type/tests/standard-functions.spec.ts +++ b/packages/type/tests/standard-functions.spec.ts @@ -9,8 +9,8 @@ */ import { test, expect } from '@jest/globals'; -import { ReceiveType, removeTypeName, resolveReceiveType } from '../src/reflection/reflection'; -import { expectEqualType } from './utils'; +import { ReceiveType, removeTypeName, resolveReceiveType } from '../src/reflection/reflection.js'; +import { expectEqualType } from './utils.js'; import { stringifyResolvedType } from '../src/reflection/type.js'; function equalType(a?: ReceiveType, b?: ReceiveType) { diff --git a/packages/type/tests/stringify.spec.ts b/packages/type/tests/stringify.spec.ts index af3d9266c..98aa7e928 100644 --- a/packages/type/tests/stringify.spec.ts +++ b/packages/type/tests/stringify.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; -import { stringifyResolvedType, stringifyShortResolvedType, stringifyType, Type } from '../src/reflection/type'; -import { reflect, typeOf } from '../src/reflection/reflection'; -import { deserializeType, serializeType } from '../src/type-serialization'; +import { stringifyResolvedType, stringifyShortResolvedType, stringifyType, Type } from '../src/reflection/type.js'; +import { reflect, typeOf } from '../src/reflection/reflection.js'; +import { deserializeType, serializeType } from '../src/type-serialization.js'; test('stringifyType basic', () => { expect(stringifyResolvedType(typeOf())).toBe('string'); diff --git a/packages/type/tests/type-infer-runtime.spec.ts b/packages/type/tests/type-infer-runtime.spec.ts index bf9a5a350..18e491b24 100644 --- a/packages/type/tests/type-infer-runtime.spec.ts +++ b/packages/type/tests/type-infer-runtime.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { typeInfer } from '../src/reflection/processor'; -import { ReflectionClass, typeOf } from '../src/reflection/reflection'; +import { typeInfer } from '../src/reflection/processor.js'; +import { ReflectionClass, typeOf } from '../src/reflection/reflection.js'; import { Entity, entityAnnotation, float, @@ -15,8 +15,8 @@ import { TypePropertySignature, Unique, widenLiteral -} from '../src/reflection/type'; -import { expectEqualType } from './utils'; +} from '../src/reflection/type.js'; +import { expectEqualType } from './utils.js'; import { Maximum, MinLength, validate } from '../src/validator.js'; const symbol = Symbol(); diff --git a/packages/type/tests/type-serialization.spec.ts b/packages/type/tests/type-serialization.spec.ts index bb7d6eabf..c273d8de0 100644 --- a/packages/type/tests/type-serialization.spec.ts +++ b/packages/type/tests/type-serialization.spec.ts @@ -1,6 +1,6 @@ import { getClassName } from '@deepkit/core'; import { expect, test } from '@jest/globals'; -import { ReceiveType, reflect, ReflectionClass, resolveReceiveType, typeOf } from '../src/reflection/reflection'; +import { ReceiveType, reflect, ReflectionClass, resolveReceiveType, typeOf } from '../src/reflection/reflection.js'; import { assertType, Entity, @@ -14,10 +14,10 @@ import { Type, TypeClass, TypeProperty -} from '../src/reflection/type'; -import { deserializeType, serializeType } from '../src/type-serialization'; -import { entity } from '../src/decorator'; -import { deserialize } from '../src/serializer-facade'; +} from '../src/reflection/type.js'; +import { deserializeType, serializeType } from '../src/type-serialization.js'; +import { entity } from '../src/decorator.js'; +import { deserialize } from '../src/serializer-facade.js'; test('serialize basics', () => { expect(serializeType(typeOf())).toEqual([{ kind: ReflectionKind.string }]); diff --git a/packages/type/tests/type-spec.spec.ts b/packages/type/tests/type-spec.spec.ts index 5fd5a9bc7..b5d0c0b4c 100644 --- a/packages/type/tests/type-spec.spec.ts +++ b/packages/type/tests/type-spec.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { ReceiveType, ReflectionClass, resolveReceiveType } from '../src/reflection/reflection'; -import { AutoIncrement, BackReference, isReferenceType, MapName, MongoId, PrimaryKey, Reference, UUID } from '../src/reflection/type'; -import { cast, cloneClass, serialize } from '../src/serializer-facade'; -import { createReference } from '../src/reference'; -import { unpopulatedSymbol } from '../src/core'; +import { ReceiveType, ReflectionClass, resolveReceiveType } from '../src/reflection/reflection.js'; +import { AutoIncrement, BackReference, isReferenceType, MapName, MongoId, PrimaryKey, Reference, UUID } from '../src/reflection/type.js'; +import { cast, cloneClass, serialize } from '../src/serializer-facade.js'; +import { createReference } from '../src/reference.js'; +import { unpopulatedSymbol } from '../src/core.js'; (BigInt.prototype as any).toJSON = function () { return this.toString(); diff --git a/packages/type/tests/type.spec.ts b/packages/type/tests/type.spec.ts index 41901c9d7..053304465 100644 --- a/packages/type/tests/type.spec.ts +++ b/packages/type/tests/type.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from '@jest/globals'; -import { hasCircularReference, ReceiveType, reflect, ReflectionClass, resolveReceiveType, typeOf, visit } from '../src/reflection/reflection'; +import { hasCircularReference, ReceiveType, reflect, ReflectionClass, resolveReceiveType, typeOf, visit } from '../src/reflection/reflection.js'; import { assertType, Embedded, @@ -19,12 +19,12 @@ import { TypeObjectLiteral, TypeProperty, UUID, validationAnnotation -} from '../src/reflection/type'; -import { isExtendable } from '../src/reflection/extends'; -import { expectEqualType } from './utils'; +} from '../src/reflection/type.js'; +import { isExtendable } from '../src/reflection/extends.js'; +import { expectEqualType } from './utils.js'; import { ClassType } from '@deepkit/core'; -import { Partial } from '../src/changes'; -import { MaxLength, MinLength } from '../src/validator'; +import { Partial } from '../src/changes.js'; +import { MaxLength, MinLength } from '../src/validator.js'; //note: this needs to run in a strict TS mode to infer correctly in the IDE type Extends = [A] extends [B] ? true : false; diff --git a/packages/type/tests/typedarray.spec.ts b/packages/type/tests/typedarray.spec.ts index 467093553..1303e9eb1 100644 --- a/packages/type/tests/typedarray.spec.ts +++ b/packages/type/tests/typedarray.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; import { Buffer } from 'buffer'; -import { ReflectionClass } from '../src/reflection/reflection'; -import { assertType, binaryTypes, ReflectionKind } from '../src/reflection/type'; -import { base64ToArrayBuffer, base64ToTypedArray, typedArrayToBase64, typedArrayToBuffer } from '../src/core'; -import { deserialize, serialize } from '../src/serializer-facade'; +import { ReflectionClass } from '../src/reflection/reflection.js'; +import { assertType, binaryTypes, ReflectionKind } from '../src/reflection/type.js'; +import { base64ToArrayBuffer, base64ToTypedArray, typedArrayToBase64, typedArrayToBuffer } from '../src/core.js'; +import { deserialize, serialize } from '../src/serializer-facade.js'; test('mapping', async () => { class Clazz { diff --git a/packages/type/tests/typeguard.spec.ts b/packages/type/tests/typeguard.spec.ts index cda5df43e..c51573017 100644 --- a/packages/type/tests/typeguard.spec.ts +++ b/packages/type/tests/typeguard.spec.ts @@ -8,8 +8,8 @@ * You should have received a copy of the MIT License along with this program. */ import { expect, test } from '@jest/globals'; -import { float, float32, int8, integer, PrimaryKey, Reference } from '../src/reflection/type'; -import { is } from '../src/typeguard'; +import { float, float32, int8, integer, PrimaryKey, Reference } from '../src/reflection/type.js'; +import { is } from '../src/typeguard.js'; test('primitive string', () => { expect(is('a')).toEqual(true); diff --git a/packages/type/tests/utils.ts b/packages/type/tests/utils.ts index 3d90bb9ba..3178b5bdc 100644 --- a/packages/type/tests/utils.ts +++ b/packages/type/tests/utils.ts @@ -1,5 +1,5 @@ -import { getTypeJitContainer, ParentLessType, ReflectionKind, Type } from '../src/reflection/type'; -import { Processor, RuntimeStackEntry } from '../src/reflection/processor'; +import { getTypeJitContainer, ParentLessType, ReflectionKind, Type } from '../src/reflection/type.js'; +import { Processor, RuntimeStackEntry } from '../src/reflection/processor.js'; import { expect } from '@jest/globals'; import { ReflectionOp } from '@deepkit/type-spec'; import { isArray, isObject } from '@deepkit/core'; diff --git a/packages/type/tests/validation.spec.ts b/packages/type/tests/validation.spec.ts index c2f04d1db..bef1bf12a 100644 --- a/packages/type/tests/validation.spec.ts +++ b/packages/type/tests/validation.spec.ts @@ -1,9 +1,9 @@ import { expect, test, jest } from '@jest/globals'; -import { Email, MaxLength, MinLength, Positive, Validate, validate, validates, ValidatorError } from '../src/validator'; -import { assert, is } from '../src/typeguard'; -import { AutoIncrement, Excluded, Group, integer, PrimaryKey, Type, Unique } from '../src/reflection/type'; -import { t } from '../src/decorator'; -import { ReflectionClass, typeOf } from '../src/reflection/reflection'; +import { Email, MaxLength, MinLength, Positive, Validate, validate, validates, ValidatorError } from '../src/validator.js'; +import { assert, is } from '../src/typeguard.js'; +import { AutoIncrement, Excluded, Group, integer, PrimaryKey, Type, Unique } from '../src/reflection/type.js'; +import { t } from '../src/decorator.js'; +import { ReflectionClass, typeOf } from '../src/reflection/reflection.js'; import { validatedDeserialize } from '../src/serializer-facade.js'; test('primitives', () => { diff --git a/packages/type/tsconfig.esm.json b/packages/type/tsconfig.esm.json index 177ded271..62a256896 100644 --- a/packages/type/tsconfig.esm.json +++ b/packages/type/tsconfig.esm.json @@ -5,11 +5,14 @@ "module": "ES2020" }, "references": [ + { + "path": "../type-spec/tsconfig.esm.json" + }, { "path": "../core/tsconfig.esm.json" }, { - "path": "../type-spec/tsconfig.esm.json" + "path": "../type-compiler/tsconfig.esm.json" } ] -} +} \ No newline at end of file diff --git a/packages/type/tsconfig.json b/packages/type/tsconfig.json index f4019d94b..7e98ddbd0 100644 --- a/packages/type/tsconfig.json +++ b/packages/type/tsconfig.json @@ -22,11 +22,14 @@ "index.ts" ], "references": [ + { + "path": "../type-spec/tsconfig.json" + }, { "path": "../core/tsconfig.json" }, { - "path": "../type-spec/tsconfig.json" + "path": "../type-compiler/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/ui-library/index.ts b/packages/ui-library/index.ts index 768b3a342..c7739903b 100644 --- a/packages/ui-library/index.ts +++ b/packages/ui-library/index.ts @@ -1,4 +1,4 @@ -export * from './src/subject'; -export * from './src/utils'; -export * from './src/angular-module'; -export * from './src/components/box/box.component'; +export * from './src/subject.js'; +export * from './src/utils.js'; +export * from './src/angular-module.js'; +export * from './src/components/box/box.component.js'; diff --git a/packages/ui-library/package.json b/packages/ui-library/package.json index 617caf72f..41e01194e 100644 --- a/packages/ui-library/package.json +++ b/packages/ui-library/package.json @@ -32,7 +32,10 @@ "@angular/common": "~12.2.0", "rxjs": "~6.6.0" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/ui-library/src/angular-module.ts b/packages/ui-library/src/angular-module.ts index 5a3690ed9..570635e29 100644 --- a/packages/ui-library/src/angular-module.ts +++ b/packages/ui-library/src/angular-module.ts @@ -1,11 +1,11 @@ -import { DeepkitBoxComponent } from './components/box/box.component'; +import { DeepkitBoxComponent } from './components/box/box.component.js'; import { ModuleWithProviders, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { CodeHighlightComponent } from './components/code-highlight.component'; +import { CodeHighlightComponent } from './components/code-highlight.component.js'; import { DuiAppModule, DuiButtonModule, DuiIconModule, DuiSplitterModule } from '@deepkit/desktop-ui'; -import { HeaderStatusBarComponent } from './components/header-status-bar.component'; -import { HeaderLogoComponent } from './components/header-logo.component'; -import { ToggleBoxComponent } from './components/toggle-box.component'; +import { HeaderStatusBarComponent } from './components/header-status-bar.component.js'; +import { HeaderLogoComponent } from './components/header-logo.component.js'; +import { ToggleBoxComponent } from './components/toggle-box.component.js'; @NgModule({ declarations: [ diff --git a/packages/ui-library/src/components/code-highlight.component.ts b/packages/ui-library/src/components/code-highlight.component.ts index 1a09d038f..95488acd8 100644 --- a/packages/ui-library/src/components/code-highlight.component.ts +++ b/packages/ui-library/src/components/code-highlight.component.ts @@ -6,7 +6,7 @@ import 'prismjs/components/prism-sql'; import 'prismjs/components/prism-bash'; import 'prismjs/components/prism-json'; import { isPlatformBrowser } from '@angular/common'; -import { removeIndent } from '../utils'; +import { removeIndent } from '../utils.js'; @Directive({ selector: '[codeHighlight]' diff --git a/packages/ui-library/tsconfig.json b/packages/ui-library/tsconfig.json index ca20ab310..ebab5cf90 100644 --- a/packages/ui-library/tsconfig.json +++ b/packages/ui-library/tsconfig.json @@ -29,6 +29,12 @@ "references": [ { "path": "../core/tsconfig.json" + }, + { + "path": "../type/tsconfig.json" + }, + { + "path": "../rpc/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/packages/workflow/index.ts b/packages/workflow/index.ts index 725cc92e6..d7a0e7aab 100644 --- a/packages/workflow/index.ts +++ b/packages/workflow/index.ts @@ -1 +1 @@ -export * from './src/workflow'; +export * from './src/workflow.js'; diff --git a/packages/workflow/package.json b/packages/workflow/package.json index 79ba90ec4..c8a132d06 100644 --- a/packages/workflow/package.json +++ b/packages/workflow/package.json @@ -35,7 +35,10 @@ "@deepkit/stopwatch": "^1.0.1-alpha.75", "@deepkit/type": "^1.0.1-alpha.75" }, - "jest": { + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + }, "transform": { "^.+\\.(ts|tsx)$": "ts-jest" }, diff --git a/packages/workflow/tests/workflow.spec.ts b/packages/workflow/tests/workflow.spec.ts index b1602a5ae..7915206c9 100644 --- a/packages/workflow/tests/workflow.spec.ts +++ b/packages/workflow/tests/workflow.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { createWorkflow, WorkflowEvent } from '../src/workflow'; +import { createWorkflow, WorkflowEvent } from '../src/workflow.js'; import { eventDispatcher, EventDispatcher, EventToken } from '@deepkit/event'; import { InjectorContext, InjectorModule } from '@deepkit/injector'; diff --git a/packages/workflow/tsconfig.json b/packages/workflow/tsconfig.json index d6ce35cea..bf74d3f63 100644 --- a/packages/workflow/tsconfig.json +++ b/packages/workflow/tsconfig.json @@ -38,4 +38,4 @@ "path": "../type/tsconfig.json" } ] -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index db719ff76..5875a63e5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,9 @@ { "files": [], "references": [ + { + "path": "packages/platform/tsconfig.json" + }, { "path": "packages/core/tsconfig.json" },