@catapultjs/deploy 0.9.0 → 0.11.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/README.md +9 -1
- package/build/commands/list_revisions.js +12 -25
- package/build/commands/list_revisions.js.map +1 -1
- package/build/commands/status.d.ts +1 -0
- package/build/commands/status.js +36 -78
- package/build/commands/status.js.map +1 -1
- package/build/commands/version.js +3 -3
- 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/astro.js +9 -13
- package/build/recipes/astro.js.map +1 -1
- package/build/recipes/astro_static.d.ts +1 -0
- package/build/recipes/astro_static.js +11 -0
- package/build/recipes/astro_static.js.map +1 -0
- package/build/recipes/deploy/update_code.js +5 -4
- package/build/recipes/deploy/update_code.js.map +1 -1
- package/build/recipes/nestjs.d.ts +1 -0
- package/build/recipes/nestjs.js +5 -0
- package/build/recipes/nestjs.js.map +1 -0
- package/build/recipes/nextjs.d.ts +1 -0
- package/build/recipes/nextjs.js +20 -0
- package/build/recipes/nextjs.js.map +1 -0
- package/build/recipes/nextjs_static.d.ts +1 -0
- package/build/recipes/nextjs_static.js +8 -0
- package/build/recipes/nextjs_static.js.map +1 -0
- package/build/recipes/nuxt_static.d.ts +1 -0
- package/build/recipes/nuxt_static.js +8 -0
- package/build/recipes/nuxt_static.js.map +1 -0
- package/build/recipes/pm2.js +15 -14
- package/build/recipes/pm2.js.map +1 -1
- package/build/recipes/tanstack.d.ts +1 -0
- package/build/recipes/tanstack.js +5 -0
- package/build/recipes/tanstack.js.map +1 -0
- 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/deployer.d.ts +7 -1
- package/build/src/deployer.js +19 -1
- package/build/src/deployer.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 +16 -7
- package/skills/catapultjs/SKILL.md +41 -0
- package/skills/catapultjs/references/api.md +70 -0
- package/skills/catapultjs/references/cli.md +160 -0
- package/skills/catapultjs/references/config.md +194 -0
- package/skills/catapultjs/references/github-actions.md +99 -0
- package/skills/catapultjs/references/recipe.md +115 -0
- package/skills/catapultjs/references/recipes.md +596 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://nodejs.org)
|
|
5
5
|
[](https://github.com/catapultjs/deploy/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
A Capistrano-style deployment tool for Node.js — versioned releases, shared directories, composable task pipeline, automatic rollback. No agent, no server-side dependency, just SSH.
|
|
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
8
|
|
|
9
9
|
Full documentation at **https://catapultjs.com/**
|
|
10
10
|
|
|
@@ -87,6 +87,14 @@ npx cata deploy
|
|
|
87
87
|
- Node.js >= 24 on the machine running Catapult
|
|
88
88
|
- SSH key-based access to the target servers
|
|
89
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
|
+
```
|
|
97
|
+
|
|
90
98
|
## Contributing a recipe
|
|
91
99
|
|
|
92
100
|
If you've written a recipe that could be useful to others, open a pull request and add it to the [`contrib/`](https://github.com/catapultjs/deploy/tree/main/contrib) directory.
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { flags } from '@adonisjs/ace';
|
|
11
11
|
import { Context } from "../src/context.js";
|
|
12
|
-
import {
|
|
12
|
+
import { getRevisions } from "../src/deployer.js";
|
|
13
13
|
import { BaseDeployCommand } from "../src/base_command.js";
|
|
14
14
|
export default class ListRevisions extends BaseDeployCommand {
|
|
15
15
|
static commandName = 'list:revisions';
|
|
@@ -23,41 +23,28 @@ export default class ListRevisions extends BaseDeployCommand {
|
|
|
23
23
|
for (const host of hosts) {
|
|
24
24
|
if (!(await this.ensureHostSetup(ctx, host)))
|
|
25
25
|
continue;
|
|
26
|
-
const paths = getPaths(host.deployPath, ctx.release);
|
|
27
|
-
const logFile = `${paths.cataConfig}/revisions.log`;
|
|
28
26
|
if (!this.json)
|
|
29
27
|
this.logger.log(this.colors.bold(`\n# ${host.name}`));
|
|
30
|
-
const
|
|
31
|
-
const lines = stdout.trim().split('\n').filter(Boolean).reverse();
|
|
28
|
+
const revisions = await getRevisions(ctx, host);
|
|
32
29
|
if (this.json) {
|
|
33
|
-
const revisions = [];
|
|
34
|
-
for (const line of lines) {
|
|
35
|
-
try {
|
|
36
|
-
revisions.push(JSON.parse(line));
|
|
37
|
-
}
|
|
38
|
-
catch { }
|
|
39
|
-
}
|
|
40
30
|
report.push({ name: host.name, revisions });
|
|
41
31
|
continue;
|
|
42
32
|
}
|
|
43
33
|
const table = this.ui.table();
|
|
44
34
|
table.head(['Release', 'Branch', 'Commit', 'By', 'Date']);
|
|
45
|
-
if (
|
|
35
|
+
if (revisions.length === 0) {
|
|
46
36
|
table.row(['no revisions', '', '', '', '']);
|
|
47
37
|
}
|
|
48
38
|
else {
|
|
49
|
-
for (const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]);
|
|
59
|
-
}
|
|
60
|
-
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
|
+
]);
|
|
61
48
|
}
|
|
62
49
|
}
|
|
63
50
|
table.render();
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,I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AI,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"}
|
package/build/commands/status.js
CHANGED
|
@@ -8,13 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { flags } from '@adonisjs/ace';
|
|
11
|
-
import { Context } from "../src/context.js";
|
|
12
|
-
import { getCurrentRelease } from "../src/deployer.js";
|
|
13
|
-
import { bin } from "../src/task.js";
|
|
14
|
-
import { getPipeline } from "../src/pipeline.js";
|
|
15
|
-
import { hooks } from "../src/pipeline/hooks.js";
|
|
16
|
-
import { q, getPaths, ssh, detectPackageManager } from "../src/utils.js";
|
|
17
11
|
import { MemoryRenderer } from '@poppinss/cliui';
|
|
12
|
+
import { Context } from "../src/context.js";
|
|
13
|
+
import { collectHostStatus, HOST_STATUS_FIELDS } from "../src/status.js";
|
|
18
14
|
import { BaseDeployCommand } from "../src/base_command.js";
|
|
19
15
|
import { CatapultLogger, logger } from "../src/logger.js";
|
|
20
16
|
export default class Status extends BaseDeployCommand {
|
|
@@ -25,91 +21,53 @@ export default class Status extends BaseDeployCommand {
|
|
|
25
21
|
const hosts = await this.selectHosts({ all: this.json });
|
|
26
22
|
if (!hosts)
|
|
27
23
|
return;
|
|
28
|
-
const pm = await detectPackageManager();
|
|
29
|
-
const report = [];
|
|
30
24
|
const hookLogger = this.json ? new CatapultLogger() : logger;
|
|
31
25
|
if (this.json)
|
|
32
26
|
hookLogger.useRenderer(new MemoryRenderer());
|
|
27
|
+
const report = [];
|
|
33
28
|
for (const host of hosts) {
|
|
34
29
|
if (!(await this.ensureHostSetup(ctx, host)))
|
|
35
30
|
continue;
|
|
36
|
-
const paths = getPaths(host.deployPath, ctx.release);
|
|
37
|
-
const status = { name: host.name };
|
|
38
|
-
report.push(status);
|
|
39
31
|
if (!this.json)
|
|
40
32
|
this.logger.log(this.colors.bold(`\n# ${host.name}`));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (getPipeline().includes('deploy:healthcheck')) {
|
|
48
|
-
try {
|
|
49
|
-
await ssh(host, `set -e\n${bin('curl')} --fail --silent --show-error --max-time 5 ${q(host.healthcheck?.url)} >/dev/null`);
|
|
50
|
-
status.health = 'ok';
|
|
51
|
-
if (!this.json)
|
|
52
|
-
this.logger.log(`Health ${this.colors.green('OK')}`);
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
status.health = 'fail';
|
|
56
|
-
if (!this.json)
|
|
57
|
-
this.logger.log(`Health ${this.colors.red('FAIL')}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
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)"`);
|
|
61
|
-
const lines = versionsStdout.trim().split('\n');
|
|
62
|
-
const nodeVersion = lines.find((l) => l.startsWith('NODE:'))?.slice(5) || '';
|
|
63
|
-
const pmVersion = lines.find((l) => l.startsWith('PM:'))?.slice(3) || '';
|
|
64
|
-
status.node = nodeVersion || null;
|
|
65
|
-
status.packageManager = { name: pm, version: pmVersion || null };
|
|
66
|
-
if (!this.json) {
|
|
67
|
-
this.logger.log(`Node ${this.colors.dim(nodeVersion || 'unavailable')}`);
|
|
68
|
-
this.logger.log(`${pm.padEnd(8)} ${this.colors.dim(pmVersion || 'unavailable')}`);
|
|
69
|
-
}
|
|
70
|
-
for (const hook of hooks.getStatus()) {
|
|
71
|
-
const data = await hook(ctx, host, hookLogger);
|
|
72
|
-
if (!data)
|
|
73
|
-
continue;
|
|
74
|
-
Object.assign(status, data);
|
|
75
|
-
if (!this.json) {
|
|
76
|
-
for (const [key, value] of Object.entries(data)) {
|
|
77
|
-
this.logger.log(`${key.padEnd(8)} ${this.colors.dim(String(value))}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const { stdout: revStdout } = await ssh(host, `set +e\n[ -f ${q(paths.cataConfig + '/revisions.log')} ] && tail -1 ${q(paths.cataConfig + '/revisions.log')} || true`);
|
|
82
|
-
const rev = revStdout.trim();
|
|
83
|
-
if (rev) {
|
|
84
|
-
try {
|
|
85
|
-
const revision = JSON.parse(rev);
|
|
86
|
-
const { branch, commit, user, date } = revision;
|
|
87
|
-
status.revision = revision;
|
|
88
|
-
if (!this.json) {
|
|
89
|
-
this.logger.log(`Branch ${this.colors.dim(branch ?? '—')}`);
|
|
90
|
-
this.logger.log(`Commit ${this.colors.dim(commit ? commit.slice(0, 7) : '—')}`);
|
|
91
|
-
this.logger.log(`By ${this.colors.dim(user ?? '—')}`);
|
|
92
|
-
this.logger.log(`Date ${this.colors.dim(date ? new Date(date).toLocaleString() : '—')}`);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
catch { }
|
|
96
|
-
}
|
|
97
|
-
const { stdout: lockStdout } = await ssh(host, `set +e\n[ -f ${q(paths.lock)} ] && cat ${q(paths.lock)} || true`);
|
|
98
|
-
const lock = lockStdout.trim();
|
|
99
|
-
status.lock = lock || null;
|
|
100
|
-
if (!this.json) {
|
|
101
|
-
this.logger.log(`Lock ${lock ? this.colors.yellow(lock) : this.colors.dim('none')}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
status.error = error.message;
|
|
106
|
-
this.logger.error(`status error: ${error.message}`);
|
|
107
|
-
}
|
|
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);
|
|
108
39
|
}
|
|
109
40
|
if (this.json) {
|
|
110
41
|
this.logger.log(JSON.stringify({ hosts: report }, null, 2));
|
|
111
42
|
}
|
|
112
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')}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
113
71
|
}
|
|
114
72
|
__decorate([
|
|
115
73
|
flags.boolean({ description: 'Output result as JSON' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../commands/status.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,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,kBAAkB,CAAA;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,iBAAiB;IACnD,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;IAC7B,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAA;IAKzC,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;QAGlB,MAAM,UAAU,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ata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { BaseCommand, flags } from '@adonisjs/ace';
|
|
11
|
-
import { readFile } from 'fs/promises';
|
|
12
|
-
import { resolve, dirname } from 'path';
|
|
13
|
-
import { fileURLToPath } from 'url';
|
|
11
|
+
import { readFile } from 'node:fs/promises';
|
|
12
|
+
import { resolve, dirname } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
14
|
export default class Version extends BaseCommand {
|
|
15
15
|
static commandName = 'version';
|
|
16
16
|
static description = 'Show the current version';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../commands/version.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../commands/version.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW;IAC9C,MAAM,CAAC,WAAW,GAAG,SAAS,CAAA;IAC9B,MAAM,CAAC,WAAW,GAAG,0BAA0B,CAAA;IAK/C,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAA;QACtF,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;QAExD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YAClE,OAAM;QACR,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;;AAZO;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;qCACnC"}
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -5,4 +5,7 @@ export * from "./src/task.js";
|
|
|
5
5
|
export * from "./src/pipeline.js";
|
|
6
6
|
export * from "./src/package_manager.js";
|
|
7
7
|
export * from "./src/define_config.js";
|
|
8
|
+
export * from "./src/deployer.js";
|
|
9
|
+
export * from "./src/status.js";
|
|
10
|
+
export { Catapult } from "./src/api.js";
|
|
8
11
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA"}
|
package/build/recipes/astro.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { task, desc,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { task, desc, cd, run, get, set, after, pmExec } from "../index.js";
|
|
2
|
+
set('astro_path', get('source_path', ''));
|
|
3
|
+
desc('Builds the Astro application on the remote server');
|
|
4
|
+
task('deploy:build', () => {
|
|
5
|
+
const astroPath = get('astro_path');
|
|
6
|
+
cd(`{{release_path}}/${astroPath}`);
|
|
7
|
+
run(`${pmExec('astro')} build`);
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const source = get('source_path', './dist/.');
|
|
12
|
-
await upload(source, paths.release);
|
|
13
|
-
});
|
|
14
|
-
before('deploy:lock', 'deploy:build');
|
|
9
|
+
after('deploy:update_code', 'deploy:install');
|
|
10
|
+
after('deploy:shared', 'deploy:build');
|
|
15
11
|
//# sourceMappingURL=astro.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro.js","sourceRoot":"","sources":["../../recipes/astro.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"astro.js","sourceRoot":"","sources":["../../recipes/astro.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAE1E,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAA;AAEzC,IAAI,CAAC,mDAAmD,CAAC,CAAA;AACzD,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE;IACxB,MAAM,SAAS,GAAG,GAAG,CAAS,YAAY,CAAC,CAAA;IAC3C,EAAE,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAA;IACnC,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACjC,CAAC,CAAC,CAAA;AAEF,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAA;AAC7C,KAAK,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { task, desc, local, get, set, before } from "../index.js";
|
|
2
|
+
import { resolveHostStringValue } from "../src/utils.js";
|
|
3
|
+
set('astro_mode', 'production');
|
|
4
|
+
set('source_path', './dist/.');
|
|
5
|
+
desc('Builds the Astro application locally');
|
|
6
|
+
task('deploy:build', async ({ host }) => {
|
|
7
|
+
const mode = resolveHostStringValue(get('astro_mode'), host, 'astro_mode');
|
|
8
|
+
await local(`astro build --mode ${mode}`);
|
|
9
|
+
});
|
|
10
|
+
before('deploy:lock', 'deploy:build');
|
|
11
|
+
//# sourceMappingURL=astro_static.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro_static.js","sourceRoot":"","sources":["../../recipes/astro_static.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAC/B,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAE9B,IAAI,CAAC,sCAAsC,CAAC,CAAA;AAC5C,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,EAAE,IAAI,EAAe,EAAE,EAAE;IACnD,MAAM,IAAI,GAAG,sBAAsB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;IAC1E,MAAM,KAAK,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { task, desc } from "../../index.js";
|
|
2
|
-
desc('
|
|
3
|
-
task('deploy:update_code', () => {
|
|
4
|
-
|
|
1
|
+
import { task, desc, get, upload } from "../../index.js";
|
|
2
|
+
desc('Uploads local artifacts to the release directory');
|
|
3
|
+
task('deploy:update_code', async ({ paths }) => {
|
|
4
|
+
const source = get('source_path', './.');
|
|
5
|
+
await upload(source, paths.release);
|
|
5
6
|
});
|
|
6
7
|
//# sourceMappingURL=update_code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_code.js","sourceRoot":"","sources":["../../../recipes/deploy/update_code.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"update_code.js","sourceRoot":"","sources":["../../../recipes/deploy/update_code.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAQ1E,IAAI,CAAC,kDAAkD,CAAC,CAAA;AACxD,IAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAe,EAAE,EAAE;IAC1D,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACxC,MAAM,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AACrC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../recipes/nestjs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,GAAG,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AAE7B,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAA;AAC7C,KAAK,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { task, desc, run, get, set, cd, after, pmExec } from "../index.js";
|
|
2
|
+
set('shared_files', ['.env']);
|
|
3
|
+
set('nextjs_path', get('source_path', ''));
|
|
4
|
+
set('nextjs_out_path', '.next/standalone/');
|
|
5
|
+
desc('Builds the Next.js app');
|
|
6
|
+
task('deploy:build', () => {
|
|
7
|
+
const nextjsPath = get('nextjs_path');
|
|
8
|
+
cd(`{{release_path}}/${nextjsPath}`);
|
|
9
|
+
run(`${pmExec('next')} build`);
|
|
10
|
+
const nextjsOutPath = get('nextjs_out_path');
|
|
11
|
+
run(`
|
|
12
|
+
if [ -d {{release_path}}/${nextjsOutPath} ]; then
|
|
13
|
+
ln -sfn {{release_path}}/public {{release_path}}/${nextjsOutPath}
|
|
14
|
+
ln -sfn {{release_path}}/.next/static {{release_path}}/${nextjsOutPath}.next/
|
|
15
|
+
fi
|
|
16
|
+
`);
|
|
17
|
+
});
|
|
18
|
+
after('deploy:update_code', 'deploy:install');
|
|
19
|
+
after('deploy:shared', 'deploy:build');
|
|
20
|
+
//# sourceMappingURL=nextjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../recipes/nextjs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAE1E,GAAG,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AAC7B,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAA;AAC1C,GAAG,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAA;AAE3C,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC9B,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE;IACxB,MAAM,UAAU,GAAG,GAAG,CAAS,aAAa,CAAC,CAAA;IAC7C,EAAE,CAAC,oBAAoB,UAAU,EAAE,CAAC,CAAA;IACpC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAE9B,MAAM,aAAa,GAAG,GAAG,CAAS,iBAAiB,CAAC,CAAA;IACpD,GAAG,CAAC;+BACyB,aAAa;yDACa,aAAa;+DACP,aAAa;;GAEzE,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAA;AAC7C,KAAK,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { task, desc, set, before, local } from "../index.js";
|
|
2
|
+
set('source_path', './out/.');
|
|
3
|
+
desc('Builds the Next.js application locally');
|
|
4
|
+
task('deploy:build', async () => {
|
|
5
|
+
await local('next build');
|
|
6
|
+
});
|
|
7
|
+
before('deploy:lock', 'deploy:build');
|
|
8
|
+
//# sourceMappingURL=nextjs_static.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nextjs_static.js","sourceRoot":"","sources":["../../recipes/nextjs_static.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE5D,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;AAE7B,IAAI,CAAC,wCAAwC,CAAC,CAAA;AAC9C,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,KAAK,CAAC,YAAY,CAAC,CAAA;AAC3B,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { task, desc, set, before, local } from "../index.js";
|
|
2
|
+
set('source_path', './.output/public/.');
|
|
3
|
+
desc('Builds the Nuxt application locally');
|
|
4
|
+
task('deploy:build', async () => {
|
|
5
|
+
await local(`nuxt generate`);
|
|
6
|
+
});
|
|
7
|
+
before('deploy:lock', 'deploy:build');
|
|
8
|
+
//# sourceMappingURL=nuxt_static.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt_static.js","sourceRoot":"","sources":["../../recipes/nuxt_static.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE5D,GAAG,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAA;AAExC,IAAI,CAAC,qCAAqC,CAAC,CAAA;AAC3C,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,KAAK,CAAC,eAAe,CAAC,CAAA;AAC9B,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
|
package/build/recipes/pm2.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
1
|
import { task, desc, cd, run, after, onStatus, bin } from "../index.js";
|
|
3
2
|
import { ssh, q } from "../src/utils.js";
|
|
4
3
|
onStatus(async (_ctx, host) => {
|
|
@@ -42,10 +41,12 @@ task('pm2:delete', async () => {
|
|
|
42
41
|
});
|
|
43
42
|
desc('Displays the last 50 lines of logs for all apps');
|
|
44
43
|
task('pm2:logs', async ({ host, paths, logger }) => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
const { stdout } = await ssh(host, `
|
|
45
|
+
set -e
|
|
46
|
+
cd ${q(paths.current)}
|
|
47
|
+
names=$(${bin('node')} -e "const e=require('./ecosystem.config.cjs'); console.log((e.apps||[]).map((a)=>a.name).join(' '))")
|
|
48
|
+
${bin('pm2')} logs $names --nostream --lines 50
|
|
49
|
+
`, { color: true });
|
|
49
50
|
logger.log(stdout.trim());
|
|
50
51
|
});
|
|
51
52
|
desc('Lists all PM2 processes');
|
|
@@ -57,15 +58,15 @@ task('pm2:list', async ({ host, paths, logger }) => {
|
|
|
57
58
|
});
|
|
58
59
|
desc('Shows detailed info for each app in ecosystem.config.cjs');
|
|
59
60
|
task('pm2:show', async ({ host, paths, logger }) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
const { stdout } = await ssh(host, `
|
|
62
|
+
set -e
|
|
63
|
+
cd ${q(paths.current)}
|
|
64
|
+
names=$(${bin('node')} -e "const e=require('./ecosystem.config.cjs'); console.log((e.apps||[]).map((a)=>a.name).join(' '))")
|
|
65
|
+
for name in $names; do
|
|
66
|
+
${bin('pm2')} show "$name"
|
|
67
|
+
done
|
|
68
|
+
`, { color: true });
|
|
69
|
+
logger.log(stdout.trim());
|
|
69
70
|
});
|
|
70
71
|
after('deploy:publish', 'pm2:startOrReload');
|
|
71
72
|
after('pm2:startOrReload', 'pm2:save');
|
package/build/recipes/pm2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pm2.js","sourceRoot":"","sources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