@catapultjs/deploy 0.8.0 → 0.10.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/LICENSE +21 -0
- package/README.md +87 -6
- package/build/commands/list_releases.d.ts +1 -0
- package/build/commands/list_releases.js +23 -1
- package/build/commands/list_releases.js.map +1 -1
- package/build/commands/list_revisions.d.ts +1 -0
- package/build/commands/list_revisions.js +37 -20
- package/build/commands/list_revisions.js.map +1 -1
- package/build/commands/list_tasks.d.ts +1 -0
- package/build/commands/list_tasks.js +19 -1
- package/build/commands/list_tasks.js.map +1 -1
- package/build/commands/pipeline.d.ts +1 -0
- package/build/commands/pipeline.js +18 -1
- package/build/commands/pipeline.js.map +1 -1
- package/build/commands/status.d.ts +2 -0
- package/build/commands/status.js +60 -50
- package/build/commands/status.js.map +1 -1
- package/build/commands/version.d.ts +1 -0
- package/build/commands/version.js +21 -4
- package/build/commands/version.js.map +1 -1
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/recipes/pm2.js +2 -2
- package/build/recipes/pm2.js.map +1 -1
- package/build/src/api.d.ts +60 -0
- package/build/src/api.js +159 -0
- package/build/src/api.js.map +1 -0
- package/build/src/base_command.d.ts +3 -1
- package/build/src/base_command.js +3 -1
- package/build/src/base_command.js.map +1 -1
- package/build/src/deployer.d.ts +7 -1
- package/build/src/deployer.js +19 -1
- package/build/src/deployer.js.map +1 -1
- package/build/src/pipeline/hooks.d.ts +4 -2
- package/build/src/pipeline/hooks.js.map +1 -1
- package/build/src/pipeline.d.ts +3 -3
- package/build/src/pipeline.js.map +1 -1
- package/build/src/status.d.ts +18 -0
- package/build/src/status.js +59 -0
- package/build/src/status.js.map +1 -0
- package/build/src/task/store.d.ts +4 -1
- package/build/src/task/store.js +8 -2
- package/build/src/task/store.js.map +1 -1
- package/build/src/task.d.ts +4 -1
- package/build/src/task.js +2 -2
- package/build/src/task.js.map +1 -1
- package/package.json +12 -7
- package/skills/catapultjs/SKILL.md +27 -0
- package/skills/catapultjs/references/api.md +70 -0
- package/skills/catapultjs/references/cli.md +160 -0
- package/skills/catapultjs/references/config.md +166 -0
- package/skills/catapultjs/references/github-actions.md +99 -0
- package/skills/catapultjs/references/recipe.md +115 -0
- package/skills/catapultjs/references/recipes.md +316 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jérémy Chaufourier
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,22 +1,99 @@
|
|
|
1
1
|
# Catapult
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@catapultjs/deploy)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](https://github.com/catapultjs/deploy/blob/main/LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
A Capistrano-style deployment tool for Node.js — versioned releases, shared directories, composable task pipeline, automatic rollback. No agent, no container, no server-side dependency, just SSH.
|
|
8
|
+
|
|
9
|
+
Full documentation at **https://catapultjs.com/**
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **SSH-based** — deploys directly over SSH; nothing to install on the server beyond a remote shell
|
|
14
|
+
- **Versioned releases** — every deploy goes into `releases/<timestamp>`, activated by an atomic `current` symlink, with automatic rollback on failure
|
|
15
|
+
- **Composable pipeline** — insert, remove or replace any task with a single function call, or rewrite the whole sequence
|
|
16
|
+
- **Drop-in recipes** — import once, tasks register themselves and wire into the pipeline
|
|
17
|
+
- **Multi-host** — deploy to one server or several, with per-host configuration
|
|
18
|
+
- **Healthcheck** — verify the app responds after a deploy, with automatic rollback on failure
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
Run `init` at the root of your project — it creates a `deploy.ts` config file and installs `@catapultjs/deploy` as a dev dependency:
|
|
6
23
|
|
|
7
24
|
```bash
|
|
8
25
|
npx @catapultjs/deploy init
|
|
9
26
|
```
|
|
10
27
|
|
|
11
|
-
|
|
28
|
+
Edit `deploy.ts` to describe your hosts and pick your recipes:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { defineConfig } from '@catapultjs/deploy'
|
|
32
|
+
import '@catapultjs/deploy/recipes/git'
|
|
33
|
+
import '@catapultjs/deploy/recipes/pm2'
|
|
34
|
+
|
|
35
|
+
export default defineConfig({
|
|
36
|
+
hosts: [
|
|
37
|
+
{
|
|
38
|
+
name: 'production',
|
|
39
|
+
ssh: 'deploy@example.com',
|
|
40
|
+
deployPath: '/home/deploy/myapp',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Prepare the server (once per host), then deploy:
|
|
12
47
|
|
|
13
48
|
```bash
|
|
14
|
-
npx cata deploy
|
|
49
|
+
npx cata deploy:setup
|
|
50
|
+
npx cata deploy
|
|
15
51
|
```
|
|
16
52
|
|
|
17
|
-
##
|
|
53
|
+
## Server structure
|
|
18
54
|
|
|
19
|
-
|
|
55
|
+
```
|
|
56
|
+
/home/deploy/myapp/
|
|
57
|
+
current/ → symlink to releases/<release>
|
|
58
|
+
releases/
|
|
59
|
+
2024-01-15T.../ ← active release
|
|
60
|
+
2024-01-14T.../
|
|
61
|
+
shared/
|
|
62
|
+
.env
|
|
63
|
+
logs/
|
|
64
|
+
.catapult/
|
|
65
|
+
repo/ ← bare git mirror (git recipe)
|
|
66
|
+
revisions.log ← JSON deployment history
|
|
67
|
+
deploy.lock ← present during a deployment
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Recipes
|
|
71
|
+
|
|
72
|
+
| Recipe | Description |
|
|
73
|
+
| ---------------- | --------------------------------------------------------------------------- |
|
|
74
|
+
| `git` | Clones the repository into each release, keeps a bare mirror on the server |
|
|
75
|
+
| `rsync` | Pushes a local directory into the release with rsync |
|
|
76
|
+
| `pm2` | Start, reload and manage PM2 processes |
|
|
77
|
+
| `adonisjs` | Install, build and migration tasks for AdonisJS apps |
|
|
78
|
+
| `adonisjs_local` | Builds the AdonisJS app locally, uploads the artifact |
|
|
79
|
+
| `astro` | Builds locally with `astro build`, uploads the output |
|
|
80
|
+
| `nuxt` | Build tasks for Nuxt apps |
|
|
81
|
+
| `vitepress` | Builds locally with `vitepress build`, uploads the static files |
|
|
82
|
+
| `directus` | Directus database migration and schema snapshot tasks |
|
|
83
|
+
| `redis` | Flush one, many or all Redis databases |
|
|
84
|
+
|
|
85
|
+
## Requirements
|
|
86
|
+
|
|
87
|
+
- Node.js >= 24 on the machine running Catapult
|
|
88
|
+
- SSH key-based access to the target servers
|
|
89
|
+
|
|
90
|
+
## Agent skill
|
|
91
|
+
|
|
92
|
+
The package ships a [`catapultjs` agent skill](https://catapultjs.com/guide/agent-skills) for Claude Code and SKILL.md-compatible agents, with references covering the deploy config, recipe writing and the programmatic API.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npx skills add catapultjs/deploy
|
|
96
|
+
```
|
|
20
97
|
|
|
21
98
|
## Contributing a recipe
|
|
22
99
|
|
|
@@ -25,3 +102,7 @@ If you've written a recipe that could be useful to others, open a pull request a
|
|
|
25
102
|
## Inspiration
|
|
26
103
|
|
|
27
104
|
Inspired by [Deployer PHP](https://deployer.org) and [Capistrano](https://capistranorb.com).
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
[MIT](https://github.com/catapultjs/deploy/blob/main/LICENSE)
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { flags } from '@adonisjs/ace';
|
|
1
11
|
import { Context } from "../src/context.js";
|
|
2
12
|
import { getCurrentRelease } from "../src/deployer.js";
|
|
3
13
|
import { q, getPaths, ssh } from "../src/utils.js";
|
|
@@ -7,9 +17,10 @@ export default class ListReleases extends BaseDeployCommand {
|
|
|
7
17
|
static description = 'List releases on servers';
|
|
8
18
|
async run() {
|
|
9
19
|
const ctx = Context.get();
|
|
10
|
-
const hosts = await this.selectHosts();
|
|
20
|
+
const hosts = await this.selectHosts({ all: this.json });
|
|
11
21
|
if (!hosts)
|
|
12
22
|
return;
|
|
23
|
+
const report = [];
|
|
13
24
|
for (const host of hosts) {
|
|
14
25
|
if (!(await this.ensureHostSetup(ctx, host)))
|
|
15
26
|
continue;
|
|
@@ -25,6 +36,10 @@ export default class ListReleases extends BaseDeployCommand {
|
|
|
25
36
|
.split('\n')
|
|
26
37
|
.map((line) => line.trim().replace(/\/$/, ''))
|
|
27
38
|
.filter(Boolean);
|
|
39
|
+
if (this.json) {
|
|
40
|
+
report.push({ name: host.name, current: current ?? null, releases });
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
28
43
|
const table = this.ui.table();
|
|
29
44
|
table.head(['', 'Release', 'Host']);
|
|
30
45
|
if (releases.length === 0) {
|
|
@@ -37,6 +52,13 @@ export default class ListReleases extends BaseDeployCommand {
|
|
|
37
52
|
}
|
|
38
53
|
table.render();
|
|
39
54
|
}
|
|
55
|
+
if (this.json) {
|
|
56
|
+
this.logger.log(JSON.stringify({ hosts: report }, null, 2));
|
|
57
|
+
}
|
|
40
58
|
}
|
|
41
59
|
}
|
|
60
|
+
__decorate([
|
|
61
|
+
flags.boolean({ description: 'Output result as JSON' }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], ListReleases.prototype, "json", void 0);
|
|
42
64
|
//# sourceMappingURL=list_releases.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_releases.js","sourceRoot":"","sources":["../../commands/list_releases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAA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B,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC;;AAtDO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;0CACnC"}
|
|
@@ -1,44 +1,61 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { flags } from '@adonisjs/ace';
|
|
1
11
|
import { Context } from "../src/context.js";
|
|
2
|
-
import {
|
|
12
|
+
import { getRevisions } from "../src/deployer.js";
|
|
3
13
|
import { BaseDeployCommand } from "../src/base_command.js";
|
|
4
14
|
export default class ListRevisions extends BaseDeployCommand {
|
|
5
15
|
static commandName = 'list:revisions';
|
|
6
16
|
static description = 'List the last 10 revisions on servers';
|
|
7
17
|
async run() {
|
|
8
18
|
const ctx = Context.get();
|
|
9
|
-
const hosts = await this.selectHosts();
|
|
19
|
+
const hosts = await this.selectHosts({ all: this.json });
|
|
10
20
|
if (!hosts)
|
|
11
21
|
return;
|
|
22
|
+
const report = [];
|
|
12
23
|
for (const host of hosts) {
|
|
13
24
|
if (!(await this.ensureHostSetup(ctx, host)))
|
|
14
25
|
continue;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
if (!this.json)
|
|
27
|
+
this.logger.log(this.colors.bold(`\n# ${host.name}`));
|
|
28
|
+
const revisions = await getRevisions(ctx, host);
|
|
29
|
+
if (this.json) {
|
|
30
|
+
report.push({ name: host.name, revisions });
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
20
33
|
const table = this.ui.table();
|
|
21
34
|
table.head(['Release', 'Branch', 'Commit', 'By', 'Date']);
|
|
22
|
-
if (
|
|
35
|
+
if (revisions.length === 0) {
|
|
23
36
|
table.row(['no revisions', '', '', '', '']);
|
|
24
37
|
}
|
|
25
38
|
else {
|
|
26
|
-
for (const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
]);
|
|
36
|
-
}
|
|
37
|
-
catch { }
|
|
39
|
+
for (const revision of revisions) {
|
|
40
|
+
const { release, branch, commit, user, date } = revision;
|
|
41
|
+
table.row([
|
|
42
|
+
release ?? '—',
|
|
43
|
+
branch ?? '—',
|
|
44
|
+
commit ? commit.slice(0, 7) : '—',
|
|
45
|
+
user ?? '—',
|
|
46
|
+
date ? new Date(date).toLocaleString() : '—',
|
|
47
|
+
]);
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
table.render();
|
|
41
51
|
}
|
|
52
|
+
if (this.json) {
|
|
53
|
+
this.logger.log(JSON.stringify({ hosts: report }, null, 2));
|
|
54
|
+
}
|
|
42
55
|
}
|
|
43
56
|
}
|
|
57
|
+
__decorate([
|
|
58
|
+
flags.boolean({ description: 'Output result as JSON' }),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], ListRevisions.prototype, "json", void 0);
|
|
44
61
|
//# sourceMappingURL=list_revisions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_revisions.js","sourceRoot":"","sources":["../../commands/list_revisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list_revisions.js","sourceRoot":"","sources":["../../commands/list_revisions.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,iBAAiB;IAC1D,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAA;IACrC,MAAM,CAAC,WAAW,GAAG,uCAAuC,CAAA;IAK5D,KAAK,CAAC,GAAG;QACP,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;QAEzB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QACxD,IAAI,CAAC,KAAK;YAAE,OAAM;QAElB,MAAM,MAAM,GAA6D,EAAE,CAAA;QAE3E,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;gBAAE,SAAQ;YAEtD,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;YAErE,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAE/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CAAC,CAAC,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC;;AAjDO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;2CACnC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { BaseCommand, flags } from '@adonisjs/ace';
|
|
2
11
|
import { getTasks, getTaskDescription } from "../src/task.js";
|
|
3
12
|
import { getPipeline } from "../src/pipeline.js";
|
|
4
13
|
export default class ListTasks extends BaseCommand {
|
|
@@ -7,6 +16,11 @@ export default class ListTasks extends BaseCommand {
|
|
|
7
16
|
async run() {
|
|
8
17
|
const pipeline = getPipeline();
|
|
9
18
|
const extra = getTasks().filter((t) => !pipeline.includes(t));
|
|
19
|
+
if (this.json) {
|
|
20
|
+
const describe = (name) => ({ name, description: getTaskDescription(name) });
|
|
21
|
+
this.logger.log(JSON.stringify({ pipeline: pipeline.map(describe), extra: extra.map(describe) }, null, 2));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
10
24
|
this.logger.log('Pipeline');
|
|
11
25
|
const pipelineTable = this.ui.table();
|
|
12
26
|
pipelineTable.head(['Task', 'Description']);
|
|
@@ -21,4 +35,8 @@ export default class ListTasks extends BaseCommand {
|
|
|
21
35
|
}
|
|
22
36
|
}
|
|
23
37
|
}
|
|
38
|
+
__decorate([
|
|
39
|
+
flags.boolean({ description: 'Output result as JSON' }),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], ListTasks.prototype, "json", void 0);
|
|
24
42
|
//# sourceMappingURL=list_tasks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_tasks.js","sourceRoot":"","sources":["../../commands/list_tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"list_tasks.js","sourceRoot":"","sources":["../../commands/list_tasks.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAChD,MAAM,CAAC,WAAW,GAAG,YAAY,CAAA;IACjC,MAAM,CAAC,WAAW,GAAG,gDAAgD,CAAA;IAKrE,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;QAC9B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QAE7D,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACpF,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,IA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, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { BaseCommand, flags } from '@adonisjs/ace';
|
|
2
11
|
import { getPipeline } from "../src/pipeline.js";
|
|
3
12
|
export default class ListPipeline extends BaseCommand {
|
|
4
13
|
static commandName = 'pipeline';
|
|
5
14
|
static description = 'Show the current deployment pipeline';
|
|
6
15
|
async run() {
|
|
7
16
|
const pipeline = getPipeline();
|
|
17
|
+
if (this.json) {
|
|
18
|
+
this.logger.log(JSON.stringify({ pipeline }, null, 2));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
8
21
|
const table = this.ui.table();
|
|
9
22
|
table.head(['#', 'Task']);
|
|
10
23
|
pipeline.forEach((name, i) => table.row([String(i + 1), name]));
|
|
11
24
|
table.render();
|
|
12
25
|
}
|
|
13
26
|
}
|
|
27
|
+
__decorate([
|
|
28
|
+
flags.boolean({ description: 'Output result as JSON' }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], ListPipeline.prototype, "json", void 0);
|
|
14
31
|
//# sourceMappingURL=pipeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../commands/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../commands/pipeline.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACnD,MAAM,CAAC,WAAW,GAAG,UAAU,CAAA;IAC/B,MAAM,CAAC,WAAW,GAAG,sCAAsC,CAAA;IAK3D,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;QAE9B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YACtD,OAAM;QACR,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAA;QACzB,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;QAC/D,KAAK,CAAC,MAAM,EAAE,CAAA;IAChB,CAAC;;AAdO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;0CACnC"}
|
package/build/commands/status.js
CHANGED
|
@@ -1,66 +1,76 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { flags } from '@adonisjs/ace';
|
|
11
|
+
import { MemoryRenderer } from '@poppinss/cliui';
|
|
1
12
|
import { Context } from "../src/context.js";
|
|
2
|
-
import {
|
|
3
|
-
import { bin } from "../src/task.js";
|
|
4
|
-
import { getPipeline } from "../src/pipeline.js";
|
|
5
|
-
import { hooks } from "../src/pipeline/hooks.js";
|
|
6
|
-
import { q, getPaths, ssh, detectPackageManager } from "../src/utils.js";
|
|
13
|
+
import { collectHostStatus, HOST_STATUS_FIELDS } from "../src/status.js";
|
|
7
14
|
import { BaseDeployCommand } from "../src/base_command.js";
|
|
8
|
-
import { logger } from "../src/logger.js";
|
|
15
|
+
import { CatapultLogger, logger } from "../src/logger.js";
|
|
9
16
|
export default class Status extends BaseDeployCommand {
|
|
10
17
|
static commandName = 'status';
|
|
11
18
|
static description = 'Show server status';
|
|
12
19
|
async run() {
|
|
13
20
|
const ctx = Context.get();
|
|
14
|
-
const hosts = await this.selectHosts();
|
|
21
|
+
const hosts = await this.selectHosts({ all: this.json });
|
|
15
22
|
if (!hosts)
|
|
16
23
|
return;
|
|
17
|
-
const
|
|
24
|
+
const hookLogger = this.json ? new CatapultLogger() : logger;
|
|
25
|
+
if (this.json)
|
|
26
|
+
hookLogger.useRenderer(new MemoryRenderer());
|
|
27
|
+
const report = [];
|
|
18
28
|
for (const host of hosts) {
|
|
19
29
|
if (!(await this.ensureHostSetup(ctx, host)))
|
|
20
30
|
continue;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
this.logger.error(`status error: ${error.message}`);
|
|
62
|
-
}
|
|
31
|
+
if (!this.json)
|
|
32
|
+
this.logger.log(this.colors.bold(`\n# ${host.name}`));
|
|
33
|
+
const status = await collectHostStatus(ctx, host, hookLogger);
|
|
34
|
+
report.push(status);
|
|
35
|
+
if (status.error)
|
|
36
|
+
this.logger.error(`status error: ${status.error}`);
|
|
37
|
+
if (!this.json)
|
|
38
|
+
this.printStatus(status);
|
|
39
|
+
}
|
|
40
|
+
if (this.json) {
|
|
41
|
+
this.logger.log(JSON.stringify({ hosts: report }, null, 2));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
printStatus(status) {
|
|
45
|
+
if (status.release !== undefined) {
|
|
46
|
+
this.logger.log(`Release ${status.release ? this.colors.cyan(status.release) : this.colors.dim('none')}`);
|
|
47
|
+
}
|
|
48
|
+
if (status.health) {
|
|
49
|
+
this.logger.log(`Health ${status.health === 'ok' ? this.colors.green('OK') : this.colors.red('FAIL')}`);
|
|
50
|
+
}
|
|
51
|
+
if (status.packageManager) {
|
|
52
|
+
this.logger.log(`Node ${this.colors.dim(status.node || 'unavailable')}`);
|
|
53
|
+
this.logger.log(`${status.packageManager.name.padEnd(8)} ${this.colors.dim(status.packageManager.version || 'unavailable')}`);
|
|
54
|
+
}
|
|
55
|
+
for (const [key, value] of Object.entries(status)) {
|
|
56
|
+
if (HOST_STATUS_FIELDS.has(key))
|
|
57
|
+
continue;
|
|
58
|
+
this.logger.log(`${key.padEnd(8)} ${this.colors.dim(String(value))}`);
|
|
59
|
+
}
|
|
60
|
+
if (status.revision) {
|
|
61
|
+
const { branch, commit, user, date } = status.revision;
|
|
62
|
+
this.logger.log(`Branch ${this.colors.dim(branch ?? '—')}`);
|
|
63
|
+
this.logger.log(`Commit ${this.colors.dim(commit ? commit.slice(0, 7) : '—')}`);
|
|
64
|
+
this.logger.log(`By ${this.colors.dim(user ?? '—')}`);
|
|
65
|
+
this.logger.log(`Date ${this.colors.dim(date ? new Date(date).toLocaleString() : '—')}`);
|
|
66
|
+
}
|
|
67
|
+
if (status.lock !== undefined) {
|
|
68
|
+
this.logger.log(`Lock ${status.lock ? this.colors.yellow(status.lock) : this.colors.dim('none')}`);
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
72
|
+
__decorate([
|
|
73
|
+
flags.boolean({ description: 'Output result as JSON' }),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], Status.prototype, "json", void 0);
|
|
66
76
|
//# sourceMappingURL=status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../commands/status.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAmB,MAAM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