@secretstartups/workshop 0.2.0 → 0.4.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 (58) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/README.md +72 -6
  3. package/dist/app.module.js +8 -0
  4. package/dist/app.module.js.map +1 -1
  5. package/dist/auth/commands/logout.command.js +5 -0
  6. package/dist/auth/commands/logout.command.js.map +1 -1
  7. package/dist/auth/commands/status.command.js +6 -0
  8. package/dist/auth/commands/status.command.js.map +1 -1
  9. package/dist/cluster/commands/cluster-create.command.d.ts +4 -0
  10. package/dist/cluster/commands/cluster-create.command.js +26 -1
  11. package/dist/cluster/commands/cluster-create.command.js.map +1 -1
  12. package/dist/common/api/api.service.js +2 -0
  13. package/dist/common/api/api.service.js.map +1 -1
  14. package/dist/common/config/cli-config.service.d.ts +2 -0
  15. package/dist/common/config/cli-config.service.js +16 -1
  16. package/dist/common/config/cli-config.service.js.map +1 -1
  17. package/dist/drift/drift-api.d.ts +70 -0
  18. package/dist/drift/drift-api.js +67 -0
  19. package/dist/drift/drift-api.js.map +1 -0
  20. package/dist/drift/drift.commands.d.ts +43 -0
  21. package/dist/drift/drift.commands.js +294 -0
  22. package/dist/drift/drift.commands.js.map +1 -0
  23. package/dist/drift/drift.module.d.ts +2 -0
  24. package/dist/drift/drift.module.js +20 -0
  25. package/dist/drift/drift.module.js.map +1 -0
  26. package/dist/preview/git.d.ts +8 -0
  27. package/dist/preview/git.js +99 -0
  28. package/dist/preview/git.js.map +1 -0
  29. package/dist/preview/preview.commands.d.ts +117 -0
  30. package/dist/preview/preview.commands.js +610 -0
  31. package/dist/preview/preview.commands.js.map +1 -0
  32. package/dist/runbooks/runbooks.commands.d.ts +69 -0
  33. package/dist/runbooks/runbooks.commands.js +272 -0
  34. package/dist/runbooks/runbooks.commands.js.map +1 -0
  35. package/dist/runners/commands/groups.commands.d.ts +55 -0
  36. package/dist/runners/commands/groups.commands.js +260 -0
  37. package/dist/runners/commands/groups.commands.js.map +1 -0
  38. package/dist/runners/commands/install.commands.d.ts +36 -0
  39. package/dist/runners/commands/install.commands.js +192 -0
  40. package/dist/runners/commands/install.commands.js.map +1 -0
  41. package/dist/runners/commands/jobs.commands.d.ts +38 -0
  42. package/dist/runners/commands/jobs.commands.js +206 -0
  43. package/dist/runners/commands/jobs.commands.js.map +1 -0
  44. package/dist/runners/runners-api.d.ts +94 -0
  45. package/dist/runners/runners-api.js +110 -0
  46. package/dist/runners/runners-api.js.map +1 -0
  47. package/dist/runners/runners.module.d.ts +6 -0
  48. package/dist/runners/runners.module.js +58 -0
  49. package/dist/runners/runners.module.js.map +1 -0
  50. package/dist/service/commands/service-build.command.d.ts +29 -0
  51. package/dist/service/commands/service-build.command.js +148 -0
  52. package/dist/service/commands/service-build.command.js.map +1 -0
  53. package/dist/service/commands/service.command.js +5 -0
  54. package/dist/service/commands/service.command.js.map +1 -1
  55. package/dist/service/service.module.js +3 -0
  56. package/dist/service/service.module.js.map +1 -1
  57. package/dist/tsconfig.build.tsbuildinfo +1 -1
  58. package/package.json +1 -1
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RunnersApi = exports.TERMINAL = void 0;
4
+ exports.ago = ago;
5
+ exports.TERMINAL = ['succeeded', 'failed', 'cancelled', 'lost'];
6
+ class RunnersApi {
7
+ constructor(api, config, orgOverride) {
8
+ this.api = api;
9
+ this.config = config;
10
+ this.orgOverride = orgOverride;
11
+ }
12
+ base() {
13
+ const orgId = this.orgOverride ?? this.config.getCurrentOrgId();
14
+ if (!orgId) {
15
+ throw new Error('No organization selected. Run `workshop org use <id>` or pass --org <id>.');
16
+ }
17
+ return `/organizations/${orgId}/runner-groups`;
18
+ }
19
+ async listGroups() {
20
+ return (this.unwrap(await this.api.get(this.base())) ?? []);
21
+ }
22
+ async createGroup(input) {
23
+ return this.unwrap(await this.api.post(this.base(), input));
24
+ }
25
+ async deleteGroup(groupId) {
26
+ this.unwrap(await this.api.delete(`${this.base()}/${groupId}`));
27
+ }
28
+ async updateGroup(groupId, input) {
29
+ return this.unwrap(await this.api.patch(`${this.base()}/${groupId}`, input));
30
+ }
31
+ async setDefault(groupId) {
32
+ return this.unwrap(await this.api.post(`${this.base()}/${groupId}/default`));
33
+ }
34
+ async listRunners(groupId) {
35
+ return this.unwrap(await this.api.get(`${this.base()}/${groupId}/runners`)) ?? [];
36
+ }
37
+ async createToken(groupId, input) {
38
+ return this.unwrap(await this.api.post(`${this.base()}/${groupId}/registration-tokens`, input));
39
+ }
40
+ async listJobs(groupId, status) {
41
+ return (this.unwrap(await this.api.get(`${this.base()}/${groupId}/jobs`, status ? { status } : undefined)) ?? []);
42
+ }
43
+ async getJob(groupId, jobId) {
44
+ return this.unwrap(await this.api.get(`${this.base()}/${groupId}/jobs/${jobId}`));
45
+ }
46
+ async createJob(groupId, body) {
47
+ return this.unwrap(await this.api.post(`${this.base()}/${groupId}/jobs`, body));
48
+ }
49
+ async cancelJob(groupId, jobId) {
50
+ return this.unwrap(await this.api.post(`${this.base()}/${groupId}/jobs/${jobId}/cancel`));
51
+ }
52
+ async followLogs(groupId, jobId) {
53
+ const stream = await this.api.getStream(`${this.base()}/${groupId}/jobs/${jobId}/logs/stream`);
54
+ let buffer = '';
55
+ let result = null;
56
+ return new Promise((resolve, reject) => {
57
+ stream.on('data', (chunk) => {
58
+ buffer += chunk.toString('utf8');
59
+ let boundary;
60
+ while ((boundary = buffer.indexOf('\n\n')) >= 0) {
61
+ const block = buffer.slice(0, boundary);
62
+ buffer = buffer.slice(boundary + 2);
63
+ const data = block
64
+ .split('\n')
65
+ .filter((l) => l.startsWith('data: '))
66
+ .map((l) => l.slice(6))
67
+ .join('\n');
68
+ if (!data)
69
+ continue;
70
+ try {
71
+ const msg = JSON.parse(data);
72
+ if (msg.type === 'done') {
73
+ result = !!msg.success;
74
+ }
75
+ else if (msg.type === 'log') {
76
+ (msg.stream === 'stdout' ? process.stdout : process.stderr).write(`${msg.line}\n`);
77
+ }
78
+ }
79
+ catch {
80
+ }
81
+ }
82
+ });
83
+ stream.on('end', () => resolve(result));
84
+ stream.on('error', reject);
85
+ });
86
+ }
87
+ unwrap(response) {
88
+ if (response && typeof response === 'object' && 'success' in response) {
89
+ if (!response.success) {
90
+ throw new Error(response.message || 'Request failed');
91
+ }
92
+ return response.data;
93
+ }
94
+ return response;
95
+ }
96
+ }
97
+ exports.RunnersApi = RunnersApi;
98
+ function ago(iso) {
99
+ if (!iso)
100
+ return '—';
101
+ const s = Math.round((Date.now() - new Date(iso).getTime()) / 1000);
102
+ if (s < 60)
103
+ return `${s}s ago`;
104
+ if (s < 3600)
105
+ return `${Math.round(s / 60)}m ago`;
106
+ if (s < 86400)
107
+ return `${Math.round(s / 3600)}h ago`;
108
+ return `${Math.round(s / 86400)}d ago`;
109
+ }
110
+ //# sourceMappingURL=runners-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runners-api.js","sourceRoot":"","sources":["../../src/runners/runners-api.ts"],"names":[],"mappings":";;;AAuLA,kBAOC;AAvIY,QAAA,QAAQ,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAMrE,MAAa,UAAU;IACrB,YACmB,GAAe,EACf,MAAwB,EACxB,WAAoB;QAFpB,QAAG,GAAH,GAAG,CAAY;QACf,WAAM,GAAN,MAAM,CAAkB;QACxB,gBAAW,GAAX,WAAW,CAAS;IACpC,CAAC;IAEJ,IAAI;QACF,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAChE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,kBAAkB,KAAK,gBAAgB,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,CAAC,IAAI,CA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GAAG,IAAI,CAAC,OAAO,CAAC;IACrD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;AACzC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CommandRunner } from 'nest-commander';
2
+ export declare class RunnersRootCommand extends CommandRunner {
3
+ run(): Promise<void>;
4
+ }
5
+ export declare class RunnersModule {
6
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RunnersModule = exports.RunnersRootCommand = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const nest_commander_1 = require("nest-commander");
12
+ const groups_commands_1 = require("./commands/groups.commands");
13
+ const install_commands_1 = require("./commands/install.commands");
14
+ const jobs_commands_1 = require("./commands/jobs.commands");
15
+ let RunnersRootCommand = class RunnersRootCommand extends nest_commander_1.CommandRunner {
16
+ async run() {
17
+ console.log('Usage: workshop runners <subcommand>\n');
18
+ console.log(' groups list|create|delete Manage runner groups');
19
+ console.log(' list <groupId> List the runners in a group');
20
+ console.log(' install <groupId> Install a runner into the current kubectl context');
21
+ console.log(' token create <groupId> Create a registration token (shown once)');
22
+ console.log(' jobs list|run|logs|cancel Run and inspect jobs');
23
+ }
24
+ };
25
+ exports.RunnersRootCommand = RunnersRootCommand;
26
+ exports.RunnersRootCommand = RunnersRootCommand = __decorate([
27
+ (0, nest_commander_1.Command)({
28
+ name: 'runners',
29
+ description: 'Run Workshop jobs on runners installed in your own clusters',
30
+ subCommands: [groups_commands_1.GroupsCommand, groups_commands_1.RunnersListCommand, install_commands_1.RunnerTokenCommand, install_commands_1.RunnerInstallCommand, jobs_commands_1.JobsCommand],
31
+ })
32
+ ], RunnersRootCommand);
33
+ let RunnersModule = class RunnersModule {
34
+ };
35
+ exports.RunnersModule = RunnersModule;
36
+ exports.RunnersModule = RunnersModule = __decorate([
37
+ (0, common_1.Module)({
38
+ providers: [
39
+ RunnersRootCommand,
40
+ groups_commands_1.GroupsCommand,
41
+ groups_commands_1.GroupsListCommand,
42
+ groups_commands_1.GroupsCreateCommand,
43
+ groups_commands_1.GroupsDeleteCommand,
44
+ groups_commands_1.GroupsSetDefaultCommand,
45
+ groups_commands_1.GroupsUpdateCommand,
46
+ groups_commands_1.RunnersListCommand,
47
+ install_commands_1.RunnerTokenCommand,
48
+ install_commands_1.TokenCreateCommand,
49
+ install_commands_1.RunnerInstallCommand,
50
+ jobs_commands_1.JobsCommand,
51
+ jobs_commands_1.JobsListCommand,
52
+ jobs_commands_1.JobsRunCommand,
53
+ jobs_commands_1.JobsLogsCommand,
54
+ jobs_commands_1.JobsCancelCommand,
55
+ ],
56
+ })
57
+ ], RunnersModule);
58
+ //# sourceMappingURL=runners.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runners.module.js","sourceRoot":"","sources":["../../src/runners/runners.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mDAAwD;AACxD,gEAQoC;AACpC,kEAA2G;AAC3G,4DAMkC;AAO3B,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,8BAAa;IACnD,KAAK,CAAC,GAAG;QACP,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,sFAAsF,CAAC,CAAC;QACpG,OAAO,CAAC,GAAG,CAAC,6EAA6E,CAAC,CAAC;QAC3F,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACxE,CAAC;CACF,CAAA;AATY,gDAAkB;6BAAlB,kBAAkB;IAL9B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,6DAA6D;QAC1E,WAAW,EAAE,CAAC,+BAAa,EAAE,oCAAkB,EAAE,qCAAkB,EAAE,uCAAoB,EAAE,2BAAW,CAAC;KACxG,CAAC;GACW,kBAAkB,CAS9B;AAsBM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IApBzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT,kBAAkB;YAClB,+BAAa;YACb,mCAAiB;YACjB,qCAAmB;YACnB,qCAAmB;YACnB,yCAAuB;YACvB,qCAAmB;YACnB,oCAAkB;YAClB,qCAAkB;YAClB,qCAAkB;YAClB,uCAAoB;YACpB,2BAAW;YACX,+BAAe;YACf,8BAAc;YACd,+BAAe;YACf,iCAAiB;SAClB;KACF,CAAC;GACW,aAAa,CAAG"}
@@ -0,0 +1,29 @@
1
+ import { CommandRunner } from 'nest-commander';
2
+ import { ApiService } from '../../common/api/api.service';
3
+ import { OutputService } from '../../common/output/output.service';
4
+ import { CliConfigService } from '../../common/config/cli-config.service';
5
+ interface Options {
6
+ org?: string;
7
+ json?: boolean;
8
+ ref?: string;
9
+ follow?: boolean;
10
+ }
11
+ declare abstract class BuildCommand extends CommandRunner {
12
+ protected readonly api: ApiService;
13
+ protected readonly output: OutputService;
14
+ protected readonly config: CliConfigService;
15
+ constructor(api: ApiService, output: OutputService, config: CliConfigService);
16
+ protected base(options: Options, serviceId: string): string;
17
+ protected unwrap<T>(response: any): T;
18
+ parseOrg(val: string): string;
19
+ parseJson(): boolean;
20
+ }
21
+ export declare class ServiceBuildCommand extends BuildCommand {
22
+ run([serviceId]: string[], options: Options): Promise<void>;
23
+ parseRef(val: string): string;
24
+ parseFollow(): boolean;
25
+ }
26
+ export declare class ServiceBuildsCommand extends BuildCommand {
27
+ run([serviceId]: string[], options: Options): Promise<void>;
28
+ }
29
+ export {};
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ServiceBuildsCommand = exports.ServiceBuildCommand = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const nest_commander_1 = require("nest-commander");
15
+ const api_service_1 = require("../../common/api/api.service");
16
+ const output_service_1 = require("../../common/output/output.service");
17
+ const cli_config_service_1 = require("../../common/config/cli-config.service");
18
+ const runners_api_1 = require("../../runners/runners-api");
19
+ let BuildCommand = class BuildCommand extends nest_commander_1.CommandRunner {
20
+ constructor(api, output, config) {
21
+ super();
22
+ this.api = api;
23
+ this.output = output;
24
+ this.config = config;
25
+ }
26
+ base(options, serviceId) {
27
+ const orgId = options.org ?? this.config.getCurrentOrgId();
28
+ if (!orgId)
29
+ throw new Error('No organization selected. Run `workshop org use <id>` or pass --org <id>.');
30
+ return `/organizations/${orgId}/services/${serviceId}`;
31
+ }
32
+ unwrap(response) {
33
+ if (response && typeof response === 'object' && 'success' in response) {
34
+ if (!response.success)
35
+ throw new Error(response.message || 'Request failed');
36
+ return response.data;
37
+ }
38
+ return response;
39
+ }
40
+ parseOrg(val) {
41
+ return val;
42
+ }
43
+ parseJson() {
44
+ return true;
45
+ }
46
+ };
47
+ __decorate([
48
+ (0, nest_commander_1.Option)({ flags: '--org <orgId>', description: 'Organization ID (defaults to the active one)' }),
49
+ __metadata("design:type", Function),
50
+ __metadata("design:paramtypes", [String]),
51
+ __metadata("design:returntype", void 0)
52
+ ], BuildCommand.prototype, "parseOrg", null);
53
+ __decorate([
54
+ (0, nest_commander_1.Option)({ flags: '--json', description: 'Output as JSON' }),
55
+ __metadata("design:type", Function),
56
+ __metadata("design:paramtypes", []),
57
+ __metadata("design:returntype", void 0)
58
+ ], BuildCommand.prototype, "parseJson", null);
59
+ BuildCommand = __decorate([
60
+ (0, common_1.Injectable)(),
61
+ __metadata("design:paramtypes", [api_service_1.ApiService,
62
+ output_service_1.OutputService,
63
+ cli_config_service_1.CliConfigService])
64
+ ], BuildCommand);
65
+ let ServiceBuildCommand = class ServiceBuildCommand extends BuildCommand {
66
+ async run([serviceId], options) {
67
+ let build;
68
+ try {
69
+ build = this.unwrap(await this.api.post(`${this.base(options, serviceId)}/builds`, options.ref ? { ref: options.ref } : {}));
70
+ }
71
+ catch (err) {
72
+ return this.output.error(err.message);
73
+ }
74
+ if (options.json && !options.follow)
75
+ return this.output.json(build);
76
+ if (!options.follow) {
77
+ return this.output.success(`Building ${build.commitSha.slice(0, 7)} (${build.branch}) → ${build.imageRepository}:${build.imageTag.slice(0, 12)}…`);
78
+ }
79
+ console.error(`Building ${build.commitSha.slice(0, 7)} (${build.branch})…`);
80
+ const runners = new runners_api_1.RunnersApi(this.api, this.config, options.org);
81
+ await runners.followLogs(build.runnerGroupId, build.runnerJobId);
82
+ for (let i = 0; i < 15; i++) {
83
+ build = this.unwrap(await this.api.get(`${this.base(options, serviceId)}/builds/${build.id}`));
84
+ if (build.status !== 'running' && build.status !== 'queued')
85
+ break;
86
+ await new Promise((r) => setTimeout(r, 1000));
87
+ }
88
+ if (build.status !== 'succeeded') {
89
+ console.error(`\n✗ build ${build.status}${build.error ? `: ${build.error}` : ''}`);
90
+ process.exit(1);
91
+ }
92
+ console.error(`\n✓ built ${build.imageRepository}@${build.imageDigest ?? build.imageTag}`);
93
+ if (build.deployResult)
94
+ console.error(` ${build.deployResult}`);
95
+ process.exit(0);
96
+ }
97
+ parseRef(val) {
98
+ return val;
99
+ }
100
+ parseFollow() {
101
+ return true;
102
+ }
103
+ };
104
+ exports.ServiceBuildCommand = ServiceBuildCommand;
105
+ __decorate([
106
+ (0, nest_commander_1.Option)({ flags: '--ref <branch>', description: 'Branch to build (default: the service branch)' }),
107
+ __metadata("design:type", Function),
108
+ __metadata("design:paramtypes", [String]),
109
+ __metadata("design:returntype", void 0)
110
+ ], ServiceBuildCommand.prototype, "parseRef", null);
111
+ __decorate([
112
+ (0, nest_commander_1.Option)({ flags: '--follow', description: 'Stream the build log; exit 0 if it succeeds, 1 otherwise' }),
113
+ __metadata("design:type", Function),
114
+ __metadata("design:paramtypes", []),
115
+ __metadata("design:returntype", void 0)
116
+ ], ServiceBuildCommand.prototype, "parseFollow", null);
117
+ exports.ServiceBuildCommand = ServiceBuildCommand = __decorate([
118
+ (0, nest_commander_1.SubCommand)({
119
+ name: 'build',
120
+ arguments: '<serviceId>',
121
+ description: 'Build the service now on its Workshop runner group (needs "Build with: Workshop runners")',
122
+ })
123
+ ], ServiceBuildCommand);
124
+ let ServiceBuildsCommand = class ServiceBuildsCommand extends BuildCommand {
125
+ async run([serviceId], options) {
126
+ try {
127
+ const builds = this.unwrap(await this.api.get(`${this.base(options, serviceId)}/builds`));
128
+ if (options.json)
129
+ return this.output.json(builds);
130
+ this.output.table(['ID', 'Status', 'Commit', 'Trigger', 'Started', 'Result'], builds.map((b) => [
131
+ b.id,
132
+ b.status,
133
+ `${b.commitSha.slice(0, 7)} ${(b.commitMessage ?? '').split('\n')[0].slice(0, 40)}`,
134
+ b.trigger,
135
+ (0, runners_api_1.ago)(b.createdAt),
136
+ b.error ?? b.deployResult ?? '—',
137
+ ]));
138
+ }
139
+ catch (err) {
140
+ this.output.error(err.message);
141
+ }
142
+ }
143
+ };
144
+ exports.ServiceBuildsCommand = ServiceBuildsCommand;
145
+ exports.ServiceBuildsCommand = ServiceBuildsCommand = __decorate([
146
+ (0, nest_commander_1.SubCommand)({ name: 'builds', arguments: '<serviceId>', description: 'Recent builds of the service on Workshop runners' })
147
+ ], ServiceBuildsCommand);
148
+ //# sourceMappingURL=service-build.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-build.command.js","sourceRoot":"","sources":["../../../src/service/commands/service-build.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAmE;AACnE,8DAA0D;AAC1D,uEAAmE;AACnE,+EAA0E;AAC1E,2DAA4D;AA4B5D,IACe,YAAY,GAD3B,MACe,YAAa,SAAQ,8BAAa;IAC/C,YACqB,GAAe,EACf,MAAqB,EACrB,MAAwB;QAE3C,KAAK,EAAE,CAAC;QAJW,QAAG,GAAH,GAAG,CAAY;QACf,WAAM,GAAN,MAAM,CAAe;QACrB,WAAM,GAAN,MAAM,CAAkB;IAG7C,CAAC;IAES,IAAI,CAAC,OAAgB,EAAE,SAAiB;QAChD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3D,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QACzG,OAAO,kBAAkB,KAAK,aAAa,SAAS,EAAE,CAAC;IACzD,CAAC;IAES,MAAM,CAAI,QAAa;QAC/B,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;YACtE,IAAI,CAAC,QAAQ,CAAC,OAAO;gBAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,IAAI,gBAAgB,C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S,CAAC,SAAS,CAAC,CAAC,CAAC;YACxG,IAAI,OAAO,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClD,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,EAC1D,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBAChB,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,MAAM;gBACR,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;gBACnF,CAAC,CAAC,OAAO;gBACT,IAAA,iBAAG,EAAC,CAAC,CAAC,SAAS,CAAC;gBAChB,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,YAAY,IAAI,GAAG;aACjC,CAAC,CACH,CAAC;QACJ,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF,CAAA;AApBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,2BAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;GAC7G,oBAAoB,CAoBhC"}
@@ -19,6 +19,7 @@ const service_restart_command_1 = require("./service-restart.command");
19
19
  const service_rollback_command_1 = require("./service-rollback.command");
20
20
  const service_stop_command_1 = require("./service-stop.command");
21
21
  const service_setup_command_1 = require("./service-setup.command");
22
+ const service_build_command_1 = require("./service-build.command");
22
23
  let ServiceCommand = class ServiceCommand extends nest_commander_1.CommandRunner {
23
24
  async run() {
24
25
  console.log('Usage: workshop service <subcommand>\n');
@@ -33,6 +34,8 @@ let ServiceCommand = class ServiceCommand extends nest_commander_1.CommandRunner
33
34
  console.log(' restart <id> Restart a service');
34
35
  console.log(' rollback <id> Rollback to previous deployment');
35
36
  console.log(' stop <id> Stop a service');
37
+ console.log(' build <id> Build now on Workshop runners (--follow to stream)');
38
+ console.log(' builds <id> Recent runner builds');
36
39
  }
37
40
  };
38
41
  exports.ServiceCommand = ServiceCommand;
@@ -52,6 +55,8 @@ exports.ServiceCommand = ServiceCommand = __decorate([
52
55
  service_restart_command_1.ServiceRestartCommand,
53
56
  service_rollback_command_1.ServiceRollbackCommand,
54
57
  service_stop_command_1.ServiceStopCommand,
58
+ service_build_command_1.ServiceBuildCommand,
59
+ service_build_command_1.ServiceBuildsCommand,
55
60
  ],
56
61
  })
