@apotech-os/cli 2.0.0 → 2.0.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/README.md CHANGED
@@ -49,10 +49,21 @@ the browser entirely and paste a key you created by hand:
49
49
  apotech-os login --remote production --with-key
50
50
  ```
51
51
 
52
- Environment variables work too, and take no `--remote`:
52
+ Environment variables work too:
53
53
 
54
- - `WOPILO_API_URL` — server API root. No `/api` prefix is added automatically.
55
- - `WOPILO_API_KEY` — Bearer token.
54
+ - `WOPILO_API_URL` — server API root, used when no `--remote` is given. No
55
+ `/api` prefix is added automatically.
56
+ - `WOPILO_API_KEY` — Bearer token. Used when no `--remote` is given, and as a
57
+ fallback when the named remote has no key stored in `credentials.json`. A
58
+ stored key always wins over the env var.
59
+
60
+ That fallback is the headless (CI) recipe — no browser, no prompt, no
61
+ hand-written credentials file:
62
+
63
+ ```sh
64
+ apotech-os remote add --url https://your-server.example.com --as production
65
+ WOPILO_API_KEY=$SECRET apotech-os deploy --remote production
66
+ ```
56
67
 
57
68
  ## Commands
58
69
 
package/dist/index.js CHANGED
@@ -8075,6 +8075,7 @@ var import_esbuild = require("esbuild");
8075
8075
  var import_fs3 = require("fs");
8076
8076
  var import_path = require("path");
8077
8077
  var import_os2 = require("os");
8078
+ var import_url = require("url");
8078
8079
 
8079
8080
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
8080
8081
  var external_exports = {};
@@ -23487,7 +23488,7 @@ Ensure the file exists and exports a default AppManifest.`
23487
23488
  const diagnostic = result.errors.map((e) => e.text).join("\n");
23488
23489
  throw new ManifestBuildError("esbuild reported errors", diagnostic);
23489
23490
  }
23490
- const mod = await import(`${outFile}?t=${Date.now()}`);
23491
+ const mod = await import(`${(0, import_url.pathToFileURL)(outFile).href}?t=${Date.now()}`);
23491
23492
  if (mod.default === void 0) {
23492
23493
  throw new ManifestBuildError(
23493
23494
  "Missing default export",
@@ -23911,7 +23912,7 @@ function getApiKey(remoteName) {
23911
23912
  }
23912
23913
  var DEFAULT_REMOTE_URL = process.env["WOPILO_API_URL"] ?? "https://wopilo.plateform.apotechstudio.com/";
23913
23914
  function resolveApiKey(remoteName) {
23914
- if (remoteName) return getApiKey(remoteName);
23915
+ if (remoteName) return getApiKey(remoteName) ?? process.env["WOPILO_API_KEY"] ?? void 0;
23915
23916
  return process.env["WOPILO_API_KEY"] ?? void 0;
23916
23917
  }
23917
23918