sproutboat 0.4.7 → 0.4.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/SURFACE.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Generated by `src/surface.test.ts` from `src/surface.ts` + the pinned
4
4
  > toolchain constants. Do not edit by hand — run `UPDATE_SURFACE=1 bun test`.
5
5
 
6
- **Package:** `sproutboat` 0.4.7 · runs on Bun (use `bunx`, not `npx`)
6
+ **Package:** `sproutboat` 0.4.8 · runs on Bun (use `bunx`, not `npx`)
7
7
 
8
8
  ## Commands
9
9
 
@@ -12,7 +12,7 @@
12
12
  | `init` | `[name]` | Scaffold sproutboat.jsonc + src/index.js in ./<name>. |
13
13
  | `check` | `[project-dir]` | Validate the config and entry point without building. |
14
14
  | `build` | `[project-dir]` | Cross-compile the native-fetch sprout (Porffor + Zig). |
15
- | `deploy` | `[project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision]` | Build (unless --artifact), auto-provision id-less storage bindings and pin their ids into sproutboat.jsonc, print the report, upload, wait until the URL serves. --dry-run stops before upload; --no-wait skips the health check; --no-provision leaves id-less bindings as ephemeral deploy-scoped stores. |
15
+ | `deploy` | `[project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision] [--force]` | Build (unless --artifact), auto-provision id-less storage bindings and pin their ids into sproutboat.jsonc, print the report, upload, wait until the URL serves. --dry-run stops before upload; --no-wait skips the health check; --no-provision leaves id-less bindings as ephemeral deploy-scoped stores; --force uploads even if the sprout binary is unchanged. |
16
16
  | `versions` | `list [project-dir]` | List the project's deployed versions. |
17
17
  | `rollback` | `<version-id> [project-dir]` | Re-activate a previous version. |
18
18
  | `tail` | `[project-dir] [--sprout]` | Print recent request logs; --sprout prints the running sprout + broker stdout/stderr instead. |
@@ -23,7 +23,7 @@
23
23
  | `login` | `[--api-url <url>] [--token <token>]` | Device-code browser flow, or store <token> for <url> directly. |
24
24
 
25
25
  ```
26
- usage: sproutboat <init [name] | check [project-dir] | build [project-dir] | deploy [project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision] | versions list [project-dir] | rollback <version-id> [project-dir] | tail [project-dir] [--sprout] | domains [list | add <host> | verify <host> | rm <host>] [project-dir] | secrets [list | set <NAME> [value] | rm <NAME>] [project-dir] | resource [list [kind] | create <kind> <name> | rename <id> <name> | delete <id>] | delete [project-dir] [--name <project>] --yes | login [--api-url <url>] [--token <token>]>
26
+ usage: sproutboat <init [name] | check [project-dir] | build [project-dir] | deploy [project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision] [--force] | versions list [project-dir] | rollback <version-id> [project-dir] | tail [project-dir] [--sprout] | domains [list | add <host> | verify <host> | rm <host>] [project-dir] | secrets [list | set <NAME> [value] | rm <NAME>] [project-dir] | resource [list [kind] | create <kind> <name> | rename <id> <name> | delete <id>] | delete [project-dir] [--name <project>] --yes | login [--api-url <url>] [--token <token>]>
27
27
  ```
28
28
 
29
29
  ## Environment variables
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutboat",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Wrangler-shaped CLI for Sproutboat. Deploys workers to any control plane via --api-url / SPROUTBOAT_API_URL.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/main.ts CHANGED
@@ -264,7 +264,12 @@ async function deploy(args: string[]) {
264
264
  }
265
265
  const { apiUrl, token } = await apiCredentials();
266
266
  const digest = artifactManifest.binaryHash.replace(/^sha256:/, "");
267
- if (digest) {
267
+ // The "already active" shortcut keys on the sprout binary hash alone. Assets
268
+ // and bindings.json can change while the handler stays byte-identical, so skip
269
+ // it whenever the artifact ships either sidecar (or the caller passed --force).
270
+ const hasSidecars = (await Bun.file(resolve(artifactDir, "assets.json")).exists())
271
+ || (await Bun.file(resolve(artifactDir, "bindings.json")).exists());
272
+ if (digest && !hasSidecars && !args.includes("--force")) {
268
273
  const response = await fetch(`${apiUrl.replace(/\/$/, "")}/api/projects/${projectName}/deployments`, { headers: { "x-api-key": token } });
269
274
  const deployments = parseDeploymentList(await responseText(response, "could not check existing deployments"));
270
275
  if (!deployments) fail("could not parse deployment list response");
package/src/surface.ts CHANGED
@@ -31,8 +31,8 @@ export const COMMANDS: readonly Command[] = [
31
31
  summary: "Cross-compile the native-fetch sprout (Porffor + Zig)." },
32
32
 
33
33
  { name: "deploy", group: "Ship", emoji: "🚀",
34
- args: "[project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision]", brief: "[project-dir] [--dry-run]",
35
- summary: "Build (unless --artifact), auto-provision id-less storage bindings and pin their ids into sproutboat.jsonc, print the report, upload, wait until the URL serves. --dry-run stops before upload; --no-wait skips the health check; --no-provision leaves id-less bindings as ephemeral deploy-scoped stores." },
34
+ args: "[project-dir] [--dry-run] [--artifact <dir>] [--no-wait] [--no-provision] [--force]", brief: "[project-dir] [--dry-run]",
35
+ summary: "Build (unless --artifact), auto-provision id-less storage bindings and pin their ids into sproutboat.jsonc, print the report, upload, wait until the URL serves. --dry-run stops before upload; --no-wait skips the health check; --no-provision leaves id-less bindings as ephemeral deploy-scoped stores; --force uploads even if the sprout binary is unchanged." },
36
36
  { name: "versions", group: "Ship", emoji: "📜", args: "list [project-dir]",
37
37
  summary: "List the project's deployed versions." },
38
38
  { name: "rollback", group: "Ship", emoji: "⏮", args: "<version-id> [project-dir]", brief: "<version-id>",