@rpcbase/cli 0.136.0 → 0.137.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 +7 -2
- package/src/cmd-deploy/index.js +11 -0
- package/src/index.js +5 -0
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.137.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"src"
|
|
7
|
+
],
|
|
5
8
|
"main": "./index.js",
|
|
6
9
|
"bin": {
|
|
7
10
|
"rb": "./src/index.js"
|
|
@@ -19,7 +22,9 @@
|
|
|
19
22
|
"package.json",
|
|
20
23
|
"src/"
|
|
21
24
|
],
|
|
22
|
-
"output": [
|
|
25
|
+
"output": [
|
|
26
|
+
"publish-output.txt"
|
|
27
|
+
],
|
|
23
28
|
"env": {
|
|
24
29
|
"NPM_RELEASE_CHANNEL": {
|
|
25
30
|
"external": true
|
package/src/cmd-deploy/index.js
CHANGED
|
@@ -125,6 +125,17 @@ export const deploy = async (argv) => {
|
|
|
125
125
|
log("Application stopped. Starting it up again...")
|
|
126
126
|
await ssh(`cd ~/apps/${deployDir}/infrastructure && node ctrl.js up prod`, true)
|
|
127
127
|
|
|
128
|
+
if (argv.pruneDocker !== false) {
|
|
129
|
+
log("Pruning dangling docker images on the remote host...")
|
|
130
|
+
try {
|
|
131
|
+
await ssh("docker image prune -f")
|
|
132
|
+
} catch (pruneError) {
|
|
133
|
+
console.warn(
|
|
134
|
+
`Warning: docker image prune failed (deploy continues): ${pruneError instanceof Error ? pruneError.message : pruneError}`,
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
128
139
|
log("Deployment complete ✅")
|
|
129
140
|
} catch (error) {
|
|
130
141
|
console.error(
|
package/src/index.js
CHANGED
|
@@ -63,6 +63,11 @@ yargs(hideBin(process.argv))
|
|
|
63
63
|
describe: "Run with verbose logging",
|
|
64
64
|
type: "boolean",
|
|
65
65
|
})
|
|
66
|
+
.option("prune-docker", {
|
|
67
|
+
describe: "Prune dangling docker images on the remote host after deploy",
|
|
68
|
+
type: "boolean",
|
|
69
|
+
default: true,
|
|
70
|
+
})
|
|
66
71
|
.option("ignore", {
|
|
67
72
|
alias: "i",
|
|
68
73
|
describe: "Exclude additional files from the rsync command",
|