@pmate/cli 0.29.8 → 0.29.9

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +17 -10
package/dist/index.js CHANGED
@@ -19381,8 +19381,11 @@ var ServiceRuntimeRunner = class {
19381
19381
  `cd "${repoDir}"`,
19382
19382
  `if [ -f ~/.profile ]; then . ~/.profile; fi`,
19383
19383
  `if [ -f ~/.bashrc ]; then . ~/.bashrc; fi`,
19384
- `if [ -n "$(git status --porcelain)" ]; then git reset --hard HEAD; git clean -fd; fi`,
19385
- `git pull --rebase`,
19384
+ ...server === "local" ? [
19385
+ `test "$(git branch --show-current)" = main || { echo 'Local service checkout must be on main' >&2; exit 1; }`,
19386
+ `test -z "$(git status --porcelain)" || { echo 'Local service checkout has uncommitted changes; refusing to discard them' >&2; exit 1; }`,
19387
+ `git pull --ff-only origin main`
19388
+ ] : [`if [ -n "$(git status --porcelain)" ]; then git reset --hard HEAD; git clean -fd; fi`, `git pull --rebase`],
19386
19389
  ...envSyncCommand ? [envSyncCommand] : [],
19387
19390
  `"${scriptPath}" restart --env ${shellQuote2(envName)}`
19388
19391
  ].join(" && ");
@@ -20255,6 +20258,7 @@ var ServiceRuntimeRunner = class {
20255
20258
  });
20256
20259
  }
20257
20260
  runRemoteCommand(server, command) {
20261
+ if (server === "local") return this.runCommandWithEnv("bash", ["-c", command], import_node_os10.default.homedir());
20258
20262
  return new Promise((resolve, reject) => {
20259
20263
  const target = `pmate@${server}`;
20260
20264
  const child = (0, import_node_child_process10.spawn)("ssh", buildSshBashArgs(target, command), { stdio: "inherit" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.29.8",
3
+ "version": "0.29.9",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -11,6 +11,16 @@
11
11
  "files": [
12
12
  "dist"
13
13
  ],
14
+ "scripts": {
15
+ "build": "npm run clean && tsup --config tsup.config.ts && node scripts/copy-templates.js",
16
+ "clean": "rimraf dist",
17
+ "dev": "ts-node src/index.ts",
18
+ "release": "pnpm publish",
19
+ "start": "node dist/index.js",
20
+ "test": "vitest run src/tests",
21
+ "typecheck": "tsc --noEmit",
22
+ "prepare": "npm run build"
23
+ },
14
24
  "keywords": [
15
25
  "cli",
16
26
  "typescript",
@@ -57,13 +67,10 @@
57
67
  "typescript": "^5.9.3",
58
68
  "vitest": "^4.0.17"
59
69
  },
60
- "scripts": {
61
- "build": "npm run clean && tsup --config tsup.config.ts && node scripts/copy-templates.js",
62
- "clean": "rimraf dist",
63
- "dev": "ts-node src/index.ts",
64
- "release": "pnpm publish",
65
- "start": "node dist/index.js",
66
- "test": "vitest run src/tests",
67
- "typecheck": "tsc --noEmit"
70
+ "pnpm": {
71
+ "overrides": {
72
+ "@pmate/meta": "^1.3.1",
73
+ "@pmate/utils": "^1.1.4"
74
+ }
68
75
  }
69
- }
76
+ }