Commit 27ac687c authored by nanahira's avatar nanahira

bump

parent 405bfde2
......@@ -36,7 +36,10 @@ app
app
.command('image')
.action(async () =>
segment.image(await fs.promises.readFile(__dirname + '/10000.jpg')),
segment.image(
await fs.promises.readFile(__dirname + '/10000.jpg'),
'image/jpeg',
),
);
app
......
......@@ -10,7 +10,8 @@
"license": "MIT",
"dependencies": {
"file-type": "16.5.3",
"koishi-thirdeye": "^11.1.14",
"koishi-thirdeye": "^11.1.20",
"mime2ext": "^1.0.1",
"wechaty": "^1.20.2",
"wechaty-puppet-wechat": "^1.18.4"
},
......@@ -38,7 +39,7 @@
"ws": "^8.11.0"
},
"peerDependencies": {
"koishi": "^4.10.6"
"koishi": "^4.11.0"
}
},
"node_modules/@alloc/quick-lru": {
......@@ -1726,19 +1727,33 @@
}
},
"node_modules/@koishijs/core": {
"version": "4.10.6",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.10.6.tgz",
"integrity": "sha512-5rOr40u41SZzCvQObqGf2DANakFWWRvDditZG+0Z1/zczX6o+UJy9TXZUHEpTMfvMMEG7+DNECPZz8F6X8drLw==",
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.11.0.tgz",
"integrity": "sha512-urQGWpqifyFAqJuhfkbZVnO+OdFw/p+PZcMEelfrFi6iaKCLVXVlIO4zK4yEu+lHTwQiYwBszqu5NeoE9Z2kuA==",
"peer": true,
"dependencies": {
"@koishijs/utils": "^6.3.4",
"@minatojs/core": "^2.0.3",
"@satorijs/core": "^1.4.10",
"@koishijs/utils": "^6.4.0",
"@minatojs/core": "^2.1.0",
"@satorijs/core": "^1.5.2",
"cordis": "^2.6.0",
"cosmokit": "^1.3.6",
"cosmokit": "^1.4.0",
"fastest-levenshtein": "^1.0.16"
}
},
"node_modules/@koishijs/loader": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@koishijs/loader/-/loader-2.5.0.tgz",
"integrity": "sha512-8StBIK7+/sDr65d+MEm8htXblVCrIZORXcEO/O7Wupn0eMyktm7GI0kL7C7uLhHT5Yoiby36T5LeNbaKWeKWlg==",
"peer": true,
"dependencies": {
"dotenv": "^16.0.3",
"js-yaml": "^4.1.0",
"ns-require": "^1.1.4"
},
"peerDependencies": {
"@koishijs/core": "^4.11.0"
}
},
"node_modules/@koishijs/plugin-help": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-help/-/plugin-help-2.0.0.tgz",
......@@ -1749,23 +1764,23 @@
}
},
"node_modules/@koishijs/utils": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-6.3.4.tgz",
"integrity": "sha512-P8hQOTVYsk5rCkBcYbIKKKBm58etGlY/Q3xOuMEyz6BlTe0V8A6lFv56nInuPIaTOf4XprTceZBE6Oe3lC8RuQ==",
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-6.4.0.tgz",
"integrity": "sha512-GMIBnr4W6JZST5hB8u1sVH3+MH7ZcGIUy3IJU538Z4j/JbCoRnydNnCKggs7tB1JFHqq/7eHAsks/2WrfA/1ng==",
"peer": true,
"dependencies": {
"cosmokit": "^1.3.6",
"cosmokit": "^1.4.0",
"inaba": "^1.1.1",
"reggol": "^1.3.3",
"reggol": "^1.3.4",
"schemastery": "^3.6.1"
}
},
"node_modules/@minatojs/core": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@minatojs/core/-/core-2.0.3.tgz",
"integrity": "sha512-VZo1sDl9jLcejMyEfd/A+yZt/qre3vB+woSIZmWCm78zBR+CkFPk56y5EAMnu0cW9kgtq0p/KHa2VUVXyN71Bw==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@minatojs/core/-/core-2.1.0.tgz",
"integrity": "sha512-buMhprBZoMmH5vcy98YDKyBSDrt/C6VSNgbPKILPEJf0jikVmURHniqV1zZ+KL7M1jbOIHcyJE5w3+cMe4ifLQ==",
"dependencies": {
"cosmokit": "^1.3.4"
"cosmokit": "^1.4.0"
}
},
"node_modules/@nodelib/fs.scandir": {
......@@ -1866,44 +1881,45 @@
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
},
"node_modules/@satorijs/core": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@satorijs/core/-/core-1.4.10.tgz",
"integrity": "sha512-eTHYuoW6KAh6Fko874b9/50hq+CGD2FMFTT2K2htNdMFhKdGYkum3vpqmudPlThCefH4608rR5jU1vsebsKTrQ==",
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@satorijs/core/-/core-1.5.2.tgz",
"integrity": "sha512-5hnqwI6mSpDyzSHHIaaJBCwoiDjvDDBeD81rIwYW4JDKEKBOGWgVqNi4g+ru2s8gyR+M8cTvH71a1B2iOQiQTQ==",
"peer": true,
"dependencies": {
"@satorijs/element": "^2.2.1",
"@satorijs/element": "^2.3.1",
"cordis": "^2.6.0",
"cordis-axios": "^2.1.6",
"cosmokit": "^1.3.6",
"reggol": "^1.3.3",
"cordis-axios": "^2.2.0",
"cosmokit": "^1.4.0",
"reggol": "^1.3.4",
"schemastery": "^3.6.1",
"ws": "^8.11.0"
}
},
"node_modules/@satorijs/element": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@satorijs/element/-/element-2.2.1.tgz",
"integrity": "sha512-4oINBNinlxUQL+lsGKkGYgITNSGRfDeUUmE2lzHYbg/WSVg2eK11pNHtwGbud0KxnmNG687NxyF9czgd7t/4hg==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@satorijs/element/-/element-2.3.1.tgz",
"integrity": "sha512-p1hQVy56nfJ2dw1noEHkV7hKpC9yqe5u3Vla+CSPqXU12uB4zqv96rjT9n4WulNGl8XTzqWxp8q8KWqhSI8JFA==",
"peer": true,
"dependencies": {
"cosmokit": "^1.3.6"
"cosmokit": "^1.4.0"
}
},
"node_modules/@satorijs/satori": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@satorijs/satori/-/satori-1.4.10.tgz",
"integrity": "sha512-6rT02tmMyv/Tw0o9xaCH+uW8c947LcvLI2pDD/RG01X+hyh8OfGbeAK59GtKcIY9lnA3Rma7jCIB7dkMjPpt0w==",
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@satorijs/satori/-/satori-1.5.2.tgz",
"integrity": "sha512-e5l1NH9VVU8+4CeyKUWtr0mZ0E8WutvUzzqSuA5NCYkMMJ8A8xjqlHDOZtoEjtbp/AF9vnYVGHZC25DJw0zhig==",
"peer": true,
"dependencies": {
"@koa/router": "^10.1.1",
"@satorijs/core": "1.4.10",
"@satorijs/core": "1.5.2",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^8.5.3",
"agent-base": "^6.0.2",
"file-type": "^16.5.4",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"koa": "^2.13.4",
"koa": "^2.14.1",
"koa-bodyparser": "^4.3.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.1",
......@@ -1915,6 +1931,23 @@
"node": ">=12.0.0"
}
},
"node_modules/@satorijs/satori/node_modules/file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"peer": true,
"dependencies": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
}
},
"node_modules/@sinclair/typebox": {
"version": "0.24.51",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz",
......@@ -2277,9 +2310,9 @@
"dev": true
},
"node_modules/@types/ws": {
"version": "8.5.3",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
"integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
"version": "8.5.4",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",
"integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==",
"peer": true,
"dependencies": {
"@types/node": "*"
......@@ -2904,7 +2937,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
......@@ -2922,8 +2954,7 @@
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/arr-union": {
"version": "3.1.0",
......@@ -3127,6 +3158,15 @@
"node": "*"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"peer": true,
"engines": {
"node": ">=8"
}
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
......@@ -3160,7 +3200,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
},
......@@ -3283,6 +3322,15 @@
"node": ">= 0.8"
}
},
"node_modules/cac": {
"version": "6.7.14",
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
"integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
"peer": true,
"engines": {
"node": ">=8"
}
},
"node_modules/cache-content-type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz",
......@@ -3424,6 +3472,45 @@
"node": ">= 0.6"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"peer": true,
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/chokidar/node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"peer": true,
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
......@@ -3654,14 +3741,13 @@
}
},
"node_modules/cordis-axios": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/cordis-axios/-/cordis-axios-2.1.6.tgz",
"integrity": "sha512-GaJq5zoh4XRAFHEOyCLyU7kIcRrV7hqDVEh5kF4t047TmROAUaLukPKSMeMVMNohpKW4Vz+tj2FGEqMx5NuBQg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cordis-axios/-/cordis-axios-2.2.0.tgz",
"integrity": "sha512-gpFyu+nZoTSiPD1H8LsUxq2H7rtLFnm8UL5jOtwaTor20EmyVXiaSRV8Cc0yIcnobqmMmcY3VYVcXTir++DLtQ==",
"peer": true,
"dependencies": {
"axios": "~1.1.3",
"cosmokit": "^1.3.4",
"file-type": "^16.5.4",
"cosmokit": "^1.4.0",
"mime-db": "^1.52.0",
"schemastery": "^3.6.1"
},
......@@ -3672,23 +3758,6 @@
"cordis": "^2.6.0"
}
},
"node_modules/cordis-axios/node_modules/file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"peer": true,
"dependencies": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
}
},
"node_modules/cordis-decorators": {
"version": "1.0.22",
"resolved": "https://registry.npmjs.org/cordis-decorators/-/cordis-decorators-1.0.22.tgz",
......@@ -3712,9 +3781,9 @@
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
},
"node_modules/cosmokit": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/cosmokit/-/cosmokit-1.3.6.tgz",
"integrity": "sha512-buZvC7fuqBbSimJfkaaTJmlelpgj56L7VybjNkCy5UVvShMVQHi/bTZcuBfYLBwpuebSfvDZPwwHS5IfcoAnxg=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/cosmokit/-/cosmokit-1.4.0.tgz",
"integrity": "sha512-9Y5epwkPxnWDSjweuWoFATY8GKg9N1/r/3wL32Cjs7FIvo0S9syyY39xmNKq7+SZjbw+9bZUSbeQSbJaqufV3Q=="
},
"node_modules/create-require": {
"version": "1.1.1",
......@@ -4630,7 +4699,6 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
},
......@@ -4805,7 +4873,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
......@@ -5323,6 +5390,18 @@
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"peer": true,
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-buffer": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
......@@ -5369,7 +5448,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
......@@ -5415,7 +5493,6 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"dependencies": {
"is-extglob": "^2.1.1"
},
......@@ -5427,7 +5504,6 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"engines": {
"node": ">=0.12.0"
}
......@@ -6154,7 +6230,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"dependencies": {
"argparse": "^2.0.1"
},
......@@ -6378,49 +6453,48 @@
}
},
"node_modules/koishi": {
"version": "4.10.6",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.10.6.tgz",
"integrity": "sha512-s/VDoMKihMsjodSU9Vhs1Kkk3psQ6/sNx7MNuxAFo5KsXIJOgAQnJ+5TZxiqyGgxNT7NVNB4RHdQVDkYydbG1Q==",
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.11.0.tgz",
"integrity": "sha512-1XGqZRRZxkUn3a0RYY8/hQ2B5/8T7eWyH8C93VYLiLKpYoPZleh47mx4rpd/fI1zBBQC3VEym0m8ApfEqwGIkg==",
"peer": true,
"dependencies": {
"@koishijs/core": "^4.10.6",
"@koishijs/utils": "^6.3.4",
"@satorijs/satori": "^1.4.10",
"file-type": "^16.5.4",
"ns-require": "^1.1.4"
"@koishijs/core": "^4.11.0",
"@koishijs/loader": "^2.5.0",
"@koishijs/utils": "^6.4.0",
"@satorijs/satori": "^1.5.2",
"cac": "^6.7.14",
"chokidar": "^3.5.3",
"kleur": "^4.1.5",
"ns-require": "^1.1.4",
"throttle-debounce": "^3.0.1"
},
"bin": {
"koishi": "lib/cli/index.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/koishi-thirdeye": {
"version": "11.1.14",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.14.tgz",
"integrity": "sha512-poQZwMfkiurvDMdEhfa0TnhRhe/7VNismNDo6xcZAZVUfDl4Q8USCYEVwlmUvi6GSWl4X+4a51YL3VUZQX+GrA==",
"version": "11.1.20",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.20.tgz",
"integrity": "sha512-vWeK44PHhiLTbHTqK/h0ztcIidq7sQ3kNpersv7wSkSn6JYgZTRSdPMSOy+JNIpye+M7RXWz2y35Ua1OhNiyEw==",
"dependencies": {
"minato-decorators": "^2.2.1",
"rxjs": "^7.5.6",
"satori-decorators": "^1.1.1"
"satori-decorators": "^1.1.3"
},
"peerDependencies": {
"koishi": "^4.10.4"
"koishi": "^4.11.0"
}
},
"node_modules/koishi/node_modules/file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"node_modules/koishi/node_modules/kleur": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"peer": true,
"dependencies": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
"node": ">=6"
}
},
"node_modules/lazy-cache": {
......@@ -7006,6 +7080,11 @@
"node": ">= 0.6"
}
},
"node_modules/mime2ext": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mime2ext/-/mime2ext-1.0.1.tgz",
"integrity": "sha512-GW9keW4FtnqfEn4PltsEiSlfQj3rNAU+nGsvPk8+4kQJpo0tQ7/dCojFYgkPtOD2xk9ePrRqVFUAtPpjzY1Cgw=="
},
"node_modules/mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
......@@ -7183,7 +7262,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
......@@ -7491,7 +7569,6 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"engines": {
"node": ">=8.6"
},
......@@ -8239,6 +8316,18 @@
"url": "https://github.com/sponsors/Borewit"
}
},
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"peer": true,
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/rechoir": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
......@@ -8299,9 +8388,9 @@
}
},
"node_modules/reggol": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/reggol/-/reggol-1.3.3.tgz",
"integrity": "sha512-AmFo4aBBLwd1IosfkQ9cnWJF+RDXjrfmY2pFeRXSLlvi1UoqMYLsltR/514R8Dr/ZfAYdcD75V/vFDK60hgyOQ==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/reggol/-/reggol-1.3.4.tgz",
"integrity": "sha512-E/sL4WovP0kR5EHQx3YF4ZDsI5D5baTROXaELCN1mOCB8tEOVOR3PHr807yVcGit2BfmXMSW5KyRaUAV5K8Vzw==",
"peer": true,
"dependencies": {
"cosmokit": "^1.3.6",
......@@ -8562,9 +8651,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/satori-decorators": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/satori-decorators/-/satori-decorators-1.1.1.tgz",
"integrity": "sha512-1DHj12xFkVhAeS5Qh7MAWXYhMfwl0k/3VwtQrsoVNwPOyRCbid0ik3l16QwFZvHeoV+VJmEuOAFj/Vw+qDASuw==",
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/satori-decorators/-/satori-decorators-1.1.3.tgz",
"integrity": "sha512-GTUiU7MiyXy+d6C3XFaFscrc9w3VkCbjUzS1MJG8yFZTaqwHK7QXEnugXXc5YBFx2SiBS1K93ElY3kkrSpB1kw==",
"dependencies": {
"@types/koa": "^2.13.5",
"@types/koa__router": "^8.0.11",
......@@ -8572,7 +8661,7 @@
"lodash": "^4.17.21"
},
"peerDependencies": {
"koishi": "^4.9.7"
"koishi": "^4.11.0"
}
},
"node_modules/satori-decorators/node_modules/@types/koa__router": {
......@@ -9130,6 +9219,15 @@
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true
},
"node_modules/throttle-debounce": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",
"integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==",
"peer": true,
"engines": {
"node": ">=10"
}
},
"node_modules/through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
......@@ -9176,7 +9274,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"dependencies": {
"is-number": "^7.0.0"
},
......@@ -11625,19 +11722,30 @@
}
},
"@koishijs/core": {
"version": "4.10.6",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.10.6.tgz",
"integrity": "sha512-5rOr40u41SZzCvQObqGf2DANakFWWRvDditZG+0Z1/zczX6o+UJy9TXZUHEpTMfvMMEG7+DNECPZz8F6X8drLw==",
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.11.0.tgz",
"integrity": "sha512-urQGWpqifyFAqJuhfkbZVnO+OdFw/p+PZcMEelfrFi6iaKCLVXVlIO4zK4yEu+lHTwQiYwBszqu5NeoE9Z2kuA==",
"peer": true,
"requires": {
"@koishijs/utils": "^6.3.4",
"@minatojs/core": "^2.0.3",
"@satorijs/core": "^1.4.10",
"@koishijs/utils": "^6.4.0",
"@minatojs/core": "^2.1.0",
"@satorijs/core": "^1.5.2",
"cordis": "^2.6.0",
"cosmokit": "^1.3.6",
"cosmokit": "^1.4.0",
"fastest-levenshtein": "^1.0.16"
}
},
"@koishijs/loader": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@koishijs/loader/-/loader-2.5.0.tgz",
"integrity": "sha512-8StBIK7+/sDr65d+MEm8htXblVCrIZORXcEO/O7Wupn0eMyktm7GI0kL7C7uLhHT5Yoiby36T5LeNbaKWeKWlg==",
"peer": true,
"requires": {
"dotenv": "^16.0.3",
"js-yaml": "^4.1.0",
"ns-require": "^1.1.4"
}
},
"@koishijs/plugin-help": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-help/-/plugin-help-2.0.0.tgz",
......@@ -11646,23 +11754,23 @@
"requires": {}
},
"@koishijs/utils": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-6.3.4.tgz",
"integrity": "sha512-P8hQOTVYsk5rCkBcYbIKKKBm58etGlY/Q3xOuMEyz6BlTe0V8A6lFv56nInuPIaTOf4XprTceZBE6Oe3lC8RuQ==",
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-6.4.0.tgz",
"integrity": "sha512-GMIBnr4W6JZST5hB8u1sVH3+MH7ZcGIUy3IJU538Z4j/JbCoRnydNnCKggs7tB1JFHqq/7eHAsks/2WrfA/1ng==",
"peer": true,
"requires": {
"cosmokit": "^1.3.6",
"cosmokit": "^1.4.0",
"inaba": "^1.1.1",
"reggol": "^1.3.3",
"reggol": "^1.3.4",
"schemastery": "^3.6.1"
}
},
"@minatojs/core": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@minatojs/core/-/core-2.0.3.tgz",
"integrity": "sha512-VZo1sDl9jLcejMyEfd/A+yZt/qre3vB+woSIZmWCm78zBR+CkFPk56y5EAMnu0cW9kgtq0p/KHa2VUVXyN71Bw==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@minatojs/core/-/core-2.1.0.tgz",
"integrity": "sha512-buMhprBZoMmH5vcy98YDKyBSDrt/C6VSNgbPKILPEJf0jikVmURHniqV1zZ+KL7M1jbOIHcyJE5w3+cMe4ifLQ==",
"requires": {
"cosmokit": "^1.3.4"
"cosmokit": "^1.4.0"
}
},
"@nodelib/fs.scandir": {
......@@ -11751,50 +11859,64 @@
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
},
"@satorijs/core": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@satorijs/core/-/core-1.4.10.tgz",
"integrity": "sha512-eTHYuoW6KAh6Fko874b9/50hq+CGD2FMFTT2K2htNdMFhKdGYkum3vpqmudPlThCefH4608rR5jU1vsebsKTrQ==",
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@satorijs/core/-/core-1.5.2.tgz",
"integrity": "sha512-5hnqwI6mSpDyzSHHIaaJBCwoiDjvDDBeD81rIwYW4JDKEKBOGWgVqNi4g+ru2s8gyR+M8cTvH71a1B2iOQiQTQ==",
"peer": true,
"requires": {
"@satorijs/element": "^2.2.1",
"@satorijs/element": "^2.3.1",
"cordis": "^2.6.0",
"cordis-axios": "^2.1.6",
"cosmokit": "^1.3.6",
"reggol": "^1.3.3",
"cordis-axios": "^2.2.0",
"cosmokit": "^1.4.0",
"reggol": "^1.3.4",
"schemastery": "^3.6.1",
"ws": "^8.11.0"
}
},
"@satorijs/element": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@satorijs/element/-/element-2.2.1.tgz",
"integrity": "sha512-4oINBNinlxUQL+lsGKkGYgITNSGRfDeUUmE2lzHYbg/WSVg2eK11pNHtwGbud0KxnmNG687NxyF9czgd7t/4hg==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@satorijs/element/-/element-2.3.1.tgz",
"integrity": "sha512-p1hQVy56nfJ2dw1noEHkV7hKpC9yqe5u3Vla+CSPqXU12uB4zqv96rjT9n4WulNGl8XTzqWxp8q8KWqhSI8JFA==",
"peer": true,
"requires": {
"cosmokit": "^1.3.6"
"cosmokit": "^1.4.0"
}
},
"@satorijs/satori": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@satorijs/satori/-/satori-1.4.10.tgz",
"integrity": "sha512-6rT02tmMyv/Tw0o9xaCH+uW8c947LcvLI2pDD/RG01X+hyh8OfGbeAK59GtKcIY9lnA3Rma7jCIB7dkMjPpt0w==",
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@satorijs/satori/-/satori-1.5.2.tgz",
"integrity": "sha512-e5l1NH9VVU8+4CeyKUWtr0mZ0E8WutvUzzqSuA5NCYkMMJ8A8xjqlHDOZtoEjtbp/AF9vnYVGHZC25DJw0zhig==",
"peer": true,
"requires": {
"@koa/router": "^10.1.1",
"@satorijs/core": "1.4.10",
"@satorijs/core": "1.5.2",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^8.5.3",
"agent-base": "^6.0.2",
"file-type": "^16.5.4",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"koa": "^2.13.4",
"koa": "^2.14.1",
"koa-bodyparser": "^4.3.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.1",
"schemastery": "^3.6.1",
"socks-proxy-agent": "^5.0.1",
"ws": "^8.11.0"
},
"dependencies": {
"file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"peer": true,
"requires": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
}
}
}
},
"@sinclair/typebox": {
......@@ -12156,9 +12278,9 @@
"dev": true
},
"@types/ws": {
"version": "8.5.3",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
"integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
"version": "8.5.4",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",
"integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==",
"peer": true,
"requires": {
"@types/node": "*"
......@@ -12608,7 +12730,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
......@@ -12623,8 +12744,7 @@
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"arr-union": {
"version": "3.1.0",
......@@ -12774,6 +12894,12 @@
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true
},
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"peer": true
},
"bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
......@@ -12807,7 +12933,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
}
......@@ -12881,6 +13006,12 @@
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"peer": true
},
"cac": {
"version": "6.7.14",
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
"integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
"peer": true
},
"cache-content-type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz",
......@@ -12981,6 +13112,33 @@
"lodash.some": "^4.4.0"
}
},
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"peer": true,
"requires": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"fsevents": "~2.3.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"dependencies": {
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"peer": true,
"requires": {
"is-glob": "^4.0.1"
}
}
}
},
"chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
......@@ -13169,29 +13327,15 @@
}
},
"cordis-axios": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/cordis-axios/-/cordis-axios-2.1.6.tgz",
"integrity": "sha512-GaJq5zoh4XRAFHEOyCLyU7kIcRrV7hqDVEh5kF4t047TmROAUaLukPKSMeMVMNohpKW4Vz+tj2FGEqMx5NuBQg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cordis-axios/-/cordis-axios-2.2.0.tgz",
"integrity": "sha512-gpFyu+nZoTSiPD1H8LsUxq2H7rtLFnm8UL5jOtwaTor20EmyVXiaSRV8Cc0yIcnobqmMmcY3VYVcXTir++DLtQ==",
"peer": true,
"requires": {
"axios": "~1.1.3",
"cosmokit": "^1.3.4",
"file-type": "^16.5.4",
"cosmokit": "^1.4.0",
"mime-db": "^1.52.0",
"schemastery": "^3.6.1"
},
"dependencies": {
"file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"peer": true,
"requires": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
}
}
}
},
"cordis-decorators": {
......@@ -13213,9 +13357,9 @@
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
},
"cosmokit": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/cosmokit/-/cosmokit-1.3.6.tgz",
"integrity": "sha512-buZvC7fuqBbSimJfkaaTJmlelpgj56L7VybjNkCy5UVvShMVQHi/bTZcuBfYLBwpuebSfvDZPwwHS5IfcoAnxg=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/cosmokit/-/cosmokit-1.4.0.tgz",
"integrity": "sha512-9Y5epwkPxnWDSjweuWoFATY8GKg9N1/r/3wL32Cjs7FIvo0S9syyY39xmNKq7+SZjbw+9bZUSbeQSbJaqufV3Q=="
},
"create-require": {
"version": "1.1.1",
......@@ -13910,7 +14054,6 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
}
......@@ -14037,7 +14180,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"function-bind": {
......@@ -14413,6 +14555,15 @@
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
},
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"peer": true,
"requires": {
"binary-extensions": "^2.0.0"
}
},
"is-buffer": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
......@@ -14435,8 +14586,7 @@
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
},
"is-fullwidth-code-point": {
"version": "3.0.0",
......@@ -14467,7 +14617,6 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"requires": {
"is-extglob": "^2.1.1"
}
......@@ -14475,8 +14624,7 @@
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"is-plain-object": {
"version": "2.0.4",
......@@ -15048,7 +15196,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"requires": {
"argparse": "^2.0.1"
}
......@@ -15227,39 +15374,38 @@
}
},
"koishi": {
"version": "4.10.6",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.10.6.tgz",
"integrity": "sha512-s/VDoMKihMsjodSU9Vhs1Kkk3psQ6/sNx7MNuxAFo5KsXIJOgAQnJ+5TZxiqyGgxNT7NVNB4RHdQVDkYydbG1Q==",
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.11.0.tgz",
"integrity": "sha512-1XGqZRRZxkUn3a0RYY8/hQ2B5/8T7eWyH8C93VYLiLKpYoPZleh47mx4rpd/fI1zBBQC3VEym0m8ApfEqwGIkg==",
"peer": true,
"requires": {
"@koishijs/core": "^4.10.6",
"@koishijs/utils": "^6.3.4",
"@satorijs/satori": "^1.4.10",
"file-type": "^16.5.4",
"ns-require": "^1.1.4"
},
"dependencies": {
"file-type": {
"version": "16.5.4",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz",
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"peer": true,
"requires": {
"readable-web-to-node-stream": "^3.0.0",
"strtok3": "^6.2.4",
"token-types": "^4.1.1"
}
"@koishijs/core": "^4.11.0",
"@koishijs/loader": "^2.5.0",
"@koishijs/utils": "^6.4.0",
"@satorijs/satori": "^1.5.2",
"cac": "^6.7.14",
"chokidar": "^3.5.3",
"kleur": "^4.1.5",
"ns-require": "^1.1.4",
"throttle-debounce": "^3.0.1"
},
"dependencies": {
"kleur": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"peer": true
}
}
},
"koishi-thirdeye": {
"version": "11.1.14",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.14.tgz",
"integrity": "sha512-poQZwMfkiurvDMdEhfa0TnhRhe/7VNismNDo6xcZAZVUfDl4Q8USCYEVwlmUvi6GSWl4X+4a51YL3VUZQX+GrA==",
"version": "11.1.20",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.20.tgz",
"integrity": "sha512-vWeK44PHhiLTbHTqK/h0ztcIidq7sQ3kNpersv7wSkSn6JYgZTRSdPMSOy+JNIpye+M7RXWz2y35Ua1OhNiyEw==",
"requires": {
"minato-decorators": "^2.2.1",
"rxjs": "^7.5.6",
"satori-decorators": "^1.1.1"
"satori-decorators": "^1.1.3"
}
},
"lazy-cache": {
......@@ -15714,6 +15860,11 @@
"mime-db": "1.52.0"
}
},
"mime2ext": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mime2ext/-/mime2ext-1.0.1.tgz",
"integrity": "sha512-GW9keW4FtnqfEn4PltsEiSlfQj3rNAU+nGsvPk8+4kQJpo0tQ7/dCojFYgkPtOD2xk9ePrRqVFUAtPpjzY1Cgw=="
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
......@@ -15852,8 +16003,7 @@
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"npm-run-path": {
"version": "4.0.1",
......@@ -16090,8 +16240,7 @@
"picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
},
"pirates": {
"version": "4.0.5",
......@@ -16583,6 +16732,15 @@
"readable-stream": "^3.6.0"
}
},
"readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"peer": true,
"requires": {
"picomatch": "^2.2.1"
}
},
"rechoir": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
......@@ -16633,9 +16791,9 @@
"dev": true
},
"reggol": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/reggol/-/reggol-1.3.3.tgz",
"integrity": "sha512-AmFo4aBBLwd1IosfkQ9cnWJF+RDXjrfmY2pFeRXSLlvi1UoqMYLsltR/514R8Dr/ZfAYdcD75V/vFDK60hgyOQ==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/reggol/-/reggol-1.3.4.tgz",
"integrity": "sha512-E/sL4WovP0kR5EHQx3YF4ZDsI5D5baTROXaELCN1mOCB8tEOVOR3PHr807yVcGit2BfmXMSW5KyRaUAV5K8Vzw==",
"peer": true,
"requires": {
"cosmokit": "^1.3.6",
......@@ -16806,9 +16964,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"satori-decorators": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/satori-decorators/-/satori-decorators-1.1.1.tgz",
"integrity": "sha512-1DHj12xFkVhAeS5Qh7MAWXYhMfwl0k/3VwtQrsoVNwPOyRCbid0ik3l16QwFZvHeoV+VJmEuOAFj/Vw+qDASuw==",
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/satori-decorators/-/satori-decorators-1.1.3.tgz",
"integrity": "sha512-GTUiU7MiyXy+d6C3XFaFscrc9w3VkCbjUzS1MJG8yFZTaqwHK7QXEnugXXc5YBFx2SiBS1K93ElY3kkrSpB1kw==",
"requires": {
"@types/koa": "^2.13.5",
"@types/koa__router": "^8.0.11",
......@@ -17226,6 +17384,12 @@
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true
},
"throttle-debounce": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",
"integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==",
"peer": true
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
......@@ -17263,7 +17427,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
"is-number": "^7.0.0"
}
......
......@@ -47,12 +47,13 @@
},
"dependencies": {
"file-type": "16.5.3",
"koishi-thirdeye": "^11.1.14",
"koishi-thirdeye": "^11.1.20",
"mime2ext": "^1.0.1",
"wechaty": "^1.20.2",
"wechaty-puppet-wechat": "^1.18.4"
},
"peerDependencies": {
"koishi": "^4.10.6"
"koishi": "^4.11.0"
},
"devDependencies": {
"@koishijs/plugin-help": "^2.0.0",
......
......@@ -4,6 +4,7 @@ import type { RoomInterface } from 'wechaty/src/user-modules/room';
import type { MessageInterface } from 'wechaty/src/user-modules/message';
import WechatyBot from './index';
import FileType from 'file-type';
import mime2ext from 'mime2ext';
export type ContactLike = Pick<
ContactInterface,
......@@ -28,7 +29,9 @@ export const fileBoxToUrl = async (file: FileBoxLike): Promise<string> => {
} catch (e) {
buf = file['stream'];
}
return `base64://${buf.toString('base64')}`;
const fileType = await FileType.fromBuffer(buf);
const mime = fileType ? fileType.mime : 'application/octet-stream';
return `data:${mime};base64,${buf.toString('base64')}`;
};
export const adaptContact = async (
......@@ -173,6 +176,16 @@ export async function autoFilename(url: string) {
const type = await FileType.fromBuffer(buf);
return `file.${type.ext}`;
}
if (url.startsWith('data:')) {
const [, mime, base64] = url.match(/^data:([^;]+);base64,(.+)$/);
const ext = mime2ext(mime);
if (ext) {
return `file.${ext}`;
}
const buf = Buffer.from(base64, 'base64');
const type = await FileType.fromBuffer(buf);
return `file.${type?.ext || 'bin'}`;
}
return path.basename(new URL(url).pathname);
}
......@@ -187,6 +200,11 @@ export const elementToFileBox = async (element: Element) => {
if (url.startsWith('base64://')) {
return FileBox.fromBase64(url.slice(9), file || (await autoFilename(url)));
}
if (url.startsWith('data:')) {
const [, mime, base64] = url.match(/^data:([^;]+);base64,(.+)$/);
const ext = mime2ext(mime) || 'bin';
return FileBox.fromBase64(base64, file || `file.${ext}`);
}
return FileBox.fromUrl(url, {
name: file || (await autoFilename(url)),
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment