kollab 0.1.23 → 0.1.24

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/index.js CHANGED
@@ -12661,6 +12661,8 @@ function parseStringListOption(raw, label) {
12661
12661
  // src/lib/hosted-domain-error.ts
12662
12662
  function domainErrorHint(code) {
12663
12663
  const hints = {
12664
+ HOSTED_APP_DOMAIN_OWNERSHIP_RECORD_MISSING: "The ownership TXT is missing or incorrect. Your site stays available during a 14-day grace period. Restore the TXT shown by domain records, then run domain verify. Keep it after verification.",
12665
+ HOSTED_APP_DOMAIN_OWNERSHIP_REVERIFY_REQUIRED: "Ownership checks have failed for at least 14 days. The site is paused. Restore the TXT shown by domain records, then run domain verify to resume.",
12664
12666
  HOSTED_APP_MAX_REQUIRED: "Your workspace plan does not include custom domains. Upgrade the workspace plan, then retry.",
12665
12667
  HOSTED_APP_DOMAIN_ALREADY_BOUND: "This domain is bound to another app. Ask its owner to remove that binding, or use another domain.",
12666
12668
  HOSTED_APP_DOMAIN_REMOVE_EXISTING_FIRST: "This app already has another domain. Run `kollab app domain remove --id <appId>` before changing domains.",
@@ -20104,7 +20106,8 @@ function domainOutput(view) {
20104
20106
  nextAction: view?.nextAction ?? (view?.domainStatus === "active" ? view.certificateStatus === "ready" ? "done" : "wait_certificate" : view ? "add_records" : "none"),
20105
20107
  url: view ? `https://${view.domain}` : null,
20106
20108
  certificateStatus: view?.certificateStatus ?? "not_started",
20107
- certificateCheckedAt: view?.certificateCheckedAt ?? null
20109
+ certificateCheckedAt: view?.certificateCheckedAt ?? null,
20110
+ ...view?.errorCode?.startsWith("HOSTED_APP_DOMAIN_OWNERSHIP_") ? { errorCode: view.errorCode, message: domainErrorHint(view.errorCode) } : {}
20108
20111
  };
20109
20112
  }
20110
20113
  function domainInstructions(view, recordsOnly = false) {
@@ -20114,10 +20117,11 @@ function domainInstructions(view, recordsOnly = false) {
20114
20117
  const relative3 = zone && record2.name === zone ? "@" : zone && record2.name.endsWith(`.${zone}`) ? record2.name.slice(0, -zone.length - 1) : "(use the full name, or remove your DNS zone suffix)";
20115
20118
  return `${record2.type} | Full name: ${record2.name} | Host: ${relative3}${zone ? ` (zone: ${zone})` : ""} | Value: ${record2.value} | TTL: 300 seconds (or Auto)`;
20116
20119
  });
20117
- if (recordsOnly) return [...lines, "Cloudflare or another proxy DNS provider: choose DNS only / gray cloud. TTL: 300 seconds or Auto."].join("\n");
20120
+ lines.push("Keep the ownership TXT record after verification.");
20121
+ if (recordsOnly) return [...lines, "If your DNS provider offers proxying, choose DNS only. TTL: 300 seconds or Auto."].join("\n");
20118
20122
  return [
20119
20123
  ...lines,
20120
- "Cloudflare or another proxy DNS provider: choose DNS only / gray cloud. Remove conflicting AAAA records.",
20124
+ "If your DNS provider offers proxying, choose DNS only. Remove conflicting AAAA records.",
20121
20125
  `Status: ${view.domainStatus}; certificate: ${view.certificateStatus ?? "not_started"}; next: ${domainOutput(view).nextAction}`,
20122
20126
  ...view.errorCode ? [domainErrorHint(view.errorCode)] : [],
20123
20127
  ...view.dnsObserved ? [`Observed: ${view.dnsObserved}`] : []
@@ -20174,12 +20178,14 @@ function registerHostedAppDomainCommands(app) {
20174
20178
  try {
20175
20179
  const creds = await requireHostedAppCredentials();
20176
20180
  const method = name === "remove" ? "DELETE" : ["add", "verify"].includes(name) ? "POST" : "GET";
20177
- printResult(await api(
20181
+ const result = await api(
20178
20182
  creds,
20179
20183
  method,
20180
20184
  `/hosted-apps/${encodeURIComponent(options.id)}/domains${name === "verify" ? "/verify" : ""}`,
20181
20185
  name === "add" ? { domain: options.domain } : void 0
20182
- ));
20186
+ );
20187
+ const view = result.data;
20188
+ printResult(view?.errorCode?.startsWith("HOSTED_APP_DOMAIN_OWNERSHIP_") ? { ...result, data: { ...view, message: domainErrorHint(view.errorCode) } } : result);
20183
20189
  } catch (error) {
20184
20190
  emitError(error instanceof Error ? error.message : String(error));
20185
20191
  }
@@ -20647,8 +20653,8 @@ var fs6 = __toESM(require("fs"));
20647
20653
  var path6 = __toESM(require("path"));
20648
20654
  var UNKNOWN_VERSION = "0.0.0";
20649
20655
  function injectedVersion() {
20650
- if ("0.1.23".length > 0) {
20651
- return "0.1.23";
20656
+ if ("0.1.24".length > 0) {
20657
+ return "0.1.24";
20652
20658
  }
20653
20659
  return null;
20654
20660
  }
@@ -25571,6 +25571,8 @@ init_cjs_shims();
25571
25571
  init_cjs_shims();
25572
25572
  function domainErrorHint(code) {
25573
25573
  const hints = {
25574
+ HOSTED_APP_DOMAIN_OWNERSHIP_RECORD_MISSING: "The ownership TXT is missing or incorrect. Your site stays available during a 14-day grace period. Restore the TXT shown by domain records, then run domain verify. Keep it after verification.",
25575
+ HOSTED_APP_DOMAIN_OWNERSHIP_REVERIFY_REQUIRED: "Ownership checks have failed for at least 14 days. The site is paused. Restore the TXT shown by domain records, then run domain verify to resume.",
25574
25576
  HOSTED_APP_MAX_REQUIRED: "Your workspace plan does not include custom domains. Upgrade the workspace plan, then retry.",
25575
25577
  HOSTED_APP_DOMAIN_ALREADY_BOUND: "This domain is bound to another app. Ask its owner to remove that binding, or use another domain.",
25576
25578
  HOSTED_APP_DOMAIN_REMOVE_EXISTING_FIRST: "This app already has another domain. Run `kollab app domain remove --id <appId>` before changing domains.",
@@ -33090,7 +33092,8 @@ function domainOutput(view) {
33090
33092
  nextAction: view?.nextAction ?? (view?.domainStatus === "active" ? view.certificateStatus === "ready" ? "done" : "wait_certificate" : view ? "add_records" : "none"),
33091
33093
  url: view ? `https://${view.domain}` : null,
33092
33094
  certificateStatus: view?.certificateStatus ?? "not_started",
33093
- certificateCheckedAt: view?.certificateCheckedAt ?? null
33095
+ certificateCheckedAt: view?.certificateCheckedAt ?? null,
33096
+ ...view?.errorCode?.startsWith("HOSTED_APP_DOMAIN_OWNERSHIP_") ? { errorCode: view.errorCode, message: domainErrorHint(view.errorCode) } : {}
33094
33097
  };
33095
33098
  }
33096
33099
  function domainInstructions(view, recordsOnly = false) {
@@ -33100,10 +33103,11 @@ function domainInstructions(view, recordsOnly = false) {
33100
33103
  const relative3 = zone && record3.name === zone ? "@" : zone && record3.name.endsWith(`.${zone}`) ? record3.name.slice(0, -zone.length - 1) : "(use the full name, or remove your DNS zone suffix)";
33101
33104
  return `${record3.type} | Full name: ${record3.name} | Host: ${relative3}${zone ? ` (zone: ${zone})` : ""} | Value: ${record3.value} | TTL: 300 seconds (or Auto)`;
33102
33105
  });
33103
- if (recordsOnly) return [...lines, "Cloudflare or another proxy DNS provider: choose DNS only / gray cloud. TTL: 300 seconds or Auto."].join("\n");
33106
+ lines.push("Keep the ownership TXT record after verification.");
33107
+ if (recordsOnly) return [...lines, "If your DNS provider offers proxying, choose DNS only. TTL: 300 seconds or Auto."].join("\n");
33104
33108
  return [
33105
33109
  ...lines,
33106
- "Cloudflare or another proxy DNS provider: choose DNS only / gray cloud. Remove conflicting AAAA records.",
33110
+ "If your DNS provider offers proxying, choose DNS only. Remove conflicting AAAA records.",
33107
33111
  `Status: ${view.domainStatus}; certificate: ${view.certificateStatus ?? "not_started"}; next: ${domainOutput(view).nextAction}`,
33108
33112
  ...view.errorCode ? [domainErrorHint(view.errorCode)] : [],
33109
33113
  ...view.dnsObserved ? [`Observed: ${view.dnsObserved}`] : []
@@ -33160,12 +33164,14 @@ function registerHostedAppDomainCommands(app) {
33160
33164
  try {
33161
33165
  const creds = await requireHostedAppCredentials();
33162
33166
  const method = name === "remove" ? "DELETE" : ["add", "verify"].includes(name) ? "POST" : "GET";
33163
- printResult(await api(
33167
+ const result = await api(
33164
33168
  creds,
33165
33169
  method,
33166
33170
  `/hosted-apps/${encodeURIComponent(options.id)}/domains${name === "verify" ? "/verify" : ""}`,
33167
33171
  name === "add" ? { domain: options.domain } : void 0
33168
- ));
33172
+ );
33173
+ const view = result.data;
33174
+ printResult(view?.errorCode?.startsWith("HOSTED_APP_DOMAIN_OWNERSHIP_") ? { ...result, data: { ...view, message: domainErrorHint(view.errorCode) } } : result);
33169
33175
  } catch (error62) {
33170
33176
  emitError(error62 instanceof Error ? error62.message : String(error62));
33171
33177
  }
@@ -33641,8 +33647,8 @@ var fs6 = __toESM(require("fs"));
33641
33647
  var path6 = __toESM(require("path"));
33642
33648
  var UNKNOWN_VERSION = "0.0.0";
33643
33649
  function injectedVersion() {
33644
- if ("0.1.23".length > 0) {
33645
- return "0.1.23";
33650
+ if ("0.1.24".length > 0) {
33651
+ return "0.1.24";
33646
33652
  }
33647
33653
  return null;
33648
33654
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kollab",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Kollab workspace CLI",
5
5
  "bin": {
6
6
  "kollab": "dist/index.js"