arkos 1.1.17-test → 1.1.18-test
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.
|
@@ -1,49 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startCommand = exports.devCommand = exports.buildCommand = void 0;
|
|
4
|
-
exports.createProgram = createProgram;
|
|
6
|
+
exports.startCommand = exports.devCommand = exports.buildCommand = exports.program = void 0;
|
|
5
7
|
exports.getVersion = getVersion;
|
|
6
|
-
exports.runCLI = runCLI;
|
|
7
8
|
const commander_1 = require("commander");
|
|
8
9
|
const build_1 = require("./build");
|
|
9
10
|
Object.defineProperty(exports, "buildCommand", { enumerable: true, get: function () { return build_1.buildCommand; } });
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
13
|
const dev_1 = require("./dev");
|
|
11
14
|
Object.defineProperty(exports, "devCommand", { enumerable: true, get: function () { return dev_1.devCommand; } });
|
|
12
15
|
const start_1 = require("./start");
|
|
13
16
|
Object.defineProperty(exports, "startCommand", { enumerable: true, get: function () { return start_1.startCommand; } });
|
|
14
|
-
function createProgram() {
|
|
15
|
-
const program = new commander_1.Command()
|
|
16
|
-
.name("arkos")
|
|
17
|
-
.description("Arkos framework CLI")
|
|
18
|
-
.version(getVersion());
|
|
19
|
-
program
|
|
20
|
-
.command("build")
|
|
21
|
-
.description("Build your Arkos project")
|
|
22
|
-
.option("-e, --env <environment>", "Environment to build for")
|
|
23
|
-
.action((options) => (0, build_1.buildCommand)(options));
|
|
24
|
-
program
|
|
25
|
-
.command("dev")
|
|
26
|
-
.description("Run development server")
|
|
27
|
-
.option("-p, --port <port>", "Port to run server on")
|
|
28
|
-
.option("-h, --host <host>", "Host to run server on")
|
|
29
|
-
.action((options) => (0, dev_1.devCommand)(options));
|
|
30
|
-
program
|
|
31
|
-
.command("start")
|
|
32
|
-
.description("Run production server")
|
|
33
|
-
.option("-p, --port <port>", "Port to run server on")
|
|
34
|
-
.option("-h, --host <host>", "Host to run server on")
|
|
35
|
-
.action((options) => (0, start_1.startCommand)(options));
|
|
36
|
-
return program;
|
|
37
|
-
}
|
|
38
17
|
function getVersion() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function runCLI(argv = process.argv) {
|
|
42
|
-
const program = createProgram();
|
|
43
|
-
program.parse(argv);
|
|
44
|
-
return program;
|
|
45
|
-
}
|
|
46
|
-
if (require.main === module) {
|
|
47
|
-
runCLI();
|
|
18
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(path_1.default.join(__dirname, "../../../../package.json"), "utf8"));
|
|
19
|
+
return packageJson.version || "1.0.0";
|
|
48
20
|
}
|
|
21
|
+
const program = new commander_1.Command();
|
|
22
|
+
exports.program = program;
|
|
23
|
+
program.name("arkos").description("Arkos framework CLI").version(getVersion());
|
|
24
|
+
program
|
|
25
|
+
.command("build")
|
|
26
|
+
.description("Build your Arkos project")
|
|
27
|
+
.option("-m, --module <type>", "Module type (cjs or esm)", "cjs")
|
|
28
|
+
.action(build_1.buildCommand);
|
|
29
|
+
program
|
|
30
|
+
.command("dev")
|
|
31
|
+
.description("Run development server")
|
|
32
|
+
.option("-p, --port <number>", "Port number", "8000")
|
|
33
|
+
.option("-h, --host <host>", "Host to bind to", "localhost")
|
|
34
|
+
.action(dev_1.devCommand);
|
|
35
|
+
program
|
|
36
|
+
.command("start")
|
|
37
|
+
.description("Run production server")
|
|
38
|
+
.option("-p, --port <number>", "Port number", "8000")
|
|
39
|
+
.option("-h, --host <host>", "Host to bind to", "localhost")
|
|
40
|
+
.action(start_1.startCommand);
|
|
41
|
+
program.parse(process.argv);
|
|
49
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/cli/index.ts"],"names":[],"mappings":";;;;;;AAQA,gCAMC;AAbD,yCAAoC;AACpC,mCAAuC;AAwCrB,6FAxCT,oBAAY,OAwCS;AAvC9B,gDAAwB;AACxB,4CAAoB;AACpB,+BAAmC;AAqCH,2FArCvB,gBAAU,OAqCuB;AApC1C,mCAAuC;AAoCK,6FApCnC,oBAAY,OAoCmC;AAlCxD,SAAgB,UAAU;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,EAAE,MAAM,CAAC,CAC1E,CAAC;IAEF,OAAO,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;AACxC,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AA0BrB,0BAAO;AAxBhB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/E,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAChE,MAAM,CAAC,oBAAY,CAAC,CAAC;AAExB,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,CAAC;KACpD,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,CAAC;KAC3D,MAAM,CAAC,gBAAU,CAAC,CAAC;AAEtB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,uBAAuB,CAAC;KACpC,MAAM,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,CAAC;KACpD,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,CAAC;KAC3D,MAAM,CAAC,oBAAY,CAAC,CAAC;AAExB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC","sourcesContent":["// src/utils/cli/index.ts\nimport { Command } from \"commander\";\nimport { buildCommand } from \"./build\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport { devCommand } from \"./dev\";\nimport { startCommand } from \"./start\";\n\nexport function getVersion() {\n const packageJson = JSON.parse(\n fs.readFileSync(path.join(__dirname, \"../../../../package.json\"), \"utf8\")\n );\n\n return packageJson.version || \"1.0.0\";\n}\n\nconst program = new Command();\n\nprogram.name(\"arkos\").description(\"Arkos framework CLI\").version(getVersion());\n\nprogram\n .command(\"build\")\n .description(\"Build your Arkos project\")\n .option(\"-m, --module <type>\", \"Module type (cjs or esm)\", \"cjs\")\n .action(buildCommand);\n\nprogram\n .command(\"dev\")\n .description(\"Run development server\")\n .option(\"-p, --port <number>\", \"Port number\", \"8000\")\n .option(\"-h, --host <host>\", \"Host to bind to\", \"localhost\")\n .action(devCommand);\n\nprogram\n .command(\"start\")\n .description(\"Run production server\")\n .option(\"-p, --port <number>\", \"Port number\", \"8000\")\n .option(\"-h, --host <host>\", \"Host to bind to\", \"localhost\")\n .action(startCommand);\n\nprogram.parse(process.argv);\n\nexport { program, buildCommand, devCommand, startCommand };\n"]}
|
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { buildCommand } from "./build";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import fs from "fs";
|
|
3
5
|
import { devCommand } from "./dev";
|
|
4
|
-
import { startCommand
|
|
5
|
-
export function createProgram() {
|
|
6
|
-
const program = new Command()
|
|
7
|
-
.name("arkos")
|
|
8
|
-
.description("Arkos framework CLI")
|
|
9
|
-
.version(getVersion());
|
|
10
|
-
program
|
|
11
|
-
.command("build")
|
|
12
|
-
.description("Build your Arkos project")
|
|
13
|
-
.option("-e, --env <environment>", "Environment to build for")
|
|
14
|
-
.action((options) => buildCommand(options));
|
|
15
|
-
program
|
|
16
|
-
.command("dev")
|
|
17
|
-
.description("Run development server")
|
|
18
|
-
.option("-p, --port <port>", "Port to run server on")
|
|
19
|
-
.option("-h, --host <host>", "Host to run server on")
|
|
20
|
-
.action((options) => devCommand(options));
|
|
21
|
-
program
|
|
22
|
-
.command("start")
|
|
23
|
-
.description("Run production server")
|
|
24
|
-
.option("-p, --port <port>", "Port to run server on")
|
|
25
|
-
.option("-h, --host <host>", "Host to run server on")
|
|
26
|
-
.action((options) => startCommandAction(options));
|
|
27
|
-
return program;
|
|
28
|
-
}
|
|
6
|
+
import { startCommand } from "./start";
|
|
29
7
|
export function getVersion() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export function runCLI(argv = process.argv) {
|
|
33
|
-
const program = createProgram();
|
|
34
|
-
program.parse(argv);
|
|
35
|
-
return program;
|
|
36
|
-
}
|
|
37
|
-
export { buildCommand, devCommand, startCommandAction as startCommand };
|
|
38
|
-
if (require.main === module) {
|
|
39
|
-
runCLI();
|
|
8
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, "../../../../package.json"), "utf8"));
|
|
9
|
+
return packageJson.version || "1.0.0";
|
|
40
10
|
}
|
|
11
|
+
const program = new Command();
|
|
12
|
+
program.name("arkos").description("Arkos framework CLI").version(getVersion());
|
|
13
|
+
program
|
|
14
|
+
.command("build")
|
|
15
|
+
.description("Build your Arkos project")
|
|
16
|
+
.option("-m, --module <type>", "Module type (cjs or esm)", "cjs")
|
|
17
|
+
.action(buildCommand);
|
|
18
|
+
program
|
|
19
|
+
.command("dev")
|
|
20
|
+
.description("Run development server")
|
|
21
|
+
.option("-p, --port <number>", "Port number", "8000")
|
|
22
|
+
.option("-h, --host <host>", "Host to bind to", "localhost")
|
|
23
|
+
.action(devCommand);
|
|
24
|
+
program
|
|
25
|
+
.command("start")
|
|
26
|
+
.description("Run production server")
|
|
27
|
+
.option("-p, --port <number>", "Port number", "8000")
|
|
28
|
+
.option("-h, --host <host>", "Host to bind to", "localhost")
|
|
29
|
+
.action(startCommand);
|
|
30
|
+
program.parse(process.argv);
|
|
31
|
+
export { program, buildCommand, devCommand, startCommand };
|
|
41
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/cli/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,UAAU,UAAU;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,EAAE,MAAM,CAAC,CAC1E,CAAC;IAEF,OAAO,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;AACxC,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/E,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAChE,MAAM,CAAC,YAAY,CAAC,CAAC;AAExB,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,CAAC;KACpD,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,CAAC;KAC3D,MAAM,CAAC,UAAU,CAAC,CAAC;AAEtB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,uBAAuB,CAAC;KACpC,MAAM,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,CAAC;KACpD,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,CAAC;KAC3D,MAAM,CAAC,YAAY,CAAC,CAAC;AAExB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC","sourcesContent":["// src/utils/cli/index.ts\nimport { Command } from \"commander\";\nimport { buildCommand } from \"./build\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport { devCommand } from \"./dev\";\nimport { startCommand } from \"./start\";\n\nexport function getVersion() {\n const packageJson = JSON.parse(\n fs.readFileSync(path.join(__dirname, \"../../../../package.json\"), \"utf8\")\n );\n\n return packageJson.version || \"1.0.0\";\n}\n\nconst program = new Command();\n\nprogram.name(\"arkos\").description(\"Arkos framework CLI\").version(getVersion());\n\nprogram\n .command(\"build\")\n .description(\"Build your Arkos project\")\n .option(\"-m, --module <type>\", \"Module type (cjs or esm)\", \"cjs\")\n .action(buildCommand);\n\nprogram\n .command(\"dev\")\n .description(\"Run development server\")\n .option(\"-p, --port <number>\", \"Port number\", \"8000\")\n .option(\"-h, --host <host>\", \"Host to bind to\", \"localhost\")\n .action(devCommand);\n\nprogram\n .command(\"start\")\n .description(\"Run production server\")\n .option(\"-p, --port <number>\", \"Port number\", \"8000\")\n .option(\"-h, --host <host>\", \"Host to bind to\", \"localhost\")\n .action(startCommand);\n\nprogram.parse(process.argv);\n\nexport { program, buildCommand, devCommand, startCommand };\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { buildCommand } from "./build";
|
|
3
3
|
import { devCommand } from "./dev";
|
|
4
|
-
import { startCommand
|
|
5
|
-
export declare function
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export { buildCommand, devCommand, startCommandAction as startCommand };
|
|
4
|
+
import { startCommand } from "./start";
|
|
5
|
+
export declare function getVersion(): any;
|
|
6
|
+
declare const program: Command;
|
|
7
|
+
export { program, buildCommand, devCommand, startCommand };
|