diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml new file mode 100644 index 000000000..ad6cefbd7 --- /dev/null +++ b/.github/workflows/api.yml @@ -0,0 +1,40 @@ +name: API report + +on: [push, pull_request] + +jobs: + report: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 16.5.0 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Check files + run: ls built + + - name: API report + run: npm run api-prod + + - name: Show report + if: always() + run: cat temp/misskey-js.api.md diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d65076ebb..1c6615e17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,6 +36,7 @@ jobs: - backend - frontend - sw + - misskey-js steps: - uses: actions/checkout@v3.3.0 with: @@ -61,6 +62,7 @@ jobs: matrix: workspace: - backend + - misskey-js steps: - uses: actions/checkout@v3.3.0 with: diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml new file mode 100644 index 000000000..75d38af78 --- /dev/null +++ b/.github/workflows/test-misskey-js.yml @@ -0,0 +1,50 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Test + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.5.0] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Test + run: npm test + env: + CI: true + + - name: Upload Coverage + uses: codecov/codecov-action@v1 diff --git a/.gitignore b/.gitignore index c413cd4da..29420311b 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ api-docs.json .DS_Store /files ormconfig.json +temp # blender backups *.blend1 diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 66d6d81fb..65d1a5e36 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -42,7 +42,7 @@ "json5": "2.2.3", "matter-js": "0.19.0", "mfm-js": "0.23.3", - "misskey-js": "0.0.15", + "misskey-js": "../misskey-js", "photoswipe": "5.3.6", "prismjs": "1.29.0", "punycode": "2.3.0", diff --git a/packages/misskey-js/.eslintignore b/packages/misskey-js/.eslintignore new file mode 100644 index 000000000..f22128f04 --- /dev/null +++ b/packages/misskey-js/.eslintignore @@ -0,0 +1,7 @@ +node_modules +/built +/coverage +/.eslintrc.js +/jest.config.ts +/test +/test-d diff --git a/packages/misskey-js/.eslintrc.js b/packages/misskey-js/.eslintrc.js new file mode 100644 index 000000000..426894947 --- /dev/null +++ b/packages/misskey-js/.eslintrc.js @@ -0,0 +1,57 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'], + }, + plugins: [ + '@typescript-eslint', + ], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + ], + rules: { + 'indent': ['error', 'tab', { + 'SwitchCase': 1, + 'MemberExpression': 'off', + 'flatTernaryExpressions': true, + 'ArrayExpression': 'first', + 'ObjectExpression': 'first', + }], + 'eol-last': ['error', 'always'], + 'semi': ['error', 'always'], + 'quotes': ['error', 'single'], + 'comma-dangle': ['error', 'always-multiline'], + 'keyword-spacing': ['error', { + 'before': true, + 'after': true, + }], + 'key-spacing': ['error', { + 'beforeColon': false, + 'afterColon': true, + }], + 'space-infix-ops': ['error'], + 'space-before-blocks': ['error', 'always'], + 'object-curly-spacing': ['error', 'always'], + 'nonblock-statement-body-position': ['error', 'beside'], + 'eqeqeq': ['error', 'always', { 'null': 'ignore' }], + 'no-multiple-empty-lines': ['error', { 'max': 1 }], + 'no-multi-spaces': ['error'], + 'no-var': ['error'], + 'prefer-arrow-callback': ['error'], + 'no-throw-literal': ['error'], + 'no-param-reassign': ['warn'], + 'no-constant-condition': ['warn'], + 'no-empty-pattern': ['warn'], + '@typescript-eslint/no-unnecessary-condition': ['error'], + '@typescript-eslint/no-inferrable-types': ['warn'], + '@typescript-eslint/no-non-null-assertion': ['warn'], + '@typescript-eslint/explicit-function-return-type': ['warn'], + '@typescript-eslint/no-misused-promises': ['error', { + 'checksVoidReturn': false, + }], + '@typescript-eslint/consistent-type-imports': 'error', + }, +}; diff --git a/packages/misskey-js/CONTRIBUTING.md b/packages/misskey-js/CONTRIBUTING.md new file mode 100644 index 000000000..aa759345b --- /dev/null +++ b/packages/misskey-js/CONTRIBUTING.md @@ -0,0 +1,90 @@ +# Contribution guide +**[✨ English version available](/docs/CONTRIBUTING.en.md)** + +プロジェクトに興味を持っていただきありがとうございます! +このドキュメントでは、プロジェクトに貢献する際に必要な情報をまとめています。 + +## 実装をする前に +機能追加やバグ修正をしたいときは、まずIssueなどで設計、方針をレビューしてもらいましょう(無い場合は作ってください)。このステップがないと、せっかく実装してもPRがマージされない可能性が高くなります。 + +また、実装に取り掛かるときは当該Issueに自分をアサインしてください(自分でできない場合は他メンバーに自分をアサインしてもらうようお願いしてください)。 +自分が実装するという意思表示をすることで、作業がバッティングするのを防ぎます。 + +## Issues +Issueを作成する前に、以下をご確認ください: +- 重複を防ぐため、既に同様の内容のIssueが作成されていないか検索してから新しいIssueを作ってください。 +- Issueを質問に使わないでください。 + - Issueは、要望、提案、問題の報告にのみ使用してください。 + - 質問は、[Misskey Forum](https://forum.misskey.io/)や[Discord](https://discord.gg/Wp8gVStHW3)でお願いします。 + +## PRの作成 +PRを作成する前に、以下をご確認ください: +- 可能であればタイトルに、以下で示すようなPRの種類が分かるキーワードをプリフィクスしてください。 + - fix / refactor / feat / enhance / perf / chore 等 + - また、PRの粒度が適切であることを確認してください。ひとつのPRに複数の種類の変更や関心を含めることは避けてください。 +- このPRによって解決されるIssueがある場合は、そのIssueへの参照を本文内に含めてください。 +- [`CHANGELOG.md`](/CHANGELOG.md)に変更点を追記してください。リファクタリングなど、利用者に影響を与えない変更についてはこの限りではありません。 +- この変更により新たに作成、もしくは更新すべきドキュメントがないか確認してください。 +- 機能追加やバグ修正をした場合は、可能であればテストケースを追加してください。 +- テスト、Lintが通っていることを予め確認してください。 + - `npm run test`、`npm run lint`でぞれぞれ実施可能です +- `npm run api`を実行してAPIレポートを更新し、差分がある場合はコミットしてください。 + - APIレポートの詳細については[こちら](#api-extractor) + +ご協力ありがとうございます🤗 + +## Tools +### eslint +このプロジェクトではコードのフォーマットチェック/整形に[eslint](https://eslint.org/)を導入しています。 +CI上でも自動でチェックされ、ルールに則っていないコードがあるとエラーになります。 + +### Jest +このプロジェクトではテストフレームワークとして[Jest](https://jestjs.io/)を導入しています。 +テストは[`/test`ディレクトリ](/test)に置かれます。 + +テストはCIにより各コミット/各PRに対して自動で実施されます。 +ローカル環境でテストを実施するには、`npm run test`を実行してください。 + +### tsd +このプロジェクトでは型のテストを行うために[tsd](https://github.com/SamVerschueren/tsd)を導入しています。 +Jestによるテストでは「型が期待したものか」というのはチェックすることができません。tsdを使うことで、型が意図したものであることを担保することができます。 +tsdによる型テストは[`/test-d`ディレクトリ](/test-d)に置かれます。 + +テストはCIにより各コミット/各PRに対して自動で実施されます。 +ローカル環境でテストを実施するには、`npm run test`を実行してください。 + +### API Extractor +このプロジェクトでは[API Extractor](https://api-extractor.com/)を導入しています。API ExtractorはAPIレポートを生成する役割を持ちます。 +APIレポートはいわばAPIのスナップショットで、このライブラリが外部に公開(export)している各種関数や型の定義が含まれています。`npm run api`コマンドを実行すると、その時点でのレポートが[`/etc`ディレクトリ](/etc)に生成されるようになっています。 + +exportしているAPIに変更があると、当然生成されるレポートの内容も変わるので、例えばdevelopブランチで生成されたレポートとPRのブランチで生成されたレポートを比較することで、意図しない破壊的変更の検出や、破壊的変更の影響確認に用いることができます。 +また、各コミットや各PRで実行されるCI内部では、都度APIレポートを生成して既存のレポートと差分が無いかチェックしています。もし差分があるとエラーになります。 + +PRを作る際は、`npm run api`コマンドを実行してAPIレポートを生成し、差分がある場合はコミットしてください。 +レポートをコミットすることでその破壊的変更が意図したものであると示すことができるほか、上述したようにレポート間の差分が出ることで影響範囲をレビューしやすくなります。 + +### Codecov +このプロジェクトではカバレッジの計測に[Codecov](https://about.codecov.io/)を導入しています。カバレッジは、コードがどれくらいテストでカバーされているかを表すものです。 + +カバレッジ計測はCIで自動的に行われ、特に操作は必要ありません。カバレッジは[ここ](https://codecov.io/gh/misskey-dev/misskey.js)から見ることができます。 + +また、各PRに対してもそのブランチのカバレッジが自動的に計算され、マージ先のカバレッジとの差分を含んだレポートがCodecovのbotによりコメントされます。これにより、そのPRをマージすることでどれくらいカバレッジが増加するのか/減少するのかを確認することができます。 + +## レビュイーの心得 +[PRのセクション](#PRの作成)をご一読ください。 +また、後述の「レビュー観点」も意識してみてください。 + +## レビュワーの心得 +- 直して欲しい点だけでなく、良い点も積極的にコメントしましょう。 + - 貢献するモチベーションアップに繋がります。 + +### レビュー観点 +- セキュリティ + - このPRをマージすることで、脆弱性を生まないか? +- パフォーマンス + - このPRをマージすることで、予期せずパフォーマンスが悪化しないか? + - もっと効率的な方法は無いか? +- テスト + - 期待する振る舞いがテストで担保されているか? + - 抜けやモレは無いか? + - 異常系のチェックは出来ているか? diff --git a/packages/misskey-js/LICENSE b/packages/misskey-js/LICENSE new file mode 100644 index 000000000..11c1f9ce2 --- /dev/null +++ b/packages/misskey-js/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-2022 syuilo and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/misskey-js/README.md b/packages/misskey-js/README.md new file mode 100644 index 000000000..63d4b36c5 --- /dev/null +++ b/packages/misskey-js/README.md @@ -0,0 +1,158 @@ +# misskey.js +**Strongly-typed official Misskey SDK for browsers/Node.js.** + +[![Test](https://github.com/misskey-dev/misskey.js/actions/workflows/test.yml/badge.svg)](https://github.com/misskey-dev/misskey.js/actions/workflows/test.yml) +[![codecov](https://codecov.io/gh/misskey-dev/misskey.js/branch/develop/graph/badge.svg?token=PbrTtk3nVD)](https://codecov.io/gh/misskey-dev/misskey.js) + +[![NPM](https://nodei.co/npm/misskey-js.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/misskey-js) + +JavaScript(TypeScript)用の公式MisskeySDKです。ブラウザ/Node.js上で動作します。 + +以下が提供されています: +- ユーザー認証 +- APIリクエスト +- ストリーミング +- ユーティリティ関数 +- Misskeyの各種型定義 + +対応するMisskeyのバージョンは12以上です。 + +## Install +``` +npm i misskey-js +``` + +# Usage +インポートは以下のようにまとめて行うと便利です。 + +``` ts +import * as Misskey from 'misskey-js'; +``` + +便宜上、以後のコード例は上記のように`* as Misskey`としてインポートしている前提のものになります。 + +ただし、このインポート方法だとTree-Shakingできなくなるので、コードサイズが重要なユースケースでは以下のような個別インポートをお勧めします。 + +``` ts +import { api as misskeyApi } from 'misskey-js'; +``` + +## Authenticate +todo + +## API request +APIを利用する際は、利用するサーバーの情報とアクセストークンを与えて`APIClient`クラスのインスタンスを初期化し、そのインスタンスの`request`メソッドを呼び出してリクエストを行います。 + +``` ts +const cli = new Misskey.api.APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', +}); + +const meta = await cli.request('meta', { detail: true }); +``` + +`request`の第一引数には呼び出すエンドポイント名、第二引数にはパラメータオブジェクトを渡します。レスポンスはPromiseとして返ります。 + +## Streaming +misskey.jsのストリーミングでは、二つのクラスが提供されます。 +ひとつは、ストリーミングのコネクション自体を司る`Stream`クラスと、もうひとつはストリーミング上のチャンネルの概念を表す`Channel`クラスです。 +ストリーミングを利用する際は、まず`Stream`クラスのインスタンスを初期化し、その後で`Stream`インスタンスのメソッドを利用して`Channel`クラスのインスタンスを取得する形になります。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); +const mainChannel = stream.useChannel('main'); +mainChannel.on('notification', notification => { + console.log('notification received', notification); +}); +``` + +コネクションが途切れても自動で再接続されます。 + +### チャンネルへの接続 +チャンネルへの接続は`Stream`クラスの`useChannel`メソッドを使用します。 + +パラメータなし +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + +const mainChannel = stream.useChannel('main'); +``` + +パラメータあり +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + +const messagingChannel = stream.useChannel('messaging', { + otherparty: 'xxxxxxxxxx', +}); +``` + +### チャンネルから切断 +`Channel`クラスの`dispose`メソッドを呼び出します。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + +const mainChannel = stream.useChannel('main'); + +mainChannel.dispose(); +``` + +### メッセージの受信 +`Channel`クラスはEventEmitterを継承しており、メッセージがサーバーから受信されると受け取ったイベント名でペイロードをemitします。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); +const mainChannel = stream.useChannel('main'); +mainChannel.on('notification', notification => { + console.log('notification received', notification); +}); +``` + +### メッセージの送信 +`Channel`クラスの`send`メソッドを使用してメッセージをサーバーに送信することができます。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); +const messagingChannel = stream.useChannel('messaging', { + otherparty: 'xxxxxxxxxx', +}); + +messagingChannel.send('read', { + id: 'xxxxxxxxxx' +}); +``` + +### コネクション確立イベント +`Stream`クラスの`_connected_`イベントが利用可能です。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); +stream.on('_connected_', () => { + console.log('connected'); +}); +``` + +### コネクション切断イベント +`Stream`クラスの`_disconnected_`イベントが利用可能です。 + +``` ts +const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); +stream.on('_disconnected_', () => { + console.log('disconnected'); +}); +``` + +### コネクションの状態 +`Stream`クラスの`state`プロパティで確認できます。 + +- `initializing`: 接続確立前 +- `connected`: 接続完了 +- `reconnecting`: 再接続中 + +--- + +
+ +
diff --git a/packages/misskey-js/api-extractor.json b/packages/misskey-js/api-extractor.json new file mode 100644 index 000000000..a95281a6d --- /dev/null +++ b/packages/misskey-js/api-extractor.json @@ -0,0 +1,364 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/built/index.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": false + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "none" + // "addToApiReportFile": false + } + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/packages/misskey-js/docs/CONTRIBUTING.en.md b/packages/misskey-js/docs/CONTRIBUTING.en.md new file mode 100644 index 000000000..1db282e35 --- /dev/null +++ b/packages/misskey-js/docs/CONTRIBUTING.en.md @@ -0,0 +1,30 @@ +# Contribution guide +:v: Thanks for your contributions :v: + +**ℹ️ Important:** This project uses Japanese as its major language, **but you do not need to translate and write the Issues/PRs in Japanese.** +Also, you might receive comments on your Issue/PR in Japanese, but you do not need to reply to them in Japanese as well.\ +The accuracy of translation into Japanese is not high, so it will be easier for us to understand if you write it in the original language. +It will also allow the reader to use the translation tool of their preference if necessary. + +## Issues +Before creating an issue, please check the following: +- To avoid duplication, please search for similar issues before creating a new issue. +- Do not use Issues as a question. + - Issues should only be used to feature requests, suggestions, and report problems. + - Please ask questions in the [Misskey Forum](https://forum.misskey.io/) or [Discord](https://discord.gg/Wp8gVStHW3). + +## Creating a PR +Thank you for your PR! Before creating a PR, please check the following: +- If possible, prefix the title with a keyword that identifies the type of this PR, as shown below. + - fix / refactor / feat / enhance / perf / chore etc. + - Also, make sure that the granularity of this PR is appropriate. Please do not include more than one type of change or interest in a single PR. +- If there is an Issue which will be resolved by this PR, please include a reference to the Issue in the text. +- Please add the summary of the changes to [`CHANGELOG.md`](/CHANGELOG.md). However, this is not necessary for changes that do not affect the users, such as refactoring. +- Check if there are any documents that need to be created or updated due to this change. +- If you have added a feature or fixed a bug, please add a test case if possible. +- Please make sure that tests and Lint are passed in advance. + - You can run it with `npm run test` and `npm run lint`. +- Run `npm run api` to update the API report and commit it if there are any diffs. + +Thanks for your cooperation 🤗 + diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md new file mode 100644 index 000000000..ad5d1bc4b --- /dev/null +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -0,0 +1,2722 @@ +## API Report File for "misskey-js" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { EventEmitter } from 'eventemitter3'; + +// @public (undocumented) +export type Acct = { + username: string; + host: string | null; +}; + +// Warning: (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type Ad = TODO_2; + +// @public (undocumented) +type Announcement = { + id: ID; + createdAt: DateString; + updatedAt: DateString | null; + text: string; + title: string; + imageUrl: string | null; + isRead?: boolean; +}; + +// @public (undocumented) +type Antenna = { + id: ID; + createdAt: DateString; + name: string; + keywords: string[][]; + excludeKeywords: string[][]; + src: 'home' | 'all' | 'users' | 'list' | 'group'; + userListId: ID | null; + userGroupId: ID | null; + users: string[]; + caseSensitive: boolean; + notify: boolean; + withReplies: boolean; + withFile: boolean; + hasUnreadNote: boolean; +}; + +declare namespace api { + export { + isAPIError, + APIError, + FetchLike, + APIClient + } +} +export { api } + +// @public (undocumented) +class APIClient { + constructor(opts: { + origin: APIClient['origin']; + credential?: APIClient['credential']; + fetch?: APIClient['fetch'] | null | undefined; + }); + // (undocumented) + credential: string | null | undefined; + // (undocumented) + fetch: FetchLike; + // (undocumented) + origin: string; + // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts + // + // (undocumented) + request(endpoint: E, params?: P, credential?: string | null | undefined): Promise extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']>; +} + +// @public (undocumented) +type APIError = { + id: string; + code: string; + message: string; + kind: 'client' | 'server'; + info: Record; +}; + +// @public (undocumented) +type App = TODO_2; + +// @public (undocumented) +type AuthSession = { + id: ID; + app: App; + token: string; +}; + +// @public (undocumented) +type Blocking = { + id: ID; + createdAt: DateString; + blockeeId: User['id']; + blockee: UserDetailed; +}; + +// @public (undocumented) +type Channel = { + id: ID; +}; + +// Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export abstract class ChannelConnection = any> extends EventEmitter { + constructor(stream: Stream, channel: string, name?: string); + // (undocumented) + channel: string; + // (undocumented) + abstract dispose(): void; + // (undocumented) + abstract id: string; + // (undocumented) + inCount: number; + // (undocumented) + name?: string; + // (undocumented) + outCount: number; + // (undocumented) + send(type: T, body: Channel['receives'][T]): void; + // (undocumented) + protected stream: Stream; +} + +// @public (undocumented) +export type Channels = { + main: { + params: null; + events: { + notification: (payload: Notification_2) => void; + mention: (payload: Note) => void; + reply: (payload: Note) => void; + renote: (payload: Note) => void; + follow: (payload: User) => void; + followed: (payload: User) => void; + unfollow: (payload: User) => void; + meUpdated: (payload: MeDetailed) => void; + pageEvent: (payload: PageEvent) => void; + urlUploadFinished: (payload: { + marker: string; + file: DriveFile; + }) => void; + readAllNotifications: () => void; + unreadNotification: (payload: Notification_2) => void; + unreadMention: (payload: Note['id']) => void; + readAllUnreadMentions: () => void; + unreadSpecifiedNote: (payload: Note['id']) => void; + readAllUnreadSpecifiedNotes: () => void; + readAllMessagingMessages: () => void; + messagingMessage: (payload: MessagingMessage) => void; + unreadMessagingMessage: (payload: MessagingMessage) => void; + readAllAntennas: () => void; + unreadAntenna: (payload: Antenna) => void; + readAllAnnouncements: () => void; + readAllChannels: () => void; + unreadChannel: (payload: Note['id']) => void; + myTokenRegenerated: () => void; + reversiNoInvites: () => void; + reversiInvited: (payload: FIXME) => void; + signin: (payload: FIXME) => void; + registryUpdated: (payload: { + scope?: string[]; + key: string; + value: any | null; + }) => void; + driveFileCreated: (payload: DriveFile) => void; + readAntenna: (payload: Antenna) => void; + }; + receives: null; + }; + homeTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + localTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + hybridTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + globalTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + messaging: { + params: { + otherparty?: User['id'] | null; + group?: UserGroup['id'] | null; + }; + events: { + message: (payload: MessagingMessage) => void; + deleted: (payload: MessagingMessage['id']) => void; + read: (payload: MessagingMessage['id'][]) => void; + typers: (payload: User[]) => void; + }; + receives: { + read: { + id: MessagingMessage['id']; + }; + }; + }; + serverStats: { + params: null; + events: { + stats: (payload: FIXME) => void; + }; + receives: { + requestLog: { + id: string | number; + length: number; + }; + }; + }; + queueStats: { + params: null; + events: { + stats: (payload: FIXME) => void; + }; + receives: { + requestLog: { + id: string | number; + length: number; + }; + }; + }; +}; + +// @public (undocumented) +type Clip = TODO_2; + +// @public (undocumented) +type CustomEmoji = { + id: string; + name: string; + url: string; + category: string; + aliases: string[]; +}; + +// @public (undocumented) +type DateString = string; + +// @public (undocumented) +type DetailedInstanceMetadata = LiteInstanceMetadata & { + pinnedPages: string[]; + pinnedClipId: string | null; + cacheRemoteFiles: boolean; + requireSetup: boolean; + proxyAccountName: string | null; + features: Record; +}; + +// @public (undocumented) +type DriveFile = { + id: ID; + createdAt: DateString; + isSensitive: boolean; + name: string; + thumbnailUrl: string; + url: string; + type: string; + size: number; + md5: string; + blurhash: string; + comment: string | null; + properties: Record; +}; + +// @public (undocumented) +type DriveFolder = TODO_2; + +// @public (undocumented) +export type Endpoints = { + 'admin/abuse-user-reports': { + req: TODO; + res: TODO; + }; + 'admin/delete-all-files-of-a-user': { + req: { + userId: User['id']; + }; + res: null; + }; + 'admin/delete-logs': { + req: NoParams; + res: null; + }; + 'admin/get-index-stats': { + req: TODO; + res: TODO; + }; + 'admin/get-table-stats': { + req: TODO; + res: TODO; + }; + 'admin/invite': { + req: TODO; + res: TODO; + }; + 'admin/logs': { + req: TODO; + res: TODO; + }; + 'admin/reset-password': { + req: TODO; + res: TODO; + }; + 'admin/resolve-abuse-user-report': { + req: TODO; + res: TODO; + }; + 'admin/resync-chart': { + req: TODO; + res: TODO; + }; + 'admin/send-email': { + req: TODO; + res: TODO; + }; + 'admin/server-info': { + req: TODO; + res: TODO; + }; + 'admin/show-moderation-logs': { + req: TODO; + res: TODO; + }; + 'admin/show-user': { + req: TODO; + res: TODO; + }; + 'admin/show-users': { + req: TODO; + res: TODO; + }; + 'admin/silence-user': { + req: TODO; + res: TODO; + }; + 'admin/suspend-user': { + req: TODO; + res: TODO; + }; + 'admin/unsilence-user': { + req: TODO; + res: TODO; + }; + 'admin/unsuspend-user': { + req: TODO; + res: TODO; + }; + 'admin/update-meta': { + req: TODO; + res: TODO; + }; + 'admin/vacuum': { + req: TODO; + res: TODO; + }; + 'admin/accounts/create': { + req: TODO; + res: TODO; + }; + 'admin/ad/create': { + req: TODO; + res: TODO; + }; + 'admin/ad/delete': { + req: { + id: Ad['id']; + }; + res: null; + }; + 'admin/ad/list': { + req: TODO; + res: TODO; + }; + 'admin/ad/update': { + req: TODO; + res: TODO; + }; + 'admin/announcements/create': { + req: TODO; + res: TODO; + }; + 'admin/announcements/delete': { + req: { + id: Announcement['id']; + }; + res: null; + }; + 'admin/announcements/list': { + req: TODO; + res: TODO; + }; + 'admin/announcements/update': { + req: TODO; + res: TODO; + }; + 'admin/drive/clean-remote-files': { + req: TODO; + res: TODO; + }; + 'admin/drive/cleanup': { + req: TODO; + res: TODO; + }; + 'admin/drive/files': { + req: TODO; + res: TODO; + }; + 'admin/drive/show-file': { + req: TODO; + res: TODO; + }; + 'admin/emoji/add': { + req: TODO; + res: TODO; + }; + 'admin/emoji/copy': { + req: TODO; + res: TODO; + }; + 'admin/emoji/list-remote': { + req: TODO; + res: TODO; + }; + 'admin/emoji/list': { + req: TODO; + res: TODO; + }; + 'admin/emoji/remove': { + req: TODO; + res: TODO; + }; + 'admin/emoji/update': { + req: TODO; + res: TODO; + }; + 'admin/federation/delete-all-files': { + req: { + host: string; + }; + res: null; + }; + 'admin/federation/refresh-remote-instance-metadata': { + req: TODO; + res: TODO; + }; + 'admin/federation/remove-all-following': { + req: TODO; + res: TODO; + }; + 'admin/federation/update-instance': { + req: TODO; + res: TODO; + }; + 'admin/moderators/add': { + req: TODO; + res: TODO; + }; + 'admin/moderators/remove': { + req: TODO; + res: TODO; + }; + 'admin/promo/create': { + req: TODO; + res: TODO; + }; + 'admin/queue/clear': { + req: TODO; + res: TODO; + }; + 'admin/queue/deliver-delayed': { + req: TODO; + res: TODO; + }; + 'admin/queue/inbox-delayed': { + req: TODO; + res: TODO; + }; + 'admin/queue/jobs': { + req: TODO; + res: TODO; + }; + 'admin/queue/stats': { + req: TODO; + res: TODO; + }; + 'admin/relays/add': { + req: TODO; + res: TODO; + }; + 'admin/relays/list': { + req: TODO; + res: TODO; + }; + 'admin/relays/remove': { + req: TODO; + res: TODO; + }; + 'announcements': { + req: { + limit?: number; + withUnreads?: boolean; + sinceId?: Announcement['id']; + untilId?: Announcement['id']; + }; + res: Announcement[]; + }; + 'antennas/create': { + req: TODO; + res: Antenna; + }; + 'antennas/delete': { + req: { + antennaId: Antenna['id']; + }; + res: null; + }; + 'antennas/list': { + req: NoParams; + res: Antenna[]; + }; + 'antennas/notes': { + req: { + antennaId: Antenna['id']; + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + }; + res: Note[]; + }; + 'antennas/show': { + req: { + antennaId: Antenna['id']; + }; + res: Antenna; + }; + 'antennas/update': { + req: TODO; + res: Antenna; + }; + 'ap/get': { + req: { + uri: string; + }; + res: Record; + }; + 'ap/show': { + req: { + uri: string; + }; + res: { + type: 'Note'; + object: Note; + } | { + type: 'User'; + object: UserDetailed; + }; + }; + 'app/create': { + req: TODO; + res: App; + }; + 'app/show': { + req: { + appId: App['id']; + }; + res: App; + }; + 'auth/accept': { + req: { + token: string; + }; + res: null; + }; + 'auth/session/generate': { + req: { + appSecret: string; + }; + res: { + token: string; + url: string; + }; + }; + 'auth/session/show': { + req: { + token: string; + }; + res: AuthSession; + }; + 'auth/session/userkey': { + req: { + appSecret: string; + token: string; + }; + res: { + accessToken: string; + user: User; + }; + }; + 'blocking/create': { + req: { + userId: User['id']; + }; + res: UserDetailed; + }; + 'blocking/delete': { + req: { + userId: User['id']; + }; + res: UserDetailed; + }; + 'blocking/list': { + req: { + limit?: number; + sinceId?: Blocking['id']; + untilId?: Blocking['id']; + }; + res: Blocking[]; + }; + 'channels/create': { + req: TODO; + res: TODO; + }; + 'channels/featured': { + req: TODO; + res: TODO; + }; + 'channels/follow': { + req: TODO; + res: TODO; + }; + 'channels/followed': { + req: TODO; + res: TODO; + }; + 'channels/owned': { + req: TODO; + res: TODO; + }; + 'channels/pin-note': { + req: TODO; + res: TODO; + }; + 'channels/show': { + req: TODO; + res: TODO; + }; + 'channels/timeline': { + req: TODO; + res: TODO; + }; + 'channels/unfollow': { + req: TODO; + res: TODO; + }; + 'channels/update': { + req: TODO; + res: TODO; + }; + 'charts/active-users': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: { + local: { + users: number[]; + }; + remote: { + users: number[]; + }; + }; + }; + 'charts/drive': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: { + local: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; + remote: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; + }; + }; + 'charts/federation': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: { + instance: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; + }; + 'charts/hashtag': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: TODO; + }; + 'charts/instance': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + host: string; + }; + res: { + drive: { + decFiles: number[]; + decUsage: number[]; + incFiles: number[]; + incUsage: number[]; + totalFiles: number[]; + totalUsage: number[]; + }; + followers: { + dec: number[]; + inc: number[]; + total: number[]; + }; + following: { + dec: number[]; + inc: number[]; + total: number[]; + }; + notes: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + requests: { + failed: number[]; + received: number[]; + succeeded: number[]; + }; + users: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; + }; + 'charts/network': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: TODO; + }; + 'charts/notes': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: { + local: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + remote: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + }; + }; + 'charts/user/drive': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + userId: User['id']; + }; + res: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; + }; + 'charts/user/following': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + userId: User['id']; + }; + res: TODO; + }; + 'charts/user/notes': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + userId: User['id']; + }; + res: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + }; + 'charts/user/reactions': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + userId: User['id']; + }; + res: TODO; + }; + 'charts/users': { + req: { + span: 'day' | 'hour'; + limit?: number; + offset?: number | null; + }; + res: { + local: { + dec: number[]; + inc: number[]; + total: number[]; + }; + remote: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; + }; + 'clips/add-note': { + req: TODO; + res: TODO; + }; + 'clips/create': { + req: TODO; + res: TODO; + }; + 'clips/delete': { + req: { + clipId: Clip['id']; + }; + res: null; + }; + 'clips/list': { + req: TODO; + res: TODO; + }; + 'clips/notes': { + req: TODO; + res: TODO; + }; + 'clips/show': { + req: TODO; + res: TODO; + }; + 'clips/update': { + req: TODO; + res: TODO; + }; + 'drive': { + req: NoParams; + res: { + capacity: number; + usage: number; + }; + }; + 'drive/files': { + req: { + folderId?: DriveFolder['id'] | null; + type?: DriveFile['type'] | null; + limit?: number; + sinceId?: DriveFile['id']; + untilId?: DriveFile['id']; + }; + res: DriveFile[]; + }; + 'drive/files/attached-notes': { + req: TODO; + res: TODO; + }; + 'drive/files/check-existence': { + req: TODO; + res: TODO; + }; + 'drive/files/create': { + req: TODO; + res: TODO; + }; + 'drive/files/delete': { + req: { + fileId: DriveFile['id']; + }; + res: null; + }; + 'drive/files/find-by-hash': { + req: TODO; + res: TODO; + }; + 'drive/files/find': { + req: { + name: string; + folderId?: DriveFolder['id'] | null; + }; + res: DriveFile[]; + }; + 'drive/files/show': { + req: { + fileId?: DriveFile['id']; + url?: string; + }; + res: DriveFile; + }; + 'drive/files/update': { + req: { + fileId: DriveFile['id']; + folderId?: DriveFolder['id'] | null; + name?: string; + isSensitive?: boolean; + comment?: string | null; + }; + res: DriveFile; + }; + 'drive/files/upload-from-url': { + req: { + url: string; + folderId?: DriveFolder['id'] | null; + isSensitive?: boolean; + comment?: string | null; + marker?: string | null; + force?: boolean; + }; + res: null; + }; + 'drive/folders': { + req: { + folderId?: DriveFolder['id'] | null; + limit?: number; + sinceId?: DriveFile['id']; + untilId?: DriveFile['id']; + }; + res: DriveFolder[]; + }; + 'drive/folders/create': { + req: { + name?: string; + parentId?: DriveFolder['id'] | null; + }; + res: DriveFolder; + }; + 'drive/folders/delete': { + req: { + folderId: DriveFolder['id']; + }; + res: null; + }; + 'drive/folders/find': { + req: { + name: string; + parentId?: DriveFolder['id'] | null; + }; + res: DriveFolder[]; + }; + 'drive/folders/show': { + req: { + folderId: DriveFolder['id']; + }; + res: DriveFolder; + }; + 'drive/folders/update': { + req: { + folderId: DriveFolder['id']; + name?: string; + parentId?: DriveFolder['id'] | null; + }; + res: DriveFolder; + }; + 'drive/stream': { + req: { + type?: DriveFile['type'] | null; + limit?: number; + sinceId?: DriveFile['id']; + untilId?: DriveFile['id']; + }; + res: DriveFile[]; + }; + 'endpoint': { + req: { + endpoint: string; + }; + res: { + params: { + name: string; + type: string; + }[]; + }; + }; + 'endpoints': { + req: NoParams; + res: string[]; + }; + 'federation/dns': { + req: { + host: string; + }; + res: { + a: string[]; + aaaa: string[]; + cname: string[]; + txt: string[]; + }; + }; + 'federation/followers': { + req: { + host: string; + limit?: number; + sinceId?: Following['id']; + untilId?: Following['id']; + }; + res: FollowingFolloweePopulated[]; + }; + 'federation/following': { + req: { + host: string; + limit?: number; + sinceId?: Following['id']; + untilId?: Following['id']; + }; + res: FollowingFolloweePopulated[]; + }; + 'federation/instances': { + req: { + host?: string | null; + blocked?: boolean | null; + notResponding?: boolean | null; + suspended?: boolean | null; + federating?: boolean | null; + subscribing?: boolean | null; + publishing?: boolean | null; + limit?: number; + offset?: number; + sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; + }; + res: Instance[]; + }; + 'federation/show-instance': { + req: { + host: string; + }; + res: Instance; + }; + 'federation/update-remote-user': { + req: { + userId: User['id']; + }; + res: null; + }; + 'federation/users': { + req: { + host: string; + limit?: number; + sinceId?: User['id']; + untilId?: User['id']; + }; + res: UserDetailed[]; + }; + 'following/create': { + req: { + userId: User['id']; + }; + res: User; + }; + 'following/delete': { + req: { + userId: User['id']; + }; + res: User; + }; + 'following/requests/accept': { + req: { + userId: User['id']; + }; + res: null; + }; + 'following/requests/cancel': { + req: { + userId: User['id']; + }; + res: User; + }; + 'following/requests/list': { + req: NoParams; + res: FollowRequest[]; + }; + 'following/requests/reject': { + req: { + userId: User['id']; + }; + res: null; + }; + 'gallery/featured': { + req: null; + res: GalleryPost[]; + }; + 'gallery/popular': { + req: null; + res: GalleryPost[]; + }; + 'gallery/posts': { + req: { + limit?: number; + sinceId?: GalleryPost['id']; + untilId?: GalleryPost['id']; + }; + res: GalleryPost[]; + }; + 'gallery/posts/create': { + req: { + title: GalleryPost['title']; + description?: GalleryPost['description']; + fileIds: GalleryPost['fileIds']; + isSensitive?: GalleryPost['isSensitive']; + }; + res: GalleryPost; + }; + 'gallery/posts/delete': { + req: { + postId: GalleryPost['id']; + }; + res: null; + }; + 'gallery/posts/like': { + req: { + postId: GalleryPost['id']; + }; + res: null; + }; + 'gallery/posts/show': { + req: { + postId: GalleryPost['id']; + }; + res: GalleryPost; + }; + 'gallery/posts/unlike': { + req: { + postId: GalleryPost['id']; + }; + res: null; + }; + 'gallery/posts/update': { + req: { + postId: GalleryPost['id']; + title: GalleryPost['title']; + description?: GalleryPost['description']; + fileIds: GalleryPost['fileIds']; + isSensitive?: GalleryPost['isSensitive']; + }; + res: GalleryPost; + }; + 'games/reversi/games': { + req: TODO; + res: TODO; + }; + 'games/reversi/games/show': { + req: TODO; + res: TODO; + }; + 'games/reversi/games/surrender': { + req: TODO; + res: TODO; + }; + 'games/reversi/invitations': { + req: TODO; + res: TODO; + }; + 'games/reversi/match': { + req: TODO; + res: TODO; + }; + 'games/reversi/match/cancel': { + req: TODO; + res: TODO; + }; + 'get-online-users-count': { + req: NoParams; + res: { + count: number; + }; + }; + 'hashtags/list': { + req: TODO; + res: TODO; + }; + 'hashtags/search': { + req: TODO; + res: TODO; + }; + 'hashtags/show': { + req: TODO; + res: TODO; + }; + 'hashtags/trend': { + req: TODO; + res: TODO; + }; + 'hashtags/users': { + req: TODO; + res: TODO; + }; + 'i': { + req: NoParams; + res: User; + }; + 'i/apps': { + req: TODO; + res: TODO; + }; + 'i/authorized-apps': { + req: TODO; + res: TODO; + }; + 'i/change-password': { + req: TODO; + res: TODO; + }; + 'i/delete-account': { + req: { + password: string; + }; + res: null; + }; + 'i/export-blocking': { + req: TODO; + res: TODO; + }; + 'i/export-following': { + req: TODO; + res: TODO; + }; + 'i/export-mute': { + req: TODO; + res: TODO; + }; + 'i/export-notes': { + req: TODO; + res: TODO; + }; + 'i/export-user-lists': { + req: TODO; + res: TODO; + }; + 'i/favorites': { + req: { + limit?: number; + sinceId?: NoteFavorite['id']; + untilId?: NoteFavorite['id']; + }; + res: NoteFavorite[]; + }; + 'i/gallery/likes': { + req: TODO; + res: TODO; + }; + 'i/gallery/posts': { + req: TODO; + res: TODO; + }; + 'i/get-word-muted-notes-count': { + req: TODO; + res: TODO; + }; + 'i/import-following': { + req: TODO; + res: TODO; + }; + 'i/import-user-lists': { + req: TODO; + res: TODO; + }; + 'i/notifications': { + req: { + limit?: number; + sinceId?: Notification_2['id']; + untilId?: Notification_2['id']; + following?: boolean; + markAsRead?: boolean; + includeTypes?: Notification_2['type'][]; + excludeTypes?: Notification_2['type'][]; + }; + res: Notification_2[]; + }; + 'i/page-likes': { + req: TODO; + res: TODO; + }; + 'i/pages': { + req: TODO; + res: TODO; + }; + 'i/pin': { + req: { + noteId: Note['id']; + }; + res: MeDetailed; + }; + 'i/read-all-messaging-messages': { + req: TODO; + res: TODO; + }; + 'i/read-all-unread-notes': { + req: TODO; + res: TODO; + }; + 'i/read-announcement': { + req: TODO; + res: TODO; + }; + 'i/regenerate-token': { + req: { + password: string; + }; + res: null; + }; + 'i/registry/get-all': { + req: { + scope?: string[]; + }; + res: Record; + }; + 'i/registry/get-detail': { + req: { + key: string; + scope?: string[]; + }; + res: { + updatedAt: DateString; + value: any; + }; + }; + 'i/registry/get': { + req: { + key: string; + scope?: string[]; + }; + res: any; + }; + 'i/registry/keys-with-type': { + req: { + scope?: string[]; + }; + res: Record; + }; + 'i/registry/keys': { + req: { + scope?: string[]; + }; + res: string[]; + }; + 'i/registry/remove': { + req: { + key: string; + scope?: string[]; + }; + res: null; + }; + 'i/registry/scopes': { + req: NoParams; + res: string[][]; + }; + 'i/registry/set': { + req: { + key: string; + value: any; + scope?: string[]; + }; + res: null; + }; + 'i/revoke-token': { + req: TODO; + res: TODO; + }; + 'i/signin-history': { + req: { + limit?: number; + sinceId?: Signin['id']; + untilId?: Signin['id']; + }; + res: Signin[]; + }; + 'i/unpin': { + req: { + noteId: Note['id']; + }; + res: MeDetailed; + }; + 'i/update-email': { + req: { + password: string; + email?: string | null; + }; + res: MeDetailed; + }; + 'i/update': { + req: { + name?: string | null; + description?: string | null; + lang?: string | null; + location?: string | null; + birthday?: string | null; + avatarId?: DriveFile['id'] | null; + bannerId?: DriveFile['id'] | null; + fields?: { + name: string; + value: string; + }[]; + isLocked?: boolean; + isExplorable?: boolean; + hideOnlineStatus?: boolean; + carefulBot?: boolean; + autoAcceptFollowed?: boolean; + noCrawle?: boolean; + isBot?: boolean; + isCat?: boolean; + injectFeaturedNote?: boolean; + receiveAnnouncementEmail?: boolean; + alwaysMarkNsfw?: boolean; + mutedWords?: string[][]; + mutingNotificationTypes?: Notification_2['type'][]; + emailNotificationTypes?: string[]; + }; + res: MeDetailed; + }; + 'i/user-group-invites': { + req: TODO; + res: TODO; + }; + 'i/2fa/done': { + req: TODO; + res: TODO; + }; + 'i/2fa/key-done': { + req: TODO; + res: TODO; + }; + 'i/2fa/password-less': { + req: TODO; + res: TODO; + }; + 'i/2fa/register-key': { + req: TODO; + res: TODO; + }; + 'i/2fa/register': { + req: TODO; + res: TODO; + }; + 'i/2fa/remove-key': { + req: TODO; + res: TODO; + }; + 'i/2fa/unregister': { + req: TODO; + res: TODO; + }; + 'messaging/history': { + req: { + limit?: number; + group?: boolean; + }; + res: MessagingMessage[]; + }; + 'messaging/messages': { + req: { + userId?: User['id']; + groupId?: UserGroup['id']; + limit?: number; + sinceId?: MessagingMessage['id']; + untilId?: MessagingMessage['id']; + markAsRead?: boolean; + }; + res: MessagingMessage[]; + }; + 'messaging/messages/create': { + req: { + userId?: User['id']; + groupId?: UserGroup['id']; + text?: string; + fileId?: DriveFile['id']; + }; + res: MessagingMessage; + }; + 'messaging/messages/delete': { + req: { + messageId: MessagingMessage['id']; + }; + res: null; + }; + 'messaging/messages/read': { + req: { + messageId: MessagingMessage['id']; + }; + res: null; + }; + 'meta': { + req: { + detail?: boolean; + }; + res: { + $switch: { + $cases: [ + [ + { + detail: true; + }, + DetailedInstanceMetadata + ], + [ + { + detail: false; + }, + LiteInstanceMetadata + ], + [ + { + detail: boolean; + }, + LiteInstanceMetadata | DetailedInstanceMetadata + ] + ]; + $default: LiteInstanceMetadata; + }; + }; + }; + 'miauth/gen-token': { + req: TODO; + res: TODO; + }; + 'mute/create': { + req: TODO; + res: TODO; + }; + 'mute/delete': { + req: { + userId: User['id']; + }; + res: null; + }; + 'mute/list': { + req: TODO; + res: TODO; + }; + 'my/apps': { + req: TODO; + res: TODO; + }; + 'notes': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + }; + res: Note[]; + }; + 'notes/children': { + req: { + noteId: Note['id']; + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + }; + res: Note[]; + }; + 'notes/clips': { + req: TODO; + res: TODO; + }; + 'notes/conversation': { + req: TODO; + res: TODO; + }; + 'notes/create': { + req: { + visibility?: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: User['id'][]; + text?: null | string; + cw?: null | string; + viaMobile?: boolean; + localOnly?: boolean; + fileIds?: DriveFile['id'][]; + replyId?: null | Note['id']; + renoteId?: null | Note['id']; + channelId?: null | Channel['id']; + poll?: null | { + choices: string[]; + multiple?: boolean; + expiresAt?: null | number; + expiredAfter?: null | number; + }; + }; + res: { + createdNote: Note; + }; + }; + 'notes/delete': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notes/favorites/create': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notes/favorites/delete': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notes/featured': { + req: TODO; + res: Note[]; + }; + 'notes/global-timeline': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'notes/hybrid-timeline': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'notes/local-timeline': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'notes/mentions': { + req: { + following?: boolean; + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + }; + res: Note[]; + }; + 'notes/polls/recommendation': { + req: TODO; + res: TODO; + }; + 'notes/polls/vote': { + req: { + noteId: Note['id']; + choice: number; + }; + res: null; + }; + 'notes/reactions': { + req: { + noteId: Note['id']; + type?: string | null; + limit?: number; + }; + res: NoteReaction[]; + }; + 'notes/reactions/create': { + req: { + noteId: Note['id']; + reaction: string; + }; + res: null; + }; + 'notes/reactions/delete': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notes/renotes': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + noteId: Note['id']; + }; + res: Note[]; + }; + 'notes/replies': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + noteId: Note['id']; + }; + res: Note[]; + }; + 'notes/search-by-tag': { + req: TODO; + res: TODO; + }; + 'notes/search': { + req: TODO; + res: TODO; + }; + 'notes/show': { + req: { + noteId: Note['id']; + }; + res: Note; + }; + 'notes/state': { + req: TODO; + res: TODO; + }; + 'notes/timeline': { + req: { + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'notes/unrenote': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notes/user-list-timeline': { + req: { + listId: UserList['id']; + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'notes/watching/create': { + req: TODO; + res: TODO; + }; + 'notes/watching/delete': { + req: { + noteId: Note['id']; + }; + res: null; + }; + 'notifications/create': { + req: { + body: string; + header?: string | null; + icon?: string | null; + }; + res: null; + }; + 'notifications/mark-all-as-read': { + req: NoParams; + res: null; + }; + 'notifications/read': { + req: { + notificationId: Notification_2['id']; + }; + res: null; + }; + 'page-push': { + req: { + pageId: Page['id']; + event: string; + var?: any; + }; + res: null; + }; + 'pages/create': { + req: TODO; + res: Page; + }; + 'pages/delete': { + req: { + pageId: Page['id']; + }; + res: null; + }; + 'pages/featured': { + req: NoParams; + res: Page[]; + }; + 'pages/like': { + req: { + pageId: Page['id']; + }; + res: null; + }; + 'pages/show': { + req: { + pageId?: Page['id']; + name?: string; + username?: string; + }; + res: Page; + }; + 'pages/unlike': { + req: { + pageId: Page['id']; + }; + res: null; + }; + 'pages/update': { + req: TODO; + res: null; + }; + 'ping': { + req: NoParams; + res: { + pong: number; + }; + }; + 'pinned-users': { + req: TODO; + res: TODO; + }; + 'promo/read': { + req: TODO; + res: TODO; + }; + 'request-reset-password': { + req: { + username: string; + email: string; + }; + res: null; + }; + 'reset-password': { + req: { + token: string; + password: string; + }; + res: null; + }; + 'room/show': { + req: TODO; + res: TODO; + }; + 'room/update': { + req: TODO; + res: TODO; + }; + 'stats': { + req: NoParams; + res: Stats; + }; + 'server-info': { + req: NoParams; + res: ServerInfo; + }; + 'sw/register': { + req: TODO; + res: TODO; + }; + 'username/available': { + req: { + username: string; + }; + res: { + available: boolean; + }; + }; + 'users': { + req: { + limit?: number; + offset?: number; + sort?: UserSorting; + origin?: OriginType; + }; + res: User[]; + }; + 'users/clips': { + req: TODO; + res: TODO; + }; + 'users/followers': { + req: { + userId?: User['id']; + username?: User['username']; + host?: User['host'] | null; + limit?: number; + sinceId?: Following['id']; + untilId?: Following['id']; + }; + res: FollowingFollowerPopulated[]; + }; + 'users/following': { + req: { + userId?: User['id']; + username?: User['username']; + host?: User['host'] | null; + limit?: number; + sinceId?: Following['id']; + untilId?: Following['id']; + }; + res: FollowingFolloweePopulated[]; + }; + 'users/gallery/posts': { + req: TODO; + res: TODO; + }; + 'users/get-frequently-replied-users': { + req: TODO; + res: TODO; + }; + 'users/groups/create': { + req: TODO; + res: TODO; + }; + 'users/groups/delete': { + req: { + groupId: UserGroup['id']; + }; + res: null; + }; + 'users/groups/invitations/accept': { + req: TODO; + res: TODO; + }; + 'users/groups/invitations/reject': { + req: TODO; + res: TODO; + }; + 'users/groups/invite': { + req: TODO; + res: TODO; + }; + 'users/groups/joined': { + req: TODO; + res: TODO; + }; + 'users/groups/owned': { + req: TODO; + res: TODO; + }; + 'users/groups/pull': { + req: TODO; + res: TODO; + }; + 'users/groups/show': { + req: TODO; + res: TODO; + }; + 'users/groups/transfer': { + req: TODO; + res: TODO; + }; + 'users/groups/update': { + req: TODO; + res: TODO; + }; + 'users/lists/create': { + req: { + name: string; + }; + res: UserList; + }; + 'users/lists/delete': { + req: { + listId: UserList['id']; + }; + res: null; + }; + 'users/lists/list': { + req: NoParams; + res: UserList[]; + }; + 'users/lists/pull': { + req: { + listId: UserList['id']; + userId: User['id']; + }; + res: null; + }; + 'users/lists/push': { + req: { + listId: UserList['id']; + userId: User['id']; + }; + res: null; + }; + 'users/lists/show': { + req: { + listId: UserList['id']; + }; + res: UserList; + }; + 'users/lists/update': { + req: { + listId: UserList['id']; + name: string; + }; + res: UserList; + }; + 'users/notes': { + req: { + userId: User['id']; + limit?: number; + sinceId?: Note['id']; + untilId?: Note['id']; + sinceDate?: number; + untilDate?: number; + }; + res: Note[]; + }; + 'users/pages': { + req: TODO; + res: TODO; + }; + 'users/recommendation': { + req: TODO; + res: TODO; + }; + 'users/relation': { + req: TODO; + res: TODO; + }; + 'users/report-abuse': { + req: TODO; + res: TODO; + }; + 'users/search-by-username-and-host': { + req: TODO; + res: TODO; + }; + 'users/search': { + req: TODO; + res: TODO; + }; + 'users/show': { + req: ShowUserReq | { + userIds: User['id'][]; + }; + res: { + $switch: { + $cases: [ + [ + { + userIds: User['id'][]; + }, + UserDetailed[] + ] + ]; + $default: UserDetailed; + }; + }; + }; + 'users/stats': { + req: TODO; + res: TODO; + }; +}; + +declare namespace entities { + export { + ID, + DateString, + User, + UserLite, + UserDetailed, + UserGroup, + UserList, + MeDetailed, + DriveFile, + DriveFolder, + GalleryPost, + Note, + NoteReaction, + Notification_2 as Notification, + MessagingMessage, + CustomEmoji, + LiteInstanceMetadata, + DetailedInstanceMetadata, + InstanceMetadata, + ServerInfo, + Stats, + Page, + PageEvent, + Announcement, + Antenna, + App, + AuthSession, + Ad, + Clip, + NoteFavorite, + FollowRequest, + Channel, + Following, + FollowingFolloweePopulated, + FollowingFollowerPopulated, + Blocking, + Instance, + Signin, + UserSorting, + OriginType + } +} +export { entities } + +// @public (undocumented) +type FetchLike = (input: string, init?: { + method?: string; + body?: string; + credentials?: RequestCredentials; + cache?: RequestCache; + headers: { + [key in string]: string; + }; +}) => Promise<{ + status: number; + json(): Promise; +}>; + +// @public (undocumented) +export const ffVisibility: readonly ["public", "followers", "private"]; + +// @public (undocumented) +type Following = { + id: ID; + createdAt: DateString; + followerId: User['id']; + followeeId: User['id']; +}; + +// @public (undocumented) +type FollowingFolloweePopulated = Following & { + followee: UserDetailed; +}; + +// @public (undocumented) +type FollowingFollowerPopulated = Following & { + follower: UserDetailed; +}; + +// @public (undocumented) +type FollowRequest = { + id: ID; + follower: User; + followee: User; +}; + +// @public (undocumented) +type GalleryPost = { + id: ID; + createdAt: DateString; + updatedAt: DateString; + userId: User['id']; + user: User; + title: string; + description: string | null; + fileIds: DriveFile['id'][]; + files: DriveFile[]; + isSensitive: boolean; + likedCount: number; + isLiked?: boolean; +}; + +// @public (undocumented) +type ID = string; + +// @public (undocumented) +type Instance = { + id: ID; + caughtAt: DateString; + host: string; + usersCount: number; + notesCount: number; + followingCount: number; + followersCount: number; + driveUsage: number; + driveFiles: number; + latestRequestSentAt: DateString | null; + latestStatus: number | null; + latestRequestReceivedAt: DateString | null; + lastCommunicatedAt: DateString; + isNotResponding: boolean; + isSuspended: boolean; + softwareName: string | null; + softwareVersion: string | null; + openRegistrations: boolean | null; + name: string | null; + description: string | null; + maintainerName: string | null; + maintainerEmail: string | null; + iconUrl: string | null; + faviconUrl: string | null; + themeColor: string | null; + infoUpdatedAt: DateString | null; +}; + +// @public (undocumented) +type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; + +// @public (undocumented) +function isAPIError(reason: any): reason is APIError; + +// @public (undocumented) +type LiteInstanceMetadata = { + maintainerName: string | null; + maintainerEmail: string | null; + version: string; + name: string | null; + uri: string; + description: string | null; + langs: string[]; + tosUrl: string | null; + repositoryUrl: string; + feedbackUrl: string; + disableRegistration: boolean; + disableLocalTimeline: boolean; + disableGlobalTimeline: boolean; + driveCapacityPerLocalUserMb: number; + driveCapacityPerRemoteUserMb: number; + emailRequiredForSignup: boolean; + enableHcaptcha: boolean; + hcaptchaSiteKey: string | null; + enableRecaptcha: boolean; + recaptchaSiteKey: string | null; + enableTurnstile: boolean; + turnstileSiteKey: string | null; + swPublickey: string | null; + themeColor: string | null; + mascotImageUrl: string | null; + bannerUrl: string | null; + errorImageUrl: string | null; + iconUrl: string | null; + backgroundImageUrl: string | null; + logoImageUrl: string | null; + maxNoteTextLength: number; + enableEmail: boolean; + enableTwitterIntegration: boolean; + enableGithubIntegration: boolean; + enableDiscordIntegration: boolean; + enableServiceWorker: boolean; + emojis: CustomEmoji[]; + defaultDarkTheme: string | null; + defaultLightTheme: string | null; + ads: { + id: ID; + ratio: number; + place: string; + url: string; + imageUrl: string; + }[]; + translatorAvailable: boolean; +}; + +// @public (undocumented) +type MeDetailed = UserDetailed & { + avatarId: DriveFile['id']; + bannerId: DriveFile['id']; + autoAcceptFollowed: boolean; + alwaysMarkNsfw: boolean; + carefulBot: boolean; + emailNotificationTypes: string[]; + hasPendingReceivedFollowRequest: boolean; + hasUnreadAnnouncement: boolean; + hasUnreadAntenna: boolean; + hasUnreadChannel: boolean; + hasUnreadMentions: boolean; + hasUnreadMessagingMessage: boolean; + hasUnreadNotification: boolean; + hasUnreadSpecifiedNotes: boolean; + hideOnlineStatus: boolean; + injectFeaturedNote: boolean; + integrations: Record; + isDeleted: boolean; + isExplorable: boolean; + mutedWords: string[][]; + mutingNotificationTypes: string[]; + noCrawle: boolean; + receiveAnnouncementEmail: boolean; + usePasswordLessLogin: boolean; + [other: string]: any; +}; + +// @public (undocumented) +type MessagingMessage = { + id: ID; + createdAt: DateString; + file: DriveFile | null; + fileId: DriveFile['id'] | null; + isRead: boolean; + reads: User['id'][]; + text: string | null; + user: User; + userId: User['id']; + recipient?: User | null; + recipientId: User['id'] | null; + group?: UserGroup | null; + groupId: UserGroup['id'] | null; +}; + +// @public (undocumented) +export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; + +// @public (undocumented) +type Note = { + id: ID; + createdAt: DateString; + text: string | null; + cw: string | null; + user: User; + userId: User['id']; + reply?: Note; + replyId: Note['id']; + renote?: Note; + renoteId: Note['id']; + files: DriveFile[]; + fileIds: DriveFile['id'][]; + visibility: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: User['id'][]; + localOnly?: boolean; + myReaction?: string; + reactions: Record; + renoteCount: number; + repliesCount: number; + poll?: { + expiresAt: DateString | null; + multiple: boolean; + choices: { + isVoted: boolean; + text: string; + votes: number; + }[]; + }; + emojis: { + name: string; + url: string; + }[]; + uri?: string; + url?: string; + isHidden?: boolean; +}; + +// @public (undocumented) +type NoteFavorite = { + id: ID; + createdAt: DateString; + noteId: Note['id']; + note: Note; +}; + +// @public (undocumented) +type NoteReaction = { + id: ID; + createdAt: DateString; + user: UserLite; + type: string; +}; + +// @public (undocumented) +export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; + +// @public (undocumented) +type Notification_2 = { + id: ID; + createdAt: DateString; + isRead: boolean; +} & ({ + type: 'reaction'; + reaction: string; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'reply'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'renote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'quote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'mention'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'pollVote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'follow'; + user: User; + userId: User['id']; +} | { + type: 'followRequestAccepted'; + user: User; + userId: User['id']; +} | { + type: 'receiveFollowRequest'; + user: User; + userId: User['id']; +} | { + type: 'groupInvited'; + invitation: UserGroup; + user: User; + userId: User['id']; +} | { + type: 'app'; + header?: string | null; + body: string; + icon?: string | null; +}); + +// @public (undocumented) +export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; + +// @public (undocumented) +type OriginType = 'combined' | 'local' | 'remote'; + +// @public (undocumented) +type Page = { + id: ID; + createdAt: DateString; + updatedAt: DateString; + userId: User['id']; + user: User; + content: Record[]; + variables: Record[]; + title: string; + name: string; + summary: string | null; + hideTitleWhenPinned: boolean; + alignCenter: boolean; + font: string; + script: string; + eyeCatchingImageId: DriveFile['id'] | null; + eyeCatchingImage: DriveFile | null; + attachedFiles: any; + likedCount: number; + isLiked?: boolean; +}; + +// @public (undocumented) +type PageEvent = { + pageId: Page['id']; + event: string; + var: any; + userId: User['id']; + user: User; +}; + +// @public (undocumented) +export const permissions: string[]; + +// @public (undocumented) +type ServerInfo = { + machine: string; + cpu: { + model: string; + cores: number; + }; + mem: { + total: number; + }; + fs: { + total: number; + used: number; + }; +}; + +// @public (undocumented) +type Signin = { + id: ID; + createdAt: DateString; + ip: string; + headers: Record; + success: boolean; +}; + +// @public (undocumented) +type Stats = { + notesCount: number; + originalNotesCount: number; + usersCount: number; + originalUsersCount: number; + instances: number; + driveUsageLocal: number; + driveUsageRemote: number; +}; + +// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export class Stream extends EventEmitter { + constructor(origin: string, user: { + token: string; + } | null, options?: { + WebSocket?: any; + }); + // (undocumented) + close(): void; + // Warning: (ae-forgotten-export) The symbol "NonSharedConnection" needs to be exported by the entry point index.d.ts + // + // (undocumented) + disconnectToChannel(connection: NonSharedConnection): void; + // Warning: (ae-forgotten-export) The symbol "SharedConnection" needs to be exported by the entry point index.d.ts + // + // (undocumented) + removeSharedConnection(connection: SharedConnection): void; + // Warning: (ae-forgotten-export) The symbol "Pool" needs to be exported by the entry point index.d.ts + // + // (undocumented) + removeSharedConnectionPool(pool: Pool): void; + // (undocumented) + send(typeOrPayload: any, payload?: any): void; + // (undocumented) + state: 'initializing' | 'reconnecting' | 'connected'; + // (undocumented) + useChannel(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection; +} + +// @public (undocumented) +type User = UserLite | UserDetailed; + +// @public (undocumented) +type UserDetailed = UserLite & { + bannerBlurhash: string | null; + bannerColor: string | null; + bannerUrl: string | null; + birthday: string | null; + createdAt: DateString; + description: string | null; + ffVisibility: 'public' | 'followers' | 'private'; + fields: { + name: string; + value: string; + }[]; + followersCount: number; + followingCount: number; + hasPendingFollowRequestFromYou: boolean; + hasPendingFollowRequestToYou: boolean; + isAdmin: boolean; + isBlocked: boolean; + isBlocking: boolean; + isBot: boolean; + isCat: boolean; + isFollowed: boolean; + isFollowing: boolean; + isLocked: boolean; + isModerator: boolean; + isMuted: boolean; + isSilenced: boolean; + isSuspended: boolean; + lang: string | null; + lastFetchedAt?: DateString; + location: string | null; + notesCount: number; + pinnedNoteIds: ID[]; + pinnedNotes: Note[]; + pinnedPage: Page | null; + pinnedPageId: string | null; + publicReactions: boolean; + securityKeys: boolean; + twoFactorEnabled: boolean; + updatedAt: DateString | null; + uri: string | null; + url: string | null; +}; + +// @public (undocumented) +type UserGroup = TODO_2; + +// @public (undocumented) +type UserList = { + id: ID; + createdAt: DateString; + name: string; + userIds: User['id'][]; +}; + +// @public (undocumented) +type UserLite = { + id: ID; + username: string; + host: string | null; + name: string; + onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; + avatarUrl: string; + avatarBlurhash: string; + emojis: { + name: string; + url: string; + }[]; + instance?: { + name: Instance['name']; + softwareName: Instance['softwareName']; + softwareVersion: Instance['softwareVersion']; + iconUrl: Instance['iconUrl']; + faviconUrl: Instance['faviconUrl']; + themeColor: Instance['themeColor']; + }; +}; + +// @public (undocumented) +type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; + +// Warnings were encountered during analysis: +// +// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts +// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts +// src/api.types.ts:595:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts +// src/streaming.types.ts:35:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/misskey-js/jest.config.ts b/packages/misskey-js/jest.config.ts new file mode 100644 index 000000000..6d7eeddfe --- /dev/null +++ b/packages/misskey-js/jest.config.ts @@ -0,0 +1,197 @@ +/* +* For a detailed explanation regarding each configuration property and type check, visit: +* https://jestjs.io/docs/en/configuration.html +*/ + +export default { + // All imported modules in your tests should be mocked automatically + // automock: false, + + // Stop running tests after `n` failures + // bail: 0, + + // The directory where Jest should store its cached dependency information + // cacheDirectory: "C:\\Users\\ai\\AppData\\Local\\Temp\\jest", + + // Automatically clear mock calls and instances between every test + // clearMocks: false, + + // Indicates whether the coverage information should be collected while executing the test + // collectCoverage: false, + + // An array of glob patterns indicating a set of files for which coverage information should be collected + // collectCoverageFrom: undefined, + + // The directory where Jest should output its coverage files + coverageDirectory: "coverage", + + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "\\\\node_modules\\\\" + // ], + + // Indicates which provider should be used to instrument code for coverage + coverageProvider: "v8", + + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], + + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: undefined, + + // A path to a custom dependency extractor + // dependencyExtractor: undefined, + + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, + + // Force coverage collection from ignored files using an array of glob patterns + // forceCoverageMatch: [], + + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: undefined, + + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: undefined, + + // A set of global variables that need to be available in all test environments + // globals: {}, + + // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. + // maxWorkers: "50%", + + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], + + // An array of file extensions your modules use + // moduleFileExtensions: [ + // "js", + // "json", + // "jsx", + // "ts", + // "tsx", + // "node" + // ], + + // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module + // moduleNameMapper: {}, + + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], + + // Activates notifications for test results + // notify: false, + + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", + + // A preset that is used as a base for Jest's configuration + // preset: undefined, + + // Run tests from one or more projects + // projects: undefined, + + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, + + // Automatically reset mock state between every test + // resetMocks: false, + + // Reset the module registry before running each individual test + // resetModules: false, + + // A path to a custom resolver + // resolver: undefined, + + // Automatically restore mock state between every test + // restoreMocks: false, + + // The root directory that Jest should scan for tests and modules within + // rootDir: undefined, + + // A list of paths to directories that Jest should use to search for files in + roots: [ + "" + ], + + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", + + // The paths to modules that run some code to configure or set up the testing environment before each test + // setupFiles: [], + + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], + + // The number of seconds after which a test is considered as slow and reported as such in the results. + // slowTestThreshold: 5, + + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], + + // The test environment that will be used for testing + testEnvironment: "node", + + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, + + // Adds a location field to test results + // testLocationInResults: false, + + // The glob patterns Jest uses to detect test files + testMatch: [ + "**/__tests__/**/*.[jt]s?(x)", + "**/?(*.)+(spec|test).[tj]s?(x)", + "/test/**/*" + ], + + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + // testPathIgnorePatterns: [ + // "\\\\node_modules\\\\" + // ], + + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], + + // This option allows the use of a custom results processor + // testResultsProcessor: undefined, + + // This option allows use of a custom test runner + // testRunner: "jasmine2", + + // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href + // testURL: "http://localhost", + + // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" + // timers: "real", + + // A map from regular expressions to paths to transformers + transform: { + "^.+\\.(ts|tsx)$": "ts-jest" + }, + + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + // transformIgnorePatterns: [ + // "\\\\node_modules\\\\", + // "\\.pnp\\.[^\\\\]+$" + // ], + + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, + + // Indicates whether each individual test should be reported during the run + // verbose: undefined, + + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], + + // Whether to use watchman for file crawling + // watchman: true, +}; diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json new file mode 100644 index 000000000..c6cee5ca2 --- /dev/null +++ b/packages/misskey-js/package.json @@ -0,0 +1,47 @@ +{ + "name": "misskey-js", + "version": "0.0.15", + "description": "Misskey SDK for JavaScript", + "main": "./built/index.js", + "types": "./built/index.d.ts", + "scripts": { + "build": "tsc", + "tsc": "tsc", + "tsd": "tsd", + "api": "pnpm api-extractor run --local --verbose", + "api-prod": "pnpm api-extractor run --verbose", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", + "jest": "jest --coverage --detectOpenHandles", + "test": "pnpm jest && pnpm tsd", + "eslint": "pnpm lint", + "typecheck": "tsc --noEmit" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/misskey-dev/misskey.js.git" + }, + "devDependencies": { + "@microsoft/api-extractor": "^7.19.3", + "@types/jest": "^27.4.0", + "@types/node": "17.0.5", + "@typescript-eslint/eslint-plugin": "5.8.1", + "@typescript-eslint/parser": "5.8.1", + "eslint": "8.6.0", + "jest": "^27.4.5", + "jest-fetch-mock": "^3.0.3", + "jest-websocket-mock": "^2.2.1", + "mock-socket": "^9.0.8", + "ts-jest": "^27.1.2", + "ts-node": "10.4.0", + "tsd": "^0.19.1", + "typescript": "4.5.4" + }, + "files": [ + "built" + ], + "dependencies": { + "autobind-decorator": "^2.4.0", + "eventemitter3": "^4.0.7", + "reconnecting-websocket": "^4.4.0" + } +} diff --git a/packages/misskey-js/src/acct.ts b/packages/misskey-js/src/acct.ts new file mode 100644 index 000000000..c32cee86c --- /dev/null +++ b/packages/misskey-js/src/acct.ts @@ -0,0 +1,14 @@ +export type Acct = { + username: string; + host: string | null; +}; + +export function parse(acct: string): Acct { + if (acct.startsWith('@')) acct = acct.substr(1); + const split = acct.split('@', 2); + return { username: split[0], host: split[1] || null }; +} + +export function toString(acct: Acct): string { + return acct.host == null ? acct.username : `${acct.username}@${acct.host}`; +} diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts new file mode 100644 index 000000000..1704b6e46 --- /dev/null +++ b/packages/misskey-js/src/api.ts @@ -0,0 +1,102 @@ +import { Endpoints } from './api.types'; + +const MK_API_ERROR = Symbol(); + +export type APIError = { + id: string; + code: string; + message: string; + kind: 'client' | 'server'; + info: Record; +}; + +export function isAPIError(reason: any): reason is APIError { + return reason[MK_API_ERROR] === true; +} + +export type FetchLike = (input: string, init?: { + method?: string; + body?: string; + credentials?: RequestCredentials; + cache?: RequestCache; + headers: {[key in string]: string} + }) => Promise<{ + status: number; + json(): Promise; + }>; + +type IsNeverType = [T] extends [never] ? true : false; + +type StrictExtract = Cond extends Union ? Union : never; + +type IsCaseMatched = + IsNeverType> extends false ? true : false; + +type GetCaseResult = + StrictExtract[1]; + +export class APIClient { + public origin: string; + public credential: string | null | undefined; + public fetch: FetchLike; + + constructor(opts: { + origin: APIClient['origin']; + credential?: APIClient['credential']; + fetch?: APIClient['fetch'] | null | undefined; + }) { + this.origin = opts.origin; + this.credential = opts.credential; + // ネイティブ関数をそのまま変数に代入して使おうとするとChromiumではIllegal invocationエラーが発生するため、 + // 環境で実装されているfetchを使う場合は無名関数でラップして使用する + this.fetch = opts.fetch || ((...args) => fetch(...args)); + } + + public request( + endpoint: E, params: P = {} as P, credential?: string | null | undefined, + ): Promise extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + Endpoints[E]['res']['$switch']['$default'] + : Endpoints[E]['res']> + { + const promise = new Promise((resolve, reject) => { + this.fetch(`${this.origin}/api/${endpoint}`, { + method: 'POST', + body: JSON.stringify({ + ...params, + i: credential !== undefined ? credential : this.credential, + }), + headers: { + 'Content-Type': 'application/json', + }, + credentials: 'omit', + cache: 'no-cache', + }).then(async (res) => { + const body = res.status === 204 ? null : await res.json(); + + if (res.status === 200) { + resolve(body); + } else if (res.status === 204) { + resolve(null); + } else { + reject({ + [MK_API_ERROR]: true, + ...body.error, + }); + } + }).catch(reject); + }); + + return promise as any; + } +} diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts new file mode 100644 index 000000000..4fbf42f91 --- /dev/null +++ b/packages/misskey-js/src/api.types.ts @@ -0,0 +1,605 @@ +import { + Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance, InstanceMetadata, + LiteInstanceMetadata, + MeDetailed, + Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, +} from './entities'; + +type TODO = Record | null; + +type NoParams = Record; + +type ShowUserReq = { username: string; host?: string; } | { userId: User['id']; }; + +export type Endpoints = { + // admin + 'admin/abuse-user-reports': { req: TODO; res: TODO; }; + 'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; }; + 'admin/delete-logs': { req: NoParams; res: null; }; + 'admin/get-index-stats': { req: TODO; res: TODO; }; + 'admin/get-table-stats': { req: TODO; res: TODO; }; + 'admin/invite': { req: TODO; res: TODO; }; + 'admin/logs': { req: TODO; res: TODO; }; + 'admin/reset-password': { req: TODO; res: TODO; }; + 'admin/resolve-abuse-user-report': { req: TODO; res: TODO; }; + 'admin/resync-chart': { req: TODO; res: TODO; }; + 'admin/send-email': { req: TODO; res: TODO; }; + 'admin/server-info': { req: TODO; res: TODO; }; + 'admin/show-moderation-logs': { req: TODO; res: TODO; }; + 'admin/show-user': { req: TODO; res: TODO; }; + 'admin/show-users': { req: TODO; res: TODO; }; + 'admin/silence-user': { req: TODO; res: TODO; }; + 'admin/suspend-user': { req: TODO; res: TODO; }; + 'admin/unsilence-user': { req: TODO; res: TODO; }; + 'admin/unsuspend-user': { req: TODO; res: TODO; }; + 'admin/update-meta': { req: TODO; res: TODO; }; + 'admin/vacuum': { req: TODO; res: TODO; }; + 'admin/accounts/create': { req: TODO; res: TODO; }; + 'admin/ad/create': { req: TODO; res: TODO; }; + 'admin/ad/delete': { req: { id: Ad['id']; }; res: null; }; + 'admin/ad/list': { req: TODO; res: TODO; }; + 'admin/ad/update': { req: TODO; res: TODO; }; + 'admin/announcements/create': { req: TODO; res: TODO; }; + 'admin/announcements/delete': { req: { id: Announcement['id'] }; res: null; }; + 'admin/announcements/list': { req: TODO; res: TODO; }; + 'admin/announcements/update': { req: TODO; res: TODO; }; + 'admin/drive/clean-remote-files': { req: TODO; res: TODO; }; + 'admin/drive/cleanup': { req: TODO; res: TODO; }; + 'admin/drive/files': { req: TODO; res: TODO; }; + 'admin/drive/show-file': { req: TODO; res: TODO; }; + 'admin/emoji/add': { req: TODO; res: TODO; }; + 'admin/emoji/copy': { req: TODO; res: TODO; }; + 'admin/emoji/list-remote': { req: TODO; res: TODO; }; + 'admin/emoji/list': { req: TODO; res: TODO; }; + 'admin/emoji/remove': { req: TODO; res: TODO; }; + 'admin/emoji/update': { req: TODO; res: TODO; }; + 'admin/federation/delete-all-files': { req: { host: string; }; res: null; }; + 'admin/federation/refresh-remote-instance-metadata': { req: TODO; res: TODO; }; + 'admin/federation/remove-all-following': { req: TODO; res: TODO; }; + 'admin/federation/update-instance': { req: TODO; res: TODO; }; + 'admin/moderators/add': { req: TODO; res: TODO; }; + 'admin/moderators/remove': { req: TODO; res: TODO; }; + 'admin/promo/create': { req: TODO; res: TODO; }; + 'admin/queue/clear': { req: TODO; res: TODO; }; + 'admin/queue/deliver-delayed': { req: TODO; res: TODO; }; + 'admin/queue/inbox-delayed': { req: TODO; res: TODO; }; + 'admin/queue/jobs': { req: TODO; res: TODO; }; + 'admin/queue/stats': { req: TODO; res: TODO; }; + 'admin/relays/add': { req: TODO; res: TODO; }; + 'admin/relays/list': { req: TODO; res: TODO; }; + 'admin/relays/remove': { req: TODO; res: TODO; }; + + // announcements + 'announcements': { req: { limit?: number; withUnreads?: boolean; sinceId?: Announcement['id']; untilId?: Announcement['id']; }; res: Announcement[]; }; + + // antennas + 'antennas/create': { req: TODO; res: Antenna; }; + 'antennas/delete': { req: { antennaId: Antenna['id']; }; res: null; }; + 'antennas/list': { req: NoParams; res: Antenna[]; }; + 'antennas/notes': { req: { antennaId: Antenna['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; + 'antennas/show': { req: { antennaId: Antenna['id']; }; res: Antenna; }; + 'antennas/update': { req: TODO; res: Antenna; }; + + // ap + 'ap/get': { req: { uri: string; }; res: Record; }; + 'ap/show': { req: { uri: string; }; res: { + type: 'Note'; + object: Note; + } | { + type: 'User'; + object: UserDetailed; + }; }; + + // app + 'app/create': { req: TODO; res: App; }; + 'app/show': { req: { appId: App['id']; }; res: App; }; + + // auth + 'auth/accept': { req: { token: string; }; res: null; }; + 'auth/session/generate': { req: { appSecret: string; }; res: { token: string; url: string; }; }; + 'auth/session/show': { req: { token: string; }; res: AuthSession; }; + 'auth/session/userkey': { req: { appSecret: string; token: string; }; res: { accessToken: string; user: User }; }; + + // blocking + 'blocking/create': { req: { userId: User['id'] }; res: UserDetailed; }; + 'blocking/delete': { req: { userId: User['id'] }; res: UserDetailed; }; + 'blocking/list': { req: { limit?: number; sinceId?: Blocking['id']; untilId?: Blocking['id']; }; res: Blocking[]; }; + + // channels + 'channels/create': { req: TODO; res: TODO; }; + 'channels/featured': { req: TODO; res: TODO; }; + 'channels/follow': { req: TODO; res: TODO; }; + 'channels/followed': { req: TODO; res: TODO; }; + 'channels/owned': { req: TODO; res: TODO; }; + 'channels/pin-note': { req: TODO; res: TODO; }; + 'channels/show': { req: TODO; res: TODO; }; + 'channels/timeline': { req: TODO; res: TODO; }; + 'channels/unfollow': { req: TODO; res: TODO; }; + 'channels/update': { req: TODO; res: TODO; }; + + // charts + 'charts/active-users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { + local: { + users: number[]; + }; + remote: { + users: number[]; + }; + }; }; + 'charts/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { + local: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; + remote: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; + }; }; + 'charts/federation': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { + instance: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; }; + 'charts/hashtag': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; }; + 'charts/instance': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; host: string; }; res: { + drive: { + decFiles: number[]; + decUsage: number[]; + incFiles: number[]; + incUsage: number[]; + totalFiles: number[]; + totalUsage: number[]; + }; + followers: { + dec: number[]; + inc: number[]; + total: number[]; + }; + following: { + dec: number[]; + inc: number[]; + total: number[]; + }; + notes: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + requests: { + failed: number[]; + received: number[]; + succeeded: number[]; + }; + users: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; }; + 'charts/network': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; }; + 'charts/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { + local: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + remote: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; + }; }; + 'charts/user/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: { + decCount: number[]; + decSize: number[]; + incCount: number[]; + incSize: number[]; + totalCount: number[]; + totalSize: number[]; + }; }; + 'charts/user/following': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; }; + 'charts/user/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: { + dec: number[]; + inc: number[]; + total: number[]; + diffs: { + normal: number[]; + renote: number[]; + reply: number[]; + }; + }; }; + 'charts/user/reactions': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; }; + 'charts/users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { + local: { + dec: number[]; + inc: number[]; + total: number[]; + }; + remote: { + dec: number[]; + inc: number[]; + total: number[]; + }; + }; }; + + // clips + 'clips/add-note': { req: TODO; res: TODO; }; + 'clips/create': { req: TODO; res: TODO; }; + 'clips/delete': { req: { clipId: Clip['id']; }; res: null; }; + 'clips/list': { req: TODO; res: TODO; }; + 'clips/notes': { req: TODO; res: TODO; }; + 'clips/show': { req: TODO; res: TODO; }; + 'clips/update': { req: TODO; res: TODO; }; + + // drive + 'drive': { req: NoParams; res: { capacity: number; usage: number; }; }; + 'drive/files': { req: { folderId?: DriveFolder['id'] | null; type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; }; + 'drive/files/attached-notes': { req: TODO; res: TODO; }; + 'drive/files/check-existence': { req: TODO; res: TODO; }; + 'drive/files/create': { req: TODO; res: TODO; }; + 'drive/files/delete': { req: { fileId: DriveFile['id']; }; res: null; }; + 'drive/files/find-by-hash': { req: TODO; res: TODO; }; + 'drive/files/find': { req: { name: string; folderId?: DriveFolder['id'] | null; }; res: DriveFile[]; }; + 'drive/files/show': { req: { fileId?: DriveFile['id']; url?: string; }; res: DriveFile; }; + 'drive/files/update': { req: { fileId: DriveFile['id']; folderId?: DriveFolder['id'] | null; name?: string; isSensitive?: boolean; comment?: string | null; }; res: DriveFile; }; + 'drive/files/upload-from-url': { req: { url: string; folderId?: DriveFolder['id'] | null; isSensitive?: boolean; comment?: string | null; marker?: string | null; force?: boolean; }; res: null; }; + 'drive/folders': { req: { folderId?: DriveFolder['id'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFolder[]; }; + 'drive/folders/create': { req: { name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; }; + 'drive/folders/delete': { req: { folderId: DriveFolder['id']; }; res: null; }; + 'drive/folders/find': { req: { name: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder[]; }; + 'drive/folders/show': { req: { folderId: DriveFolder['id']; }; res: DriveFolder; }; + 'drive/folders/update': { req: { folderId: DriveFolder['id']; name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; }; + 'drive/stream': { req: { type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; }; + + // endpoint + 'endpoint': { req: { endpoint: string; }; res: { params: { name: string; type: string; }[]; }; }; + + // endpoints + 'endpoints': { req: NoParams; res: string[]; }; + + // federation + 'federation/dns': { req: { host: string; }; res: { + a: string[]; + aaaa: string[]; + cname: string[]; + txt: string[]; + }; }; + 'federation/followers': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; + 'federation/following': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; + 'federation/instances': { req: { + host?: string | null; + blocked?: boolean | null; + notResponding?: boolean | null; + suspended?: boolean | null; + federating?: boolean | null; + subscribing?: boolean | null; + publishing?: boolean | null; + limit?: number; + offset?: number; + sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; + }; res: Instance[]; }; + 'federation/show-instance': { req: { host: string; }; res: Instance; }; + 'federation/update-remote-user': { req: { userId: User['id']; }; res: null; }; + 'federation/users': { req: { host: string; limit?: number; sinceId?: User['id']; untilId?: User['id']; }; res: UserDetailed[]; }; + + // following + 'following/create': { req: { userId: User['id'] }; res: User; }; + 'following/delete': { req: { userId: User['id'] }; res: User; }; + 'following/requests/accept': { req: { userId: User['id'] }; res: null; }; + 'following/requests/cancel': { req: { userId: User['id'] }; res: User; }; + 'following/requests/list': { req: NoParams; res: FollowRequest[]; }; + 'following/requests/reject': { req: { userId: User['id'] }; res: null; }; + + // gallery + 'gallery/featured': { req: null; res: GalleryPost[]; }; + 'gallery/popular': { req: null; res: GalleryPost[]; }; + 'gallery/posts': { req: { limit?: number; sinceId?: GalleryPost['id']; untilId?: GalleryPost['id']; }; res: GalleryPost[]; }; + 'gallery/posts/create': { req: { title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; }; + 'gallery/posts/delete': { req: { postId: GalleryPost['id'] }; res: null; }; + 'gallery/posts/like': { req: { postId: GalleryPost['id'] }; res: null; }; + 'gallery/posts/show': { req: { postId: GalleryPost['id'] }; res: GalleryPost; }; + 'gallery/posts/unlike': { req: { postId: GalleryPost['id'] }; res: null; }; + 'gallery/posts/update': { req: { postId: GalleryPost['id']; title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; }; + + // games + 'games/reversi/games': { req: TODO; res: TODO; }; + 'games/reversi/games/show': { req: TODO; res: TODO; }; + 'games/reversi/games/surrender': { req: TODO; res: TODO; }; + 'games/reversi/invitations': { req: TODO; res: TODO; }; + 'games/reversi/match': { req: TODO; res: TODO; }; + 'games/reversi/match/cancel': { req: TODO; res: TODO; }; + + // get-online-users-count + 'get-online-users-count': { req: NoParams; res: { count: number; }; }; + + // hashtags + 'hashtags/list': { req: TODO; res: TODO; }; + 'hashtags/search': { req: TODO; res: TODO; }; + 'hashtags/show': { req: TODO; res: TODO; }; + 'hashtags/trend': { req: TODO; res: TODO; }; + 'hashtags/users': { req: TODO; res: TODO; }; + + // i + 'i': { req: NoParams; res: User; }; + 'i/apps': { req: TODO; res: TODO; }; + 'i/authorized-apps': { req: TODO; res: TODO; }; + 'i/change-password': { req: TODO; res: TODO; }; + 'i/delete-account': { req: { password: string; }; res: null; }; + 'i/export-blocking': { req: TODO; res: TODO; }; + 'i/export-following': { req: TODO; res: TODO; }; + 'i/export-mute': { req: TODO; res: TODO; }; + 'i/export-notes': { req: TODO; res: TODO; }; + 'i/export-user-lists': { req: TODO; res: TODO; }; + 'i/favorites': { req: { limit?: number; sinceId?: NoteFavorite['id']; untilId?: NoteFavorite['id']; }; res: NoteFavorite[]; }; + 'i/gallery/likes': { req: TODO; res: TODO; }; + 'i/gallery/posts': { req: TODO; res: TODO; }; + 'i/get-word-muted-notes-count': { req: TODO; res: TODO; }; + 'i/import-following': { req: TODO; res: TODO; }; + 'i/import-user-lists': { req: TODO; res: TODO; }; + 'i/notifications': { req: { + limit?: number; + sinceId?: Notification['id']; + untilId?: Notification['id']; + following?: boolean; + markAsRead?: boolean; + includeTypes?: Notification['type'][]; + excludeTypes?: Notification['type'][]; + }; res: Notification[]; }; + 'i/page-likes': { req: TODO; res: TODO; }; + 'i/pages': { req: TODO; res: TODO; }; + 'i/pin': { req: { noteId: Note['id']; }; res: MeDetailed; }; + 'i/read-all-messaging-messages': { req: TODO; res: TODO; }; + 'i/read-all-unread-notes': { req: TODO; res: TODO; }; + 'i/read-announcement': { req: TODO; res: TODO; }; + 'i/regenerate-token': { req: { password: string; }; res: null; }; + 'i/registry/get-all': { req: { scope?: string[]; }; res: Record; }; + 'i/registry/get-detail': { req: { key: string; scope?: string[]; }; res: { updatedAt: DateString; value: any; }; }; + 'i/registry/get': { req: { key: string; scope?: string[]; }; res: any; }; + 'i/registry/keys-with-type': { req: { scope?: string[]; }; res: Record; }; + 'i/registry/keys': { req: { scope?: string[]; }; res: string[]; }; + 'i/registry/remove': { req: { key: string; scope?: string[]; }; res: null; }; + 'i/registry/scopes': { req: NoParams; res: string[][]; }; + 'i/registry/set': { req: { key: string; value: any; scope?: string[]; }; res: null; }; + 'i/revoke-token': { req: TODO; res: TODO; }; + 'i/signin-history': { req: { limit?: number; sinceId?: Signin['id']; untilId?: Signin['id']; }; res: Signin[]; }; + 'i/unpin': { req: { noteId: Note['id']; }; res: MeDetailed; }; + 'i/update-email': { req: { + password: string; + email?: string | null; + }; res: MeDetailed; }; + 'i/update': { req: { + name?: string | null; + description?: string | null; + lang?: string | null; + location?: string | null; + birthday?: string | null; + avatarId?: DriveFile['id'] | null; + bannerId?: DriveFile['id'] | null; + fields?: { + name: string; + value: string; + }[]; + isLocked?: boolean; + isExplorable?: boolean; + hideOnlineStatus?: boolean; + carefulBot?: boolean; + autoAcceptFollowed?: boolean; + noCrawle?: boolean; + isBot?: boolean; + isCat?: boolean; + injectFeaturedNote?: boolean; + receiveAnnouncementEmail?: boolean; + alwaysMarkNsfw?: boolean; + mutedWords?: string[][]; + mutingNotificationTypes?: Notification['type'][]; + emailNotificationTypes?: string[]; + }; res: MeDetailed; }; + 'i/user-group-invites': { req: TODO; res: TODO; }; + 'i/2fa/done': { req: TODO; res: TODO; }; + 'i/2fa/key-done': { req: TODO; res: TODO; }; + 'i/2fa/password-less': { req: TODO; res: TODO; }; + 'i/2fa/register-key': { req: TODO; res: TODO; }; + 'i/2fa/register': { req: TODO; res: TODO; }; + 'i/2fa/remove-key': { req: TODO; res: TODO; }; + 'i/2fa/unregister': { req: TODO; res: TODO; }; + + // messaging + 'messaging/history': { req: { limit?: number; group?: boolean; }; res: MessagingMessage[]; }; + 'messaging/messages': { req: { userId?: User['id']; groupId?: UserGroup['id']; limit?: number; sinceId?: MessagingMessage['id']; untilId?: MessagingMessage['id']; markAsRead?: boolean; }; res: MessagingMessage[]; }; + 'messaging/messages/create': { req: { userId?: User['id']; groupId?: UserGroup['id']; text?: string; fileId?: DriveFile['id']; }; res: MessagingMessage; }; + 'messaging/messages/delete': { req: { messageId: MessagingMessage['id']; }; res: null; }; + 'messaging/messages/read': { req: { messageId: MessagingMessage['id']; }; res: null; }; + + // meta + 'meta': { req: { detail?: boolean; }; res: { + $switch: { + $cases: [[ + { detail: true; }, + DetailedInstanceMetadata, + ], [ + { detail: false; }, + LiteInstanceMetadata, + ], [ + { detail: boolean; }, + LiteInstanceMetadata | DetailedInstanceMetadata, + ]]; + $default: LiteInstanceMetadata; + }; + }; }; + + // miauth + 'miauth/gen-token': { req: TODO; res: TODO; }; + + // mute + 'mute/create': { req: TODO; res: TODO; }; + 'mute/delete': { req: { userId: User['id'] }; res: null; }; + 'mute/list': { req: TODO; res: TODO; }; + + // my + 'my/apps': { req: TODO; res: TODO; }; + + // notes + 'notes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; + 'notes/children': { req: { noteId: Note['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; + 'notes/clips': { req: TODO; res: TODO; }; + 'notes/conversation': { req: TODO; res: TODO; }; + 'notes/create': { req: { + visibility?: 'public' | 'home' | 'followers' | 'specified', + visibleUserIds?: User['id'][]; + text?: null | string; + cw?: null | string; + viaMobile?: boolean; + localOnly?: boolean; + fileIds?: DriveFile['id'][]; + replyId?: null | Note['id']; + renoteId?: null | Note['id']; + channelId?: null | Channel['id']; + poll?: null | { + choices: string[]; + multiple?: boolean; + expiresAt?: null | number; + expiredAfter?: null | number; + }; + }; res: { createdNote: Note }; }; + 'notes/delete': { req: { noteId: Note['id']; }; res: null; }; + 'notes/favorites/create': { req: { noteId: Note['id']; }; res: null; }; + 'notes/favorites/delete': { req: { noteId: Note['id']; }; res: null; }; + 'notes/featured': { req: TODO; res: Note[]; }; + 'notes/global-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'notes/hybrid-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'notes/local-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'notes/mentions': { req: { following?: boolean; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; + 'notes/polls/recommendation': { req: TODO; res: TODO; }; + 'notes/polls/vote': { req: { noteId: Note['id']; choice: number; }; res: null; }; + 'notes/reactions': { req: { noteId: Note['id']; type?: string | null; limit?: number; }; res: NoteReaction[]; }; + 'notes/reactions/create': { req: { noteId: Note['id']; reaction: string; }; res: null; }; + 'notes/reactions/delete': { req: { noteId: Note['id']; }; res: null; }; + 'notes/renotes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; }; + 'notes/replies': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; }; + 'notes/search-by-tag': { req: TODO; res: TODO; }; + 'notes/search': { req: TODO; res: TODO; }; + 'notes/show': { req: { noteId: Note['id']; }; res: Note; }; + 'notes/state': { req: TODO; res: TODO; }; + 'notes/timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'notes/unrenote': { req: { noteId: Note['id']; }; res: null; }; + 'notes/user-list-timeline': { req: { listId: UserList['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'notes/watching/create': { req: TODO; res: TODO; }; + 'notes/watching/delete': { req: { noteId: Note['id']; }; res: null; }; + + // notifications + 'notifications/create': { req: { body: string; header?: string | null; icon?: string | null; }; res: null; }; + 'notifications/mark-all-as-read': { req: NoParams; res: null; }; + 'notifications/read': { req: { notificationId: Notification['id']; }; res: null; }; + + // page-push + 'page-push': { req: { pageId: Page['id']; event: string; var?: any; }; res: null; }; + + // pages + 'pages/create': { req: TODO; res: Page; }; + 'pages/delete': { req: { pageId: Page['id']; }; res: null; }; + 'pages/featured': { req: NoParams; res: Page[]; }; + 'pages/like': { req: { pageId: Page['id']; }; res: null; }; + 'pages/show': { req: { pageId?: Page['id']; name?: string; username?: string; }; res: Page; }; + 'pages/unlike': { req: { pageId: Page['id']; }; res: null; }; + 'pages/update': { req: TODO; res: null; }; + + // ping + 'ping': { req: NoParams; res: { pong: number; }; }; + + // pinned-users + 'pinned-users': { req: TODO; res: TODO; }; + + // promo + 'promo/read': { req: TODO; res: TODO; }; + + // request-reset-password + 'request-reset-password': { req: { username: string; email: string; }; res: null; }; + + // reset-password + 'reset-password': { req: { token: string; password: string; }; res: null; }; + + // room + 'room/show': { req: TODO; res: TODO; }; + 'room/update': { req: TODO; res: TODO; }; + + // stats + 'stats': { req: NoParams; res: Stats; }; + + // server-info + 'server-info': { req: NoParams; res: ServerInfo; }; + + // sw + 'sw/register': { req: TODO; res: TODO; }; + + // username + 'username/available': { req: { username: string; }; res: { available: boolean; }; }; + + // users + 'users': { req: { limit?: number; offset?: number; sort?: UserSorting; origin?: OriginType; }; res: User[]; }; + 'users/clips': { req: TODO; res: TODO; }; + 'users/followers': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFollowerPopulated[]; }; + 'users/following': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; + 'users/gallery/posts': { req: TODO; res: TODO; }; + 'users/get-frequently-replied-users': { req: TODO; res: TODO; }; + 'users/groups/create': { req: TODO; res: TODO; }; + 'users/groups/delete': { req: { groupId: UserGroup['id'] }; res: null; }; + 'users/groups/invitations/accept': { req: TODO; res: TODO; }; + 'users/groups/invitations/reject': { req: TODO; res: TODO; }; + 'users/groups/invite': { req: TODO; res: TODO; }; + 'users/groups/joined': { req: TODO; res: TODO; }; + 'users/groups/owned': { req: TODO; res: TODO; }; + 'users/groups/pull': { req: TODO; res: TODO; }; + 'users/groups/show': { req: TODO; res: TODO; }; + 'users/groups/transfer': { req: TODO; res: TODO; }; + 'users/groups/update': { req: TODO; res: TODO; }; + 'users/lists/create': { req: { name: string; }; res: UserList; }; + 'users/lists/delete': { req: { listId: UserList['id']; }; res: null; }; + 'users/lists/list': { req: NoParams; res: UserList[]; }; + 'users/lists/pull': { req: { listId: UserList['id']; userId: User['id']; }; res: null; }; + 'users/lists/push': { req: { listId: UserList['id']; userId: User['id']; }; res: null; }; + 'users/lists/show': { req: { listId: UserList['id']; }; res: UserList; }; + 'users/lists/update': { req: { listId: UserList['id']; name: string; }; res: UserList; }; + 'users/notes': { req: { userId: User['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; + 'users/pages': { req: TODO; res: TODO; }; + 'users/recommendation': { req: TODO; res: TODO; }; + 'users/relation': { req: TODO; res: TODO; }; + 'users/report-abuse': { req: TODO; res: TODO; }; + 'users/search-by-username-and-host': { req: TODO; res: TODO; }; + 'users/search': { req: TODO; res: TODO; }; + 'users/show': { req: ShowUserReq | { userIds: User['id'][]; }; res: { + $switch: { + $cases: [[ + { userIds: User['id'][]; }, + UserDetailed[], + ]]; + $default: UserDetailed; + }; + }; }; + 'users/stats': { req: TODO; res: TODO; }; +}; diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts new file mode 100644 index 000000000..261ecd33f --- /dev/null +++ b/packages/misskey-js/src/consts.ts @@ -0,0 +1,42 @@ +export const notificationTypes = ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app'] as const; + +export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const; + +export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const; + +export const ffVisibility = ['public', 'followers', 'private'] as const; + +export const permissions = [ + 'read:account', + 'write:account', + 'read:blocks', + 'write:blocks', + 'read:drive', + 'write:drive', + 'read:favorites', + 'write:favorites', + 'read:following', + 'write:following', + 'read:messaging', + 'write:messaging', + 'read:mutes', + 'write:mutes', + 'write:notes', + 'read:notifications', + 'write:notifications', + 'read:reactions', + 'write:reactions', + 'write:votes', + 'read:pages', + 'write:pages', + 'write:page-likes', + 'read:page-likes', + 'read:user-groups', + 'write:user-groups', + 'read:channels', + 'write:channels', + 'read:gallery', + 'write:gallery', + 'read:gallery-likes', + 'write:gallery-likes', +]; diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts new file mode 100644 index 000000000..37a8bc618 --- /dev/null +++ b/packages/misskey-js/src/entities.ts @@ -0,0 +1,508 @@ +export type ID = string; +export type DateString = string; + +type TODO = Record; + +// NOTE: 極力この型を使うのは避け、UserLite か UserDetailed か明示するように +export type User = UserLite | UserDetailed; + +export type UserLite = { + id: ID; + username: string; + host: string | null; + name: string; + onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; + avatarUrl: string; + avatarBlurhash: string; + emojis: { + name: string; + url: string; + }[]; + instance?: { + name: Instance['name']; + softwareName: Instance['softwareName']; + softwareVersion: Instance['softwareVersion']; + iconUrl: Instance['iconUrl']; + faviconUrl: Instance['faviconUrl']; + themeColor: Instance['themeColor']; + }; +}; + +export type UserDetailed = UserLite & { + bannerBlurhash: string | null; + bannerColor: string | null; + bannerUrl: string | null; + birthday: string | null; + createdAt: DateString; + description: string | null; + ffVisibility: 'public' | 'followers' | 'private'; + fields: {name: string; value: string}[]; + followersCount: number; + followingCount: number; + hasPendingFollowRequestFromYou: boolean; + hasPendingFollowRequestToYou: boolean; + isAdmin: boolean; + isBlocked: boolean; + isBlocking: boolean; + isBot: boolean; + isCat: boolean; + isFollowed: boolean; + isFollowing: boolean; + isLocked: boolean; + isModerator: boolean; + isMuted: boolean; + isSilenced: boolean; + isSuspended: boolean; + lang: string | null; + lastFetchedAt?: DateString; + location: string | null; + notesCount: number; + pinnedNoteIds: ID[]; + pinnedNotes: Note[]; + pinnedPage: Page | null; + pinnedPageId: string | null; + publicReactions: boolean; + securityKeys: boolean; + twoFactorEnabled: boolean; + updatedAt: DateString | null; + uri: string | null; + url: string | null; +}; + +export type UserGroup = TODO; + +export type UserList = { + id: ID; + createdAt: DateString; + name: string; + userIds: User['id'][]; +}; + +export type MeDetailed = UserDetailed & { + avatarId: DriveFile['id']; + bannerId: DriveFile['id']; + autoAcceptFollowed: boolean; + alwaysMarkNsfw: boolean; + carefulBot: boolean; + emailNotificationTypes: string[]; + hasPendingReceivedFollowRequest: boolean; + hasUnreadAnnouncement: boolean; + hasUnreadAntenna: boolean; + hasUnreadChannel: boolean; + hasUnreadMentions: boolean; + hasUnreadMessagingMessage: boolean; + hasUnreadNotification: boolean; + hasUnreadSpecifiedNotes: boolean; + hideOnlineStatus: boolean; + injectFeaturedNote: boolean; + integrations: Record; + isDeleted: boolean; + isExplorable: boolean; + mutedWords: string[][]; + mutingNotificationTypes: string[]; + noCrawle: boolean; + receiveAnnouncementEmail: boolean; + usePasswordLessLogin: boolean; + [other: string]: any; +}; + +export type DriveFile = { + id: ID; + createdAt: DateString; + isSensitive: boolean; + name: string; + thumbnailUrl: string; + url: string; + type: string; + size: number; + md5: string; + blurhash: string; + comment: string | null; + properties: Record; +}; + +export type DriveFolder = TODO; + +export type GalleryPost = { + id: ID; + createdAt: DateString; + updatedAt: DateString; + userId: User['id']; + user: User; + title: string; + description: string | null; + fileIds: DriveFile['id'][]; + files: DriveFile[]; + isSensitive: boolean; + likedCount: number; + isLiked?: boolean; +}; + +export type Note = { + id: ID; + createdAt: DateString; + text: string | null; + cw: string | null; + user: User; + userId: User['id']; + reply?: Note; + replyId: Note['id']; + renote?: Note; + renoteId: Note['id']; + files: DriveFile[]; + fileIds: DriveFile['id'][]; + visibility: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: User['id'][]; + localOnly?: boolean; + myReaction?: string; + reactions: Record; + renoteCount: number; + repliesCount: number; + poll?: { + expiresAt: DateString | null; + multiple: boolean; + choices: { + isVoted: boolean; + text: string; + votes: number; + }[]; + }; + emojis: { + name: string; + url: string; + }[]; + uri?: string; + url?: string; + isHidden?: boolean; +}; + +export type NoteReaction = { + id: ID; + createdAt: DateString; + user: UserLite; + type: string; +}; + +export type Notification = { + id: ID; + createdAt: DateString; + isRead: boolean; +} & ({ + type: 'reaction'; + reaction: string; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'reply'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'renote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'quote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'mention'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'pollVote'; + user: User; + userId: User['id']; + note: Note; +} | { + type: 'follow'; + user: User; + userId: User['id']; +} | { + type: 'followRequestAccepted'; + user: User; + userId: User['id']; +} | { + type: 'receiveFollowRequest'; + user: User; + userId: User['id']; +} | { + type: 'groupInvited'; + invitation: UserGroup; + user: User; + userId: User['id']; +} | { + type: 'app'; + header?: string | null; + body: string; + icon?: string | null; +}); + +export type MessagingMessage = { + id: ID; + createdAt: DateString; + file: DriveFile | null; + fileId: DriveFile['id'] | null; + isRead: boolean; + reads: User['id'][]; + text: string | null; + user: User; + userId: User['id']; + recipient?: User | null; + recipientId: User['id'] | null; + group?: UserGroup | null; + groupId: UserGroup['id'] | null; +}; + +export type CustomEmoji = { + id: string; + name: string; + url: string; + category: string; + aliases: string[]; +}; + +export type LiteInstanceMetadata = { + maintainerName: string | null; + maintainerEmail: string | null; + version: string; + name: string | null; + uri: string; + description: string | null; + langs: string[]; + tosUrl: string | null; + repositoryUrl: string; + feedbackUrl: string; + disableRegistration: boolean; + disableLocalTimeline: boolean; + disableGlobalTimeline: boolean; + driveCapacityPerLocalUserMb: number; + driveCapacityPerRemoteUserMb: number; + emailRequiredForSignup: boolean; + enableHcaptcha: boolean; + hcaptchaSiteKey: string | null; + enableRecaptcha: boolean; + recaptchaSiteKey: string | null; + enableTurnstile: boolean; + turnstileSiteKey: string | null; + swPublickey: string | null; + themeColor: string | null; + mascotImageUrl: string | null; + bannerUrl: string | null; + errorImageUrl: string | null; + iconUrl: string | null; + backgroundImageUrl: string | null; + logoImageUrl: string | null; + maxNoteTextLength: number; + enableEmail: boolean; + enableTwitterIntegration: boolean; + enableGithubIntegration: boolean; + enableDiscordIntegration: boolean; + enableServiceWorker: boolean; + emojis: CustomEmoji[]; + defaultDarkTheme: string | null; + defaultLightTheme: string | null; + ads: { + id: ID; + ratio: number; + place: string; + url: string; + imageUrl: string; + }[]; + translatorAvailable: boolean; +}; + +export type DetailedInstanceMetadata = LiteInstanceMetadata & { + pinnedPages: string[]; + pinnedClipId: string | null; + cacheRemoteFiles: boolean; + requireSetup: boolean; + proxyAccountName: string | null; + features: Record; +}; + +export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; + +export type ServerInfo = { + machine: string; + cpu: { + model: string; + cores: number; + }; + mem: { + total: number; + }; + fs: { + total: number; + used: number; + }; +}; + +export type Stats = { + notesCount: number; + originalNotesCount: number; + usersCount: number; + originalUsersCount: number; + instances: number; + driveUsageLocal: number; + driveUsageRemote: number; +}; + +export type Page = { + id: ID; + createdAt: DateString; + updatedAt: DateString; + userId: User['id']; + user: User; + content: Record[]; + variables: Record[]; + title: string; + name: string; + summary: string | null; + hideTitleWhenPinned: boolean; + alignCenter: boolean; + font: string; + script: string; + eyeCatchingImageId: DriveFile['id'] | null; + eyeCatchingImage: DriveFile | null; + attachedFiles: any; + likedCount: number; + isLiked?: boolean; +}; + +export type PageEvent = { + pageId: Page['id']; + event: string; + var: any; + userId: User['id']; + user: User; +}; + +export type Announcement = { + id: ID; + createdAt: DateString; + updatedAt: DateString | null; + text: string; + title: string; + imageUrl: string | null; + isRead?: boolean; +}; + +export type Antenna = { + id: ID; + createdAt: DateString; + name: string; + keywords: string[][]; // TODO + excludeKeywords: string[][]; // TODO + src: 'home' | 'all' | 'users' | 'list' | 'group'; + userListId: ID | null; // TODO + userGroupId: ID | null; // TODO + users: string[]; // TODO + caseSensitive: boolean; + notify: boolean; + withReplies: boolean; + withFile: boolean; + hasUnreadNote: boolean; +}; + +export type App = TODO; + +export type AuthSession = { + id: ID; + app: App; + token: string; +}; + +export type Ad = TODO; + +export type Clip = TODO; + +export type NoteFavorite = { + id: ID; + createdAt: DateString; + noteId: Note['id']; + note: Note; +}; + +export type FollowRequest = { + id: ID; + follower: User; + followee: User; +}; + +export type Channel = { + id: ID; + // TODO +}; + +export type Following = { + id: ID; + createdAt: DateString; + followerId: User['id']; + followeeId: User['id']; +}; + +export type FollowingFolloweePopulated = Following & { + followee: UserDetailed; +}; + +export type FollowingFollowerPopulated = Following & { + follower: UserDetailed; +}; + +export type Blocking = { + id: ID; + createdAt: DateString; + blockeeId: User['id']; + blockee: UserDetailed; +}; + +export type Instance = { + id: ID; + caughtAt: DateString; + host: string; + usersCount: number; + notesCount: number; + followingCount: number; + followersCount: number; + driveUsage: number; + driveFiles: number; + latestRequestSentAt: DateString | null; + latestStatus: number | null; + latestRequestReceivedAt: DateString | null; + lastCommunicatedAt: DateString; + isNotResponding: boolean; + isSuspended: boolean; + softwareName: string | null; + softwareVersion: string | null; + openRegistrations: boolean | null; + name: string | null; + description: string | null; + maintainerName: string | null; + maintainerEmail: string | null; + iconUrl: string | null; + faviconUrl: string | null; + themeColor: string | null; + infoUpdatedAt: DateString | null; +}; + +export type Signin = { + id: ID; + createdAt: DateString; + ip: string; + headers: Record; + success: boolean; +}; + +export type UserSorting = + | '+follower' + | '-follower' + | '+createdAt' + | '-createdAt' + | '+updatedAt' + | '-updatedAt'; +export type OriginType = 'combined' | 'local' | 'remote'; diff --git a/packages/misskey-js/src/index.ts b/packages/misskey-js/src/index.ts new file mode 100644 index 000000000..f431d65cc --- /dev/null +++ b/packages/misskey-js/src/index.ts @@ -0,0 +1,26 @@ +import { Endpoints } from './api.types'; +import Stream, { Connection } from './streaming'; +import { Channels } from './streaming.types'; +import { Acct } from './acct'; +import * as consts from './consts'; + +export { + Endpoints, + Stream, + Connection as ChannelConnection, + Channels, + Acct, +}; + +export const permissions = consts.permissions; +export const notificationTypes = consts.notificationTypes; +export const noteVisibilities = consts.noteVisibilities; +export const mutedNoteReasons = consts.mutedNoteReasons; +export const ffVisibility = consts.ffVisibility; + +// api extractor not supported yet +//export * as api from './api'; +//export * as entities from './entities'; +import * as api from './api'; +import * as entities from './entities'; +export { api, entities }; diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts new file mode 100644 index 000000000..92b83192c --- /dev/null +++ b/packages/misskey-js/src/streaming.ts @@ -0,0 +1,340 @@ +import autobind from 'autobind-decorator'; +import { EventEmitter } from 'eventemitter3'; +import ReconnectingWebsocket from 'reconnecting-websocket'; +import { BroadcastEvents, Channels } from './streaming.types'; + +export function urlQuery(obj: Record): string { + const params = Object.entries(obj) + .filter(([, v]) => Array.isArray(v) ? v.length : v !== undefined) + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + .reduce((a, [k, v]) => (a[k] = v!, a), {} as Record); + + return Object.entries(params) + .map((e) => `${e[0]}=${encodeURIComponent(e[1])}`) + .join('&'); +} + +type AnyOf> = T[keyof T]; + +type StreamEvents = { + _connected_: void; + _disconnected_: void; +} & BroadcastEvents; + +/** + * Misskey stream connection + */ +export default class Stream extends EventEmitter { + private stream: ReconnectingWebsocket; + public state: 'initializing' | 'reconnecting' | 'connected' = 'initializing'; + private sharedConnectionPools: Pool[] = []; + private sharedConnections: SharedConnection[] = []; + private nonSharedConnections: NonSharedConnection[] = []; + private idCounter = 0; + + constructor(origin: string, user: { token: string; } | null, options?: { + WebSocket?: any; + }) { + super(); + options = options || { }; + + const query = urlQuery({ + i: user?.token, + + // To prevent cache of an HTML such as error screen + _t: Date.now(), + }); + + const wsOrigin = origin.replace('http://', 'ws://').replace('https://', 'wss://'); + + this.stream = new ReconnectingWebsocket(`${wsOrigin}/streaming?${query}`, '', { + minReconnectionDelay: 1, // https://github.com/pladaria/reconnecting-websocket/issues/91 + WebSocket: options.WebSocket, + }); + this.stream.addEventListener('open', this.onOpen); + this.stream.addEventListener('close', this.onClose); + this.stream.addEventListener('message', this.onMessage); + } + + @autobind + private genId(): string { + return (++this.idCounter).toString(); + } + + @autobind + public useChannel(channel: C, params?: Channels[C]['params'], name?: string): Connection { + if (params) { + return this.connectToChannel(channel, params); + } else { + return this.useSharedConnection(channel, name); + } + } + + @autobind + private useSharedConnection(channel: C, name?: string): SharedConnection { + let pool = this.sharedConnectionPools.find(p => p.channel === channel); + + if (pool == null) { + pool = new Pool(this, channel, this.genId()); + this.sharedConnectionPools.push(pool); + } + + const connection = new SharedConnection(this, channel, pool, name); + this.sharedConnections.push(connection); + return connection; + } + + @autobind + public removeSharedConnection(connection: SharedConnection): void { + this.sharedConnections = this.sharedConnections.filter(c => c !== connection); + } + + @autobind + public removeSharedConnectionPool(pool: Pool): void { + this.sharedConnectionPools = this.sharedConnectionPools.filter(p => p !== pool); + } + + @autobind + private connectToChannel(channel: C, params: Channels[C]['params']): NonSharedConnection { + const connection = new NonSharedConnection(this, channel, this.genId(), params); + this.nonSharedConnections.push(connection); + return connection; + } + + @autobind + public disconnectToChannel(connection: NonSharedConnection): void { + this.nonSharedConnections = this.nonSharedConnections.filter(c => c !== connection); + } + + /** + * Callback of when open connection + */ + @autobind + private onOpen(): void { + const isReconnect = this.state === 'reconnecting'; + + this.state = 'connected'; + this.emit('_connected_'); + + // チャンネル再接続 + if (isReconnect) { + for (const p of this.sharedConnectionPools) p.connect(); + for (const c of this.nonSharedConnections) c.connect(); + } + } + + /** + * Callback of when close connection + */ + @autobind + private onClose(): void { + if (this.state === 'connected') { + this.state = 'reconnecting'; + this.emit('_disconnected_'); + } + } + + /** + * Callback of when received a message from connection + */ + @autobind + private onMessage(message: { data: string; }): void { + const { type, body } = JSON.parse(message.data); + + if (type === 'channel') { + const id = body.id; + + let connections: Connection[]; + + connections = this.sharedConnections.filter(c => c.id === id); + + if (connections.length === 0) { + const found = this.nonSharedConnections.find(c => c.id === id); + if (found) { + connections = [found]; + } + } + + for (const c of connections) { + c.emit(body.type, body.body); + c.inCount++; + } + } else { + this.emit(type, body); + } + } + + /** + * Send a message to connection + */ + @autobind + public send(typeOrPayload: any, payload?: any): void { + const data = payload === undefined ? typeOrPayload : { + type: typeOrPayload, + body: payload, + }; + + this.stream.send(JSON.stringify(data)); + } + + /** + * Close this connection + */ + @autobind + public close(): void { + this.stream.close(); + } +} + +// TODO: これらのクラスを Stream クラスの内部クラスにすれば余計なメンバをpublicにしないで済むかも? +// もしくは @internal を使う? https://www.typescriptlang.org/tsconfig#stripInternal +class Pool { + public channel: string; + public id: string; + protected stream: Stream; + public users = 0; + private disposeTimerId: any; + private isConnected = false; + + constructor(stream: Stream, channel: string, id: string) { + this.channel = channel; + this.stream = stream; + this.id = id; + + this.stream.on('_disconnected_', this.onStreamDisconnected); + } + + @autobind + private onStreamDisconnected(): void { + this.isConnected = false; + } + + @autobind + public inc(): void { + if (this.users === 0 && !this.isConnected) { + this.connect(); + } + + this.users++; + + // タイマー解除 + if (this.disposeTimerId) { + clearTimeout(this.disposeTimerId); + this.disposeTimerId = null; + } + } + + @autobind + public dec(): void { + this.users--; + + // そのコネクションの利用者が誰もいなくなったら + if (this.users === 0) { + // また直ぐに再利用される可能性があるので、一定時間待ち、 + // 新たな利用者が現れなければコネクションを切断する + this.disposeTimerId = setTimeout(() => { + this.disconnect(); + }, 3000); + } + } + + @autobind + public connect(): void { + if (this.isConnected) return; + this.isConnected = true; + this.stream.send('connect', { + channel: this.channel, + id: this.id, + }); + } + + @autobind + private disconnect(): void { + this.stream.off('_disconnected_', this.onStreamDisconnected); + this.stream.send('disconnect', { id: this.id }); + this.stream.removeSharedConnectionPool(this); + } +} + +export abstract class Connection = any> extends EventEmitter { + public channel: string; + protected stream: Stream; + public abstract id: string; + + public name?: string; // for debug + public inCount = 0; // for debug + public outCount = 0; // for debug + + constructor(stream: Stream, channel: string, name?: string) { + super(); + + this.stream = stream; + this.channel = channel; + this.name = name; + } + + @autobind + public send(type: T, body: Channel['receives'][T]): void { + this.stream.send('ch', { + id: this.id, + type: type, + body: body, + }); + + this.outCount++; + } + + public abstract dispose(): void; +} + +class SharedConnection = any> extends Connection { + private pool: Pool; + + public get id(): string { + return this.pool.id; + } + + constructor(stream: Stream, channel: string, pool: Pool, name?: string) { + super(stream, channel, name); + + this.pool = pool; + this.pool.inc(); + } + + @autobind + public dispose(): void { + this.pool.dec(); + this.removeAllListeners(); + this.stream.removeSharedConnection(this); + } +} + +class NonSharedConnection = any> extends Connection { + public id: string; + protected params: Channel['params']; + + constructor(stream: Stream, channel: string, id: string, params: Channel['params']) { + super(stream, channel); + + this.params = params; + this.id = id; + + this.connect(); + } + + @autobind + public connect(): void { + this.stream.send('connect', { + channel: this.channel, + id: this.id, + params: this.params, + }); + } + + @autobind + public dispose(): void { + this.removeAllListeners(); + this.stream.send('disconnect', { id: this.id }); + this.stream.disconnectToChannel(this); + } +} diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts new file mode 100644 index 000000000..f711b8d6e --- /dev/null +++ b/packages/misskey-js/src/streaming.types.ts @@ -0,0 +1,152 @@ +import { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities'; + +type FIXME = any; + +export type Channels = { + main: { + params: null; + events: { + notification: (payload: Notification) => void; + mention: (payload: Note) => void; + reply: (payload: Note) => void; + renote: (payload: Note) => void; + follow: (payload: User) => void; // 自分が他人をフォローしたとき + followed: (payload: User) => void; // 他人が自分をフォローしたとき + unfollow: (payload: User) => void; // 自分が他人をフォロー解除したとき + meUpdated: (payload: MeDetailed) => void; + pageEvent: (payload: PageEvent) => void; + urlUploadFinished: (payload: { marker: string; file: DriveFile; }) => void; + readAllNotifications: () => void; + unreadNotification: (payload: Notification) => void; + unreadMention: (payload: Note['id']) => void; + readAllUnreadMentions: () => void; + unreadSpecifiedNote: (payload: Note['id']) => void; + readAllUnreadSpecifiedNotes: () => void; + readAllMessagingMessages: () => void; + messagingMessage: (payload: MessagingMessage) => void; + unreadMessagingMessage: (payload: MessagingMessage) => void; + readAllAntennas: () => void; + unreadAntenna: (payload: Antenna) => void; + readAllAnnouncements: () => void; + readAllChannels: () => void; + unreadChannel: (payload: Note['id']) => void; + myTokenRegenerated: () => void; + reversiNoInvites: () => void; + reversiInvited: (payload: FIXME) => void; + signin: (payload: FIXME) => void; + registryUpdated: (payload: { + scope?: string[]; + key: string; + value: any | null; + }) => void; + driveFileCreated: (payload: DriveFile) => void; + readAntenna: (payload: Antenna) => void; + }; + receives: null; + }; + homeTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + localTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + hybridTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + globalTimeline: { + params: null; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + messaging: { + params: { + otherparty?: User['id'] | null; + group?: UserGroup['id'] | null; + }; + events: { + message: (payload: MessagingMessage) => void; + deleted: (payload: MessagingMessage['id']) => void; + read: (payload: MessagingMessage['id'][]) => void; + typers: (payload: User[]) => void; + }; + receives: { + read: { + id: MessagingMessage['id']; + }; + }; + }; + serverStats: { + params: null; + events: { + stats: (payload: FIXME) => void; + }; + receives: { + requestLog: { + id: string | number; + length: number; + }; + }; + }; + queueStats: { + params: null; + events: { + stats: (payload: FIXME) => void; + }; + receives: { + requestLog: { + id: string | number; + length: number; + }; + }; + }; +}; + +export type NoteUpdatedEvent = { + id: Note['id']; + type: 'reacted'; + body: { + reaction: string; + userId: User['id']; + }; +} | { + id: Note['id']; + type: 'unreacted'; + body: { + reaction: string; + userId: User['id']; + }; +} | { + id: Note['id']; + type: 'deleted'; + body: { + deletedAt: string; + }; +} | { + id: Note['id']; + type: 'pollVoted'; + body: { + choice: number; + userId: User['id']; + }; +}; + +export type BroadcastEvents = { + noteUpdated: (payload: NoteUpdatedEvent) => void; + emojiAdded: (payload: { + emoji: CustomEmoji; + }) => void; +}; diff --git a/packages/misskey-js/test-d/api.ts b/packages/misskey-js/test-d/api.ts new file mode 100644 index 000000000..ce793f6fd --- /dev/null +++ b/packages/misskey-js/test-d/api.ts @@ -0,0 +1,45 @@ +import { expectType } from 'tsd'; +import * as Misskey from '../src'; + +describe('API', () => { + test('success', async () => { + const cli = new Misskey.api.APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN' + }); + const res = await cli.request('meta', { detail: true }); + expectType(res); + }); + + test('conditional respose type (meta)', async () => { + const cli = new Misskey.api.APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN' + }); + + const res = await cli.request('meta', { detail: true }); + expectType(res); + + const res2 = await cli.request('meta', { detail: false }); + expectType(res2); + + const res3 = await cli.request('meta', { }); + expectType(res3); + + const res4 = await cli.request('meta', { detail: true as boolean }); + expectType(res4); + }); + + test('conditional respose type (users/show)', async () => { + const cli = new Misskey.api.APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN' + }); + + const res = await cli.request('users/show', { userId: 'xxxxxxxx' }); + expectType(res); + + const res2 = await cli.request('users/show', { userIds: ['xxxxxxxx'] }); + expectType(res2); + }); +}); diff --git a/packages/misskey-js/test-d/streaming.ts b/packages/misskey-js/test-d/streaming.ts new file mode 100644 index 000000000..7ff7f9599 --- /dev/null +++ b/packages/misskey-js/test-d/streaming.ts @@ -0,0 +1,26 @@ +import { expectType } from 'tsd'; +import * as Misskey from '../src'; + +describe('Streaming', () => { + test('emit type', async () => { + const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + const mainChannel = stream.useChannel('main'); + mainChannel.on('notification', notification => { + expectType(notification); + }); + }); + + test('params type', async () => { + const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + // TODO: 「stream.useChannel の第二引数として受け入れる型が + // { + // otherparty?: User['id'] | null; + // group?: UserGroup['id'] | null; + // } + // になっている」というテストを行いたいけどtsdでの書き方がわからない + const messagingChannel = stream.useChannel('messaging', { otherparty: 'aaa' }); + messagingChannel.on('message', message => { + expectType(message); + }); + }); +}); diff --git a/packages/misskey-js/test/api.ts b/packages/misskey-js/test/api.ts new file mode 100644 index 000000000..47c837801 --- /dev/null +++ b/packages/misskey-js/test/api.ts @@ -0,0 +1,212 @@ +import { APIClient, isAPIError } from '../src/api'; +import { enableFetchMocks } from 'jest-fetch-mock'; + +enableFetchMocks(); + +function getFetchCall(call: any[]) { + const { body, method } = call[1]; + if (body != null && typeof body != 'string') { + throw new Error('invalid body'); + } + return { + url: call[0], + method: method, + body: JSON.parse(body as any) + }; +} + +describe('API', () => { + test('success', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + const body = await req.json(); + if (req.method == 'POST' && req.url == 'https://misskey.test/api/i') { + if (body.i === 'TOKEN') { + return JSON.stringify({ id: 'foo' }); + } else { + return { status: 400 }; + } + } else { + return { status: 404 }; + } + }); + + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + const res = await cli.request('i'); + + expect(res).toEqual({ + id: 'foo' + }); + + expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({ + url: 'https://misskey.test/api/i', + method: 'POST', + body: { i: 'TOKEN' } + }); + }); + + test('with params', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + const body = await req.json(); + if (req.method == 'POST' && req.url == 'https://misskey.test/api/notes/show') { + if (body.i === 'TOKEN' && body.noteId === 'aaaaa') { + return JSON.stringify({ id: 'foo' }); + } else { + return { status: 400 }; + } + } else { + return { status: 404 }; + } + }); + + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + const res = await cli.request('notes/show', { noteId: 'aaaaa' }); + + expect(res).toEqual({ + id: 'foo' + }); + + expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({ + url: 'https://misskey.test/api/notes/show', + method: 'POST', + body: { i: 'TOKEN', noteId: 'aaaaa' } + }); + }); + + test('204 No Content で null が返る', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + if (req.method == 'POST' && req.url == 'https://misskey.test/api/reset-password') { + return { status: 204 }; + } else { + return { status: 404 }; + } + }); + + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + const res = await cli.request('reset-password', { token: 'aaa', password: 'aaa' }); + + expect(res).toEqual(null); + + expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({ + url: 'https://misskey.test/api/reset-password', + method: 'POST', + body: { i: 'TOKEN', token: 'aaa', password: 'aaa' } + }); + }); + + test('インスタンスの credential が指定されていても引数で credential が null ならば null としてリクエストされる', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + const body = await req.json(); + if (req.method == 'POST' && req.url == 'https://misskey.test/api/i') { + if (typeof body.i === 'string') { + return JSON.stringify({ id: 'foo' }); + } else { + return { + status: 401, + body: JSON.stringify({ + error: { + message: 'Credential required.', + code: 'CREDENTIAL_REQUIRED', + id: '1384574d-a912-4b81-8601-c7b1c4085df1', + } + }) + }; + } + } else { + return { status: 404 }; + } + }); + + try { + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + await cli.request('i', {}, null); + } catch (e) { + expect(isAPIError(e)).toEqual(true); + } + }); + + test('api error', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + return { + status: 500, + body: JSON.stringify({ + error: { + message: 'Internal error occurred. Please contact us if the error persists.', + code: 'INTERNAL_ERROR', + id: '5d37dbcb-891e-41ca-a3d6-e690c97775ac', + kind: 'server', + }, + }) + }; + }); + + try { + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + await cli.request('i'); + } catch (e: any) { + expect(isAPIError(e)).toEqual(true); + expect(e.id).toEqual('5d37dbcb-891e-41ca-a3d6-e690c97775ac'); + } + }); + + test('network error', async () => { + fetchMock.resetMocks(); + fetchMock.mockAbort(); + + try { + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + await cli.request('i'); + } catch (e) { + expect(isAPIError(e)).toEqual(false); + } + }); + + test('json parse error', async () => { + fetchMock.resetMocks(); + fetchMock.mockResponse(async (req) => { + return { + status: 500, + body: 'I AM NOT JSON' + }; + }); + + try { + const cli = new APIClient({ + origin: 'https://misskey.test', + credential: 'TOKEN', + }); + + await cli.request('i'); + } catch (e) { + expect(isAPIError(e)).toEqual(false); + } + }); +}); diff --git a/packages/misskey-js/test/streaming.ts b/packages/misskey-js/test/streaming.ts new file mode 100644 index 000000000..913db8b28 --- /dev/null +++ b/packages/misskey-js/test/streaming.ts @@ -0,0 +1,165 @@ +import WS from 'jest-websocket-mock'; +import Stream from '../src/streaming'; + +describe('Streaming', () => { + test('useChannel', async () => { + const server = new WS('wss://misskey.test/streaming'); + const stream = new Stream('https://misskey.test', { token: 'TOKEN' }); + const mainChannelReceived: any[] = []; + const main = stream.useChannel('main'); + main.on('meUpdated', payload => { + mainChannelReceived.push(payload); + }); + + const ws = await server.connected; + expect(new URLSearchParams(new URL(ws.url).search).get('i')).toEqual('TOKEN'); + + const msg = JSON.parse(await server.nextMessage as string); + const mainChannelId = msg.body.id; + expect(msg.type).toEqual('connect'); + expect(msg.body.channel).toEqual('main'); + expect(mainChannelId != null).toEqual(true); + + server.send(JSON.stringify({ + type: 'channel', + body: { + id: mainChannelId, + type: 'meUpdated', + body: { + id: 'foo' + } + } + })); + + expect(mainChannelReceived[0]).toEqual({ + id: 'foo' + }); + + stream.close(); + server.close(); + }); + + test('useChannel with parameters', async () => { + const server = new WS('wss://misskey.test/streaming'); + const stream = new Stream('https://misskey.test', { token: 'TOKEN' }); + const messagingChannelReceived: any[] = []; + const messaging = stream.useChannel('messaging', { otherparty: 'aaa' }); + messaging.on('message', payload => { + messagingChannelReceived.push(payload); + }); + + const ws = await server.connected; + expect(new URLSearchParams(new URL(ws.url).search).get('i')).toEqual('TOKEN'); + + const msg = JSON.parse(await server.nextMessage as string); + const messagingChannelId = msg.body.id; + expect(msg.type).toEqual('connect'); + expect(msg.body.channel).toEqual('messaging'); + expect(msg.body.params).toEqual({ otherparty: 'aaa' }); + expect(messagingChannelId != null).toEqual(true); + + server.send(JSON.stringify({ + type: 'channel', + body: { + id: messagingChannelId, + type: 'message', + body: { + id: 'foo' + } + } + })); + + expect(messagingChannelReceived[0]).toEqual({ + id: 'foo' + }); + + stream.close(); + server.close(); + }); + + test('ちゃんとチャンネルごとにidが異なる', async () => { + const server = new WS('wss://misskey.test/streaming'); + const stream = new Stream('https://misskey.test', { token: 'TOKEN' }); + + stream.useChannel('messaging', { otherparty: 'aaa' }); + stream.useChannel('messaging', { otherparty: 'bbb' }); + + const ws = await server.connected; + expect(new URLSearchParams(new URL(ws.url).search).get('i')).toEqual('TOKEN'); + + const msg = JSON.parse(await server.nextMessage as string); + const messagingChannelId = msg.body.id; + const msg2 = JSON.parse(await server.nextMessage as string); + const messagingChannelId2 = msg2.body.id; + + expect(messagingChannelId != null).toEqual(true); + expect(messagingChannelId2 != null).toEqual(true); + expect(messagingChannelId).not.toEqual(messagingChannelId2); + + stream.close(); + server.close(); + }); + + test('Connection#send', async () => { + const server = new WS('wss://misskey.test/streaming'); + const stream = new Stream('https://misskey.test', { token: 'TOKEN' }); + + const messaging = stream.useChannel('messaging', { otherparty: 'aaa' }); + messaging.send('read', { id: 'aaa' }); + + const ws = await server.connected; + expect(new URLSearchParams(new URL(ws.url).search).get('i')).toEqual('TOKEN'); + + const connectMsg = JSON.parse(await server.nextMessage as string); + const channelId = connectMsg.body.id; + const msg = JSON.parse(await server.nextMessage as string); + + expect(msg.type).toEqual('ch'); + expect(msg.body.id).toEqual(channelId); + expect(msg.body.type).toEqual('read'); + expect(msg.body.body).toEqual({ id: 'aaa' }); + + stream.close(); + server.close(); + }); + + test('Connection#dispose', async () => { + const server = new WS('wss://misskey.test/streaming'); + const stream = new Stream('https://misskey.test', { token: 'TOKEN' }); + const mainChannelReceived: any[] = []; + const main = stream.useChannel('main'); + main.on('meUpdated', payload => { + mainChannelReceived.push(payload); + }); + + const ws = await server.connected; + expect(new URLSearchParams(new URL(ws.url).search).get('i')).toEqual('TOKEN'); + + const msg = JSON.parse(await server.nextMessage as string); + const mainChannelId = msg.body.id; + expect(msg.type).toEqual('connect'); + expect(msg.body.channel).toEqual('main'); + expect(mainChannelId != null).toEqual(true); + main.dispose(); + + server.send(JSON.stringify({ + type: 'channel', + body: { + id: mainChannelId, + type: 'meUpdated', + body: { + id: 'foo' + } + } + })); + + expect(mainChannelReceived.length).toEqual(0); + + stream.close(); + server.close(); + }); + + // TODO: SharedConnection#dispose して一定時間経ったら disconnect メッセージがサーバーに送られてくるかのテスト + + // TODO: チャンネル接続が使いまわされるかのテスト +}); diff --git a/packages/misskey-js/tsconfig.json b/packages/misskey-js/tsconfig.json new file mode 100644 index 000000000..a03a24262 --- /dev/null +++ b/packages/misskey-js/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./built/", + "removeComments": true, + "strict": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "experimentalDecorators": true, + "noImplicitReturns": true, + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules", + "test/**/*" + ] +} diff --git a/packages/sw/package.json b/packages/sw/package.json index 7fab90a24..951d71d1f 100644 --- a/packages/sw/package.json +++ b/packages/sw/package.json @@ -11,7 +11,7 @@ "dependencies": { "esbuild": "0.14.42", "idb-keyval": "6.2.0", - "misskey-js": "0.0.15" + "misskey-js": "../misskey-js" }, "devDependencies": { "@typescript-eslint/parser": "5.52.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 329b0c945..9cdc29a88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,7 +274,7 @@ importers: jsrsasign: 10.6.1 mfm-js: 0.23.3 mime-types: 2.1.35 - misskey-js: 0.0.15 + misskey-js: link:../misskey-js ms: 3.0.0-canary.1 nested-property: 4.0.0 node-fetch: 3.3.0 @@ -309,7 +309,7 @@ importers: sharp-read-bmp: github.com/misskey-dev/sharp-read-bmp/02d9dc189fa7df0c4bea09330be26741772dac01 strict-event-emitter-types: 2.0.0 stringz: 2.1.0 - summaly: github.com/misskey-dev/summaly/028b2fed2fd4f5ea7b6a8d55024825c815434f7d + summaly: github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992 systeminformation: 5.17.12 tinycolor2: 1.6.0 tmp: 0.2.1 @@ -449,7 +449,7 @@ importers: json5: 2.2.3 matter-js: 0.19.0 mfm-js: 0.23.3 - misskey-js: 0.0.15 + misskey-js: ../misskey-js photoswipe: 5.3.6 prismjs: 1.29.0 punycode: 2.3.0 @@ -513,7 +513,7 @@ importers: json5: 2.2.3 matter-js: 0.19.0 mfm-js: 0.23.3 - misskey-js: 0.0.15 + misskey-js: link:../misskey-js photoswipe: 5.3.6 prismjs: 1.29.0 punycode: 2.3.0 @@ -571,6 +571,45 @@ importers: vue-eslint-parser: 9.1.0_eslint@8.35.0 vue-tsc: 1.2.0_typescript@4.9.5 + packages/misskey-js: + specifiers: + '@microsoft/api-extractor': ^7.19.3 + '@types/jest': ^27.4.0 + '@types/node': 17.0.5 + '@typescript-eslint/eslint-plugin': 5.8.1 + '@typescript-eslint/parser': 5.8.1 + autobind-decorator: ^2.4.0 + eslint: 8.6.0 + eventemitter3: ^4.0.7 + jest: ^27.4.5 + jest-fetch-mock: ^3.0.3 + jest-websocket-mock: ^2.2.1 + mock-socket: ^9.0.8 + reconnecting-websocket: ^4.4.0 + ts-jest: ^27.1.2 + ts-node: 10.4.0 + tsd: ^0.19.1 + typescript: 4.5.4 + dependencies: + autobind-decorator: 2.4.0 + eventemitter3: 4.0.7 + reconnecting-websocket: 4.4.0 + devDependencies: + '@microsoft/api-extractor': 7.34.4_@types+node@17.0.5 + '@types/jest': 27.5.2 + '@types/node': 17.0.5 + '@typescript-eslint/eslint-plugin': 5.8.1_cmbzle7gjtkttufuyxbnuoijla + '@typescript-eslint/parser': 5.8.1_z3gsmzc3xu6w45afpmnsgzwvm4 + eslint: 8.6.0 + jest: 27.5.1_ts-node@10.4.0 + jest-fetch-mock: 3.0.3 + jest-websocket-mock: 2.4.0 + mock-socket: 9.2.1 + ts-jest: 27.1.5_mg2qigfcunrfdyaizjx2my6gv4 + ts-node: 10.4.0_xligbvpzvsssqrtb3cgxhg5blm + tsd: 0.19.1 + typescript: 4.5.4 + packages/sw: specifiers: '@typescript-eslint/parser': 5.52.0 @@ -579,12 +618,12 @@ importers: eslint: 8.34.0 eslint-plugin-import: 2.27.5 idb-keyval: 6.2.0 - misskey-js: 0.0.15 + misskey-js: ../misskey-js typescript: 4.9.5 dependencies: esbuild: 0.14.42 idb-keyval: 6.2.0 - misskey-js: 0.0.15 + misskey-js: link:../misskey-js devDependencies: '@typescript-eslint/parser': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript/lib-webworker': /@types/serviceworker/0.0.62 @@ -1061,6 +1100,18 @@ packages: resolution: {integrity: sha512-RJu5IWzH6vcygwLsx9KEqzwjnEqApPkSFViMzxCRbe0IuAXt2ZlSUmYKgLFZY+YJIdaZ+/P7PwiUcZ7GYH3Msw==} dev: false + /@cspotcode/source-map-consumer/0.8.0: + resolution: {integrity: sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==} + engines: {node: '>= 12'} + dev: true + + /@cspotcode/source-map-support/0.7.0: + resolution: {integrity: sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==} + engines: {node: '>=12'} + dependencies: + '@cspotcode/source-map-consumer': 0.8.0 + dev: true + /@cypress/request/2.88.11: resolution: {integrity: sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==} engines: {node: '>= 6'} @@ -1473,6 +1524,17 @@ packages: - supports-color dev: true + /@humanwhocodes/config-array/0.9.5: + resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + /@humanwhocodes/module-importer/1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -1501,6 +1563,18 @@ packages: engines: {node: '>=8'} dev: true + /@jest/console/27.5.1: + resolution: {integrity: sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + jest-message-util: 27.5.1 + jest-util: 27.5.1 + slash: 3.0.0 + dev: true + /@jest/console/29.5.0: resolution: {integrity: sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1513,6 +1587,51 @@ packages: slash: 3.0.0 dev: true + /@jest/core/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/console': 27.5.1 + '@jest/reporters': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.8.1 + exit: 0.1.2 + graceful-fs: 4.2.10 + jest-changed-files: 27.5.1 + jest-config: 27.5.1_ts-node@10.4.0 + jest-haste-map: 27.5.1 + jest-message-util: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-resolve-dependencies: 27.5.1 + jest-runner: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 + jest-watcher: 27.5.1 + micromatch: 4.0.5 + rimraf: 3.0.2 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - ts-node + - utf-8-validate + dev: true + /@jest/core/29.5.0: resolution: {integrity: sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1562,6 +1681,16 @@ packages: '@jest/types': 27.5.1 dev: true + /@jest/environment/27.5.1: + resolution: {integrity: sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + jest-mock: 27.5.1 + dev: true + /@jest/environment/29.5.0: resolution: {integrity: sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1572,13 +1701,6 @@ packages: jest-mock: 29.5.0 dev: true - /@jest/expect-utils/29.3.1: - resolution: {integrity: sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.4.3 - dev: true - /@jest/expect-utils/29.5.0: resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1596,6 +1718,18 @@ packages: - supports-color dev: true + /@jest/fake-timers/27.5.1: + resolution: {integrity: sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + '@sinonjs/fake-timers': 8.1.0 + '@types/node': 18.15.0 + jest-message-util: 27.5.1 + jest-mock: 27.5.1 + jest-util: 27.5.1 + dev: true + /@jest/fake-timers/29.5.0: resolution: {integrity: sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1608,6 +1742,15 @@ packages: jest-util: 29.5.0 dev: true + /@jest/globals/27.5.1: + resolution: {integrity: sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/types': 27.5.1 + expect: 27.5.1 + dev: true + /@jest/globals/29.5.0: resolution: {integrity: sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1620,6 +1763,44 @@ packages: - supports-color dev: true + /@jest/reporters/27.5.1: + resolution: {integrity: sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + collect-v8-coverage: 1.0.1 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-instrument: 5.2.1 + istanbul-lib-report: 3.0.0 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 + jest-haste-map: 27.5.1 + jest-resolve: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 + slash: 3.0.0 + source-map: 0.6.1 + string-length: 4.0.2 + terminal-link: 2.1.1 + v8-to-istanbul: 8.1.1 + transitivePeerDependencies: + - supports-color + dev: true + /@jest/reporters/29.5.0: resolution: {integrity: sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1657,11 +1838,11 @@ packages: - supports-color dev: true - /@jest/schemas/29.4.2: - resolution: {integrity: sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /@jest/schemas/28.1.3: + resolution: {integrity: sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@sinclair/typebox': 0.25.21 + '@sinclair/typebox': 0.24.51 dev: true /@jest/schemas/29.4.3: @@ -1671,6 +1852,15 @@ packages: '@sinclair/typebox': 0.25.21 dev: true + /@jest/source-map/27.5.1: + resolution: {integrity: sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + callsites: 3.1.0 + graceful-fs: 4.2.10 + source-map: 0.6.1 + dev: true + /@jest/source-map/29.4.3: resolution: {integrity: sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1680,6 +1870,16 @@ packages: graceful-fs: 4.2.10 dev: true + /@jest/test-result/27.5.1: + resolution: {integrity: sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/console': 27.5.1 + '@jest/types': 27.5.1 + '@types/istanbul-lib-coverage': 2.0.4 + collect-v8-coverage: 1.0.1 + dev: true + /@jest/test-result/29.5.0: resolution: {integrity: sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1690,6 +1890,18 @@ packages: collect-v8-coverage: 1.0.1 dev: true + /@jest/test-sequencer/27.5.1: + resolution: {integrity: sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/test-result': 27.5.1 + graceful-fs: 4.2.10 + jest-haste-map: 27.5.1 + jest-runtime: 27.5.1 + transitivePeerDependencies: + - supports-color + dev: true + /@jest/test-sequencer/29.5.0: resolution: {integrity: sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1700,6 +1912,29 @@ packages: slash: 3.0.0 dev: true + /@jest/transform/27.5.1: + resolution: {integrity: sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@babel/core': 7.20.12 + '@jest/types': 27.5.1 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 1.9.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.10 + jest-haste-map: 27.5.1 + jest-regex-util: 27.5.1 + jest-util: 27.5.1 + micromatch: 4.0.5 + pirates: 4.0.5 + slash: 3.0.0 + source-map: 0.6.1 + write-file-atomic: 3.0.3 + transitivePeerDependencies: + - supports-color + dev: true + /@jest/transform/29.5.0: resolution: {integrity: sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1818,6 +2053,49 @@ packages: dev: false optional: true + /@microsoft/api-extractor-model/7.26.4_@types+node@17.0.5: + resolution: {integrity: sha512-PDCgCzXDo+SLY5bsfl4bS7hxaeEtnXj7XtuzEE+BtALp7B5mK/NrS2kHWU69pohgsRmEALycQdaQPXoyT2i5MQ==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.55.2_@types+node@17.0.5 + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/api-extractor/7.34.4_@types+node@17.0.5: + resolution: {integrity: sha512-HOdcci2nT40ejhwPC3Xja9G+WSJmWhCUKKryRfQYsmE9cD+pxmBaKBKCbuS9jUcl6bLLb4Gz+h7xEN5r0QiXnQ==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.26.4_@types+node@17.0.5 + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.55.2_@types+node@17.0.5 + '@rushstack/rig-package': 0.3.18 + '@rushstack/ts-command-line': 4.13.2 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.1 + semver: 7.3.8 + source-map: 0.6.1 + typescript: 4.8.4 + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/tsdoc-config/0.16.2: + resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + ajv: 6.12.6 + jju: 1.4.0 + resolve: 1.19.0 + dev: true + + /@microsoft/tsdoc/0.14.2: + resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + dev: true + /@mole-inc/bin-wrapper/8.0.1: resolution: {integrity: sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2108,6 +2386,40 @@ packages: rollup: 3.19.0 dev: false + /@rushstack/node-core-library/3.55.2_@types+node@17.0.5: + resolution: {integrity: sha512-SaLe/x/Q/uBVdNFK5V1xXvsVps0y7h1sN7aSJllQyFbugyOaxhNRF25bwEDnicARNEjJw0pk0lYnJQ9Kr6ev0A==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 17.0.5 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.1 + semver: 7.3.8 + z-schema: 5.0.5 + dev: true + + /@rushstack/rig-package/0.3.18: + resolution: {integrity: sha512-SGEwNTwNq9bI3pkdd01yCaH+gAsHqs0uxfGvtw9b0LJXH52qooWXnrFTRRLG1aL9pf+M2CARdrA9HLHJys3jiQ==} + dependencies: + resolve: 1.22.1 + strip-json-comments: 3.1.1 + dev: true + + /@rushstack/ts-command-line/4.13.2: + resolution: {integrity: sha512-bCU8qoL9HyWiciltfzg7GqdfODUeda/JpI0602kbN5YH22rzTxyqYvv7aRLENCM7XCQ1VRs7nMkEqgJUOU8Sag==} + dependencies: + '@types/argparse': 1.0.38 + argparse: 1.0.10 + colors: 1.2.5 + string-argv: 0.3.1 + dev: true + /@sideway/address/4.1.4: resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} dependencies: @@ -2122,6 +2434,10 @@ packages: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} dev: true + /@sinclair/typebox/0.24.51: + resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} + dev: true + /@sinclair/typebox/0.25.21: resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} dev: true @@ -2136,6 +2452,12 @@ packages: engines: {node: '>=14.16'} dev: false + /@sinonjs/commons/1.8.6: + resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} + dependencies: + type-detect: 4.0.8 + dev: true + /@sinonjs/commons/2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: @@ -2146,6 +2468,12 @@ packages: dependencies: '@sinonjs/commons': 2.0.0 + /@sinonjs/fake-timers/8.1.0: + resolution: {integrity: sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==} + dependencies: + '@sinonjs/commons': 1.8.6 + dev: true + /@sqltools/formatter/1.2.5: resolution: {integrity: sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==} dev: false @@ -2472,11 +2800,37 @@ packages: resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} dev: false + /@tootallnate/once/1.1.2: + resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} + engines: {node: '>= 6'} + dev: true + /@tootallnate/once/2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} dev: false + /@tsconfig/node10/1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12/1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14/1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16/1.0.3: + resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} + dev: true + + /@tsd/typescript/4.5.5: + resolution: {integrity: sha512-TxQ9QiUT94ZjKu++ta/iwTMVHsix4ApohnaHPTSd58WQuTjPIELP0tUYcW7lT6psz7yZiU4eRw+X4v/XV830Sw==} + hasBin: true + dev: true + /@types/accepts/1.3.5: resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==} dependencies: @@ -2489,6 +2843,10 @@ packages: '@types/glob': 8.0.0 dev: true + /@types/argparse/1.0.38: + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + dev: true + /@types/aria-query/5.0.1: resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} dev: true @@ -2581,9 +2939,15 @@ packages: resolution: {integrity: sha512-ogj/ZTIdeFkiuxDwawYuZSIgC6suFGgBeZPr6Xs5lHEcvIXTjXGtH+/n8f1XhZhespaUwJ5LIGRICPji972FLw==} dev: true + /@types/eslint/7.29.0: + resolution: {integrity: sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==} + dependencies: + '@types/estree': 1.0.0 + '@types/json-schema': 7.0.11 + dev: true + /@types/estree/1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - dev: false /@types/expect/1.20.4: resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==} @@ -2662,11 +3026,18 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true + /@types/jest/27.5.2: + resolution: {integrity: sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==} + dependencies: + jest-matcher-utils: 27.5.1 + pretty-format: 27.5.1 + dev: true + /@types/jest/29.4.0: resolution: {integrity: sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==} dependencies: - expect: 29.3.1 - pretty-format: 29.3.1 + expect: 29.5.0 + pretty-format: 29.5.0 dev: true /@types/js-yaml/4.0.5: @@ -2719,6 +3090,10 @@ packages: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true + /@types/minimist/1.2.2: + resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + dev: true + /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: @@ -2736,6 +3111,9 @@ packages: resolution: {integrity: sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==} dev: true + /@types/node/17.0.5: + resolution: {integrity: sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw==} + /@types/node/18.11.18: resolution: {integrity: sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==} @@ -2748,6 +3126,10 @@ packages: '@types/node': 18.15.0 dev: true + /@types/normalize-package-data/2.4.1: + resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + dev: true + /@types/oauth/0.9.1: resolution: {integrity: sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==} dependencies: @@ -2912,7 +3294,7 @@ packages: resolution: {integrity: sha512-4UqPv+2567NhMQuMLdKAyK4yzrfCqwaTt6bLhHEs8PFcxbHILsrxaY63n4wgE/BRLDWDQeI+WcTmkXKExh9hQg==} dependencies: '@types/expect': 1.20.4 - '@types/node': 18.15.0 + '@types/node': 17.0.5 /@types/web-push/3.3.2: resolution: {integrity: sha512-JxWGVL/m7mWTIg4mRYO+A6s0jPmBkr4iJr39DqJpRJAc+jrPiEe1/asmkwerzRon8ZZDxaZJpsxpv0Z18Wo9gw==} @@ -2988,6 +3370,50 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin/5.8.1_cmbzle7gjtkttufuyxbnuoijla: + resolution: {integrity: sha512-wTZ5oEKrKj/8/366qTM366zqhIKAp6NCMweoRONtfuC07OAU9nVI2GZZdqQ1qD30WAAtcPdkH+npDwtRFdp4Rw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/experimental-utils': 5.8.1_z3gsmzc3xu6w45afpmnsgzwvm4 + '@typescript-eslint/parser': 5.8.1_z3gsmzc3xu6w45afpmnsgzwvm4 + '@typescript-eslint/scope-manager': 5.8.1 + debug: 4.3.4 + eslint: 8.6.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.4 + regexpp: 3.2.0 + semver: 7.3.8 + tsutils: 3.21.0_typescript@4.5.4 + typescript: 4.5.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/experimental-utils/5.8.1_z3gsmzc3xu6w45afpmnsgzwvm4: + resolution: {integrity: sha512-fbodVnjIDU4JpeXWRDsG5IfIjYBxEvs8EBO8W1+YVdtrc2B9ppfof5sZhVEDOtgTfFHnYQJDI8+qdqLYO4ceww==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@typescript-eslint/scope-manager': 5.8.1 + '@typescript-eslint/types': 5.8.1 + '@typescript-eslint/typescript-estree': 5.8.1_typescript@4.5.4 + eslint: 8.6.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.6.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/parser/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: resolution: {integrity: sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3028,6 +3454,26 @@ packages: - supports-color dev: true + /@typescript-eslint/parser/5.8.1_z3gsmzc3xu6w45afpmnsgzwvm4: + resolution: {integrity: sha512-K1giKHAjHuyB421SoXMXFHHVI4NdNY603uKw92++D3qyxSeYvC10CBJ/GE5Thpo4WTUvu1mmJI2/FFkz38F2Gw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.8.1 + '@typescript-eslint/types': 5.8.1 + '@typescript-eslint/typescript-estree': 5.8.1_typescript@4.5.4 + debug: 4.3.4 + eslint: 8.6.0 + typescript: 4.5.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager/5.52.0: resolution: {integrity: sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3044,6 +3490,14 @@ packages: '@typescript-eslint/visitor-keys': 5.54.1 dev: true + /@typescript-eslint/scope-manager/5.8.1: + resolution: {integrity: sha512-DGxJkNyYruFH3NIZc3PwrzwOQAg7vvgsHsHCILOLvUpupgkwDZdNq/cXU3BjF4LNrCsVg0qxEyWasys5AiJ85Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.8.1 + '@typescript-eslint/visitor-keys': 5.8.1 + dev: true + /@typescript-eslint/type-utils/5.54.1_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-WREHsTz0GqVYLIbzIZYbmUUr95DKEKIXZNH57W3s+4bVnuF1TKe2jH8ZNH8rO1CeMY3U4j4UQeqPNkHMiGem3g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3074,6 +3528,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types/5.8.1: + resolution: {integrity: sha512-L/FlWCCgnjKOLefdok90/pqInkomLnAcF9UAzNr+DSqMC3IffzumHTQTrINXhP1gVp9zlHiYYjvozVZDPleLcA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@typescript-eslint/typescript-estree/5.52.0_typescript@4.9.5: resolution: {integrity: sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3116,6 +3575,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree/5.8.1_typescript@4.5.4: + resolution: {integrity: sha512-26lQ8l8tTbG7ri7xEcCFT9ijU5Fk+sx/KRRyyzCv7MQ+rZZlqiDPtMKWLC8P7o+dtCnby4c+OlxuX1tp8WfafQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.8.1 + '@typescript-eslint/visitor-keys': 5.8.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.8 + tsutils: 3.21.0_typescript@4.5.4 + typescript: 4.5.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils/5.54.1_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3152,6 +3632,14 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@typescript-eslint/visitor-keys/5.8.1: + resolution: {integrity: sha512-SWgiWIwocK6NralrJarPZlWdr0hZnj5GXHIgfdm8hNkyKvpeQuFyLP6YjSIe9kf3YBIfU6OHSZLYkQ+smZwtNg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.8.1 + eslint-visitor-keys: 3.3.0 + dev: true + /@vitejs/plugin-vue/4.0.0_vite@4.1.4+vue@3.2.47: resolution: {integrity: sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -3344,7 +3832,6 @@ packages: /abab/2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - dev: false /abbrev/1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -3368,10 +3855,17 @@ packages: negotiator: 0.6.3 dev: false + /acorn-globals/6.0.0: + resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} + dependencies: + acorn: 7.4.1 + acorn-walk: 7.2.0 + dev: true + /acorn-globals/7.0.1: resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} dependencies: - acorn: 8.8.1 + acorn: 8.8.2 acorn-walk: 8.2.0 dev: false @@ -3383,6 +3877,11 @@ packages: acorn: 8.8.2 dev: true + /acorn-walk/7.2.0: + resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} @@ -3391,7 +3890,6 @@ packages: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} hasBin: true - dev: false /acorn/8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} @@ -3424,7 +3922,6 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color - dev: false /agentkeepalive/4.2.1: resolution: {integrity: sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==} @@ -3638,6 +4135,10 @@ packages: readable-stream: 3.6.0 dev: false + /arg/4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true + /arg/5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: true @@ -3759,6 +4260,11 @@ packages: es-shim-unscopables: 1.0.0 dev: true + /arrify/1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: true + /asap/2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: false @@ -3915,6 +4421,25 @@ packages: - debug dev: true + /babel-jest/27.5.1_@babel+core@7.20.12: + resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + dependencies: + '@babel/core': 7.20.12 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/babel__core': 7.1.20 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 27.5.1_@babel+core@7.20.12 + chalk: 4.1.2 + graceful-fs: 4.2.10 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /babel-jest/29.5.0_@babel+core@7.20.12: resolution: {integrity: sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3946,6 +4471,16 @@ packages: - supports-color dev: true + /babel-plugin-jest-hoist/27.5.1: + resolution: {integrity: sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@babel/template': 7.20.7 + '@babel/types': 7.20.7 + '@types/babel__core': 7.1.20 + '@types/babel__traverse': 7.18.3 + dev: true + /babel-plugin-jest-hoist/29.5.0: resolution: {integrity: sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3976,6 +4511,17 @@ packages: '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.20.12 dev: true + /babel-preset-jest/27.5.1_@babel+core@7.20.12: + resolution: {integrity: sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.20.12 + babel-plugin-jest-hoist: 27.5.1 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.20.12 + dev: true + /babel-preset-jest/29.5.0_@babel+core@7.20.12: resolution: {integrity: sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4163,6 +4709,10 @@ packages: unload: 2.4.1 dev: false + /browser-process-hrtime/1.0.0: + resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} + dev: true + /browserslist/1.7.7: resolution: {integrity: sha512-qHJblDE2bXVRYzuDetv/wAeHOJyO97+9wxC1cdCtyzgNuSozOyRCiiLaCR1f71AN66lQdVVBipWm63V+a7bPOw==} deprecated: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. @@ -4183,6 +4733,13 @@ packages: update-browserslist-db: 1.0.10_browserslist@4.21.4 dev: true + /bs-logger/0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + dependencies: + fast-json-stable-stringify: 2.1.0 + dev: true + /bser/2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: @@ -4392,6 +4949,15 @@ packages: engines: {node: '>=6'} dev: true + /camelcase-keys/6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + dev: true + /camelcase/3.0.0: resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==} engines: {node: '>=0.10.0'} @@ -4858,6 +5424,11 @@ packages: engines: {node: '>=0.1.90'} dev: false + /colors/1.2.5: + resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} + engines: {node: '>=0.1.90'} + dev: true + /combined-stream/1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -4880,7 +5451,7 @@ packages: /commander/9.5.0: resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} engines: {node: ^12.20.0 || >=14} - dev: false + requiresBuild: true /common-tags/1.8.2: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} @@ -4996,6 +5567,10 @@ packages: readable-stream: 3.6.0 dev: false + /create-require/1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true + /cron-parser/4.7.1: resolution: {integrity: sha512-WguFaoQ0hQ61SgsCZLHUcNbAvlK0lypKXu62ARguefYmjzaOXIVRNrAmyXzabTwUn4sQvQLkk6bjH+ipGfw8bA==} engines: {node: '>=12.0.0'} @@ -5016,6 +5591,14 @@ packages: cross-spawn: 7.0.3 dev: true + /cross-fetch/3.1.5: + resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} + dependencies: + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + dev: true + /cross-spawn/5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -5106,7 +5689,10 @@ packages: /cssom/0.3.8: resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - dev: false + + /cssom/0.4.4: + resolution: {integrity: sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==} + dev: true /cssom/0.5.0: resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} @@ -5117,7 +5703,6 @@ packages: engines: {node: '>=8'} dependencies: cssom: 0.3.8 - dev: false /csstype/2.6.21: resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} @@ -5207,6 +5792,15 @@ packages: resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==} engines: {node: '>= 12'} + /data-urls/2.0.0: + resolution: {integrity: sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==} + engines: {node: '>=10'} + dependencies: + abab: 2.0.6 + whatwg-mimetype: 2.3.0 + whatwg-url: 8.7.0 + dev: true + /data-urls/3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -5289,14 +5883,20 @@ packages: /debuglog/1.0.1: resolution: {integrity: sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==} + /decamelize-keys/1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: true + /decamelize/1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - dev: false /decimal.js/10.4.2: resolution: {integrity: sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==} - dev: false /decode-bmp/0.2.1: resolution: {integrity: sha512-NiOaGe+GN0KJqi2STf24hfMkFitDUaIoUU3eKvP/wAbLe8o6FuW5n/x7MHPR0HKvBokp6MQY/j7w8lewEeVCIA==} @@ -5475,11 +6075,26 @@ packages: engines: {node: '>=8'} dev: true + /diff-sequences/27.5.1: + resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + + /diff-sequences/28.1.1: + resolution: {integrity: sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + dev: true + /diff-sequences/29.4.3: resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diff/4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + /diff/5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} @@ -5531,6 +6146,13 @@ packages: /domelementtype/2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + /domexception/2.0.1: + resolution: {integrity: sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==} + engines: {node: '>=8'} + dependencies: + webidl-conversions: 5.0.0 + dev: true + /domexception/4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} engines: {node: '>=12'} @@ -5624,6 +6246,11 @@ packages: engines: {node: '>=12'} dev: true + /emittery/0.8.1: + resolution: {integrity: sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==} + engines: {node: '>=10'} + dev: true + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -6051,6 +6678,7 @@ packages: /escodegen/2.0.0: resolution: {integrity: sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==} engines: {node: '>=6.0'} + hasBin: true dependencies: esprima: 4.0.1 estraverse: 5.3.0 @@ -6058,7 +6686,20 @@ packages: optionator: 0.8.3 optionalDependencies: source-map: 0.6.1 - dev: false + + /eslint-formatter-pretty/4.1.0: + resolution: {integrity: sha512-IsUTtGxF1hrH6lMWiSl1WbGaiP01eT6kzywdY1U+zLc0MP+nwEnUiS9UI8IaOTUhTeQJLlCEWIbXINBH4YJbBQ==} + engines: {node: '>=10'} + dependencies: + '@types/eslint': 7.29.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + eslint-rule-docs: 1.1.235 + log-symbols: 4.1.0 + plur: 4.0.0 + string-width: 4.2.3 + supports-hyperlinks: 2.3.0 + dev: true /eslint-import-resolver-node/0.3.7: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} @@ -6212,6 +6853,10 @@ packages: - supports-color dev: true + /eslint-rule-docs/1.1.235: + resolution: {integrity: sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==} + dev: true + /eslint-scope/5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -6248,6 +6893,16 @@ packages: eslint-visitor-keys: 2.1.0 dev: true + /eslint-utils/3.0.0_eslint@8.6.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.6.0 + eslint-visitor-keys: 2.1.0 + dev: true + /eslint-visitor-keys/2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} @@ -6354,6 +7009,53 @@ packages: - supports-color dev: true + /eslint/8.6.0: + resolution: {integrity: sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.4.1 + '@humanwhocodes/config-array': 0.9.5 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + enquirer: 2.3.6 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.6.0 + eslint-visitor-keys: 3.3.0 + espree: 9.4.1 + esquery: 1.4.2 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 6.0.2 + globals: 13.19.0 + ignore: 4.0.6 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.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.1 + progress: 2.0.3 + regexpp: 3.2.0 + semver: 7.3.8 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - supports-color + dev: true + /espree/9.4.1: resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6545,15 +7247,14 @@ packages: homedir-polyfill: 1.0.3 dev: false - /expect/29.3.1: - resolution: {integrity: sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /expect/27.5.1: + resolution: {integrity: sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/expect-utils': 29.3.1 - jest-get-type: 29.2.0 - jest-matcher-utils: 29.3.1 - jest-message-util: 29.3.1 - jest-util: 29.5.0 + '@jest/types': 27.5.1 + jest-get-type: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 dev: true /expect/29.5.0: @@ -7009,7 +7710,6 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: false /form-data/4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -7045,6 +7745,15 @@ packages: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: false + /fs-extra/7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + /fs-extra/8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -7119,6 +7828,10 @@ packages: functions-have-names: 1.2.3 dev: true + /functional-red-black-tree/1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + dev: true + /functions-have-names/1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true @@ -7559,6 +8272,11 @@ packages: har-schema: 2.0.0 dev: false + /hard-rejection/2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: true + /has-ansi/2.0.0: resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} engines: {node: '>=0.10.0'} @@ -7666,7 +8384,13 @@ packages: /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: false + + /hosted-git-info/4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + dependencies: + lru-cache: 6.0.0 + dev: true /hpagent/1.2.0: resolution: {integrity: sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==} @@ -7677,6 +8401,13 @@ packages: resolution: {integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==} dev: false + /html-encoding-sniffer/2.0.1: + resolution: {integrity: sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==} + engines: {node: '>=10'} + dependencies: + whatwg-encoding: 1.0.5 + dev: true + /html-encoding-sniffer/3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -7715,6 +8446,17 @@ packages: toidentifier: 1.0.1 dev: false + /http-proxy-agent/4.0.1: + resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==} + engines: {node: '>= 6'} + dependencies: + '@tootallnate/once': 1.1.2 + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /http-proxy-agent/5.0.0: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} @@ -7786,7 +8528,6 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color - dev: false /human-signals/1.1.1: resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} @@ -7813,7 +8554,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: false /iconv-lite/0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} @@ -7834,6 +8574,11 @@ packages: /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + /ignore/4.0.6: + resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} + engines: {node: '>= 4'} + dev: true + /ignore/5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -7849,6 +8594,11 @@ packages: resolve-from: 4.0.0 dev: true + /import-lazy/4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + dev: true + /import-local/3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} @@ -7997,6 +8747,11 @@ packages: engines: {node: '>= 10'} dev: false + /irregular-plurals/3.5.0: + resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} + engines: {node: '>=8'} + dev: true + /is-absolute-url/2.1.0: resolution: {integrity: sha512-vOx7VprsKyllwjSkLV79NIhpyLfr3jAp7VaTCMXOJHu4m0Ew1CZ2fcjASwmV1jI3BWuWHB013M48eyeldk9gYg==} engines: {node: '>=0.10.0'} @@ -8257,7 +9012,6 @@ packages: /is-plain-obj/1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} - dev: false /is-plain-object/2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} @@ -8273,7 +9027,6 @@ packages: /is-potential-custom-element-name/1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: false /is-promise/2.2.2: resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} @@ -8501,6 +9254,15 @@ packages: minimatch: 3.1.2 dev: false + /jest-changed-files/27.5.1: + resolution: {integrity: sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + execa: 5.1.1 + throat: 6.0.2 + dev: true + /jest-changed-files/29.5.0: resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8509,6 +9271,33 @@ packages: p-limit: 3.1.0 dev: true + /jest-circus/27.5.1: + resolution: {integrity: sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + co: 4.6.0 + dedent: 0.7.0 + expect: 27.5.1 + is-generator-fn: 2.1.0 + jest-each: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 + slash: 3.0.0 + stack-utils: 2.0.6 + throat: 6.0.2 + transitivePeerDependencies: + - supports-color + dev: true + /jest-circus/29.5.0: resolution: {integrity: sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8537,6 +9326,36 @@ packages: - supports-color dev: true + /jest-cli/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 27.5.1_ts-node@10.4.0 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.10 + import-local: 3.1.0 + jest-config: 27.5.1_ts-node@10.4.0 + jest-util: 27.5.1 + jest-validate: 27.5.1 + prompts: 2.4.2 + yargs: 16.2.0 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - ts-node + - utf-8-validate + dev: true + /jest-cli/29.5.0_@types+node@18.15.0: resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8565,6 +9384,47 @@ packages: - ts-node dev: true + /jest-config/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + peerDependencies: + ts-node: '>=9.0.0' + peerDependenciesMeta: + ts-node: + optional: true + dependencies: + '@babel/core': 7.20.12 + '@jest/test-sequencer': 27.5.1 + '@jest/types': 27.5.1 + babel-jest: 27.5.1_@babel+core@7.20.12 + chalk: 4.1.2 + ci-info: 3.7.1 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 27.5.1 + jest-environment-jsdom: 27.5.1 + jest-environment-node: 27.5.1 + jest-get-type: 27.5.1 + jest-jasmine2: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-runner: 27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 27.5.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.4.0_xligbvpzvsssqrtb3cgxhg5blm + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + /jest-config/29.5.0_@types+node@18.15.0: resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8604,6 +9464,26 @@ packages: - supports-color dev: true + /jest-diff/27.5.1: + resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 + dev: true + + /jest-diff/28.1.3: + resolution: {integrity: sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 28.1.1 + jest-get-type: 28.0.2 + pretty-format: 28.1.3 + dev: true + /jest-diff/29.5.0: resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8614,6 +9494,13 @@ packages: pretty-format: 29.5.0 dev: true + /jest-docblock/27.5.1: + resolution: {integrity: sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + detect-newline: 3.1.0 + dev: true + /jest-docblock/29.4.3: resolution: {integrity: sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8621,6 +9508,17 @@ packages: detect-newline: 3.1.0 dev: true + /jest-each/27.5.1: + resolution: {integrity: sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + chalk: 4.1.2 + jest-get-type: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 + dev: true + /jest-each/29.5.0: resolution: {integrity: sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8632,6 +9530,36 @@ packages: pretty-format: 29.5.0 dev: true + /jest-environment-jsdom/27.5.1: + resolution: {integrity: sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + jest-mock: 27.5.1 + jest-util: 27.5.1 + jsdom: 16.7.0 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + + /jest-environment-node/27.5.1: + resolution: {integrity: sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + jest-mock: 27.5.1 + jest-util: 27.5.1 + dev: true + /jest-environment-node/29.5.0: resolution: {integrity: sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8644,9 +9572,23 @@ packages: jest-util: 29.5.0 dev: true - /jest-get-type/29.2.0: - resolution: {integrity: sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /jest-fetch-mock/3.0.3: + resolution: {integrity: sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw==} + dependencies: + cross-fetch: 3.1.5 + promise-polyfill: 8.3.0 + transitivePeerDependencies: + - encoding + dev: true + + /jest-get-type/27.5.1: + resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + + /jest-get-type/28.0.2: + resolution: {integrity: sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dev: true /jest-get-type/29.4.3: @@ -8654,6 +9596,26 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /jest-haste-map/27.5.1: + resolution: {integrity: sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + '@types/graceful-fs': 4.1.6 + '@types/node': 18.15.0 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.10 + jest-regex-util: 27.5.1 + jest-serializer: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 + micromatch: 4.0.5 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /jest-haste-map/29.5.0: resolution: {integrity: sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8673,6 +9635,39 @@ packages: fsevents: 2.3.2 dev: true + /jest-jasmine2/27.5.1: + resolution: {integrity: sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/source-map': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + co: 4.6.0 + expect: 27.5.1 + is-generator-fn: 2.1.0 + jest-each: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 + throat: 6.0.2 + transitivePeerDependencies: + - supports-color + dev: true + + /jest-leak-detector/27.5.1: + resolution: {integrity: sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + jest-get-type: 27.5.1 + pretty-format: 27.5.1 + dev: true + /jest-leak-detector/29.5.0: resolution: {integrity: sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8681,14 +9676,14 @@ packages: pretty-format: 29.5.0 dev: true - /jest-matcher-utils/29.3.1: - resolution: {integrity: sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /jest-matcher-utils/27.5.1: + resolution: {integrity: sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 + jest-diff: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true /jest-matcher-utils/29.5.0: @@ -8701,17 +9696,17 @@ packages: pretty-format: 29.5.0 dev: true - /jest-message-util/29.3.1: - resolution: {integrity: sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /jest-message-util/27.5.1: + resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@babel/code-frame': 7.18.6 - '@jest/types': 29.5.0 + '@jest/types': 27.5.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.10 micromatch: 4.0.5 - pretty-format: 29.5.0 + pretty-format: 27.5.1 slash: 3.0.0 stack-utils: 2.0.6 dev: true @@ -8731,15 +9726,35 @@ packages: stack-utils: 2.0.6 dev: true + /jest-mock/27.5.1: + resolution: {integrity: sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + dev: true + /jest-mock/29.5.0: resolution: {integrity: sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.15.0 + '@types/node': 17.0.5 jest-util: 29.5.0 dev: true + /jest-pnp-resolver/1.2.3_jest-resolve@27.5.1: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + dependencies: + jest-resolve: 27.5.1 + dev: true + /jest-pnp-resolver/1.2.3_jest-resolve@29.5.0: resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} engines: {node: '>=6'} @@ -8752,11 +9767,27 @@ packages: jest-resolve: 29.5.0 dev: true + /jest-regex-util/27.5.1: + resolution: {integrity: sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + /jest-regex-util/29.4.3: resolution: {integrity: sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /jest-resolve-dependencies/27.5.1: + resolution: {integrity: sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + jest-regex-util: 27.5.1 + jest-snapshot: 27.5.1 + transitivePeerDependencies: + - supports-color + dev: true + /jest-resolve-dependencies/29.5.0: resolution: {integrity: sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8767,6 +9798,22 @@ packages: - supports-color dev: true + /jest-resolve/27.5.1: + resolution: {integrity: sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + chalk: 4.1.2 + graceful-fs: 4.2.10 + jest-haste-map: 27.5.1 + jest-pnp-resolver: 1.2.3_jest-resolve@27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 + resolve: 1.22.1 + resolve.exports: 1.1.1 + slash: 3.0.0 + dev: true + /jest-resolve/29.5.0: resolution: {integrity: sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8782,6 +9829,38 @@ packages: slash: 3.0.0 dev: true + /jest-runner/27.5.1: + resolution: {integrity: sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/console': 27.5.1 + '@jest/environment': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + emittery: 0.8.1 + graceful-fs: 4.2.10 + jest-docblock: 27.5.1 + jest-environment-jsdom: 27.5.1 + jest-environment-node: 27.5.1 + jest-haste-map: 27.5.1 + jest-leak-detector: 27.5.1 + jest-message-util: 27.5.1 + jest-resolve: 27.5.1 + jest-runtime: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 + source-map-support: 0.5.21 + throat: 6.0.2 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + /jest-runner/29.5.0: resolution: {integrity: sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8811,6 +9890,36 @@ packages: - supports-color dev: true + /jest-runtime/27.5.1: + resolution: {integrity: sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/globals': 27.5.1 + '@jest/source-map': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + chalk: 4.1.2 + cjs-module-lexer: 1.2.2 + collect-v8-coverage: 1.0.1 + execa: 5.1.1 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-haste-map: 27.5.1 + jest-message-util: 27.5.1 + jest-mock: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /jest-runtime/29.5.0: resolution: {integrity: sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8841,6 +9950,44 @@ packages: - supports-color dev: true + /jest-serializer/27.5.1: + resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@types/node': 18.15.0 + graceful-fs: 4.2.10 + dev: true + + /jest-snapshot/27.5.1: + resolution: {integrity: sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@babel/core': 7.20.12 + '@babel/generator': 7.20.7 + '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.20.12 + '@babel/traverse': 7.20.12 + '@babel/types': 7.20.7 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/babel__traverse': 7.18.3 + '@types/prettier': 2.7.2 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.20.12 + chalk: 4.1.2 + expect: 27.5.1 + graceful-fs: 4.2.10 + jest-diff: 27.5.1 + jest-get-type: 27.5.1 + jest-haste-map: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-util: 27.5.1 + natural-compare: 1.4.0 + pretty-format: 27.5.1 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + dev: true + /jest-snapshot/29.5.0: resolution: {integrity: sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8872,6 +10019,18 @@ packages: - supports-color dev: true + /jest-util/27.5.1: + resolution: {integrity: sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + chalk: 4.1.2 + ci-info: 3.7.1 + graceful-fs: 4.2.10 + picomatch: 2.3.1 + dev: true + /jest-util/29.5.0: resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8884,6 +10043,18 @@ packages: picomatch: 2.3.1 dev: true + /jest-validate/27.5.1: + resolution: {integrity: sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/types': 27.5.1 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 27.5.1 + leven: 3.1.0 + pretty-format: 27.5.1 + dev: true + /jest-validate/29.5.0: resolution: {integrity: sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8896,6 +10067,19 @@ packages: pretty-format: 29.5.0 dev: true + /jest-watcher/27.5.1: + resolution: {integrity: sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 18.15.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + jest-util: 27.5.1 + string-length: 4.0.2 + dev: true + /jest-watcher/29.5.0: resolution: {integrity: sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8910,6 +10094,22 @@ packages: string-length: 4.0.2 dev: true + /jest-websocket-mock/2.4.0: + resolution: {integrity: sha512-AOwyuRw6fgROXHxMOiTDl1/T4dh3fV4jDquha5N0csS/PNp742HeTZWPAuKppVRSQ8s3fUGgJHoyZT9JDO0hMA==} + dependencies: + jest-diff: 28.1.3 + mock-socket: 9.2.1 + dev: true + + /jest-worker/27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + dependencies: + '@types/node': 18.15.0 + merge-stream: 2.0.0 + supports-color: 8.1.1 + dev: true + /jest-worker/29.5.0: resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8920,6 +10120,27 @@ packages: supports-color: 8.1.1 dev: true + /jest/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 27.5.1_ts-node@10.4.0 + import-local: 3.1.0 + jest-cli: 27.5.1_ts-node@10.4.0 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - ts-node + - utf-8-validate + dev: true + /jest/29.5.0_@types+node@18.15.0: resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8940,6 +10161,10 @@ packages: - ts-node dev: true + /jju/1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + dev: true + /jmespath/0.16.0: resolution: {integrity: sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==} engines: {node: '>= 0.6.0'} @@ -9023,6 +10248,48 @@ packages: engines: {node: '>=0.1.90'} dev: false + /jsdom/16.7.0: + resolution: {integrity: sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==} + engines: {node: '>=10'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + dependencies: + abab: 2.0.6 + acorn: 8.8.2 + acorn-globals: 6.0.0 + cssom: 0.4.4 + cssstyle: 2.3.0 + data-urls: 2.0.0 + decimal.js: 10.4.2 + domexception: 2.0.1 + escodegen: 2.0.0 + form-data: 3.0.1 + html-encoding-sniffer: 2.0.1 + http-proxy-agent: 4.0.1 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.2 + parse5: 6.0.1 + saxes: 5.0.1 + symbol-tree: 3.2.4 + tough-cookie: 4.1.2 + w3c-hr-time: 1.0.2 + w3c-xmlserializer: 2.0.0 + webidl-conversions: 6.1.0 + whatwg-encoding: 1.0.5 + whatwg-mimetype: 2.3.0 + whatwg-url: 8.7.0 + ws: 7.5.9 + xml-name-validator: 3.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + /jsdom/21.1.0: resolution: {integrity: sha512-m0lzlP7qOtthD918nenK3hdItSd2I+V3W9IrBcB36sqDwG+KnUs66IF5GY7laGWUnlM9vTsD0W1QwSEBYWWcJg==} engines: {node: '>=14'} @@ -9096,6 +10363,7 @@ packages: /json5/1.0.1: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} + hasBin: true dependencies: minimist: 1.2.7 dev: true @@ -9103,6 +10371,7 @@ packages: /json5/2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} + hasBin: true /jsonc-parser/3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} @@ -9112,7 +10381,6 @@ packages: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.10 - dev: false /jsonfile/5.0.0: resolution: {integrity: sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==} @@ -9224,7 +10492,6 @@ packages: /kind-of/6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - dev: false /kleur/3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} @@ -9296,7 +10563,6 @@ packages: dependencies: prelude-ls: 1.1.2 type-check: 0.3.2 - dev: false /levn/0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} @@ -9402,16 +10668,23 @@ packages: resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} dev: false + /lodash.get/4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + dev: true + /lodash.isarguments/3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} + /lodash.isequal/4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + dev: true + /lodash.isplainobject/4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} dev: false /lodash.memoize/4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: false /lodash.merge/4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -9516,6 +10789,10 @@ packages: dependencies: semver: 6.3.0 + /make-error/1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + /make-fetch-happen/10.2.1: resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -9559,6 +10836,16 @@ packages: engines: {node: '>=0.10.0'} dev: false + /map-obj/1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: true + + /map-obj/4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: true + /map-stream/0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} dev: true @@ -9590,6 +10877,24 @@ packages: resolution: {integrity: sha512-v2huwvQGOHTGOkMqtHd2hercCG3f6QAObTisPPHg8TZqq2lz7eIY/5i/5YUV8Ibf3mEioFEmwibcPUF2/fnKKQ==} dev: false + /meow/9.0.0: + resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} + engines: {node: '>=10'} + dependencies: + '@types/minimist': 1.2.2 + camelcase-keys: 6.2.2 + decamelize: 1.2.0 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 3.0.3 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.18.1 + yargs-parser: 20.2.9 + dev: true + /merge-stream/2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -9670,6 +10975,11 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false + /min-indent/1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + /minimalistic-assert/1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} dev: false @@ -9692,6 +11002,15 @@ packages: brace-expansion: 2.0.1 dev: true + /minimist-options/4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: true + /minimist/1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} @@ -9771,14 +11090,6 @@ packages: yallist: 4.0.0 dev: false - /misskey-js/0.0.15: - resolution: {integrity: sha512-sCfQcPooD5Tfe/5pDr5JojAthhGot+hlidw67tj+7+AtZO5He3kBhsjJydY0vru6w3RFM5mzYR6SYISSBR/1WQ==} - dependencies: - autobind-decorator: 2.4.0 - eventemitter3: 4.0.7 - reconnecting-websocket: 4.4.0 - dev: false - /mixin-deep/1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} @@ -9817,6 +11128,11 @@ packages: obliterator: 2.0.4 dev: false + /mock-socket/9.2.1: + resolution: {integrity: sha512-aw9F9T9G2zpGipLLhSNh6ZpgUyUl4frcVmRN08uE1NWPWg43Wx6+sGPDbQ7E5iFZZDJW5b5bypMeAEHqTbIFag==} + engines: {node: '>= 8'} + dev: true + /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: false @@ -10078,7 +11394,16 @@ packages: resolve: 1.22.1 semver: 5.7.1 validate-npm-package-license: 3.0.4 - dev: false + + /normalize-package-data/3.0.3: + resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} + engines: {node: '>=10'} + dependencies: + hosted-git-info: 4.1.0 + is-core-module: 2.11.0 + semver: 7.3.8 + validate-npm-package-license: 3.0.4 + dev: true /normalize-path/2.1.1: resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} @@ -10188,7 +11513,6 @@ packages: /nwsapi/2.2.2: resolution: {integrity: sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==} - dev: false /oauth-sign/0.9.0: resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} @@ -10338,7 +11662,6 @@ packages: prelude-ls: 1.1.2 type-check: 0.3.2 word-wrap: 1.2.3 - dev: false /optionator/0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} @@ -10539,7 +11862,6 @@ packages: /parse5/6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - dev: false /parse5/7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -10792,6 +12114,13 @@ packages: extend-shallow: 3.0.2 dev: false + /plur/4.0.0: + resolution: {integrity: sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==} + engines: {node: '>=10'} + dependencies: + irregular-plurals: 3.5.0 + dev: true + /pngjs-nozlib/1.0.0: resolution: {integrity: sha512-N1PggqLp9xDqwAoKvGohmZ3m4/N9xpY0nDZivFqQLcpLHmliHnCp9BuNCsOeqHWMuEEgFjpEaq9dZq6RZyy0fA==} engines: {iojs: '>= 1.0.0', node: '>=0.10.0'} @@ -11078,7 +12407,6 @@ packages: /prelude-ls/1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} - dev: false /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -11104,11 +12432,12 @@ packages: react-is: 17.0.2 dev: true - /pretty-format/29.3.1: - resolution: {integrity: sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /pretty-format/28.1.3: + resolution: {integrity: sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/schemas': 29.4.2 + '@jest/schemas': 28.1.3 + ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -11176,8 +12505,6 @@ packages: /progress/2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} - dev: false - optional: true /promise-inflight/1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} @@ -11192,6 +12519,10 @@ packages: resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==} dev: false + /promise-polyfill/8.3.0: + resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} + dev: true + /promise-retry/2.0.1: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} @@ -11424,7 +12755,6 @@ packages: /querystringify/2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: false /queue-lit/1.5.0: resolution: {integrity: sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA==} @@ -11437,6 +12767,11 @@ packages: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} dev: false + /quick-lru/4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: true + /quick-lru/5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} @@ -11505,6 +12840,15 @@ packages: read-pkg: 1.1.0 dev: false + /read-pkg-up/7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + /read-pkg/1.1.0: resolution: {integrity: sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==} engines: {node: '>=0.10.0'} @@ -11514,6 +12858,16 @@ packages: path-type: 1.1.0 dev: false + /read-pkg/5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + /readable-stream/1.1.14: resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} dependencies: @@ -11589,6 +12943,14 @@ packages: resolution: {integrity: sha512-D2E33ceRPga0NvTDhJmphEgJ7FUYF0v4lr1ki0csq06OdlxKfugGzN0dSkxM/NfqCxYELK4KcaTOUOjTV6Dcng==} dev: false + /redent/3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + dev: true + /redis-commands/1.7.0: resolution: {integrity: sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==} dev: false @@ -11780,7 +13142,6 @@ packages: /requires-port/1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: false /resolve-alpn/1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} @@ -11822,13 +13183,26 @@ packages: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} dev: false + /resolve.exports/1.1.1: + resolution: {integrity: sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==} + engines: {node: '>=10'} + dev: true + /resolve.exports/2.0.0: resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==} engines: {node: '>=10'} dev: true + /resolve/1.19.0: + resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} + dependencies: + is-core-module: 2.11.0 + path-parse: 1.0.7 + dev: true + /resolve/1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + hasBin: true dependencies: is-core-module: 2.11.0 path-parse: 1.0.7 @@ -11879,6 +13253,7 @@ packages: /rimraf/2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true dependencies: glob: 7.2.3 dev: false @@ -11990,6 +13365,13 @@ packages: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} dev: false + /saxes/5.0.1: + resolution: {integrity: sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==} + engines: {node: '>=10'} + dependencies: + xmlchars: 2.2.0 + dev: true + /saxes/6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -12039,6 +13421,7 @@ packages: /semver/7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} + hasBin: true dependencies: lru-cache: 6.0.0 @@ -12294,7 +13677,6 @@ packages: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - dev: false /source-map-url/0.4.1: resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} @@ -12312,7 +13694,6 @@ packages: /source-map/0.7.4: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - dev: false /sourcemap-codec/1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} @@ -12327,22 +13708,18 @@ packages: dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.12 - dev: false /spdx-exceptions/2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: false /spdx-expression-parse/3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.12 - dev: false /spdx-license-ids/3.0.12: resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} - dev: false /split-string/3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} @@ -12489,6 +13866,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /string-argv/0.3.1: + resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} + engines: {node: '>=0.6.19'} + dev: true + /string-length/4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -12611,6 +13993,13 @@ packages: engines: {node: '>=12'} dev: true + /strip-indent/3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-json-comments/2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -12676,6 +14065,14 @@ packages: has-flag: 4.0.0 dev: true + /supports-hyperlinks/2.3.0: + resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + dev: true + /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -12702,7 +14099,6 @@ packages: /symbol-tree/3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: false /systeminformation/5.17.12: resolution: {integrity: sha512-I3pfMW2vue53u+X08BNxaJieaHkRoMMKjWetY9lbYJeWFaeWPO6P4FkNc4XOCX8F9vbQ0HqQ25RJoz3U/B7liw==} @@ -12761,6 +14157,14 @@ packages: yallist: 4.0.0 dev: false + /terminal-link/2.1.1: + resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} + engines: {node: '>=8'} + dependencies: + ansi-escapes: 4.3.2 + supports-hyperlinks: 2.3.0 + dev: true + /terser/5.16.1: resolution: {integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==} engines: {node: '>=10'} @@ -12820,6 +14224,10 @@ packages: resolution: {integrity: sha512-5C1MqKUWaHYo13BX0Q64qcdwImgnnjSOFgBscOzAo8MYCzEtqfQqorEKMcajnA3FHy1yVlIe9AmaMQ0OQracNA==} dev: false + /throat/6.0.2: + resolution: {integrity: sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==} + dev: true + /throttle-debounce/5.0.0: resolution: {integrity: sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==} engines: {node: '>=12.22'} @@ -12980,11 +14388,17 @@ packages: punycode: 2.3.0 universalify: 0.2.0 url-parse: 1.5.10 - dev: false /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + /tr46/2.1.0: + resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==} + engines: {node: '>=8'} + dependencies: + punycode: 2.3.0 + dev: true + /tr46/3.0.0: resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} engines: {node: '>=12'} @@ -13000,6 +14414,11 @@ packages: resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} dev: false + /trim-newlines/3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: true + /trim-repeated/2.0.0: resolution: {integrity: sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==} engines: {node: '>=12'} @@ -13007,6 +14426,70 @@ packages: escape-string-regexp: 5.0.0 dev: false + /ts-jest/27.1.5_mg2qigfcunrfdyaizjx2my6gv4: + resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@types/jest': ^27.0.0 + babel-jest: '>=27.0.0 <28' + esbuild: '*' + jest: ^27.0.0 + typescript: '>=3.8 <5.0' + peerDependenciesMeta: + '@babel/core': + optional: true + '@types/jest': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + dependencies: + '@types/jest': 27.5.2 + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 27.5.1_ts-node@10.4.0 + jest-util: 27.5.1 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.3.8 + typescript: 4.5.4 + yargs-parser: 20.2.9 + dev: true + + /ts-node/10.4.0_xligbvpzvsssqrtb3cgxhg5blm: + resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.7.0 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 17.0.5 + acorn: 8.8.2 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.5.4 + yn: 3.1.1 + dev: true + /tsc-alias/1.8.3: resolution: {integrity: sha512-/9JARcmXBrEqSuLjdSOqxY7/xI/AnvmBi4CU9/Ba2oX6Oq8vnd0OGSQTk+PIwqWJ5ZxskV0X/x15yzxCNTHU+g==} hasBin: true @@ -13037,6 +14520,19 @@ packages: strip-bom: 3.0.0 dev: false + /tsd/0.19.1: + resolution: {integrity: sha512-pSwchclr+ADdxlahRUQXUrdAIOjXx1T1PQV+fLfVLuo/S4z+T00YU84fH8iPlZxyA2pWgJjo42BG1p9SDb4NOw==} + engines: {node: '>=12'} + hasBin: true + dependencies: + '@tsd/typescript': 4.5.5 + eslint-formatter-pretty: 4.1.0 + globby: 11.1.0 + meow: 9.0.0 + path-exists: 4.0.0 + read-pkg-up: 7.0.1 + dev: true + /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -13048,6 +14544,16 @@ packages: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} dev: false + /tsutils/3.21.0_typescript@4.5.4: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.5.4 + dev: true + /tsutils/3.21.0_typescript@4.9.5: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -13075,7 +14581,6 @@ packages: engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.1.2 - dev: false /type-check/0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -13088,6 +14593,11 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + /type-fest/0.18.1: + resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} + engines: {node: '>=10'} + dev: true + /type-fest/0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -13098,6 +14608,16 @@ packages: engines: {node: '>=10'} dev: true + /type-fest/0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest/0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + /type/1.2.0: resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==} dev: false @@ -13110,7 +14630,6 @@ packages: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: is-typedarray: 1.0.0 - dev: false /typedarray/0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} @@ -13197,6 +14716,18 @@ packages: - supports-color dev: false + /typescript/4.5.4: + resolution: {integrity: sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typescript/4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} @@ -13300,12 +14831,10 @@ packages: /universalify/0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - dev: false /universalify/0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - dev: false /universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} @@ -13369,7 +14898,6 @@ packages: dependencies: querystringify: 2.2.0 requires-port: 1.0.0 - dev: false /url-polyfill/1.1.12: resolution: {integrity: sha512-mYFmBHCapZjtcNHW0MDq9967t+z4Dmg5CJ0KqysK3+ZbyoNOWQHksGCTWwDhxGXllkWlOc10Xfko6v4a3ucM6A==} @@ -13430,6 +14958,19 @@ packages: resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} dev: false + /v8-compile-cache/2.3.0: + resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} + dev: true + + /v8-to-istanbul/8.1.1: + resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==} + engines: {node: '>=10.12.0'} + dependencies: + '@types/istanbul-lib-coverage': 2.0.4 + convert-source-map: 1.9.0 + source-map: 0.7.4 + dev: true + /v8-to-istanbul/9.0.1: resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} engines: {node: '>=10.12.0'} @@ -13451,7 +14992,11 @@ packages: dependencies: spdx-correct: 3.1.1 spdx-expression-parse: 3.0.1 - dev: false + + /validator/13.9.0: + resolution: {integrity: sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==} + engines: {node: '>= 0.10'} + dev: true /value-or-function/3.0.0: resolution: {integrity: sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==} @@ -13726,6 +15271,20 @@ packages: vue: 3.2.47 dev: false + /w3c-hr-time/1.0.2: + resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} + deprecated: Use your platform's native performance.now() and performance.timeOrigin. + dependencies: + browser-process-hrtime: 1.0.0 + dev: true + + /w3c-xmlserializer/2.0.0: + resolution: {integrity: sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==} + engines: {node: '>=10'} + dependencies: + xml-name-validator: 3.0.0 + dev: true + /w3c-xmlserializer/4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -13774,6 +15333,16 @@ packages: /webidl-conversions/3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + /webidl-conversions/5.0.0: + resolution: {integrity: sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==} + engines: {node: '>=8'} + dev: true + + /webidl-conversions/6.1.0: + resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==} + engines: {node: '>=10.4'} + dev: true + /webidl-conversions/7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} @@ -13792,12 +15361,22 @@ packages: - supports-color dev: false + /whatwg-encoding/1.0.5: + resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==} + dependencies: + iconv-lite: 0.4.24 + dev: true + /whatwg-encoding/2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} dependencies: iconv-lite: 0.6.3 + /whatwg-mimetype/2.3.0: + resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==} + dev: true + /whatwg-mimetype/3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} @@ -13816,6 +15395,15 @@ packages: tr46: 0.0.3 webidl-conversions: 3.0.1 + /whatwg-url/8.7.0: + resolution: {integrity: sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==} + engines: {node: '>=10'} + dependencies: + lodash: 4.17.21 + tr46: 2.1.0 + webidl-conversions: 6.1.0 + dev: true + /whet.extend/0.9.9: resolution: {integrity: sha512-mmIPAft2vTgEILgPeZFqE/wWh24SEsR/k+N9fJ3Jxrz44iDFy9aemCxdksfURSHYFCLmvs/d/7Iso5XjPpNfrA==} engines: {node: '>=0.6.0'} @@ -13929,6 +15517,15 @@ packages: /wrappy/1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + /write-file-atomic/3.0.3: + resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} + dependencies: + imurmurhash: 0.1.4 + is-typedarray: 1.0.0 + signal-exit: 3.0.7 + typedarray-to-buffer: 3.1.5 + dev: true + /write-file-atomic/4.0.2: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -13937,6 +15534,19 @@ packages: signal-exit: 3.0.7 dev: true + /ws/7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /ws/8.12.1: resolution: {integrity: sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==} engines: {node: '>=10.0.0'} @@ -13960,6 +15570,10 @@ packages: sax: 1.2.4 dev: false + /xml-name-validator/3.0.0: + resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==} + dev: true + /xml-name-validator/4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} @@ -13991,7 +15605,6 @@ packages: /xmlchars/2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: false /xtend/4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} @@ -14112,6 +15725,11 @@ packages: fd-slicer: 1.1.0 dev: true + /yn/3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -14121,6 +15739,18 @@ packages: engines: {node: '>=12.20'} dev: true + /z-schema/5.0.5: + resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + lodash.get: 4.4.2 + lodash.isequal: 4.5.0 + validator: 13.9.0 + optionalDependencies: + commander: 9.5.0 + dev: true + /zip-stream/4.1.0: resolution: {integrity: sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==} engines: {node: '>= 10'} @@ -14146,10 +15776,10 @@ packages: sharp: 0.31.3 dev: false - github.com/misskey-dev/summaly/028b2fed2fd4f5ea7b6a8d55024825c815434f7d: - resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/028b2fed2fd4f5ea7b6a8d55024825c815434f7d} + github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992: + resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992} name: summaly - version: 4.0.0 + version: 4.0.1 dependencies: cheerio: 1.0.0-rc.12 escape-regexp: 0.0.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 334ff382e..ead1764a5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,3 +2,4 @@ packages: - 'packages/backend' - 'packages/frontend' - 'packages/sw' + - 'packages/misskey-js'