@within-7/jetr 0.7.3 → 0.7.4

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 (2) hide show
  1. package/dist/cli.js +5 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -824,7 +824,11 @@ async function ensureSiteExists(spinner, siteName) {
824
824
  spinner.text = "Checking site...";
825
825
  try {
826
826
  await api.getSite(siteName);
827
- } catch {
827
+ } catch (e) {
828
+ const msg = e.message || "";
829
+ if (msg.includes("Forbidden")) {
830
+ throw new Error(`Site "${siteName}" belongs to another user`);
831
+ }
828
832
  spinner.text = `Creating site ${siteName}...`;
829
833
  await api.createSite(siteName);
830
834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@within-7/jetr",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "CLI for Jetr static site hosting",
5
5
  "type": "module",
6
6
  "bin": {