57
62
  ], ServiceCommand);
@@ -1 +1 @@
1
- {"version":3,"file":"service.command.js","sourceRoot":"","sources":["../../../src/service/commands/service.command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAwD;AACxD,iEAA4D;AAC5D,qEAAgE;AAChE,+DAA0D;AAC1D,qEAAgE;AAChE,qEAAgE;AAChE,qEAAgE;AAChE,iEAA4D;AAC5D,uEAAkE;AAClE,yEAAoE;AACpE,iEAA4D;AAC5D,mEAA8D;AAmBvD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,8BAAa;IAC/C,KAAK,CAAC,GAAG;QACP,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;IACpD,CAAC;CACF,CAAA;AAfY,wCAAc;yBAAd,cAAc;IAjB1B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE;YACX,2CAAmB;YACnB,yCAAkB;YAClB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,6CAAoB;YACpB,6CAAoB;YACpB,yCAAkB;YAClB,+CAAqB;YACrB,iDAAsB;YACtB,yCAAkB;SACnB;KACF,CAAC;GACW,cAAc,CAe1B"}
1
+ {"version":3,"file":"service.command.js","sourceRoot":"","sources":["../../../src/service/commands/service.command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAwD;AACxD,iEAA4D;AAC5D,qEAAgE;AAChE,+DAA0D;AAC1D,qEAAgE;AAChE,qEAAgE;AAChE,qEAAgE;AAChE,iEAA4D;AAC5D,uEAAkE;AAClE,yEAAoE;AACpE,iEAA4D;AAC5D,mEAA8D;AAC9D,mEAAoF;AAqB7E,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,8BAAa;IAC/C,KAAK,CAAC,GAAG;QACP,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;IAC1D,CAAC;CACF,CAAA;AAjBY,wCAAc;yBAAd,cAAc;IAnB1B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE;YACX,2CAAmB;YACnB,yCAAkB;YAClB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,6CAAoB;YACpB,6CAAoB;YACpB,yCAAkB;YAClB,+CAAqB;YACrB,iDAAsB;YACtB,yCAAkB;YAClB,2CAAmB;YACnB,4CAAoB;SACrB;KACF,CAAC;GACW,cAAc,CAiB1B"}
@@ -20,6 +20,7 @@ const service_restart_command_1 = require("./commands/service-restart.command");
20
20
  const service_rollback_command_1 = require("./commands/service-rollback.command");
21
21
  const service_stop_command_1 = require("./commands/service-stop.command");
22
22
  const service_setup_command_1 = require("./commands/service-setup.command");
23
+ const service_build_command_1 = require("./commands/service-build.command");
23
24
  let ServiceModule = class ServiceModule {
24
25
  };
25
26
  exports.ServiceModule = ServiceModule;
@@ -38,6 +39,8 @@ exports.ServiceModule = ServiceModule = __decorate([
38
39
  service_restart_command_1.ServiceRestartCommand,
39
40
  service_rollback_command_1.ServiceRollbackCommand,
40
41
  service_stop_command_1.ServiceStopCommand,
42
+ service_build_command_1.ServiceBuildCommand,
43
+ service_build_command_1.ServiceBuildsCommand,
41
44
  ],
42
45
  })
43
46
  ], ServiceModule);
