node-karin 1.8.7 → 1.8.8
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 +8 -0
- package/dist/index.mjs +13 -10
- package/dist/web/assets/js/components-CLB7wkmN.js.br +0 -0
- package/dist/web/assets/js/entry-T2jwWprd.js.br +0 -0
- package/dist/web/assets/js/hooks-DGvDG8bg.js.br +0 -0
- package/dist/web/assets/js/page-404.tsx-rh3UIlox.js +1 -0
- package/dist/web/assets/js/page-dashboard-BIzbCQc5.js.br +0 -0
- package/dist/web/assets/js/page-loading.tsx-Cz1_t9kn.js.br +0 -0
- package/dist/web/assets/js/page-login.tsx-CU4MLQqo.js.br +0 -0
- package/dist/web/assets/js/{utils-x5AKiszG.js → utils-BewWhq0h.js} +1 -1
- package/dist/web/assets/js/vendor-heroui-DwwsJlXF.js.br +0 -0
- package/dist/web/assets/js/vendor-others-D7Rwl1O6.js.br +0 -0
- package/dist/web/assets/js/vendor-react-BDRVXu1f.js.br +0 -0
- package/dist/web/assets/js/vendor-visual-BMhnpZxY.js.br +0 -0
- package/dist/web/index.html +9 -9
- package/package.json +1 -1
- package/README.md +0 -95
- package/dist/web/assets/js/components-SKlAGqzh.js.br +0 -0
- package/dist/web/assets/js/entry-vKz092kA.js.br +0 -0
- package/dist/web/assets/js/hooks-Cx1Yu0OX.js.br +0 -0
- package/dist/web/assets/js/page-404.tsx-BXEV4NBF.js +0 -1
- package/dist/web/assets/js/page-dashboard-BU7cB7ZI.js.br +0 -0
- package/dist/web/assets/js/page-loading.tsx-CJaYj8cR.js.br +0 -0
- package/dist/web/assets/js/page-login.tsx-CfavJf9W.js.br +0 -0
- package/dist/web/assets/js/vendor-heroui-D6FhP6a0.js.br +0 -0
- package/dist/web/assets/js/vendor-others-B6NXaB-r.js.br +0 -0
- package/dist/web/assets/js/vendor-react-Hg1DVPZt.js.br +0 -0
- package/dist/web/assets/js/vendor-visual-mzxhMYK3.js.br +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.8.8](https://github.com/KarinJS/Karin/compare/core-v1.8.7...core-v1.8.8) (2025-05-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* `.npmrc` ([#404](https://github.com/KarinJS/Karin/issues/404)) ([7769c31](https://github.com/KarinJS/Karin/commit/7769c31b63f7d458d4f4ca21ba4c2cd523c83b5e))
|
|
9
|
+
* **onebot:** 控制台不输出`base64://...` ([#402](https://github.com/KarinJS/Karin/issues/402)) ([a51d382](https://github.com/KarinJS/Karin/commit/a51d382feda71bc5838a085d0123ea7ec9e56213))
|
|
10
|
+
|
|
3
11
|
## [1.8.7](https://github.com/KarinJS/Karin/compare/core-v1.8.6...core-v1.8.7) (2025-05-07)
|
|
4
12
|
|
|
5
13
|
|
package/dist/index.mjs
CHANGED
|
@@ -3924,21 +3924,24 @@ function AdapterConvertKarin(data = []) {
|
|
|
3924
3924
|
}
|
|
3925
3925
|
return elements;
|
|
3926
3926
|
}
|
|
3927
|
-
var buildError, fileToBase64, KarinConvertAdapter;
|
|
3927
|
+
var formatLogString, buildError, fileToBase64, KarinConvertAdapter;
|
|
3928
3928
|
var init_convert = __esm({
|
|
3929
3929
|
"src/adapter/onebot/core/convert.ts"() {
|
|
3930
3930
|
init_message2();
|
|
3931
|
+
formatLogString = (str) => {
|
|
3932
|
+
return str.replace(/(["']?(?:base64|base):\/\/)[^"',}\s]*["']?/g, "$1...");
|
|
3933
|
+
};
|
|
3931
3934
|
buildError = (selfId, action, request2, error) => {
|
|
3932
3935
|
if (error) {
|
|
3933
3936
|
const err = JSON.stringify(error, null, 2).replace(/\\n/g, "\n");
|
|
3934
3937
|
return new Error(`[${selfId}][sendApi] \u8BF7\u6C42\u9519\u8BEF:
|
|
3935
3938
|
action: ${action}
|
|
3936
|
-
params: ${request2}
|
|
3939
|
+
params: ${formatLogString(request2)}
|
|
3937
3940
|
error: ${err}}`);
|
|
3938
3941
|
}
|
|
3939
3942
|
logger.error(`[${selfId}][sendApi][\u8BF7\u6C42\u9519\u8BEF]:
|
|
3940
3943
|
action: ${action}
|
|
3941
|
-
params: ${request2}`);
|
|
3944
|
+
params: ${formatLogString(request2)}`);
|
|
3942
3945
|
};
|
|
3943
3946
|
fileToBase64 = (file, url) => {
|
|
3944
3947
|
if (!url || !file.startsWith("file://")) return file;
|
|
@@ -9499,14 +9502,14 @@ var init_ws = __esm({
|
|
|
9499
9502
|
self_id: this.selfId
|
|
9500
9503
|
};
|
|
9501
9504
|
if (json3.echo) {
|
|
9502
|
-
logger.bot("debug", this.selfId, `Api\u8C03\u7528\u56DE\u5E94: ${str}`);
|
|
9505
|
+
logger.bot("debug", this.selfId, `Api\u8C03\u7528\u56DE\u5E94: ${formatLogString(str)}`);
|
|
9503
9506
|
return this.socket.emit(json3.echo, json3);
|
|
9504
9507
|
} else {
|
|
9505
9508
|
if (data.post_type === "meta_event" /* MetaEvent */ && data.meta_event_type === "heartbeat") {
|
|
9506
9509
|
logger.bot("trace", this.selfId, "\u5FC3\u8DF3");
|
|
9507
9510
|
return;
|
|
9508
9511
|
}
|
|
9509
|
-
logger.bot("debug", this.selfId, `\u6536\u5230\u4E0A\u62A5\u4E8B\u4EF6: ${str}`);
|
|
9512
|
+
logger.bot("debug", this.selfId, `\u6536\u5230\u4E0A\u62A5\u4E8B\u4EF6: ${formatLogString(str)}`);
|
|
9510
9513
|
}
|
|
9511
9514
|
this.eventHandlers(data, str);
|
|
9512
9515
|
});
|
|
@@ -9560,7 +9563,7 @@ var init_ws = __esm({
|
|
|
9560
9563
|
if (!time2) time2 = timeout();
|
|
9561
9564
|
const echo = ++this.seq + "";
|
|
9562
9565
|
const request2 = JSON.stringify({ echo, action, params });
|
|
9563
|
-
logger.bot("debug", this.selfId, `\u53D1\u9001Api\u8BF7\u6C42 ${action}: ${request2}`);
|
|
9566
|
+
logger.bot("debug", this.selfId, `\u53D1\u9001Api\u8BF7\u6C42 ${action}: ${formatLogString(request2)}`);
|
|
9564
9567
|
return new Promise((resolve, reject) => {
|
|
9565
9568
|
const timeoutId = setTimeout(() => {
|
|
9566
9569
|
reject(buildError(this.selfId, action, request2, "\u8BF7\u6C42\u8D85\u65F6"));
|
|
@@ -11750,10 +11753,10 @@ var HttpAdapterOneBot11;
|
|
|
11750
11753
|
var init_http = __esm({
|
|
11751
11754
|
"src/adapter/onebot/connect/http.ts"() {
|
|
11752
11755
|
init_utils2();
|
|
11753
|
-
init_convert();
|
|
11754
11756
|
init_base3();
|
|
11755
11757
|
init_listeners();
|
|
11756
11758
|
init_bot();
|
|
11759
|
+
init_convert();
|
|
11757
11760
|
init_types2();
|
|
11758
11761
|
init_register();
|
|
11759
11762
|
HttpAdapterOneBot11 = class extends AdapterOneBot {
|
|
@@ -11820,7 +11823,7 @@ var init_http = __esm({
|
|
|
11820
11823
|
async sendApi(action, params, time2 = 120) {
|
|
11821
11824
|
if (!time2) time2 = config_exports.timeout();
|
|
11822
11825
|
const request2 = JSON.stringify(params);
|
|
11823
|
-
logger.bot("debug", this.selfId, `\u53D1\u9001Api\u8BF7\u6C42 ${action}: ${request2}`);
|
|
11826
|
+
logger.bot("debug", this.selfId, `\u53D1\u9001Api\u8BF7\u6C42 ${action}: ${formatLogString(request2)}`);
|
|
11824
11827
|
try {
|
|
11825
11828
|
const token = getHttpBotApiToken(this.selfId);
|
|
11826
11829
|
const headers = token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -23050,7 +23053,7 @@ var init_npmrc = __esm({
|
|
|
23050
23053
|
};
|
|
23051
23054
|
getNpmConfig = async (keys) => {
|
|
23052
23055
|
if (typeof keys === "string") {
|
|
23053
|
-
const { stdout } = await exec(`npm config get ${keys}
|
|
23056
|
+
const { stdout } = await exec(`npm config get ${keys}`, { env: {} });
|
|
23054
23057
|
return stdout.trim();
|
|
23055
23058
|
}
|
|
23056
23059
|
const listResult = [];
|
|
@@ -23061,7 +23064,7 @@ var init_npmrc = __esm({
|
|
|
23061
23064
|
return listResult;
|
|
23062
23065
|
};
|
|
23063
23066
|
setNpmConfig = async (key, value) => {
|
|
23064
|
-
await exec(`npm config set ${key} ${value}`);
|
|
23067
|
+
await exec(`npm config set "${key}" "${value}"`);
|
|
23065
23068
|
};
|
|
23066
23069
|
}
|
|
23067
23070
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./vendor-react-BDRVXu1f.js";import{P as r}from"./components-CLB7wkmN.js";import"./vendor-others-D7Rwl1O6.js";import"./vendor-editor-B8hjWfkw.js";import"./vendor-ui-utils-5rYIvRjL.js";import"./vendor-heroui-DwwsJlXF.js";import"./page-dashboard-BIzbCQc5.js";import"./hooks-DGvDG8bg.js";import"./utils-BewWhq0h.js";import"./vendor-visual-BMhnpZxY.js";const x=()=>t.jsx("div",{className:"min-h-screen flex items-center justify-center",children:t.jsx(r,{})});export{x as default};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as p}from"./vendor-react-
|
|
1
|
+
import{V as p}from"./vendor-react-BDRVXu1f.js";import{a5 as g}from"./components-CLB7wkmN.js";const k=async(t,n,e,r)=>{const{setIsLogModalOpen:i,setTaskId:c,setTaskLogs:o,setTaskName:f}=n;f("更新插件");const a=["开始创建更新任务...",`options: ${JSON.stringify(t)}`];o(a);try{const s=await g(t);if(s.success&&s.taskId)c(s.taskId),o([...a,`
|
|
2
2
|
任务创建成功!`,`任务ID: ${s.taskId}`,"正在连接任务执行日志..."]),i(!0),typeof e=="function"&&e(),typeof r=="function"&&r();else throw new Error(s.message||"未知错误")}catch(s){console.error("更新失败:",s),p.error(`更新失败: ${s.message}`)}};export{k as c};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/web/index.html
CHANGED
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
content="viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
|
15
15
|
name="viewport" />
|
|
16
16
|
<link href="/web/assets/ico/favicon-BoqZd694.ico" rel="icon" />
|
|
17
|
-
<script type="module" crossorigin src="/web/assets/js/entry-
|
|
17
|
+
<script type="module" crossorigin src="/web/assets/js/entry-T2jwWprd.js"></script>
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-editor-B8hjWfkw.js">
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-others-
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-others-D7Rwl1O6.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-ui-utils-5rYIvRjL.js">
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-react-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-heroui-
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/hooks-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-visual-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/components-
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/utils-
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/web/assets/js/page-dashboard-
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-react-BDRVXu1f.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-heroui-DwwsJlXF.js">
|
|
23
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/hooks-DGvDG8bg.js">
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/vendor-visual-BMhnpZxY.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/components-CLB7wkmN.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/utils-BewWhq0h.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/web/assets/js/page-dashboard-BIzbCQc5.js">
|
|
28
28
|
<link rel="stylesheet" crossorigin href="/web/assets/css/vendor-editor-CFbL2ovg.css">
|
|
29
29
|
<link rel="stylesheet" crossorigin href="/web/assets/css/vendor-others-ZgkIHsf0.css">
|
|
30
30
|
<link rel="stylesheet" crossorigin href="/web/assets/css/components-ep7vm38G.css">
|
package/package.json
CHANGED
package/README.md
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
## 项目介绍
|
|
4
|
-
|
|
5
|
-
`karin`(卡琳)是一款灵活、现代、极易扩展的 Node.js 插件化应用框架,专为开发者打造,助你轻松构建属于自己的高效工具链和自动化服务。
|
|
6
|
-
|
|
7
|
-
✨ **主要特性**:
|
|
8
|
-
- 插件化架构,支持热插拔,生态丰富
|
|
9
|
-
- 一行命令即可初始化项目,快速上手
|
|
10
|
-
- 丰富的 Web UI(基于 React + HeroUI),颜值与功能并存
|
|
11
|
-
- 支持多种自动化场景、任务调度、依赖管理
|
|
12
|
-
- 轻松集成第三方服务,打造属于你的"数字助理"
|
|
13
|
-
- 社区活跃,持续更新,文档完善
|
|
14
|
-
|
|
15
|
-
> 🦄 让开发变得像魔法一样有趣!
|
|
16
|
-
|
|
17
|
-
## 🚀 稳定长期维护
|
|
18
|
-
|
|
19
|
-
自 `1.8.0` 版本起,Karin 已进入**稳定长期维护阶段**。我们承诺持续修复 bug、优化体验,并欢迎社区力量共同完善生态。
|
|
20
|
-
|
|
21
|
-
## 快速开始
|
|
22
|
-
|
|
23
|
-
[📚 查看最新文档](https://karin.fun/)
|
|
24
|
-
|
|
25
|
-
一键初始化:`pnpm create karin`
|
|
26
|
-
|
|
27
|
-
> 当前文档可能存在滞后性,欢迎加入交流群(967068507)一起玩耍、提建议!
|
|
28
|
-
|
|
29
|
-
## 温馨提示
|
|
30
|
-
|
|
31
|
-
> Karin 现已稳定,放心食用!遇到问题欢迎提 Issue 或加群讨论,我们会持续优化。
|
|
32
|
-
|
|
33
|
-
## 文档站说明
|
|
34
|
-
|
|
35
|
-
我们提供多个文档站点供您访问,解决可能出现的访问困难:
|
|
36
|
-
|
|
37
|
-
- **主文档站**: [https://karin.fun](https://karin.fun) (基于 GitHub Pages)
|
|
38
|
-
- **镜像站点**:
|
|
39
|
-
- 憨憨镜像: [https://karin.hanhanz.top](https://karin.hanhanz.top) (**推荐访问**)
|
|
40
|
-
- Vercel 镜像: [https://docs.karin.fun](https://docs.karin.fun) (**推荐访问**)
|
|
41
|
-
- Deno 镜像: [https://karin.deno.dev](https://karin.deno.dev) (**推荐访问**)
|
|
42
|
-
|
|
43
|
-
> 💡 主文档站托管在 GitHub 上,如访问不畅,推荐使用 Deno 镜像站
|
|
44
|
-
|
|
45
|
-
## 鸣谢
|
|
46
|
-
|
|
47
|
-
- webui: [bietiaop](https://github.com/bietiaop)
|
|
48
|
-
- docs: [ikenxuan](https://github.com/ikenxuan)
|
|
49
|
-
- name: [fuqiuluo](https://github.com/fuqiuluo)
|
|
50
|
-
|
|
51
|
-
> 🧙♂️ 感谢两位大佬的魔法加持!
|
|
52
|
-
|
|
53
|
-
### 贡献者
|
|
54
|
-
|
|
55
|
-
> 🌟 星光闪烁,你们的智慧如同璀璨的夜空。感谢所有为 **Karin** 做出贡献的人!
|
|
56
|
-
|
|
57
|
-
[](https://github.com/KarinJS/Karin/graphs/contributors)
|
|
58
|
-
|
|
59
|
-

|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
🎉 **加入我们,让 Karin 成为你开发路上的贴心伙伴!**
|
|
64
|
-
|
|
65
|
-
## 常见问题
|
|
66
|
-
|
|
67
|
-
- 文档没看懂?[点我提问](https://github.com/KarinJS/Karin/issues) 或加群 967068507
|
|
68
|
-
- 插件不会写?欢迎参考[插件开发文档](https://karin.fun/plugins/)
|
|
69
|
-
- 遇到 bug?大胆提 Issue,我们超快响应!
|
|
70
|
-
|
|
71
|
-
## 如何参与贡献(PR)
|
|
72
|
-
|
|
73
|
-
1. Fork 本仓库,创建你的分支
|
|
74
|
-
2. 提交你的更改,附上简要说明
|
|
75
|
-
3. 发起 Pull Request,耐心等待 Review
|
|
76
|
-
4. 你的名字将出现在贡献者列表,收获一份开源荣誉!
|
|
77
|
-
|
|
78
|
-
> 💡 欢迎任何形式的贡献,无论是代码、文档、建议还是灵感!
|
|
79
|
-
|
|
80
|
-
## Issue 指南
|
|
81
|
-
|
|
82
|
-
- 提交前请先搜索是否有类似问题
|
|
83
|
-
- 尽量提供详细的复现步骤、环境信息和截图
|
|
84
|
-
- 标题简明扼要,正文描述清晰
|
|
85
|
-
- 遇到安全相关问题请私信维护者
|
|
86
|
-
|
|
87
|
-
## 开源协议
|
|
88
|
-
|
|
89
|
-
本项目基于 [MIT License](./LICENSE) 开源,欢迎自由使用、修改和分发。
|
|
90
|
-
|
|
91
|
-
> 📢 记得给个 Star 支持我们,你的支持是我们最大的动力!
|
|
92
|
-
|
|
93
|
-
## 更新日志
|
|
94
|
-
|
|
95
|
-
我们定期发布更新,查看 [CHANGELOG](https://github.com/KarinJS/Karin/releases) 了解最新变化。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-react-Hg1DVPZt.js";import{P as r}from"./components-SKlAGqzh.js";import"./vendor-others-B6NXaB-r.js";import"./vendor-editor-B8hjWfkw.js";import"./vendor-ui-utils-5rYIvRjL.js";import"./vendor-heroui-D6FhP6a0.js";import"./page-dashboard-BU7cB7ZI.js";import"./hooks-Cx1Yu0OX.js";import"./utils-x5AKiszG.js";import"./vendor-visual-mzxhMYK3.js";const x=()=>t.jsx("div",{className:"min-h-screen flex items-center justify-center",children:t.jsx(r,{})});export{x as default};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|