servyx-cli 0.1.2 → 0.1.3
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 +1 -1
- package/package.json +1 -1
- package/src/commands/deploy.js +2 -1
- package/src/lib/rsync.js +3 -0
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ servyx status
|
|
|
38
38
|
|
|
39
39
|
- Global config: `~/.servyx/config.json` (mode 600)
|
|
40
40
|
- Project config: `servyx.json` in your project root
|
|
41
|
-
- Optional excludes: `.servyxignore` (rsync patterns)
|
|
41
|
+
- Optional excludes: `.servyxignore` (rsync patterns). Hidden files (`.env`, `.htaccess`, etc.) are excluded by default.
|
|
42
42
|
|
|
43
43
|
Environment variables:
|
|
44
44
|
|
package/package.json
CHANGED
package/src/commands/deploy.js
CHANGED
|
@@ -2,7 +2,7 @@ import pc from 'picocolors';
|
|
|
2
2
|
import { getDeployTarget, getDeployment, startDeployment } from '../lib/api.js';
|
|
3
3
|
import { getToken } from '../lib/config.js';
|
|
4
4
|
import { loadProjectConfig, loadServyxIgnore } from '../lib/project.js';
|
|
5
|
-
import { rsyncDeploy, sshPreflight } from '../lib/rsync.js';
|
|
5
|
+
import { rsyncDeploy, sshPreflight, DEFAULT_RSYNC_EXCLUDES } from '../lib/rsync.js';
|
|
6
6
|
|
|
7
7
|
const TERMINAL_STATUSES = new Set(['success', 'failure', 'cancelled']);
|
|
8
8
|
|
|
@@ -59,6 +59,7 @@ export async function runDeploy(options = {}) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const excludes = [
|
|
62
|
+
...DEFAULT_RSYNC_EXCLUDES,
|
|
62
63
|
...(target.rsync_excludes || []),
|
|
63
64
|
...loadServyxIgnore(root),
|
|
64
65
|
];
|
package/src/lib/rsync.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { spawnSync } from 'child_process';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
+
/** Hidden files/dirs are not synced so server-side config (.env, .htaccess, etc.) is preserved. */
|
|
5
|
+
export const DEFAULT_RSYNC_EXCLUDES = ['.*'];
|
|
6
|
+
|
|
4
7
|
export function requireBinary(name) {
|
|
5
8
|
const result = spawnSync('which', [name], { encoding: 'utf8' });
|
|
6
9
|
if (result.status !== 0) {
|