@pmate/cli 0.50.3 → 0.50.4
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 +2 -0
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -444,3 +444,5 @@ The response remains a JSON array with `account`, `profiles`, and `nickNames`. B
|
|
|
444
444
|
Migration: callers relying on the old aggregated `roles`, `session`, full profiles or implicit mobile must use the appropriate resource API or explicitly request private fields. Account list and app-users remain privileged administration commands and retain their existing contracts. Deploy the updated auth API before using these CLI options.
|
|
445
445
|
|
|
446
446
|
For `ssh-pm2` environments, optional `runtime.cwd` is the dedicated remote repository checkout root (the service `dir` remains relative to it). Use a separate path per service/environment, for example `/home/pmate/.pmate/service-deploy/deneb-api-preview`. It must be an absolute path without traversal. This opt-in flow refuses dirty checkouts and fast-forwards to published `origin/main`; it never resets or cleans local edits. Environments without `runtime.cwd` retain their existing deployment behavior.
|
|
447
|
+
|
|
448
|
+
Registry versions that omit `runtime.cwd` for ssh-pm2 can select the same isolated checkout using an absolute `runtime.ecosystemFile`, ending in `/<service dir>/ecosystem.config.cjs`. The CLI derives the repository root from this exact suffix. Read back the registered environment before deployment; never assume a submitted optional field was retained.
|
package/dist/index.js
CHANGED
|
@@ -22526,6 +22526,10 @@ var ServiceCommandHandler = class {
|
|
|
22526
22526
|
};
|
|
22527
22527
|
}
|
|
22528
22528
|
if (runtime.type === "ssh-pm2") {
|
|
22529
|
+
const ecosystem = runtime.ecosystemFile?.trim();
|
|
22530
|
+
const suffix = `/${dir}/ecosystem.config.cjs`;
|
|
22531
|
+
const checkoutDir = runtime.cwd?.trim() || (ecosystem?.startsWith("/") && ecosystem.endsWith(suffix) ? ecosystem.slice(0, -suffix.length) : void 0);
|
|
22532
|
+
if (ecosystem?.startsWith("/") && !checkoutDir) throw new Error("Absolute ecosystemFile must match the service dir and ecosystem.config.cjs");
|
|
22529
22533
|
return {
|
|
22530
22534
|
id: service.id,
|
|
22531
22535
|
namespace: service.namespace,
|
|
@@ -22536,7 +22540,7 @@ var ServiceCommandHandler = class {
|
|
|
22536
22540
|
exposeType: env.network?.type === "websocket" ? "websocket" : env.network?.type === "mixed" ? "mixed" : env.network ? "rest" : "internal",
|
|
22537
22541
|
repository,
|
|
22538
22542
|
dir,
|
|
22539
|
-
...
|
|
22543
|
+
...checkoutDir ? { checkoutDir } : {},
|
|
22540
22544
|
server: requireString(runtime.server, `runtime.server for ${service.id} ${env.name}`),
|
|
22541
22545
|
...runtime.port !== void 0 ? { port: runtime.port } : {},
|
|
22542
22546
|
...splitPrimaryDomain(env.network?.domain)
|