dockup-cli 1.3.0 → 1.3.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/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var import_workspace = require("./commands/workspace");
33
33
  var import_database = require("./commands/database");
34
34
  var import_remote = require("./commands/remote");
35
35
  const program = new import_commander.Command();
36
- program.name("dockup").description("Dockup CLI - Deploy from your terminal").version("1.3.0");
36
+ program.name("dockup").description("Dockup CLI - Deploy from your terminal").version("1.3.1");
37
37
  program.command("login").description("Authenticate with Dockup").option("-t, --token <token>", "Use API token directly").action(import_auth.login);
38
38
  program.command("logout").description("Log out from Dockup").action(import_auth.logout);
39
39
  program.command("whoami").description("Show current logged in user").action(import_auth.whoami);
package/dist/lib/api.js CHANGED
@@ -61,7 +61,10 @@ class ApiClient {
61
61
  const response = await (0, import_node_fetch.default)(url, {
62
62
  method: "POST",
63
63
  headers: this.getHeaders(),
64
- body: body ? JSON.stringify(body) : void 0
64
+ // getHeaders() always sets Content-Type: application/json, so the body
65
+ // must be valid JSON even for no-body POSTs (test/run) — else Fastify
66
+ // rejects the empty body with 400.
67
+ body: JSON.stringify(body ?? {})
65
68
  });
66
69
  if (!response.ok) {
67
70
  const error = await response.json().catch(() => ({}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockup-cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Dockup CLI - deploy, env, logs, registry & more from your terminal (agent-friendly --json)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {