@rpcbase/cli 0.122.0 → 0.124.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.122.0",
3
+ "version": "0.124.0",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -76,10 +76,12 @@ const runRsync = (cmd) => {
76
76
  }
77
77
 
78
78
  // Pull remote compose files into a temp dir, mirror local ones into another, then hash trees to detect diffs.
79
- // This is informational only; callers should treat errors as non-blocking.
80
- export const detectComposeChanges = ({ keyPath, user, host, deployDir, log, extraExcludes = [] }) => {
79
+ // Callers await this check; errors bubble up except for benign rsync statuses handled in runRsync.
80
+ export const detectComposeChanges = async ({ keyPath, user, host, deployDir, log, extraExcludes = [] }) => {
81
81
  const includeArgs = ["--include='*/'", "--include='*compose*.yml'", "--exclude='*'"]
82
82
  const excludeArgs = baseExcludeList
83
+ // dev compose files are not relevant for prod deploy checks
84
+ .concat(["compose.dev.yml"])
83
85
  .concat(extraExcludes)
84
86
  .map((p) => `--exclude='${p}'`)
85
87
  .join(" ")
@@ -88,22 +88,14 @@ export const deploy = async (argv) => {
88
88
  console.log(`${user}@${host}`, res)
89
89
  await ssh(`mkdir -p ~/apps/${deployDir}`)
90
90
 
91
- let infrastructureChanged = false
92
- let infrastructureDiff = ""
93
- try {
94
- ({ hasChanges: infrastructureChanged, output: infrastructureDiff } = detectComposeChanges({
95
- keyPath,
96
- user,
97
- host,
98
- deployDir,
99
- log,
100
- extraExcludes: argv.ignore || [],
101
- }))
102
- } catch (diffError) {
103
- console.warn(
104
- `Compose diff check skipped (non-blocking): ${diffError instanceof Error ? diffError.message : diffError}`,
105
- )
106
- }
91
+ const { hasChanges: infrastructureChanged, output: infrastructureDiff } = await detectComposeChanges({
92
+ keyPath,
93
+ user,
94
+ host,
95
+ deployDir,
96
+ log,
97
+ extraExcludes: argv.ignore || [],
98
+ })
107
99
 
108
100
  if (infrastructureChanged) {
109
101
  console.log("Infrastructure compose files differ between local and remote (info only; deploy proceeds).")