@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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -6
  3. package/build/commands/list_releases.d.ts +1 -0
  4. package/build/commands/list_releases.js +23 -1
  5. package/build/commands/list_releases.js.map +1 -1
  6. package/build/commands/list_revisions.d.ts +1 -0
  7. package/build/commands/list_revisions.js +37 -20
  8. package/build/commands/list_revisions.js.map +1 -1
  9. package/build/commands/list_tasks.d.ts +1 -0
  10. package/build/commands/list_tasks.js +19 -1
  11. package/build/commands/list_tasks.js.map +1 -1
  12. package/build/commands/pipeline.d.ts +1 -0
  13. package/build/commands/pipeline.js +18 -1
  14. package/build/commands/pipeline.js.map +1 -1
  15. package/build/commands/status.d.ts +2 -0
  16. package/build/commands/status.js +60 -50
  17. package/build/commands/status.js.map +1 -1
  18. package/build/commands/version.d.ts +1 -0
  19. package/build/commands/version.js +21 -4
  20. package/build/commands/version.js.map +1 -1
  21. package/build/index.d.ts +3 -0
  22. package/build/index.js +3 -0
  23. package/build/index.js.map +1 -1
  24. package/build/recipes/pm2.js +2 -2
  25. package/build/recipes/pm2.js.map +1 -1
  26. package/build/src/api.d.ts +60 -0
  27. package/build/src/api.js +159 -0
  28. package/build/src/api.js.map +1 -0
  29. package/build/src/base_command.d.ts +3 -1
  30. package/build/src/base_command.js +3 -1
  31. package/build/src/base_command.js.map +1 -1
  32. package/build/src/deployer.d.ts +7 -1
  33. package/build/src/deployer.js +19 -1
  34. package/build/src/deployer.js.map +1 -1
  35. package/build/src/pipeline/hooks.d.ts +4 -2
  36. package/build/src/pipeline/hooks.js.map +1 -1
  37. package/build/src/pipeline.d.ts +3 -3
  38. package/build/src/pipeline.js.map +1 -1
  39. package/build/src/status.d.ts +18 -0
  40. package/build/src/status.js +59 -0
  41. package/build/src/status.js.map +1 -0
  42. package/build/src/task/store.d.ts +4 -1
  43. package/build/src/task/store.js +8 -2
  44. package/build/src/task/store.js.map +1 -1
  45. package/build/src/task.d.ts +4 -1
  46. package/build/src/task.js +2 -2
  47. package/build/src/task.js.map +1 -1
  48. package/package.json +12 -7
  49. package/skills/catapultjs/SKILL.md +27 -0
  50. package/skills/catapultjs/references/api.md +70 -0
  51. package/skills/catapultjs/references/cli.md +160 -0
  52. package/skills/catapultjs/references/config.md +166 -0
  53. package/skills/catapultjs/references/github-actions.md +99 -0
  54. package/skills/catapultjs/references/recipe.md +115 -0
  55. 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
