@boses/skillink 0.0.0 → 1.0.5

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 yliu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yliu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -16,23 +16,17 @@
16
16
 
17
17
  ## 📦 安装
18
18
 
19
- 推荐全局安装以便在任何项目中使用:
19
+ 推荐作为开发依赖安装到项目中:
20
20
 
21
21
  ```bash
22
22
  # 使用 pnpm
23
- pnpm add -g @boses/skillink
23
+ pnpm add -D @boses/skillink
24
24
 
25
25
  # 使用 npm
26
- npm install -g @boses/skillink
26
+ npm install -D @boses/skillink
27
27
 
28
28
  # 使用 yarn
29
- yarn global add @boses/skillink
30
- ```
31
-
32
- 或者使用 `npx` 快速试用:
33
-
34
- ```bash
35
- npx @boses/skillink init
29
+ yarn add -D @boses/skillink
36
30
  ```
37
31
 
38
32
  ## 🚀 快速开始
@@ -42,7 +36,7 @@ npx @boses/skillink init
42
36
  在项目根目录下运行:
43
37
 
44
38
  ```bash
45
- skillink init
39
+ npx skillink init
46
40
  ```
47
41
 
48
42
  按照交互提示选择你正在使用的 AI 工具。该命令会自动:
@@ -62,13 +56,13 @@ skillink init
62
56
  ### 3. 同步到工具
63
57
 
64
58
  ```bash
65
- skillink sync
59
+ npx skillink sync
66
60
  ```
67
61
 
68
62
  想要在开发时自动同步新增的技能?运行:
69
63
 
70
64
  ```bash
71
- skillink sync --watch
65
+ npx skillink sync --watch
72
66
  ```
73
67
 
74
68
  ## 🛠️ 命令详解
@@ -79,11 +73,12 @@ skillink sync --watch
79
73
  | `sync` | 将技能同步到所有配置的目标工具中。支持 `-w, --watch` 模式。 |
80
74
  | `status` | 检查并显示当前所有技能与目标工具的同步状态。 |
81
75
  | `clean` | 移除所有由 Skillink 创建的符号链接,恢复环境。 |
76
+ | `check` | 检查是否有新版本可用。 |
82
77
 
83
78
  ## ⚙️ 配置说明 (`skillink.config.ts`)
84
79
 
85
80
  ```typescript
86
- import { defineConfig } from 'skillink';
81
+ import { defineConfig } from '@boses/skillink';
87
82
 
88
83
  export default defineConfig({
89
84
  // 技能源目录
@@ -1,8 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module';const require = createRequire(import.meta.url);
3
- import {
4
- init_esm_shims
5
- } from "../chunk-ZEFDUUIX.js";
6
-
7
- // src/bin/skillink.ts
8
- init_esm_shims();
3
+ import "../chunk-WG3NDRGG.js";
4
+ import "../chunk-AGAXTALJ.js";
@@ -0,0 +1,41 @@
1
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __commonJS = (cb, mod) => function __require() {
4
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
5
+ };
6
+
7
+ // src/core/config.ts
8
+ import path from "path";
9
+ import { existsSync } from "fs";
10
+ import { createJiti } from "jiti";
11
+ var CONFIG_FILES = [
12
+ "skillink.config.ts",
13
+ "skillink.config.js",
14
+ "skillink.config.mjs",
15
+ "skillink.config.cjs"
16
+ ];
17
+ async function loadConfig(cwd = process.cwd()) {
18
+ const jiti = createJiti(cwd);
19
+ for (const file of CONFIG_FILES) {
20
+ const configPath = path.join(cwd, file);
21
+ if (existsSync(configPath)) {
22
+ try {
23
+ const mod = await jiti.import(configPath);
24
+ return mod.default || mod;
25
+ } catch (error) {
26
+ console.error(`\u65E0\u6CD5\u4ECE ${file} \u52A0\u8F7D\u914D\u7F6E:`, error);
27
+ return null;
28
+ }
29
+ }
30
+ }
31
+ return null;
32
+ }
33
+ function defineConfig(config) {
34
+ return config;
35
+ }
36
+
37
+ export {
38
+ __commonJS,
39
+ loadConfig,
40
+ defineConfig
41
+ };