kodu 1.2.0 → 2.0.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/AGENTS.md +36 -68
- package/README.md +97 -96
- package/dist/package.json +1 -2
- package/dist/src/app.module.js +0 -8
- package/dist/src/app.module.js.map +1 -1
- package/dist/src/commands/init/init.command.d.ts +2 -9
- package/dist/src/commands/init/init.command.js +15 -241
- package/dist/src/commands/init/init.command.js.map +1 -1
- package/dist/src/commands/pack/pack.command.d.ts +7 -0
- package/dist/src/commands/pack/pack.command.js +59 -3
- package/dist/src/commands/pack/pack.command.js.map +1 -1
- package/dist/src/core/config/config.schema.d.ts +0 -46
- package/dist/src/core/config/config.schema.js +1 -51
- package/dist/src/core/config/config.schema.js.map +1 -1
- package/dist/src/core/config/config.service.js +2 -2
- package/dist/src/core/config/config.service.js.map +1 -1
- package/dist/src/core/config/prompt.service.d.ts +1 -4
- package/dist/src/core/config/prompt.service.js +4 -17
- package/dist/src/core/config/prompt.service.js.map +1 -1
- package/dist/src/shared/constants.d.ts +0 -4
- package/dist/src/shared/constants.js +1 -5
- package/dist/src/shared/constants.js.map +1 -1
- package/dist/src/shared/git/git.module.js +0 -2
- package/dist/src/shared/git/git.module.js.map +1 -1
- package/dist/src/shared/git/git.service.d.ts +0 -8
- package/dist/src/shared/git/git.service.js +2 -34
- package/dist/src/shared/git/git.service.js.map +1 -1
- package/dist/src/shared/tokenizer/tokenizer.module.js +0 -2
- package/dist/src/shared/tokenizer/tokenizer.module.js.map +1 -1
- package/dist/src/shared/tokenizer/tokenizer.service.d.ts +0 -6
- package/dist/src/shared/tokenizer/tokenizer.service.js +8 -38
- package/dist/src/shared/tokenizer/tokenizer.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/kodu.schema.json +0 -139
- package/package.json +1 -2
- package/src/app.module.ts +0 -8
- package/src/commands/init/init.command.ts +15 -310
- package/src/commands/pack/pack.command.ts +56 -3
- package/src/core/config/config.schema.ts +1 -68
- package/src/core/config/config.service.ts +2 -2
- package/src/core/config/prompt.service.ts +4 -26
- package/src/shared/constants.ts +0 -4
- package/src/shared/git/git.module.ts +0 -2
- package/src/shared/git/git.service.ts +1 -33
- package/src/shared/tokenizer/tokenizer.module.ts +0 -2
- package/src/shared/tokenizer/tokenizer.service.ts +9 -39
- package/.kodu/prompts/.keep +0 -0
- package/.kodu/prompts/commit.md +0 -9
- package/.kodu/prompts/pack.md +0 -7
- package/.kodu/prompts/review-bug.md +0 -6
- package/.kodu/prompts/review-security.md +0 -6
- package/.kodu/prompts/review-style.md +0 -6
- package/.opencode/command/openspec-apply.md +0 -24
- package/.opencode/command/openspec-archive.md +0 -27
- package/.opencode/command/openspec-proposal.md +0 -29
- package/.opencode/skills/kodu-ops/SKILL.md +0 -184
- package/dist/src/commands/commit/commit.command.d.ts +0 -18
- package/dist/src/commands/commit/commit.command.js +0 -149
- package/dist/src/commands/commit/commit.command.js.map +0 -1
- package/dist/src/commands/commit/commit.module.d.ts +0 -2
- package/dist/src/commands/commit/commit.module.js +0 -25
- package/dist/src/commands/commit/commit.module.js.map +0 -1
- package/dist/src/commands/ops/ops.command.d.ts +0 -4
- package/dist/src/commands/ops/ops.command.js +0 -39
- package/dist/src/commands/ops/ops.command.js.map +0 -1
- package/dist/src/commands/ops/ops.module.d.ts +0 -2
- package/dist/src/commands/ops/ops.module.js +0 -33
- package/dist/src/commands/ops/ops.module.js.map +0 -1
- package/dist/src/commands/ops/ops.types.d.ts +0 -13
- package/dist/src/commands/ops/ops.types.js +0 -12
- package/dist/src/commands/ops/ops.types.js.map +0 -1
- package/dist/src/commands/ops/ops.utils.d.ts +0 -13
- package/dist/src/commands/ops/ops.utils.js +0 -121
- package/dist/src/commands/ops/ops.utils.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-env.command.d.ts +0 -24
- package/dist/src/commands/ops/subcommands/ops-env.command.js +0 -156
- package/dist/src/commands/ops/subcommands/ops-env.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-routes.command.d.ts +0 -22
- package/dist/src/commands/ops/subcommands/ops-routes.command.js +0 -203
- package/dist/src/commands/ops/subcommands/ops-routes.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-service.command.d.ts +0 -22
- package/dist/src/commands/ops/subcommands/ops-service.command.js +0 -169
- package/dist/src/commands/ops/subcommands/ops-service.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.d.ts +0 -14
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.js +0 -75
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.js.map +0 -1
- package/dist/src/commands/review/review.command.d.ts +0 -26
- package/dist/src/commands/review/review.command.js +0 -205
- package/dist/src/commands/review/review.command.js.map +0 -1
- package/dist/src/commands/review/review.module.d.ts +0 -2
- package/dist/src/commands/review/review.module.js +0 -26
- package/dist/src/commands/review/review.module.js.map +0 -1
- package/dist/src/core/config/default-prompts.d.ts +0 -9
- package/dist/src/core/config/default-prompts.js +0 -49
- package/dist/src/core/config/default-prompts.js.map +0 -1
- package/dist/src/shared/ai/ai.module.d.ts +0 -2
- package/dist/src/shared/ai/ai.module.js +0 -23
- package/dist/src/shared/ai/ai.module.js.map +0 -1
- package/dist/src/shared/ai/ai.service.d.ts +0 -22
- package/dist/src/shared/ai/ai.service.js +0 -164
- package/dist/src/shared/ai/ai.service.js.map +0 -1
- package/dist/src/shared/ssh/ssh.module.d.ts +0 -2
- package/dist/src/shared/ssh/ssh.module.js +0 -21
- package/dist/src/shared/ssh/ssh.module.js.map +0 -1
- package/dist/src/shared/ssh/ssh.service.d.ts +0 -11
- package/dist/src/shared/ssh/ssh.service.js +0 -53
- package/dist/src/shared/ssh/ssh.service.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/commands/commit/commit.command.ts +0 -139
- package/src/commands/commit/commit.module.ts +0 -12
- package/src/commands/ops/ops.command.ts +0 -30
- package/src/commands/ops/ops.module.ts +0 -20
- package/src/commands/ops/ops.types.ts +0 -24
- package/src/commands/ops/ops.utils.ts +0 -160
- package/src/commands/ops/subcommands/ops-env.command.ts +0 -165
- package/src/commands/ops/subcommands/ops-routes.command.ts +0 -221
- package/src/commands/ops/subcommands/ops-service.command.ts +0 -190
- package/src/commands/ops/subcommands/ops-sysinfo.command.ts +0 -77
- package/src/commands/review/review.command.ts +0 -199
- package/src/commands/review/review.module.ts +0 -13
- package/src/core/config/default-prompts.ts +0 -53
- package/src/shared/ai/ai.module.ts +0 -10
- package/src/shared/ai/ai.service.ts +0 -216
- package/src/shared/ssh/ssh.module.ts +0 -8
- package/src/shared/ssh/ssh.service.ts +0 -61
|
@@ -1,149 +0,0 @@
|
|
|
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.CommitCommand = void 0;
|
|
13
|
-
const promises_1 = require("node:fs/promises");
|
|
14
|
-
const nest_commander_1 = require("nest-commander");
|
|
15
|
-
const ui_service_1 = require("../../core/ui/ui.service");
|
|
16
|
-
const ai_service_1 = require("../../shared/ai/ai.service");
|
|
17
|
-
const git_service_1 = require("../../shared/git/git.service");
|
|
18
|
-
let CommitCommand = class CommitCommand extends nest_commander_1.CommandRunner {
|
|
19
|
-
ui;
|
|
20
|
-
git;
|
|
21
|
-
ai;
|
|
22
|
-
constructor(ui, git, ai) {
|
|
23
|
-
super();
|
|
24
|
-
this.ui = ui;
|
|
25
|
-
this.git = git;
|
|
26
|
-
this.ai = ai;
|
|
27
|
-
}
|
|
28
|
-
parseCi() {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
parseOutput(value) {
|
|
32
|
-
return value;
|
|
33
|
-
}
|
|
34
|
-
async run(_inputs, options = {}) {
|
|
35
|
-
const ciMode = Boolean(options.ci);
|
|
36
|
-
const spinner = ciMode
|
|
37
|
-
? undefined
|
|
38
|
-
: this.ui.createSpinner({ text: 'Collecting diff...' }).start();
|
|
39
|
-
const logProgress = (text) => {
|
|
40
|
-
if (ciMode) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (spinner) {
|
|
44
|
-
spinner.text = text;
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
this.ui.log.info(text);
|
|
48
|
-
};
|
|
49
|
-
const finishProgress = (text) => {
|
|
50
|
-
if (ciMode) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (spinner) {
|
|
54
|
-
spinner.success(text);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
this.ui.log.success(text);
|
|
58
|
-
};
|
|
59
|
-
try {
|
|
60
|
-
if (!this.ai.hasApiKey()) {
|
|
61
|
-
const envName = this.ai.getApiKeyEnvName();
|
|
62
|
-
if (spinner) {
|
|
63
|
-
spinner.stop('AI key not found');
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
this.ui.log.error('AI key not found');
|
|
67
|
-
}
|
|
68
|
-
this.ui.log.warn(`'commit' command requires AI key to work.`);
|
|
69
|
-
this.ui.log.info(`Set key: export ${envName}=<your_key>`);
|
|
70
|
-
this.ui.log.info(`Environment variable name is configured via llm.apiKeyEnv in kodu.json`);
|
|
71
|
-
process.exitCode = 1;
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
await this.git.ensureRepo();
|
|
75
|
-
const hasStaged = await this.git.hasStagedChanges();
|
|
76
|
-
if (!hasStaged) {
|
|
77
|
-
if (spinner) {
|
|
78
|
-
spinner.stop('No staged changes');
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
this.ui.log.info('No staged changes');
|
|
82
|
-
}
|
|
83
|
-
this.ui.log.warn('First run git add for the required files.');
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const diff = await this.git.getStagedDiff();
|
|
87
|
-
if (!diff.trim()) {
|
|
88
|
-
if (spinner) {
|
|
89
|
-
spinner.stop('Diff is empty - possibly everything excluded by packer.ignore');
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.ui.log.info('Diff is empty - possibly everything excluded by packer.ignore');
|
|
93
|
-
}
|
|
94
|
-
this.ui.log.warn('Diff is empty: all changes fell into packer.ignore exclusions.');
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
logProgress('Generating commit message...');
|
|
98
|
-
const commitMessage = await this.ai.generateCommitMessage(diff);
|
|
99
|
-
finishProgress('Message ready');
|
|
100
|
-
if (!ciMode) {
|
|
101
|
-
this.ui.log.info(`Suggestion: ${commitMessage}`);
|
|
102
|
-
}
|
|
103
|
-
console.log(commitMessage);
|
|
104
|
-
if (options.output) {
|
|
105
|
-
await (0, promises_1.writeFile)(options.output, commitMessage, { encoding: 'utf8' });
|
|
106
|
-
if (!ciMode) {
|
|
107
|
-
this.ui.log.success(`Message saved to ${options.output}`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
catch (error) {
|
|
112
|
-
if (spinner) {
|
|
113
|
-
spinner.error('Error creating commit');
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
this.ui.log.error('Error creating commit');
|
|
117
|
-
}
|
|
118
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
119
|
-
this.ui.log.error(message);
|
|
120
|
-
process.exitCode = 1;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
exports.CommitCommand = CommitCommand;
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, nest_commander_1.Option)({ flags: '--ci', description: 'CI mode: no spinners and dialogs' }),
|
|
127
|
-
__metadata("design:type", Function),
|
|
128
|
-
__metadata("design:paramtypes", []),
|
|
129
|
-
__metadata("design:returntype", Boolean)
|
|
130
|
-
], CommitCommand.prototype, "parseCi", null);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, nest_commander_1.Option)({
|
|
133
|
-
flags: '-o, --output <path>',
|
|
134
|
-
description: 'Save message to file',
|
|
135
|
-
}),
|
|
136
|
-
__metadata("design:type", Function),
|
|
137
|
-
__metadata("design:paramtypes", [String]),
|
|
138
|
-
__metadata("design:returntype", String)
|
|
139
|
-
], CommitCommand.prototype, "parseOutput", null);
|
|
140
|
-
exports.CommitCommand = CommitCommand = __decorate([
|
|
141
|
-
(0, nest_commander_1.Command)({
|
|
142
|
-
name: 'commit',
|
|
143
|
-
description: 'Generate and apply commit message',
|
|
144
|
-
}),
|
|
145
|
-
__metadata("design:paramtypes", [ui_service_1.UiService,
|
|
146
|
-
git_service_1.GitService,
|
|
147
|
-
ai_service_1.AiService])
|
|
148
|
-
], CommitCommand);
|
|
149
|
-
//# sourceMappingURL=commit.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commit.command.js","sourceRoot":"","sources":["../../../../src/commands/commit/commit.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6C;AAC7C,mDAAgE;AAChE,yDAAqD;AACrD,2DAAuD;AACvD,8DAA0D;AAWnD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAAa;IAE3B;IACA;IACA;IAHnB,YACmB,EAAa,EACb,GAAe,EACf,EAAa;QAE9B,KAAK,EAAE,CAAC;QAJS,OAAE,GA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QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CACF,CAAA;AA3HY,sCAAa;AAUxB;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;;;4CAG1E;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,sBAAsB;KACpC,CAAC;;;;gDAGD;wBApBU,aAAa;IAJzB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;KACjD,CAAC;qCAGuB,sBAAS;QACR,wBAAU;QACX,sBAAS;GAJrB,aAAa,CA2HzB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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.CommitModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const config_module_1 = require("../../core/config/config.module");
|
|
12
|
-
const ui_module_1 = require("../../core/ui/ui.module");
|
|
13
|
-
const ai_module_1 = require("../../shared/ai/ai.module");
|
|
14
|
-
const git_module_1 = require("../../shared/git/git.module");
|
|
15
|
-
const commit_command_1 = require("./commit.command");
|
|
16
|
-
let CommitModule = class CommitModule {
|
|
17
|
-
};
|
|
18
|
-
exports.CommitModule = CommitModule;
|
|
19
|
-
exports.CommitModule = CommitModule = __decorate([
|
|
20
|
-
(0, common_1.Module)({
|
|
21
|
-
imports: [config_module_1.ConfigModule, ui_module_1.UiModule, git_module_1.GitModule, ai_module_1.AiModule],
|
|
22
|
-
providers: [commit_command_1.CommitCommand],
|
|
23
|
-
})
|
|
24
|
-
], CommitModule);
|
|
25
|
-
//# sourceMappingURL=commit.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commit.module.js","sourceRoot":"","sources":["../../../../src/commands/commit/commit.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA+D;AAC/D,uDAAmD;AACnD,yDAAqD;AACrD,4DAAwD;AACxD,qDAAiD;AAM1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,oBAAQ,EAAE,sBAAS,EAAE,oBAAQ,CAAC;QACtD,SAAS,EAAE,CAAC,8BAAa,CAAC;KAC3B,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -1,39 +0,0 @@
|
|
|
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.OpsCommand = void 0;
|
|
10
|
-
const nest_commander_1 = require("nest-commander");
|
|
11
|
-
const ops_utils_1 = require("./ops.utils");
|
|
12
|
-
const ops_env_command_1 = require("./subcommands/ops-env.command");
|
|
13
|
-
const ops_routes_command_1 = require("./subcommands/ops-routes.command");
|
|
14
|
-
const ops_service_command_1 = require("./subcommands/ops-service.command");
|
|
15
|
-
const ops_sysinfo_command_1 = require("./subcommands/ops-sysinfo.command");
|
|
16
|
-
let OpsCommand = class OpsCommand extends nest_commander_1.CommandRunner {
|
|
17
|
-
async run() {
|
|
18
|
-
(0, ops_utils_1.printJson)({
|
|
19
|
-
status: 'error',
|
|
20
|
-
code: 'VALIDATION_ERROR',
|
|
21
|
-
error: 'Missing ops subcommand',
|
|
22
|
-
}, true);
|
|
23
|
-
process.exitCode = 1;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.OpsCommand = OpsCommand;
|
|
27
|
-
exports.OpsCommand = OpsCommand = __decorate([
|
|
28
|
-
(0, nest_commander_1.Command)({
|
|
29
|
-
name: 'ops',
|
|
30
|
-
description: 'Remote server operations for agents',
|
|
31
|
-
subCommands: [
|
|
32
|
-
ops_sysinfo_command_1.OpsSysinfoCommand,
|
|
33
|
-
ops_env_command_1.OpsEnvCommand,
|
|
34
|
-
ops_routes_command_1.OpsRoutesCommand,
|
|
35
|
-
ops_service_command_1.OpsServiceCommand,
|
|
36
|
-
],
|
|
37
|
-
})
|
|
38
|
-
], OpsCommand);
|
|
39
|
-
//# sourceMappingURL=ops.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops.command.js","sourceRoot":"","sources":["../../../../src/commands/ops/ops.command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAwD;AACxD,2CAAwC;AACxC,mEAA8D;AAC9D,yEAAoE;AACpE,2EAAsE;AACtE,2EAAsE;AAY/D,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,8BAAa;IAC3C,KAAK,CAAC,GAAG;QACP,IAAA,qBAAS,EACP;YACE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,wBAAwB;SAChC,EACD,IAAI,CACL,CAAC;QACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AAZY,gCAAU;qBAAV,UAAU;IAVtB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,qCAAqC;QAClD,WAAW,EAAE;YACX,uCAAiB;YACjB,+BAAa;YACb,qCAAgB;YAChB,uCAAiB;SAClB;KACF,CAAC;GACW,UAAU,CAYtB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
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.OpsModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const config_module_1 = require("../../core/config/config.module");
|
|
12
|
-
const ssh_module_1 = require("../../shared/ssh/ssh.module");
|
|
13
|
-
const ops_command_1 = require("./ops.command");
|
|
14
|
-
const ops_env_command_1 = require("./subcommands/ops-env.command");
|
|
15
|
-
const ops_routes_command_1 = require("./subcommands/ops-routes.command");
|
|
16
|
-
const ops_service_command_1 = require("./subcommands/ops-service.command");
|
|
17
|
-
const ops_sysinfo_command_1 = require("./subcommands/ops-sysinfo.command");
|
|
18
|
-
let OpsModule = class OpsModule {
|
|
19
|
-
};
|
|
20
|
-
exports.OpsModule = OpsModule;
|
|
21
|
-
exports.OpsModule = OpsModule = __decorate([
|
|
22
|
-
(0, common_1.Module)({
|
|
23
|
-
imports: [config_module_1.ConfigModule, ssh_module_1.SshModule],
|
|
24
|
-
providers: [
|
|
25
|
-
ops_command_1.OpsCommand,
|
|
26
|
-
ops_sysinfo_command_1.OpsSysinfoCommand,
|
|
27
|
-
ops_env_command_1.OpsEnvCommand,
|
|
28
|
-
ops_routes_command_1.OpsRoutesCommand,
|
|
29
|
-
ops_service_command_1.OpsServiceCommand,
|
|
30
|
-
],
|
|
31
|
-
})
|
|
32
|
-
], OpsModule);
|
|
33
|
-
//# sourceMappingURL=ops.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops.module.js","sourceRoot":"","sources":["../../../../src/commands/ops/ops.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA+D;AAC/D,4DAAwD;AACxD,+CAA2C;AAC3C,mEAA8D;AAC9D,yEAAoE;AACpE,2EAAsE;AACtE,2EAAsE;AAY/D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAVrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,sBAAS,CAAC;QAClC,SAAS,EAAE;YACT,wBAAU;YACV,uCAAiB;YACjB,+BAAa;YACb,qCAAgB;YAChB,uCAAiB;SAClB;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ServerConfig } from '../../core/config/config.schema';
|
|
2
|
-
export type OpsErrorCode = 'CLI_ERROR' | 'CONFIG_ERROR' | 'NOT_FOUND' | 'VALIDATION_ERROR';
|
|
3
|
-
export type ResolvedServerConfig = ServerConfig & {
|
|
4
|
-
sshKeyPath: string;
|
|
5
|
-
paths?: {
|
|
6
|
-
apps: string;
|
|
7
|
-
caddy?: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare class OpsCliError extends Error {
|
|
11
|
-
readonly code: OpsErrorCode;
|
|
12
|
-
constructor(code: OpsErrorCode, message: string);
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpsCliError = void 0;
|
|
4
|
-
class OpsCliError extends Error {
|
|
5
|
-
code;
|
|
6
|
-
constructor(code, message) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.code = code;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.OpsCliError = OpsCliError;
|
|
12
|
-
//# sourceMappingURL=ops.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops.types.js","sourceRoot":"","sources":["../../../../src/commands/ops/ops.types.ts"],"names":[],"mappings":";;;AAgBA,MAAa,WAAY,SAAQ,KAAK;IAElB;IADlB,YACkB,IAAkB,EAClC,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAc;IAIpC,CAAC;CACF;AAPD,kCAOC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { KoduConfig } from '../../core/config/config.schema';
|
|
2
|
-
import type { SshResult } from '../../shared/ssh/ssh.service';
|
|
3
|
-
import { type ResolvedServerConfig } from './ops.types';
|
|
4
|
-
export declare function printJson(payload: unknown, isError?: boolean): void;
|
|
5
|
-
export declare function printCliError(error: unknown): void;
|
|
6
|
-
export declare function printSshError(result: SshResult, command: string): void;
|
|
7
|
-
export declare function resolveServerOrThrow(config: KoduConfig, alias: string): Promise<ResolvedServerConfig>;
|
|
8
|
-
export declare function resolveAppsPath(server: ResolvedServerConfig): string;
|
|
9
|
-
export declare function resolveCaddyPath(server: ResolvedServerConfig): string;
|
|
10
|
-
export declare function shellQuote(value: string): string;
|
|
11
|
-
export declare function ensureEnvKey(key: string | undefined): string;
|
|
12
|
-
export declare function ensureRequired(value: string | undefined, name: string): string;
|
|
13
|
-
export declare function ensureAction<T extends string>(value: string, allowed: readonly T[], context: string): T;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.printJson = printJson;
|
|
7
|
-
exports.printCliError = printCliError;
|
|
8
|
-
exports.printSshError = printSshError;
|
|
9
|
-
exports.resolveServerOrThrow = resolveServerOrThrow;
|
|
10
|
-
exports.resolveAppsPath = resolveAppsPath;
|
|
11
|
-
exports.resolveCaddyPath = resolveCaddyPath;
|
|
12
|
-
exports.shellQuote = shellQuote;
|
|
13
|
-
exports.ensureEnvKey = ensureEnvKey;
|
|
14
|
-
exports.ensureRequired = ensureRequired;
|
|
15
|
-
exports.ensureAction = ensureAction;
|
|
16
|
-
const promises_1 = require("node:fs/promises");
|
|
17
|
-
const node_os_1 = __importDefault(require("node:os"));
|
|
18
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
19
|
-
const ops_types_1 = require("./ops.types");
|
|
20
|
-
const DEFAULT_APPS_PATH = '/var/agent-apps';
|
|
21
|
-
function printJson(payload, isError = false) {
|
|
22
|
-
const line = JSON.stringify(payload);
|
|
23
|
-
if (isError) {
|
|
24
|
-
console.error(line);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
console.log(line);
|
|
28
|
-
}
|
|
29
|
-
function printCliError(error) {
|
|
30
|
-
const cliError = toCliError(error);
|
|
31
|
-
printJson({
|
|
32
|
-
status: 'error',
|
|
33
|
-
code: cliError.code,
|
|
34
|
-
error: cliError.message,
|
|
35
|
-
}, true);
|
|
36
|
-
}
|
|
37
|
-
function printSshError(result, command) {
|
|
38
|
-
printJson({
|
|
39
|
-
status: 'error',
|
|
40
|
-
code: result.exitCode,
|
|
41
|
-
stderr: result.stderr || result.error || 'Unknown SSH error',
|
|
42
|
-
command,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
async function resolveServerOrThrow(config, alias) {
|
|
46
|
-
const servers = config.ops?.servers;
|
|
47
|
-
if (!servers) {
|
|
48
|
-
throw new ops_types_1.OpsCliError('CONFIG_ERROR', 'ops.servers not configured in kodu.json');
|
|
49
|
-
}
|
|
50
|
-
const server = servers[alias];
|
|
51
|
-
if (!server) {
|
|
52
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', `Server alias '${alias}' not found in kodu.json`);
|
|
53
|
-
}
|
|
54
|
-
const resolved = normalizeServer(server);
|
|
55
|
-
await assertSshKeyExists(resolved.sshKeyPath);
|
|
56
|
-
return resolved;
|
|
57
|
-
}
|
|
58
|
-
function resolveAppsPath(server) {
|
|
59
|
-
return server.paths?.apps ?? DEFAULT_APPS_PATH;
|
|
60
|
-
}
|
|
61
|
-
function resolveCaddyPath(server) {
|
|
62
|
-
return (server.paths?.caddy ?? node_path_1.default.posix.join(resolveAppsPath(server), 'caddy'));
|
|
63
|
-
}
|
|
64
|
-
function shellQuote(value) {
|
|
65
|
-
return `'${value.replace(/'/g, `'"'"'`)}'`;
|
|
66
|
-
}
|
|
67
|
-
function ensureEnvKey(key) {
|
|
68
|
-
if (!key) {
|
|
69
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', 'Option --key is required');
|
|
70
|
-
}
|
|
71
|
-
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) {
|
|
72
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', 'Invalid env key format. Allowed: [A-Za-z_][A-Za-z0-9_]*');
|
|
73
|
-
}
|
|
74
|
-
return key;
|
|
75
|
-
}
|
|
76
|
-
function ensureRequired(value, name) {
|
|
77
|
-
if (!value) {
|
|
78
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', `Option --${name} is required`);
|
|
79
|
-
}
|
|
80
|
-
return value;
|
|
81
|
-
}
|
|
82
|
-
function ensureAction(value, allowed, context) {
|
|
83
|
-
if (!allowed.includes(value)) {
|
|
84
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', `Unsupported ${context}: '${value}'. Allowed: ${allowed.join(', ')}`);
|
|
85
|
-
}
|
|
86
|
-
return value;
|
|
87
|
-
}
|
|
88
|
-
function normalizeServer(server) {
|
|
89
|
-
const sshKeyPath = server.sshKeyPath.startsWith('~')
|
|
90
|
-
? node_path_1.default.join(node_os_1.default.homedir(), server.sshKeyPath.slice(1))
|
|
91
|
-
: server.sshKeyPath;
|
|
92
|
-
const apps = server.paths?.apps ?? DEFAULT_APPS_PATH;
|
|
93
|
-
return {
|
|
94
|
-
...server,
|
|
95
|
-
sshKeyPath: node_path_1.default.isAbsolute(sshKeyPath)
|
|
96
|
-
? sshKeyPath
|
|
97
|
-
: node_path_1.default.resolve(process.cwd(), sshKeyPath),
|
|
98
|
-
paths: {
|
|
99
|
-
apps,
|
|
100
|
-
caddy: server.paths?.caddy,
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
async function assertSshKeyExists(sshKeyPath) {
|
|
105
|
-
try {
|
|
106
|
-
await (0, promises_1.access)(sshKeyPath);
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', `SSH key file not found or inaccessible: ${sshKeyPath}`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function toCliError(error) {
|
|
113
|
-
if (error instanceof ops_types_1.OpsCliError) {
|
|
114
|
-
return { code: error.code, message: error.message };
|
|
115
|
-
}
|
|
116
|
-
if (error instanceof Error) {
|
|
117
|
-
return { code: 'CLI_ERROR', message: error.message };
|
|
118
|
-
}
|
|
119
|
-
return { code: 'CLI_ERROR', message: 'Unknown CLI error' };
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=ops.utils.js.map
|
|
@@ -1 +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,uBAAW,CACnB,kBAAkB,EAClB,2CAA2C,UAAU,EAAE,CACxD,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,YAAY,uBAAW,EAAE,CAAC;QACjC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CommandRunner } from 'nest-commander';
|
|
2
|
-
import { ConfigService } from '../../../core/config/config.service';
|
|
3
|
-
import { SshService } from '../../../shared/ssh/ssh.service';
|
|
4
|
-
type OpsEnvOptions = {
|
|
5
|
-
server?: string;
|
|
6
|
-
action?: string;
|
|
7
|
-
project?: string;
|
|
8
|
-
key?: string;
|
|
9
|
-
val?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare class OpsEnvCommand extends CommandRunner {
|
|
12
|
-
private readonly configService;
|
|
13
|
-
private readonly sshService;
|
|
14
|
-
constructor(configService: ConfigService, sshService: SshService);
|
|
15
|
-
parseServer(value: string): string;
|
|
16
|
-
parseAction(value: string): string;
|
|
17
|
-
parseProject(value: string): string;
|
|
18
|
-
parseKey(value: string): string;
|
|
19
|
-
parseVal(value: string): string;
|
|
20
|
-
run(passedParams: string[], options?: OpsEnvOptions): Promise<void>;
|
|
21
|
-
private buildCommand;
|
|
22
|
-
private buildBashScript;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,156 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OpsEnvCommand = void 0;
|
|
16
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
-
const nest_commander_1 = require("nest-commander");
|
|
18
|
-
const config_service_1 = require("../../../core/config/config.service");
|
|
19
|
-
const ssh_service_1 = require("../../../shared/ssh/ssh.service");
|
|
20
|
-
const ops_types_1 = require("../ops.types");
|
|
21
|
-
const ops_utils_1 = require("../ops.utils");
|
|
22
|
-
let OpsEnvCommand = class OpsEnvCommand extends nest_commander_1.CommandRunner {
|
|
23
|
-
configService;
|
|
24
|
-
sshService;
|
|
25
|
-
constructor(configService, sshService) {
|
|
26
|
-
super();
|
|
27
|
-
this.configService = configService;
|
|
28
|
-
this.sshService = sshService;
|
|
29
|
-
}
|
|
30
|
-
parseServer(value) {
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
parseAction(value) {
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
36
|
-
parseProject(value) {
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
parseKey(value) {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
parseVal(value) {
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
async run(passedParams, options = {}) {
|
|
46
|
-
try {
|
|
47
|
-
if (passedParams.length > 0) {
|
|
48
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', 'Positional arguments are not supported. Use named flags (e.g., --server, --action). Run with --help for examples.');
|
|
49
|
-
}
|
|
50
|
-
const serverAlias = (0, ops_utils_1.ensureRequired)(options.server, 'server');
|
|
51
|
-
const rawAction = (0, ops_utils_1.ensureRequired)(options.action, 'action');
|
|
52
|
-
const project = (0, ops_utils_1.ensureRequired)(options.project, 'project');
|
|
53
|
-
const action = (0, ops_utils_1.ensureAction)(rawAction, ['get', 'set', 'unset'], 'env action');
|
|
54
|
-
const server = await (0, ops_utils_1.resolveServerOrThrow)(this.configService.getConfig(), serverAlias);
|
|
55
|
-
const envPath = node_path_1.default.posix.join((0, ops_utils_1.resolveAppsPath)(server), project, '.env');
|
|
56
|
-
const command = this.buildCommand(action, envPath, options);
|
|
57
|
-
const result = await this.sshService.execute(server, command);
|
|
58
|
-
if (!result.success) {
|
|
59
|
-
(0, ops_utils_1.printSshError)(result, command);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (action === 'get') {
|
|
63
|
-
(0, ops_utils_1.printJson)({ status: 'ok', data: { content: result.stdout } });
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
(0, ops_utils_1.printJson)({ status: 'ok', message: 'Env updated' });
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
(0, ops_utils_1.printCliError)(error);
|
|
70
|
-
process.exitCode = 1;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
buildCommand(action, envPath, options) {
|
|
74
|
-
const quotedPath = (0, ops_utils_1.shellQuote)(envPath);
|
|
75
|
-
if (action === 'get') {
|
|
76
|
-
return `cat ${quotedPath}`;
|
|
77
|
-
}
|
|
78
|
-
const key = (0, ops_utils_1.ensureEnvKey)(options.key);
|
|
79
|
-
const quotedKey = (0, ops_utils_1.shellQuote)(key);
|
|
80
|
-
if (action === 'set') {
|
|
81
|
-
const val = (0, ops_utils_1.ensureRequired)(options.val, 'val');
|
|
82
|
-
const quotedVal = (0, ops_utils_1.shellQuote)(val);
|
|
83
|
-
const scriptLines = [
|
|
84
|
-
`ENV_FILE=${quotedPath}`,
|
|
85
|
-
`KEY=${quotedKey}`,
|
|
86
|
-
`VAL=${quotedVal}`,
|
|
87
|
-
'mkdir -p "$(dirname "$ENV_FILE")"',
|
|
88
|
-
'touch "$ENV_FILE"',
|
|
89
|
-
'awk -v k="$KEY" -v v="$VAL" \'BEGIN{found=0} $0 ~ "^" k "=" { print k "=" v; found=1; next } { print } END { if (!found) print k "=" v }\' "$ENV_FILE" > "$ENV_FILE.tmp"',
|
|
90
|
-
'mv "$ENV_FILE.tmp" "$ENV_FILE"',
|
|
91
|
-
];
|
|
92
|
-
return this.buildBashScript(scriptLines);
|
|
93
|
-
}
|
|
94
|
-
const scriptLines = [
|
|
95
|
-
`ENV_FILE=${quotedPath}`,
|
|
96
|
-
`KEY=${quotedKey}`,
|
|
97
|
-
'if [ ! -f "$ENV_FILE" ]; then exit 0; fi',
|
|
98
|
-
'grep -v "^$KEY=" "$ENV_FILE" > "$ENV_FILE.tmp"',
|
|
99
|
-
'mv "$ENV_FILE.tmp" "$ENV_FILE"',
|
|
100
|
-
];
|
|
101
|
-
return this.buildBashScript(scriptLines);
|
|
102
|
-
}
|
|
103
|
-
buildBashScript(scriptLines) {
|
|
104
|
-
const script = scriptLines.join(' && ');
|
|
105
|
-
return `bash -lc ${(0, ops_utils_1.shellQuote)(script)}`;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
exports.OpsEnvCommand = OpsEnvCommand;
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, nest_commander_1.Option)({
|
|
111
|
-
flags: '-s, --server <name>',
|
|
112
|
-
description: 'Server alias defined in kodu.json (e.g., dev)',
|
|
113
|
-
}),
|
|
114
|
-
__metadata("design:type", Function),
|
|
115
|
-
__metadata("design:paramtypes", [String]),
|
|
116
|
-
__metadata("design:returntype", String)
|
|
117
|
-
], OpsEnvCommand.prototype, "parseServer", null);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, nest_commander_1.Option)({
|
|
120
|
-
flags: '-a, --action <type>',
|
|
121
|
-
description: 'Action to perform: get | set | unset',
|
|
122
|
-
}),
|
|
123
|
-
__metadata("design:type", Function),
|
|
124
|
-
__metadata("design:paramtypes", [String]),
|
|
125
|
-
__metadata("design:returntype", String)
|
|
126
|
-
], OpsEnvCommand.prototype, "parseAction", null);
|
|
127
|
-
__decorate([
|
|
128
|
-
(0, nest_commander_1.Option)({
|
|
129
|
-
flags: '-p, --project <name>',
|
|
130
|
-
description: 'Target project directory name',
|
|
131
|
-
}),
|
|
132
|
-
__metadata("design:type", Function),
|
|
133
|
-
__metadata("design:paramtypes", [String]),
|
|
134
|
-
__metadata("design:returntype", String)
|
|
135
|
-
], OpsEnvCommand.prototype, "parseProject", null);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, nest_commander_1.Option)({ flags: '--key <key>', description: 'Environment key' }),
|
|
138
|
-
__metadata("design:type", Function),
|
|
139
|
-
__metadata("design:paramtypes", [String]),
|
|
140
|
-
__metadata("design:returntype", String)
|
|
141
|
-
], OpsEnvCommand.prototype, "parseKey", null);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, nest_commander_1.Option)({ flags: '--val <value>', description: 'Environment value' }),
|
|
144
|
-
__metadata("design:type", Function),
|
|
145
|
-
__metadata("design:paramtypes", [String]),
|
|
146
|
-
__metadata("design:returntype", String)
|
|
147
|
-
], OpsEnvCommand.prototype, "parseVal", null);
|
|
148
|
-
exports.OpsEnvCommand = OpsEnvCommand = __decorate([
|
|
149
|
-
(0, nest_commander_1.SubCommand)({
|
|
150
|
-
name: 'env',
|
|
151
|
-
description: 'Manage remote .env files for a specific project.\nExamples:\n kodu ops env --server dev --action get --project my-app\n kodu ops env --server dev --action set --project my-app --key PORT --val 3000\n kodu ops env --server dev --action unset --project my-app --key PORT',
|
|
152
|
-
}),
|
|
153
|
-
__metadata("design:paramtypes", [config_service_1.ConfigService,
|
|
154
|
-
ssh_service_1.SshService])
|
|
155
|
-
], OpsEnvCommand);
|
|
156
|
-
//# sourceMappingURL=ops-env.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops-env.command.js","sourceRoot":"","sources":["../../../../../src/commands/ops/subcommands/ops-env.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA6B;AAC7B,mDAAmE;AACnE,wEAAoE;AACpE,iEAA6D;AAC7D,4CAA2C;AAC3C,4CAUsB;AAiBf,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAAa;IAE3B;IACA;IAFnB,YACmB,aAA4B,EAC5B,UAAsB;QAEvC,KAAK,EAAE,CAAC;QAHS,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAY;IAGzC,CAAC;IAMD,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAMD,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAMD,YAAY,CAAC,KAAa;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,QAAQ,CAAC,KAAa;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,QAAQ,CAAC,KAAa;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,GAAG,CACP,YAAsB,EACtB,UAAyB,EAAE;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,uBAAW,CACnB,kBAAkB,EAClB,mHAAmH,CACpH,CAAC;YACJ,CAAC;YAED,MAAM,WAAW,GAAG,I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