node-karin 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/default/config/render.json +1 -1
- package/dist/cli/index.cjs +2 -6
- package/dist/cli/index.js +2 -6
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.12](https://github.com/KarinJS/Karin/compare/core-v1.0.11...core-v1.0.12) (2025-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* fix [#234](https://github.com/KarinJS/Karin/issues/234) fix [#233](https://github.com/KarinJS/Karin/issues/233) ([d03b7bd](https://github.com/KarinJS/Karin/commit/d03b7bd9f9b182825024d91f8e959b8344066e82))
|
|
9
|
+
|
|
10
|
+
## [1.0.11](https://github.com/KarinJS/Karin/compare/core-v1.0.10...core-v1.0.11) (2025-01-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fix [#231](https://github.com/KarinJS/Karin/issues/231) ([085f89d](https://github.com/KarinJS/Karin/commit/085f89d51beee4dbe715a3dc129432736ef3fe3d))
|
|
16
|
+
|
|
3
17
|
## [1.0.10](https://github.com/KarinJS/Karin/compare/core-v1.0.9...core-v1.0.10) (2025-01-15)
|
|
4
18
|
|
|
5
19
|
|
package/dist/cli/index.cjs
CHANGED
|
@@ -271,11 +271,7 @@ var modifyPackageJson = () => {
|
|
|
271
271
|
"pm2",
|
|
272
272
|
"stop",
|
|
273
273
|
"rs",
|
|
274
|
-
"log"
|
|
275
|
-
"up",
|
|
276
|
-
"dev",
|
|
277
|
-
"ts",
|
|
278
|
-
"watch"
|
|
274
|
+
"log"
|
|
279
275
|
];
|
|
280
276
|
list.forEach((v) => {
|
|
281
277
|
data.scripts[v] = `karin ${v}`;
|
|
@@ -394,7 +390,7 @@ var updateDependencies = async (packagePath) => {
|
|
|
394
390
|
try {
|
|
395
391
|
const { stdout: pkgInfoStr } = await exec(`pnpm view ${pkg} --json`);
|
|
396
392
|
const pkgInfo = JSON.parse(pkgInfoStr.trim());
|
|
397
|
-
if (!pkgInfo.karin) return;
|
|
393
|
+
if (!pkgInfo.karin && pkg !== "node-karin") return;
|
|
398
394
|
const currentVersion = version.replace(/[\^~]/g, "");
|
|
399
395
|
const { stdout: distTagsStr } = await exec(`pnpm view ${pkg} dist-tags --json`);
|
|
400
396
|
const distTags = JSON.parse(distTagsStr.trim());
|
package/dist/cli/index.js
CHANGED
|
@@ -262,11 +262,7 @@ var modifyPackageJson = () => {
|
|
|
262
262
|
"pm2",
|
|
263
263
|
"stop",
|
|
264
264
|
"rs",
|
|
265
|
-
"log"
|
|
266
|
-
"up",
|
|
267
|
-
"dev",
|
|
268
|
-
"ts",
|
|
269
|
-
"watch"
|
|
265
|
+
"log"
|
|
270
266
|
];
|
|
271
267
|
list.forEach((v) => {
|
|
272
268
|
data.scripts[v] = `karin ${v}`;
|
|
@@ -385,7 +381,7 @@ var updateDependencies = async (packagePath) => {
|
|
|
385
381
|
try {
|
|
386
382
|
const { stdout: pkgInfoStr } = await exec(`pnpm view ${pkg} --json`);
|
|
387
383
|
const pkgInfo = JSON.parse(pkgInfoStr.trim());
|
|
388
|
-
if (!pkgInfo.karin) return;
|
|
384
|
+
if (!pkgInfo.karin && pkg !== "node-karin") return;
|
|
389
385
|
const currentVersion = version.replace(/[\^~]/g, "");
|
|
390
386
|
const { stdout: distTagsStr } = await exec(`pnpm view ${pkg} dist-tags --json`);
|
|
391
387
|
const distTags = JSON.parse(distTagsStr.trim());
|
package/dist/index.js
CHANGED
|
@@ -3874,13 +3874,13 @@ var init_process = __esm({
|
|
|
3874
3874
|
return;
|
|
3875
3875
|
}
|
|
3876
3876
|
logger.error("\u68C0\u6D4B\u5230\u540E\u53F0\u8FDB\u7A0B \u6B63\u5728\u5173\u95ED...");
|
|
3877
|
-
const result = await axios3({ url: `${host2}/exit`, method: "get", timeout: 500 });
|
|
3877
|
+
const result = await axios3({ url: `${host2}/exit`, method: "get", timeout: 500, headers: { Authorization: `Bearer ${process.env.HTTP_AUTH_KEY}` } });
|
|
3878
3878
|
if (typeof result === "undefined") {
|
|
3879
3879
|
logger.fatal(logger.red(`\u5F53\u524D\u5B58\u5728\u591A\u5F00Bot\u5360\u7528 ${port2}\u7AEF\u53E3\uFF0C\u8BF7\u66F4\u6362\u7AEF\u53E3\u6216\u8005\u5173\u95ED\u5BF9\u5E94Bot`));
|
|
3880
3880
|
processExit(1);
|
|
3881
3881
|
}
|
|
3882
3882
|
for (let i = 0; i < 100; i++) {
|
|
3883
|
-
const result2 = await axios3({ url: `${host2}/ping`, method: "get", timeout: 100 });
|
|
3883
|
+
const result2 = await axios3({ url: `${host2}/ping`, method: "get", timeout: 100, headers: { Authorization: `Bearer ${process.env.HTTP_AUTH_KEY}` } });
|
|
3884
3884
|
if (result2) {
|
|
3885
3885
|
await sleep(50);
|
|
3886
3886
|
continue;
|
|
@@ -4834,8 +4834,9 @@ var init_ws = __esm({
|
|
|
4834
4834
|
throw error;
|
|
4835
4835
|
});
|
|
4836
4836
|
wss.on("connection", (socket, request) => {
|
|
4837
|
+
var _a;
|
|
4837
4838
|
debug(`wss:connection host: ${request.headers.host} url: ${request.url}`);
|
|
4838
|
-
if (request.url === "/" || request.url === "/onebot/v11/ws
|
|
4839
|
+
if (((_a = request == null ? void 0 : request.headers) == null ? void 0 : _a.a) || request.url === "/" || request.url === "/onebot/v11/ws" || request.url === "/onebot/v11/ws/") {
|
|
4839
4840
|
listeners.emit("ws:connection:onebot", socket, request);
|
|
4840
4841
|
return;
|
|
4841
4842
|
}
|