@ketrics/ketrics-cli 0.1.0 → 0.2.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/dist/src/cli.d.ts +1 -1
- package/dist/src/cli.js +21 -21
- package/package.json +3 -3
package/dist/src/cli.d.ts
CHANGED
package/dist/src/cli.js
CHANGED
|
@@ -12,21 +12,21 @@ const build_1 = require("./commands/build");
|
|
|
12
12
|
const deploy_1 = require("./commands/deploy");
|
|
13
13
|
const validate_1 = require("./commands/validate");
|
|
14
14
|
const run_1 = require("./commands/run");
|
|
15
|
-
const VERSION =
|
|
15
|
+
const VERSION = "0.1.1";
|
|
16
16
|
/**
|
|
17
17
|
* Create and configure CLI program
|
|
18
18
|
*/
|
|
19
19
|
function createCLI() {
|
|
20
20
|
const program = new commander_1.Command();
|
|
21
21
|
program
|
|
22
|
-
.name(
|
|
23
|
-
.description(
|
|
24
|
-
.version(VERSION,
|
|
22
|
+
.name("ketrics")
|
|
23
|
+
.description("CLI tool for deploying applications to Ketrics platform")
|
|
24
|
+
.version(VERSION, "-v, --version", "Show CLI version");
|
|
25
25
|
// Create command
|
|
26
26
|
program
|
|
27
|
-
.command(
|
|
28
|
-
.description(
|
|
29
|
-
.option(
|
|
27
|
+
.command("create <app-name>")
|
|
28
|
+
.description("Create a new Ketrics application from a template")
|
|
29
|
+
.option("-t, --template <name>", "Use specific template (skip interactive selection)")
|
|
30
30
|
.action(async (appName, options) => {
|
|
31
31
|
await (0, create_1.createCommand)(appName, {
|
|
32
32
|
template: options.template,
|
|
@@ -34,17 +34,17 @@ function createCLI() {
|
|
|
34
34
|
});
|
|
35
35
|
// Build command
|
|
36
36
|
program
|
|
37
|
-
.command(
|
|
38
|
-
.description(
|
|
37
|
+
.command("build")
|
|
38
|
+
.description("Build frontend and backend without deploying")
|
|
39
39
|
.action(async () => {
|
|
40
40
|
await (0, build_1.buildCommand)();
|
|
41
41
|
});
|
|
42
42
|
// Deploy command
|
|
43
43
|
program
|
|
44
|
-
.command(
|
|
45
|
-
.description(
|
|
46
|
-
.option(
|
|
47
|
-
.option(
|
|
44
|
+
.command("deploy")
|
|
45
|
+
.description("Build and deploy frontend/backend to Ketrics")
|
|
46
|
+
.option("-e, --env <path>", "Path to .env file")
|
|
47
|
+
.option("--dry-run", "Build and show what would be deployed without uploading")
|
|
48
48
|
.action(async (options) => {
|
|
49
49
|
await (0, deploy_1.deployCommand)({
|
|
50
50
|
env: options.env,
|
|
@@ -53,19 +53,19 @@ function createCLI() {
|
|
|
53
53
|
});
|
|
54
54
|
// Validate command
|
|
55
55
|
program
|
|
56
|
-
.command(
|
|
57
|
-
.description(
|
|
58
|
-
.option(
|
|
59
|
-
.option(
|
|
56
|
+
.command("validate")
|
|
57
|
+
.description("Validate configuration and .env files")
|
|
58
|
+
.option("-c, --config <path>", "Path to ketrics.config.json")
|
|
59
|
+
.option("-e, --env <path>", "Path to .env file")
|
|
60
60
|
.action(async (options) => {
|
|
61
61
|
await (0, validate_1.validateCommand)(options.config, options.env);
|
|
62
62
|
});
|
|
63
63
|
// Run command
|
|
64
64
|
program
|
|
65
|
-
.command(
|
|
66
|
-
.description(
|
|
67
|
-
.option(
|
|
68
|
-
.option(
|
|
65
|
+
.command("run <json-file>")
|
|
66
|
+
.description("Execute an API request from a JSON configuration file")
|
|
67
|
+
.option("-e, --env <path>", "Path to .env file")
|
|
68
|
+
.option("-v, --verbose", "Show detailed request/response information")
|
|
69
69
|
.action(async (jsonFile, options) => {
|
|
70
70
|
await (0, run_1.runCommand)(jsonFile, {
|
|
71
71
|
env: options.env,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ketrics/ketrics-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CLI tool for deploying applications to Ketrics platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/archiver": "^6.0.2",
|
|
36
36
|
"@types/node": "^20.10.0",
|
|
37
|
-
"ts-node": "^
|
|
37
|
+
"ts-node": "^1.7.1",
|
|
38
38
|
"typescript": "^5.3.3"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=24.0.0"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|