node-karin 1.9.0 → 1.9.1

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.9.1](https://github.com/KarinJS/Karin/compare/core-v1.9.0...core-v1.9.1) (2025-05-11)
4
+
5
+
6
+ ### ♻️ Code Refactoring
7
+
8
+ * **core:** 优化插件目录创建逻辑 ([#429](https://github.com/KarinJS/Karin/issues/429)) ([3828411](https://github.com/KarinJS/Karin/commit/382841192b4fe3f91a2797d2118d654a42308d1b))
9
+
3
10
  ## [1.9.0](https://github.com/KarinJS/Karin/compare/core-v1.8.13...core-v1.9.0) (2025-05-10)
4
11
 
5
12
 
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ ![karin](https://socialify.git.ci/karinjs/karin/image?description=1&font=Bitter&forks=1&issues=1&language=1&logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F162426977%3Fs%3D200%26v%3D4&name=1&owner=1&pulls=1&stargazers=1&theme=Auto)
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://contributors-img.web.app/image?repo=KarinJS/Karin)](https://github.com/KarinJS/Karin/graphs/contributors)
58
+
59
+ ![Alt](https://repobeats.axiom.co/api/embed/aaaa2759c8885691443a4d80e5753f975d4f250e.svg "Repobeats analytics image")
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) 了解最新变化。
package/dist/index.d.ts CHANGED
@@ -10103,7 +10103,7 @@ declare const downloadFile: <T extends boolean = false>(fileUrl: string, savePat
10103
10103
  * @param savePath 保存路径
10104
10104
  * @param param axios参数
10105
10105
  */
10106
- declare const downFile: (fileUrl: string, savePath: string, param?: AxiosRequestConfig) => Promise<boolean>;
10106
+ declare const downFile: (fileUrl: string, savePath: string, param?: AxiosRequestConfig) => Promise<DownloadFileResult<boolean>>;
10107
10107
  /**
10108
10108
  * 标准化文件路径 统一使用/分隔符
10109
10109
  * @param file - 路径
package/dist/index.mjs CHANGED
@@ -1371,8 +1371,12 @@ var init_file2 = __esm({
1371
1371
  createPluginDir = async (name, files) => {
1372
1372
  if (!Array.isArray(files)) files = ["config", "data", "resources"];
1373
1373
  if (files.length === 0) return;
1374
- const pluginPath = path5.join(karinPathBase, name);
1375
- if (!fs6.existsSync(pluginPath)) await fs6.promises.mkdir(pluginPath, { recursive: true });
1374
+ const isOrgPkg = name.startsWith("@") && name.includes("/");
1375
+ let pluginPath = isOrgPkg ? path5.join(karinPathBase, name.replace("/", "-")) : path5.join(karinPathBase, name);
1376
+ if (isOrgPkg && !fs6.existsSync(pluginPath)) {
1377
+ const [orgName, pkgName] = name.split("/");
1378
+ pluginPath = path5.join(karinPathBase, orgName, pkgName);
1379
+ }
1376
1380
  await Promise.all(files.map((file) => {
1377
1381
  const filePath = path5.join(pluginPath, file);
1378
1382
  if (!fs6.existsSync(filePath)) return fs6.promises.mkdir(filePath, { recursive: true });
@@ -19218,7 +19222,7 @@ var init_load = __esm({
19218
19222
  } else if (Array.isArray(pkg2.pkgData.karin?.files)) {
19219
19223
  files.push(...pkg2.pkgData.karin.files);
19220
19224
  }
19221
- await createPluginDir(pkg2.name.replace(/\//g, "-"), files);
19225
+ await createPluginDir(pkg2.name, files);
19222
19226
  debug("debug: createPluginDir", pkg2.name, files);
19223
19227
  pkg2.apps.forEach((app4) => {
19224
19228
  const promise = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Lightweight, efficient, concise, and stable robot framework.",
5
5
  "keywords": [
6
6
  "node",