@samva/cli 0.24.0 → 0.25.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.
Files changed (3) hide show
  1. package/AGENTS.md +4 -0
  2. package/dist/bin.mjs +74 -40
  3. package/package.json +7 -7
package/AGENTS.md CHANGED
@@ -84,6 +84,10 @@ exits `2` naming the path or limit. Past the 4 MiB inline limit, the largest fil
84
84
  `/v1/media` first and travel by `mediaId`; the send's retries reuse them, and rerunning the command
85
85
  uploads again. `--dry-run` lists each attachment and uploads nothing.
86
86
 
87
+ `samva email send --header 'Name: Value'` (repeatable) sets `email.headers`. The name is the text
88
+ before the first colon and the value is the rest, both trimmed. A pair with no colon, no name, or
89
+ no value exits `2`. Reserved names and size limits are rejected by the API.
90
+
87
91
  `--publication-id` and `--input-contract-id` on `email send`, `scheduled-messages create`, and
88
92
  `campaigns create`/`update` choose which publication a template send renders: one exact publication,
89
93
  or the newest publication that still validates input identically. They are mutually exclusive and
package/dist/bin.mjs CHANGED
@@ -14941,7 +14941,7 @@ var layer12 = /* @__PURE__ */ layer.pipe(/* @__PURE__ */ provideMerge(/* @__PURE
14941
14941
  // package.json
14942
14942
  var package_default = {
14943
14943
  name: "@samva/cli",
14944
- version: "0.24.0",
14944
+ version: "0.25.0",
14945
14945
  description: "Samva CLI \u2014 email and platform operations from your terminal",
14946
14946
  keywords: [
14947
14947
  "cli",
@@ -14997,16 +14997,16 @@ var package_default = {
14997
14997
  "@types/node": "catalog:",
14998
14998
  "better-auth": "catalog:",
14999
14999
  effect: "catalog:effect",
15000
- samva: "workspace:0.25.0",
15000
+ samva: "workspace:0.26.0",
15001
15001
  "tsc-rs": "catalog:",
15002
15002
  vite: "~8.3.0",
15003
15003
  vitest: "catalog:"
15004
15004
  },
15005
15005
  optionalDependencies: {
15006
- "@samva/cli-darwin-arm64": "workspace:0.24.0",
15007
- "@samva/cli-darwin-x64": "workspace:0.24.0",
15008
- "@samva/cli-linux-arm64": "workspace:0.24.0",
15009
- "@samva/cli-linux-x64": "workspace:0.24.0"
15006
+ "@samva/cli-darwin-arm64": "workspace:0.25.0",
15007
+ "@samva/cli-darwin-x64": "workspace:0.25.0",
15008
+ "@samva/cli-linux-arm64": "workspace:0.25.0",
15009
+ "@samva/cli-linux-x64": "workspace:0.25.0"
15010
15010
  },
15011
15011
  engines: {
15012
15012
  node: ">=18"
@@ -24962,6 +24962,10 @@ var EmailTrackingOverrideV1 = /* @__PURE__ */ Struct({
24962
24962
  identifier: "EmailTrackingOverrideV1"
24963
24963
  });
24964
24964
  var EmailFooterOverride = /* @__PURE__ */ Struct({ enabled: optionalKey2(Union2([Boolean3, Null2])) }).annotate({ identifier: "EmailFooterOverride" });
24965
+ var EmailCustomHeaders = /* @__PURE__ */ Record(String4, String4).annotate({ description: "Custom headers copied onto the outgoing message. Each name is an RFC 5322 field name and each value is one non-empty line of printable ASCII. Names Samva or the transport own are rejected." }).check(isMaxProperties(11).annotate({
24966
+ expected: "a value with at most 11 entries",
24967
+ identifier: "EmailCustomHeaders"
24968
+ }));
24965
24969
  var ConversationId2 = /* @__PURE__ */ String4.check(isPattern2(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
24966
24970
  expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$",
24967
24971
  identifier: "ConversationId"
@@ -25810,7 +25814,8 @@ var EmailContent = /* @__PURE__ */ Struct({
25810
25814
  replyTo: optionalKey2(ReplyToAddresses),
25811
25815
  unsubscribeGroupId: optionalKey2(Union2([Union2([UnsubscribeId2, Null2]), Null2]).annotate({ description: "The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group." })),
25812
25816
  tracking: optionalKey2(EmailTrackingOverrideV1),
25813
- footer: optionalKey2(EmailFooterOverride)
25817
+ footer: optionalKey2(EmailFooterOverride),
25818
+ headers: optionalKey2(Union2([EmailCustomHeaders, Null2]))
25814
25819
  }).annotate({ identifier: "EmailContent" });
25815
25820
  var EmailDispatchContent = /* @__PURE__ */ Struct({
25816
25821
  subject: optionalKey2(Union2([String4, Null2])),
@@ -25828,7 +25833,8 @@ var EmailDispatchContent = /* @__PURE__ */ Struct({
25828
25833
  replyTo: optionalKey2(ReplyToAddresses),
25829
25834
  unsubscribeGroupId: optionalKey2(Union2([Union2([UnsubscribeId2, Null2]), Null2]).annotate({ description: "The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group." })),
25830
25835
  tracking: optionalKey2(EmailTrackingOverrideV1),
25831
- footer: optionalKey2(EmailFooterOverride)
25836
+ footer: optionalKey2(EmailFooterOverride),
25837
+ headers: optionalKey2(Union2([EmailCustomHeaders, Null2]))
25832
25838
  }).annotate({ identifier: "EmailDispatchContent" });
25833
25839
  var ContactIdentity = /* @__PURE__ */ Struct({
25834
25840
  id: ContactIdentityId2,
@@ -26294,7 +26300,7 @@ var __exportAll = (all, no_symbols) => {
26294
26300
  };
26295
26301
 
26296
26302
  // ../sdk/dist/package.js
26297
- var version = "0.25.0";
26303
+ var version = "0.26.0";
26298
26304
 
26299
26305
  // ../sdk/dist/client-attribution.js
26300
26306
  var SDK_VERSION = version;
@@ -62048,6 +62054,7 @@ var idempotencyKeyFlag2 = String9("idempotency-key").pipe(withDescription2("Key
62048
62054
  var trackOpensFlag2 = Literals3("track-opens", ["on", "off"]).pipe(withDescription2("Override open tracking for this send; recipient opt-out still wins"), optional4);
62049
62055
  var trackClicksFlag2 = Literals3("track-clicks", ["on", "off"]).pipe(withDescription2("Override click tracking for this send; recipient opt-out still wins"), optional4);
62050
62056
  var attachFlag = String9("attach").pipe(withDescription2("File to attach (repeatable); small files travel inline, larger ones upload through media first"), atLeast2(0));
62057
+ var headerFlag2 = String9("header").pipe(withDescription2("Custom email header as Name: Value (repeatable)"), withMetavar2("Name: Value"), atLeast2(0));
62051
62058
  var dryRunFlag4 = Boolean6("dry-run").pipe(withDescription2("Validate inputs and print the request payload without calling the API"), withDefault5(false));
62052
62059
  var bodySourceName = (input) => {
62053
62060
  if (input.templateRefValue)
@@ -62058,6 +62065,18 @@ var bodySourceName = (input) => {
62058
62065
  return "html";
62059
62066
  return "text";
62060
62067
  };
62068
+ var emailHeader = (raw) => {
62069
+ const separator = raw.indexOf(":");
62070
+ const name = separator === -1 ? "" : raw.slice(0, separator).trim();
62071
+ const value = separator === -1 ? "" : raw.slice(separator + 1).trim();
62072
+ if (name.length === 0 || value.length === 0) {
62073
+ return fail6(new CliUsageError({
62074
+ code: "email_header_malformed",
62075
+ message: `--header expects Name: Value, got ${raw}.`
62076
+ }));
62077
+ }
62078
+ return succeed6([name, value]);
62079
+ };
62061
62080
  var parseTemplateData2 = (raw) => match(raw, {
62062
62081
  onNone: () => succeed6(undefined),
62063
62082
  onSome: (value) => try_3({
@@ -62087,6 +62106,7 @@ var send3 = make29("send", {
62087
62106
  trackOpens: trackOpensFlag2,
62088
62107
  trackClicks: trackClicksFlag2,
62089
62108
  attach: attachFlag,
62109
+ header: headerFlag2,
62090
62110
  dryRun: dryRunFlag4,
62091
62111
  wait: Boolean6("wait").pipe(withDescription2("Wait for delivered/read or a terminal delivery failure"), withDefault5(false)),
62092
62112
  timeout: timeoutFlag,
@@ -62123,6 +62143,10 @@ var send3 = make29("send", {
62123
62143
  {
62124
62144
  command: "samva email send --to you@example.com --subject Report --text Attached --attach ./report.pdf --attach ./data.csv",
62125
62145
  description: "Attach files; those past the 4 MiB inline limit upload through media automatically"
62146
+ },
62147
+ {
62148
+ command: "samva email send --to you@example.com --subject Hi --text Hello --header 'OTP-Token: 123456'",
62149
+ description: "Copy a custom header onto the message"
62126
62150
  }
62127
62151
  ]), withHandler(({
62128
62152
  to,
@@ -62146,6 +62170,7 @@ var send3 = make29("send", {
62146
62170
  trackOpens,
62147
62171
  trackClicks,
62148
62172
  attach,
62173
+ header,
62149
62174
  dryRun,
62150
62175
  wait,
62151
62176
  timeout,
@@ -62223,6 +62248,11 @@ var send3 = make29("send", {
62223
62248
  });
62224
62249
  }
62225
62250
  const attachmentFiles = yield* readAttachments(attach);
62251
+ const headers = Object.create(null);
62252
+ for (const raw of header) {
62253
+ const [name, value] = yield* emailHeader(raw);
62254
+ headers[name] = value;
62255
+ }
62226
62256
  const request = {
62227
62257
  to: [...to],
62228
62258
  ...ccValue ? { cc: [{ email: ccValue }] } : {},
@@ -62249,7 +62279,8 @@ var send3 = make29("send", {
62249
62279
  ...trackOpensValue !== undefined ? { opens: trackOpensValue === "on" } : {},
62250
62280
  ...trackClicksValue !== undefined ? { clicks: trackClicksValue === "on" } : {}
62251
62281
  }
62252
- } : {}
62282
+ } : {},
62283
+ ...Object.keys(headers).length === 0 ? {} : { headers }
62253
62284
  };
62254
62285
  const sendOptions = idempotencyKeyValue !== undefined ? { idempotencyKey: idempotencyKeyValue } : {};
62255
62286
  const source = bodySourceName({
@@ -62300,6 +62331,7 @@ var send3 = make29("send", {
62300
62331
  ...request.templateSlug ? [["Template", `${request.templateSlug} (handle)`]] : request.templateId ? [["Template", request.templateId]] : [],
62301
62332
  ...request.inReplyToMessageId ? [["Reply to", request.inReplyToMessageId]] : [],
62302
62333
  ...request.replyTo ? [["Reply-To", request.replyTo]] : [],
62334
+ ...Object.entries(request.headers ?? {}).map(([name, value]) => ["Header", `${name}: ${value}`]),
62303
62335
  ...idempotencyKeyValue ? [["Idempotency key", idempotencyKeyValue]] : [],
62304
62336
  ...attachmentFiles.map((file) => [
62305
62337
  "Attachment",
@@ -69436,13 +69468,13 @@ var journeysCommand = make29("journeys").pipe(withDescription3("Create, publish,
69436
69468
  runs2
69437
69469
  ]));
69438
69470
 
69439
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/package.mjs
69471
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/package.mjs
69440
69472
  var version4 = "1.7.5";
69441
69473
 
69442
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/version.mjs
69474
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/version.mjs
69443
69475
  var PACKAGE_VERSION = version4;
69444
69476
 
69445
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/broadcast-channel.mjs
69477
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/broadcast-channel.mjs
69446
69478
  var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
69447
69479
  var now = () => Math.floor(Date.now() / 1000);
69448
69480
  var WindowBroadcastChannel = class {
@@ -69688,7 +69720,7 @@ var onMount = ($store, initialize) => {
69688
69720
  };
69689
69721
  });
69690
69722
  };
69691
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/equality.mjs
69723
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/equality.mjs
69692
69724
  function isPlainObject(value) {
69693
69725
  if (typeof value !== "object" || value === null)
69694
69726
  return false;
@@ -69725,7 +69757,7 @@ function withEquality(store, isEqual) {
69725
69757
  });
69726
69758
  }
69727
69759
 
69728
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/focus-manager.mjs
69760
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/focus-manager.mjs
69729
69761
  var kFocusManager = Symbol.for("better-auth:focus-manager");
69730
69762
  var WindowFocusManager = class {
69731
69763
  listeners = /* @__PURE__ */ new Set;
@@ -69757,7 +69789,7 @@ function getGlobalFocusManager() {
69757
69789
  return globalThis[kFocusManager];
69758
69790
  }
69759
69791
 
69760
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/online-manager.mjs
69792
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/online-manager.mjs
69761
69793
  var kOnlineManager = Symbol.for("better-auth:online-manager");
69762
69794
  var WindowOnlineManager = class {
69763
69795
  listeners = /* @__PURE__ */ new Set;
@@ -69791,7 +69823,7 @@ function getGlobalOnlineManager() {
69791
69823
  return globalThis[kOnlineManager];
69792
69824
  }
69793
69825
 
69794
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/parser.mjs
69826
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/parser.mjs
69795
69827
  var PROTO_POLLUTION_PATTERNS = {
69796
69828
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
69797
69829
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -69869,7 +69901,7 @@ function parseJSON(value, options = { strict: true }) {
69869
69901
  return betterJSONParse(value, options);
69870
69902
  }
69871
69903
 
69872
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/query.mjs
69904
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/query.mjs
69873
69905
  var isServer = () => typeof window === "undefined";
69874
69906
  function isAuthQueryStateEqual(a, b) {
69875
69907
  return isJsonEqual(a.data, b.data) && a.error === b.error && a.isPending === b.isPending && a.isRefetching === b.isRefetching && a.refetch === b.refetch;
@@ -69995,7 +70027,7 @@ var useAuthQuery = (initializedAtom, path, $fetch, options) => {
69995
70027
  return value;
69996
70028
  };
69997
70029
 
69998
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/session-refresh.mjs
70030
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/session-refresh.mjs
69999
70031
  var now2 = () => Math.floor(Date.now() / 1000);
70000
70032
  var FOCUS_REFETCH_RATE_LIMIT_SECONDS = 5;
70001
70033
  function createSessionRefreshManager(opts) {
@@ -70324,7 +70356,7 @@ var BetterAuthError = class extends Error {
70324
70356
  }
70325
70357
  };
70326
70358
 
70327
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/utils/url.mjs
70359
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/utils/url.mjs
70328
70360
  var SLASH_CHAR_CODE = 47;
70329
70361
  function trimTrailingSlashes(value) {
70330
70362
  let end = value.length;
@@ -70431,7 +70463,7 @@ function isSafeUrlScheme(value) {
70431
70463
  return !DANGEROUS_URL_SCHEMES.includes(parsed.protocol);
70432
70464
  }
70433
70465
 
70434
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/fetch-plugins.mjs
70466
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/fetch-plugins.mjs
70435
70467
  var redirectPlugin = {
70436
70468
  id: "redirect",
70437
70469
  name: "Redirect",
@@ -70447,7 +70479,7 @@ var redirectPlugin = {
70447
70479
  } }
70448
70480
  };
70449
70481
 
70450
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/session-atom.mjs
70482
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/session-atom.mjs
70451
70483
  var isServer2 = () => typeof window === "undefined";
70452
70484
  var SESSION_MOUNT_DEDUPE_INTERVAL = STORE_UNMOUNT_DELAY;
70453
70485
  function hydrateSessionAtom(sessionAtom, session) {
@@ -71311,7 +71343,7 @@ var createFetch = (config) => {
71311
71343
  return $fetch;
71312
71344
  };
71313
71345
 
71314
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/config.mjs
71346
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/config.mjs
71315
71347
  var resolvePublicAuthUrl = (basePath) => {
71316
71348
  if (typeof process === "undefined")
71317
71349
  return;
@@ -71430,7 +71462,7 @@ var getClientConfig2 = (options, loadEnv) => {
71430
71462
  };
71431
71463
  };
71432
71464
 
71433
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/utils/is-atom.mjs
71465
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/utils/is-atom.mjs
71434
71466
  function isAtom(value) {
71435
71467
  return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
71436
71468
  }
@@ -71448,7 +71480,7 @@ function toKebabCase(input) {
71448
71480
  return splitWords(input).map((word) => word.toLowerCase()).join("-");
71449
71481
  }
71450
71482
 
71451
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/proxy.mjs
71483
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/proxy.mjs
71452
71484
  function getMethod2(path, knownPathMethods, args) {
71453
71485
  const method = knownPathMethods[path];
71454
71486
  const { fetchOptions, query: _query, ...body } = args || {};
@@ -71530,7 +71562,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
71530
71562
  return createProxy();
71531
71563
  }
71532
71564
 
71533
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/client/vanilla.mjs
71565
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/client/vanilla.mjs
71534
71566
  function createAuthClient(options) {
71535
71567
  const { pluginPathMethods, pluginsActions, pluginsAtoms, hydrateSession, $fetch, atomListeners, $store } = getClientConfig2(options);
71536
71568
  const resolvedHooks = {};
@@ -71544,7 +71576,7 @@ function createAuthClient(options) {
71544
71576
  $store
71545
71577
  }, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
71546
71578
  }
71547
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
71579
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
71548
71580
  var deviceAuthorizationClient = () => {
71549
71581
  return {
71550
71582
  id: "device-authorization",
@@ -71559,7 +71591,7 @@ var deviceAuthorizationClient = () => {
71559
71591
  }
71560
71592
  };
71561
71593
  };
71562
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/access/access.mjs
71594
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/access/access.mjs
71563
71595
  function unknownResourceResponse(requestedResource) {
71564
71596
  return {
71565
71597
  success: false,
@@ -71645,7 +71677,7 @@ function createAccessControl(s) {
71645
71677
  };
71646
71678
  }
71647
71679
 
71648
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
71680
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
71649
71681
  var defaultStatements = {
71650
71682
  organization: ["update", "delete"],
71651
71683
  member: [
@@ -71720,7 +71752,7 @@ var defaultRoles = {
71720
71752
  member: memberAc
71721
71753
  };
71722
71754
 
71723
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
71755
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
71724
71756
  var ORGANIZATION_ERROR_CODES = defineErrorCodes({
71725
71757
  YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization",
71726
71758
  YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations",
@@ -71783,7 +71815,7 @@ var ORGANIZATION_ERROR_CODES = defineErrorCodes({
71783
71815
  INVALID_TEAM_ID: "Team id contains a reserved character"
71784
71816
  });
71785
71817
 
71786
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/organization/permission.mjs
71818
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/organization/permission.mjs
71787
71819
  var hasPermissionFn = (input, acRoles) => {
71788
71820
  if (!input.permissions)
71789
71821
  return false;
@@ -71799,7 +71831,7 @@ var hasPermissionFn = (input, acRoles) => {
71799
71831
  return false;
71800
71832
  };
71801
71833
 
71802
- // ../../node_modules/.bun/better-auth@1.7.5+36b8da3f8563ed1a/node_modules/better-auth/dist/plugins/organization/client.mjs
71834
+ // ../../node_modules/.bun/better-auth@1.7.5+1a59d3d034a4a7a9/node_modules/better-auth/dist/plugins/organization/client.mjs
71803
71835
  var clientSideHasPermission = (input) => {
71804
71836
  return hasPermissionFn(input, input.options.roles || defaultRoles);
71805
71837
  };
@@ -75000,6 +75032,16 @@ import { access as access3, stat as stat5 } from "fs/promises";
75000
75032
  import { basename as basename3, dirname as dirname5, resolve as resolve17 } from "path";
75001
75033
  import { pathToFileURL as pathToFileURL5 } from "url";
75002
75034
 
75035
+ // ../core/src/shared/template-diagnostics.ts
75036
+ var formatReportedDiagnostic = (diagnostic) => {
75037
+ const at = diagnostic.line === undefined ? diagnostic.file : `${diagnostic.file}:${diagnostic.line}${diagnostic.column === undefined ? "" : `:${diagnostic.column}`}`;
75038
+ const head = `${at} ${diagnostic.severity} ${diagnostic.code}: ${diagnostic.message}`;
75039
+ const fixed = diagnostic.fix === undefined ? head : `${head}
75040
+ Fix: ${diagnostic.fix}`;
75041
+ return diagnostic.upgrade === undefined ? fixed : `${fixed}
75042
+ Upgrade: ${diagnostic.upgrade}`;
75043
+ };
75044
+
75003
75045
  // ../sdk/dist/effect/generated/templates.js
75004
75046
  var TemplateProjectId2 = /* @__PURE__ */ String4.check(isPattern2(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
75005
75047
  expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
@@ -78067,14 +78109,6 @@ var reportDiagnostic = (diagnostic, context) => {
78067
78109
  ...context.fixture === undefined ? {} : { fixture: context.fixture }
78068
78110
  };
78069
78111
  };
78070
- var formatReportedDiagnostic = (diagnostic) => {
78071
- const at = diagnostic.line === undefined ? diagnostic.file : `${diagnostic.file}:${diagnostic.line}${diagnostic.column === undefined ? "" : `:${diagnostic.column}`}`;
78072
- const head = `${at} ${diagnostic.severity} ${diagnostic.code}: ${diagnostic.message}`;
78073
- const fixed = diagnostic.fix === undefined ? head : `${head}
78074
- Fix: ${diagnostic.fix}`;
78075
- return diagnostic.upgrade === undefined ? fixed : `${fixed}
78076
- Upgrade: ${diagnostic.upgrade}`;
78077
- };
78078
78112
 
78079
78113
  // src/commands/templates/from-website-command.ts
78080
78114
  var webOriginForApi = (apiUrl) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samva/cli",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Samva CLI — email and platform operations from your terminal",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,22 +50,22 @@
50
50
  "@effect/vitest": "4.0.4",
51
51
  "@samva/contracts": "0.0.0",
52
52
  "@samva/core": "0.0.0",
53
- "@samva/mailbox": "0.6.0",
53
+ "@samva/mailbox": "0.6.1",
54
54
  "@samva/markup": "0.18.0",
55
55
  "@samva/vite": "0.18.0",
56
56
  "@types/node": "^26.6.2",
57
57
  "better-auth": "1.7.5",
58
58
  "effect": "4.0.4",
59
- "samva": "0.25.0",
59
+ "samva": "0.26.0",
60
60
  "tsc-rs": "0.7.0",
61
61
  "vite": "~8.3.0",
62
62
  "vitest": "^5.0.3"
63
63
  },
64
64
  "optionalDependencies": {
65
- "@samva/cli-darwin-arm64": "0.24.0",
66
- "@samva/cli-darwin-x64": "0.24.0",
67
- "@samva/cli-linux-arm64": "0.24.0",
68
- "@samva/cli-linux-x64": "0.24.0"
65
+ "@samva/cli-darwin-arm64": "0.25.0",
66
+ "@samva/cli-darwin-x64": "0.25.0",
67
+ "@samva/cli-linux-arm64": "0.25.0",
68
+ "@samva/cli-linux-x64": "0.25.0"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=18"