@@ -1 +1 @@
1
- {"version":3,"file":"service.module.js","sourceRoot":"","sources":["../../src/service/service.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,gEAA4D;AAC5D,0EAAqE;AACrE,8EAAyE;AACzE,wEAAmE;AACnE,8EAAyE;AACzE,8EAAyE;AACzE,8EAAyE;AACzE,0EAAqE;AACrE,gFAA2E;AAC3E,kFAA6E;AAC7E,0EAAqE;AACrE,4EAAuE;AAkBhE,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAhBzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT,gCAAc;YACd,2CAAmB;YACnB,yCAAkB;YAClB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,6CAAoB;YACpB,6CAAoB;YACpB,yCAAkB;YAClB,+CAAqB;YACrB,iDAAsB;YACtB,yCAAkB;SACnB;KACF,CAAC;GACW,aAAa,CAAG"}
1
+ {"version":3,"file":"service.module.js","sourceRoot":"","sources":["../../src/service/service.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,gEAA4D;AAC5D,0EAAqE;AACrE,8EAAyE;AACzE,wEAAmE;AACnE,8EAAyE;AACzE,8EAAyE;AACzE,8EAAyE;AACzE,0EAAqE;AACrE,gFAA2E;AAC3E,kFAA6E;AAC7E,0EAAqE;AACrE,4EAAuE;AACvE,4EAA6F;AAoBtF,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAlBzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT,gCAAc;YACd,2CAAmB;YACnB,yCAAkB;YAClB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,6CAAoB;YACpB,6CAAoB;YACpB,yCAAkB;YAClB,+CAAqB;YACrB,iDAAsB;YACtB,yCAAkB;YAClB,2CAAmB;YACnB,4CAAoB;SACrB;KACF,CAAC;GACW,aAAa,CAAG"}