From f5ce8ccf277d7777bf91e3a85bd52242e108a8be Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:58:38 -0300 Subject: [PATCH] ci: add website lint rules and tests --- .eslintignore | 5 +- .github/workflows/gh-pages.yml | 2 +- .github/workflows/website.yml | 37 + website/.eslintignore | 4 + website/.eslintrc.json | 119 + website/.prettierignore | 5 + website/.prettierrc | 17 + website/docs/api-and-configurations.mdx | 2 +- .../docs/documentation/00-introduction.mdx | 6 +- .../documentation/authentication-switch.mdx | 32 +- website/docs/documentation/extras.mdx | 30 +- website/docs/documentation/mysql-server.mdx | 64 +- .../documentation/prepared-statements.mdx | 18 +- .../docs/documentation/promise-wrapper.mdx | 40 +- .../documentation/typescript-examples.mdx | 79 +- website/docs/examples/index.mdx | 39 +- website/docs/history-and-why-mysq2.mdx | 20 +- website/docs/index.mdx | 490 ++-- website/docusaurus.config.ts | 2 +- .../current/acknowledgements.mdx | 4 +- .../current/api-and-configurations.mdx | 4 +- .../current/history-and-why-mysq2.mdx | 22 +- .../current/index.mdx | 496 ++-- .../current/api-and-configurations.mdx | 2 +- .../current/history-and-why-mysq2.mdx | 20 +- .../current/index.mdx | 480 ++-- website/package-lock.json | 2148 ++++++++++++++++- website/package.json | 18 +- website/plugins/locale.ts | 19 +- website/src/pages/index.tsx | 1 - website/tsconfig.json | 16 +- 31 files changed, 3366 insertions(+), 875 deletions(-) create mode 100644 .github/workflows/website.yml create mode 100644 website/.eslintignore create mode 100644 website/.eslintrc.json create mode 100644 website/.prettierignore create mode 100644 website/.prettierrc diff --git a/.eslintignore b/.eslintignore index 0fbb448902..5ecd53f3fc 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,4 @@ -website/ +website/build +website/.docusaurus +website/.cache-loader +website/**/*.mdx diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 5fc2560ec3..2bb4160189 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -19,7 +19,7 @@ jobs: with: node-version: '18.x' - - name: Cache dependencies + - name: Cache Dependencies uses: actions/cache@v3 with: path: ~/.npm diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 0000000000..33479e613b --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,37 @@ +name: 'GitHub Pages' +on: + pull_request: + paths: + - 'website/**' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Actions - Checkout + uses: actions/checkout@v3 + + - name: Actions - Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Cache Dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Installing Dependencies + run: cd website && npm ci + + - name: Lint Checking + run: cd website && npm run lintcheck + + - name: Checking Types + run: cd website && npm run typecheck + + - name: Checking Build + run: cd website && npm run build diff --git a/website/.eslintignore b/website/.eslintignore new file mode 100644 index 0000000000..11611db07a --- /dev/null +++ b/website/.eslintignore @@ -0,0 +1,4 @@ +/build +/.docusaurus +/.cache-loader +/**/*.mdx diff --git a/website/.eslintrc.json b/website/.eslintrc.json new file mode 100644 index 0000000000..b5274adf62 --- /dev/null +++ b/website/.eslintrc.json @@ -0,0 +1,119 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint", "import", "react", "react-hooks"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:react-hooks/recommended", + "plugin:react/jsx-runtime" + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "import/no-cycle": ["error", { "maxDepth": "∞" }], + "import/no-unresolved": ["error", { "ignore": ["^@docusaurus/"] }], + "no-restricted-syntax": [ + "error", + { + "selector": "ImportDeclaration[source.value=/^\\./][source.value!=/\\.(js(on(c)?)?|(s)?css|svg|ico)$/]", + "message": "Local imports must have the explicit extension" + } + ], + "max-len": [ + "error", + { + "code": 120, + "ignoreComments": true, + "ignoreTrailingComments": true, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreRegExpLiterals": true + } + ], + "eol-last": ["error", "always"], + "eqeqeq": [2, "always"], + "no-var": 2, + "block-scoped-var": 2, + "no-async-promise-executor": 2, + "no-bitwise": [2, { "allow": ["~"] }], + "no-duplicate-imports": [2, { "includeExports": true }], + "no-eq-null": 2, + "no-multiple-empty-lines": [2, { "max": 1, "maxEOF": 0 }], + "no-template-curly-in-string": 2, + "no-unneeded-ternary": 2, + "quote-props": [2, "as-needed"], + "require-await": 2, + "rest-spread-spacing": [2, "never"], + "semi-spacing": 2, + "space-before-function-paren": [ + 2, + { "anonymous": "always", "named": "never", "asyncArrow": "always" } + ], + "space-unary-ops": 2, + "yoda": 2, + "no-const-assign": 2, + "no-extra-semi": 2, + "for-direction": 2, + "no-eval": 2, + "indent": ["error", 2, { "offsetTernaryExpressions": true }], + "no-empty": ["error", { "allowEmptyCatch": true }] + }, + "env": { + "browser": true, + "node": true + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "@typescript-eslint/semi": ["error", "always"], + "@typescript-eslint/quotes": [ + "error", + "single", + { "avoidEscape": true, "allowTemplateLiterals": true } + ], + "@typescript-eslint/no-empty-function": [ + "error", + { "allow": ["arrowFunctions"] } + ], + "@typescript-eslint/indent": [ + "error", + 2, + { "offsetTernaryExpressions": true } + ] + } + }, + { + "files": ["*.js"], + "parserOptions": { + "project": null + }, + "rules": { + "semi": ["error", "always"], + "quotes": [ + "error", + "single", + { "avoidEscape": true, "allowTemplateLiterals": true } + ], + "no-unused-vars": 2 + } + } + ], + "settings": { + "import/resolver": { + "typescript": { + "alwaysTryTypes": true, + "extensions": [".js", ".ts", "*.jsx", ".tsx"] + } + } + } +} diff --git a/website/.prettierignore b/website/.prettierignore new file mode 100644 index 0000000000..98edfa0cf6 --- /dev/null +++ b/website/.prettierignore @@ -0,0 +1,5 @@ +/build +/.docusaurus +/.cache-loader +# /**/*.mdx +package-lock.json diff --git a/website/.prettierrc b/website/.prettierrc new file mode 100644 index 0000000000..37fb01d470 --- /dev/null +++ b/website/.prettierrc @@ -0,0 +1,17 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "endOfLine": "auto", + "embeddedLanguageFormatting": "auto", + "singleAttributePerLine": false +} diff --git a/website/docs/api-and-configurations.mdx b/website/docs/api-and-configurations.mdx index 165982e6c9..6e3f5dc7b8 100644 --- a/website/docs/api-and-configurations.mdx +++ b/website/docs/api-and-configurations.mdx @@ -5,7 +5,7 @@ MySQL2 is mostly API compatible with [Node MySQL][node-mysql]. One known incompatibility is that `DECIMAL` values are returned as strings whereas in [Node MySQL][node-mysql] they are returned as numbers. This includes the result of `SUM()` and `AVG()` functions when applied to `INTEGER` arguments. This is done deliberately to avoid loss of precision - see https://github.com/sidorares/node-mysql2/issues/935. :::info - If you find any other incompatibility with [Node MySQL][node-mysql], Please report via Issue tracker. We will fix reported incompatibility on priority basis. +If you find any other incompatibility with [Node MySQL][node-mysql], Please report via Issue tracker. We will fix reported incompatibility on priority basis. ::: [node-mysql]: https://github.com/mysqljs/mysql diff --git a/website/docs/documentation/00-introduction.mdx b/website/docs/documentation/00-introduction.mdx index e566e15585..8bb4c2b96b 100644 --- a/website/docs/documentation/00-introduction.mdx +++ b/website/docs/documentation/00-introduction.mdx @@ -2,7 +2,7 @@ MySQL2 aims to be a drop in replacement for [node-mysql](https://github.com/mysqljs/mysql). Please check `node-mysql` for full documentation. -**Note :** *If you see any API incompatibilities with `node-mysql`, please report via github issue.* +**Note :** _If you see any API incompatibilities with `node-mysql`, please report via github issue._ Not only `Node-MySQL2` offers better performance over `node-mysql`, we also support these additional features. @@ -27,9 +27,10 @@ Please check these [examples](/docs/examples) for `node-mysql2`. ## Known incompatibilities with `node-mysql` - `zeroFill` flag is ignored in type conversion. -You need to check corresponding field's zeroFill flag and convert to string manually if this is of importance to you. + You need to check corresponding field's zeroFill flag and convert to string manually if this is of importance to you. - `DECIMAL` and `NEWDECIMAL` types always returned as `string` unless you pass this config option: + ```js { decimalNumbers: true, @@ -53,6 +54,7 @@ This option could lose precision on the number as Javascript Number is a Float! --- ## Benchmarks + - https://gist.github.com/sidorares/ffe9ee9c423f763e3b6b - `npm run benchmarks` - [node-mysql-benchmarks](https://github.com/mscdex/node-mysql-benchmarks) diff --git a/website/docs/documentation/authentication-switch.mdx b/website/docs/documentation/authentication-switch.mdx index 6bce4f9099..c01ff2610e 100644 --- a/website/docs/documentation/authentication-switch.mdx +++ b/website/docs/documentation/authentication-switch.mdx @@ -19,20 +19,20 @@ const conn = mysql.createConnection({ password: 'test', database: 'test_database', authPlugins: { - 'ssh-key-auth': function ({password}) { + 'ssh-key-auth': function ({ password }) { return function (pluginData) { return getPrivate(key) - .then(key => { + .then((key) => { const response = encrypt(key, password, pluginData); // continue handshake by sending response data return response; }) - .catch(err => { + .catch((err) => { // throw error to propagate error to connect/changeUser handlers }); }; - } - } + }, + }, }); ``` @@ -46,27 +46,29 @@ const conn = mysql.createConnection({ user: 'test_user', password: 'test', database: 'test_database', - authSwitchHandler: function ({pluginName, pluginData}, cb) { + authSwitchHandler: function ({ pluginName, pluginData }, cb) { if (pluginName === 'ssh-key-auth') { - getPrivateKey(key => { + getPrivateKey((key) => { const response = encrypt(key, pluginData); // continue handshake by sending response data // respond with error to propagate error to connect/changeUser handlers cb(null, response); }); } else { - const err = new Error(`Unknown AuthSwitchRequest plugin name ${pluginName}`); + const err = new Error( + `Unknown AuthSwitchRequest plugin name ${pluginName}` + ); err.fatal = true; cb(err); } - } + }, }); ``` The initial handshake is always performed using `mysql_native_password` plugin. This will be possible to override in future versions. Note that if the `mysql_native_password` method is requested it will be handled internally according -to [Authentication::Native41]( https://dev.mysql.com/doc/internals/en/secure-password-authentication.html#packet-Authentication::Native41) +to [Authentication::Native41](https://dev.mysql.com/doc/internals/en/secure-password-authentication.html#packet-Authentication::Native41) and no `authPlugins` function or the `authSwitchHandler` will be invoked. These MAY be called multiple times if the plugin algorithm requires multiple roundtrips of data @@ -89,21 +91,21 @@ const conn = mysql.createConnection({ database: 'test_database', authPlugins: { // password1 === password - 'auth-plugin1': function ({password1}) { + 'auth-plugin1': function ({ password1 }) { return function (serverPluginData) { return clientPluginData(password1, serverPluginData); }; }, - 'auth-plugin2': function ({password2}) { + 'auth-plugin2': function ({ password2 }) { return function (serverPluginData) { return clientPluginData(password2, serverPluginData); }; }, - 'auth-plugin3': function ({password3}) { + 'auth-plugin3': function ({ password3 }) { return function (serverPluginData) { return clientPluginData(password3, serverPluginData); }; - } - } + }, + }, }); ``` diff --git a/website/docs/documentation/extras.mdx b/website/docs/documentation/extras.mdx index a4cb0c1fcb..92f692935c 100644 --- a/website/docs/documentation/extras.mdx +++ b/website/docs/documentation/extras.mdx @@ -25,7 +25,6 @@ connection.query('select ? + ? as z', [1, 1], (err, rows) => { }); ``` - ## Receiving rows as array of columns instead of hash with column name as key: ```js @@ -60,9 +59,9 @@ const sql = connection.query( { sql: sql, - infileStreamFactory: function(path) { + infileStreamFactory: function (path) { return getStream(); - } + }, }, onInserted2 ); @@ -71,23 +70,30 @@ connection.query( The `infileStreamFactory` option may also be set at a connection-level: ```js -const fs = require("fs"); +const fs = require('fs'); const mysql = require('mysql2'); const connection = mysql.createConnection({ user: 'test', database: 'test', - infileStreamFactory: path => { + infileStreamFactory: (path) => { // Validate file path const validPaths = ['/tmp/data.csv']; if (!validPaths.includes(path)) { - throw new Error(`invalid file path: ${path}: expected to be one of ${validPaths.join(',')}`); + throw new Error( + `invalid file path: ${path}: expected to be one of ${validPaths.join( + ',' + )}` + ); } return fs.createReadStream(path); - } + }, }); -connection.query('LOAD DATA LOCAL INFILE "/tmp/data.csv" INTO TABLE test', onInserted); +connection.query( + 'LOAD DATA LOCAL INFILE "/tmp/data.csv" INTO TABLE test', + onInserted +); ``` ## Connecting using custom stream: @@ -99,7 +105,7 @@ const shape = require('shaper'); const connection = mysql.createConnection({ user: 'test', database: 'test', - stream: net.connect('/tmp/mysql.sock').pipe(shape(10)) // emulate 10 bytes/sec link + stream: net.connect('/tmp/mysql.sock').pipe(shape(10)), // emulate 10 bytes/sec link }); connection.query('SELECT 1+1 as test1', console.log); ``` @@ -113,14 +119,14 @@ const pool = mysql.createPool({ database: 'test', user: 'foo', password: 'bar', - stream: function(cb) { + stream: function (cb) { const newStream = new SocksConnection( { host: 'remote.host', port: 3306 }, { host: 'localhost', port: 1080 } ); cb(null, newStream); - } + }, }); ``` -In addition to password `createConnection()`, `createPool()` and `changeUser()` accept `passwordSha1` option. This is useful when implementing proxies as plaintext password might be not available. \ No newline at end of file +In addition to password `createConnection()`, `createPool()` and `changeUser()` accept `passwordSha1` option. This is useful when implementing proxies as plaintext password might be not available. diff --git a/website/docs/documentation/mysql-server.mdx b/website/docs/documentation/mysql-server.mdx index 06e5b112e6..d8de2dedce 100644 --- a/website/docs/documentation/mysql-server.mdx +++ b/website/docs/documentation/mysql-server.mdx @@ -2,51 +2,51 @@ ## Server - - `createServer()` - creates server instance - - `Server.listen` - listen port / unix socket (same arguments as [net.Server.listen](http://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback)) +- `createServer()` - creates server instance +- `Server.listen` - listen port / unix socket (same arguments as [net.Server.listen](http://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback)) ### Events - - **connect** - - new incoming connection. +- **connect** + - new incoming connection. --- ## Connection - - `serverHandshake({ serverVersion, protocolVersion, connectionId, statusFlags, characterSet, capabilityFlags })` - - send server handshake initialisation packet, wait handshake response and start listening for commands - - `writeOk({ affectedRows: num, insertId: num })` - - send [OK packet](http://dev.mysql.com/doc/internals/en/overview.html#packet-OK_Packet) to client - - `writeEof(warnings, statusFlags)` - - send EOF packet - - `writeTextResult(rows, fields)` - - write query result to client. Rows and fields are in the same format as in `connection.query` callback. - - `writeColumns(fields)` - - write fields + EOF packets. - - `writeTextRow(row)` - - write array (not hash!) of values as result row - - **TODO:** binary protocol +- `serverHandshake({ serverVersion, protocolVersion, connectionId, statusFlags, characterSet, capabilityFlags })` + - send server handshake initialisation packet, wait handshake response and start listening for commands +- `writeOk({ affectedRows: num, insertId: num })` + - send [OK packet](http://dev.mysql.com/doc/internals/en/overview.html#packet-OK_Packet) to client +- `writeEof(warnings, statusFlags)` + - send EOF packet +- `writeTextResult(rows, fields)` + - write query result to client. Rows and fields are in the same format as in `connection.query` callback. +- `writeColumns(fields)` + - write fields + EOF packets. +- `writeTextRow(row)` + - write array (not hash!) of values as result row +- **TODO:** binary protocol ### Events Every command packet received by the server will be emitted as a **packet** event with the parameters: - - **packet:** Packet - - The packet itself - - **knownCommand:** boolean - - is this command known to the server - - ***commandCode:** number - - the parsed command code (first byte) +- **packet:** Packet + - The packet itself +- **knownCommand:** boolean + - is this command known to the server +- **\*commandCode:** number + - the parsed command code (first byte) In addition special events are emitted for [commands](https://dev.mysql.com/doc/internals/en/text-protocol.html) received from the client. If no listener is present a fallback behavior will be invoked. - - `quit()` - - Default: close the connection - - `init_db(schemaName: string)` - - Default: return OK - - `query(sql: string)` - - Please attach a listener to this. Default: return HA_ERR_INTERNAL_ERROR - - `field_list(table: string, fields: string)` - - Default: return ER_WARN_DEPRECATED_SYNTAX - - `ping()` - Default: return OK +- `quit()` + - Default: close the connection +- `init_db(schemaName: string)` + - Default: return OK +- `query(sql: string)` + - Please attach a listener to this. Default: return HA_ERR_INTERNAL_ERROR +- `field_list(table: string, fields: string)` + - Default: return ER_WARN_DEPRECATED_SYNTAX +- `ping()` - Default: return OK diff --git a/website/docs/documentation/prepared-statements.mdx b/website/docs/documentation/prepared-statements.mdx index 6b06700ddb..82a5011e58 100644 --- a/website/docs/documentation/prepared-statements.mdx +++ b/website/docs/documentation/prepared-statements.mdx @@ -13,6 +13,7 @@ connection.execute('select 1 + ? + ? as result', [5, 6], (err, rows) => { // close cached statement for 'select 1 + ? + ? as result'. noop if not in cache connection.unprepare('select 1 + ? + ? as result'); ``` + Note that `connection.execute()` will cache the prepared statement for better performance, remove the cache with `connection.unprepare()` when you're done. ## Manual prepare / execute @@ -35,6 +36,7 @@ connection.prepare('select ? + ? as tests', (err, statement) => { statement.close(); }); ``` + Note that you should not use statement after connection reset (`changeUser()` or disconnect). Statement scope is connection, you need to prepare statement for each new connection in order to use it. # Configuration @@ -45,13 +47,13 @@ Note that you should not use statement after connection reset (`changeUser()` or The bind parameter values passed to `execute` are serialized JS -> MySQL as: -* `null` -> `NULL` -* `number` -> `DOUBLE` -* `boolean` -> `TINY` (0 for false, 1 for true) -* `object` -> depending on prototype: - * `Date` -> `DATETIME` - * `JSON` like object - `JSON` - * `Buffer` -> `VAR_STRING` -* Other -> `VAR_STRING` +- `null` -> `NULL` +- `number` -> `DOUBLE` +- `boolean` -> `TINY` (0 for false, 1 for true) +- `object` -> depending on prototype: + - `Date` -> `DATETIME` + - `JSON` like object - `JSON` + - `Buffer` -> `VAR_STRING` +- Other -> `VAR_STRING` Passing in `undefined` or a `function` will result in an error. diff --git a/website/docs/documentation/promise-wrapper.mdx b/website/docs/documentation/promise-wrapper.mdx index 3626b5c98d..b6023c6054 100644 --- a/website/docs/documentation/promise-wrapper.mdx +++ b/website/docs/documentation/promise-wrapper.mdx @@ -7,38 +7,49 @@ In addition to errback interface there is thin wrapper to expose Promise-based a ```js /* eslint-env es6 */ const mysql = require('mysql2/promise'); // or require('mysql2').createConnectionPromise -mysql.createConnection({ /* same parameters as for non-promise createConnection */ }) - .then(conn => conn.query('select foo from bar')) +mysql + .createConnection({ + /* same parameters as for non-promise createConnection */ + }) + .then((conn) => conn.query('select foo from bar')) .then(([rows, fields]) => console.log(rows[0].foo)); ``` ```js const pool = require('mysql2/promise').createPool({}); // or require('mysql2').createPoolPromise({}) or require('mysql2').createPool({}).promise() -pool.getConnection() - .then(conn => { +pool + .getConnection() + .then((conn) => { const res = conn.query('select foo from bar'); conn.release(); return res; - }).then(result => { + }) + .then((result) => { console.log(result[0][0].foo); - }).catch(err => { + }) + .catch((err) => { console.log(err); // any of connection time or query time errors from above }); ``` + ## ES7 Async Await + ```js -async function example1 () { +async function example1() { const mysql = require('mysql2/promise'); const conn = await mysql.createConnection({ database: test }); const [rows, fields] = await conn.execute('select ?+? as sum', [2, 2]); await conn.end(); } -async function example2 () { +async function example2() { const mysql = require('mysql2/promise'); - const pool = mysql.createPool({database: test}); + const pool = mysql.createPool({ database: test }); // execute in parallel, next console.log in 3 seconds - await Promise.all([pool.query('select sleep(2)'), pool.query('select sleep(3)')]); + await Promise.all([ + pool.query('select sleep(2)'), + pool.query('select sleep(3)'), + ]); console.log('3 seconds after'); await pool.end(); } @@ -49,11 +60,14 @@ async function example2 () { ```js const mysql = require('mysql2'); const co = require('co'); -co(function * () { - const c = yield mysql.createConnectionPromise({user: 'root', namedPlaceholders: true }); +co(function* () { + const c = yield mysql.createConnectionPromise({ + user: 'root', + namedPlaceholders: true, + }); const rows = yield c.query('show databases'); console.log(rows); - console.log(yield c.execute('select 1+:toAdd as qqq', {toAdd: 10})); + console.log(yield c.execute('select 1+:toAdd as qqq', { toAdd: 10 })); yield c.end(); }); ``` diff --git a/website/docs/documentation/typescript-examples.mdx b/website/docs/documentation/typescript-examples.mdx index d9c3c6fd64..853459bc1e 100644 --- a/website/docs/documentation/typescript-examples.mdx +++ b/website/docs/documentation/typescript-examples.mdx @@ -1,32 +1,38 @@ # Using MySQL2 with TypeScript ## Installation + ```bash npm install --save mysql2 npm install --save-dev @types/node ``` -> The `@types/node` ensure the proper interaction between **TypeScript** and the **Node.js** modules used by **MySQL2** (*net*, *events*, *stream*, *tls*, etc.). +> The `@types/node` ensure the proper interaction between **TypeScript** and the **Node.js** modules used by **MySQL2** (_net_, _events_, _stream_, _tls_, etc.). Requires **TypeScript** `>=4.5.2`. --- ## Usage + You can import **MySQL2** in two ways: + - By setting the `esModuleInterop` option to `true` in `tsconfig.json` + ```ts import mysql from 'mysql2'; import mysql from 'mysql2/promise'; ``` - By setting the `esModuleInterop` option to `false` in `tsconfig.json` + ```ts import * as mysql from 'mysql2'; import * as mysql from 'mysql2/promise'; ``` ### Connection + ```ts import mysql, { ConnectionOptions } from 'mysql2'; @@ -39,6 +45,7 @@ const conn = mysql.createConnection(access); ``` ### Pool Connection + ```ts import mysql, { PoolOptions } from 'mysql2'; @@ -51,7 +58,9 @@ const conn = mysql.createPool(access); ``` ### Query and Execute + #### A simple query + ```ts conn.query('SELECT 1 + 1 AS `test`;', (_err, rows) => { /** @@ -67,6 +76,7 @@ conn.execute('SELECT 1 + 1 AS `test`;', (_err, rows) => { ``` The `rows` output will be these possible types: + - `RowDataPacket[]` - `RowDataPacket[][]` - `ResultSetHeader` @@ -78,7 +88,9 @@ In this example, you need to manually check the output types --- ## Type Specification + ### RowDataPacket[] + An array with the returned rows, for example: ```ts @@ -118,52 +130,59 @@ const conn = mysql.createConnection({ }); // SELECT -conn.query('SELECT 1 + 1 AS test, 2 + 2 AS test;', (_err, rows) => { - console.log(rows); - /** - * @rows: [ [ 2, 4 ] ] - */ -}); +conn.query( + 'SELECT 1 + 1 AS test, 2 + 2 AS test;', + (_err, rows) => { + console.log(rows); + /** + * @rows: [ [ 2, 4 ] ] + */ + } +); // SHOW conn.query('SHOW TABLES FROM `test`;', (_err, rows) => { console.log(rows); /** - * @rows: [ [ 'test' ] ] - */ + * @rows: [ [ 'test' ] ] + */ }); ``` --- ### RowDataPacket[][] + Using `multipleStatements`option as `true` with multiple queries: - ```ts - import mysql, { RowDataPacket } from 'mysql2'; - const conn = mysql.createConnection({ - user: 'test', - database: 'test', - multipleStatements: true, - }); +```ts +import mysql, { RowDataPacket } from 'mysql2'; + +const conn = mysql.createConnection({ + user: 'test', + database: 'test', + multipleStatements: true, +}); - const sql = ` - SELECT 1 + 1 AS test; - SELECT 2 + 2 AS test; - `; +const sql = ` + SELECT 1 + 1 AS test; + SELECT 2 + 2 AS test; +`; - conn.query(sql, (_err, rows) => { - console.log(rows); - /** - * @rows: [ [ { test: 2 } ], [ { test: 4 } ] ] - */ - }); - ``` +conn.query(sql, (_err, rows) => { + console.log(rows); + /** + * @rows: [ [ { test: 2 } ], [ { test: 4 } ] ] + */ +}); +``` --- ### ResultSetHeader + For `INSERT`, `UPDATE`, `DELETE`, `TRUNCATE`, etc.: + ```ts import mysql, { ResultSetHeader } from 'mysql2'; @@ -195,6 +214,7 @@ conn.query(sql, (_err, result) => { --- ### ResultSetHeader[] + For multiples `INSERT`, `UPDATE`, `DELETE`, `TRUNCATE`, etc. when using `multipleStatements` as `true`: ```ts @@ -241,6 +261,7 @@ conn.query(sql, (_err, results) => { --- ### ProcedureCallPacket + By performing a **Call Procedure** using `INSERT`, `UPDATE`, etc., the return will be a `ProcedureCallPacket` (even if you perform multiples queries and set `multipleStatements` to `true`): ```ts @@ -282,9 +303,10 @@ conn.query>(sql, (_err, result) => { }); ``` -> For `CREATE PROCEDURE` and `DROP PROCEDURE`, these returns will be the *default* `ResultSetHeader`. +> For `CREATE PROCEDURE` and `DROP PROCEDURE`, these returns will be the _default_ `ResultSetHeader`. By using `SELECT` and `SHOW` queries in a **Procedure Call**, it groups the results as: + ```tsx /** ProcedureCallPacket */ [RowDataPacket[], ResultSetHeader] @@ -295,6 +317,7 @@ For `ProcedureCallPacket`, please see the following examples. --- ## Examples + You can also check some code examples using **MySQL2** and **TypeScript** to understand advanced concepts: - [Extending and using **Interfaces** with `RowDataPacket`](https://github.com/sidorares/node-mysql2/blob/master/examples/typescript/row-data-packet.ts) diff --git a/website/docs/examples/index.mdx b/website/docs/examples/index.mdx index 932e8cb9f8..295d4c1e5d 100644 --- a/website/docs/examples/index.mdx +++ b/website/docs/examples/index.mdx @@ -8,7 +8,7 @@ title: Quickstart ```js const mysql = require('mysql2'); -const connection = mysql.createConnection({user: 'test', database: 'test'}); +const connection = mysql.createConnection({ user: 'test', database: 'test' }); connection.query('SELECT 1+1 as test1', (err, rows) => { // @@ -19,7 +19,7 @@ connection.query('SELECT 1+1 as test1', (err, rows) => { ```js const mysql = require('mysql2'); -const connection = mysql.createConnection({user: 'test', database: 'test'}); +const connection = mysql.createConnection({ user: 'test', database: 'test' }); connection.execute('SELECT 1+? as test1', [10], (err, rows) => { // @@ -36,8 +36,8 @@ const connection = mysql.createConnection({ database: 'test', ssl: { key: fs.readFileSync('./certs/client-key.pem'), - cert: fs.readFileSync('./certs/client-cert.pem') - } + cert: fs.readFileSync('./certs/client-cert.pem'), + }, }); connection.query('SELECT 1+1 as test1', console.log); ``` @@ -50,16 +50,15 @@ const connection = mysql.createConnection({ user: 'foo', password: 'bar', host: 'db.id.ap-southeast-2.rds.amazonaws.com', - ssl: 'Amazon RDS' + ssl: 'Amazon RDS', }); -connection.query('show status like \'Ssl_cipher\'', (err, res) => { +connection.query("show status like 'Ssl_cipher'", (err, res) => { console.log(err, res); connection.end(); }); ``` - ## Simple MySQL proxy server ```js @@ -67,7 +66,7 @@ const mysql = require('mysql2'); const server = mysql.createServer(); server.listen(3307); -server.on('connection', conn => { +server.on('connection', (conn) => { console.log('connection'); conn.serverHandshake({ @@ -76,7 +75,7 @@ server.on('connection', conn => { connectionId: 1234, statusFlags: 2, characterSet: 8, - capabilityFlags: 0xffffff + capabilityFlags: 0xffffff, }); conn.on('field_list', (table, fields) => { @@ -84,16 +83,22 @@ server.on('connection', conn => { conn.writeEof(); }); - const remote = mysql.createConnection({user: 'root', database: 'dbname', host:'server.example.com', password: 'secret'}); + const remote = mysql.createConnection({ + user: 'root', + database: 'dbname', + host: 'server.example.com', + password: 'secret', + }); - conn.on('query', sql => { + conn.on('query', (sql) => { console.log(`proxying query: ${sql}`); remote.query(sql, function (err) { // overloaded args, either (err, result :object) // or (err, rows :array, columns :array) if (Array.isArray(arguments[1])) { // response to a 'select', 'show' or similar - const rows = arguments[1], columns = arguments[2]; + const rows = arguments[1], + columns = arguments[2]; console.log('rows', rows); console.log('columns', columns); conn.writeTextResult(rows, columns); @@ -112,8 +117,8 @@ server.on('connection', conn => { ## Examples using MySQL server API - - [MySQL-pg-proxy](https://github.com/sidorares/mysql-pg-proxy) - MySQL to Postgres proxy server. - - [MySQLite.js](https://github.com/sidorares/mysqlite.js) - MySQL server with JS-only (emscripten compiled) sqlite backend. - - [SQL-engine](https://github.com/eugeneware/sql-engine) - MySQL server with LevelDB backend. - - [MySQL-osquery-proxy](https://github.com/sidorares/mysql-osquery-proxy) - Connect to [facebook osquery](https://osquery.io/) using MySQL client - - [PlyQL](https://github.com/implydata/plyql) - Connect to [Druid](http://druid.io/) using MySQL client +- [MySQL-pg-proxy](https://github.com/sidorares/mysql-pg-proxy) - MySQL to Postgres proxy server. +- [MySQLite.js](https://github.com/sidorares/mysqlite.js) - MySQL server with JS-only (emscripten compiled) sqlite backend. +- [SQL-engine](https://github.com/eugeneware/sql-engine) - MySQL server with LevelDB backend. +- [MySQL-osquery-proxy](https://github.com/sidorares/mysql-osquery-proxy) - Connect to [facebook osquery](https://osquery.io/) using MySQL client +- [PlyQL](https://github.com/implydata/plyql) - Connect to [Druid](http://druid.io/) using MySQL client diff --git a/website/docs/history-and-why-mysq2.mdx b/website/docs/history-and-why-mysq2.mdx index 3fe07edd82..6b3ba30c09 100644 --- a/website/docs/history-and-why-mysq2.mdx +++ b/website/docs/history-and-why-mysq2.mdx @@ -4,16 +4,16 @@ MySQL2 project is a continuation of [MySQL-Native][mysql-native]. Protocol parse MySQL2 is mostly API compatible with [mysqljs][node-mysql] and supports majority of features. MySQL2 also offers these additional features: - - Faster / Better Performance - - [Prepared Statements](/docs/documentation/prepared-statements) - - MySQL Binary Log Protocol - - [MySQL Server](/docs/documentation/mysql-server) - - Extended support for Encoding and Collation - - [Promise Wrapper](/docs/documentation/promise-wrapper) - - Compression - - SSL and [Authentication Switch](/docs/documentation/authentication-switch) - - [Custom Streams](/docs/documentation/extras#connecting-using-custom-stream) - - [Pooling](/docs/#using-connection-pools) +- Faster / Better Performance +- [Prepared Statements](/docs/documentation/prepared-statements) +- MySQL Binary Log Protocol +- [MySQL Server](/docs/documentation/mysql-server) +- Extended support for Encoding and Collation +- [Promise Wrapper](/docs/documentation/promise-wrapper) +- Compression +- SSL and [Authentication Switch](/docs/documentation/authentication-switch) +- [Custom Streams](/docs/documentation/extras#connecting-using-custom-stream) +- [Pooling](/docs/#using-connection-pools) [node-mysql]: https://github.com/mysqljs/mysql [mysql-native]: https://github.com/sidorares/nodejs-mysql-native diff --git a/website/docs/index.mdx b/website/docs/index.mdx index 3a57d92c3f..b2a34d5361 100644 --- a/website/docs/index.mdx +++ b/website/docs/index.mdx @@ -17,7 +17,7 @@ MySQL client for Node.js with focus on performance. Supports prepared statements [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] -[![License][license-image]][license-url] +[![License][license-image]][license-url] ## Installation @@ -25,17 +25,21 @@ MySQL2 is free from native bindings and can be installed on Linux, Mac OS or Win - ```bash - npm install --save mysql2 - ``` + +```bash +npm install --save mysql2 +``` + - ```bash - npm install --save mysql2 - npm install --save-dev @types/node - ``` + +```bash +npm install --save mysql2 +npm install --save-dev @types/node +``` For TypeScript documentation and examples, see [here](/docs/documentation/typescript-examples). + @@ -46,74 +50,76 @@ MySQL2 is free from native bindings and can be installed on Linux, Mac OS or Win - ```js - // Get the client - import mysql from 'mysql2/promise'; +```js +// Get the client +import mysql from 'mysql2/promise'; - // Create the connection to database - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +// Create the connection to database +const connection = await mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); - // A simple SELECT query - try { - const [results, fields] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - ); +// A simple SELECT query +try { + const [results, fields] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45' + ); - console.log(results); // results contains rows returned by server - console.log(fields); // fields contains extra meta data about results, if available - } catch (err) { - console.log(err); - } + console.log(results); // results contains rows returned by server + console.log(fields); // fields contains extra meta data about results, if available +} catch (err) { + console.log(err); +} - // Using placeholders - try { - const [results] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - ); - - console.log(results); - } catch (err) { - console.log(err); - } - ``` +// Using placeholders +try { + const [results] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45] + ); + + console.log(results); +} catch (err) { + console.log(err); +} +``` - ```js - // Get the client - const mysql = require('mysql2'); - // Create the connection to database - const connection = mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +```js +// Get the client +const mysql = require('mysql2'); - // A simple SELECT query - connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - function(err, results, fields) { - console.log(results); // results contains rows returned by server - console.log(fields); // fields contains extra meta data about results, if available - } - ); +// Create the connection to database +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); - // Using placeholders - connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - function(err, results) { - console.log(results); - } - ); - ``` - +// A simple SELECT query +connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', + function (err, results, fields) { + console.log(results); // results contains rows returned by server + console.log(fields); // fields contains extra meta data about results, if available + } +); + +// Using placeholders +connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45], + function (err, results) { + console.log(results); + } +); +``` + + --- @@ -128,56 +134,60 @@ MySQL2 provides `execute` helper which will prepare and query the statement. You - ```js - import mysql from 'mysql2/promise'; - - try { - // create the connection to database - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); - - // execute will internally call prepare and query - const [results, fields] = await connection.execute( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - ); - console.log(results); // results contains rows returned by server - console.log(fields); // fields contains extra meta data about results, if available - } catch (err) { - console.log(err); - } - ``` - - - ```js - const mysql = require('mysql2'); +```js +import mysql from 'mysql2/promise'; +try { // create the connection to database - const connection = mysql.createConnection({ + const connection = await mysql.createConnection({ host: 'localhost', user: 'root', - database: 'test' + database: 'test', }); // execute will internally call prepare and query - connection.execute( + const [results, fields] = await connection.execute( 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - function(err, results, fields) { - console.log(results); // results contains rows returned by server - console.log(fields); // fields contains extra meta data about results, if available - } + ['Rick C-137', 53] ); - ``` + + console.log(results); // results contains rows returned by server + console.log(fields); // fields contains extra meta data about results, if available +} catch (err) { + console.log(err); +} +``` + + + + +```js +const mysql = require('mysql2'); + +// create the connection to database +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); + +// execute will internally call prepare and query +connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Rick C-137', 53], + function (err, results, fields) { + console.log(results); // results contains rows returned by server + console.log(fields); // fields contains extra meta data about results, if available + } +); +``` + :::tip - If you execute same statement again, it will be picked from a LRU cache which will save query preparation time and give better performance. +If you execute same statement again, it will be picked from a LRU cache which will save query preparation time and give better performance. ::: --- @@ -190,42 +200,46 @@ This improves the latency of queries as you avoid all of the overhead that comes - ```js - import mysql from 'mysql2/promise'; - // Create the connection pool. The pool-specific settings are the defaults - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` - idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` - - - ```js - const mysql = require('mysql2'); +```js +import mysql from 'mysql2/promise'; + +// Create the connection pool. The pool-specific settings are the defaults +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` + idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` + + + + +```js +const mysql = require('mysql2'); + +// Create the connection pool. The pool-specific settings are the defaults +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` + idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` - // Create the connection pool. The pool-specific settings are the defaults - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` - idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` @@ -239,84 +253,96 @@ You can use the pool in the same way as connections (using `pool.query()` and `p - ```js - try { - // For pool initialization, see above - const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); - // Connection is automatically released when query resolves - } catch (err) { - console.log(err); - } - ``` + +```js +try { + // For pool initialization, see above + const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); + // Connection is automatically released when query resolves +} catch (err) { + console.log(err); +} +``` + - ```js - // For pool initialization, see above - pool.query('SELECT `field` FROM `table`', function(err, rows, fields) { - // Connection is automatically released when query resolves - }); - ``` + +```js +// For pool initialization, see above +pool.query('SELECT `field` FROM `table`', function (err, rows, fields) { + // Connection is automatically released when query resolves +}); +``` + - Alternatively, there is also the possibility of manually acquiring a connection from the pool and returning it later: - ```js - // For pool initialization, see above - const conn = await pool.getConnection(); +```js +// For pool initialization, see above +const conn = await pool.getConnection(); + +// Do something with the connection +await conn.query(/* ... */); + +// Don't forget to release the connection when finished! +pool.releaseConnection(conn); +``` + + + + +```js +// For pool initialization, see above +pool.getConnection(function (err, conn) { // Do something with the connection - await conn.query(/* ... */); + conn.query(/* ... */); // Don't forget to release the connection when finished! pool.releaseConnection(conn); - ``` - - - ```js - // For pool initialization, see above - pool.getConnection(function(err, conn) { - // Do something with the connection - conn.query(/* ... */); +}); +``` - // Don't forget to release the connection when finished! - pool.releaseConnection(conn); - }); - ``` - Additionally, directly release the connection using the `connection` object: - ```js - conn.release(); - ``` +```js +conn.release(); +``` --- ### Using Promise Wrapper MySQL2 also support Promise API. Which works very well with ES7 async await. + ```js import mysql from 'mysql2/promise'; async function main() { // create the connection const connection = await mysql.createConnection({ - host:'localhost', - user: 'root', + host: 'localhost', + user: 'root', database: 'test', }); // query database - const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); + const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] + ); } ``` MySQL2 use default `Promise` object available in scope. But you can choose which `Promise` implementation you want to use. + ```js // get the client import mysql from 'mysql2/promise'; @@ -326,24 +352,28 @@ import bluebird from 'bluebird'; // create the connection, specify bluebird as Promise const connection = await mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', Promise: bluebird, }); // query database -const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); +const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] +); ``` MySQL2 also exposes a `.promise()` function on Pools, so you can create a promise/non-promise connections from the same pool. + ```js import mysql from 'mysql2'; async function main() { // create the pool const pool = mysql.createPool({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); @@ -352,23 +382,26 @@ async function main() { const promisePool = pool.promise(); // query database using promises - const [rows,fields] = await promisePool.query('SELECT 1'); + const [rows, fields] = await promisePool.query('SELECT 1'); } ``` MySQL2 exposes a `.promise()` function on Connections, to "upgrade" an existing non-promise connection to use promise. -```js + +```js {11} const mysql = require('mysql2'); // create the connection const conn = mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); -conn.promise().query('SELECT 1') - .then(([rows,fields]) => { +conn + .promise() + .query('SELECT 1') + .then(([rows, fields]) => { console.log(rows); }) .catch(console.log) @@ -381,7 +414,7 @@ conn.promise().query('SELECT 1') If you have two columns with the same name, you might want to get results as an array rather than an object to prevent them from clashing. This is a deviation from the [Node MySQL][node-mysql] library. -For example: ``` SELECT 1 AS `foo`, 2 AS `foo` ```. +For example: `` SELECT 1 AS `foo`, 2 AS `foo` ``. You can enable this setting at either the connection level (applies to all queries), or at the query level (applies only to that specific query). @@ -389,64 +422,73 @@ You can enable this setting at either the connection level (applies to all queri - ```js {5} - const conn = await mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = await mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + - ```js {5} - const conn = mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + #### Query Level + - ```js {4} - try { - const [results, fields] = await conn.query({ - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }); - + +```js {4} +try { + const [results, fields] = await conn.query({ + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }); + + console.log(results); // in this query, results will be an array of arrays rather than an array of objects + console.log(fields); // fields are unchanged +} catch (err) { + console.log(err); +} +``` + + + + +```js {4} +conn.query( + { + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }, + function (err, results, fields) { console.log(results); // in this query, results will be an array of arrays rather than an array of objects console.log(fields); // fields are unchanged - } catch (err) { - console.log(err); } - ``` - - - ```js {4} - conn.query( - { - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }, - function(err, results, fields) { - console.log(results); // in this query, results will be an array of arrays rather than an array of objects - console.log(fields); // fields are unchanged - } - ); - ``` +); +``` + --- :::tip Getting Help -Need help? Ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) or [GitHub](https://github.com/sidorares/node-mysql2/discussions). +Need help? Ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) or [GitHub](https://github.com/sidorares/node-mysql2/discussions). If you've encountered an issue, please [file it on GitHub](https://github.com/sidorares/node-mysql2/issues). ::: diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 498d40edfd..7a371cc7ec 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -61,7 +61,7 @@ const config: Config = { label: 'MySQL2', position: 'left', className: 'navbar__brand navbar__manual--title text--truncate', - activeBaseRegex: `^\/$`, + activeBaseRegex: `^/$`, }, { to: '/docs/examples', diff --git a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/acknowledgements.mdx b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/acknowledgements.mdx index 7849d7529b..754630ac83 100644 --- a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/acknowledgements.mdx +++ b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/acknowledgements.mdx @@ -1,7 +1,7 @@ # Agradecimentos - O protocolo interno é escrito por @sidorares [MySQL-Native](https://github.com/sidorares/nodejs-mysql-native) -- *Constants*, interpolação de parâmetros SQL, *Pooling* e a classe `ConnectionConfig` foram retirados do [node-mysql](https://github.com/mysqljs/mysql) +- _Constants_, interpolação de parâmetros SQL, _Pooling_ e a classe `ConnectionConfig` foram retirados do [node-mysql](https://github.com/mysqljs/mysql) - O Código de atualização SSL é baseado no [código](https://gist.github.com/TooTallNate/848444) feito por @TooTallNate -- *Flags* de API de conexão segura / comprimida compatíveis com o cliente [MariaSQL](https://github.com/mscdex/node-mariasql/). +- _Flags_ de API de conexão segura / comprimida compatíveis com o cliente [MariaSQL](https://github.com/mscdex/node-mariasql/). - [Contribuidores](https://github.com/sidorares/node-mysql2/graphs/contributors) diff --git a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/api-and-configurations.mdx b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/api-and-configurations.mdx index 1991f3a359..c46e28a9b8 100644 --- a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/api-and-configurations.mdx +++ b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/api-and-configurations.mdx @@ -2,10 +2,10 @@ O MySQL2 é maioritariamente compatível com a API do [Node MySQL][node-mysql]. -Uma incompatibilidade conhecida é que os valores em `DECIMAL` são retornados como *strings*, enquanto no [Node MySQL][node-mysql] eles são retornados como números. Isso inclui o resultado das funções `SUM()` e `AVG()` quando aplicadas a argumentos `INTEGER`. Isso é feito deliberadamente para evitar a perda de precisão - veja https://github.com/sidorares/node-mysql2/issues/935. +Uma incompatibilidade conhecida é que os valores em `DECIMAL` são retornados como _strings_, enquanto no [Node MySQL][node-mysql] eles são retornados como números. Isso inclui o resultado das funções `SUM()` e `AVG()` quando aplicadas a argumentos `INTEGER`. Isso é feito deliberadamente para evitar a perda de precisão - veja https://github.com/sidorares/node-mysql2/issues/935. :::info - Se você encontrar qualquer outra incompatibilidade com o [Node MySQL][node-mysql], por favor, reporte através do acompanhamento de *Issues*. Nós corrigiremos a incompatibilidade relatada como uma prioridade. +Se você encontrar qualquer outra incompatibilidade com o [Node MySQL][node-mysql], por favor, reporte através do acompanhamento de _Issues_. Nós corrigiremos a incompatibilidade relatada como uma prioridade. ::: [node-mysql]: https://github.com/mysqljs/mysql diff --git a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx index ef756fdb10..41d55299a5 100644 --- a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx +++ b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx @@ -1,19 +1,19 @@ # História e Porque o MySQL2 -O projeto MySQL2 é uma continuação do [MySQL-Native][mysql-native]. O código do analisador de protocolo (*protocol parser*) foi reescrito do zero e a API foi alterada para corresponder ao popular [mysqljs/mysql][node-mysql]. A equipe do MySQL2 está trabalhando em conjunto com a equipe do [mysqljs/mysql][node-mysql] para *fatorar* o código compartilhado e movê-lo para a organização [mysqljs][node-mysql]. +O projeto MySQL2 é uma continuação do [MySQL-Native][mysql-native]. O código do analisador de protocolo (_protocol parser_) foi reescrito do zero e a API foi alterada para corresponder ao popular [mysqljs/mysql][node-mysql]. A equipe do MySQL2 está trabalhando em conjunto com a equipe do [mysqljs/mysql][node-mysql] para _fatorar_ o código compartilhado e movê-lo para a organização [mysqljs][node-mysql]. O MySQL2 é maioritariamente compatível com a API do [mysqljs][node-mysql] e suporta a maioria de suas funcionalidades. O MySQL2 também oferece essas funcionalidades adicionais: - - Desempenho mais rápido / melhor - - [Instruções Preparadas (*Prepared Statements*)](/docs/documentation/prepared-statements) - - Protocolo de log binário MySQL (*MySQL Binary Log Protocol*) - - [Servidor MySQL](/docs/documentation/mysql-server) - - Estende o suporte para *Encoding* and *Collation* - - [*Promise Wrapper*](/docs/documentation/promise-wrapper) - - Compressão - - SSL e [*Authentication Switch*](/docs/documentation/authentication-switch) - - [*Streams* Personalizados](/docs/documentation/extras#connecting-using-custom-stream) - - [Conjunto de Conexões (*Pooling*)](/docs/#using-connection-pools) +- Desempenho mais rápido / melhor +- [Instruções Preparadas (_Prepared Statements_)](/docs/documentation/prepared-statements) +- Protocolo de log binário MySQL (_MySQL Binary Log Protocol_) +- [Servidor MySQL](/docs/documentation/mysql-server) +- Estende o suporte para _Encoding_ and _Collation_ +- [_Promise Wrapper_](/docs/documentation/promise-wrapper) +- Compressão +- SSL e [_Authentication Switch_](/docs/documentation/authentication-switch) +- [_Streams_ Personalizados](/docs/documentation/extras#connecting-using-custom-stream) +- [Conjunto de Conexões (_Pooling_)](/docs/#using-connection-pools) [node-mysql]: https://github.com/mysqljs/mysql [mysql-native]: https://github.com/sidorares/nodejs-mysql-native diff --git a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/index.mdx b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/index.mdx index 91714d349c..4dbf23a633 100644 --- a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/index.mdx +++ b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/index.mdx @@ -12,12 +12,12 @@ import TabItem from '@theme/TabItem'; {/* */} -Cliente MySQL para Node.js com foco em performance. Suporta instruções preparadas (*prepared statements*), Codificações *non-utf8*, protocolo de log binário (*binary log protocol*), compressão, SSL e muito mais. +Cliente MySQL para Node.js com foco em performance. Suporta instruções preparadas (_prepared statements_), Codificações _non-utf8_, protocolo de log binário (_binary log protocol_), compressão, SSL e muito mais. [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] -[![License][license-image]][license-url] +[![License][license-image]][license-url] ## Instalação @@ -25,267 +25,288 @@ O MySQL2 não tem restrições nativas e pode ser instalado no Linux, Mac OS ou + ```bash npm install --save mysql2 ``` + + ```bash npm install --save mysql2 npm install --save-dev @types/node ``` Para documentação e exemplos usando TypeScript, veja [aqui](/docs/documentation/typescript-examples). + --- -### Primeira Consulta (*Query*) +### Primeira Consulta (_Query_) - ```js - // Obtém o cliente - import mysql from 'mysql2/promise'; +```js +// Obtém o cliente +import mysql from 'mysql2/promise'; - // Cria a conexão com o Banco de Dados - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +// Cria a conexão com o Banco de Dados +const connection = await mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); - // Consulta simples - try { - const [results, fields] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - ); +// Consulta simples +try { + const [results, fields] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45' + ); - console.log(results); // "results" contêm as linhas retornadas pelo servidor - console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis - } catch (err) { - console.log(err); - } + console.log(results); // "results" contêm as linhas retornadas pelo servidor + console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis +} catch (err) { + console.log(err); +} - // Utilizando espaços reservados (placeholders) - try { - const [results] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - ); - - console.log(results); - } catch (err) { - console.log(err); - } - ``` +// Utilizando espaços reservados (placeholders) +try { + const [results] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45] + ); + + console.log(results); +} catch (err) { + console.log(err); +} +``` - ```js - // Obtém o cliente - const mysql = require('mysql2'); - // Cria a conexão com o Banco de Dados - const connection = mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +```js +// Obtém o cliente +const mysql = require('mysql2'); - // Consulta simples - connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - function(err, results, fields) { - console.log(results); // "results" contêm as linhas retornadas pelo servidor - console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis - } - ); +// Cria a conexão com o Banco de Dados +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); + +// Consulta simples +connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', + function (err, results, fields) { + console.log(results); // "results" contêm as linhas retornadas pelo servidor + console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis + } +); + +// Utilizando espaços reservados (placeholders) +connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45], + function (err, results) { + console.log(results); + } +); +``` - // Utilizando espaços reservados (placeholders) - connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - function(err, results) { - console.log(results); - } - ); - ``` --- -### Usando Instruções Preparadas (*Prepared Statements*) +### Usando Instruções Preparadas (_Prepared Statements_) Com o MySQL2 você também pode obter Instruções Preparadas (Prepared Statements). Dessa forma o MySQL não precisa preparar um plano para a mesma consulta todas as vezes, resultando em um melhor desempenho. Se você não sabe por que isso é importante, veja essa discussão: -- [Como as instruções preparadas (*prepared statements*) podem proteger contra ataques de injeção SQL](http://stackoverflow.com/questions/8263371/how-can-prepared-statements-protect-from-sql-injection-attacks) +- [Como as instruções preparadas (_prepared statements_) podem proteger contra ataques de injeção SQL](http://stackoverflow.com/questions/8263371/how-can-prepared-statements-protect-from-sql-injection-attacks) -O MySQL2 fornece o método auxiliar `execute` que irá preparar e consultar as declarações (*statements*) SQL. Além disso, você também pode usar os métodos `prepare` e `unprepare` para preparar ou desfazer a preparação de declarações (*statements*) manualmente, se necessário. +O MySQL2 fornece o método auxiliar `execute` que irá preparar e consultar as declarações (_statements_) SQL. Além disso, você também pode usar os métodos `prepare` e `unprepare` para preparar ou desfazer a preparação de declarações (_statements_) manualmente, se necessário. - ```js - import mysql from 'mysql2/promise'; - - try { - // Cria a conexão com o Banco de Dados - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); - - // "execute" irá chamar internamente a preparação e a consulta (query) - const [results, fields] = await connection.execute( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - ); - console.log(results); // "results" contêm as linhas retornadas pelo servidor - console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis - } catch (err) { - console.log(err); - } - ``` - - - ```js - const mysql = require('mysql2'); +```js +import mysql from 'mysql2/promise'; +try { // Cria a conexão com o Banco de Dados - const connection = mysql.createConnection({ + const connection = await mysql.createConnection({ host: 'localhost', user: 'root', - database: 'test' + database: 'test', }); // "execute" irá chamar internamente a preparação e a consulta (query) - connection.execute( + const [results, fields] = await connection.execute( 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - function(err, results, fields) { - console.log(results); // "results" contêm as linhas retornadas pelo servidor - console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis - } + ['Rick C-137', 53] ); - ``` + + console.log(results); // "results" contêm as linhas retornadas pelo servidor + console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis +} catch (err) { + console.log(err); +} +``` + + + + +```js +const mysql = require('mysql2'); + +// Cria a conexão com o Banco de Dados +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); + +// "execute" irá chamar internamente a preparação e a consulta (query) +connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Rick C-137', 53], + function (err, results, fields) { + console.log(results); // "results" contêm as linhas retornadas pelo servidor + console.log(fields); // "fields" contêm metadados adicionais sobre os resultados, quando disponíveis + } +); +``` + :::tip - Se você executar a mesma declaração novamente, ela será selecionada a partir do LRU Cache, o que economizará tempo de preparação da consulta e proporcionará melhor desempenho. +Se você executar a mesma declaração novamente, ela será selecionada a partir do LRU Cache, o que economizará tempo de preparação da consulta e proporcionará melhor desempenho. ::: --- -### Usando Conjunto de Conexões (*pools*) +### Usando Conjunto de Conexões (_pools_) -O conjunto de conexões (*pools*) ajuda a reduzir o tempo gasto na conexão com o servidor MySQL, reutilizando uma conexão anterior e deixando-as abertas ao invés de fechá-las quando você termina de usá-las. +O conjunto de conexões (_pools_) ajuda a reduzir o tempo gasto na conexão com o servidor MySQL, reutilizando uma conexão anterior e deixando-as abertas ao invés de fechá-las quando você termina de usá-las. -Isto melhora a latência das consultas (*queries*), pois evita toda a sobrecarga associada à criação de uma nova conexão. +Isto melhora a latência das consultas (_queries_), pois evita toda a sobrecarga associada à criação de uma nova conexão. - ```js - import mysql from 'mysql2/promise'; - // Cria a conexão (pool). As definições específicadas do "createPool" são as predefinições padrões - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // Máximo de conexões inativas; o valor padrão é o mesmo que "connectionLimit" - idleTimeout: 60000, // Tempo limite das conexões inativas em milissegundos; o valor padrão é "60000" - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` +```js +import mysql from 'mysql2/promise'; + +// Cria a conexão (pool). As definições específicadas do "createPool" são as predefinições padrões +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // Máximo de conexões inativas; o valor padrão é o mesmo que "connectionLimit" + idleTimeout: 60000, // Tempo limite das conexões inativas em milissegundos; o valor padrão é "60000" + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` + - ```js - const mysql = require('mysql2'); - // Cria a conexão (pool). As definições específicadas do "createPool" são as predefinições padrões - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // Máximo de conexões inativas; o valor padrão é o mesmo que "connectionLimit" - idleTimeout: 60000, // Tempo limite das conexões inativas em milissegundos; o valor padrão é "60000" - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` +```js +const mysql = require('mysql2'); + +// Cria a conexão (pool). As definições específicadas do "createPool" são as predefinições padrões +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // Máximo de conexões inativas; o valor padrão é o mesmo que "connectionLimit" + idleTimeout: 60000, // Tempo limite das conexões inativas em milissegundos; o valor padrão é "60000" + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` + :::note - O *pool* não estabelece todas as conexões previamente, mas as cria sob demanda até que o limite de conexões seja atingido. +O _pool_ não estabelece todas as conexões previamente, mas as cria sob demanda até que o limite de conexões seja atingido. ::: --- -Você pode usar o *pool* da mesma maneira como em uma conexão (usando `pool.query()` e `pool.execute()`): +Você pode usar o _pool_ da mesma maneira como em uma conexão (usando `pool.query()` e `pool.execute()`): - ```js - try { - // Para a inicialização do "pool", veja acima - const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); - // A conexão é automaticamente liberada quando a consulta (query) é resolvida - } catch (err) { - console.log(err); - } - ``` + +```js +try { + // Para a inicialização do "pool", veja acima + const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); + // A conexão é automaticamente liberada quando a consulta (query) é resolvida +} catch (err) { + console.log(err); +} +``` + - ```js - // Para a inicialização do "pool", veja acima - pool.query('SELECT `field` FROM `table`', function(err, rows, fields) { - // A conexão é automaticamente liberada quando a consulta (query) é resolvida - }); - ``` + +```js +// Para a inicialização do "pool", veja acima +pool.query('SELECT `field` FROM `table`', function (err, rows, fields) { + // A conexão é automaticamente liberada quando a consulta (query) é resolvida +}); +``` + - Alternativamente, também existe a possibilidade de adquirir manualmente uma conexão do pool e liberá-la posteriormente: - ```js - // Para a inicialização do "pool", veja acima - const conn = await pool.getConnection(); +```js +// Para a inicialização do "pool", veja acima +const conn = await pool.getConnection(); + +// Fazer algo com a conexão +await conn.query(/* ... */); + +// Não se esqueça de liberar a conexão quando terminar! +pool.releaseConnection(conn); +``` + + + + +```js +// Para a inicialização do "pool", veja acima +pool.getConnection(function (err, conn) { // Fazer algo com a conexão - await conn.query(/* ... */); + conn.query(/* ... */); // Não se esqueça de liberar a conexão quando terminar! pool.releaseConnection(conn); - ``` - - - ```js - // Para a inicialização do "pool", veja acima - pool.getConnection(function(err, conn) { - // Fazer algo com a conexão - conn.query(/* ... */); +}); +``` - // Não se esqueça de liberar a conexão quando terminar! - pool.releaseConnection(conn); - }); - ``` @@ -297,26 +318,31 @@ Alternativamente, também existe a possibilidade de adquirir manualmente uma con --- -### Usando o *Promise Wrapper* +### Usando o _Promise Wrapper_ + +O MySQL2 também suporta _Promise_ API. O que funciona muito bem com o ES7 _async await_. -O MySQL2 também suporta *Promise* API. O que funciona muito bem com o ES7 *async await*. ```js import mysql from 'mysql2/promise'; async function main() { // Cria a conexão com o Banco de Dados const connection = await mysql.createConnection({ - host:'localhost', - user: 'root', + host: 'localhost', + user: 'root', database: 'test', }); // Consulta no Banco de Dados - const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); + const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] + ); } ``` -O MySQL2 usa o objeto *`Promise`* padrão disponível no escopo. Mas você pode escolher qual implementação de *`Promise`* deseja usar. +O MySQL2 usa o objeto _`Promise`_ padrão disponível no escopo. Mas você pode escolher qual implementação de _`Promise`_ deseja usar. + ```js // Obtém o cliente import mysql from 'mysql2/promise'; @@ -326,24 +352,28 @@ import bluebird from 'bluebird'; // Cria a conexão, especificando o "bluebird" como "Promise" const connection = await mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', Promise: bluebird, }); // Consulta no Banco de Dados -const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); +const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] +); ``` MySQL2 also exposes a `.promise()` function on Pools, so you can create a promise/non-promise connections from the same pool. + ```js import mysql from 'mysql2'; async function main() { // create the pool const pool = mysql.createPool({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); @@ -352,23 +382,26 @@ async function main() { const promisePool = pool.promise(); // query database using promises - const [rows,fields] = await promisePool.query('SELECT 1'); + const [rows, fields] = await promisePool.query('SELECT 1'); } ``` -O MySQL2 também expõe o método .promise() em *Pools*, então você pode criar conexões "*promise/non-promise*" para o mesmo *pool*. -```js +O MySQL2 também expõe o método .promise() em _Pools_, então você pode criar conexões "_promise/non-promise_" para o mesmo _pool_. + +```js {11} const mysql = require('mysql2'); // Cria a conexão const conn = mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); -conn.promise().query('SELECT 1') - .then(([rows,fields]) => { +conn + .promise() + .query('SELECT 1') + .then(([rows, fields]) => { console.log(rows); }) .catch(console.log) @@ -377,11 +410,11 @@ conn.promise().query('SELECT 1') --- -### Resultados em *Array* +### Resultados em _Array_ -Se você tiver duas colunas com o mesmo nome, pode preferir receber os resultados como um *array*, em vez de um objeto, para evitar conflitos. Isso é uma divergência da biblioteca [Node MySQL][node-mysql]. +Se você tiver duas colunas com o mesmo nome, pode preferir receber os resultados como um _array_, em vez de um objeto, para evitar conflitos. Isso é uma divergência da biblioteca [Node MySQL][node-mysql]. -Por exemplo: ``` SELECT 1 AS `foo`, 2 AS `foo` ```. +Por exemplo: `` SELECT 1 AS `foo`, 2 AS `foo` ``. Você pode habilitar essa configuração tanto no nível de conexão (aplica-se a todas as consultas), quanto no nível de consulta (aplica-se apenas a essa consulta específica). @@ -389,64 +422,73 @@ Você pode habilitar essa configuração tanto no nível de conexão (aplica-se - ```js {5} - const conn = await mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = await mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + - ```js {5} - const conn = mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + #### Query Level + - ```js {4} - try { - const [results, fields] = await conn.query({ - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }); - + +```js {4} +try { + const [results, fields] = await conn.query({ + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }); + + console.log(results); // nessa consulta, "results" contêm um array de arrays ao invés de um array de objetos + console.log(fields); // "fields" mantêm-se inalterados +} catch (err) { + console.log(err); +} +``` + + + + +```js {4} +conn.query( + { + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }, + function (err, results, fields) { console.log(results); // nessa consulta, "results" contêm um array de arrays ao invés de um array de objetos console.log(fields); // "fields" mantêm-se inalterados - } catch (err) { - console.log(err); } - ``` - - - ```js {4} - conn.query( - { - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }, - function(err, results, fields) { - console.log(results); // nessa consulta, "results" contêm um array de arrays ao invés de um array de objetos - console.log(fields); // "fields" mantêm-se inalterados - } - ); - ``` +); +``` + --- :::tip Obtendo Ajuda -Precisa de ajuda? Faça sua pergunta no [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) ou [GitHub](https://github.com/sidorares/node-mysql2/discussions). +Precisa de ajuda? Faça sua pergunta no [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) ou [GitHub](https://github.com/sidorares/node-mysql2/discussions). Se você encontrou um erro, [registre-o no GitHub](https://github.com/sidorares/node-mysql2/issues). ::: diff --git a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/api-and-configurations.mdx b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/api-and-configurations.mdx index 2c03186dc1..4211fb5549 100644 --- a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/api-and-configurations.mdx +++ b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/api-and-configurations.mdx @@ -5,7 +5,7 @@ MySQL2大部分的API与 [Node MySQL][node-mysql] 基本上相同,你应该查 One known incompatibility is that `DECIMAL` values are returned as strings whereas in [Node MySQL][node-mysql] they are returned as numbers. This includes the result of `SUM()` and `AVG()` functions when applied to `INTEGER` arguments. This is done deliberately to avoid loss of precision - see https://github.com/sidorares/node-mysql2/issues/935. :::info - 如果您发现与 [Node MySQL][node-mysql] 的任何不兼容问题,请通过`issue`报告。 我们将优先修复报告的不兼容问题。 +如果您发现与 [Node MySQL][node-mysql] 的任何不兼容问题,请通过`issue`报告。 我们将优先修复报告的不兼容问题。 ::: [node-mysql]: https://github.com/mysqljs/mysql diff --git a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx index 930e8f0c88..f7600d5007 100644 --- a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx +++ b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/history-and-why-mysq2.mdx @@ -4,16 +4,16 @@ MySQL2 项目是 [MySQL-Native][mysql-native] 的延续。 协议解析器代码 MySQL2 大部分 API 与 [mysqljs][node-mysql] 兼容,并支持大部分功能。 MySQL2 还提供了更多的附加功能: - - 更快、更好的性能 - - [支持预处理](/docs/documentation/prepared-statements) - - MySQL二进制日志协议 - - [MySQL Server](/docs/documentation/mysql-server) - - 对编码和排序规则有很好的支持 - - [Promise封装](/docs/documentation/promise-wrapper) - - 支持压缩 - - SSL 和 [Authentication Switch](/docs/documentation/authentication-switch) - - [自定义流](/docs/documentation/extras#connecting-using-custom-stream) - - [连接池](/docs/#using-connection-pools) +- 更快、更好的性能 +- [支持预处理](/docs/documentation/prepared-statements) +- MySQL二进制日志协议 +- [MySQL Server](/docs/documentation/mysql-server) +- 对编码和排序规则有很好的支持 +- [Promise封装](/docs/documentation/promise-wrapper) +- 支持压缩 +- SSL 和 [Authentication Switch](/docs/documentation/authentication-switch) +- [自定义流](/docs/documentation/extras#connecting-using-custom-stream) +- [连接池](/docs/#using-connection-pools) [node-mysql]: https://github.com/mysqljs/mysql [mysql-native]: https://github.com/sidorares/nodejs-mysql-native diff --git a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/index.mdx b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/index.mdx index e71e02262f..7ceee03acb 100644 --- a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/index.mdx +++ b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/index.mdx @@ -17,7 +17,7 @@ import TabItem from '@theme/TabItem'; [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] -[![License][license-image]][license-url] +[![License][license-image]][license-url] ## 安装 @@ -25,17 +25,21 @@ MySQL2 可以跨平台使用,毫无疑问可以安装在 Linux、Mac OS 或 Wi - ```bash - npm install --save mysql2 - ``` + +```bash +npm install --save mysql2 +``` + - ```bash - npm install --save mysql2 - npm install --save-dev @types/node - ``` + +```bash +npm install --save mysql2 +npm install --save-dev @types/node +``` For TypeScript documentation and examples, see [here](/docs/documentation/typescript-examples). + @@ -46,73 +50,75 @@ MySQL2 可以跨平台使用,毫无疑问可以安装在 Linux、Mac OS 或 Wi - ```js - // 导入模块 - import mysql from 'mysql2/promise'; +```js +// 导入模块 +import mysql from 'mysql2/promise'; - // 创建一个数据库连接 - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +// 创建一个数据库连接 +const connection = await mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); - // 简单查询 - try { - const [results, fields] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - ); +// 简单查询 +try { + const [results, fields] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45' + ); - console.log(results); // 结果集 - console.log(fields); // 额外的元数据(如果有的话) - } catch (err) { - console.log(err); - } + console.log(results); // 结果集 + console.log(fields); // 额外的元数据(如果有的话) +} catch (err) { + console.log(err); +} - // 使用占位符 - try { - const [results] = await connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - ); - - console.log(results); - } catch (err) { - console.log(err); - } - ``` +// 使用占位符 +try { + const [results] = await connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45] + ); + + console.log(results); +} catch (err) { + console.log(err); +} +``` - ```js - // 导入模块 - const mysql = require('mysql2'); - // 创建一个数据库连接 - const connection = mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); +```js +// 导入模块 +const mysql = require('mysql2'); - // 简单查询 - connection.query( - 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', - function(err, results, fields) { - console.log(results); // 结果集 - console.log(fields); // 额外的元数据(如果有的话) - } - ); +// 创建一个数据库连接 +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); + +// 简单查询 +connection.query( + 'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45', + function (err, results, fields) { + console.log(results); // 结果集 + console.log(fields); // 额外的元数据(如果有的话) + } +); + +// 使用占位符 +connection.query( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Page', 45], + function (err, results) { + console.log(results); + } +); +``` - // 使用占位符 - connection.query( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Page', 45], - function(err, results) { - console.log(results); - } - ); - ``` @@ -128,56 +134,60 @@ MySQL2 提供了 `execute` 辅助函数,它将准备和查询语句。 您还 - ```js - import mysql from 'mysql2/promise'; - - try { - // 创建一个数据库连接 - const connection = await mysql.createConnection({ - host: 'localhost', - user: 'root', - database: 'test' - }); - - // execute 将在内部调用 prepare 和 query - const [results, fields] = await connection.execute( - 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - ); - console.log(results); // 结果集 - console.log(fields); // 额外的元数据(如果有的话) - } catch (err) { - console.log(err); - } - ``` - - - ```js - const mysql = require('mysql2'); +```js +import mysql from 'mysql2/promise'; +try { // 创建一个数据库连接 - const connection = mysql.createConnection({ + const connection = await mysql.createConnection({ host: 'localhost', user: 'root', - database: 'test' + database: 'test', }); // execute 将在内部调用 prepare 和 query - connection.execute( + const [results, fields] = await connection.execute( 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', - ['Rick C-137', 53], - function(err, results, fields) { - console.log(results); // 结果集 - console.log(fields); // 额外的元数据(如果有的话) - } + ['Rick C-137', 53] ); - ``` + + console.log(results); // 结果集 + console.log(fields); // 额外的元数据(如果有的话) +} catch (err) { + console.log(err); +} +``` + + + + +```js +const mysql = require('mysql2'); + +// 创建一个数据库连接 +const connection = mysql.createConnection({ + host: 'localhost', + user: 'root', + database: 'test', +}); + +// execute 将在内部调用 prepare 和 query +connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Rick C-137', 53], + function (err, results, fields) { + console.log(results); // 结果集 + console.log(fields); // 额外的元数据(如果有的话) + } +); +``` + :::tip - 如果再次执行相同的语句,他将从缓存中选取,这能有效的节省准备查询时间获得更好的性能。 +如果再次执行相同的语句,他将从缓存中选取,这能有效的节省准备查询时间获得更好的性能。 ::: --- @@ -190,42 +200,46 @@ MySQL2 提供了 `execute` 辅助函数,它将准备和查询语句。 您还 - ```js - import mysql from 'mysql2/promise'; - // 创建连接池,设置连接池的参数 - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` - idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` +```js +import mysql from 'mysql2/promise'; + +// 创建连接池,设置连接池的参数 +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` + idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` + - ```js - const mysql = require('mysql2'); - // 创建连接池,设置连接池的参数 - const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - database: 'test', - waitForConnections: true, - connectionLimit: 10, - maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` - idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 - queueLimit: 0, - enableKeepAlive: true, - keepAliveInitialDelay: 0 - }); - ``` +```js +const mysql = require('mysql2'); + +// 创建连接池,设置连接池的参数 +const pool = mysql.createPool({ + host: 'localhost', + user: 'root', + database: 'test', + waitForConnections: true, + connectionLimit: 10, + maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit` + idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000 + queueLimit: 0, + enableKeepAlive: true, + keepAliveInitialDelay: 0, +}); +``` + @@ -239,53 +253,60 @@ MySQL2 提供了 `execute` 辅助函数,它将准备和查询语句。 您还 - ```js - try { - // For pool initialization, see above - const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); - // Connection is automatically released when query resolves - } catch (err) { - console.log(err); - } - ``` + +```js +try { + // For pool initialization, see above + const [rows, fields] = await pool.query('SELECT `field` FROM `table`'); + // Connection is automatically released when query resolves +} catch (err) { + console.log(err); +} +``` + - ```js - // For pool initialization, see above - pool.query('SELECT `field` FROM `table`', function(err, rows, fields) { - // Connection is automatically released when query resolves - }); - ``` + +```js +// For pool initialization, see above +pool.query('SELECT `field` FROM `table`', function (err, rows, fields) { + // Connection is automatically released when query resolves +}); +``` + - 或者,也可以手动从池中获取连接并稍后返回: - ```js - // For pool initialization, see above - const conn = await pool.getConnection(); +```js +// For pool initialization, see above +const conn = await pool.getConnection(); + +// Do something with the connection +await conn.query(/* ... */); + +// Don't forget to release the connection when finished! +pool.releaseConnection(conn); +``` + + + + +```js +// For pool initialization, see above +pool.getConnection(function (err, conn) { // Do something with the connection - await conn.query(/* ... */); + conn.query(/* ... */); // Don't forget to release the connection when finished! pool.releaseConnection(conn); - ``` - - - ```js - // For pool initialization, see above - pool.getConnection(function(err, conn) { - // Do something with the connection - conn.query(/* ... */); +}); +``` - // Don't forget to release the connection when finished! - pool.releaseConnection(conn); - }); - ``` @@ -300,23 +321,28 @@ MySQL2 提供了 `execute` 辅助函数,它将准备和查询语句。 您还 ### Promise封装 MySQL2 也支持 Promise API。 这与 ES7 异步等待非常有效。 + ```js import mysql from 'mysql2/promise'; async function main() { // create the connection const connection = await mysql.createConnection({ - host:'localhost', - user: 'root', + host: 'localhost', + user: 'root', database: 'test', }); // query database - const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); + const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] + ); } ``` MySQL2 使用范围内可用的默认 `Promise` 对象。 但是你可以选择你想使用的 `Promise` 实现。 + ```js // 导入模块 import mysql from 'mysql2/promise'; @@ -326,24 +352,28 @@ import bluebird from 'bluebird'; // create the connection, specify bluebird as Promise const connection = await mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', Promise: bluebird, }); // query database -const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); +const [rows, fields] = await connection.execute( + 'SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', + ['Morty', 14] +); ``` MySQL2 还在 Pools 上公开了一个 `.promise()`函数,因此您可以从同一个池创建一个 promise/non-promise 连接。 + ```js import mysql from 'mysql2'; async function main() { // create the pool const pool = mysql.createPool({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); @@ -352,23 +382,26 @@ async function main() { const promisePool = pool.promise(); // query database using promises - const [rows,fields] = await promisePool.query('SELECT 1'); + const [rows, fields] = await promisePool.query('SELECT 1'); } ``` MySQL2 在 Connections 上公开了一个 `.promise()`函数,以“升级”现有的 non-promise 连接以使用 Promise。 -```js + +```js {11} const mysql = require('mysql2'); // create the connection const conn = mysql.createConnection({ - host:'localhost', + host: 'localhost', user: 'root', database: 'test', }); -conn.promise().query('SELECT 1') - .then(([rows,fields]) => { +conn + .promise() + .query('SELECT 1') + .then(([rows, fields]) => { console.log(rows); }) .catch(console.log) @@ -381,7 +414,7 @@ conn.promise().query('SELECT 1') 如果你有两个相同名称的列,你可能希望以数组而不是对象的形式获取结果,为了防止冲突,这是与 [Node MySQL][node-mysql] 库的区别。 -例如: ``` SELECT 1 AS `foo`, 2 AS `foo` ```. +例如: `` SELECT 1 AS `foo`, 2 AS `foo` ``. 您可以在连接级别(适用于所有查询)或查询级别(仅适用于该特定查询)启用此设置。 @@ -389,64 +422,73 @@ conn.promise().query('SELECT 1') - ```js {5} - const conn = await mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = await mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + - ```js {5} - const conn = mysql.createConnection({ - host: 'localhost', - database: 'test', - user: 'root', - rowsAsArray: true, - }); - ``` + +```js {5} +const conn = mysql.createConnection({ + host: 'localhost', + database: 'test', + user: 'root', + rowsAsArray: true, +}); +``` + #### 查询级别 + - ```js {4} - try { - const [results, fields] = await conn.query({ - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }); - - console.log(results); // 返回数组而不是数组对象 - console.log(fields); // 无变化 - } catch (err) { - console.log(err); - } - ``` + +```js {4} +try { + const [results, fields] = await conn.query({ + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }); + + console.log(results); // 返回数组而不是数组对象 + console.log(fields); // 无变化 +} catch (err) { + console.log(err); +} +``` + - ```js {4} - conn.query( - { - sql: 'SELECT 1 AS `foo`, 2 AS `foo`', - rowsAsArray: true, - }, - function(err, results, fields) { - console.log(results); // in this query, results will be an array of arrays rather than an array of objects - console.log(fields); // fields are unchanged - } - ); - ``` + +```js {4} +conn.query( + { + sql: 'SELECT 1 AS `foo`, 2 AS `foo`', + rowsAsArray: true, + }, + function (err, results, fields) { + console.log(results); // in this query, results will be an array of arrays rather than an array of objects + console.log(fields); // fields are unchanged + } +); +``` + --- :::tip Getting Help -Need help? Ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) or [GitHub](https://github.com/sidorares/node-mysql2/discussions). +Need help? Ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/mysql2) or [GitHub](https://github.com/sidorares/node-mysql2/discussions). If you've encountered an issue, please [file it on GitHub](https://github.com/sidorares/node-mysql2/issues). ::: diff --git a/website/package-lock.json b/website/package-lock.json index 3c15a7d727..4703f86bbe 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -23,12 +23,30 @@ "@docusaurus/module-type-aliases": "3.0.0", "@docusaurus/tsconfig": "3.0.0", "@docusaurus/types": "3.0.0", - "typescript": "~5.2.2" + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint": "^8.54.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.4", + "prettier": "^3.1.0", + "typescript": "^5.2.2" }, "engines": { "node": ">=18.0" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@algolia/autocomplete-core": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", @@ -2814,6 +2832,111 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "devOptional": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "devOptional": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "devOptional": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "devOptional": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "devOptional": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "devOptional": true + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "devOptional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "devOptional": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -2827,6 +2950,39 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "devOptional": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "devOptional": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "devOptional": true + }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -3773,6 +3929,12 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/mdast": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", @@ -3797,9 +3959,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.2.tgz", + "integrity": "sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==", "dependencies": { "undici-types": "~5.26.4" } @@ -3894,6 +4056,12 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.6.tgz", "integrity": "sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA==" }, + "node_modules/@types/semver": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", + "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "dev": true + }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -3955,6 +4123,195 @@ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", + "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/type-utils": "6.11.0", + "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", + "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", + "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/utils": "6.11.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.11.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -4342,11 +4699,43 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" }, + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -4355,6 +4744,95 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz", + "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -4368,6 +4846,15 @@ "astring": "bin/astring" } }, + "node_modules/asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4417,6 +4904,18 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", @@ -5740,6 +6239,12 @@ "node": ">=4.0.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "devOptional": true + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -5944,6 +6449,18 @@ "node": ">=6" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "devOptional": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/docusaurus-plugin-sass": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.5.tgz", @@ -6132,11 +6649,126 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", + "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", + "dev": true, + "dependencies": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.0.1" + } + }, "node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==" }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -6172,6 +6804,291 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "devOptional": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.4", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.8" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.4.tgz", + "integrity": "sha512-eD83+65e8YPVg6603Om2iCIwcQJf/y7++MWm4tACtEswFLYMwxwVWAfwN+e19f5Ad/FOyyNg9Dfi5lXhH3Y3rA==", + "dev": true, + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -6184,6 +7101,203 @@ "node": ">=8.0.0" } }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "devOptional": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "devOptional": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "devOptional": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "devOptional": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/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==", + "devOptional": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "devOptional": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "devOptional": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "devOptional": true + }, + "node_modules/eslint/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==", + "devOptional": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/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==", + "devOptional": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/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==", + "devOptional": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/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==", + "devOptional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "devOptional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/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==", + "devOptional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "devOptional": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -6196,6 +7310,27 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "devOptional": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "devOptional": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -6507,6 +7642,12 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "devOptional": true + }, "node_modules/fast-url-parser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", @@ -6584,6 +7725,18 @@ "node": ">=0.4.0" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "devOptional": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-loader": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", @@ -6735,6 +7888,26 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "devOptional": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "devOptional": true + }, "node_modules/follow-redirects": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", @@ -6754,6 +7927,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", @@ -6975,6 +8157,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7013,6 +8222,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/github-slugger": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", @@ -7118,6 +8355,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -7188,6 +8440,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "devOptional": true + }, "node_modules/gray-matter": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", @@ -7241,6 +8499,15 @@ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7282,6 +8549,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-yarn": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", @@ -7891,6 +9173,20 @@ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -7937,11 +9233,52 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -7953,6 +9290,34 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", @@ -7975,6 +9340,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-decimal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", @@ -8014,6 +9394,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "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", @@ -8022,6 +9414,21 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8057,6 +9464,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-npm": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", @@ -8076,6 +9504,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", @@ -8127,6 +9570,22 @@ "@types/estree": "*" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -8143,6 +9602,27 @@ "node": ">=6" } }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -8154,11 +9634,90 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -8196,6 +9755,19 @@ "node": ">=0.10.0" } }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -8302,6 +9874,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "devOptional": true + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -8324,6 +9902,21 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -8395,6 +9988,19 @@ "node": ">=6" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "devOptional": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -8468,6 +10074,12 @@ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "devOptional": true + }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -10798,6 +12410,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "devOptional": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -10933,23 +12551,96 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "engines": { - "node": ">= 0.4" + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" } }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "node_modules/object.hasown": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", + "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -11028,6 +12719,23 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "devOptional": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-cancelable": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", @@ -11969,6 +13677,30 @@ "postcss": "^8.2.15" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "devOptional": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-error": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", @@ -12547,6 +14279,26 @@ "node": ">=6.0.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -12576,6 +14328,23 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexpu-core": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", @@ -12926,6 +14695,15 @@ "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -13023,6 +14801,30 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -13042,6 +14844,20 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -13429,6 +15245,20 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -13748,6 +15578,71 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/string.prototype.matchall": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", + "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "regexp.prototype.flags": "^1.5.0", + "set-function-name": "^2.0.0", + "side-channel": "^1.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/stringify-entities": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", @@ -13785,6 +15680,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-bom-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", @@ -14166,11 +16070,59 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "devOptional": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -14213,6 +16165,71 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -14255,6 +16272,21 @@ "node": "*" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -15174,6 +17206,88 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", diff --git a/website/package.json b/website/package.json index 2c2fbb842b..5f25cf55aa 100644 --- a/website/package.json +++ b/website/package.json @@ -11,7 +11,9 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc" + "typecheck": "tsc", + "lintcheck": "prettier --check . && eslint . --ext .ts,.tsx", + "lint": "prettier --write . && eslint . --fix" }, "dependencies": { "@docusaurus/core": "3.0.0", @@ -29,7 +31,16 @@ "@docusaurus/module-type-aliases": "3.0.0", "@docusaurus/tsconfig": "3.0.0", "@docusaurus/types": "3.0.0", - "typescript": "~5.2.2" + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint": "^8.54.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.4", + "prettier": "^3.1.0", + "typescript": "^5.2.2" }, "browserslist": { "production": [ @@ -45,8 +56,5 @@ }, "engines": { "node": ">=18.0" - }, - "overrides": { - "axios": "^1.6.1" } } diff --git a/website/plugins/locale.ts b/website/plugins/locale.ts index b0b442f677..e9e4b5e29b 100644 --- a/website/plugins/locale.ts +++ b/website/plugins/locale.ts @@ -1,17 +1,16 @@ import type { Plugin } from '@docusaurus/types'; -export const navbarLocalePlugin = (): Plugin => { - return { - name: 'navbar-locale-plugin', - async contentLoaded({ actions }) { - const { setGlobalData } = actions; - setGlobalData({ currentLocale: process.env.LOCALE }); - }, - }; -}; +export const navbarLocalePlugin = (): Plugin => ({ + name: 'navbar-locale-plugin', + contentLoaded({ actions }) { + const { setGlobalData } = actions; + setGlobalData({ currentLocale: process.env.LOCALE }); + }, +}); export const useLocale = - typeof process.env?.LOCALE === 'string' && process.env.LOCALE ? true : false; + typeof process.env?.LOCALE === 'string' && + process.env.LOCALE.trim().length > 0; export const getLocaleURL = (): string => useLocale ? `/${process.env.LOCALE}/docs` : '/docs'; diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 0db8d78597..a79e5d46d7 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Redirect } from '@docusaurus/router'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; diff --git a/website/tsconfig.json b/website/tsconfig.json index 0774c4f1a1..35f06d1c7a 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,7 +1,13 @@ { - // This file is not used in compilation. It is here just for a nice editor experience. - "extends": "@docusaurus/tsconfig", - "compilerOptions": { - "baseUrl": "." - } + // This file is not used in compilation. It is here just for a nice editor experience. + "extends": "@docusaurus/tsconfig", + "compilerOptions": { + "baseUrl": ".", + "isolatedModules": true, + "allowJs": false, + "strict": true, + "alwaysStrict": true, + "strictFunctionTypes": true, + "noUnusedLocals": true + } }