@haakco/hostingctl 1.0.351 → 1.0.353

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/README.md CHANGED
@@ -82,6 +82,23 @@ older single-session shape is read as the `default` profile and rewritten in the
82
82
  save, so no one has to migrate by hand. A session is **bound to the target it was issued for**: `--api-url`
83
83
  naming a different host is refused before any request rather than spending the token there.
84
84
 
85
+ ### npm and Rust sessions during migration
86
+
87
+ The Rust CLI is still in development. **Sign in separately with each client**: Rust does not import npm's
88
+ session document, and the two formats must not be copied or renamed into each other.
89
+
90
+ - npm keeps all named sessions in `hostingctl/credentials.json` under the platform config home.
91
+ - Rust keeps one session per `hostingctl/<profile>.json`. It uses `default` unless `--profile` or
92
+ `HOSTINGCTL_PROFILE` selects another; signing in to a named profile does not change that default.
93
+ - Rust reserves the profile name `credentials` so it cannot overwrite npm's document.
94
+
95
+ On Unix, both use `XDG_CONFIG_HOME/hostingctl`, falling back to `~/.config/hostingctl`. Windows npm uses
96
+ `%APPDATA%\hostingctl`; Rust uses the same default, falling back to `%USERPROFILE%\AppData\Roaming\hostingctl`.
97
+ Rust additionally accepts `HOSTINGCTL_CONFIG_HOME` as a complete config directory, and honors its XDG override
98
+ on Windows too. Rust refuses unsafe existing Unix directory/file permissions rather than silently repairing
99
+ them. Native Windows credential protection and execution remain unfinished; Unix mode checks are not
100
+ Windows ACL proof.
101
+
85
102
  ### A machine with no browser
86
103
 
87
104
  `--no-browser` prints the authorize URL, then reads the callback URL pasted on stdin. This is the case where
package/dist/main.js CHANGED
@@ -10604,11 +10604,13 @@ async function applicationCache(context, action, path, rest) {
10604
10604
  if (action === "cache-purge") return await written$4(confirmableWrite(context, "Clear this application's HTTP cache now.", async () => {
10605
10605
  return (await hostingApplicationCachePurge({ path })).data;
10606
10606
  }));
10607
- const body = cacheBody(context);
10608
- if (action === "cache-set") return await written$4(confirmableWrite(context, `Change this application's cache: ${Object.keys(body).join(", ") || "nothing named"}.`, async () => (await hostingApplicationCacheUpdate({
10609
- path,
10610
- body
10611
- })).data));
10607
+ if (action === "cache-set") {
10608
+ const body = cacheBody(context);
10609
+ return await written$4(confirmableWrite(context, `Change this application's cache: ${Object.keys(body).join(", ") || "nothing named"}.`, async () => (await hostingApplicationCacheUpdate({
10610
+ path,
10611
+ body
10612
+ })).data));
10613
+ }
10612
10614
  if (action === "canonical") {
10613
10615
  const routeUuid = context.flags.get("--route") ?? "";
10614
10616
  if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$41}`);
@@ -26081,6 +26083,8 @@ var hostingApplicationCapabilitiesDataSchema = object({
26081
26083
  pause: boolean(),
26082
26084
  backups: boolean(),
26083
26085
  unsupported: array(string()),
26086
+ version: string().nullable(),
26087
+ upgradableVersions: array(string()),
26084
26088
  outputs: array(hostingCuratedComponentOutputDataSchema)
26085
26089
  });
26086
26090
  var hostingResourceDataSchema = object({
@@ -36826,7 +36830,7 @@ function writeUpdateState(state, env = process.env) {
36826
36830
  }
36827
36831
  //#endregion
36828
36832
  //#region src/version.ts
36829
- var VERSION = "1.0.351";
36833
+ var VERSION = "1.0.353";
36830
36834
  //#endregion
36831
36835
  //#region src/commands/update.ts
36832
36836
  /**
@@ -36901,7 +36905,7 @@ var update = {
36901
36905
  }, process.env);
36902
36906
  return {
36903
36907
  ...known,
36904
- current: after ?? "1.0.351",
36908
+ current: after ?? "1.0.353",
36905
36909
  latest: after ?? latest,
36906
36910
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
36907
36911
  action: "run",
@@ -37176,7 +37180,7 @@ async function printUpdateNotice(options) {
37176
37180
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
37177
37181
  } catch {}
37178
37182
  if (latest === null) return;
37179
- if (!isNewerVersion(latest, "1.0.351")) return;
37183
+ if (!isNewerVersion(latest, "1.0.353")) return;
37180
37184
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
37181
37185
  }
37182
37186
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */