@within-7/jetr 0.7.7 → 0.8.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.
- package/dist/cli.js +9 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -504,7 +504,7 @@ program.name("jetr").description(`Deploy static sites instantly
|
|
|
504
504
|
$ jetr ./dist my-blog Deploy and assign a subdomain
|
|
505
505
|
$ jetr ./dist blog.example.com Deploy to a custom domain (shows DNS setup)
|
|
506
506
|
$ jetr index.html Deploy a single file
|
|
507
|
-
$ jetr *.html *.css my-site Deploy multiple files to a named site`).version("0.
|
|
507
|
+
$ jetr *.html *.css my-site Deploy multiple files to a named site`).version("0.8.0");
|
|
508
508
|
program.argument("[paths...]", "directory, file(s), and/or site name to deploy").action(async (paths) => {
|
|
509
509
|
const config = loadConfig();
|
|
510
510
|
if (!config.token) {
|
|
@@ -670,8 +670,10 @@ program.command("list").alias("ls").description("List all your deployed sites").
|
|
|
670
670
|
const expire = s.expires_at ? chalk2.dim(
|
|
671
671
|
` expires ${new Date(s.expires_at * 1e3).toLocaleDateString()}`
|
|
672
672
|
) : "";
|
|
673
|
+
const hasDomain = s.custom_domains && s.custom_domains.length > 0;
|
|
674
|
+
const label = hasDomain ? s.custom_domains[0] : s.name;
|
|
673
675
|
console.log(
|
|
674
|
-
` ${chalk2.bold(
|
|
676
|
+
` ${chalk2.bold(label)}${lock}${expire} ${chalk2.dim(formatBytes(s.total_size))} ${chalk2.cyan(s.url)}`
|
|
675
677
|
);
|
|
676
678
|
}
|
|
677
679
|
console.log(chalk2.dim(`
|
|
@@ -681,11 +683,14 @@ program.command("list").alias("ls").description("List all your deployed sites").
|
|
|
681
683
|
process.exit(1);
|
|
682
684
|
}
|
|
683
685
|
});
|
|
684
|
-
program.command("info").description("Show site details: files, tokens, config").argument("<name>", "site name").action(async (name) => {
|
|
686
|
+
program.command("info").description("Show site details: files, tokens, domains, config").argument("<name>", "site name or custom domain").action(async (name) => {
|
|
685
687
|
try {
|
|
686
688
|
const site = await api.getSite(name);
|
|
687
689
|
console.log(`${chalk2.bold(site.name)}`);
|
|
688
690
|
console.log(` URL: ${chalk2.cyan(site.url)}`);
|
|
691
|
+
if (site.custom_domains?.length > 0) {
|
|
692
|
+
console.log(` Domains: ${site.custom_domains.join(", ")}`);
|
|
693
|
+
}
|
|
689
694
|
console.log(
|
|
690
695
|
` Password: ${site.password_protected ? chalk2.yellow("yes") : "no"}`
|
|
691
696
|
);
|
|
@@ -720,7 +725,7 @@ program.command("info").description("Show site details: files, tokens, config").
|
|
|
720
725
|
process.exit(1);
|
|
721
726
|
}
|
|
722
727
|
});
|
|
723
|
-
program.command("delete").alias("rm").description("Permanently delete a site, all its files, and custom domains").argument("<name>", "site name").action(async (name) => {
|
|
728
|
+
program.command("delete").alias("rm").description("Permanently delete a site, all its files, and custom domains").argument("<name>", "site name or custom domain").action(async (name) => {
|
|
724
729
|
const spinner = ora(`Deleting ${name}...`).start();
|
|
725
730
|
try {
|
|
726
731
|
await api.deleteSite(name);
|