diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index dbda93fe..33632a3f 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -13,12 +13,12 @@ name: "CodeQL"
on:
push:
- branches: [ main ]
+ branches: [main]
pull_request:
# The branches below must be a subset of the branches above
- branches: [ main ]
+ branches: [main]
schedule:
- - cron: '40 21 * * 6'
+ - cron: "40 21 * * 6"
jobs:
analyze:
@@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'javascript' ]
+ language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- - name: Checkout repository
- uses: actions/checkout@v2
+ - name: Checkout repository
+ uses: actions/checkout@v2
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
- # âšī¸ Command-line programs to run using the OS shell.
- # đ https://git.io/JvXDl
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ https://git.io/JvXDl
- # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
+ # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
- #- run: |
- # make bootstrap
- # make release
+ #- run: |
+ # make bootstrap
+ # make release
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 8d4d4e1a..1cfa2cdc 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -8,22 +8,14 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository and submodules
+ - name: Checkout repository
uses: actions/checkout@v3
+ - name: Setup Deno 2.x
+ uses: denoland/setup-deno@v2
with:
- submodules: recursive
- - uses: pnpm/action-setup@v4.0.0
- - name: Use Node.js LTS
- uses: actions/setup-node@v3
- with:
- node-version: 22
- cache: "pnpm"
- - name: Install packages
- run: pnpm install
-
+ deno-version: 2.x
- name: Build
- run: pnpm run docs
-
+ run: deno task docs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 2fa1595b..5253ade5 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -10,22 +10,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository and submodules
+ - name: Checkout repository
uses: actions/checkout@v3
+ - name: Setup Deno 2.x
+ uses: denoland/setup-deno@v2
with:
- submodules: recursive
- - uses: pnpm/action-setup@v4.0.0
- - name: Use Node.js LTS
- uses: actions/setup-node@v3
- with:
- node-version: 22
- cache: "pnpm"
- - name: Install packages
- run: pnpm install
-
+ deno-version: 2.x
- name: Typecheck
- run: pnpm typecheck
+ run: deno check src/
- name: Code Formatting
- run: pnpm fmt:check
+ run: deno fmt --check
- name: Lint
- run: pnpm lint
+ run: deno lint
diff --git a/.github/workflows/publish.ts b/.github/workflows/publish.ts
new file mode 100644
index 00000000..37c0bfcb
--- /dev/null
+++ b/.github/workflows/publish.ts
@@ -0,0 +1,55 @@
+///
+import { build, emptyDir } from "jsr:@deno/dnt@^0.42.3";
+import pkg from "../../deno.json" with { type: "json" };
+
+await emptyDir("npm");
+
+await build({
+ entryPoints: ["src/index.ts"],
+ esModule: true,
+ outDir: "npm",
+ scriptModule: false,
+ shims: {},
+ skipSourceOutput: true,
+ test: false,
+ package: {
+ name: "revolt.js",
+ version: pkg.version,
+ type: "module",
+ module: "./lib/index.js",
+ types: "./lib/index.d.ts",
+ repository: {
+ type: "git",
+ url: "git+https://github.com/revoltchat/revolt.js.git",
+ },
+ author: "Paul Makles ",
+ license: "MIT",
+ description: "Library for interacting with the Revolt API.",
+ dependencies: Object.fromEntries(
+ Object.values(pkg.imports).map((dep) => {
+ dep = dep.replace("npm:", "");
+
+ const lastAtIndex = dep.lastIndexOf("@");
+ return [dep.slice(0, lastAtIndex), dep.slice(lastAtIndex + 1)];
+ }),
+ ),
+ exports: {
+ ".": {
+ import: "./lib/index.js",
+ },
+ },
+ engines: {
+ node: ">=22.19.0",
+ },
+ },
+ compilerOptions: {
+ lib: ["ES2022", "DOM"],
+ target: "ES2022",
+ },
+ postBuild() {
+ Deno.renameSync("npm/esm", "npm/lib");
+ Deno.removeSync("npm/.npmignore");
+ Deno.copyFileSync("README.md", "npm/README.md");
+ Deno.copyFileSync("LICENSE", "npm/LICENSE");
+ },
+});
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 00000000..43e93a46
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,31 @@
+# publish to jsr and npm on release
+name: Publish
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Setup Deno 2.x
+ uses: denoland/setup-deno@v2
+ with:
+ deno-version: 2.x
+ - name: Setup Node 22.x
+ uses: actions/setup-node@v2
+ with:
+ node-version: 22.x
+ - name: Publish to jsr
+ run: deno publish
+ - name: Build for npm
+ run: deno task npm
+ - name: Publish to npm
+ run: npm publish
diff --git a/.gitignore b/.gitignore
index 0f5ad0f5..220a2c8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,2 @@
-# build
-node_modules
-.env
-docs
-todo
-/lib
-
-# yarn
-.pnp.*
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/sdks
-!.yarn/versions
+/docs
+/npm
diff --git a/.prettierrc b/.prettierrc
deleted file mode 100644
index e9cf7027..00000000
--- a/.prettierrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "tabWidth": 2,
- "useTabs": false,
- "plugins": ["@trivago/prettier-plugin-sort-imports"],
- "importOrder": [
- "^solid",
- "",
- "^\\.\\.",
- "^[./]"
- ],
- "importOrderSeparation": true,
- "importOrderSortSpecifiers": true
-}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index d7df89c9..74baffcc 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,3 +1,3 @@
{
- "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
+ "recommendations": ["denoland.vscode-deno"]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 9bf4d12b..3e5dc4c1 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,7 @@
{
- "editor.defaultFormatter": "esbenp.prettier-vscode",
- "editor.formatOnSave": true
+ "editor.defaultFormatter": "denoland.vscode-deno",
+ "editor.formatOnSave": true,
+ "[github-actions-workflow]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ }
}
diff --git a/README.md b/README.md
index e6d4f146..2e776517 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,17 @@
# revolt.js
- 
+
+
-**revolt.js** is a JavaScript library for interacting with the entire Revolt API.
+**revolt.js** is a JavaScript library for interacting with the entire Revolt
+API.
## Requirements
To use this module, you must be using at least:
-- Node.js v22.15.0 (LTS) in ES module mode
-- **or** Deno v2.2 (LTS)
+- Node.js v22.19.0 (LTS) with ESM
+- Deno v2.2 (LTS)
## Example Usage
@@ -18,8 +20,9 @@ import { Client } from "revolt.js";
let client = new Client();
-client.on("ready", async () =>
- console.info(`Logged in as ${client.user.username}!`),
+client.on(
+ "ready",
+ async () => console.info(`Logged in as ${client.user.username}!`),
);
client.on("messageCreate", async (message) => {
@@ -30,32 +33,3 @@ client.on("messageCreate", async (message) => {
client.loginBot("..");
```
-
-## Reactivity with Signals & Solid.js Primitives
-
-All objects have reactivity built-in and can be dropped straight into any Solid.js project.
-
-```tsx
-const client = new Client();
-// initialise the client
-
-function MyApp() {
- return (
- Your username is: {client.user?.username ?? "[logging in...]"}
- );
-}
-```
-
-## Revolt API Types
-
-> [!WARNING]
-> It is advised you do not use this unless necessary. If you find somewhere that isn't covered by the library, please open an issue as this library aims to transform all objects.
-
-All `revolt-api` types are re-exported from this library under `API`.
-
-```typescript
-import { API } from "revolt.js";
-
-// API.Channel;
-// API.[..];
-```
diff --git a/deno.json b/deno.json
new file mode 100644
index 00000000..a93ce1a0
--- /dev/null
+++ b/deno.json
@@ -0,0 +1,28 @@
+{
+ "name": "@revolt/revoltjs",
+ "version": "7.3.0-rc.1",
+ "exports": "./src/index.ts",
+ "imports": {
+ "@vladfrangu/async_event_emitter": "npm:@vladfrangu/async_event_emitter@^2.4.6",
+ "revolt-api": "npm:revolt-api@0.8.8-2",
+ "ulid": "npm:ulid@^3.0.1"
+ },
+ "tasks": {
+ "docs": "deno run -A npm:typedoc --name revolt.js --readme README.md src/",
+ "npm": "deno run -A .github/workflows/publish.ts"
+ },
+ "fmt": {
+ "indentWidth": 2,
+ "useTabs": false
+ },
+ "lint": {
+ "rules": {
+ "tags": ["recommended", "jsr"]
+ }
+ },
+ "publish": {
+ "exclude": [".github", ".vscode", "tsconfig.json"]
+ },
+ "nodeModulesDir": "none",
+ "lock": false
+}
diff --git a/eslint.config.js b/eslint.config.js
deleted file mode 100644
index de573f89..00000000
--- a/eslint.config.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import eslint from "@eslint/js";
-import prettier from "eslint-plugin-prettier/recommended";
-import solid from "eslint-plugin-solid/configs/typescript";
-import { defineConfig } from "eslint/config";
-import tseslint from "typescript-eslint";
-
-export default defineConfig([
- eslint.configs.recommended,
- tseslint.configs.recommended,
- solid,
- {
- rules: {
- "@typescript-eslint/no-unused-vars": [
- "warn",
- {
- caughtErrors: "all",
- varsIgnorePattern: "^_",
- },
- ],
- },
- },
- prettier,
-]);
diff --git a/package.json b/package.json
deleted file mode 100644
index 9f8550a7..00000000
--- a/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "revolt.js",
- "version": "7.2.0",
- "type": "module",
- "exports": {
- ".": "./lib/index.js"
- },
- "types": "lib/index.d.ts",
- "repository": "https://github.com/revoltchat/revolt.js",
- "author": "Paul Makles ",
- "license": "MIT",
- "scripts": {
- "build": "tsc",
- "build:watch": "tsc-watch --onSuccess \"node .\"",
- "lint": "eslint --ext .ts,.tsx src/",
- "lint:fix": "eslint --fix --ext .ts,.tsx src/",
- "typecheck": "tsc --noEmit",
- "docs": "typedoc --plugin @mxssfd/typedoc-theme --theme my-theme --readme README.md src/",
- "fmt": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
- "fmt:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'"
- },
- "files": [
- "README.md",
- "lib"
- ],
- "description": "Library for interacting with the Revolt API.",
- "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
- "dependencies": {
- "@solid-primitives/map": "^0.7.1",
- "@solid-primitives/set": "^0.7.1",
- "@vladfrangu/async_event_emitter": "^2.4.6",
- "revolt-api": "0.8.8-2",
- "solid-js": "^1.9.6",
- "ulid": "^2.4.0"
- },
- "devDependencies": {
- "@mxssfd/typedoc-theme": "^1.1.7",
- "@trivago/prettier-plugin-sort-imports": "^5.2.2",
- "@types/node": "^22.15.17",
- "eslint": "^9.26.0",
- "eslint-plugin-prettier": "^5.4.0",
- "eslint-plugin-solid": "^0.14.5",
- "prettier": "^3.5.3",
- "typedoc": "^0.27.9",
- "typescript": "^5.8.3",
- "typescript-eslint": "^8.32.0"
- }
-}
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
deleted file mode 100644
index 8bb10c33..00000000
--- a/pnpm-lock.yaml
+++ /dev/null
@@ -1,2153 +0,0 @@
-lockfileVersion: '9.0'
-
-settings:
- autoInstallPeers: true
- excludeLinksFromLockfile: false
-
-importers:
-
- .:
- dependencies:
- '@solid-primitives/map':
- specifier: ^0.7.1
- version: 0.7.1(solid-js@1.9.6)
- '@solid-primitives/set':
- specifier: ^0.7.1
- version: 0.7.1(solid-js@1.9.6)
- '@vladfrangu/async_event_emitter':
- specifier: ^2.4.6
- version: 2.4.6
- revolt-api:
- specifier: 0.8.8-2
- version: 0.8.8-2
- solid-js:
- specifier: ^1.9.6
- version: 1.9.6
- ulid:
- specifier: ^2.4.0
- version: 2.4.0
- devDependencies:
- '@mxssfd/typedoc-theme':
- specifier: ^1.1.7
- version: 1.1.7(typedoc@0.27.9(typescript@5.8.3))
- '@trivago/prettier-plugin-sort-imports':
- specifier: ^5.2.2
- version: 5.2.2(prettier@3.5.3)
- '@types/node':
- specifier: ^22.15.17
- version: 22.15.17
- eslint:
- specifier: ^9.26.0
- version: 9.26.0
- eslint-plugin-prettier:
- specifier: ^5.4.0
- version: 5.4.0(eslint@9.26.0)(prettier@3.5.3)
- eslint-plugin-solid:
- specifier: ^0.14.5
- version: 0.14.5(eslint@9.26.0)(typescript@5.8.3)
- prettier:
- specifier: ^3.5.3
- version: 3.5.3
- typedoc:
- specifier: ^0.27.9
- version: 0.27.9(typescript@5.8.3)
- typescript:
- specifier: ^5.8.3
- version: 5.8.3
- typescript-eslint:
- specifier: ^8.32.0
- version: 8.32.0(eslint@9.26.0)(typescript@5.8.3)
-
-packages:
-
- '@babel/code-frame@7.27.1':
- resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
- engines: {node: '>=6.9.0'}
-
- '@babel/generator@7.27.1':
- resolution: {integrity: sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==}
- engines: {node: '>=6.9.0'}
-
- '@babel/helper-string-parser@7.27.1':
- resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==}
- engines: {node: '>=6.9.0'}
-
- '@babel/helper-validator-identifier@7.27.1':
- resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==}
- engines: {node: '>=6.9.0'}
-
- '@babel/parser@7.27.2':
- resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==}
- engines: {node: '>=6.0.0'}
- hasBin: true
-
- '@babel/template@7.27.2':
- resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==}
- engines: {node: '>=6.9.0'}
-
- '@babel/traverse@7.27.1':
- resolution: {integrity: sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==}
- engines: {node: '>=6.9.0'}
-
- '@babel/types@7.27.1':
- resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==}
- engines: {node: '>=6.9.0'}
-
- '@eslint-community/eslint-utils@4.7.0':
- resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
-
- '@eslint-community/regexpp@4.12.1':
- resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
- engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
-
- '@eslint/config-array@0.20.0':
- resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/config-helpers@0.2.2':
- resolution: {integrity: sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/core@0.13.0':
- resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/eslintrc@3.3.1':
- resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/js@9.26.0':
- resolution: {integrity: sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/object-schema@2.1.6':
- resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@eslint/plugin-kit@0.2.8':
- resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@gerrit0/mini-shiki@1.27.2':
- resolution: {integrity: sha512-GeWyHz8ao2gBiUW4OJnQDxXQnFgZQwwQk05t/CVVgNBN7/rK8XZ7xY6YhLVv9tH3VppWWmr9DCl3MwemB/i+Og==}
-
- '@humanfs/core@0.19.1':
- resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==}
- engines: {node: '>=18.18.0'}
-
- '@humanfs/node@0.16.6':
- resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==}
- engines: {node: '>=18.18.0'}
-
- '@humanwhocodes/module-importer@1.0.1':
- resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
- engines: {node: '>=12.22'}
-
- '@humanwhocodes/retry@0.3.1':
- resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==}
- engines: {node: '>=18.18'}
-
- '@humanwhocodes/retry@0.4.3':
- resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
- engines: {node: '>=18.18'}
-
- '@jridgewell/gen-mapping@0.3.8':
- resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/resolve-uri@3.1.2':
- resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/set-array@1.2.1':
- resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/sourcemap-codec@1.5.0':
- resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
-
- '@jridgewell/trace-mapping@0.3.25':
- resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
-
- '@modelcontextprotocol/sdk@1.11.2':
- resolution: {integrity: sha512-H9vwztj5OAqHg9GockCQC06k1natgcxWQSRpQcPJf6i5+MWBzfKkRtxGbjQf0X2ihii0ffLZCRGbYV2f2bjNCQ==}
- engines: {node: '>=18'}
-
- '@mxssfd/typedoc-theme@1.1.7':
- resolution: {integrity: sha512-dj4p0TjIoudD8j1u+Kf+KzcEc+je3IB/B1oohWcVJmMRfbw5uZYX6qOGHzfUzAPiU1pYe2u5Vo1IPqgLo58taA==}
- engines: {node: '>= 14'}
- peerDependencies:
- typedoc: ^0.26.7
-
- '@nodelib/fs.scandir@2.1.5':
- resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
- engines: {node: '>= 8'}
-
- '@nodelib/fs.stat@2.0.5':
- resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
- engines: {node: '>= 8'}
-
- '@nodelib/fs.walk@1.2.8':
- resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
- engines: {node: '>= 8'}
-
- '@pkgr/core@0.2.4':
- resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==}
- engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
-
- '@shikijs/engine-oniguruma@1.29.2':
- resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==}
-
- '@shikijs/types@1.29.2':
- resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==}
-
- '@shikijs/vscode-textmate@10.0.2':
- resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
-
- '@solid-primitives/map@0.7.1':
- resolution: {integrity: sha512-0Fo5gToY+XPZVQLwzm8dc/3vVLdYLboUJD+kyoW+V64YPHs0qPDEekJuRUV7Mp9uiyHnD1DArfy1CrHAezTDZQ==}
- peerDependencies:
- solid-js: ^1.6.12
-
- '@solid-primitives/set@0.7.1':
- resolution: {integrity: sha512-mB5SfKHnyTlVZGLhh5BDivDemKWtMePNyUX3FIiBisTf7mkJZVFdgiKLO0l+QaOlRKM5+VsRT1pThL5grl2sig==}
- peerDependencies:
- solid-js: ^1.6.12
-
- '@solid-primitives/trigger@1.2.1':
- resolution: {integrity: sha512-pvNmddYs5AYUpiH373F7wbQOlcc10SSNHY8kUiu4UHoDlv4jhSnlNXzbFkmt33hq4ODKdN5gVm00jCnAJ+wm8Q==}
- peerDependencies:
- solid-js: ^1.6.12
-
- '@solid-primitives/utils@6.3.1':
- resolution: {integrity: sha512-4/Z59nnwu4MPR//zWZmZm2yftx24jMqQ8CSd/JobL26TPfbn4Ph8GKNVJfGJWShg1QB98qObJSskqizbTvcLLA==}
- peerDependencies:
- solid-js: ^1.6.12
-
- '@trivago/prettier-plugin-sort-imports@5.2.2':
- resolution: {integrity: sha512-fYDQA9e6yTNmA13TLVSA+WMQRc5Bn/c0EUBditUHNfMMxN7M82c38b1kEggVE3pLpZ0FwkwJkUEKMiOi52JXFA==}
- engines: {node: '>18.12'}
- peerDependencies:
- '@vue/compiler-sfc': 3.x
- prettier: 2.x - 3.x
- prettier-plugin-svelte: 3.x
- svelte: 4.x || 5.x
- peerDependenciesMeta:
- '@vue/compiler-sfc':
- optional: true
- prettier-plugin-svelte:
- optional: true
- svelte:
- optional: true
-
- '@types/estree@1.0.7':
- resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
-
- '@types/hast@3.0.4':
- resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
-
- '@types/json-schema@7.0.15':
- resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
-
- '@types/node@22.15.17':
- resolution: {integrity: sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==}
-
- '@types/unist@3.0.3':
- resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
-
- '@typescript-eslint/eslint-plugin@8.32.0':
- resolution: {integrity: sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
- eslint: ^8.57.0 || ^9.0.0
- typescript: '>=4.8.4 <5.9.0'
-
- '@typescript-eslint/parser@8.32.0':
- resolution: {integrity: sha512-B2MdzyWxCE2+SqiZHAjPphft+/2x2FlO9YBx7eKE1BCb+rqBlQdhtAEhzIEdozHd55DXPmxBdpMygFJjfjjA9A==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- eslint: ^8.57.0 || ^9.0.0
- typescript: '>=4.8.4 <5.9.0'
-
- '@typescript-eslint/scope-manager@8.32.0':
- resolution: {integrity: sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@typescript-eslint/type-utils@8.32.0':
- resolution: {integrity: sha512-t2vouuYQKEKSLtJaa5bB4jHeha2HJczQ6E5IXPDPgIty9EqcJxpr1QHQ86YyIPwDwxvUmLfP2YADQ5ZY4qddZg==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- eslint: ^8.57.0 || ^9.0.0
- typescript: '>=4.8.4 <5.9.0'
-
- '@typescript-eslint/types@8.32.0':
- resolution: {integrity: sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@typescript-eslint/typescript-estree@8.32.0':
- resolution: {integrity: sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- typescript: '>=4.8.4 <5.9.0'
-
- '@typescript-eslint/utils@8.32.0':
- resolution: {integrity: sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- eslint: ^8.57.0 || ^9.0.0
- typescript: '>=4.8.4 <5.9.0'
-
- '@typescript-eslint/visitor-keys@8.32.0':
- resolution: {integrity: sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- '@vladfrangu/async_event_emitter@2.4.6':
- resolution: {integrity: sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==}
- engines: {node: '>=v14.0.0', npm: '>=7.0.0'}
-
- accepts@2.0.0:
- resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==}
- engines: {node: '>= 0.6'}
-
- acorn-jsx@5.3.2:
- resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
- peerDependencies:
- acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
-
- acorn@8.14.1:
- resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==}
- engines: {node: '>=0.4.0'}
- hasBin: true
-
- ajv@6.12.6:
- resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
-
- ansi-styles@4.3.0:
- resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
- engines: {node: '>=8'}
-
- argparse@2.0.1:
- resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
-
- balanced-match@1.0.2:
- resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
-
- body-parser@2.2.0:
- resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==}
- engines: {node: '>=18'}
-
- brace-expansion@1.1.11:
- resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
-
- brace-expansion@2.0.1:
- resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
-
- braces@3.0.3:
- resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
- engines: {node: '>=8'}
-
- bytes@3.1.2:
- resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
- engines: {node: '>= 0.8'}
-
- call-bind-apply-helpers@1.0.2:
- resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
- engines: {node: '>= 0.4'}
-
- call-bound@1.0.4:
- resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==}
- engines: {node: '>= 0.4'}
-
- callsites@3.1.0:
- resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
- engines: {node: '>=6'}
-
- chalk@4.1.2:
- resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
- engines: {node: '>=10'}
-
- color-convert@2.0.1:
- resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
- engines: {node: '>=7.0.0'}
-
- color-name@1.1.4:
- resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
-
- concat-map@0.0.1:
- resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
-
- content-disposition@1.0.0:
- resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==}
- engines: {node: '>= 0.6'}
-
- content-type@1.0.5:
- resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
- engines: {node: '>= 0.6'}
-
- cookie-signature@1.2.2:
- resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==}
- engines: {node: '>=6.6.0'}
-
- cookie@0.7.2:
- resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
- engines: {node: '>= 0.6'}
-
- cors@2.8.5:
- resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
- engines: {node: '>= 0.10'}
-
- cross-spawn@7.0.6:
- resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
- engines: {node: '>= 8'}
-
- csstype@3.1.3:
- resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
-
- debug@4.4.0:
- resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==}
- engines: {node: '>=6.0'}
- peerDependencies:
- supports-color: '*'
- peerDependenciesMeta:
- supports-color:
- optional: true
-
- deep-is@0.1.4:
- resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
-
- depd@2.0.0:
- resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
- engines: {node: '>= 0.8'}
-
- dunder-proto@1.0.1:
- resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
- engines: {node: '>= 0.4'}
-
- ee-first@1.1.1:
- resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
-
- encodeurl@2.0.0:
- resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}
- engines: {node: '>= 0.8'}
-
- entities@4.5.0:
- resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
- engines: {node: '>=0.12'}
-
- es-define-property@1.0.1:
- resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
- engines: {node: '>= 0.4'}
-
- es-errors@1.3.0:
- resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
- engines: {node: '>= 0.4'}
-
- es-object-atoms@1.1.1:
- resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
- engines: {node: '>= 0.4'}
-
- escape-html@1.0.3:
- resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
-
- escape-string-regexp@4.0.0:
- resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
- engines: {node: '>=10'}
-
- eslint-plugin-prettier@5.4.0:
- resolution: {integrity: sha512-BvQOvUhkVQM1i63iMETK9Hjud9QhqBnbtT1Zc642p9ynzBuCe5pybkOnvqZIBypXmMlsGcnU4HZ8sCTPfpAexA==}
- engines: {node: ^14.18.0 || >=16.0.0}
- peerDependencies:
- '@types/eslint': '>=8.0.0'
- eslint: '>=8.0.0'
- eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0'
- prettier: '>=3.0.0'
- peerDependenciesMeta:
- '@types/eslint':
- optional: true
- eslint-config-prettier:
- optional: true
-
- eslint-plugin-solid@0.14.5:
- resolution: {integrity: sha512-nfuYK09ah5aJG/oEN6P1qziy1zLgW4PDWe75VNPi4CEFYk1x2AEqwFeQfEPR7gNn0F2jOeqKhx2E+5oNCOBYWQ==}
- engines: {node: '>=18.0.0'}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
- typescript: '>=4.8.4'
-
- eslint-scope@8.3.0:
- resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- eslint-visitor-keys@3.4.3:
- resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
-
- eslint-visitor-keys@4.2.0:
- resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- eslint@9.26.0:
- resolution: {integrity: sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- hasBin: true
- peerDependencies:
- jiti: '*'
- peerDependenciesMeta:
- jiti:
- optional: true
-
- espree@10.3.0:
- resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
- esquery@1.6.0:
- resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
- engines: {node: '>=0.10'}
-
- esrecurse@4.3.0:
- resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
- engines: {node: '>=4.0'}
-
- estraverse@5.3.0:
- resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
- engines: {node: '>=4.0'}
-
- esutils@2.0.3:
- resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
- engines: {node: '>=0.10.0'}
-
- etag@1.8.1:
- resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
- engines: {node: '>= 0.6'}
-
- eventsource-parser@3.0.1:
- resolution: {integrity: sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==}
- engines: {node: '>=18.0.0'}
-
- eventsource@3.0.7:
- resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==}
- engines: {node: '>=18.0.0'}
-
- express-rate-limit@7.5.0:
- resolution: {integrity: sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==}
- engines: {node: '>= 16'}
- peerDependencies:
- express: ^4.11 || 5 || ^5.0.0-beta.1
-
- express@5.1.0:
- resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==}
- engines: {node: '>= 18'}
-
- fast-deep-equal@3.1.3:
- resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
-
- fast-diff@1.3.0:
- resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
-
- fast-glob@3.3.3:
- resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
- engines: {node: '>=8.6.0'}
-
- fast-json-stable-stringify@2.1.0:
- resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
-
- fast-levenshtein@2.0.6:
- resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
-
- fastq@1.19.1:
- resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
-
- file-entry-cache@8.0.0:
- resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
- engines: {node: '>=16.0.0'}
-
- fill-range@7.1.1:
- resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
- engines: {node: '>=8'}
-
- finalhandler@2.1.0:
- resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==}
- engines: {node: '>= 0.8'}
-
- find-up@5.0.0:
- resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
- engines: {node: '>=10'}
-
- flat-cache@4.0.1:
- resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
- engines: {node: '>=16'}
-
- flatted@3.3.3:
- resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
-
- forwarded@0.2.0:
- resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
- engines: {node: '>= 0.6'}
-
- fresh@2.0.0:
- resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==}
- engines: {node: '>= 0.8'}
-
- function-bind@1.1.2:
- resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
-
- get-intrinsic@1.3.0:
- resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
- engines: {node: '>= 0.4'}
-
- get-proto@1.0.1:
- resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
- engines: {node: '>= 0.4'}
-
- glob-parent@5.1.2:
- resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
- engines: {node: '>= 6'}
-
- glob-parent@6.0.2:
- resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
- engines: {node: '>=10.13.0'}
-
- globals@11.12.0:
- resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
- engines: {node: '>=4'}
-
- globals@14.0.0:
- resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
- engines: {node: '>=18'}
-
- gopd@1.2.0:
- resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
- engines: {node: '>= 0.4'}
-
- graphemer@1.4.0:
- resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
-
- has-flag@4.0.0:
- resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
- engines: {node: '>=8'}
-
- has-symbols@1.1.0:
- resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
- engines: {node: '>= 0.4'}
-
- hasown@2.0.2:
- resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
- engines: {node: '>= 0.4'}
-
- html-tags@3.3.1:
- resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==}
- engines: {node: '>=8'}
-
- http-errors@2.0.0:
- resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
- engines: {node: '>= 0.8'}
-
- iconv-lite@0.6.3:
- resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
- engines: {node: '>=0.10.0'}
-
- ignore@5.3.2:
- resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
- engines: {node: '>= 4'}
-
- import-fresh@3.3.1:
- resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
- engines: {node: '>=6'}
-
- imurmurhash@0.1.4:
- resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
- engines: {node: '>=0.8.19'}
-
- inherits@2.0.4:
- resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
-
- inline-style-parser@0.2.4:
- resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
-
- ipaddr.js@1.9.1:
- resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}
- engines: {node: '>= 0.10'}
-
- is-extglob@2.1.1:
- resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
- engines: {node: '>=0.10.0'}
-
- is-glob@4.0.3:
- resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
- engines: {node: '>=0.10.0'}
-
- is-html@2.0.0:
- resolution: {integrity: sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==}
- engines: {node: '>=8'}
-
- is-number@7.0.0:
- resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
- engines: {node: '>=0.12.0'}
-
- is-promise@4.0.0:
- resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==}
-
- isexe@2.0.0:
- resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
-
- javascript-natural-sort@0.7.1:
- resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==}
-
- js-tokens@4.0.0:
- resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
-
- js-yaml@4.1.0:
- resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
- hasBin: true
-
- jsesc@3.1.0:
- resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==}
- engines: {node: '>=6'}
- hasBin: true
-
- json-buffer@3.0.1:
- resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
-
- json-schema-traverse@0.4.1:
- resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
-
- json-stable-stringify-without-jsonify@1.0.1:
- resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
-
- kebab-case@1.0.2:
- resolution: {integrity: sha512-7n6wXq4gNgBELfDCpzKc+mRrZFs7D+wgfF5WRFLNAr4DA/qtr9Js8uOAVAfHhuLMfAcQ0pRKqbpjx+TcJVdE1Q==}
-
- keyv@4.5.4:
- resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
-
- known-css-properties@0.30.0:
- resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==}
-
- levn@0.4.1:
- resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
- engines: {node: '>= 0.8.0'}
-
- linkify-it@5.0.0:
- resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
-
- locate-path@6.0.0:
- resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
- engines: {node: '>=10'}
-
- lodash.merge@4.6.2:
- resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
-
- lodash@4.17.21:
- resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
-
- lunr@2.3.9:
- resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
-
- markdown-it@14.1.0:
- resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
- hasBin: true
-
- math-intrinsics@1.1.0:
- resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
- engines: {node: '>= 0.4'}
-
- mdurl@2.0.0:
- resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
-
- media-typer@1.1.0:
- resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==}
- engines: {node: '>= 0.8'}
-
- merge-descriptors@2.0.0:
- resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==}
- engines: {node: '>=18'}
-
- merge2@1.4.1:
- resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
- engines: {node: '>= 8'}
-
- micromatch@4.0.8:
- resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
- engines: {node: '>=8.6'}
-
- mime-db@1.54.0:
- resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==}
- engines: {node: '>= 0.6'}
-
- mime-types@3.0.1:
- resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==}
- engines: {node: '>= 0.6'}
-
- minimatch@3.1.2:
- resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
-
- minimatch@9.0.5:
- resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
- engines: {node: '>=16 || 14 >=14.17'}
-
- ms@2.1.3:
- resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
-
- natural-compare@1.4.0:
- resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
-
- negotiator@1.0.0:
- resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==}
- engines: {node: '>= 0.6'}
-
- object-assign@4.1.1:
- resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
- engines: {node: '>=0.10.0'}
-
- object-inspect@1.13.4:
- resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==}
- engines: {node: '>= 0.4'}
-
- on-finished@2.4.1:
- resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
- engines: {node: '>= 0.8'}
-
- once@1.4.0:
- resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
-
- optionator@0.9.4:
- resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
- engines: {node: '>= 0.8.0'}
-
- p-limit@3.1.0:
- resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
- engines: {node: '>=10'}
-
- p-locate@5.0.0:
- resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
- engines: {node: '>=10'}
-
- parent-module@1.0.1:
- resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
- engines: {node: '>=6'}
-
- parseurl@1.3.3:
- resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
- engines: {node: '>= 0.8'}
-
- path-exists@4.0.0:
- resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
- engines: {node: '>=8'}
-
- path-key@3.1.1:
- resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
- engines: {node: '>=8'}
-
- path-to-regexp@8.2.0:
- resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==}
- engines: {node: '>=16'}
-
- picocolors@1.1.1:
- resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
-
- picomatch@2.3.1:
- resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
- engines: {node: '>=8.6'}
-
- pkce-challenge@5.0.0:
- resolution: {integrity: sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==}
- engines: {node: '>=16.20.0'}
-
- prelude-ls@1.2.1:
- resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
- engines: {node: '>= 0.8.0'}
-
- prettier-linter-helpers@1.0.0:
- resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
- engines: {node: '>=6.0.0'}
-
- prettier@3.5.3:
- resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==}
- engines: {node: '>=14'}
- hasBin: true
-
- proxy-addr@2.0.7:
- resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
- engines: {node: '>= 0.10'}
-
- punycode.js@2.3.1:
- resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
- engines: {node: '>=6'}
-
- punycode@2.3.1:
- resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
- engines: {node: '>=6'}
-
- qs@6.14.0:
- resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==}
- engines: {node: '>=0.6'}
-
- queue-microtask@1.2.3:
- resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
-
- range-parser@1.2.1:
- resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
- engines: {node: '>= 0.6'}
-
- raw-body@3.0.0:
- resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==}
- engines: {node: '>= 0.8'}
-
- resolve-from@4.0.0:
- resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
- engines: {node: '>=4'}
-
- reusify@1.1.0:
- resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
- engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
-
- revolt-api@0.8.8-2:
- resolution: {integrity: sha512-xfQQ2aGbjeVbNHE+J6VlsOmZFGXD3FpYvcBTmFRC4TqZonGwqNtzIbkZidmiUehJ97nYMu8fXGJVWnM63BxAcA==}
-
- router@2.2.0:
- resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}
- engines: {node: '>= 18'}
-
- run-parallel@1.2.0:
- resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
-
- safe-buffer@5.2.1:
- resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
-
- safer-buffer@2.1.2:
- resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
-
- semver@7.7.1:
- resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==}
- engines: {node: '>=10'}
- hasBin: true
-
- send@1.2.0:
- resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==}
- engines: {node: '>= 18'}
-
- seroval-plugins@1.3.1:
- resolution: {integrity: sha512-dOlUoiI3fgZbQIcj6By+l865pzeWdP3XCSLdI3xlKnjCk5983yLWPsXytFOUI0BUZKG9qwqbj78n9yVcVwUqaQ==}
- engines: {node: '>=10'}
- peerDependencies:
- seroval: ^1.0
-
- seroval@1.3.1:
- resolution: {integrity: sha512-F+T9EQPdLzgdewgxnBh4mSc+vde+EOkU6dC9BDuu/bfGb+UyUlqM6t8znFCTPQSuai/ZcfFg0gu79h+bVW2O0w==}
- engines: {node: '>=10'}
-
- serve-static@2.2.0:
- resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==}
- engines: {node: '>= 18'}
-
- setprototypeof@1.2.0:
- resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
-
- shebang-command@2.0.0:
- resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
- engines: {node: '>=8'}
-
- shebang-regex@3.0.0:
- resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
- engines: {node: '>=8'}
-
- side-channel-list@1.0.0:
- resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
- engines: {node: '>= 0.4'}
-
- side-channel-map@1.0.1:
- resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==}
- engines: {node: '>= 0.4'}
-
- side-channel-weakmap@1.0.2:
- resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==}
- engines: {node: '>= 0.4'}
-
- side-channel@1.1.0:
- resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==}
- engines: {node: '>= 0.4'}
-
- solid-js@1.9.6:
- resolution: {integrity: sha512-PoasAJvLk60hRtOTe9ulvALOdLjjqxuxcGZRolBQqxOnXrBXHGzqMT4ijNhGsDAYdOgEa8ZYaAE94PSldrFSkA==}
-
- statuses@2.0.1:
- resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
- engines: {node: '>= 0.8'}
-
- strip-json-comments@3.1.1:
- resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
- engines: {node: '>=8'}
-
- style-to-object@1.0.8:
- resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==}
-
- supports-color@7.2.0:
- resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
- engines: {node: '>=8'}
-
- synckit@0.11.4:
- resolution: {integrity: sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==}
- engines: {node: ^14.18.0 || >=16.0.0}
-
- to-regex-range@5.0.1:
- resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
- engines: {node: '>=8.0'}
-
- toidentifier@1.0.1:
- resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
- engines: {node: '>=0.6'}
-
- ts-api-utils@2.1.0:
- resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==}
- engines: {node: '>=18.12'}
- peerDependencies:
- typescript: '>=4.8.4'
-
- tslib@2.8.1:
- resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
-
- type-check@0.4.0:
- resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
- engines: {node: '>= 0.8.0'}
-
- type-is@2.0.1:
- resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==}
- engines: {node: '>= 0.6'}
-
- typedoc@0.27.9:
- resolution: {integrity: sha512-/z585740YHURLl9DN2jCWe6OW7zKYm6VoQ93H0sxZ1cwHQEQrUn5BJrEnkWhfzUdyO+BLGjnKUZ9iz9hKloFDw==}
- engines: {node: '>= 18'}
- hasBin: true
- peerDependencies:
- typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x
-
- typescript-eslint@8.32.0:
- resolution: {integrity: sha512-UMq2kxdXCzinFFPsXc9o2ozIpYCCOiEC46MG3yEh5Vipq6BO27otTtEBZA1fQ66DulEUgE97ucQ/3YY66CPg0A==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- eslint: ^8.57.0 || ^9.0.0
- typescript: '>=4.8.4 <5.9.0'
-
- typescript@5.8.3:
- resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
- engines: {node: '>=14.17'}
- hasBin: true
-
- uc.micro@2.1.0:
- resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
-
- ulid@2.4.0:
- resolution: {integrity: sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==}
- hasBin: true
-
- undici-types@6.21.0:
- resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
-
- unpipe@1.0.0:
- resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
- engines: {node: '>= 0.8'}
-
- uri-js@4.4.1:
- resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
-
- vary@1.1.2:
- resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
- engines: {node: '>= 0.8'}
-
- which@2.0.2:
- resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
- engines: {node: '>= 8'}
- hasBin: true
-
- word-wrap@1.2.5:
- resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
- engines: {node: '>=0.10.0'}
-
- wrappy@1.0.2:
- resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
-
- yaml@2.7.1:
- resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==}
- engines: {node: '>= 14'}
- hasBin: true
-
- yocto-queue@0.1.0:
- resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
- engines: {node: '>=10'}
-
- zod-to-json-schema@3.24.5:
- resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==}
- peerDependencies:
- zod: ^3.24.1
-
- zod@3.24.4:
- resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==}
-
-snapshots:
-
- '@babel/code-frame@7.27.1':
- dependencies:
- '@babel/helper-validator-identifier': 7.27.1
- js-tokens: 4.0.0
- picocolors: 1.1.1
-
- '@babel/generator@7.27.1':
- dependencies:
- '@babel/parser': 7.27.2
- '@babel/types': 7.27.1
- '@jridgewell/gen-mapping': 0.3.8
- '@jridgewell/trace-mapping': 0.3.25
- jsesc: 3.1.0
-
- '@babel/helper-string-parser@7.27.1': {}
-
- '@babel/helper-validator-identifier@7.27.1': {}
-
- '@babel/parser@7.27.2':
- dependencies:
- '@babel/types': 7.27.1
-
- '@babel/template@7.27.2':
- dependencies:
- '@babel/code-frame': 7.27.1
- '@babel/parser': 7.27.2
- '@babel/types': 7.27.1
-
- '@babel/traverse@7.27.1':
- dependencies:
- '@babel/code-frame': 7.27.1
- '@babel/generator': 7.27.1
- '@babel/parser': 7.27.2
- '@babel/template': 7.27.2
- '@babel/types': 7.27.1
- debug: 4.4.0
- globals: 11.12.0
- transitivePeerDependencies:
- - supports-color
-
- '@babel/types@7.27.1':
- dependencies:
- '@babel/helper-string-parser': 7.27.1
- '@babel/helper-validator-identifier': 7.27.1
-
- '@eslint-community/eslint-utils@4.7.0(eslint@9.26.0)':
- dependencies:
- eslint: 9.26.0
- eslint-visitor-keys: 3.4.3
-
- '@eslint-community/regexpp@4.12.1': {}
-
- '@eslint/config-array@0.20.0':
- dependencies:
- '@eslint/object-schema': 2.1.6
- debug: 4.4.0
- minimatch: 3.1.2
- transitivePeerDependencies:
- - supports-color
-
- '@eslint/config-helpers@0.2.2': {}
-
- '@eslint/core@0.13.0':
- dependencies:
- '@types/json-schema': 7.0.15
-
- '@eslint/eslintrc@3.3.1':
- dependencies:
- ajv: 6.12.6
- debug: 4.4.0
- espree: 10.3.0
- globals: 14.0.0
- ignore: 5.3.2
- import-fresh: 3.3.1
- js-yaml: 4.1.0
- minimatch: 3.1.2
- strip-json-comments: 3.1.1
- transitivePeerDependencies:
- - supports-color
-
- '@eslint/js@9.26.0': {}
-
- '@eslint/object-schema@2.1.6': {}
-
- '@eslint/plugin-kit@0.2.8':
- dependencies:
- '@eslint/core': 0.13.0
- levn: 0.4.1
-
- '@gerrit0/mini-shiki@1.27.2':
- dependencies:
- '@shikijs/engine-oniguruma': 1.29.2
- '@shikijs/types': 1.29.2
- '@shikijs/vscode-textmate': 10.0.2
-
- '@humanfs/core@0.19.1': {}
-
- '@humanfs/node@0.16.6':
- dependencies:
- '@humanfs/core': 0.19.1
- '@humanwhocodes/retry': 0.3.1
-
- '@humanwhocodes/module-importer@1.0.1': {}
-
- '@humanwhocodes/retry@0.3.1': {}
-
- '@humanwhocodes/retry@0.4.3': {}
-
- '@jridgewell/gen-mapping@0.3.8':
- dependencies:
- '@jridgewell/set-array': 1.2.1
- '@jridgewell/sourcemap-codec': 1.5.0
- '@jridgewell/trace-mapping': 0.3.25
-
- '@jridgewell/resolve-uri@3.1.2': {}
-
- '@jridgewell/set-array@1.2.1': {}
-
- '@jridgewell/sourcemap-codec@1.5.0': {}
-
- '@jridgewell/trace-mapping@0.3.25':
- dependencies:
- '@jridgewell/resolve-uri': 3.1.2
- '@jridgewell/sourcemap-codec': 1.5.0
-
- '@modelcontextprotocol/sdk@1.11.2':
- dependencies:
- content-type: 1.0.5
- cors: 2.8.5
- cross-spawn: 7.0.6
- eventsource: 3.0.7
- express: 5.1.0
- express-rate-limit: 7.5.0(express@5.1.0)
- pkce-challenge: 5.0.0
- raw-body: 3.0.0
- zod: 3.24.4
- zod-to-json-schema: 3.24.5(zod@3.24.4)
- transitivePeerDependencies:
- - supports-color
-
- '@mxssfd/typedoc-theme@1.1.7(typedoc@0.27.9(typescript@5.8.3))':
- dependencies:
- typedoc: 0.27.9(typescript@5.8.3)
-
- '@nodelib/fs.scandir@2.1.5':
- dependencies:
- '@nodelib/fs.stat': 2.0.5
- run-parallel: 1.2.0
-
- '@nodelib/fs.stat@2.0.5': {}
-
- '@nodelib/fs.walk@1.2.8':
- dependencies:
- '@nodelib/fs.scandir': 2.1.5
- fastq: 1.19.1
-
- '@pkgr/core@0.2.4': {}
-
- '@shikijs/engine-oniguruma@1.29.2':
- dependencies:
- '@shikijs/types': 1.29.2
- '@shikijs/vscode-textmate': 10.0.2
-
- '@shikijs/types@1.29.2':
- dependencies:
- '@shikijs/vscode-textmate': 10.0.2
- '@types/hast': 3.0.4
-
- '@shikijs/vscode-textmate@10.0.2': {}
-
- '@solid-primitives/map@0.7.1(solid-js@1.9.6)':
- dependencies:
- '@solid-primitives/trigger': 1.2.1(solid-js@1.9.6)
- solid-js: 1.9.6
-
- '@solid-primitives/set@0.7.1(solid-js@1.9.6)':
- dependencies:
- '@solid-primitives/trigger': 1.2.1(solid-js@1.9.6)
- solid-js: 1.9.6
-
- '@solid-primitives/trigger@1.2.1(solid-js@1.9.6)':
- dependencies:
- '@solid-primitives/utils': 6.3.1(solid-js@1.9.6)
- solid-js: 1.9.6
-
- '@solid-primitives/utils@6.3.1(solid-js@1.9.6)':
- dependencies:
- solid-js: 1.9.6
-
- '@trivago/prettier-plugin-sort-imports@5.2.2(prettier@3.5.3)':
- dependencies:
- '@babel/generator': 7.27.1
- '@babel/parser': 7.27.2
- '@babel/traverse': 7.27.1
- '@babel/types': 7.27.1
- javascript-natural-sort: 0.7.1
- lodash: 4.17.21
- prettier: 3.5.3
- transitivePeerDependencies:
- - supports-color
-
- '@types/estree@1.0.7': {}
-
- '@types/hast@3.0.4':
- dependencies:
- '@types/unist': 3.0.3
-
- '@types/json-schema@7.0.15': {}
-
- '@types/node@22.15.17':
- dependencies:
- undici-types: 6.21.0
-
- '@types/unist@3.0.3': {}
-
- '@typescript-eslint/eslint-plugin@8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0)(typescript@5.8.3))(eslint@9.26.0)(typescript@5.8.3)':
- dependencies:
- '@eslint-community/regexpp': 4.12.1
- '@typescript-eslint/parser': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- '@typescript-eslint/scope-manager': 8.32.0
- '@typescript-eslint/type-utils': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- '@typescript-eslint/utils': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- '@typescript-eslint/visitor-keys': 8.32.0
- eslint: 9.26.0
- graphemer: 1.4.0
- ignore: 5.3.2
- natural-compare: 1.4.0
- ts-api-utils: 2.1.0(typescript@5.8.3)
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/parser@8.32.0(eslint@9.26.0)(typescript@5.8.3)':
- dependencies:
- '@typescript-eslint/scope-manager': 8.32.0
- '@typescript-eslint/types': 8.32.0
- '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3)
- '@typescript-eslint/visitor-keys': 8.32.0
- debug: 4.4.0
- eslint: 9.26.0
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/scope-manager@8.32.0':
- dependencies:
- '@typescript-eslint/types': 8.32.0
- '@typescript-eslint/visitor-keys': 8.32.0
-
- '@typescript-eslint/type-utils@8.32.0(eslint@9.26.0)(typescript@5.8.3)':
- dependencies:
- '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3)
- '@typescript-eslint/utils': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- debug: 4.4.0
- eslint: 9.26.0
- ts-api-utils: 2.1.0(typescript@5.8.3)
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/types@8.32.0': {}
-
- '@typescript-eslint/typescript-estree@8.32.0(typescript@5.8.3)':
- dependencies:
- '@typescript-eslint/types': 8.32.0
- '@typescript-eslint/visitor-keys': 8.32.0
- debug: 4.4.0
- fast-glob: 3.3.3
- is-glob: 4.0.3
- minimatch: 9.0.5
- semver: 7.7.1
- ts-api-utils: 2.1.0(typescript@5.8.3)
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/utils@8.32.0(eslint@9.26.0)(typescript@5.8.3)':
- dependencies:
- '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0)
- '@typescript-eslint/scope-manager': 8.32.0
- '@typescript-eslint/types': 8.32.0
- '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3)
- eslint: 9.26.0
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/visitor-keys@8.32.0':
- dependencies:
- '@typescript-eslint/types': 8.32.0
- eslint-visitor-keys: 4.2.0
-
- '@vladfrangu/async_event_emitter@2.4.6': {}
-
- accepts@2.0.0:
- dependencies:
- mime-types: 3.0.1
- negotiator: 1.0.0
-
- acorn-jsx@5.3.2(acorn@8.14.1):
- dependencies:
- acorn: 8.14.1
-
- acorn@8.14.1: {}
-
- ajv@6.12.6:
- dependencies:
- fast-deep-equal: 3.1.3
- fast-json-stable-stringify: 2.1.0
- json-schema-traverse: 0.4.1
- uri-js: 4.4.1
-
- ansi-styles@4.3.0:
- dependencies:
- color-convert: 2.0.1
-
- argparse@2.0.1: {}
-
- balanced-match@1.0.2: {}
-
- body-parser@2.2.0:
- dependencies:
- bytes: 3.1.2
- content-type: 1.0.5
- debug: 4.4.0
- http-errors: 2.0.0
- iconv-lite: 0.6.3
- on-finished: 2.4.1
- qs: 6.14.0
- raw-body: 3.0.0
- type-is: 2.0.1
- transitivePeerDependencies:
- - supports-color
-
- brace-expansion@1.1.11:
- dependencies:
- balanced-match: 1.0.2
- concat-map: 0.0.1
-
- brace-expansion@2.0.1:
- dependencies:
- balanced-match: 1.0.2
-
- braces@3.0.3:
- dependencies:
- fill-range: 7.1.1
-
- bytes@3.1.2: {}
-
- call-bind-apply-helpers@1.0.2:
- dependencies:
- es-errors: 1.3.0
- function-bind: 1.1.2
-
- call-bound@1.0.4:
- dependencies:
- call-bind-apply-helpers: 1.0.2
- get-intrinsic: 1.3.0
-
- callsites@3.1.0: {}
-
- chalk@4.1.2:
- dependencies:
- ansi-styles: 4.3.0
- supports-color: 7.2.0
-
- color-convert@2.0.1:
- dependencies:
- color-name: 1.1.4
-
- color-name@1.1.4: {}
-
- concat-map@0.0.1: {}
-
- content-disposition@1.0.0:
- dependencies:
- safe-buffer: 5.2.1
-
- content-type@1.0.5: {}
-
- cookie-signature@1.2.2: {}
-
- cookie@0.7.2: {}
-
- cors@2.8.5:
- dependencies:
- object-assign: 4.1.1
- vary: 1.1.2
-
- cross-spawn@7.0.6:
- dependencies:
- path-key: 3.1.1
- shebang-command: 2.0.0
- which: 2.0.2
-
- csstype@3.1.3: {}
-
- debug@4.4.0:
- dependencies:
- ms: 2.1.3
-
- deep-is@0.1.4: {}
-
- depd@2.0.0: {}
-
- dunder-proto@1.0.1:
- dependencies:
- call-bind-apply-helpers: 1.0.2
- es-errors: 1.3.0
- gopd: 1.2.0
-
- ee-first@1.1.1: {}
-
- encodeurl@2.0.0: {}
-
- entities@4.5.0: {}
-
- es-define-property@1.0.1: {}
-
- es-errors@1.3.0: {}
-
- es-object-atoms@1.1.1:
- dependencies:
- es-errors: 1.3.0
-
- escape-html@1.0.3: {}
-
- escape-string-regexp@4.0.0: {}
-
- eslint-plugin-prettier@5.4.0(eslint@9.26.0)(prettier@3.5.3):
- dependencies:
- eslint: 9.26.0
- prettier: 3.5.3
- prettier-linter-helpers: 1.0.0
- synckit: 0.11.4
-
- eslint-plugin-solid@0.14.5(eslint@9.26.0)(typescript@5.8.3):
- dependencies:
- '@typescript-eslint/utils': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- eslint: 9.26.0
- estraverse: 5.3.0
- is-html: 2.0.0
- kebab-case: 1.0.2
- known-css-properties: 0.30.0
- style-to-object: 1.0.8
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- eslint-scope@8.3.0:
- dependencies:
- esrecurse: 4.3.0
- estraverse: 5.3.0
-
- eslint-visitor-keys@3.4.3: {}
-
- eslint-visitor-keys@4.2.0: {}
-
- eslint@9.26.0:
- dependencies:
- '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0)
- '@eslint-community/regexpp': 4.12.1
- '@eslint/config-array': 0.20.0
- '@eslint/config-helpers': 0.2.2
- '@eslint/core': 0.13.0
- '@eslint/eslintrc': 3.3.1
- '@eslint/js': 9.26.0
- '@eslint/plugin-kit': 0.2.8
- '@humanfs/node': 0.16.6
- '@humanwhocodes/module-importer': 1.0.1
- '@humanwhocodes/retry': 0.4.3
- '@modelcontextprotocol/sdk': 1.11.2
- '@types/estree': 1.0.7
- '@types/json-schema': 7.0.15
- ajv: 6.12.6
- chalk: 4.1.2
- cross-spawn: 7.0.6
- debug: 4.4.0
- escape-string-regexp: 4.0.0
- eslint-scope: 8.3.0
- eslint-visitor-keys: 4.2.0
- espree: 10.3.0
- esquery: 1.6.0
- esutils: 2.0.3
- fast-deep-equal: 3.1.3
- file-entry-cache: 8.0.0
- find-up: 5.0.0
- glob-parent: 6.0.2
- ignore: 5.3.2
- imurmurhash: 0.1.4
- is-glob: 4.0.3
- json-stable-stringify-without-jsonify: 1.0.1
- lodash.merge: 4.6.2
- minimatch: 3.1.2
- natural-compare: 1.4.0
- optionator: 0.9.4
- zod: 3.24.4
- transitivePeerDependencies:
- - supports-color
-
- espree@10.3.0:
- dependencies:
- acorn: 8.14.1
- acorn-jsx: 5.3.2(acorn@8.14.1)
- eslint-visitor-keys: 4.2.0
-
- esquery@1.6.0:
- dependencies:
- estraverse: 5.3.0
-
- esrecurse@4.3.0:
- dependencies:
- estraverse: 5.3.0
-
- estraverse@5.3.0: {}
-
- esutils@2.0.3: {}
-
- etag@1.8.1: {}
-
- eventsource-parser@3.0.1: {}
-
- eventsource@3.0.7:
- dependencies:
- eventsource-parser: 3.0.1
-
- express-rate-limit@7.5.0(express@5.1.0):
- dependencies:
- express: 5.1.0
-
- express@5.1.0:
- dependencies:
- accepts: 2.0.0
- body-parser: 2.2.0
- content-disposition: 1.0.0
- content-type: 1.0.5
- cookie: 0.7.2
- cookie-signature: 1.2.2
- debug: 4.4.0
- encodeurl: 2.0.0
- escape-html: 1.0.3
- etag: 1.8.1
- finalhandler: 2.1.0
- fresh: 2.0.0
- http-errors: 2.0.0
- merge-descriptors: 2.0.0
- mime-types: 3.0.1
- on-finished: 2.4.1
- once: 1.4.0
- parseurl: 1.3.3
- proxy-addr: 2.0.7
- qs: 6.14.0
- range-parser: 1.2.1
- router: 2.2.0
- send: 1.2.0
- serve-static: 2.2.0
- statuses: 2.0.1
- type-is: 2.0.1
- vary: 1.1.2
- transitivePeerDependencies:
- - supports-color
-
- fast-deep-equal@3.1.3: {}
-
- fast-diff@1.3.0: {}
-
- fast-glob@3.3.3:
- dependencies:
- '@nodelib/fs.stat': 2.0.5
- '@nodelib/fs.walk': 1.2.8
- glob-parent: 5.1.2
- merge2: 1.4.1
- micromatch: 4.0.8
-
- fast-json-stable-stringify@2.1.0: {}
-
- fast-levenshtein@2.0.6: {}
-
- fastq@1.19.1:
- dependencies:
- reusify: 1.1.0
-
- file-entry-cache@8.0.0:
- dependencies:
- flat-cache: 4.0.1
-
- fill-range@7.1.1:
- dependencies:
- to-regex-range: 5.0.1
-
- finalhandler@2.1.0:
- dependencies:
- debug: 4.4.0
- encodeurl: 2.0.0
- escape-html: 1.0.3
- on-finished: 2.4.1
- parseurl: 1.3.3
- statuses: 2.0.1
- transitivePeerDependencies:
- - supports-color
-
- find-up@5.0.0:
- dependencies:
- locate-path: 6.0.0
- path-exists: 4.0.0
-
- flat-cache@4.0.1:
- dependencies:
- flatted: 3.3.3
- keyv: 4.5.4
-
- flatted@3.3.3: {}
-
- forwarded@0.2.0: {}
-
- fresh@2.0.0: {}
-
- function-bind@1.1.2: {}
-
- get-intrinsic@1.3.0:
- dependencies:
- call-bind-apply-helpers: 1.0.2
- es-define-property: 1.0.1
- es-errors: 1.3.0
- es-object-atoms: 1.1.1
- function-bind: 1.1.2
- get-proto: 1.0.1
- gopd: 1.2.0
- has-symbols: 1.1.0
- hasown: 2.0.2
- math-intrinsics: 1.1.0
-
- get-proto@1.0.1:
- dependencies:
- dunder-proto: 1.0.1
- es-object-atoms: 1.1.1
-
- glob-parent@5.1.2:
- dependencies:
- is-glob: 4.0.3
-
- glob-parent@6.0.2:
- dependencies:
- is-glob: 4.0.3
-
- globals@11.12.0: {}
-
- globals@14.0.0: {}
-
- gopd@1.2.0: {}
-
- graphemer@1.4.0: {}
-
- has-flag@4.0.0: {}
-
- has-symbols@1.1.0: {}
-
- hasown@2.0.2:
- dependencies:
- function-bind: 1.1.2
-
- html-tags@3.3.1: {}
-
- http-errors@2.0.0:
- dependencies:
- depd: 2.0.0
- inherits: 2.0.4
- setprototypeof: 1.2.0
- statuses: 2.0.1
- toidentifier: 1.0.1
-
- iconv-lite@0.6.3:
- dependencies:
- safer-buffer: 2.1.2
-
- ignore@5.3.2: {}
-
- import-fresh@3.3.1:
- dependencies:
- parent-module: 1.0.1
- resolve-from: 4.0.0
-
- imurmurhash@0.1.4: {}
-
- inherits@2.0.4: {}
-
- inline-style-parser@0.2.4: {}
-
- ipaddr.js@1.9.1: {}
-
- is-extglob@2.1.1: {}
-
- is-glob@4.0.3:
- dependencies:
- is-extglob: 2.1.1
-
- is-html@2.0.0:
- dependencies:
- html-tags: 3.3.1
-
- is-number@7.0.0: {}
-
- is-promise@4.0.0: {}
-
- isexe@2.0.0: {}
-
- javascript-natural-sort@0.7.1: {}
-
- js-tokens@4.0.0: {}
-
- js-yaml@4.1.0:
- dependencies:
- argparse: 2.0.1
-
- jsesc@3.1.0: {}
-
- json-buffer@3.0.1: {}
-
- json-schema-traverse@0.4.1: {}
-
- json-stable-stringify-without-jsonify@1.0.1: {}
-
- kebab-case@1.0.2: {}
-
- keyv@4.5.4:
- dependencies:
- json-buffer: 3.0.1
-
- known-css-properties@0.30.0: {}
-
- levn@0.4.1:
- dependencies:
- prelude-ls: 1.2.1
- type-check: 0.4.0
-
- linkify-it@5.0.0:
- dependencies:
- uc.micro: 2.1.0
-
- locate-path@6.0.0:
- dependencies:
- p-locate: 5.0.0
-
- lodash.merge@4.6.2: {}
-
- lodash@4.17.21: {}
-
- lunr@2.3.9: {}
-
- markdown-it@14.1.0:
- dependencies:
- argparse: 2.0.1
- entities: 4.5.0
- linkify-it: 5.0.0
- mdurl: 2.0.0
- punycode.js: 2.3.1
- uc.micro: 2.1.0
-
- math-intrinsics@1.1.0: {}
-
- mdurl@2.0.0: {}
-
- media-typer@1.1.0: {}
-
- merge-descriptors@2.0.0: {}
-
- merge2@1.4.1: {}
-
- micromatch@4.0.8:
- dependencies:
- braces: 3.0.3
- picomatch: 2.3.1
-
- mime-db@1.54.0: {}
-
- mime-types@3.0.1:
- dependencies:
- mime-db: 1.54.0
-
- minimatch@3.1.2:
- dependencies:
- brace-expansion: 1.1.11
-
- minimatch@9.0.5:
- dependencies:
- brace-expansion: 2.0.1
-
- ms@2.1.3: {}
-
- natural-compare@1.4.0: {}
-
- negotiator@1.0.0: {}
-
- object-assign@4.1.1: {}
-
- object-inspect@1.13.4: {}
-
- on-finished@2.4.1:
- dependencies:
- ee-first: 1.1.1
-
- once@1.4.0:
- dependencies:
- wrappy: 1.0.2
-
- optionator@0.9.4:
- dependencies:
- deep-is: 0.1.4
- fast-levenshtein: 2.0.6
- levn: 0.4.1
- prelude-ls: 1.2.1
- type-check: 0.4.0
- word-wrap: 1.2.5
-
- p-limit@3.1.0:
- dependencies:
- yocto-queue: 0.1.0
-
- p-locate@5.0.0:
- dependencies:
- p-limit: 3.1.0
-
- parent-module@1.0.1:
- dependencies:
- callsites: 3.1.0
-
- parseurl@1.3.3: {}
-
- path-exists@4.0.0: {}
-
- path-key@3.1.1: {}
-
- path-to-regexp@8.2.0: {}
-
- picocolors@1.1.1: {}
-
- picomatch@2.3.1: {}
-
- pkce-challenge@5.0.0: {}
-
- prelude-ls@1.2.1: {}
-
- prettier-linter-helpers@1.0.0:
- dependencies:
- fast-diff: 1.3.0
-
- prettier@3.5.3: {}
-
- proxy-addr@2.0.7:
- dependencies:
- forwarded: 0.2.0
- ipaddr.js: 1.9.1
-
- punycode.js@2.3.1: {}
-
- punycode@2.3.1: {}
-
- qs@6.14.0:
- dependencies:
- side-channel: 1.1.0
-
- queue-microtask@1.2.3: {}
-
- range-parser@1.2.1: {}
-
- raw-body@3.0.0:
- dependencies:
- bytes: 3.1.2
- http-errors: 2.0.0
- iconv-lite: 0.6.3
- unpipe: 1.0.0
-
- resolve-from@4.0.0: {}
-
- reusify@1.1.0: {}
-
- revolt-api@0.8.8-2: {}
-
- router@2.2.0:
- dependencies:
- debug: 4.4.0
- depd: 2.0.0
- is-promise: 4.0.0
- parseurl: 1.3.3
- path-to-regexp: 8.2.0
- transitivePeerDependencies:
- - supports-color
-
- run-parallel@1.2.0:
- dependencies:
- queue-microtask: 1.2.3
-
- safe-buffer@5.2.1: {}
-
- safer-buffer@2.1.2: {}
-
- semver@7.7.1: {}
-
- send@1.2.0:
- dependencies:
- debug: 4.4.0
- encodeurl: 2.0.0
- escape-html: 1.0.3
- etag: 1.8.1
- fresh: 2.0.0
- http-errors: 2.0.0
- mime-types: 3.0.1
- ms: 2.1.3
- on-finished: 2.4.1
- range-parser: 1.2.1
- statuses: 2.0.1
- transitivePeerDependencies:
- - supports-color
-
- seroval-plugins@1.3.1(seroval@1.3.1):
- dependencies:
- seroval: 1.3.1
-
- seroval@1.3.1: {}
-
- serve-static@2.2.0:
- dependencies:
- encodeurl: 2.0.0
- escape-html: 1.0.3
- parseurl: 1.3.3
- send: 1.2.0
- transitivePeerDependencies:
- - supports-color
-
- setprototypeof@1.2.0: {}
-
- shebang-command@2.0.0:
- dependencies:
- shebang-regex: 3.0.0
-
- shebang-regex@3.0.0: {}
-
- side-channel-list@1.0.0:
- dependencies:
- es-errors: 1.3.0
- object-inspect: 1.13.4
-
- side-channel-map@1.0.1:
- dependencies:
- call-bound: 1.0.4
- es-errors: 1.3.0
- get-intrinsic: 1.3.0
- object-inspect: 1.13.4
-
- side-channel-weakmap@1.0.2:
- dependencies:
- call-bound: 1.0.4
- es-errors: 1.3.0
- get-intrinsic: 1.3.0
- object-inspect: 1.13.4
- side-channel-map: 1.0.1
-
- side-channel@1.1.0:
- dependencies:
- es-errors: 1.3.0
- object-inspect: 1.13.4
- side-channel-list: 1.0.0
- side-channel-map: 1.0.1
- side-channel-weakmap: 1.0.2
-
- solid-js@1.9.6:
- dependencies:
- csstype: 3.1.3
- seroval: 1.3.1
- seroval-plugins: 1.3.1(seroval@1.3.1)
-
- statuses@2.0.1: {}
-
- strip-json-comments@3.1.1: {}
-
- style-to-object@1.0.8:
- dependencies:
- inline-style-parser: 0.2.4
-
- supports-color@7.2.0:
- dependencies:
- has-flag: 4.0.0
-
- synckit@0.11.4:
- dependencies:
- '@pkgr/core': 0.2.4
- tslib: 2.8.1
-
- to-regex-range@5.0.1:
- dependencies:
- is-number: 7.0.0
-
- toidentifier@1.0.1: {}
-
- ts-api-utils@2.1.0(typescript@5.8.3):
- dependencies:
- typescript: 5.8.3
-
- tslib@2.8.1: {}
-
- type-check@0.4.0:
- dependencies:
- prelude-ls: 1.2.1
-
- type-is@2.0.1:
- dependencies:
- content-type: 1.0.5
- media-typer: 1.1.0
- mime-types: 3.0.1
-
- typedoc@0.27.9(typescript@5.8.3):
- dependencies:
- '@gerrit0/mini-shiki': 1.27.2
- lunr: 2.3.9
- markdown-it: 14.1.0
- minimatch: 9.0.5
- typescript: 5.8.3
- yaml: 2.7.1
-
- typescript-eslint@8.32.0(eslint@9.26.0)(typescript@5.8.3):
- dependencies:
- '@typescript-eslint/eslint-plugin': 8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0)(typescript@5.8.3))(eslint@9.26.0)(typescript@5.8.3)
- '@typescript-eslint/parser': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- '@typescript-eslint/utils': 8.32.0(eslint@9.26.0)(typescript@5.8.3)
- eslint: 9.26.0
- typescript: 5.8.3
- transitivePeerDependencies:
- - supports-color
-
- typescript@5.8.3: {}
-
- uc.micro@2.1.0: {}
-
- ulid@2.4.0: {}
-
- undici-types@6.21.0: {}
-
- unpipe@1.0.0: {}
-
- uri-js@4.4.1:
- dependencies:
- punycode: 2.3.1
-
- vary@1.1.2: {}
-
- which@2.0.2:
- dependencies:
- isexe: 2.0.0
-
- word-wrap@1.2.5: {}
-
- wrappy@1.0.2: {}
-
- yaml@2.7.1: {}
-
- yocto-queue@0.1.0: {}
-
- zod-to-json-schema@3.24.5(zod@3.24.4):
- dependencies:
- zod: 3.24.4
-
- zod@3.24.4: {}
diff --git a/src/Client.ts b/src/Client.ts
index f11846b5..6b456a41 100644
--- a/src/Client.ts
+++ b/src/Client.ts
@@ -1,40 +1,37 @@
-import type { Accessor, Setter } from "solid-js";
-import { batch, createSignal } from "solid-js";
-
import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
-import { API } from "revolt-api";
-import type { DataLogin, RevoltConfig, Role } from "revolt-api";
-
-import type { Channel } from "./classes/Channel.js";
-import type { Emoji } from "./classes/Emoji.js";
-import type { Message } from "./classes/Message.js";
-import type { Server } from "./classes/Server.js";
-import type { ServerMember } from "./classes/ServerMember.js";
-import type { User } from "./classes/User.js";
-import { AccountCollection } from "./collections/AccountCollection.js";
-import { BotCollection } from "./collections/BotCollection.js";
-import { ChannelCollection } from "./collections/ChannelCollection.js";
-import { ChannelUnreadCollection } from "./collections/ChannelUnreadCollection.js";
-import { ChannelWebhookCollection } from "./collections/ChannelWebhookCollection.js";
-import { EmojiCollection } from "./collections/EmojiCollection.js";
-import { MessageCollection } from "./collections/MessageCollection.js";
-import { ServerCollection } from "./collections/ServerCollection.js";
-import { ServerMemberCollection } from "./collections/ServerMemberCollection.js";
-import { SessionCollection } from "./collections/SessionCollection.js";
-import { UserCollection } from "./collections/UserCollection.js";
+import type { DataLogin, RevoltConfig } from "revolt-api";
+import { API, type Error, type Role } from "revolt-api";
+
+import type { Channel } from "./classes/Channel.ts";
+import type { Emoji } from "./classes/Emoji.ts";
+import type { Message } from "./classes/Message.ts";
+import type { Server } from "./classes/Server.ts";
+import type { ServerMember } from "./classes/ServerMember.ts";
+import type { User } from "./classes/User.ts";
+import { AccountCollection } from "./collections/AccountCollection.ts";
+import { BotCollection } from "./collections/BotCollection.ts";
+import { ChannelCollection } from "./collections/ChannelCollection.ts";
+import { ChannelUnreadCollection } from "./collections/ChannelUnreadCollection.ts";
+import { ChannelWebhookCollection } from "./collections/ChannelWebhookCollection.ts";
+import { EmojiCollection } from "./collections/EmojiCollection.ts";
+import { MessageCollection } from "./collections/MessageCollection.ts";
+import { ServerCollection } from "./collections/ServerCollection.ts";
+import { ServerMemberCollection } from "./collections/ServerMemberCollection.ts";
+import { SessionCollection } from "./collections/SessionCollection.ts";
+import { UserCollection } from "./collections/UserCollection.ts";
import {
ConnectionState,
EventClient,
type EventClientOptions,
-} from "./events/EventClient.js";
-import { ProtocolV1, handleEvent } from "./events/v1.js";
-import type { HydratedChannel } from "./hydration/channel.js";
-import type { HydratedEmoji } from "./hydration/emoji.js";
-import type { HydratedMessage } from "./hydration/message.js";
-import type { HydratedServer } from "./hydration/server.js";
-import type { HydratedServerMember } from "./hydration/serverMember.js";
-import type { HydratedUser } from "./hydration/user.js";
-import { RE_CHANNELS, RE_MENTIONS, RE_SPOILER } from "./lib/regex.js";
+} from "./events/EventClient.ts";
+import { handleEvent, type ProtocolV1 } from "./events/v1.ts";
+import type { HydratedChannel } from "./hydration/channel.ts";
+import type { HydratedEmoji } from "./hydration/emoji.ts";
+import type { HydratedMessage } from "./hydration/message.ts";
+import type { HydratedServer } from "./hydration/server.ts";
+import type { HydratedServerMember } from "./hydration/serverMember.ts";
+import type { HydratedUser } from "./hydration/user.ts";
+import { RE_CHANNELS, RE_MENTIONS, RE_SPOILER } from "./lib/regex.ts";
export type Session = { _id: string; token: string; user_id: string } | string;
@@ -42,8 +39,7 @@ export type Session = { _id: string; token: string; user_id: string } | string;
* Events provided by the client
*/
export type Events = {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- error: [error: any];
+ error: [Event | Error];
connected: [];
connecting: [];
@@ -165,31 +161,33 @@ export type ClientOptions = Partial & {
* Revolt.js Clients
*/
export class Client extends AsyncEventEmitter {
- readonly account;
- readonly bots;
- readonly channels;
- readonly channelUnreads;
- readonly channelWebhooks;
- readonly emojis;
- readonly messages;
- readonly servers;
- readonly serverMembers;
- readonly sessions;
- readonly users;
+ readonly account: AccountCollection = new AccountCollection(this);
+ readonly bots: BotCollection = new BotCollection(this);
+ readonly channels: ChannelCollection = new ChannelCollection(this);
+ readonly channelUnreads: ChannelUnreadCollection =
+ new ChannelUnreadCollection(this);
+ readonly channelWebhooks: ChannelWebhookCollection =
+ new ChannelWebhookCollection(this);
+ readonly emojis: EmojiCollection = new EmojiCollection(this);
+ readonly messages: MessageCollection = new MessageCollection(this);
+ readonly servers: ServerCollection = new ServerCollection(this);
+ readonly serverMembers: ServerMemberCollection = new ServerMemberCollection(
+ this,
+ );
+ readonly sessions: SessionCollection = new SessionCollection(this);
+ readonly users: UserCollection = new UserCollection(this);
readonly api: API;
readonly options: ClientOptions;
readonly events: EventClient<1>;
- configuration: RevoltConfig | undefined;
+ public configuration: RevoltConfig | undefined;
#session: Session | undefined;
user: User | undefined;
- readonly ready: Accessor;
- #setReady: Setter;
+ ready = false;
+ connectionFailureCount = 0;
- readonly connectionFailureCount: Accessor;
- #setConnectionFailureCount: Setter;
#reconnectTimeout: number | undefined;
/**
@@ -239,36 +237,14 @@ export class Client extends AsyncEventEmitter {
baseURL: this.options.baseURL,
});
- const [ready, setReady] = createSignal(false);
- this.ready = ready;
- this.#setReady = setReady;
-
- const [connectionFailureCount, setConnectionFailureCount] = createSignal(0);
- this.connectionFailureCount = connectionFailureCount;
- this.#setConnectionFailureCount = setConnectionFailureCount;
-
- this.account = new AccountCollection(this);
- this.bots = new BotCollection(this);
- this.channels = new ChannelCollection(this);
- this.channelUnreads = new ChannelUnreadCollection(this);
- this.channelWebhooks = new ChannelWebhookCollection(this);
- this.emojis = new EmojiCollection(this);
- this.messages = new MessageCollection(this);
- this.servers = new ServerCollection(this);
- this.serverMembers = new ServerMemberCollection(this);
- this.sessions = new SessionCollection(this);
- this.users = new UserCollection(this);
-
this.events = new EventClient(1, "json", this.options);
this.events.on("error", (error) => this.emit("error", error));
this.events.on("state", (state) => {
switch (state) {
case ConnectionState.Connected:
- batch(() => {
- this.servers.forEach((server) => server.resetSyncStatus());
- this.#setConnectionFailureCount(0);
- this.emit("connected");
- });
+ this.servers.forEach((server) => server.resetSyncStatus());
+ this.connectionFailureCount = 0;
+ this.emit("connected");
break;
case ConnectionState.Connecting:
this.emit("connecting");
@@ -278,19 +254,24 @@ export class Client extends AsyncEventEmitter {
if (this.options.autoReconnect) {
this.#reconnectTimeout = setTimeout(
() => this.connect(),
- this.options.retryDelayFunction(this.connectionFailureCount()) *
+ this.options.retryDelayFunction(this.connectionFailureCount) *
1e3,
) as never;
- this.#setConnectionFailureCount((count) => count + 1);
+ this.connectionFailureCount += 1;
}
break;
}
});
this.events.on("event", (event) =>
- handleEvent(this, event, this.#setReady),
- );
+ handleEvent(
+ this,
+ event,
+ ((value: boolean) => {
+ this.ready = value;
+ }).bind(this),
+ ));
}
/**
@@ -315,7 +296,7 @@ export class Client extends AsyncEventEmitter {
connect(): void {
clearTimeout(this.#reconnectTimeout);
this.events.disconnect();
- this.#setReady(false);
+ this.ready = false;
this.events.connect(
this.configuration?.ws ?? "wss://ws.revolt.chat",
typeof this.#session === "string" ? this.#session : this.#session!.token,
@@ -413,9 +394,11 @@ export class Client extends AsyncEventEmitter {
*/
proxyFile(url: string): string | undefined {
if (this.configuration?.features.january.enabled) {
- return `${this.configuration.features.january.url}/proxy?url=${encodeURIComponent(
- url,
- )}`;
+ return `${this.configuration.features.january.url}/proxy?url=${
+ encodeURIComponent(
+ url,
+ )
+ }`;
} else {
return url;
}
@@ -436,7 +419,7 @@ export class Client extends AsyncEventEmitter {
body.append("file", file);
const [key, value] = this.authenticationHeader;
- const data: { id: string } = await fetch(
+ const data: { id: string } = await (await fetch(
`${uploadUrl ?? this.configuration?.features.autumn.url}/${tag}`,
{
method: "POST",
@@ -445,7 +428,7 @@ export class Client extends AsyncEventEmitter {
[key]: value,
},
},
- ).then((res) => res.json());
+ )).json();
return data.id;
}
diff --git a/src/classes/BannedUser.ts b/src/classes/BannedUser.ts
index 4283cc71..f13defbc 100644
--- a/src/classes/BannedUser.ts
+++ b/src/classes/BannedUser.ts
@@ -1,8 +1,8 @@
import type { BannedUser as APIBannedUser } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import { File } from "./File.js";
+import { File } from "./File.ts";
/**
* Banned User
diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts
index 9942a400..990cc7f4 100644
--- a/src/classes/Bot.ts
+++ b/src/classes/Bot.ts
@@ -1,11 +1,11 @@
import type { DataEditBot } from "revolt-api";
import { decodeTime } from "ulid";
-import type { BotCollection } from "../collections/BotCollection.js";
-import type { BotFlags } from "../hydration/bot.js";
+import type { BotCollection } from "../collections/BotCollection.ts";
+import type { BotFlags } from "../hydration/bot.ts";
-import { PublicBot } from "./PublicBot.js";
-import type { User } from "./User.js";
+import { PublicBot } from "./PublicBot.ts";
+import type { User } from "./User.ts";
/**
* Bot Class
diff --git a/src/classes/Channel.ts b/src/classes/Channel.ts
index eb7b4917..535ee1d1 100644
--- a/src/classes/Channel.ts
+++ b/src/classes/Channel.ts
@@ -1,34 +1,30 @@
-import { batch } from "solid-js";
-
-import type { ReactiveSet } from "@solid-primitives/set";
import type {
+ API,
Channel as APIChannel,
- Member as APIMember,
- Message as APIMessage,
- User as APIUser,
DataEditChannel,
DataMessageSearch,
DataMessageSend,
- Invite,
+ Member as APIMember,
+ Message as APIMessage,
Override,
+ User as APIUser,
} from "revolt-api";
-import type { APIRoutes } from "revolt-api/lib/routes";
import { decodeTime, ulid } from "ulid";
-import { ChannelCollection } from "../collections/index.js";
-import { hydrate } from "../hydration/index.js";
+import type { ChannelCollection } from "../collections/ChannelCollection.ts";
+import { hydrate } from "../hydration/index.ts";
import {
bitwiseAndEq,
calculatePermission,
-} from "../permissions/calculator.js";
-import { Permission } from "../permissions/definitions.js";
+} from "../permissions/calculator.ts";
+import { Permission } from "../permissions/definitions.ts";
-import type { ChannelWebhook } from "./ChannelWebhook.js";
-import type { File } from "./File.js";
-import type { Message } from "./Message.js";
-import type { Server } from "./Server.js";
-import type { ServerMember } from "./ServerMember.js";
-import type { User } from "./User.js";
+import type { ChannelWebhook } from "./ChannelWebhook.ts";
+import type { File } from "./File.ts";
+import type { Message } from "./Message.ts";
+import type { Server } from "./Server.ts";
+import type { ServerMember } from "./ServerMember.ts";
+import type { User } from "./User.ts";
/**
* Channel Class
@@ -110,8 +106,8 @@ export class Channel {
return this.type === "SavedMessages"
? this.user?.username
: this.type === "DirectMessage"
- ? this.recipient?.username
- : this.name;
+ ? this.recipient?.username
+ : this.name;
}
/**
@@ -138,7 +134,7 @@ export class Channel {
/**
* User ids of people currently typing in channel
*/
- get typingIds(): ReactiveSet {
+ get typingIds(): Set {
return this.#collection.getUnderlyingObject(this.id).typingIds;
}
@@ -154,7 +150,7 @@ export class Channel {
/**
* User ids of recipients of the group
*/
- get recipientIds(): ReactiveSet {
+ get recipientIds(): Set {
return this.#collection.getUnderlyingObject(this.id).recipientIds;
}
@@ -173,8 +169,8 @@ export class Channel {
get recipient(): User | undefined {
return this.type === "DirectMessage"
? this.recipients?.find(
- (user) => user?.id !== this.#collection.client.user!.id,
- )
+ (user) => user?.id !== this.#collection.client.user!.id,
+ )
: undefined;
}
@@ -293,8 +289,9 @@ export class Channel {
this.type === "SavedMessages" ||
this.type === "VoiceChannel" ||
this.#collection.client.options.channelExclusiveMuted(this)
- )
+ ) {
return false;
+ }
const unread = this.#collection.client.channelUnreads.for(this);
return (
@@ -313,9 +310,10 @@ export class Channel {
/**
* Get mentions in this channel for user.
*/
- get mentions(): ReactiveSet | undefined {
- if (this.type === "SavedMessages" || this.type === "VoiceChannel")
+ get mentions(): Set | undefined {
+ if (this.type === "SavedMessages" || this.type === "VoiceChannel") {
return undefined;
+ }
return this.#collection.client.channelUnreads.get(this.id)
?.messageMentionIds;
@@ -384,7 +382,7 @@ export class Channel {
orPermission(...permission: (keyof typeof Permission)[]): boolean {
return (
permission.findIndex((x) =>
- bitwiseAndEq(this.permission, Permission[x]),
+ bitwiseAndEq(this.permission, Permission[x])
) !== -1
);
}
@@ -399,10 +397,8 @@ export class Channel {
`/channels/${this.id as ""}/members`,
);
- return batch(() =>
- members.map((user) =>
- this.#collection.client.users.getOrCreate(user._id, user),
- ),
+ return members.map((user) =>
+ this.#collection.client.users.getOrCreate(user._id, user)
);
}
@@ -435,13 +431,8 @@ export class Channel {
`/channels/${this.id as ""}/webhooks`,
);
- return batch(() =>
- webhooks.map((webhook) =>
- this.#collection.client.channelWebhooks.getOrCreate(
- webhook.id,
- webhook,
- ),
- ),
+ return webhooks.map((webhook) =>
+ this.#collection.client.channelWebhooks.getOrCreate(webhook.id, webhook)
);
}
@@ -455,7 +446,7 @@ export class Channel {
data,
);
- this.#collection.updateUnderlyingObject(
+ this.#collection.setUnderlyingObject(
this.id,
hydrate("channel", channel, this.#collection.client, false),
);
@@ -472,7 +463,7 @@ export class Channel {
});
if (this.type === "DirectMessage") {
- this.#collection.updateUnderlyingObject(this.id, "active", false);
+ this.#collection.setUnderlyingKey(this.id, "active", false);
return;
}
@@ -511,8 +502,9 @@ export class Channel {
data: string | DataMessageSend,
idempotencyKey: string = ulid(),
): Promise {
- const msg: DataMessageSend =
- typeof data === "string" ? { content: data } : data;
+ const msg: DataMessageSend = typeof data === "string"
+ ? { content: data }
+ : data;
// Mark as silent message
if (msg.content?.startsWith("@silent ")) {
@@ -560,10 +552,7 @@ export class Channel {
*/
async fetchMessages(
params?: Omit<
- (APIRoutes & {
- method: "get";
- path: "/channels/{target}/messages";
- })["params"],
+ (Parameters & ["/channels//messages", { method: "get" }])[1],
"include_users"
>,
): Promise {
@@ -573,7 +562,7 @@ export class Channel {
)) as APIMessage[];
return messages.map((message) =>
- this.#collection.client.messages.getOrCreate(message._id, message),
+ this.#collection.client.messages.getOrCreate(message._id, message)
);
}
@@ -585,10 +574,7 @@ export class Channel {
*/
async fetchMessagesWithUsers(
params?: Omit<
- (APIRoutes & {
- method: "get";
- path: "/channels/{target}/messages";
- })["params"],
+ (Parameters & ["/channels//messages", { method: "get" }])[1],
"include_users"
>,
): Promise<{
@@ -601,17 +587,17 @@ export class Channel {
{ ...params, include_users: true },
)) as { messages: APIMessage[]; users: APIUser[]; members?: APIMember[] };
- return batch(() => ({
+ return {
messages: data.messages.map((message) =>
- this.#collection.client.messages.getOrCreate(message._id, message),
+ this.#collection.client.messages.getOrCreate(message._id, message)
),
users: data.users.map((user) =>
- this.#collection.client.users.getOrCreate(user._id, user),
+ this.#collection.client.users.getOrCreate(user._id, user)
),
members: data.members?.map((member) =>
- this.#collection.client.serverMembers.getOrCreate(member._id, member),
+ this.#collection.client.serverMembers.getOrCreate(member._id, member)
),
- }));
+ };
}
/**
@@ -628,10 +614,8 @@ export class Channel {
params,
)) as APIMessage[];
- return batch(() =>
- messages.map((message) =>
- this.#collection.client.messages.getOrCreate(message._id, message),
- ),
+ return messages.map((message) =>
+ this.#collection.client.messages.getOrCreate(message._id, message)
);
}
@@ -656,17 +640,17 @@ export class Channel {
},
)) as { messages: APIMessage[]; users: APIUser[]; members?: APIMember[] };
- return batch(() => ({
+ return {
messages: data.messages.map((message) =>
- this.#collection.client.messages.getOrCreate(message._id, message),
+ this.#collection.client.messages.getOrCreate(message._id, message)
),
users: data.users.map((user) =>
- this.#collection.client.users.getOrCreate(user._id, user),
+ this.#collection.client.users.getOrCreate(user._id, user)
),
members: data.members?.map((member) =>
- this.#collection.client.serverMembers.getOrCreate(member._id, member),
+ this.#collection.client.serverMembers.getOrCreate(member._id, member)
),
- }));
+ };
}
/**
@@ -688,7 +672,16 @@ export class Channel {
* @requires `TextChannel`, `VoiceChannel`
* @returns Newly created invite code
*/
- async createInvite(): Promise {
+ async createInvite(): Promise<
+ | {
+ type: "Server";
+ _id: string;
+ server: string;
+ creator: string;
+ channel: string;
+ }
+ | { type: "Group"; _id: string; creator: string; channel: string }
+ > {
return await this.#collection.client.api.post(
`/channels/${this.id as ""}/invites`,
);
@@ -706,39 +699,39 @@ export class Channel {
* @param skipNextMarking For internal usage only
* @requires `SavedMessages`, `DirectMessage`, `Group`, `TextChannel`
*/
- async ack(
+ ack(
message?: Message | string,
skipRateLimiter?: boolean,
skipRequest?: boolean,
skipNextMarking?: boolean,
- ): Promise {
+ ): void {
if (!message && this.#manuallyMarked) {
this.#manuallyMarked = false;
return;
- }
- // Skip the next unread marking
+ } // Skip the next unread marking
else if (skipNextMarking) {
this.#manuallyMarked = true;
}
const lastMessageId =
(typeof message === "string" ? message : message?.id) ??
- this.lastMessageId ??
- ulid();
+ this.lastMessageId ??
+ ulid();
const channelUnread = this.#collection.client.channelUnreads.for(this);
- batch(() => {
- this.#collection.client.channelUnreads.updateUnderlyingObject(
- this.id,
- "lastMessageId",
+ this.#collection.client.channelUnreads.setUnderlyingObject(
+ this.id,
+ {
+ ...channelUnread,
lastMessageId,
- );
+ messageMentionIds: channelUnread.messageMentionIds,
+ },
+ );
- if (channelUnread.messageMentionIds.size) {
- channelUnread.messageMentionIds.clear();
- }
- });
+ if (channelUnread.messageMentionIds.size) {
+ channelUnread.messageMentionIds.clear();
+ }
// Skip request if not needed
if (skipRequest) return;
@@ -780,7 +773,7 @@ export class Channel {
): Promise {
return await this.#collection.client.api.put(
`/channels/${this.id as ""}/permissions/${role_id as ""}`,
- { permissions: permissions as never },
+ { permissions: permissions as Override },
);
}
diff --git a/src/classes/ChannelUnread.ts b/src/classes/ChannelUnread.ts
index 4b31911c..59ca9917 100644
--- a/src/classes/ChannelUnread.ts
+++ b/src/classes/ChannelUnread.ts
@@ -1,6 +1,4 @@
-import type { ReactiveSet } from "@solid-primitives/set";
-
-import type { ChannelUnreadCollection } from "../collections/ChannelUnreadCollection.js";
+import type { ChannelUnreadCollection } from "../collections/ChannelUnreadCollection.ts";
/**
* Channel Unread Class
@@ -36,7 +34,7 @@ export class ChannelUnread {
/**
* List of message IDs that we were mentioned in
*/
- get messageMentionIds(): ReactiveSet {
+ get messageMentionIds(): Set {
return this.#collection.getUnderlyingObject(this.id).messageMentionIds;
}
}
diff --git a/src/classes/ChannelWebhook.ts b/src/classes/ChannelWebhook.ts
index fee8e17c..45f26b86 100644
--- a/src/classes/ChannelWebhook.ts
+++ b/src/classes/ChannelWebhook.ts
@@ -1,10 +1,10 @@
-import { DataEditWebhook } from "revolt-api";
+import type { DataEditWebhook } from "revolt-api";
-import type { ChannelWebhookCollection } from "../collections/ChannelWebhookCollection.js";
-import { hydrate } from "../hydration/index.js";
+import type { ChannelWebhookCollection } from "../collections/ChannelWebhookCollection.ts";
+import { hydrate } from "../hydration/index.ts";
-import type { Channel } from "./Channel.js";
-import type { File } from "./File.js";
+import type { Channel } from "./Channel.ts";
+import type { File } from "./File.ts";
/**
* Channel Webhook Class
@@ -85,7 +85,7 @@ export class ChannelWebhook {
data,
);
- this.#collection.updateUnderlyingObject(
+ this.#collection.setUnderlyingObject(
this.id,
hydrate("channelWebhook", webhook, this.#collection.client),
);
diff --git a/src/classes/Emoji.ts b/src/classes/Emoji.ts
index efbcec47..85145459 100644
--- a/src/classes/Emoji.ts
+++ b/src/classes/Emoji.ts
@@ -1,9 +1,9 @@
import type { EmojiParent } from "revolt-api";
import { decodeTime } from "ulid";
-import type { EmojiCollection } from "../collections/EmojiCollection.js";
+import type { EmojiCollection } from "../collections/EmojiCollection.ts";
-import type { User } from "./User.js";
+import type { User } from "./User.ts";
/**
* Emoji Class
@@ -84,10 +84,8 @@ export class Emoji {
/**
* URL to emoji
*/
- get url() {
- return `${this.#collection.client.configuration?.features.autumn.url}/emojis/${
- this.id
- }`;
+ get url(): string {
+ return `${this.#collection.client.configuration?.features.autumn.url}/emojis/${this.id}`;
}
/**
diff --git a/src/classes/File.ts b/src/classes/File.ts
index fd3fb652..d8a63417 100644
--- a/src/classes/File.ts
+++ b/src/classes/File.ts
@@ -1,6 +1,6 @@
import type { File as APIFile, Metadata } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
/**
* Uploaded File
@@ -56,33 +56,18 @@ export class File {
this.size = file.size;
}
- /**
- * Direct URL to the file
- */
- // get url(): string {
- // if (!this.filename) return this.previewUrl;
- //
- // return `${this.#client.configuration?.features.autumn.url}/${this.tag}/${
- // this.id
- // }/${this.filename}`;
- // }
-
/**
* Preview URL for the file
*/
get previewUrl(): string {
- return `${this.#client.configuration?.features.autumn.url}/${
- this.tag
- }/${this.id}`;
+ return `${this.#client.configuration?.features.autumn.url}/${this.tag}/${this.id}`;
}
/**
* Original download URL for the file
*/
get originalUrl(): string {
- return `${this.#client.configuration?.features.autumn.url}/${
- this.tag
- }/${this.id}/original`;
+ return `${this.#client.configuration?.features.autumn.url}/${this.tag}/${this.id}/original`;
}
/**
diff --git a/src/classes/Invite.ts b/src/classes/Invite.ts
index 6fc03161..32b6e231 100644
--- a/src/classes/Invite.ts
+++ b/src/classes/Invite.ts
@@ -1,10 +1,10 @@
import type { Invite } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import type { Channel } from "./Channel.js";
-import type { Server } from "./Server.js";
-import type { User } from "./User.js";
+import type { Channel } from "./Channel.ts";
+import type { Server } from "./Server.ts";
+import type { User } from "./User.ts";
/**
* Channel Invite
diff --git a/src/classes/MFA.ts b/src/classes/MFA.ts
index 72255332..6eaccf61 100644
--- a/src/classes/MFA.ts
+++ b/src/classes/MFA.ts
@@ -1,21 +1,18 @@
-import type { SetStoreFunction } from "solid-js/store";
-import { createStore } from "solid-js/store";
-
import type {
MFAMethod,
MFAResponse,
- MultiFactorStatus,
MFATicket as TicketType,
+ MultiFactorStatus,
} from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
/**
* Multi-Factor Authentication
*/
export class MFA {
#client: Client;
- #store: [MultiFactorStatus, SetStoreFunction];
+ #store: MultiFactorStatus;
/**
* Construct MFA helper
@@ -24,21 +21,30 @@ export class MFA {
*/
constructor(client: Client, state: MultiFactorStatus) {
this.#client = client;
- this.#store = createStore(state);
+ this.#store = state;
+ }
+
+ /**
+ * Set MFA status
+ * @param key key to set
+ * @param value boolean
+ */
+ #setStore(key: keyof MultiFactorStatus, value: boolean): void {
+ this.#store[key] = value;
}
/**
* Whether authenticator app is enabled
*/
get authenticatorEnabled(): boolean {
- return this.#store[0].totp_mfa;
+ return this.#store.totp_mfa;
}
/**
* Whether recovery codes are enabled
*/
get recoveryEnabled(): boolean {
- return this.#store[0].recovery_active;
+ return this.#store.recovery_active;
}
/**
@@ -46,9 +52,7 @@ export class MFA {
*/
get availableMethods(): MFAMethod[] {
return this.authenticatorEnabled
- ? this.recoveryEnabled
- ? ["Totp", "Recovery"]
- : ["Totp"]
+ ? this.recoveryEnabled ? ["Totp", "Recovery"] : ["Totp"]
: ["Password"];
}
@@ -61,7 +65,7 @@ export class MFA {
return new MFATicket(
this.#client,
await this.#client.api.put("/auth/mfa/ticket", params),
- this.#store[1]
+ this.#setStore.bind(this),
);
}
@@ -71,7 +75,7 @@ export class MFA {
*/
async enableAuthenticator(token: string): Promise {
await this.#client.api.put("/auth/mfa/totp", { totp_code: token });
- this.#store[1]("totp_mfa", true);
+ this.#setStore("totp_mfa", true);
}
}
@@ -81,7 +85,7 @@ export class MFA {
export class MFATicket {
#client: Client;
#ticket: TicketType;
- #mutate: SetStoreFunction;
+ #mutate: (key: keyof MultiFactorStatus, value: boolean) => void;
#used = false;
/**
@@ -93,7 +97,7 @@ export class MFATicket {
constructor(
client: Client,
ticket: TicketType,
- mutate: SetStoreFunction,
+ mutate: (key: keyof MultiFactorStatus, value: boolean) => void,
) {
this.#client = client;
this.#ticket = ticket;
diff --git a/src/classes/Message.ts b/src/classes/Message.ts
index 72a662c4..f9117cfe 100644
--- a/src/classes/Message.ts
+++ b/src/classes/Message.ts
@@ -1,26 +1,24 @@
-import type { ReactiveMap } from "@solid-primitives/map";
-import type { ReactiveSet } from "@solid-primitives/set";
import type {
- Message as APIMessage,
- MessageWebhook as APIMessageWebhook,
DataEditMessage,
DataMessageSend,
Masquerade,
+ Message as APIMessage,
+ MessageWebhook as APIMessageWebhook,
} from "revolt-api";
import { decodeTime } from "ulid";
-import type { Client } from "../Client.js";
-import type { MessageCollection } from "../collections/MessageCollection.js";
-import { MessageFlags } from "../hydration/message.js";
+import type { Client } from "../Client.ts";
+import type { MessageCollection } from "../collections/MessageCollection.ts";
+import { MessageFlags } from "../hydration/message.ts";
-import type { Channel } from "./Channel.js";
-import { File } from "./File.js";
-import type { MessageEmbed } from "./MessageEmbed.js";
-import type { Server } from "./Server.js";
-import type { ServerMember } from "./ServerMember.js";
-import { ServerRole } from "./ServerRole.js";
-import type { SystemMessage } from "./SystemMessage.js";
-import type { User } from "./User.js";
+import type { Channel } from "./Channel.ts";
+import { File } from "./File.ts";
+import type { MessageEmbed } from "./MessageEmbed.ts";
+import type { Server } from "./Server.ts";
+import type { ServerMember } from "./ServerMember.ts";
+import type { ServerRole } from "./ServerRole.ts";
+import type { SystemMessage } from "./SystemMessage.ts";
+import type { User } from "./User.ts";
/**
* Message Class
@@ -63,7 +61,7 @@ export class Message {
/**
* URL to this message
*/
- get url(): string | undefined {
+ get url(): string {
return this.#collection.client.configuration?.app + this.path;
}
@@ -218,7 +216,7 @@ export class Message {
/**
* Reactions
*/
- get reactions(): ReactiveMap> {
+ get reactions(): Map> {
return this.#collection.getUnderlyingObject(this.id).reactions;
}
@@ -258,9 +256,9 @@ export class Message {
return (
this.masquerade?.name ??
- (webhook
- ? webhook.name
- : (this.member?.nickname ?? this.author?.username))
+ (webhook
+ ? webhook.name
+ : (this.member?.nickname ?? this.author?.username))
);
}
@@ -279,9 +277,9 @@ export class Message {
return (
this.masqueradeAvatarURL ??
- (webhook
- ? webhook.avatarURL
- : (this.member?.avatarURL ?? this.author?.avatarURL))
+ (webhook
+ ? webhook.avatarURL
+ : (this.member?.avatarURL ?? this.author?.avatarURL))
);
}
@@ -293,9 +291,9 @@ export class Message {
return (
this.masqueradeAvatarURL ??
- (webhook
- ? webhook.avatarURL
- : this.member
+ (webhook
+ ? webhook.avatarURL
+ : this.member
? this.member?.animatedAvatarURL
: this.author?.animatedAvatarURL)
);
@@ -350,8 +348,8 @@ export class Message {
data:
| string
| (Omit & {
- nonce?: string;
- }),
+ nonce?: string;
+ }),
mention = true,
): Promise | undefined {
const obj = typeof data === "string" ? { content: data } : data;
@@ -376,9 +374,8 @@ export class Message {
*/
async react(emoji: string): Promise {
return await this.#collection.client.api.put(
- `/channels/${this.channelId as ""}/messages/${this.id as ""}/reactions/${
- emoji as ""
- }`,
+ `/channels/${this.channelId as ""}/messages/${this
+ .id as ""}/reactions/${emoji as ""}`,
);
}
@@ -388,9 +385,8 @@ export class Message {
*/
async unreact(emoji: string): Promise {
return await this.#collection.client.api.delete(
- `/channels/${this.channelId as ""}/messages/${this.id as ""}/reactions/${
- emoji as ""
- }`,
+ `/channels/${this.channelId as ""}/messages/${this
+ .id as ""}/reactions/${emoji as ""}`,
);
}
@@ -434,14 +430,14 @@ export class MessageWebhook {
this.name = webhook.name;
this.avatar = webhook.avatar
? new File(client, {
- _id: webhook.avatar,
- tag: "avatars",
- metadata: {
- type: "Image",
- width: 256,
- height: 256,
- },
- })
+ _id: webhook.avatar,
+ tag: "avatars",
+ metadata: {
+ type: "Image",
+ width: 256,
+ height: 256,
+ },
+ })
: undefined;
}
@@ -451,7 +447,7 @@ export class MessageWebhook {
get avatarURL(): string {
return (
this.avatar?.createFileURL() ??
- `${this.#client.options.baseURL}/users/${this.id}/default_avatar`
+ `${this.#client.options.baseURL}/users/${this.id}/default_avatar`
);
}
}
diff --git a/src/classes/MessageEmbed.ts b/src/classes/MessageEmbed.ts
index 5b6b77c9..516a1fe9 100644
--- a/src/classes/MessageEmbed.ts
+++ b/src/classes/MessageEmbed.ts
@@ -1,8 +1,8 @@
import type { Embed, ImageSize, Special } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import { File } from "./File.js";
+import { File } from "./File.ts";
/**
* Message Embed
@@ -168,25 +168,27 @@ export class WebsiteEmbed extends MessageEmbed {
return `https://www.youtube-nocookie.com/embed/${this.specialContent.id}?modestbranding=1${timestamp}`;
}
case "Twitch":
- return `https://player.twitch.tv/?${this.specialContent.content_type.toLowerCase()}=${
- this.specialContent.id
- }&parent=${(window ?? {})?.location?.hostname}&autoplay=false`;
+ return `https://player.twitch.tv/?${this.specialContent.content_type.toLowerCase()}=${this.specialContent.id}&parent=${
+ (location ?? {})?.hostname
+ }&autoplay=false`;
case "Lightspeed":
return `https://new.lightspeed.tv/embed/${this.specialContent.id}/stream`;
case "Spotify":
return `https://open.spotify.com/embed/${this.specialContent.content_type}/${this.specialContent.id}`;
case "Soundcloud":
- return `https://w.soundcloud.com/player/?url=${encodeURIComponent(
- this.url!,
- )}&color=%23FF7F50&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
+ return `https://w.soundcloud.com/player/?url=${
+ encodeURIComponent(
+ this.url!,
+ )
+ }&color=%23FF7F50&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
case "Bandcamp": {
- return `https://bandcamp.com/EmbeddedPlayer/${this.specialContent.content_type.toLowerCase()}=${
- this.specialContent.id
- }/size=large/bgcol=181a1b/linkcol=056cc4/tracklist=false/transparent=true/`;
+ return `https://bandcamp.com/EmbeddedPlayer/${this.specialContent.content_type.toLowerCase()}=${this.specialContent.id}/size=large/bgcol=181a1b/linkcol=056cc4/tracklist=false/transparent=true/`;
}
case "Streamable": {
return `https://streamable.com/e/${this.specialContent.id}?loop=0`;
}
+ default:
+ return undefined;
}
}
}
diff --git a/src/classes/PublicBot.ts b/src/classes/PublicBot.ts
index 3653d3f9..2a27b23a 100644
--- a/src/classes/PublicBot.ts
+++ b/src/classes/PublicBot.ts
@@ -1,10 +1,10 @@
import type { File as APIFile, PublicBot as APIPublicBot } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import { Channel } from "./Channel.js";
-import { File } from "./File.js";
-import { Server } from "./Server.js";
+import { Channel } from "./Channel.ts";
+import { File } from "./File.ts";
+import { Server } from "./Server.ts";
/**
* Public Bot Class
@@ -28,9 +28,9 @@ export class PublicBot {
this.username = data.username;
this.avatar = data.avatar
? new File(client, {
- _id: data.avatar,
- tag: "avatars",
- } as APIFile)
+ _id: data.avatar,
+ tag: "avatars",
+ } as APIFile)
: undefined;
this.description = data.description!;
}
diff --git a/src/classes/PublicInvite.ts b/src/classes/PublicInvite.ts
index da3aac40..47995962 100644
--- a/src/classes/PublicInvite.ts
+++ b/src/classes/PublicInvite.ts
@@ -1,12 +1,10 @@
-import { batch } from "solid-js";
-
import type { Invite, InviteResponse } from "revolt-api";
-import type { Client } from "../Client.js";
-import type { ServerFlags } from "../hydration/server.js";
+import type { Client } from "../Client.ts";
+import type { ServerFlags } from "../hydration/server.ts";
-import { File } from "./File.js";
-import type { Server } from "./Server.js";
+import { File } from "./File.ts";
+import type { Server } from "./Server.ts";
/**
* Public Channel Invite
@@ -112,17 +110,15 @@ export class ServerPublicInvite extends PublicChannelInvite {
const invite = await this.client!.api.post(`/invites/${this.code as ""}`);
if (invite.type === "Server") {
- return batch(() => {
- for (const channel of invite.channels) {
- this.client!.channels.getOrCreate(channel._id, channel);
- }
-
- return this.client!.servers.getOrCreate(
- invite.server._id,
- invite.server,
- true,
- );
- });
+ for (const channel of invite.channels) {
+ this.client!.channels.getOrCreate(channel._id, channel);
+ }
+
+ return this.client!.servers.getOrCreate(
+ invite.server._id,
+ invite.server,
+ true,
+ );
} else {
throw "unreachable";
}
diff --git a/src/classes/Server.ts b/src/classes/Server.ts
index 82567057..e091b101 100644
--- a/src/classes/Server.ts
+++ b/src/classes/Server.ts
@@ -1,9 +1,4 @@
-import { batch } from "solid-js";
-
-import type { ReactiveMap } from "@solid-primitives/map";
-import type { ReactiveSet } from "@solid-primitives/set";
import type {
- Server as APIServer,
AllMemberResponse,
BannedUser,
Category,
@@ -13,28 +8,28 @@ import type {
DataEditRole,
DataEditServer,
Override,
- OverrideField,
Role,
+ Server as APIServer,
} from "revolt-api";
import { decodeTime } from "ulid";
-import type { ServerCollection } from "../collections/ServerCollection.js";
-import { hydrate } from "../hydration/index.js";
-import type { ServerFlags } from "../hydration/server.js";
+import type { ServerCollection } from "../collections/ServerCollection.ts";
+import { hydrate } from "../hydration/index.ts";
+import type { ServerFlags } from "../hydration/server.ts";
import {
bitwiseAndEq,
calculatePermission,
-} from "../permissions/calculator.js";
-import { Permission } from "../permissions/definitions.js";
-
-import type { Channel } from "./Channel.js";
-import type { Emoji } from "./Emoji.js";
-import type { File } from "./File.js";
-import { ChannelInvite } from "./Invite.js";
-import { ServerBan } from "./ServerBan.js";
-import { ServerMember } from "./ServerMember.js";
-import { ServerRole } from "./ServerRole.js";
-import { User } from "./User.js";
+} from "../permissions/calculator.ts";
+import { Permission } from "../permissions/definitions.ts";
+
+import type { Channel } from "./Channel.ts";
+import type { Emoji } from "./Emoji.ts";
+import type { File } from "./File.ts";
+import { ChannelInvite } from "./Invite.ts";
+import { ServerBan } from "./ServerBan.ts";
+import { ServerMember } from "./ServerMember.ts";
+import { ServerRole } from "./ServerRole.ts";
+import { User } from "./User.ts";
/**
* Server Class
@@ -52,6 +47,7 @@ export class Server {
this.#collection = collection;
this.id = id;
}
+
/**
* Convert to string
* @returns String
@@ -128,7 +124,7 @@ export class Server {
/**
* Channel IDs
*/
- get channelIds(): ReactiveSet {
+ get channelIds(): Set {
return this.#collection.getUnderlyingObject(this.id).channelIds;
}
@@ -136,9 +132,9 @@ export class Server {
* Channels
*/
get channels(): Channel[] {
- return [
- ...this.#collection.getUnderlyingObject(this.id).channelIds.values(),
- ]
+ return Array.from(
+ this.#collection.getUnderlyingObject(this.id).channelIds.values(),
+ )
.map((id) => this.#collection.client.channels.get(id)!)
.filter((x) => x);
}
@@ -160,7 +156,7 @@ export class Server {
/**
* Roles
*/
- get roles(): ReactiveMap {
+ get roles(): Map {
return this.#collection.getUnderlyingObject(this.id).roles;
}
@@ -269,14 +265,7 @@ export class Server {
* ranking roles. This is dictated by the "rank" property
* which is smaller for higher priority roles.
*/
- get orderedRoles(): {
- name: string;
- permissions: OverrideField;
- colour?: string | null;
- hoist?: boolean;
- rank?: number;
- id: string;
- }[] {
+ get orderedRoles(): Role[] {
const roles = this.roles;
return roles
? [...roles.values()].sort((a, b) => (a.rank || 0) - (b.rank || 0))
@@ -287,8 +276,8 @@ export class Server {
* Check whether the server is currently unread
* @returns Whether the server is unread
*/
- get unread(): boolean {
- return !!this.channels.find((channel) => channel.unread);
+ get unread(): Channel | undefined {
+ return this.channels.find((channel) => channel.unread);
}
/**
@@ -297,7 +286,7 @@ export class Server {
*/
get mentions(): string[] {
const arr = this.channels.map((channel) =>
- Array.from(channel.mentions?.values() ?? []),
+ Array.from(channel.mentions?.values() ?? [])
);
return ([] as string[]).concat(...arr);
@@ -361,7 +350,7 @@ export class Server {
orPermission(...permission: (keyof typeof Permission)[]): boolean {
return (
permission.findIndex((x) =>
- bitwiseAndEq(this.permission, Permission[x]),
+ bitwiseAndEq(this.permission, Permission[x])
) !== -1
);
}
@@ -397,7 +386,7 @@ export class Server {
* @param data Changes
*/
async edit(data: DataEditServer): Promise {
- this.#collection.updateUnderlyingObject(
+ this.#collection.setUnderlyingObject(
this.id,
hydrate(
"server",
@@ -416,7 +405,7 @@ export class Server {
* @param roleIds Role IDs
*/
async setRoleOrdering(roleIds: string[]): Promise {
- this.#collection.updateUnderlyingObject(
+ this.#collection.setUnderlyingObject(
this.id,
hydrate(
"server",
@@ -437,26 +426,22 @@ export class Server {
* @param leaveEvent Whether we are leaving
*/
$delete(leaveEvent?: boolean): void {
- batch(() => {
- const server = this.#collection.client.servers.getUnderlyingObject(
- this.id,
- );
-
- // Avoid race conditions
- if (server.id) {
- this.#collection.client.emit(
- leaveEvent ? "serverLeave" : "serverDelete",
- server,
- );
+ const server = this.#collection.client.servers.getUnderlyingObject(this.id);
- for (const channel of this.channelIds) {
- this.#collection.client.channels.delete(channel);
- }
+ // Avoid race conditions
+ if (server.id) {
+ this.#collection.client.emit(
+ leaveEvent ? "serverLeave" : "serverDelete",
+ server,
+ );
- this.#collection.delete(this.id);
+ for (const channel of this.channelIds) {
+ this.#collection.client.channels.delete(channel);
}
- // TODO: delete members, emoji, etc
- });
+
+ this.#collection.delete(this.id);
+ }
+ // TODO: delete members, emoji, etc
}
/**
@@ -475,11 +460,9 @@ export class Server {
* Mark a server as read
*/
async ack(): Promise {
- batch(() => {
- for (const channel of this.channels) {
- channel.ack(undefined, false, true);
- }
- });
+ for (const channel of this.channels) {
+ channel.ack(undefined, false, true);
+ }
await this.#collection.client.api.put(`/servers/${this.id}/ack`);
}
@@ -493,12 +476,11 @@ export class Server {
user: string | User | ServerMember,
options: DataBanCreate = {},
): Promise {
- const userId =
- user instanceof User
- ? user.id
- : user instanceof ServerMember
- ? user.id.user
- : user;
+ const userId = user instanceof User
+ ? user.id
+ : user instanceof ServerMember
+ ? user.id.user
+ : user;
const ban = await this.#collection.client.api.put(
`/servers/${this.id as ""}/bans/${userId as ""}`,
@@ -518,8 +500,8 @@ export class Server {
typeof user === "string"
? user
: user instanceof User
- ? user.id
- : user.id.user
+ ? user.id
+ : user.id.user
}`,
);
}
@@ -545,7 +527,7 @@ export class Server {
);
return invites.map((invite) =>
- ChannelInvite.from(this.#collection.client, invite),
+ ChannelInvite.from(this.#collection.client, invite)
);
}
@@ -643,7 +625,7 @@ export class Server {
});
if (existing) return existing;
- return this.#collection.client.serverMembers.fetch(this.id, userId);
+ return await this.#collection.client.serverMembers.fetch(this.id, userId);
}
#synced: undefined | "partial" | "full";
@@ -660,31 +642,29 @@ export class Server {
{ exclude_offline: excludeOffline },
);
- batch(() => {
- if (excludeOffline) {
- for (let i = 0; i < data.users.length; i++) {
- const user = data.users[i];
- if (user.online) {
- this.#collection.client.users.getOrCreate(user._id, user);
- this.#collection.client.serverMembers.getOrCreate(
- data.members[i]._id,
- data.members[i],
- );
- }
- }
- } else {
- for (let i = 0; i < data.users.length; i++) {
- this.#collection.client.users.getOrCreate(
- data.users[i]._id,
- data.users[i],
- );
+ if (excludeOffline) {
+ for (let i = 0; i < data.users.length; i++) {
+ const user = data.users[i];
+ if (user.online) {
+ this.#collection.client.users.getOrCreate(user._id, user);
this.#collection.client.serverMembers.getOrCreate(
data.members[i]._id,
data.members[i],
);
}
}
- });
+ } else {
+ for (let i = 0; i < data.users.length; i++) {
+ this.#collection.client.users.getOrCreate(
+ data.users[i]._id,
+ data.users[i],
+ );
+ this.#collection.client.serverMembers.getOrCreate(
+ data.members[i]._id,
+ data.members[i],
+ );
+ }
+ }
}
/**
@@ -704,14 +684,14 @@ export class Server {
`/servers/${this.id as ""}/members`,
)) as AllMemberResponse;
- return batch(() => ({
+ return {
members: data.members.map((member) =>
- this.#collection.client.serverMembers.getOrCreate(member._id, member),
+ this.#collection.client.serverMembers.getOrCreate(member._id, member)
),
users: data.users.map((user) =>
- this.#collection.client.users.getOrCreate(user._id, user),
+ this.#collection.client.users.getOrCreate(user._id, user)
),
- }));
+ };
}
/**
@@ -723,21 +703,22 @@ export class Server {
query: string,
): Promise<{ members: ServerMember[]; users: User[] }> {
const data = (await this.#collection.client.api.get(
- `/servers/${
- this.id as ""
- }/members_experimental_query?experimental_api=true&query=${encodeURIComponent(
- query,
- )}` as never,
+ `/servers/${this
+ .id as ""}/members_experimental_query?experimental_api=true&query=${
+ encodeURIComponent(
+ query,
+ )
+ }` as never,
)) as AllMemberResponse;
- return batch(() => ({
+ return {
members: data.members.map((member) =>
- this.#collection.client.serverMembers.getOrCreate(member._id, member),
+ this.#collection.client.serverMembers.getOrCreate(member._id, member)
),
users: data.users.map((user) =>
- this.#collection.client.users.getOrCreate(user._id, user),
+ this.#collection.client.users.getOrCreate(user._id, user)
),
- }));
+ };
}
/**
@@ -772,10 +753,8 @@ export class Server {
`/servers/${this.id as ""}/emojis`,
);
- return batch(() =>
- emojis.map((emoji) =>
- this.#collection.client.emojis.getOrCreate(emoji._id, emoji),
- ),
+ return emojis.map((emoji) =>
+ this.#collection.client.emojis.getOrCreate(emoji._id, emoji)
);
}
@@ -793,6 +772,8 @@ export class Server {
* @param emojiId Emoji ID
*/
async deleteEmoji(emojiId: string): Promise {
- await this.#collection.client.api.delete(`/custom/emoji/${emojiId}`);
+ return (await this.#collection.client.api.delete(
+ `/custom/emoji/${emojiId}`,
+ )) as void;
}
}
diff --git a/src/classes/ServerBan.ts b/src/classes/ServerBan.ts
index 807f15a5..298787e6 100644
--- a/src/classes/ServerBan.ts
+++ b/src/classes/ServerBan.ts
@@ -1,13 +1,13 @@
import type {
BannedUser as APIBannedUser,
- ServerBan as APIServerBan,
MemberCompositeKey,
+ ServerBan as APIServerBan,
} from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import { BannedUser } from "./BannedUser.js";
-import type { Server } from "./Server.js";
+import { BannedUser } from "./BannedUser.ts";
+import type { Server } from "./Server.ts";
/**
* Server Ban
diff --git a/src/classes/ServerMember.ts b/src/classes/ServerMember.ts
index ec4d2559..8c65fd76 100644
--- a/src/classes/ServerMember.ts
+++ b/src/classes/ServerMember.ts
@@ -5,17 +5,17 @@ import type {
Role,
} from "revolt-api";
-import type { ServerMemberCollection } from "../collections/ServerMemberCollection.js";
+import type { ServerMemberCollection } from "../collections/ServerMemberCollection.ts";
import {
bitwiseAndEq,
calculatePermission,
-} from "../permissions/calculator.js";
-import { Permission } from "../permissions/definitions.js";
+} from "../permissions/calculator.ts";
+import { Permission } from "../permissions/definitions.ts";
-import type { Channel } from "./Channel.js";
-import type { File } from "./File.js";
-import type { Server } from "./Server.js";
-import type { User } from "./User.js";
+import type { Channel } from "./Channel.ts";
+import type { File } from "./File.ts";
+import type { Server } from "./Server.ts";
+import type { User } from "./User.ts";
/**
* Deterministic conversion of member composite key to string ID
@@ -236,13 +236,13 @@ export class ServerMember {
* @param options Ban options
*/
async ban(options: DataBanCreate): Promise {
- this.server?.banUser(this, options);
+ await this.server?.banUser(this, options);
}
/**
* Kick this member from the server
*/
async kick(): Promise {
- this.server?.kickUser(this);
+ await this.server?.kickUser(this);
}
}
diff --git a/src/classes/ServerRole.ts b/src/classes/ServerRole.ts
index d1fa8b39..f2d5f1f2 100644
--- a/src/classes/ServerRole.ts
+++ b/src/classes/ServerRole.ts
@@ -1,6 +1,8 @@
-import type { Role as APIRole, OverrideField } from "revolt-api";
+import type { OverrideField, Role as APIRole } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
+
+import type { Server } from "./Server.ts";
/**
* Server Role
@@ -46,21 +48,21 @@ export class ServerRole {
/**
* Server attached to this role
*/
- get server() {
+ get server(): Server | undefined {
return this.client.servers.get(this.serverId);
}
/**
* Whether this role is assigned to our server member
*/
- get assigned() {
+ get assigned(): boolean {
return this.server?.member?.roles.includes(this.id) || false;
}
/**
* Delete this role
*/
- delete() {
+ delete(): Promise {
return this.server!.deleteRole(this.id);
}
}
diff --git a/src/classes/Session.ts b/src/classes/Session.ts
index bbf244ec..86edcdf0 100644
--- a/src/classes/Session.ts
+++ b/src/classes/Session.ts
@@ -1,6 +1,6 @@
import { decodeTime } from "ulid";
-import type { SessionCollection } from "../collections/SessionCollection.js";
+import type { SessionCollection } from "../collections/SessionCollection.ts";
/**
* Session Class
@@ -64,7 +64,7 @@ export class Session {
friendly_name: name,
});
- this.#collection.updateUnderlyingObject(this.id, "name", name);
+ this.#collection.setUnderlyingKey(this.id, "name", name);
}
/**
diff --git a/src/classes/SystemMessage.ts b/src/classes/SystemMessage.ts
index 922a2ce4..71754a8c 100644
--- a/src/classes/SystemMessage.ts
+++ b/src/classes/SystemMessage.ts
@@ -1,9 +1,9 @@
import type { SystemMessage as APISystemMessage } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import type { User } from "./User.js";
-import { Message } from "./index.js";
+import type { User } from "./User.ts";
+import type { Message } from "./Message.ts";
/**
* System Message
diff --git a/src/classes/User.ts b/src/classes/User.ts
index 2ce6cee9..2daadedb 100644
--- a/src/classes/User.ts
+++ b/src/classes/User.ts
@@ -1,12 +1,18 @@
-import type { User as APIUser, DataEditUser, Presence } from "revolt-api";
+import type {
+ DataEditUser,
+ Presence,
+ RelationshipStatus,
+ User as APIUser,
+} from "revolt-api";
import { decodeTime } from "ulid";
-import type { UserCollection } from "../collections/UserCollection.js";
-import { U32_MAX, UserPermission } from "../permissions/definitions.js";
+import type { UserCollection } from "../collections/UserCollection.ts";
+import type { UserBadges, UserFlags } from "../hydration/user.ts";
+import { U32_MAX, UserPermission } from "../permissions/definitions.ts";
-import type { Channel } from "./Channel.js";
-import type { File } from "./File.js";
-import { UserProfile } from "./UserProfile.js";
+import type { Channel } from "./Channel.ts";
+import type { File } from "./File.ts";
+import { UserProfile } from "./UserProfile.ts";
/**
* User Class
@@ -67,7 +73,7 @@ export class User {
get displayName(): string {
return (
this.#collection.getUnderlyingObject(this.id).displayName ??
- this.#collection.getUnderlyingObject(this.id).username
+ this.#collection.getUnderlyingObject(this.id).username
);
}
@@ -81,7 +87,7 @@ export class User {
/**
* Badges
*/
- get badges(): number {
+ get badges(): UserBadges {
return this.#collection.getUnderlyingObject(this.id).badges;
}
@@ -92,15 +98,16 @@ export class User {
| { text?: string | null; presence?: Presence | null }
| undefined {
// TODO: issue with API, upstream fix required #319
- if (!this.online)
+ if (!this.online) {
return { text: undefined, presence: "Invisible" as const };
+ }
return this.#collection.getUnderlyingObject(this.id).status;
}
/**
* Relationship with user
*/
- get relationship(): string {
+ get relationship(): RelationshipStatus {
return this.#collection.getUnderlyingObject(this.id).relationship;
}
@@ -121,7 +128,7 @@ export class User {
/**
* Flags
*/
- get flags(): number {
+ get flags(): UserFlags {
return this.#collection.getUnderlyingObject(this.id).flags;
}
@@ -143,9 +150,7 @@ export class User {
* URL to the user's default avatar
*/
get defaultAvatarURL(): string {
- return `${this.#collection.client.options.baseURL}/users/${
- this.id
- }/default_avatar`;
+ return `${this.#collection.client.options.baseURL}/users/${this.id}/default_avatar`;
}
/**
@@ -179,7 +184,7 @@ export class User {
): string | undefined {
return this.online
? (this.status?.text ??
- (this.presence === "Focus" ? translate("Focus") : undefined))
+ (this.presence === "Focus" ? translate("Focus") : undefined))
: undefined;
}
@@ -256,7 +261,7 @@ export class User {
if (dm) {
if (!dm.active) {
- this.#collection.client.channels.updateUnderlyingObject(
+ this.#collection.client.channels.setUnderlyingKey(
dm.id,
"active",
true,
diff --git a/src/classes/UserProfile.ts b/src/classes/UserProfile.ts
index a2a2b7b1..592f4c62 100644
--- a/src/classes/UserProfile.ts
+++ b/src/classes/UserProfile.ts
@@ -1,8 +1,8 @@
import type { UserProfile as APIUserProfile } from "revolt-api";
-import type { Client } from "../Client.js";
+import type { Client } from "../Client.ts";
-import { File } from "./File.js";
+import { File } from "./File.ts";
/**
* User Profile Class
diff --git a/src/classes/index.ts b/src/classes/index.ts
index 9bd7e417..24c446f0 100644
--- a/src/classes/index.ts
+++ b/src/classes/index.ts
@@ -1,21 +1,21 @@
-export * from "./BannedUser.js";
-export * from "./Bot.js";
-export * from "./Channel.js";
-export * from "./ChannelUnread.js";
-export * from "./ChannelWebhook.js";
-export * from "./Emoji.js";
-export * from "./File.js";
-export * from "./Invite.js";
-export * from "./Message.js";
-export * from "./MessageEmbed.js";
-export * from "./PublicBot.js";
-export * from "./PublicInvite.js";
-export * from "./ServerRole.js";
-export * from "./Server.js";
-export * from "./ServerBan.js";
-export * from "./ServerMember.js";
-export * from "./Session.js";
-export * from "./SystemMessage.js";
-export * from "./User.js";
-export * from "./MFA.js";
-export * from "./UserProfile.js";
+export * from "./BannedUser.ts";
+export * from "./Bot.ts";
+export * from "./Channel.ts";
+export * from "./ChannelUnread.ts";
+export * from "./ChannelWebhook.ts";
+export * from "./Emoji.ts";
+export * from "./File.ts";
+export * from "./Invite.ts";
+export * from "./Message.ts";
+export * from "./MessageEmbed.ts";
+export * from "./PublicBot.ts";
+export * from "./PublicInvite.ts";
+export * from "./ServerRole.ts";
+export * from "./Server.ts";
+export * from "./ServerBan.ts";
+export * from "./ServerMember.ts";
+export * from "./Session.ts";
+export * from "./SystemMessage.ts";
+export * from "./User.ts";
+export * from "./MFA.ts";
+export * from "./UserProfile.ts";
diff --git a/src/collections/AccountCollection.ts b/src/collections/AccountCollection.ts
index 1f49675e..1abd73d5 100644
--- a/src/collections/AccountCollection.ts
+++ b/src/collections/AccountCollection.ts
@@ -1,7 +1,7 @@
import type { DataCreateAccount, WebPushSubscription } from "revolt-api";
-import type { Client } from "../Client.js";
-import { MFA } from "../classes/MFA.js";
+import type { Client } from "../Client.ts";
+import { MFA } from "../classes/MFA.ts";
/**
* Utility functions for working with accounts
@@ -36,8 +36,8 @@ export class AccountCollection {
* Create a new account
* @param data Account details
*/
- create(data: DataCreateAccount): Promise {
- return this.client.api.post("/auth/account/create", data);
+ async create(data: DataCreateAccount): Promise {
+ return await this.client.api.post("/auth/account/create", data);
}
/**
@@ -45,8 +45,11 @@ export class AccountCollection {
* @param email Email
* @param captcha Captcha if enabled
*/
- reverify(email: string, captcha?: string): Promise {
- return this.client.api.post("/auth/account/reverify", { email, captcha });
+ async reverify(email: string, captcha?: string): Promise {
+ return await this.client.api.post("/auth/account/reverify", {
+ email,
+ captcha,
+ });
}
/**
@@ -54,8 +57,8 @@ export class AccountCollection {
* @param email Email
* @param captcha Captcha if enabled
*/
- resetPassword(email: string, captcha?: string): Promise {
- return this.client.api.post("/auth/account/reset_password", {
+ async resetPassword(email: string, captcha?: string): Promise {
+ return await this.client.api.post("/auth/account/reset_password", {
email,
captcha,
});
@@ -65,16 +68,16 @@ export class AccountCollection {
* Verify an account given the code
* @param code Verification code
*/
- verify(code: string): Promise {
- return this.client.api.post(`/auth/account/verify/${code}`);
+ async verify(code: string): Promise {
+ return await this.client.api.post(`/auth/account/verify/${code}`);
}
/**
* Confirm account deletion
* @param token Deletion token
*/
- confirmDelete(token: string): Promise {
- return this.client.api.put("/auth/account/delete", { token });
+ async confirmDelete(token: string): Promise {
+ return await this.client.api.put("/auth/account/delete", { token });
}
/**
@@ -83,12 +86,12 @@ export class AccountCollection {
* @param newPassword New password
* @param removeSessions Whether to remove existing sessions
*/
- confirmPasswordReset(
+ async confirmPasswordReset(
token: string,
newPassword: string,
removeSessions: boolean,
): Promise {
- return this.client.api.patch("/auth/account/reset_password", {
+ return await this.client.api.patch("/auth/account/reset_password", {
token,
password: newPassword,
remove_sessions: removeSessions,
@@ -100,8 +103,11 @@ export class AccountCollection {
* @param newPassword New password
* @param currentPassword Current password
*/
- changePassword(newPassword: string, currentPassword: string): Promise {
- return this.client.api.patch("/auth/account/change/password", {
+ async changePassword(
+ newPassword: string,
+ currentPassword: string,
+ ): Promise {
+ return await this.client.api.patch("/auth/account/change/password", {
password: newPassword,
current_password: currentPassword,
});
@@ -112,8 +118,8 @@ export class AccountCollection {
* @param newEmail New email
* @param currentPassword Current password
*/
- changeEmail(newEmail: string, currentPassword: string): Promise {
- return this.client.api.patch("/auth/account/change/email", {
+ async changeEmail(newEmail: string, currentPassword: string): Promise {
+ return await this.client.api.patch("/auth/account/change/email", {
email: newEmail,
current_password: currentPassword,
});
@@ -124,41 +130,39 @@ export class AccountCollection {
* @param keys Keys
* @returns Settings
*/
- fetchSettings(keys: string[]): Promise> {
- return this.client.api.post("/sync/settings/fetch", { keys }) as Promise<
- Record
- >;
+ async fetchSettings(
+ keys: string[],
+ ): Promise> {
+ return await this.client.api.post("/sync/settings/fetch", { keys });
}
- /* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Set settings
* @param settings Settings
* @param timestamp Timestamp
*/
- setSettings(
- settings: Record,
- timestamp = +new Date(),
+ async setSettings(
+ settings: Record,
+ timestamp: number = new Date().getTime(),
): Promise {
- return this.client.api.post("/sync/settings/set", {
+ return await this.client.api.post("/sync/settings/set", {
...settings,
timestamp,
});
}
- /* eslint-enable @typescript-eslint/no-explicit-any */
/**
* Create a new Web Push subscription
* @param subscription Subscription
*/
- webPushSubscribe(subscription: WebPushSubscription): Promise {
- return this.client.api.post("/push/subscribe", subscription);
+ async webPushSubscribe(subscription: WebPushSubscription): Promise {
+ return await this.client.api.post("/push/subscribe", subscription);
}
/**
* Remove existing Web Push subscription
*/
- webPushUnsubscribe(): Promise {
- return this.client.api.post("/push/unsubscribe");
+ async webPushUnsubscribe(): Promise {
+ return await this.client.api.post("/push/unsubscribe");
}
}
diff --git a/src/collections/BotCollection.ts b/src/collections/BotCollection.ts
index 2b0e2ff5..e3223927 100644
--- a/src/collections/BotCollection.ts
+++ b/src/collections/BotCollection.ts
@@ -1,17 +1,15 @@
-import { batch } from "solid-js";
-
import type { Bot as APIBot, OwnedBotsResponse } from "revolt-api";
-import { Bot } from "../classes/Bot.js";
-import { PublicBot } from "../classes/PublicBot.js";
-import type { HydratedBot } from "../hydration/bot.js";
+import { Bot } from "../classes/Bot.ts";
+import { PublicBot } from "../classes/PublicBot.ts";
+import type { HydratedBot } from "../hydration/bot.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Bots
*/
-export class BotCollection extends ClassCollection {
+export class BotCollection extends Collection {
/**
* Fetch bot by ID
* @param id Id
@@ -31,12 +29,8 @@ export class BotCollection extends ClassCollection {
*/
async fetchOwned(): Promise {
const data = (await this.client.api.get("/bots/@me")) as OwnedBotsResponse;
- return batch(() => {
- data.users.forEach((user) =>
- this.client.users.getOrCreate(user._id, user),
- );
- return data.bots.map((bot) => this.getOrCreate(bot._id, bot));
- });
+ data.users.forEach((user) => this.client.users.getOrCreate(user._id, user));
+ return data.bots.map((bot) => this.getOrCreate(bot._id, bot));
}
/**
diff --git a/src/collections/ChannelCollection.ts b/src/collections/ChannelCollection.ts
index 407f5359..39ba551c 100644
--- a/src/collections/ChannelCollection.ts
+++ b/src/collections/ChannelCollection.ts
@@ -1,18 +1,15 @@
import type { Channel as APIChannel } from "revolt-api";
-import { Channel } from "../classes/Channel.js";
-import { User } from "../classes/User.js";
-import type { HydratedChannel } from "../hydration/channel.js";
+import { Channel } from "../classes/Channel.ts";
+import { User } from "../classes/User.ts";
+import type { HydratedChannel } from "../hydration/channel.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Channels
*/
-export class ChannelCollection extends ClassCollection<
- Channel,
- HydratedChannel
-> {
+export class ChannelCollection extends Collection {
/**
* Delete an object
* @param id Id
diff --git a/src/collections/ChannelUnreadCollection.ts b/src/collections/ChannelUnreadCollection.ts
index c783ccf7..6a875ca5 100644
--- a/src/collections/ChannelUnreadCollection.ts
+++ b/src/collections/ChannelUnreadCollection.ts
@@ -1,17 +1,15 @@
-import { batch } from "solid-js";
-
import type { ChannelUnread as APIChannelUnread } from "revolt-api";
-import { ChannelUnread } from "../classes/ChannelUnread.js";
-import { Channel } from "../classes/index.js";
-import type { HydratedChannelUnread } from "../hydration/channelUnread.js";
+import { ChannelUnread } from "../classes/ChannelUnread.ts";
+import type { Channel } from "../classes/Channel.ts";
+import type { HydratedChannelUnread } from "../hydration/channelUnread.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Channel Unreads
*/
-export class ChannelUnreadCollection extends ClassCollection<
+export class ChannelUnreadCollection extends Collection<
ChannelUnread,
HydratedChannelUnread
> {
@@ -20,19 +18,19 @@ export class ChannelUnreadCollection extends ClassCollection<
*/
async sync(): Promise {
const unreads = await this.client.api.get("/sync/unreads");
- batch(() => {
- this.reset();
- for (const unread of unreads) {
- this.getOrCreate(unread._id.channel, unread);
- }
- });
+ this.reset();
+ for (const unread of unreads) {
+ this.getOrCreate(unread._id.channel, unread);
+ }
}
/**
* Clear all unread data
*/
reset(): void {
- this.updateUnderlyingObject({});
+ for (const key of this.keys()) {
+ this.setUnderlyingObject(key, {} as never);
+ }
}
/**
diff --git a/src/collections/ChannelWebhookCollection.ts b/src/collections/ChannelWebhookCollection.ts
index 3d1d9e13..6cabd6ab 100644
--- a/src/collections/ChannelWebhookCollection.ts
+++ b/src/collections/ChannelWebhookCollection.ts
@@ -1,14 +1,14 @@
import type { Webhook } from "revolt-api";
-import { ChannelWebhook } from "../classes/ChannelWebhook.js";
-import type { HydratedChannelWebhook } from "../hydration/channelWebhook.js";
+import { ChannelWebhook } from "../classes/ChannelWebhook.ts";
+import type { HydratedChannelWebhook } from "../hydration/channelWebhook.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Channel Webhooks
*/
-export class ChannelWebhookCollection extends ClassCollection<
+export class ChannelWebhookCollection extends Collection<
ChannelWebhook,
HydratedChannelWebhook
> {
diff --git a/src/collections/Collection.ts b/src/collections/Collection.ts
index 153daeee..993da8da 100644
--- a/src/collections/Collection.ts
+++ b/src/collections/Collection.ts
@@ -1,150 +1,66 @@
-import type { SetStoreFunction } from "solid-js/store";
-
-import { ReactiveMap } from "@solid-primitives/map";
-
-import type { Client } from "../Client.js";
-import type { Hydrators } from "../hydration/index.js";
-import { ObjectStorage } from "../storage/ObjectStorage.js";
+import type { Client } from "../Client.ts";
+import { hydrate, type Hydrators } from "../hydration/index.ts";
/**
- * Abstract Collection type
+ * Collection backed by a store
*/
-export abstract class Collection {
- /**
- * Get an existing object
- * @param id Id
- * @returns Object
- */
- abstract get(id: string): T | undefined;
+export class Collection {
+ #storage = new Map();
+ #objects = new Map();
/**
- * Check whether an id exists in the Collection
- * @param id Id
- * @returns Whether it exists
+ * Construct store backed collection
*/
- abstract has(id: string): boolean;
+ constructor(public readonly client: Client) {}
/**
- * Delete an object
+ * Get an existing object
* @param id Id
*/
- abstract delete(id: string): void;
-
- /**
- * Number of stored objects
- * @returns Size
- */
- abstract size(): number;
-
- /**
- * Iterable of keys in the map
- * @returns Iterable
- */
- abstract keys(): IterableIterator;
-
- /**
- * Iterable of values in the map
- * @returns Iterable
- */
- abstract values(): IterableIterator;
-
- /**
- * Iterable of key, value pairs in the map
- * @returns Iterable
- */
- abstract entries(): IterableIterator<[string, T]>;
-
- /**
- * Execute a provided function over each key, value pair in the map
- * @param cb Callback for each pair
- */
- abstract forEach(
- cb: (value: T, key: string, map: Map) => void,
- ): void;
-
- /**
- * List of values in the map
- * @returns List
- */
- toList(): T[] {
- return [...this.values()];
+ get(id: string): T | undefined {
+ return this.#objects.get(id);
}
/**
- * Filter the collection by a given predicate
- * @param predicate Predicate to satisfy
+ * Get an underlying object
*/
- filter(predicate: (value: T, key: string) => boolean): T[] {
- const list: T[] = [];
- for (const [key, value] of this.entries()) {
- if (predicate(value, key)) {
- list.push(value);
- }
- }
-
- return list;
+ getUnderlyingObject(id: string): V {
+ return this.#storage.get(id) ?? ({} as V);
}
/**
- * Map the collection using a given callback
- * @param cb Callback
+ * Set a key of an underlying object
*/
- map(cb: (value: T, key: string) => O): O[] {
- const list: O[] = [];
- for (const [key, value] of this.entries()) {
- list.push(cb(value, key));
- }
-
- return list;
+ setUnderlyingKey(id: string, key: K, value: V[K]): void {
+ this.#storage.set(id, {
+ [key]: value,
+ ...((this.#storage.get(id) ?? {}) as V),
+ });
}
/**
- * Find some value based on a predicate
- * @param predicate Predicate to satisfy
+ * Set an underlying object
*/
- find(predicate: (value: T, key: string) => boolean): T | undefined {
- for (const [key, value] of this.entries()) {
- if (predicate(value, key)) {
- return value;
- }
- }
- }
-}
-
-/**
- * Collection backed by a Solid.js Store
- */
-export abstract class StoreCollection extends Collection {
- #storage = new ObjectStorage();
- #objects = new ReactiveMap();
- readonly getUnderlyingObject: (id: string) => V;
- readonly updateUnderlyingObject: SetStoreFunction>;
-
- /**
- * Construct store backed collection
- */
- constructor() {
- super();
- this.getUnderlyingObject = (key) => this.#storage.get(key) ?? ({} as V);
- this.updateUnderlyingObject = this.#storage.set;
+ setUnderlyingObject(id: string, value: V): void {
+ this.#storage.set(id, value);
}
/**
- * Get an existing object
+ * Check whether an id exists in the Collection
* @param id Id
- * @returns Object
+ * @returns Whether it exists
*/
- get(id: string): T | undefined {
- return this.#objects.get(id);
+ has(id: string): boolean {
+ return this.#objects.has(id);
}
/**
- * Check whether an id exists in the Collection
+ * Check whether the underlying id exists
* @param id Id
* @returns Whether it exists
*/
- has(id: string): boolean {
- return this.#objects.has(id);
+ hasUnderlying(id: string): boolean {
+ return !!((this.#storage.get(id) as { id: string }) ?? { id: false }).id;
}
/**
@@ -153,7 +69,7 @@ export abstract class StoreCollection extends Collection {
*/
delete(id: string): void {
this.#objects.delete(id);
- this.updateUnderlyingObject(id, undefined as never);
+ this.#storage.delete(id);
}
/**
@@ -171,7 +87,12 @@ export abstract class StoreCollection extends Collection {
context: unknown,
data?: unknown,
): void {
- this.#storage.hydrate(id, type, context, data);
+ if (data) {
+ this.#storage.set(
+ id,
+ hydrate(type, { partial: false, ...data } as never, context, true) as V,
+ );
+ }
this.#objects.set(id, instance);
}
@@ -181,7 +102,9 @@ export abstract class StoreCollection extends Collection {
* @returns Whether it is a partial
*/
isPartial(id: string): boolean {
- return !!(this.getUnderlyingObject(id) as { partial: boolean }).partial;
+ return !!(
+ (this.#storage.get(id) ?? { partial: true }) as { partial: boolean }
+ ).partial;
}
/**
@@ -219,25 +142,57 @@ export abstract class StoreCollection extends Collection {
/**
* Execute a provided function over each key, value pair in the map
* @param cb Callback for each pair
- * @returns Iterable
*/
forEach(cb: (value: T, key: string, map: Map) => void): void {
return this.#objects.forEach(cb);
}
-}
-/**
- * Generic class collection backed by store
- */
-export class ClassCollection extends StoreCollection {
- readonly client: Client;
+ /**
+ * List of values in the map
+ * @returns List
+ */
+ toList(): T[] {
+ return [...this.values()];
+ }
+
+ /**
+ * Filter the collection by a given predicate
+ * @param predicate Predicate to satisfy
+ */
+ filter(predicate: (value: T, key: string) => boolean): T[] {
+ const list: T[] = [];
+ for (const [key, value] of this.entries()) {
+ if (predicate(value, key)) {
+ list.push(value);
+ }
+ }
+
+ return list;
+ }
/**
- * Create generic class collection
- * @param client Client
+ * Map the collection using a given callback
+ * @param cb Callback
*/
- constructor(client: Client) {
- super();
- this.client = client;
+ map(cb: (value: T, key: string) => O): O[] {
+ const list: O[] = [];
+ for (const [key, value] of this.entries()) {
+ list.push(cb(value, key));
+ }
+
+ return list;
+ }
+
+ /**
+ * Find some value based on a predicate
+ * @param predicate Predicate to satisfy
+ */
+ find(predicate: (value: T, key: string) => boolean): T | undefined {
+ for (const [key, value] of this.entries()) {
+ if (predicate(value, key)) {
+ return value;
+ }
+ }
+ return undefined;
}
}
diff --git a/src/collections/EmojiCollection.ts b/src/collections/EmojiCollection.ts
index eb700f54..d6ec598f 100644
--- a/src/collections/EmojiCollection.ts
+++ b/src/collections/EmojiCollection.ts
@@ -1,14 +1,14 @@
import type { Emoji as APIEmoji } from "revolt-api";
-import { Emoji } from "../classes/Emoji.js";
-import type { HydratedEmoji } from "../hydration/emoji.js";
+import { Emoji } from "../classes/Emoji.ts";
+import type { HydratedEmoji } from "../hydration/emoji.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Emoji
*/
-export class EmojiCollection extends ClassCollection {
+export class EmojiCollection extends Collection {
/**
* Fetch emoji by ID
* @param id Id
diff --git a/src/collections/MessageCollection.ts b/src/collections/MessageCollection.ts
index efd351de..bd658750 100644
--- a/src/collections/MessageCollection.ts
+++ b/src/collections/MessageCollection.ts
@@ -1,17 +1,14 @@
import type { Message as APIMessage } from "revolt-api";
-import { Message } from "../classes/Message.js";
-import type { HydratedMessage } from "../hydration/message.js";
+import { Message } from "../classes/Message.ts";
+import type { HydratedMessage } from "../hydration/message.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Messages
*/
-export class MessageCollection extends ClassCollection<
- Message,
- HydratedMessage
-> {
+export class MessageCollection extends Collection {
/**
* Fetch message by Id
* @param channelId Channel Id
diff --git a/src/collections/ServerCollection.ts b/src/collections/ServerCollection.ts
index e7c30c0e..6f90460f 100644
--- a/src/collections/ServerCollection.ts
+++ b/src/collections/ServerCollection.ts
@@ -1,20 +1,18 @@
-import { batch } from "solid-js";
-
import type {
- Server as APIServer,
Channel,
DataCreateServer,
+ Server as APIServer,
} from "revolt-api";
-import { Server } from "../classes/Server.js";
-import type { HydratedServer } from "../hydration/server.js";
+import { Server } from "../classes/Server.ts";
+import type { HydratedServer } from "../hydration/server.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Servers
*/
-export class ServerCollection extends ClassCollection {
+export class ServerCollection extends Collection {
/**
* Fetch server by ID
*
@@ -29,15 +27,13 @@ export class ServerCollection extends ClassCollection {
include_channels: true,
});
- return batch(() => {
- for (const channel of data.channels as unknown as Channel[]) {
- if (typeof channel !== "string") {
- this.client.channels.getOrCreate(channel._id, channel);
- }
+ for (const channel of data.channels as unknown as Channel[]) {
+ if (typeof channel !== "string") {
+ this.client.channels.getOrCreate(channel._id, channel);
}
+ }
- return this.getOrCreate(data._id, data);
- });
+ return this.getOrCreate(data._id, data);
}
/**
@@ -85,12 +81,10 @@ export class ServerCollection extends ClassCollection {
data,
);
- return batch(() => {
- for (const channel of channels) {
- this.client.channels.getOrCreate(channel._id, channel);
- }
+ for (const channel of channels) {
+ this.client.channels.getOrCreate(channel._id, channel);
+ }
- return this.getOrCreate(server._id, server, true);
- });
+ return this.getOrCreate(server._id, server, true);
}
}
diff --git a/src/collections/ServerMemberCollection.ts b/src/collections/ServerMemberCollection.ts
index d421c2b8..c472bc77 100644
--- a/src/collections/ServerMemberCollection.ts
+++ b/src/collections/ServerMemberCollection.ts
@@ -1,14 +1,14 @@
import type { Member, MemberCompositeKey } from "revolt-api";
-import { ServerMember } from "../classes/ServerMember.js";
-import type { HydratedServerMember } from "../hydration/serverMember.js";
+import { ServerMember } from "../classes/ServerMember.ts";
+import type { HydratedServerMember } from "../hydration/serverMember.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Server Members
*/
-export class ServerMemberCollection extends ClassCollection<
+export class ServerMemberCollection extends Collection<
ServerMember,
HydratedServerMember
> {
diff --git a/src/collections/SessionCollection.ts b/src/collections/SessionCollection.ts
index 59274b98..e2c8d5a3 100644
--- a/src/collections/SessionCollection.ts
+++ b/src/collections/SessionCollection.ts
@@ -1,28 +1,21 @@
-import { batch } from "solid-js";
-
import type { SessionInfo } from "revolt-api";
-import { Session } from "../classes/Session.js";
-import type { HydratedSession } from "../hydration/session.js";
+import { Session } from "../classes/Session.ts";
+import type { HydratedSession } from "../hydration/session.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Sessions
*/
-export class SessionCollection extends ClassCollection<
- Session,
- HydratedSession
-> {
+export class SessionCollection extends Collection {
/**
* Fetch active sessions
* @returns List of sessions
*/
async fetch(): Promise {
const data = await this.client.api.get("/auth/session/all");
- return batch(() =>
- data.map((session) => this.getOrCreate(session._id, session)),
- );
+ return data.map((session) => this.getOrCreate(session._id, session));
}
/**
diff --git a/src/collections/UserCollection.ts b/src/collections/UserCollection.ts
index 4ae2c23e..4c036108 100644
--- a/src/collections/UserCollection.ts
+++ b/src/collections/UserCollection.ts
@@ -1,15 +1,15 @@
import type { User as APIUser } from "revolt-api";
-import type { Client } from "../Client.js";
-import { User } from "../classes/User.js";
-import type { HydratedUser } from "../hydration/user.js";
+import type { Client } from "../Client.ts";
+import { User } from "../classes/User.ts";
+import type { HydratedUser } from "../hydration/user.ts";
-import { ClassCollection } from "./Collection.js";
+import { Collection } from "./Collection.ts";
/**
* Collection of Users
*/
-export class UserCollection extends ClassCollection {
+export class UserCollection extends Collection {
/**
* Construct User collection
*/
diff --git a/src/collections/index.ts b/src/collections/index.ts
index d192286a..4c4be57a 100644
--- a/src/collections/index.ts
+++ b/src/collections/index.ts
@@ -1,12 +1,11 @@
-export * from "./Collection.js";
-
-export { BotCollection } from "./BotCollection.js";
-export { ChannelCollection } from "./ChannelCollection.js";
-export { ChannelUnreadCollection } from "./ChannelUnreadCollection.js";
-export { ChannelWebhookCollection } from "./ChannelWebhookCollection.js";
-export { EmojiCollection } from "./EmojiCollection.js";
-export { MessageCollection } from "./MessageCollection.js";
-export { ServerCollection } from "./ServerCollection.js";
-export { ServerMemberCollection } from "./ServerMemberCollection.js";
-export { SessionCollection } from "./SessionCollection.js";
-export { UserCollection } from "./UserCollection.js";
+export { BotCollection } from "./BotCollection.ts";
+export { ChannelCollection } from "./ChannelCollection.ts";
+export { ChannelUnreadCollection } from "./ChannelUnreadCollection.ts";
+export { ChannelWebhookCollection } from "./ChannelWebhookCollection.ts";
+export { Collection } from "./Collection.ts";
+export { EmojiCollection } from "./EmojiCollection.ts";
+export { MessageCollection } from "./MessageCollection.ts";
+export { ServerCollection } from "./ServerCollection.ts";
+export { ServerMemberCollection } from "./ServerMemberCollection.ts";
+export { SessionCollection } from "./SessionCollection.ts";
+export { UserCollection } from "./UserCollection.ts";
diff --git a/src/events/EventClient.ts b/src/events/EventClient.ts
index f9b9fced..5a502434 100644
--- a/src/events/EventClient.ts
+++ b/src/events/EventClient.ts
@@ -1,10 +1,7 @@
-import type { Accessor, Setter } from "solid-js";
-import { createSignal } from "solid-js";
-
import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
import type { Error } from "revolt-api";
-import type { ProtocolV1 } from "./v1.js";
+import type { ProtocolV1 } from "./v1.ts";
/**
* Available protocols to connect with
@@ -66,7 +63,7 @@ export interface EventClientOptions {
* Events provided by the client.
*/
type Events> = {
- error: [error: Error];
+ error: [error: Error | Event];
event: [event: P["server"]];
state: [state: ConnectionState];
};
@@ -82,19 +79,18 @@ export class EventClient<
#protocolVersion: T;
#transportFormat: "json" | "msgpack";
- readonly ping: Accessor;
- #setPing: Setter;
-
- readonly state: Accessor;
- #setStateSetter: Setter;
+ ping = -1;
+ state = ConnectionState.Idle;
#socket: WebSocket | undefined;
#heartbeatIntervalReference: number | undefined;
#pongTimeoutReference: number | undefined;
#connectTimeoutReference: number | undefined;
- #lastError: // eslint-disable-next-line @typescript-eslint/no-explicit-any
- { type: "socket"; data: any } | { type: "revolt"; data: Error } | undefined;
+ #lastError?: { type: "socket"; data: Event } | {
+ type: "revolt";
+ data: Error;
+ };
/**
* Create a new event client.
@@ -120,14 +116,6 @@ export class EventClient<
...options,
};
- const [state, setState] = createSignal(ConnectionState.Idle);
- this.state = state;
- this.#setStateSetter = setState;
-
- const [ping, setPing] = createSignal(-1);
- this.ping = ping;
- this.#setPing = setPing;
-
this.disconnect = this.disconnect.bind(this);
}
@@ -136,7 +124,7 @@ export class EventClient<
* @param state state
*/
private setState(state: ConnectionState): void {
- this.#setStateSetter(state);
+ this.state = state;
this.emit("state", state);
}
@@ -232,8 +220,8 @@ export class EventClient<
return;
case "Pong":
clearTimeout(this.#pongTimeoutReference);
- this.#setPing(+new Date() - event.data);
- if (this.options.debug) console.debug(`[ping] ${this.ping()}ms`);
+ this.ping = +new Date() - event.data;
+ if (this.options.debug) console.debug(`[ping] ${this.ping}ms`);
return;
case "Error":
this.#lastError = {
@@ -245,7 +233,7 @@ export class EventClient<
return;
}
- switch (this.state()) {
+ switch (this.state) {
case ConnectionState.Connecting:
if (event.type === "Authenticated") {
// no-op
@@ -264,7 +252,7 @@ export class EventClient<
}
break;
default:
- throw `Unreachable code. Received ${event.type} in state ${this.state()}.`;
+ throw `Unreachable code. Received ${event.type} in state ${this.state}.`;
}
}
@@ -272,15 +260,8 @@ export class EventClient<
* Last error encountered by events client
*/
get lastError():
- | {
- type: "socket";
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- data: any;
- }
- | {
- type: "revolt";
- data: Error;
- }
+ | { type: "socket"; data: Event }
+ | { type: "revolt"; data: Error }
| undefined {
return this.#lastError;
}
diff --git a/src/events/v1.ts b/src/events/v1.ts
index 069bc729..b6fbe6c5 100644
--- a/src/events/v1.ts
+++ b/src/events/v1.ts
@@ -1,7 +1,3 @@
-import type { Setter } from "solid-js";
-import { batch } from "solid-js";
-
-import { ReactiveSet } from "@solid-primitives/set";
import type {
Channel,
Emoji,
@@ -19,10 +15,10 @@ import type {
User,
} from "revolt-api";
-import type { Client } from "../Client.js";
-import { MessageEmbed } from "../classes/MessageEmbed.js";
-import { ServerRole } from "../classes/ServerRole.js";
-import { hydrate } from "../hydration/index.js";
+import type { Client } from "../Client.ts";
+import { MessageEmbed } from "../classes/MessageEmbed.ts";
+import { ServerRole } from "../classes/ServerRole.ts";
+import { hydrate } from "../hydration/index.ts";
/**
* Version 1 of the events protocol
@@ -42,21 +38,21 @@ export type ProtocolV1 = {
type ClientMessage =
| { type: "Authenticate"; token: string }
| {
- type: "BeginTyping";
- channel: string;
- }
+ type: "BeginTyping";
+ channel: string;
+ }
| {
- type: "EndTyping";
- channel: string;
- }
+ type: "EndTyping";
+ channel: string;
+ }
| {
- type: "Ping";
- data: number;
- }
+ type: "Ping";
+ data: number;
+ }
| {
- type: "Pong";
- data: number;
- };
+ type: "Pong";
+ data: number;
+ };
/**
* Messages sent from the server
@@ -70,46 +66,46 @@ type ServerMessage =
| { type: "Pong"; data: number }
| ({ type: "Message" } & Message)
| {
- type: "MessageUpdate";
- id: string;
- channel: string;
- data: Partial;
- }
+ type: "MessageUpdate";
+ id: string;
+ channel: string;
+ data: Partial;
+ }
| {
- type: "MessageAppend";
- id: string;
- channel: string;
- append: Pick, "embeds">;
- }
+ type: "MessageAppend";
+ id: string;
+ channel: string;
+ append: Pick, "embeds">;
+ }
| { type: "MessageDelete"; id: string; channel: string }
| {
- type: "MessageReact";
- id: string;
- channel_id: string;
- user_id: string;
- emoji_id: string;
- }
+ type: "MessageReact";
+ id: string;
+ channel_id: string;
+ user_id: string;
+ emoji_id: string;
+ }
| {
- type: "MessageUnreact";
- id: string;
- channel_id: string;
- user_id: string;
- emoji_id: string;
- }
+ type: "MessageUnreact";
+ id: string;
+ channel_id: string;
+ user_id: string;
+ emoji_id: string;
+ }
| {
- type: "MessageRemoveReaction";
- id: string;
- channel_id: string;
- emoji_id: string;
- }
+ type: "MessageRemoveReaction";
+ id: string;
+ channel_id: string;
+ emoji_id: string;
+ }
| { type: "BulkMessageDelete"; channel: string; ids: string[] }
| ({ type: "ChannelCreate" } & Channel)
| {
- type: "ChannelUpdate";
- id: string;
- data: Partial;
- clear?: FieldsChannel[];
- }
+ type: "ChannelUpdate";
+ id: string;
+ data: Partial;
+ clear?: FieldsChannel[];
+ }
| { type: "ChannelDelete"; id: string }
| { type: "ChannelGroupJoin"; id: string; user: string }
| { type: "ChannelGroupLeave"; id: string; user: string }
@@ -117,63 +113,66 @@ type ServerMessage =
| { type: "ChannelStopTyping"; id: string; user: string }
| { type: "ChannelAck"; id: string; user: string; message_id: string }
| {
- type: "ServerCreate";
- id: string;
- server: Server;
- channels: Channel[];
- }
+ type: "ServerCreate";
+ id: string;
+ server: Server;
+ channels: Channel[];
+ }
| {
- type: "ServerUpdate";
- id: string;
- data: Partial;
- clear?: FieldsServer[];
- }
+ type: "ServerUpdate";
+ id: string;
+ data: Partial;
+ clear?: FieldsServer[];
+ }
| { type: "ServerDelete"; id: string }
| {
- type: "ServerMemberUpdate";
- id: MemberCompositeKey;
- data: Partial;
- clear?: FieldsMember[];
- }
+ type: "ServerMemberUpdate";
+ id: MemberCompositeKey;
+ data: Partial;
+ clear?: FieldsMember[];
+ }
| { type: "ServerMemberJoin"; id: string; user: string }
| { type: "ServerMemberLeave"; id: string; user: string }
| {
- type: "ServerRoleUpdate";
- id: string;
- role_id: string;
- data: Partial;
- }
+ type: "ServerRoleUpdate";
+ id: string;
+ role_id: string;
+ data: Partial;
+ }
| { type: "ServerRoleDelete"; id: string; role_id: string }
| {
- type: "UserUpdate";
- id: string;
- data: Partial;
- clear?: FieldsUser[];
- }
+ type: "UserUpdate";
+ id: string;
+ data: Partial;
+ clear?: FieldsUser[];
+ }
| { type: "UserRelationship"; user: User; status: RelationshipStatus }
| { type: "UserPresence"; id: string; online: boolean }
| {
- type: "UserSettingsUpdate";
- id: string;
- update: { [key: string]: [number, string] };
- }
+ type: "UserSettingsUpdate";
+ id: string;
+ update: { [key: string]: [number, string] };
+ }
| { type: "UserPlatformWipe"; user_id: string; flags: number }
| ({ type: "EmojiCreate" } & Emoji)
| { type: "EmojiDelete"; id: string }
- | ({
+ | (
+ & {
type: "Auth";
- } & (
+ }
+ & (
| {
- event_type: "DeleteSession";
- user_id: string;
- session_id: string;
- }
+ event_type: "DeleteSession";
+ user_id: string;
+ session_id: string;
+ }
| {
- event_type: "DeleteAllSessions";
- user_id: string;
- exclude_session_id: string;
- }
- ));
+ event_type: "DeleteAllSessions";
+ user_id: string;
+ exclude_session_id: string;
+ }
+ )
+ );
/**
* Policy change type
@@ -206,7 +205,7 @@ type ReadyData = {
export async function handleEvent(
client: Client,
event: ServerMessage,
- setReady: Setter,
+ setReady: (value: boolean) => void,
): Promise {
if (client.options.debug) {
console.debug("[S->C]", event);
@@ -220,31 +219,29 @@ export async function handleEvent(
break;
}
case "Ready": {
- batch(() => {
- for (const user of event.users) {
- const u = client.users.getOrCreate(user._id, user);
+ for (const user of event.users) {
+ const u = client.users.getOrCreate(user._id, user);
- if (u.relationship === "User") {
- client.user = u;
- }
+ if (u.relationship === "User") {
+ client.user = u;
}
+ }
- for (const server of event.servers) {
- client.servers.getOrCreate(server._id, server);
- }
+ for (const server of event.servers) {
+ client.servers.getOrCreate(server._id, server);
+ }
- for (const member of event.members) {
- client.serverMembers.getOrCreate(member._id, member);
- }
+ for (const member of event.members) {
+ client.serverMembers.getOrCreate(member._id, member);
+ }
- for (const channel of event.channels) {
- client.channels.getOrCreate(channel._id, channel);
- }
+ for (const channel of event.channels) {
+ client.channels.getOrCreate(channel._id, channel);
+ }
- for (const emoji of event.emojis) {
- client.emojis.getOrCreate(emoji._id, emoji);
- }
- });
+ for (const emoji of event.emojis) {
+ client.emojis.getOrCreate(emoji._id, emoji);
+ }
if (client.options.syncUnreads) {
await client.channelUnreads.sync();
@@ -254,8 +251,10 @@ export async function handleEvent(
client.emit("ready");
if (event.policy_changes.length) {
- client.emit("policyChanges", event.policy_changes, async () =>
- client.api.post("/policy/acknowledge"),
+ client.emit(
+ "policyChanges",
+ event.policy_changes,
+ () => client.api.post("/policy/acknowledge"),
);
}
@@ -263,36 +262,34 @@ export async function handleEvent(
}
case "Message": {
if (!client.messages.has(event._id)) {
- batch(() => {
- if (event.member) {
- client.serverMembers.getOrCreate(event.member._id, event.member);
- }
+ if (event.member) {
+ client.serverMembers.getOrCreate(event.member._id, event.member);
+ }
- if (event.user) {
- client.users.getOrCreate(event.user._id, event.user);
- }
+ if (event.user) {
+ client.users.getOrCreate(event.user._id, event.user);
+ }
- delete event.member;
- delete event.user;
+ delete event.member;
+ delete event.user;
- client.messages.getOrCreate(event._id, event, true);
+ client.messages.getOrCreate(event._id, event, true);
- if (
- event.mentions?.includes(client.user!.id) &&
- client.options.syncUnreads
- ) {
- const channel = client.channels.get(event.channel);
- if (!channel) return;
-
- const unread = client.channelUnreads.for(channel);
- unread.messageMentionIds.add(event._id);
- client.channels.updateUnderlyingObject(
- event.channel,
- "lastMessageId",
- event._id,
- );
- }
- });
+ if (
+ event.mentions?.includes(client.user!.id) &&
+ client.options.syncUnreads
+ ) {
+ const channel = client.channels.get(event.channel);
+ if (!channel) return;
+
+ const unread = client.channelUnreads.for(channel);
+ unread.messageMentionIds.add(event._id);
+ client.channels.setUnderlyingKey(
+ event.channel,
+ "lastMessageId",
+ event._id,
+ );
+ }
}
break;
}
@@ -304,7 +301,7 @@ export async function handleEvent(
channelId: event.channel,
};
- client.messages.updateUnderlyingObject(event.id, {
+ client.messages.setUnderlyingObject(event.id, {
...hydrate(
"message",
{ ...event.data, channel: event.channel },
@@ -326,18 +323,14 @@ export async function handleEvent(
channelId: event.channel,
};
- client.messages.updateUnderlyingObject(event.id, "embeds", (embeds) => [
- ...(embeds ?? []),
+ client.messages.setUnderlyingKey(event.id, "embeds", [
+ ...(previousMessage.embeds ?? []),
...(event.append.embeds?.map((embed) =>
- MessageEmbed.from(client, embed),
+ MessageEmbed.from(client, embed)
) ?? []),
]);
- client.messages.updateUnderlyingObject(
- event.id,
- "channelId",
- event.channel,
- );
+ client.messages.setUnderlyingKey(event.id, "channelId", event.channel);
client.emit("messageUpdate", message, previousMessage);
}
@@ -345,29 +338,29 @@ export async function handleEvent(
}
case "MessageDelete": {
if (client.messages.getOrPartial(event.id)) {
- const message = client.messages.getUnderlyingObject(event.id);
- client.emit("messageDelete", message);
+ client.emit(
+ "messageDelete",
+ client.messages.getUnderlyingObject(event.id),
+ );
client.messages.delete(event.id);
}
break;
}
case "BulkMessageDelete": {
- batch(() =>
- client.emit(
- "messageDeleteBulk",
- event.ids
- .map((id) => {
- if (client.messages.has(id)) {
- const message = client.messages.getUnderlyingObject(id);
- client.messages.delete(id);
- return message!;
- }
-
- return undefined!;
- })
- .filter((x) => x),
- client.channels.get(event.channel),
- ),
+ client.emit(
+ "messageDeleteBulk",
+ event.ids
+ .map((id) => {
+ if (client.messages.has(id)) {
+ const message = client.messages.getUnderlyingObject(id);
+ client.messages.delete(id);
+ return message!;
+ }
+
+ return undefined!;
+ })
+ .filter((x) => x),
+ client.channels.get(event.channel),
);
break;
}
@@ -380,7 +373,7 @@ export async function handleEvent(
if (set.has(event.user_id)) return;
set.add(event.user_id);
} else {
- reactions.set(event.emoji_id, new ReactiveSet([event.user_id]));
+ reactions.set(event.emoji_id, new Set([event.user_id]));
}
client.emit(
@@ -441,9 +434,7 @@ export async function handleEvent(
case "ChannelUpdate": {
const channel = client.channels.getOrPartial(event.id);
if (channel) {
- const previousChannel = {
- ...client.channels.getUnderlyingObject(event.id),
- };
+ const previousChannel = client.channels.getUnderlyingObject(event.id);
const changes = hydrate("channel", event.data, client, false);
@@ -463,15 +454,17 @@ export async function handleEvent(
}
}
- client.channels.updateUnderlyingObject(event.id, changes);
+ client.channels.setUnderlyingObject(event.id, changes);
client.emit("channelUpdate", channel, previousChannel);
}
break;
}
case "ChannelDelete": {
if (client.channels.getOrPartial(event.id)) {
- const channel = client.channels.getUnderlyingObject(event.id);
- client.emit("channelDelete", channel);
+ client.emit(
+ "channelDelete",
+ client.channels.getUnderlyingObject(event.id),
+ );
client.channels.delete(event.id);
}
break;
@@ -563,22 +556,18 @@ export async function handleEvent(
}
case "ServerCreate": {
if (!client.servers.has(event.server._id)) {
- batch(() => {
- for (const channel of event.channels) {
- client.channels.getOrCreate(channel._id, channel);
- }
+ for (const channel of event.channels) {
+ client.channels.getOrCreate(channel._id, channel);
+ }
- client.servers.getOrCreate(event.server._id, event.server, true);
- });
+ client.servers.getOrCreate(event.server._id, event.server, true);
}
break;
}
case "ServerUpdate": {
const server = client.servers.getOrPartial(event.id);
if (server) {
- const previousServer = {
- ...client.servers.getUnderlyingObject(event.id),
- };
+ const previousServer = client.servers.getUnderlyingObject(event.id);
const changes = hydrate("server", event.data, client, false);
@@ -604,7 +593,7 @@ export async function handleEvent(
}
}
- client.servers.updateUnderlyingObject(event.id, changes);
+ client.servers.setUnderlyingObject(event.id, changes);
client.emit("serverUpdate", server, previousServer);
}
break;
@@ -675,11 +664,9 @@ export async function handleEvent(
case "ServerMemberUpdate": {
const member = client.serverMembers.getOrPartial(event.id);
if (member) {
- const previousMember = {
- ...client.serverMembers.getUnderlyingObject(
- event.id.server + event.id.user,
- ),
- };
+ const previousMember = client.serverMembers.getUnderlyingObject(
+ event.id.server + event.id.user,
+ );
const changes = hydrate("serverMember", event.data, client, false);
@@ -702,7 +689,7 @@ export async function handleEvent(
}
}
- client.serverMembers.updateUnderlyingObject(
+ client.serverMembers.setUnderlyingObject(
event.id.server + event.id.user,
changes as never,
);
@@ -743,9 +730,7 @@ export async function handleEvent(
case "UserUpdate": {
const user = client.users.getOrPartial(event.id);
if (user) {
- const previousUser = {
- ...client.users.getUnderlyingObject(event.id),
- };
+ const previousUser = client.users.getUnderlyingObject(event.id);
const changes = hydrate("user", event.data, client, false);
@@ -773,7 +758,7 @@ export async function handleEvent(
}
}
- client.users.updateUnderlyingObject(event.id, changes as never);
+ client.users.setUnderlyingObject(event.id, changes as never);
client.emit("userUpdate", user, previousUser);
}
break;
@@ -811,37 +796,35 @@ export async function handleEvent(
break;
}
case "UserPlatformWipe": {
- batch(() => {
- handleEvent(
- client,
- {
- type: "BulkMessageDelete",
- channel: "0",
- ids: client.messages
- .toList()
- .filter((message) => message.authorId === event.user_id)
- .map((message) => message.id),
- },
- setReady,
- );
+ handleEvent(
+ client,
+ {
+ type: "BulkMessageDelete",
+ channel: "0",
+ ids: client.messages
+ .toList()
+ .filter((message) => message.authorId === event.user_id)
+ .map((message) => message.id),
+ },
+ setReady,
+ );
- handleEvent(
- client,
- {
- type: "UserUpdate",
- id: event.user_id,
- data: {
- username: `Deleted User`,
- online: false,
- flags: event.flags,
- badges: 0,
- relationship: "None",
- },
- clear: ["Avatar", "StatusPresence", "StatusText"],
+ handleEvent(
+ client,
+ {
+ type: "UserUpdate",
+ id: event.user_id,
+ data: {
+ username: `Deleted User`,
+ online: false,
+ flags: event.flags,
+ badges: 0,
+ relationship: "None",
},
- setReady,
- );
- });
+ clear: ["Avatar", "StatusPresence", "StatusText"],
+ },
+ setReady,
+ );
break;
}
@@ -853,8 +836,7 @@ export async function handleEvent(
}
case "EmojiDelete": {
if (client.emojis.getOrPartial(event.id)) {
- const emoji = client.emojis.getUnderlyingObject(event.id);
- client.emit("emojiDelete", emoji);
+ client.emit("emojiDelete", client.emojis.getUnderlyingObject(event.id));
client.emojis.delete(event.id);
}
break;
diff --git a/src/hydration/bot.ts b/src/hydration/bot.ts
index 663d49a8..bed9ffdc 100644
--- a/src/hydration/bot.ts
+++ b/src/hydration/bot.ts
@@ -1,6 +1,6 @@
-import type { Bot as APIBot } from "revolt-api";
+import type { Bot } from "revolt-api";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedBot = {
id: string;
@@ -15,7 +15,7 @@ export type HydratedBot = {
flags: BotFlags;
};
-export const botHydration: Hydrate = {
+export const botHydration: Hydrate = {
keyMapping: {
_id: "id",
owner: "ownerId",
@@ -41,4 +41,5 @@ export const botHydration: Hydrate = {
/**
* Flags attributed to users
*/
+// deno-lint-ignore no-empty-enum
export enum BotFlags {}
diff --git a/src/hydration/channel.ts b/src/hydration/channel.ts
index 5307ff6f..da917598 100644
--- a/src/hydration/channel.ts
+++ b/src/hydration/channel.ts
@@ -1,23 +1,22 @@
-import { ReactiveSet } from "@solid-primitives/set";
-import type { Channel as APIChannel, OverrideField } from "revolt-api";
+import type { Channel, OverrideField } from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
-import type { Merge } from "../lib/merge.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedChannel = {
id: string;
- channelType: APIChannel["channel_type"];
+ channelType: Channel["channel_type"];
name: string;
description?: string;
icon?: File;
active: boolean;
- typingIds: ReactiveSet;
- recipientIds: ReactiveSet;
+ typingIds: Set;
+ recipientIds: Set;
userId?: string;
ownerId?: string;
@@ -31,7 +30,7 @@ export type HydratedChannel = {
lastMessageId?: string;
};
-export const channelHydration: Hydrate, HydratedChannel> = {
+export const channelHydration: Hydrate, HydratedChannel> = {
keyMapping: {
_id: "id",
channel_type: "channelType",
@@ -50,8 +49,8 @@ export const channelHydration: Hydrate, HydratedChannel> = {
description: (channel) => channel.description!,
icon: (channel, ctx) => new File(ctx as Client, channel.icon!),
active: (channel) => channel.active || false,
- typingIds: () => new ReactiveSet(),
- recipientIds: (channel) => new ReactiveSet(channel.recipients),
+ typingIds: () => new Set(),
+ recipientIds: (channel) => new Set(channel.recipients),
userId: (channel) => channel.user,
ownerId: (channel) => channel.owner,
serverId: (channel) => channel.server,
@@ -62,7 +61,7 @@ export const channelHydration: Hydrate, HydratedChannel> = {
lastMessageId: (channel) => channel.last_message_id!,
},
initialHydration: () => ({
- typingIds: new ReactiveSet(),
- recipientIds: new ReactiveSet(),
+ typingIds: new Set(),
+ recipientIds: new Set(),
}),
};
diff --git a/src/hydration/channelUnread.ts b/src/hydration/channelUnread.ts
index b30f503c..d9010428 100644
--- a/src/hydration/channelUnread.ts
+++ b/src/hydration/channelUnread.ts
@@ -1,14 +1,13 @@
-import { ReactiveSet } from "@solid-primitives/set";
import type { ChannelUnread } from "revolt-api";
-import type { Merge } from "../lib/merge.js";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedChannelUnread = {
id: string;
lastMessageId?: string;
- messageMentionIds: ReactiveSet;
+ messageMentionIds: Set;
};
export const channelUnreadHydration: Hydrate<
@@ -23,9 +22,9 @@ export const channelUnreadHydration: Hydrate<
functions: {
id: (unread) => unread._id.channel,
lastMessageId: (unread) => unread.last_id!,
- messageMentionIds: (unread) => new ReactiveSet(unread.mentions!),
+ messageMentionIds: (unread) => new Set(unread.mentions!),
},
initialHydration: () => ({
- messageMentionIds: new ReactiveSet(),
+ messageMentionIds: new Set(),
}),
};
diff --git a/src/hydration/channelWebhook.ts b/src/hydration/channelWebhook.ts
index ecf3abfb..6188d615 100644
--- a/src/hydration/channelWebhook.ts
+++ b/src/hydration/channelWebhook.ts
@@ -1,10 +1,10 @@
import type { Webhook } from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
-import type { Merge } from "../lib/merge.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedChannelWebhook = {
id: string;
diff --git a/src/hydration/emoji.ts b/src/hydration/emoji.ts
index 90e0564f..df91fbea 100644
--- a/src/hydration/emoji.ts
+++ b/src/hydration/emoji.ts
@@ -1,8 +1,8 @@
-import type { Emoji as APIEmoji, EmojiParent } from "revolt-api";
+import type { Emoji, EmojiParent } from "revolt-api";
-import type { Merge } from "../lib/merge.js";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedEmoji = {
id: string;
@@ -13,7 +13,7 @@ export type HydratedEmoji = {
nsfw: boolean;
};
-export const emojiHydration: Hydrate, HydratedEmoji> = {
+export const emojiHydration: Hydrate, HydratedEmoji> = {
keyMapping: {
_id: "id",
creator_id: "creatorId",
diff --git a/src/hydration/index.ts b/src/hydration/index.ts
index 0852ef9d..aebb4874 100644
--- a/src/hydration/index.ts
+++ b/src/hydration/index.ts
@@ -1,13 +1,13 @@
-import { botHydration } from "./bot.js";
-import { channelHydration } from "./channel.js";
-import { channelUnreadHydration } from "./channelUnread.js";
-import { channelWebhookHydration } from "./channelWebhook.js";
-import { emojiHydration } from "./emoji.js";
-import { messageHydration } from "./message.js";
-import { serverHydration } from "./server.js";
-import { serverMemberHydration } from "./serverMember.js";
-import { sessionHydration } from "./session.js";
-import { userHydration } from "./user.js";
+import { botHydration } from "./bot.ts";
+import { channelHydration } from "./channel.ts";
+import { channelUnreadHydration } from "./channelUnread.ts";
+import { channelWebhookHydration } from "./channelWebhook.ts";
+import { emojiHydration } from "./emoji.ts";
+import { messageHydration } from "./message.ts";
+import { serverHydration } from "./server.ts";
+import { serverMemberHydration } from "./serverMember.ts";
+import { sessionHydration } from "./session.ts";
+import { userHydration } from "./user.ts";
/**
* Functions to map from one object to another
@@ -81,11 +81,11 @@ const hydrators = {
export type Hydrators = typeof hydrators;
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-type ExtractInput = T extends Hydrate ? I : never;
+type ExtractIO = T extends Hydrate ? [I, O] : never;
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-type ExtractOutput = T extends Hydrate ? O : never;
+type ExtractInput = ExtractIO[0];
+
+type ExtractOutput = ExtractIO[1];
/**
* Hydrate some input with a given type
@@ -104,5 +104,5 @@ export function hydrate(
hydrators[type] as never,
initial ? { ...hydrators[type].initialHydration(), ...input } : input,
context,
- ) as ExtractOutput;
+ );
}
diff --git a/src/hydration/message.ts b/src/hydration/message.ts
index 6c454bfa..c7c55e10 100644
--- a/src/hydration/message.ts
+++ b/src/hydration/message.ts
@@ -1,15 +1,13 @@
-import { ReactiveMap } from "@solid-primitives/map";
-import { ReactiveSet } from "@solid-primitives/set";
import type { Interactions, Masquerade, Message } from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
-import { MessageWebhook } from "../classes/Message.js";
-import { MessageEmbed } from "../classes/MessageEmbed.js";
-import { SystemMessage } from "../classes/SystemMessage.js";
-import type { Merge } from "../lib/merge.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
+import { MessageWebhook } from "../classes/Message.ts";
+import { MessageEmbed } from "../classes/MessageEmbed.ts";
+import { SystemMessage } from "../classes/SystemMessage.ts";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedMessage = {
id: string;
@@ -25,7 +23,7 @@ export type HydratedMessage = {
mentionIds?: string[];
roleMentionIds?: string[];
replyIds?: string[];
- reactions: ReactiveMap>;
+ reactions: Map>;
interactions?: Interactions;
masquerade?: Masquerade;
pinned?: boolean;
@@ -63,10 +61,10 @@ export const messageHydration: Hydrate, HydratedMessage> = {
roleMentionIds: (message) => message.role_mentions!,
replyIds: (message) => message.replies!,
reactions: (message) => {
- const map = new ReactiveMap>();
+ const map = new Map>();
if (message.reactions) {
for (const reaction of Object.keys(message.reactions)) {
- map.set(reaction, new ReactiveSet(message.reactions![reaction]));
+ map.set(reaction, new Set(message.reactions![reaction]));
}
}
return map;
@@ -77,7 +75,7 @@ export const messageHydration: Hydrate, HydratedMessage> = {
flags: (message) => message.flags!,
},
initialHydration: () => ({
- reactions: new ReactiveMap(),
+ reactions: new Map(),
}),
};
diff --git a/src/hydration/server.ts b/src/hydration/server.ts
index acc66633..b5daa64c 100644
--- a/src/hydration/server.ts
+++ b/src/hydration/server.ts
@@ -1,16 +1,10 @@
-import { ReactiveMap } from "@solid-primitives/map";
-import { ReactiveSet } from "@solid-primitives/set";
-import type {
- Server as APIServer,
- Category,
- SystemMessageChannels,
-} from "revolt-api";
+import type { Category, Server, SystemMessageChannels } from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
-import { ServerRole } from "../classes/ServerRole.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
+import { ServerRole } from "../classes/ServerRole.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedServer = {
id: string;
@@ -22,11 +16,11 @@ export type HydratedServer = {
icon?: File;
banner?: File;
- channelIds: ReactiveSet;
+ channelIds: Set;
categories?: Category[];
systemMessages?: SystemMessageChannels;
- roles: ReactiveMap;
+ roles: Map;
defaultPermissions: number;
flags: ServerFlags;
@@ -35,7 +29,7 @@ export type HydratedServer = {
nsfw: boolean;
};
-export const serverHydration: Hydrate = {
+export const serverHydration: Hydrate = {
keyMapping: {
_id: "id",
owner: "ownerId",
@@ -48,11 +42,11 @@ export const serverHydration: Hydrate = {
ownerId: (server) => server.owner,
name: (server) => server.name,
description: (server) => server.description!,
- channelIds: (server) => new ReactiveSet(server.channels),
+ channelIds: (server) => new Set(server.channels),
categories: (server) => server.categories ?? [],
systemMessages: (server) => server.system_messages ?? {},
roles: (server, ctx) =>
- new ReactiveMap(
+ new Map(
Object.keys(server.roles!).map((id) => [
id,
new ServerRole(ctx as Client, server._id, id, server.roles![id]),
@@ -67,8 +61,8 @@ export const serverHydration: Hydrate = {
nsfw: (server) => server.nsfw || false,
},
initialHydration: () => ({
- channelIds: new ReactiveSet(),
- roles: new ReactiveMap(),
+ channelIds: new Set(),
+ roles: new Map(),
}),
};
diff --git a/src/hydration/serverMember.ts b/src/hydration/serverMember.ts
index ce3137ae..54feb44f 100644
--- a/src/hydration/serverMember.ts
+++ b/src/hydration/serverMember.ts
@@ -1,10 +1,10 @@
-import type { Member as APIMember, MemberCompositeKey } from "revolt-api";
+import type { Member, MemberCompositeKey } from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
-import type { Merge } from "../lib/merge.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
+import type { Merge } from "../lib/merge.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedServerMember = {
id: MemberCompositeKey;
@@ -16,7 +16,7 @@ export type HydratedServerMember = {
};
export const serverMemberHydration: Hydrate<
- Merge,
+ Merge,
HydratedServerMember
> = {
keyMapping: {
diff --git a/src/hydration/session.ts b/src/hydration/session.ts
index d16221e4..7f37f873 100644
--- a/src/hydration/session.ts
+++ b/src/hydration/session.ts
@@ -1,13 +1,13 @@
-import type { SessionInfo as APISession } from "revolt-api";
+import type { SessionInfo } from "revolt-api";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedSession = {
id: string;
name: string;
};
-export const sessionHydration: Hydrate = {
+export const sessionHydration: Hydrate = {
keyMapping: {
_id: "id",
},
diff --git a/src/hydration/user.ts b/src/hydration/user.ts
index 952b5290..e0240315 100644
--- a/src/hydration/user.ts
+++ b/src/hydration/user.ts
@@ -1,14 +1,14 @@
import type {
- User as APIUser,
BotInformation,
RelationshipStatus,
+ User,
UserStatus,
} from "revolt-api";
-import type { Client } from "../Client.js";
-import { File } from "../classes/File.js";
+import type { Client } from "../Client.ts";
+import { File } from "../classes/File.ts";
-import type { Hydrate } from "./index.js";
+import type { Hydrate } from "./index.ts";
export type HydratedUser = {
id: string;
@@ -29,7 +29,7 @@ export type HydratedUser = {
bot?: BotInformation;
};
-export const userHydration: Hydrate = {
+export const userHydration: Hydrate = {
keyMapping: {
_id: "id",
display_name: "displayName",
diff --git a/src/index.ts b/src/index.ts
index 6c32bbd1..9472120d 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,11 +1,10 @@
-export * as API from "revolt-api";
-export { Client } from "./Client.js";
-export type { ClientOptions, Session as PrivateSession } from "./Client.js";
-export * from "./classes/index.js";
-export * from "./collections/index.js";
-export { ConnectionState, EventClient } from "./events/EventClient.js";
-export { BotFlags } from "./hydration/bot.js";
-export { ServerFlags } from "./hydration/server.js";
-export { UserBadges, UserFlags } from "./hydration/user.js";
-export * from "./lib/regex.js";
-export * from './permissions/definitions.js';
+export { Client } from "./Client.ts";
+export type { ClientOptions, Session as PrivateSession } from "./Client.ts";
+export * from "./classes/index.ts";
+export * from "./collections/index.ts";
+export { ConnectionState, EventClient } from "./events/EventClient.ts";
+export { BotFlags } from "./hydration/bot.ts";
+export { ServerFlags } from "./hydration/server.ts";
+export { UserBadges, UserFlags } from "./hydration/user.ts";
+export * from "./lib/regex.ts";
+export * from "./permissions/definitions.ts";
diff --git a/src/lib/merge.ts b/src/lib/merge.ts
index 99324d55..1a883654 100644
--- a/src/lib/merge.ts
+++ b/src/lib/merge.ts
@@ -1,21 +1,21 @@
// Merge type provided by https://dev.to/lucianbc/union-type-merging-in-typescript-9al
-export type Merge = {
- [k in CommonKeys]: PickTypeOf;
-} & {
- [k in NonCommonKeys]?: PickTypeOf;
-};
+export type Merge =
+ & {
+ [k in CommonKeys]: PickTypeOf;
+ }
+ & {
+ [k in NonCommonKeys]?: PickTypeOf;
+ };
-type PickTypeOf =
- K extends AllKeys ? PickType : never;
+type PickTypeOf = K extends AllKeys
+ ? PickType
+ : never;
-// eslint-disable-next-line
-type PickType> = T extends { [k in K]?: any }
- ? T[K]
+type PickType> = T extends { [k in K]?: unknown } ? T[K]
: undefined;
type Subtract = A extends C ? never : A;
-type NonCommonKeys = Subtract, CommonKeys>;
+type NonCommonKeys = Subtract, CommonKeys>;
-// eslint-disable-next-line
-type AllKeys = T extends any ? keyof T : never;
-type CommonKeys = keyof T;
+type AllKeys = T extends unknown ? keyof T : never;
+type CommonKeys = keyof T;
diff --git a/src/permissions/calculator.ts b/src/permissions/calculator.ts
index 2daab6ef..d47b3864 100644
--- a/src/permissions/calculator.ts
+++ b/src/permissions/calculator.ts
@@ -1,4 +1,7 @@
-import { Channel, Client, Server, ServerMember } from "../index.js";
+import type { Client } from "../Client.ts";
+import type { Channel } from "../classes/Channel.ts";
+import { Server } from "../classes/Server.ts";
+import type { ServerMember } from "../classes/ServerMember.ts";
import {
ALLOW_IN_TIMEOUT,
@@ -6,7 +9,7 @@ import {
DEFAULT_PERMISSION_VIEW_ONLY,
Permission,
UserPermission,
-} from "./definitions.js";
+} from "./definitions.ts";
/**
* Check whether `b` is present in `a`
@@ -123,8 +126,7 @@ export function calculatePermission(
// 6. Apply default allows and denies for channel.
if (target.defaultPermissions) {
- perm =
- (perm | BigInt(target.defaultPermissions.a)) &
+ perm = (perm | BigInt(target.defaultPermissions.a)) &
~BigInt(target.defaultPermissions.d);
}
diff --git a/src/permissions/definitions.ts b/src/permissions/definitions.ts
index c6834b36..7a10e9d1 100644
--- a/src/permissions/definitions.ts
+++ b/src/permissions/definitions.ts
@@ -105,20 +105,19 @@ export const U32_MAX = 2 ** 32 - 1; // 4294967295
/**
* Permissions allowed for a user while in timeout
*/
-export const ALLOW_IN_TIMEOUT =
- Permission.ViewChannel + Permission.ReadMessageHistory;
+export const ALLOW_IN_TIMEOUT = Permission.ViewChannel +
+ Permission.ReadMessageHistory;
/**
* Default permissions if we can only view
*/
-export const DEFAULT_PERMISSION_VIEW_ONLY =
- Permission.ViewChannel + Permission.ReadMessageHistory;
+export const DEFAULT_PERMISSION_VIEW_ONLY = Permission.ViewChannel +
+ Permission.ReadMessageHistory;
/**
* Default base permissions for channels
*/
-export const DEFAULT_PERMISSION =
- DEFAULT_PERMISSION_VIEW_ONLY +
+export const DEFAULT_PERMISSION = DEFAULT_PERMISSION_VIEW_ONLY +
Permission.SendMessage +
Permission.InviteOthers +
Permission.SendEmbeds +
@@ -134,14 +133,13 @@ export const DEFAULT_PERMISSION_SAVED_MESSAGES = Permission.GrantAllSafe;
/**
* Permissions in direct message channels / default permissions for group DMs
*/
-export const DEFAULT_PERMISSION_DIRECT_MESSAGE =
- DEFAULT_PERMISSION + Permission.React + Permission.ManageChannel;
+export const DEFAULT_PERMISSION_DIRECT_MESSAGE = DEFAULT_PERMISSION +
+ Permission.React + Permission.ManageChannel;
/**
* Permissions in server text / voice channel
*/
-export const DEFAULT_PERMISSION_SERVER =
- DEFAULT_PERMISSION +
+export const DEFAULT_PERMISSION_SERVER = DEFAULT_PERMISSION +
Permission.React +
Permission.ChangeNickname +
Permission.ChangeAvatar;
diff --git a/src/storage/ObjectStorage.ts b/src/storage/ObjectStorage.ts
deleted file mode 100644
index 366389c1..00000000
--- a/src/storage/ObjectStorage.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { SetStoreFunction } from "solid-js/store";
-import { createStore } from "solid-js/store";
-
-import { type Hydrators, hydrate } from "../hydration/index.js";
-
-/**
- * Wrapper around Solid.js store
- */
-export class ObjectStorage {
- private store: Record;
- readonly set: SetStoreFunction>;
-
- /**
- * Create new object storage
- */
- constructor() {
- const [store, setStore] = createStore({});
- this.store = store as never;
- this.set = setStore;
- this.get = this.get.bind(this);
- }
-
- /**
- * Get object by ID
- * @param id ID
- * @returns Object
- */
- get(id: string): T | undefined {
- return this.store[id];
- }
-
- /**
- * Hydrate some data into storage
- * @param id ID
- * @param type Hydration type
- * @param context Context
- * @param data Input Data
- */
- hydrate(
- id: string,
- type: keyof Hydrators,
- context: unknown,
- data?: unknown
- ): void {
- if (data) {
- data = { partial: false, ...data };
- this.set(id, hydrate(type, data as never, context, true) as T);
- }
- }
-}
diff --git a/test.mjs b/test.mjs
deleted file mode 100644
index 0ebc8c76..00000000
--- a/test.mjs
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env -S node --env-file
-import { env } from "node:process";
-
-import { Client } from "./lib/index.js";
-
-const client = new Client({ debug: true });
-
-client.on("ready", () => console.info(`Logged in as ${client.user.username}!`));
-client.on("disconnected", () => console.info("Disconnected."));
-
-client.on("messageCreate", (message) => console.info(message.content));
-
-client.loginBot(env.TOKEN);
diff --git a/tsconfig.json b/tsconfig.json
deleted file mode 100644
index a39ec41d..00000000
--- a/tsconfig.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ES6",
- "moduleResolution": "node",
- "rootDir": "./src",
- "declaration": true,
- "declarationMap": true,
- "outDir": "./lib",
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "strict": true,
- "skipLibCheck": true
- }
-}