- SSH deployment tool for Node.js applications.
3
+ [![npm version](https://img.shields.io/npm/v/@catapultjs/deploy)](https://www.npmjs.com/package/@catapultjs/deploy)
4
+ [![node version](https://img.shields.io/node/v/@catapultjs/deploy)](https://nodejs.org)
5
+ [![license](https://img.shields.io/npm/l/@catapultjs/deploy)](https://github.com/catapultjs/deploy/blob/main/LICENSE)
4
6
 
5
- ## Installation
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
- ## Quick start
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 # deploy
49
+ npx cata deploy:setup
50
+ npx cata deploy
15
51
  ```
16
52
 
17
- ## Documentation
53
+ ## Server structure
18
54
 
19
- Full documentation at **https://catapultjs.com/**
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)
@@ -2,5 +2,6 @@ import { BaseDeployCommand } from '../src/base_command.ts';
2
2
  export default class ListReleases extends BaseDeployCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
6
7
  }
@@ -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,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,iBAAiB;IACzD,MAAM,CAAC,WAAW,GAAG,eAAe,CAAA;IACpC,MAAM,CAAC,WAAW,GAAG,0BAA0B,CAAA;IAE/C,KAAK,CAAC,GAAG;QACP,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;QAEzB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACtC,IAAI,CAAC,KAAK;YAAE,OAAM;QAElB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;gBAAE,SAAQ;YAEtD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;YAEpD,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAElD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAC1B,IAAI,EACJ;;eAEO,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;aACnB,CAAC,CAAC,KAAK,CAAC,QAAQ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AAO,EAAE,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;gBACpE,SAAQ;YACV,CAAC;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;YAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;YAEnC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;YAC3C,CAAC;iBAAM,CAAC;gBACN,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;oBAC5B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC3D,CAAC;YACH,CAAC;YAED,KAAK,CAAC,MAAM,EAAE,CAAA;QAChB,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"}
@@ -2,5 +2,6 @@ import { BaseDeployCommand } from '../src/base_command.ts';
2
2
  export default class ListRevisions extends BaseDeployCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
6
7
  }
@@ -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 { q, getPaths, ssh } from "../src/utils.js";
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
- const paths = getPaths(host.deployPath, ctx.release);
16
- const logFile = `${paths.cataConfig}/revisions.log`;
17
- this.logger.log(this.colors.bold(`\n# ${host.name}`));
18
- const { stdout } = await ssh(host, `set +e\n[ -f ${q(logFile)} ] && tail -10 ${q(logFile)} || true`);
19
- const lines = stdout.trim().split('\n').filter(Boolean).reverse();
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 (lines.length === 0) {
35
+ if (revisions.length === 0) {
23
36
  table.row(['no revisions', '', '', '', '']);
24
37
  }
25
38
  else {
26
- for (const line of lines) {
27
- try {
28
- const { release, branch, commit, user, date } = JSON.parse(line);
29
- table.row([
30
- release ?? '—',
31
- branch ?? '—',
32
- commit ? commit.slice(0, 7) : '—',
33
- user ?? '—',
34
- date ? new Date(date).toLocaleString() : '—',
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,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAClD,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;IAE5D,KAAK,CAAC,GAAG;QACP,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;QAEzB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACtC,IAAI,CAAC,KAAK;YAAE,OAAM;QAElB,KAAK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AI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG;qBAC7C,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;YAED,KAAK,CAAC,MAAM,EAAE,CAAA;QAChB,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;;AAjDO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;2CACnC"}
@@ -2,5 +2,6 @@ import { BaseCommand } from '@adonisjs/ace';
2
2
  export default class ListTasks extends BaseCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
6
7
  }
@@ -1,4 +1,13 @@
1
- import { BaseCommand } from '@adonisjs/ace';
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;AAC3C,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;IAErE,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,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,C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AAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;YACzE,UAAU,CAAC,MAAM,EAAE,CAAA;QACrB,CAAC;IACH,CAAC;;AA3BO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;uCACnC"}
@@ -2,5 +2,6 @@ import { BaseCommand } from '@adonisjs/ace';
2
2
  export default class ListPipeline extends BaseCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
6
7
  }
@@ -1,14 +1,31 @@
1
- import { BaseCommand } from '@adonisjs/ace';
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 { 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;AAC3C,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;IAE3D,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;QAE9B,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"}
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"}
@@ -2,5 +2,7 @@ import { BaseDeployCommand } from '../src/base_command.ts';
2
2
  export default class Status extends BaseDeployCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
7
+ private printStatus;
6
8
  }
@@ -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 { getCurrentRelease } from "../src/deployer.js";
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 pm = await detectPackageManager();
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
- const paths = getPaths(host.deployPath, ctx.release);
22
- this.logger.log(this.colors.bold(`\n# ${host.name}`));
23
- try {
24
- const current = await getCurrentRelease(ctx, host);
25
- this.logger.log(`Release ${current ? this.colors.cyan(current) : this.colors.dim('none')}`);
26
- if (getPipeline().includes('deploy:healthcheck')) {
27
- try {
28
- await ssh(host, `set -e\n${bin('curl')} --fail --silent --show-error --max-time 5 ${q(host.healthcheck?.url)} >/dev/null`);
29
- this.logger.log(`Health ${this.colors.green('OK')}`);
30
- }
31
- catch {
32
- this.logger.log(`Health ${this.colors.red('FAIL')}`);
33
- }
34
- }
35
- const { stdout: versionsStdout } = await ssh(host, `set +e\ncd ${q(paths.current)}\necho "NODE:$(${bin('node')} --version 2>/dev/null || true)"\necho "PM:$(${bin(pm)} --version 2>/dev/null || true)"`);
36
- const lines = versionsStdout.trim().split('\n');
37
- const nodeVersion = lines.find((l) => l.startsWith('NODE:'))?.slice(5) || '';
38
- const pmVersion = lines.find((l) => l.startsWith('PM:'))?.slice(3) || '';
39
- this.logger.log(`Node ${this.colors.dim(nodeVersion || 'unavailable')}`);
40
- this.logger.log(`${pm.padEnd(8)} ${this.colors.dim(pmVersion || 'unavailable')}`);
41
- for (const hook of hooks.getStatus()) {
42
- await hook(ctx, host, logger);
43
- }
44
- const { stdout: revStdout } = await ssh(host, `set +e\n[ -f ${q(paths.cataConfig + '/revisions.log')} ] && tail -1 ${q(paths.cataConfig + '/revisions.log')} || true`);
45
- const rev = revStdout.trim();
46
- if (rev) {
47
- try {
48
- const { branch, commit, user, date } = JSON.parse(rev);
49
- this.logger.log(`Branch ${this.colors.dim(branch ?? '—')}`);
50
- this.logger.log(`Commit ${this.colors.dim(commit ? commit.slice(0, 7) : '—')}`);
51
- this.logger.log(`By ${this.colors.dim(user ?? '—')}`);
52
- this.logger.log(`Date ${this.colors.dim(date ? new Date(date).toLocaleString() : '—')}`);
53
- }
54
- catch { }
55
- }
56
- const { stdout: lockStdout } = await ssh(host, `set +e\n[ -f ${q(paths.lock)} ] && cat ${q(paths.lock)} || true`);
57
- const lock = lockStdout.trim();
58
- this.logger.log(`Lock ${lock ? this.colors.yellow(lock) : this.colors.dim('none')}`);
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,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,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,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC9F,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,YAAY,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CACtF,CAAA;QACH,CAAC;IACH,CAAC;;AArEO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;oCACnC"}
@@ -2,5 +2,6 @@ import { BaseCommand } from '@adonisjs/ace';
2
2
  export default class Version extends BaseCommand {
3
3
  static commandName: string;
4
4
  static description: string;
5
+ json: boolean;
5
6
  run(): Promise<void>;
6
7
  }