@wyxos/zephyr 0.2.26 → 0.2.27

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/package.json +1 -1
  2. package/src/ssh/ssh.mjs +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/zephyr",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
package/src/ssh/ssh.mjs CHANGED
@@ -121,13 +121,18 @@ export async function deleteRemoteFile(ssh, remotePath, remoteCwd) {
121
121
  const escapedPath = absoluteRemotePath.replace(/'/g, "'\\''")
122
122
  const command = `rm -f '${escapedPath}'`
123
123
 
124
- logProcessing(`Deleting remote file: ${absoluteRemotePath}...`)
124
+ const inTest = process.env.NODE_ENV === 'test' || process.env.VITEST === 'true'
125
+ if (!inTest) {
126
+ logProcessing(`Deleting remote file: ${absoluteRemotePath}...`)
127
+ }
125
128
 
126
129
  const result = await ssh.execCommand(command, { cwd: normalizedCwd })
127
130
 
128
131
  if (result.code !== 0 && result.code !== 1) {
129
- logWarning(`Failed to delete remote file ${absoluteRemotePath}: ${result.stderr}`)
130
- } else {
132
+ if (!inTest) {
133
+ logWarning(`Failed to delete remote file ${absoluteRemotePath}: ${result.stderr}`)
134
+ }
135
+ } else if (!inTest) {
131
136
  logSuccess(`Deleted remote file: ${absoluteRemotePath}`)
132
137
  }
133
138
  }