@dench.com/cli 3.12.30-staging.1461 → 3.12.32-staging.1473

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/members.ts CHANGED
@@ -32,6 +32,7 @@
32
32
  * Both surfaces share this implementation so the CLI auth + payload
33
33
  * shape stays in lockstep.
34
34
  */
35
+ import { createHash } from "node:crypto";
35
36
  import { readFile } from "node:fs/promises";
36
37
  import { extname } from "node:path";
37
38
  import type { ConvexHttpClient } from "convex/browser";
@@ -380,11 +381,11 @@ async function uploadAvatar(
380
381
  if (bytes.byteLength > 2 * 1024 * 1024) {
381
382
  throw new MembersCliError("--avatar must be under 2 MB");
382
383
  }
383
- const uploadUrl = (await callMutation(
384
- ctx,
385
- api.profiles.avatarUploadUrl,
386
- {},
387
- )) as string;
384
+ const sha256 = createHash("sha256").update(bytes).digest("hex");
385
+ const uploadUrl = (await callMutation(ctx, api.profiles.avatarUploadUrl, {
386
+ sha256,
387
+ size: bytes.byteLength,
388
+ })) as string;
388
389
  const response = await fetch(uploadUrl, {
389
390
  method: "POST",
390
391
  headers: { "Content-Type": contentType },
@@ -394,7 +395,7 @@ async function uploadAvatar(
394
395
  throw new MembersCliError(`Avatar upload failed (${response.status})`);
395
396
  }
396
397
  const { storageId } = (await response.json()) as { storageId: string };
397
- await callMutation(ctx, api.profiles.setAvatar, { storageId });
398
+ await callMutation(ctx, api.profiles.setAvatar, { storageId, sha256 });
398
399
  }
399
400
 
400
401
  function shiftArg(ctx: MembersCliContext, expected: string): string {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dench.com/cli",
3
- "version": "3.12.30-staging.1461",
3
+ "version": "3.12.32-staging.1473",
4
4
  "description": "Dench agent workspace CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,6 +32,7 @@
32
32
  "crm-comments.ts",
33
33
  "crm-context.ts",
34
34
  "crm-analytics.ts",
35
+ "crm-columns.ts",
35
36
  "crm-detections.ts",
36
37
  "crm-privacy.ts",
37
38
  "crm-warm-intros.ts",