@canner-ca/cli 0.5.7 → 0.5.8
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/package.json +1 -1
- package/src/cli.mjs +8 -2
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -28,7 +28,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
28
28
|
import { stdin as input, stdout as output } from 'node:process';
|
|
29
29
|
import { create as tarCreate } from 'tar';
|
|
30
30
|
|
|
31
|
-
const VERSION = '0.5.
|
|
31
|
+
const VERSION = '0.5.8';
|
|
32
32
|
const DEFAULT_API_BASE = 'https://api.canner.ca';
|
|
33
33
|
const CONFIG_DIR = join(homedir(), '.canner');
|
|
34
34
|
const CREDENTIALS_PATH = join(CONFIG_DIR, 'credentials');
|
|
@@ -828,7 +828,13 @@ async function cmdDomains(args) {
|
|
|
828
828
|
if (JSON_MODE) return emitJSON(body);
|
|
829
829
|
const d = body?.domain ?? {};
|
|
830
830
|
info(`${green('added')} ${bold(d.hostname ?? hostname)} ${dim(`(${d.status ?? 'pending'})`)}`);
|
|
831
|
-
if (body?.
|
|
831
|
+
if (body?.acme_cname) {
|
|
832
|
+
// A wildcard (*.example.com) needs two records: the wildcard itself, and the certificate delegation.
|
|
833
|
+
const host = d.hostname ?? hostname;
|
|
834
|
+
muted(`Add these two DNS records, then run \`canner domains verify '${host}'\`:`);
|
|
835
|
+
muted(` CNAME ${host} -> ${body.cname_target}`);
|
|
836
|
+
muted(` CNAME ${body.acme_cname.name} -> ${body.acme_cname.target} (lets us issue and renew the certificate; keep it in place)`);
|
|
837
|
+
} else if (body?.platform_ip) muted(`Point an A record at ${body.platform_ip}, then run \`canner domains verify ${hostname}\`.`);
|
|
832
838
|
return;
|
|
833
839
|
}
|
|
834
840
|
|