dockup-cli 1.3.0 → 1.3.2

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.2");
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
@@ -36,7 +36,9 @@ var import_config = require("./config");
36
36
  class ApiClient {
37
37
  getHeaders() {
38
38
  const headers = {
39
- "Content-Type": "application/json"
39
+ "Content-Type": "application/json",
40
+ // Tags requests as CLI-originated for the audit log (source = "cli").
41
+ "X-Dockup-Client": "cli"
40
42
  };
41
43
  const token = (0, import_config.getToken)();
42
44
  if (token) {
@@ -61,7 +63,10 @@ class ApiClient {
61
63
  const response = await (0, import_node_fetch.default)(url, {
62
64
  method: "POST",
63
65
  headers: this.getHeaders(),
64
- body: body ? JSON.stringify(body) : void 0
66
+ // getHeaders() always sets Content-Type: application/json, so the body
67
+ // must be valid JSON even for no-body POSTs (test/run) — else Fastify
68
+ // rejects the empty body with 400.
69
+ body: JSON.stringify(body ?? {})
65
70
  });
66
71
  if (!response.ok) {
67
72
  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.2",
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": {