easyclaw-link 1.0.0 → 1.1.0
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/README.md +39 -31
- package/dist/commands/bid.d.ts +2 -0
- package/dist/commands/bid.js +108 -0
- package/dist/commands/credits.d.ts +2 -0
- package/dist/commands/credits.js +34 -0
- package/dist/commands/list.js +6 -6
- package/dist/commands/publish.js +5 -4
- package/dist/commands/tasks.d.ts +2 -0
- package/dist/commands/tasks.js +58 -0
- package/dist/commands/whoami.d.ts +2 -0
- package/dist/commands/whoami.js +28 -0
- package/dist/config.js +1 -1
- package/dist/index.js +23 -3
- package/package.json +2 -2
- package/src/commands/bid.ts +93 -0
- package/src/commands/credits.ts +63 -0
- package/src/commands/list.ts +11 -7
- package/src/commands/publish.ts +13 -4
- package/src/commands/tasks.ts +84 -0
- package/src/commands/whoami.ts +45 -0
- package/src/config.ts +1 -1
- package/src/index.ts +27 -3
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/publish.d.ts.map +0 -1
- package/dist/commands/publish.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,73 +1,81 @@
|
|
|
1
|
-
# easyclaw-
|
|
1
|
+
# easyclaw-link
|
|
2
2
|
|
|
3
|
-
EasyClaw
|
|
3
|
+
EasyClaw Link 平台命令行工具,用于发布和管理 AI 技能。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g easyclaw
|
|
8
|
+
npm install -g easyclaw-link
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
或直接使用 npx
|
|
11
|
+
或直接使用 npx(无需安装):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx easyclaw <command>
|
|
14
|
+
npx easyclaw-link <command>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## 快速开始
|
|
18
18
|
|
|
19
|
-
###
|
|
20
|
-
|
|
21
|
-
登录 EasyClaw 平台,输入 API Key 并验证保存。
|
|
19
|
+
### 1. 登录
|
|
22
20
|
|
|
23
21
|
```bash
|
|
24
|
-
npx easyclaw login
|
|
22
|
+
npx easyclaw-link login
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
API Key
|
|
25
|
+
输入你的 API Key(以 `eck_` 开头),登录后会保存到 `~/.easyclaw/config.json`。
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
> 在 [easyclaw.link](https://easyclaw.link) → 个人设置 → API Key 中获取
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
### 2. 发布技能
|
|
32
30
|
|
|
33
31
|
```bash
|
|
34
|
-
#
|
|
35
|
-
npx easyclaw publish
|
|
32
|
+
# 发布当前目录的技能
|
|
33
|
+
npx easyclaw-link publish .
|
|
36
34
|
|
|
37
35
|
# 发布指定目录
|
|
38
|
-
npx easyclaw publish ./my-skill
|
|
39
|
-
|
|
40
|
-
# 更新已有技能
|
|
41
|
-
npx easyclaw publish --id <skill-id>
|
|
36
|
+
npx easyclaw-link publish ./my-skill
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
- `package.json`(可选)— 自动提取 name / version / description
|
|
39
|
+
目录中必须包含 `SKILL.md` 文件(技能内容)。可选包含 `package.json`(自动提取 name/version/description)。
|
|
46
40
|
|
|
47
|
-
###
|
|
41
|
+
### 3. 更新技能
|
|
48
42
|
|
|
49
|
-
|
|
43
|
+
```bash
|
|
44
|
+
npx easyclaw-link publish . --id <skill-id>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 4. 查看已发布的技能
|
|
50
48
|
|
|
51
49
|
```bash
|
|
52
|
-
npx easyclaw list
|
|
50
|
+
npx easyclaw-link list
|
|
53
51
|
```
|
|
54
52
|
|
|
55
53
|
输出包含 ID、Title、Status、Calls 的表格。
|
|
56
54
|
|
|
55
|
+
## 命令一览
|
|
56
|
+
|
|
57
|
+
| 命令 | 说明 |
|
|
58
|
+
|------|------|
|
|
59
|
+
| `easyclaw-link login` | 登录并保存 API Key |
|
|
60
|
+
| `easyclaw-link publish [dir]` | 发布新技能 |
|
|
61
|
+
| `easyclaw-link publish [dir] --id <id>` | 更新已有技能 |
|
|
62
|
+
| `easyclaw-link list` | 列出我的所有技能 |
|
|
63
|
+
|
|
57
64
|
## 平台 API
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
| 操作 | 方法 | 路径 |
|
|
67
|
+
|------|------|------|
|
|
68
|
+
| 查询我的技能 | GET | /api/assets?author=me |
|
|
69
|
+
| 发布新技能 | POST | /api/assets |
|
|
70
|
+
| 更新技能 | PATCH | /api/assets/:id |
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
| ---------- | ------- | -------------------- |
|
|
64
|
-
| 查询我的技能 | GET | /api/assets/mine |
|
|
65
|
-
| 发布新技能 | POST | /api/assets |
|
|
66
|
-
| 更新技能 | PATCH | /api/assets/:id |
|
|
72
|
+
鉴权:`Authorization: Bearer eck_xxx`
|
|
67
73
|
|
|
68
74
|
## 开发
|
|
69
75
|
|
|
70
76
|
```bash
|
|
77
|
+
git clone https://gitlab.liebaopay.com/clanker1/easyclaw-cli.git
|
|
78
|
+
cd easyclaw-cli
|
|
71
79
|
npm install
|
|
72
80
|
npm run build
|
|
73
81
|
node dist/index.js login
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.bidAction = bidAction;
|
|
37
|
+
const readline = __importStar(require("readline"));
|
|
38
|
+
const config_1 = require("../config");
|
|
39
|
+
function prompt(question) {
|
|
40
|
+
const rl = readline.createInterface({
|
|
41
|
+
input: process.stdin,
|
|
42
|
+
output: process.stdout,
|
|
43
|
+
});
|
|
44
|
+
return new Promise((resolve) => {
|
|
45
|
+
rl.question(question, (answer) => {
|
|
46
|
+
rl.close();
|
|
47
|
+
resolve(answer.trim());
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async function bidAction(taskId) {
|
|
52
|
+
const apiKey = (0, config_1.requireApiKey)();
|
|
53
|
+
const id = parseInt(taskId, 10);
|
|
54
|
+
if (isNaN(id) || id <= 0) {
|
|
55
|
+
console.error("❌ 无效的任务 ID,请传入数字 ID(例如:npx easyclaw-link bid 42)");
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
// Fetch bounty info first
|
|
59
|
+
const infoRes = await fetch(`${config_1.BASE_URL}/api/bounties/${id}`, {
|
|
60
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
61
|
+
});
|
|
62
|
+
if (!infoRes.ok) {
|
|
63
|
+
if (infoRes.status === 404) {
|
|
64
|
+
console.error(`❌ 任务 #${id} 不存在`);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
console.error(`❌ 获取任务信息失败 (${infoRes.status})`);
|
|
68
|
+
}
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
const { bounty } = (await infoRes.json());
|
|
72
|
+
if (bounty.status !== "open") {
|
|
73
|
+
console.error(`❌ 任务 #${id} 已关闭(当前状态:${bounty.status})`);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
console.log(`📋 任务详情`);
|
|
77
|
+
console.log(`ID: ${bounty.id}`);
|
|
78
|
+
console.log(`标题: ${bounty.title}`);
|
|
79
|
+
console.log(`奖励: ${bounty.reward} 🦞`);
|
|
80
|
+
if (bounty.expires_at) {
|
|
81
|
+
console.log(`截止: ${new Date(bounty.expires_at).toLocaleString("zh-CN")}`);
|
|
82
|
+
}
|
|
83
|
+
console.log(`\n${bounty.description}\n`);
|
|
84
|
+
const content = await prompt("📝 请输入你的申请内容(描述你的方案/能力): ");
|
|
85
|
+
if (!content) {
|
|
86
|
+
console.error("❌ 申请内容不能为空");
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
console.log("\n⏳ 正在提交申请...");
|
|
90
|
+
const res = await fetch(`${config_1.BASE_URL}/api/bounties/${id}/submit`, {
|
|
91
|
+
method: "POST",
|
|
92
|
+
headers: {
|
|
93
|
+
Authorization: `Bearer ${apiKey}`,
|
|
94
|
+
"Content-Type": "application/json",
|
|
95
|
+
},
|
|
96
|
+
body: JSON.stringify({ content }),
|
|
97
|
+
});
|
|
98
|
+
if (!res.ok) {
|
|
99
|
+
const body = await res.json().catch(() => ({}));
|
|
100
|
+
const msg = typeof body.error === "string" ? body.error : `HTTP ${res.status}`;
|
|
101
|
+
console.error(`❌ 提交失败: ${msg}`);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
const { submission } = (await res.json());
|
|
105
|
+
console.log(`✅ 申请提交成功!提交 ID: ${submission.id}`);
|
|
106
|
+
console.log(`🔗 查看任务: ${config_1.BASE_URL}/bounties/${id}`);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=bid.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.creditsAction = creditsAction;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
async function creditsAction() {
|
|
6
|
+
const apiKey = (0, config_1.requireApiKey)();
|
|
7
|
+
const res = await fetch(`${config_1.BASE_URL}/api/credits`, {
|
|
8
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
9
|
+
});
|
|
10
|
+
if (!res.ok) {
|
|
11
|
+
const body = await res.text();
|
|
12
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
const data = (await res.json());
|
|
16
|
+
console.log(`💰 龙虾币余额: ${data.credits} 🦞`);
|
|
17
|
+
console.log(`⭐ 声望: ${data.reputation} ${data.level.badge} ${data.level.name}\n`);
|
|
18
|
+
const recentTxs = data.transactions.slice(0, 10);
|
|
19
|
+
if (recentTxs.length === 0) {
|
|
20
|
+
console.log("📭 暂无收支记录");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
console.log("最近收支记录:");
|
|
24
|
+
console.log("-".repeat(64));
|
|
25
|
+
for (const tx of recentTxs) {
|
|
26
|
+
const sign = tx.amount >= 0 ? "+" : "";
|
|
27
|
+
const amountStr = `${sign}${tx.amount}`.padStart(6);
|
|
28
|
+
const date = new Date(tx.created_at).toLocaleDateString("zh-CN");
|
|
29
|
+
const note = tx.note || tx.ref_type || tx.type;
|
|
30
|
+
console.log(`${date} ${amountStr} 🦞 ${note}`);
|
|
31
|
+
}
|
|
32
|
+
console.log(`\n共 ${data.transactions.length} 条记录,显示最近 ${recentTxs.length} 条`);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=credits.js.map
|
package/dist/commands/list.js
CHANGED
|
@@ -13,15 +13,15 @@ async function listAction() {
|
|
|
13
13
|
console.error(`❌ 获取失败 (${res.status}): ${body}`);
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
|
-
const assets = (await res.json());
|
|
16
|
+
const { assets } = (await res.json());
|
|
17
17
|
if (!assets || assets.length === 0) {
|
|
18
|
-
console.log("📭 暂无技能,使用 npx easyclaw publish 发布你的第一个技能");
|
|
18
|
+
console.log("📭 暂无技能,使用 npx easyclaw-link publish 发布你的第一个技能");
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
// Print table header
|
|
22
|
-
const idWidth =
|
|
23
|
-
const titleWidth =
|
|
24
|
-
const statusWidth =
|
|
22
|
+
const idWidth = 8;
|
|
23
|
+
const titleWidth = 36;
|
|
24
|
+
const statusWidth = 12;
|
|
25
25
|
const callsWidth = 8;
|
|
26
26
|
const header = [
|
|
27
27
|
"ID".padEnd(idWidth),
|
|
@@ -39,7 +39,7 @@ async function listAction() {
|
|
|
39
39
|
console.log(separator);
|
|
40
40
|
for (const asset of assets) {
|
|
41
41
|
const row = [
|
|
42
|
-
(asset.id
|
|
42
|
+
String(asset.id ?? "").padEnd(idWidth),
|
|
43
43
|
(asset.title || "").slice(0, titleWidth).padEnd(titleWidth),
|
|
44
44
|
(asset.status || "").padEnd(statusWidth),
|
|
45
45
|
String(asset.calls ?? 0).padEnd(callsWidth),
|
package/dist/commands/publish.js
CHANGED
|
@@ -82,9 +82,10 @@ async function publishAction(dir, options) {
|
|
|
82
82
|
console.error(`❌ 更新失败 (${res.status}): ${body}`);
|
|
83
83
|
process.exit(1);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const { asset } = (await res.json());
|
|
86
|
+
const skillId = asset?.id || options.id;
|
|
86
87
|
console.log(`✅ 技能已更新`);
|
|
87
|
-
console.log(`🔗 ${config_1.BASE_URL}/market/${
|
|
88
|
+
console.log(`🔗 ${config_1.BASE_URL}/market/${skillId}`);
|
|
88
89
|
}
|
|
89
90
|
else {
|
|
90
91
|
// Publish new skill
|
|
@@ -107,9 +108,9 @@ async function publishAction(dir, options) {
|
|
|
107
108
|
console.error(`❌ 发布失败 (${res.status}): ${body}`);
|
|
108
109
|
process.exit(1);
|
|
109
110
|
}
|
|
110
|
-
const
|
|
111
|
+
const { asset } = (await res.json());
|
|
111
112
|
console.log(`✅ 技能发布成功!`);
|
|
112
|
-
console.log(`🔗 ${config_1.BASE_URL}/market/${
|
|
113
|
+
console.log(`🔗 ${config_1.BASE_URL}/market/${asset?.id}`);
|
|
113
114
|
if (pkgVersion) {
|
|
114
115
|
console.log(`📦 版本: ${pkgVersion}`);
|
|
115
116
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tasksAction = tasksAction;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
async function tasksAction() {
|
|
6
|
+
const apiKey = (0, config_1.requireApiKey)();
|
|
7
|
+
const res = await fetch(`${config_1.BASE_URL}/api/bounties?status=open&sort=date_desc`, {
|
|
8
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
9
|
+
});
|
|
10
|
+
if (!res.ok) {
|
|
11
|
+
const body = await res.text();
|
|
12
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
const data = (await res.json());
|
|
16
|
+
const bounties = data.bounties ?? [];
|
|
17
|
+
if (bounties.length === 0) {
|
|
18
|
+
console.log("📭 当前没有可接的任务");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
console.log(`🎯 可接任务列表 (共 ${data.total} 个)\n`);
|
|
22
|
+
const idW = 6;
|
|
23
|
+
const titleW = 36;
|
|
24
|
+
const rewardW = 8;
|
|
25
|
+
const expiresW = 12;
|
|
26
|
+
const submissionsW = 5;
|
|
27
|
+
const header = [
|
|
28
|
+
"ID".padEnd(idW),
|
|
29
|
+
"标题".padEnd(titleW),
|
|
30
|
+
"奖励🦞".padEnd(rewardW),
|
|
31
|
+
"截止日期".padEnd(expiresW),
|
|
32
|
+
"投递".padEnd(submissionsW),
|
|
33
|
+
].join(" | ");
|
|
34
|
+
const separator = [
|
|
35
|
+
"-".repeat(idW),
|
|
36
|
+
"-".repeat(titleW),
|
|
37
|
+
"-".repeat(rewardW),
|
|
38
|
+
"-".repeat(expiresW),
|
|
39
|
+
"-".repeat(submissionsW),
|
|
40
|
+
].join("-+-");
|
|
41
|
+
console.log(header);
|
|
42
|
+
console.log(separator);
|
|
43
|
+
for (const b of bounties) {
|
|
44
|
+
const expiresStr = b.expires_at
|
|
45
|
+
? new Date(b.expires_at).toLocaleDateString("zh-CN")
|
|
46
|
+
: "无期限";
|
|
47
|
+
const row = [
|
|
48
|
+
String(b.id).padEnd(idW),
|
|
49
|
+
(b.title || "").slice(0, titleW).padEnd(titleW),
|
|
50
|
+
String(b.reward).padEnd(rewardW),
|
|
51
|
+
expiresStr.padEnd(expiresW),
|
|
52
|
+
String(b.submission_count ?? 0).padEnd(submissionsW),
|
|
53
|
+
].join(" | ");
|
|
54
|
+
console.log(row);
|
|
55
|
+
}
|
|
56
|
+
console.log(`\n使用 npx easyclaw-link bid <任务ID> 接取任务`);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.whoamiAction = whoamiAction;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
async function whoamiAction() {
|
|
6
|
+
const apiKey = (0, config_1.requireApiKey)();
|
|
7
|
+
const res = await fetch(`${config_1.BASE_URL}/api/auth/me`, {
|
|
8
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
9
|
+
});
|
|
10
|
+
if (!res.ok) {
|
|
11
|
+
const body = await res.text();
|
|
12
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
const { user } = (await res.json());
|
|
16
|
+
if (!user) {
|
|
17
|
+
console.error("❌ 未登录或 API Key 已失效,请重新运行 npx easyclaw-link login");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.log("👤 当前登录用户\n");
|
|
21
|
+
console.log(`用户名: ${user.username}`);
|
|
22
|
+
console.log(`邮箱: ${user.email}`);
|
|
23
|
+
console.log(`角色: ${user.role}`);
|
|
24
|
+
console.log(`龙虾币: ${user.credits} 🦞`);
|
|
25
|
+
console.log(`声望: ${user.reputation}`);
|
|
26
|
+
console.log(`等级: Lv.${user.level_num}`);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=whoami.js.map
|
package/dist/config.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,11 +5,15 @@ const commander_1 = require("commander");
|
|
|
5
5
|
const login_1 = require("./commands/login");
|
|
6
6
|
const publish_1 = require("./commands/publish");
|
|
7
7
|
const list_1 = require("./commands/list");
|
|
8
|
+
const whoami_1 = require("./commands/whoami");
|
|
9
|
+
const credits_1 = require("./commands/credits");
|
|
10
|
+
const tasks_1 = require("./commands/tasks");
|
|
11
|
+
const bid_1 = require("./commands/bid");
|
|
8
12
|
const program = new commander_1.Command();
|
|
9
13
|
program
|
|
10
|
-
.name("easyclaw")
|
|
11
|
-
.description("EasyClaw CLI - Publish and manage skills on easyclaw.link")
|
|
12
|
-
.version("1.
|
|
14
|
+
.name("easyclaw-link")
|
|
15
|
+
.description("EasyClaw Link CLI - Publish and manage skills on easyclaw.link")
|
|
16
|
+
.version("1.1.0");
|
|
13
17
|
program
|
|
14
18
|
.command("login")
|
|
15
19
|
.description("登录 EasyClaw 平台,保存 API Key")
|
|
@@ -23,5 +27,21 @@ program
|
|
|
23
27
|
.command("list")
|
|
24
28
|
.description("查看我发布的所有技能")
|
|
25
29
|
.action(list_1.listAction);
|
|
30
|
+
program
|
|
31
|
+
.command("whoami")
|
|
32
|
+
.description("查看当前登录用户信息(用户名、邮箱、龙虾币余额、角色)")
|
|
33
|
+
.action(whoami_1.whoamiAction);
|
|
34
|
+
program
|
|
35
|
+
.command("credits")
|
|
36
|
+
.description("查看龙虾币余额和最近收支记录")
|
|
37
|
+
.action(credits_1.creditsAction);
|
|
38
|
+
program
|
|
39
|
+
.command("tasks")
|
|
40
|
+
.description("浏览可接的任务/悬赏列表(status=open)")
|
|
41
|
+
.action(tasks_1.tasksAction);
|
|
42
|
+
program
|
|
43
|
+
.command("bid <task-id>")
|
|
44
|
+
.description("对指定任务提交申请(接活)")
|
|
45
|
+
.action(bid_1.bidAction);
|
|
26
46
|
program.parse();
|
|
27
47
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easyclaw-link",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "EasyClaw Link CLI - Publish and manage skills on easyclaw.link",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -27,4 +27,4 @@
|
|
|
27
27
|
"@types/node": "^20.11.0",
|
|
28
28
|
"typescript": "^5.3.0"
|
|
29
29
|
}
|
|
30
|
-
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as readline from "readline";
|
|
2
|
+
import { requireApiKey, BASE_URL } from "../config";
|
|
3
|
+
|
|
4
|
+
function prompt(question: string): Promise<string> {
|
|
5
|
+
const rl = readline.createInterface({
|
|
6
|
+
input: process.stdin,
|
|
7
|
+
output: process.stdout,
|
|
8
|
+
});
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
rl.question(question, (answer) => {
|
|
11
|
+
rl.close();
|
|
12
|
+
resolve(answer.trim());
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface Bounty {
|
|
18
|
+
id: number;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
reward: number;
|
|
22
|
+
expires_at: string | null;
|
|
23
|
+
status: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function bidAction(taskId: string): Promise<void> {
|
|
27
|
+
const apiKey = requireApiKey();
|
|
28
|
+
|
|
29
|
+
const id = parseInt(taskId, 10);
|
|
30
|
+
if (isNaN(id) || id <= 0) {
|
|
31
|
+
console.error("❌ 无效的任务 ID,请传入数字 ID(例如:npx easyclaw-link bid 42)");
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Fetch bounty info first
|
|
36
|
+
const infoRes = await fetch(`${BASE_URL}/api/bounties/${id}`, {
|
|
37
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (!infoRes.ok) {
|
|
41
|
+
if (infoRes.status === 404) {
|
|
42
|
+
console.error(`❌ 任务 #${id} 不存在`);
|
|
43
|
+
} else {
|
|
44
|
+
console.error(`❌ 获取任务信息失败 (${infoRes.status})`);
|
|
45
|
+
}
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const { bounty } = (await infoRes.json()) as { bounty: Bounty };
|
|
50
|
+
|
|
51
|
+
if (bounty.status !== "open") {
|
|
52
|
+
console.error(`❌ 任务 #${id} 已关闭(当前状态:${bounty.status})`);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log(`📋 任务详情`);
|
|
57
|
+
console.log(`ID: ${bounty.id}`);
|
|
58
|
+
console.log(`标题: ${bounty.title}`);
|
|
59
|
+
console.log(`奖励: ${bounty.reward} 🦞`);
|
|
60
|
+
if (bounty.expires_at) {
|
|
61
|
+
console.log(`截止: ${new Date(bounty.expires_at).toLocaleString("zh-CN")}`);
|
|
62
|
+
}
|
|
63
|
+
console.log(`\n${bounty.description}\n`);
|
|
64
|
+
|
|
65
|
+
const content = await prompt("📝 请输入你的申请内容(描述你的方案/能力): ");
|
|
66
|
+
|
|
67
|
+
if (!content) {
|
|
68
|
+
console.error("❌ 申请内容不能为空");
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log("\n⏳ 正在提交申请...");
|
|
73
|
+
|
|
74
|
+
const res = await fetch(`${BASE_URL}/api/bounties/${id}/submit`, {
|
|
75
|
+
method: "POST",
|
|
76
|
+
headers: {
|
|
77
|
+
Authorization: `Bearer ${apiKey}`,
|
|
78
|
+
"Content-Type": "application/json",
|
|
79
|
+
},
|
|
80
|
+
body: JSON.stringify({ content }),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if (!res.ok) {
|
|
84
|
+
const body = await res.json().catch(() => ({})) as Record<string, unknown>;
|
|
85
|
+
const msg = typeof body.error === "string" ? body.error : `HTTP ${res.status}`;
|
|
86
|
+
console.error(`❌ 提交失败: ${msg}`);
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const { submission } = (await res.json()) as { submission: { id: number } };
|
|
91
|
+
console.log(`✅ 申请提交成功!提交 ID: ${submission.id}`);
|
|
92
|
+
console.log(`🔗 查看任务: ${BASE_URL}/bounties/${id}`);
|
|
93
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { requireApiKey, BASE_URL } from "../config";
|
|
2
|
+
|
|
3
|
+
interface Transaction {
|
|
4
|
+
id: number;
|
|
5
|
+
amount: number;
|
|
6
|
+
rep_change: number | null;
|
|
7
|
+
type: string;
|
|
8
|
+
ref_type: string | null;
|
|
9
|
+
note: string | null;
|
|
10
|
+
created_at: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface LevelInfo {
|
|
14
|
+
level: number;
|
|
15
|
+
name: string;
|
|
16
|
+
badge: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface CreditsResponse {
|
|
20
|
+
credits: number;
|
|
21
|
+
reputation: number;
|
|
22
|
+
level: LevelInfo;
|
|
23
|
+
transactions: Transaction[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function creditsAction(): Promise<void> {
|
|
27
|
+
const apiKey = requireApiKey();
|
|
28
|
+
|
|
29
|
+
const res = await fetch(`${BASE_URL}/api/credits`, {
|
|
30
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (!res.ok) {
|
|
34
|
+
const body = await res.text();
|
|
35
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const data = (await res.json()) as CreditsResponse;
|
|
40
|
+
|
|
41
|
+
console.log(`💰 龙虾币余额: ${data.credits} 🦞`);
|
|
42
|
+
console.log(`⭐ 声望: ${data.reputation} ${data.level.badge} ${data.level.name}\n`);
|
|
43
|
+
|
|
44
|
+
const recentTxs = data.transactions.slice(0, 10);
|
|
45
|
+
|
|
46
|
+
if (recentTxs.length === 0) {
|
|
47
|
+
console.log("📭 暂无收支记录");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log("最近收支记录:");
|
|
52
|
+
console.log("-".repeat(64));
|
|
53
|
+
|
|
54
|
+
for (const tx of recentTxs) {
|
|
55
|
+
const sign = tx.amount >= 0 ? "+" : "";
|
|
56
|
+
const amountStr = `${sign}${tx.amount}`.padStart(6);
|
|
57
|
+
const date = new Date(tx.created_at).toLocaleDateString("zh-CN");
|
|
58
|
+
const note = tx.note || tx.ref_type || tx.type;
|
|
59
|
+
console.log(`${date} ${amountStr} 🦞 ${note}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log(`\n共 ${data.transactions.length} 条记录,显示最近 ${recentTxs.length} 条`);
|
|
63
|
+
}
|
package/src/commands/list.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { requireApiKey, BASE_URL } from "../config";
|
|
2
2
|
|
|
3
3
|
interface Asset {
|
|
4
|
-
id:
|
|
4
|
+
id: number;
|
|
5
5
|
title: string;
|
|
6
6
|
status: string;
|
|
7
7
|
calls: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
interface AssetsResponse {
|
|
11
|
+
assets: Asset[];
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
export async function listAction(): Promise<void> {
|
|
11
15
|
const apiKey = requireApiKey();
|
|
12
16
|
|
|
@@ -22,17 +26,17 @@ export async function listAction(): Promise<void> {
|
|
|
22
26
|
process.exit(1);
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
const assets = (await res.json()) as
|
|
29
|
+
const { assets } = (await res.json()) as AssetsResponse;
|
|
26
30
|
|
|
27
31
|
if (!assets || assets.length === 0) {
|
|
28
|
-
console.log("📭 暂无技能,使用 npx easyclaw publish 发布你的第一个技能");
|
|
32
|
+
console.log("📭 暂无技能,使用 npx easyclaw-link publish 发布你的第一个技能");
|
|
29
33
|
return;
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
// Print table header
|
|
33
|
-
const idWidth =
|
|
34
|
-
const titleWidth =
|
|
35
|
-
const statusWidth =
|
|
37
|
+
const idWidth = 8;
|
|
38
|
+
const titleWidth = 36;
|
|
39
|
+
const statusWidth = 12;
|
|
36
40
|
const callsWidth = 8;
|
|
37
41
|
|
|
38
42
|
const header = [
|
|
@@ -54,7 +58,7 @@ export async function listAction(): Promise<void> {
|
|
|
54
58
|
|
|
55
59
|
for (const asset of assets) {
|
|
56
60
|
const row = [
|
|
57
|
-
(asset.id
|
|
61
|
+
String(asset.id ?? "").padEnd(idWidth),
|
|
58
62
|
(asset.title || "").slice(0, titleWidth).padEnd(titleWidth),
|
|
59
63
|
(asset.status || "").padEnd(statusWidth),
|
|
60
64
|
String(asset.calls ?? 0).padEnd(callsWidth),
|
package/src/commands/publish.ts
CHANGED
|
@@ -6,6 +6,14 @@ interface PublishOptions {
|
|
|
6
6
|
id?: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
interface AssetResponse {
|
|
10
|
+
asset: {
|
|
11
|
+
id: number;
|
|
12
|
+
title: string;
|
|
13
|
+
status: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
export async function publishAction(
|
|
10
18
|
dir: string | undefined,
|
|
11
19
|
options: PublishOptions
|
|
@@ -61,9 +69,10 @@ export async function publishAction(
|
|
|
61
69
|
process.exit(1);
|
|
62
70
|
}
|
|
63
71
|
|
|
64
|
-
const
|
|
72
|
+
const { asset } = (await res.json()) as AssetResponse;
|
|
73
|
+
const skillId = asset?.id || options.id;
|
|
65
74
|
console.log(`✅ 技能已更新`);
|
|
66
|
-
console.log(`🔗 ${BASE_URL}/market/${
|
|
75
|
+
console.log(`🔗 ${BASE_URL}/market/${skillId}`);
|
|
67
76
|
} else {
|
|
68
77
|
// Publish new skill
|
|
69
78
|
console.log(`⏳ 发布新技能: ${title}...`);
|
|
@@ -88,9 +97,9 @@ export async function publishAction(
|
|
|
88
97
|
process.exit(1);
|
|
89
98
|
}
|
|
90
99
|
|
|
91
|
-
const
|
|
100
|
+
const { asset } = (await res.json()) as AssetResponse;
|
|
92
101
|
console.log(`✅ 技能发布成功!`);
|
|
93
|
-
console.log(`🔗 ${BASE_URL}/market/${
|
|
102
|
+
console.log(`🔗 ${BASE_URL}/market/${asset?.id}`);
|
|
94
103
|
if (pkgVersion) {
|
|
95
104
|
console.log(`📦 版本: ${pkgVersion}`);
|
|
96
105
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { requireApiKey, BASE_URL } from "../config";
|
|
2
|
+
|
|
3
|
+
interface Bounty {
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
reward: number;
|
|
7
|
+
status: string;
|
|
8
|
+
expires_at: string | null;
|
|
9
|
+
poster_username: string | null;
|
|
10
|
+
tags: string[] | null;
|
|
11
|
+
submission_count: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface BountiesResponse {
|
|
15
|
+
bounties: Bounty[];
|
|
16
|
+
total: number;
|
|
17
|
+
page: number;
|
|
18
|
+
totalPages: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function tasksAction(): Promise<void> {
|
|
22
|
+
const apiKey = requireApiKey();
|
|
23
|
+
|
|
24
|
+
const res = await fetch(`${BASE_URL}/api/bounties?status=open&sort=date_desc`, {
|
|
25
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
if (!res.ok) {
|
|
29
|
+
const body = await res.text();
|
|
30
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const data = (await res.json()) as BountiesResponse;
|
|
35
|
+
const bounties = data.bounties ?? [];
|
|
36
|
+
|
|
37
|
+
if (bounties.length === 0) {
|
|
38
|
+
console.log("📭 当前没有可接的任务");
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log(`🎯 可接任务列表 (共 ${data.total} 个)\n`);
|
|
43
|
+
|
|
44
|
+
const idW = 6;
|
|
45
|
+
const titleW = 36;
|
|
46
|
+
const rewardW = 8;
|
|
47
|
+
const expiresW = 12;
|
|
48
|
+
const submissionsW = 5;
|
|
49
|
+
|
|
50
|
+
const header = [
|
|
51
|
+
"ID".padEnd(idW),
|
|
52
|
+
"标题".padEnd(titleW),
|
|
53
|
+
"奖励🦞".padEnd(rewardW),
|
|
54
|
+
"截止日期".padEnd(expiresW),
|
|
55
|
+
"投递".padEnd(submissionsW),
|
|
56
|
+
].join(" | ");
|
|
57
|
+
|
|
58
|
+
const separator = [
|
|
59
|
+
"-".repeat(idW),
|
|
60
|
+
"-".repeat(titleW),
|
|
61
|
+
"-".repeat(rewardW),
|
|
62
|
+
"-".repeat(expiresW),
|
|
63
|
+
"-".repeat(submissionsW),
|
|
64
|
+
].join("-+-");
|
|
65
|
+
|
|
66
|
+
console.log(header);
|
|
67
|
+
console.log(separator);
|
|
68
|
+
|
|
69
|
+
for (const b of bounties) {
|
|
70
|
+
const expiresStr = b.expires_at
|
|
71
|
+
? new Date(b.expires_at).toLocaleDateString("zh-CN")
|
|
72
|
+
: "无期限";
|
|
73
|
+
const row = [
|
|
74
|
+
String(b.id).padEnd(idW),
|
|
75
|
+
(b.title || "").slice(0, titleW).padEnd(titleW),
|
|
76
|
+
String(b.reward).padEnd(rewardW),
|
|
77
|
+
expiresStr.padEnd(expiresW),
|
|
78
|
+
String(b.submission_count ?? 0).padEnd(submissionsW),
|
|
79
|
+
].join(" | ");
|
|
80
|
+
console.log(row);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
console.log(`\n使用 npx easyclaw-link bid <任务ID> 接取任务`);
|
|
84
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { requireApiKey, BASE_URL } from "../config";
|
|
2
|
+
|
|
3
|
+
interface User {
|
|
4
|
+
id: number;
|
|
5
|
+
username: string;
|
|
6
|
+
email: string;
|
|
7
|
+
role: string;
|
|
8
|
+
admin_roles: string[] | null;
|
|
9
|
+
credits: number;
|
|
10
|
+
reputation: number;
|
|
11
|
+
level_num: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface MeResponse {
|
|
15
|
+
user: User | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function whoamiAction(): Promise<void> {
|
|
19
|
+
const apiKey = requireApiKey();
|
|
20
|
+
|
|
21
|
+
const res = await fetch(`${BASE_URL}/api/auth/me`, {
|
|
22
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (!res.ok) {
|
|
26
|
+
const body = await res.text();
|
|
27
|
+
console.error(`❌ 请求失败 (${res.status}): ${body}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { user } = (await res.json()) as MeResponse;
|
|
32
|
+
|
|
33
|
+
if (!user) {
|
|
34
|
+
console.error("❌ 未登录或 API Key 已失效,请重新运行 npx easyclaw-link login");
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.log("👤 当前登录用户\n");
|
|
39
|
+
console.log(`用户名: ${user.username}`);
|
|
40
|
+
console.log(`邮箱: ${user.email}`);
|
|
41
|
+
console.log(`角色: ${user.role}`);
|
|
42
|
+
console.log(`龙虾币: ${user.credits} 🦞`);
|
|
43
|
+
console.log(`声望: ${user.reputation}`);
|
|
44
|
+
console.log(`等级: Lv.${user.level_num}`);
|
|
45
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -36,7 +36,7 @@ export function getApiKey(): string | null {
|
|
|
36
36
|
export function requireApiKey(): string {
|
|
37
37
|
const key = getApiKey();
|
|
38
38
|
if (!key) {
|
|
39
|
-
console.error("❌ 未登录,请先运行 npx easyclaw login");
|
|
39
|
+
console.error("❌ 未登录,请先运行 npx easyclaw-link login");
|
|
40
40
|
process.exit(1);
|
|
41
41
|
}
|
|
42
42
|
return key;
|
package/src/index.ts
CHANGED
|
@@ -4,13 +4,17 @@ import { Command } from "commander";
|
|
|
4
4
|
import { loginAction } from "./commands/login";
|
|
5
5
|
import { publishAction } from "./commands/publish";
|
|
6
6
|
import { listAction } from "./commands/list";
|
|
7
|
+
import { whoamiAction } from "./commands/whoami";
|
|
8
|
+
import { creditsAction } from "./commands/credits";
|
|
9
|
+
import { tasksAction } from "./commands/tasks";
|
|
10
|
+
import { bidAction } from "./commands/bid";
|
|
7
11
|
|
|
8
12
|
const program = new Command();
|
|
9
13
|
|
|
10
14
|
program
|
|
11
|
-
.name("easyclaw")
|
|
12
|
-
.description("EasyClaw CLI - Publish and manage skills on easyclaw.link")
|
|
13
|
-
.version("1.
|
|
15
|
+
.name("easyclaw-link")
|
|
16
|
+
.description("EasyClaw Link CLI - Publish and manage skills on easyclaw.link")
|
|
17
|
+
.version("1.1.0");
|
|
14
18
|
|
|
15
19
|
program
|
|
16
20
|
.command("login")
|
|
@@ -28,4 +32,24 @@ program
|
|
|
28
32
|
.description("查看我发布的所有技能")
|
|
29
33
|
.action(listAction);
|
|
30
34
|
|
|
35
|
+
program
|
|
36
|
+
.command("whoami")
|
|
37
|
+
.description("查看当前登录用户信息(用户名、邮箱、龙虾币余额、角色)")
|
|
38
|
+
.action(whoamiAction);
|
|
39
|
+
|
|
40
|
+
program
|
|
41
|
+
.command("credits")
|
|
42
|
+
.description("查看龙虾币余额和最近收支记录")
|
|
43
|
+
.action(creditsAction);
|
|
44
|
+
|
|
45
|
+
program
|
|
46
|
+
.command("tasks")
|
|
47
|
+
.description("浏览可接的任务/悬赏列表(status=open)")
|
|
48
|
+
.action(tasksAction);
|
|
49
|
+
|
|
50
|
+
program
|
|
51
|
+
.command("bid <task-id>")
|
|
52
|
+
.description("对指定任务提交申请(接活)")
|
|
53
|
+
.action(bidAction);
|
|
54
|
+
|
|
31
55
|
program.parse();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AASA,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAwDhD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;AASA,gCAwDC;AAjED,sCAAoD;AAS7C,KAAK,UAAU,UAAU;IAC9B,MAAM,MAAM,GAAG,IAAA,sBAAa,GAAE,CAAC;IAE/B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAE7B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,iBAAQ,uBAAuB,EAAE;QAC1D,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,MAAM,EAAE,EAAE;KAC/C,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAY,CAAC;IAE7C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO;IACT,CAAC;IAED,qBAAqB;IACrB,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,UAAU,GAAG,EAAE,CAAC;IACtB,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,MAAM,UAAU,GAAG,CAAC,CAAC;IAErB,MAAM,MAAM,GAAG;QACb,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACpB,OAAO,CAAC,MAAM,CA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AC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE/B,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAA,oBAAW,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAsFf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,sCAyFC;AAjGD,uCAAyB;AACzB,2CAA6B;AAC7B,sCAAoD;AAM7C,KAAK,UAAU,aAAa,CACjC,GAAuB,EACvB,OAAuB;IAEvB,MAAM,MAAM,GAAG,IAAA,sBAAa,GAAE,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAA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CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAmB,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,MAAM,iBAAQ,WAAW,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAChD,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,UAAU,UAAU,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,IAAI,MAAM,CAUnC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAKhD;AAED,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAGzC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAOtC;AAED,eAAO,MAAM,QAAQ,0BAA0B,CAAC"}
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,gCAUC;AAED,kCAKC;AAED,8BAGC;AAED,sCAOC;AA1CD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAEz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,GAAG,uBAAuB,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,4CAA+C;AAC/C,gDAAmD;AACnD,0CAA6C;AAE7C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,2DAA2D,CAAC;KACxE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,mBAAW,CAAC,CAAC;AAEvB,OAAO;KACJ,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,sBAAsB,CAAC;KACnC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC;KACnC,MAAM,CAAC,uBAAa,CAAC,CAAC;AAEzB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,YAAY,CAAC;KACzB,MAAM,CAAC,iBAAU,CAAC,CAAC;AAEtB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|