@crabcloud/cli 0.1.0 → 0.1.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/dist/crab.js CHANGED
@@ -5867,7 +5867,7 @@ var giftBatchCreateInput = object({
5867
5867
  });
5868
5868
  var giftManualCodeInput = object({ code: string2().trim().min(4).max(64) });
5869
5869
 
5870
- // src/skills.ts
5870
+ // ../../packages/skills/src/install.ts
5871
5871
  import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
5872
5872
  import { homedir } from "node:os";
5873
5873
  import { join } from "node:path";
@@ -5908,7 +5908,7 @@ function codexSelected(selection) {
5908
5908
  }
5909
5909
  function bundledSkills() {
5910
5910
  try {
5911
- return readdirSync(fileURLToPath(new URL("../skills/", import.meta.url))).filter((name) => existsSync(join(fileURLToPath(new URL(`../skills/${name}`, import.meta.url)), "SKILL.md")));
5911
+ return readdirSync(fileURLToPath(new URL("./skills/", import.meta.url))).filter((name) => existsSync(join(fileURLToPath(new URL(`./skills/${name}`, import.meta.url)), "SKILL.md")));
5912
5912
  } catch {
5913
5913
  return [];
5914
5914
  }
@@ -5922,7 +5922,7 @@ function stableNames() {
5922
5922
  }
5923
5923
  function copySkillDir(name, baseDir) {
5924
5924
  mkdirSync(baseDir, { recursive: true });
5925
- cpSync(join(fileURLToPath(new URL("../skills/", import.meta.url)), name), join(baseDir, name), { recursive: true });
5925
+ cpSync(join(fileURLToPath(new URL("./skills/", import.meta.url)), name), join(baseDir, name), { recursive: true });
5926
5926
  }
5927
5927
  function installSkills(rest) {
5928
5928
  const selection = agentSelection(rest);
@@ -6296,10 +6296,12 @@ async function logout() {
6296
6296
  console.log("本地没有保存的凭证。");
6297
6297
  return 0;
6298
6298
  }
6299
- await api2(credentials.apiBase, "/v1/auth/tokens/current", {
6300
- method: "DELETE",
6301
- headers: authHeaders(credentials)
6302
- });
6299
+ try {
6300
+ await api2(credentials.apiBase, "/v1/auth/tokens/current", {
6301
+ method: "DELETE",
6302
+ headers: authHeaders(credentials)
6303
+ });
6304
+ } catch {}
6303
6305
  clearCredentials();
6304
6306
  console.log("✓ 已撤销 Agent Token 并清除本地凭证。");
6305
6307
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabcloud/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Crab Cloud CLI (crab) — agent-first entry to your personal cloud, with skills bundled for Claude Code / Codex / ZCode.",
6
6
  "bin": {
@@ -8,24 +8,24 @@
8
8
  },
9
9
  "files": [
10
10
  "dist",
11
- "skills",
12
11
  "README.md"
13
12
  ],
14
13
  "engines": {
15
14
  "node": ">=20"
16
15
  },
17
- "license": "UNLICENSED",
16
+ "license": "MIT",
18
17
  "publishConfig": {
19
18
  "access": "public"
20
19
  },
21
20
  "scripts": {
22
21
  "dev": "bun src/index.ts",
23
- "build": "bun build ./src/index.ts --target=node --outfile dist/crab.js && chmod +x dist/crab.js",
22
+ "build": "bun build ./src/index.ts --target=node --outfile dist/crab.js && rm -rf dist/skills && cp -R ../../packages/skills/skills dist/skills && chmod +x dist/crab.js",
24
23
  "typecheck": "tsc -p tsconfig.json",
25
24
  "prepublishOnly": "bun run typecheck && bun run build"
26
25
  },
27
26
  "devDependencies": {
28
27
  "@crabcloud/contracts": "workspace:*",
28
+ "@crabcloud/skills": "workspace:*",
29
29
  "@types/bun": "latest",
30
30
  "typescript": "^5.9.3"
31
31
  }
File without changes