@crabcloud/cli 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/dist/crab.js +11 -3
  2. package/package.json +1 -1
package/dist/crab.js CHANGED
@@ -7417,8 +7417,16 @@ async function storageList() {
7417
7417
  params.set("type", type);
7418
7418
  }
7419
7419
  const category = readFlag("--category");
7420
- if (category)
7421
- params.set("category", category);
7420
+ if (category) {
7421
+ if (category === "none") {
7422
+ params.set("category", "none");
7423
+ } else {
7424
+ const resolved = await resolveCategoryId(credentials, category);
7425
+ if (typeof resolved === "number")
7426
+ return resolved;
7427
+ params.set("category", resolved);
7428
+ }
7429
+ }
7422
7430
  const tags = readFlag("--tag");
7423
7431
  if (tags)
7424
7432
  params.set("tags", tags);
@@ -7703,7 +7711,7 @@ async function storageUploadOne(credentials, filePath) {
7703
7711
  headers: authHeaders(credentials),
7704
7712
  body: JSON.stringify({ filename, mimeType, sizeBytes: cipher.byteLength, enc: true })
7705
7713
  });
7706
- if (presign.status === 200) {
7714
+ if (presign.status === 200 || presign.status === 201) {
7707
7715
  const { fileId, uploadUrl } = presign.body.data;
7708
7716
  const put = await fetch(uploadUrl, { method: "PUT", body: cipher, headers: { "content-type": mimeType } });
7709
7717
  if (!put.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabcloud/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
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": {