htmlhost-cli 1.4.0 → 1.4.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htmlhost-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Deploy HTML files from the terminal — htmlhost.co CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  import { bold, dim, cyan, err } from "./ui.mjs";
5
5
  import { ApiError } from "./api.mjs";
6
6
 
7
- const VERSION = "1.4.0";
7
+ const VERSION = "1.4.1";
8
8
 
9
9
  const HELP = `
10
10
  ${bold("htmlhost")} ${dim(`v${VERSION}`)} — deploy HTML from the terminal
@@ -330,10 +330,14 @@ async function deployDirectory(dirPath, { ttl, forceNew, skipAssets }) {
330
330
  }
331
331
  }
332
332
 
333
- // Save all links to .htmlhost
333
+ // Save all links to .htmlhost — re-read to pick up any preference saved
334
+ // during the prompt flow (the original `onRedeploy` var was captured before
335
+ // the user's choice was written).
336
+ const freshLink = readLink(dirPath);
337
+ const finalOnRedeploy = freshLink?.onRedeploy || onRedeploy;
334
338
  writeLink(dirPath, {
335
339
  sites: { ...existingSites, ...results },
336
- ...(onRedeploy ? { onRedeploy } : {}),
340
+ ...(finalOnRedeploy ? { onRedeploy: finalOnRedeploy } : {}),
337
341
  });
338
342
 
339
343
  // Summary