@moriajs/cli 0.1.1

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.
@@ -0,0 +1,4 @@
1
+
2
+ > @moriajs/cli@0.1.1 build C:\Codes\node\2026\github\moriajs\packages\cli
3
+ > tsc
4
+
@@ -0,0 +1,4 @@
1
+
2
+ > @moriajs/cli@0.0.1 typecheck C:\Codes\node\2026\github\moriajs\packages\cli
3
+ > tsc --noEmit
4
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Guntur D
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/bin.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MoriaJS CLI entry point.
4
+ * Usage: moria <command> [options]
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
package/dist/bin.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MoriaJS CLI entry point.
4
+ * Usage: moria <command> [options]
5
+ */
6
+ import { cli } from './index.js';
7
+ cli.parse();
8
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,GAAG,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @moriajs/cli
3
+ *
4
+ * CLI tool for MoriaJS framework development.
5
+ * Commands: dev, build, start, generate
6
+ */
7
+ export declare const cli: import("cac").CAC;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,GAAG,mBAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @moriajs/cli
3
+ *
4
+ * CLI tool for MoriaJS framework development.
5
+ * Commands: dev, build, start, generate
6
+ */
7
+ import { cac } from 'cac';
8
+ import pc from 'picocolors';
9
+ const VERSION = '0.0.1';
10
+ export const cli = cac('moria');
11
+ // ─── dev ────────────────────────────────────────────
12
+ cli
13
+ .command('dev', 'Start the development server with HMR')
14
+ .option('--port <port>', 'Port to listen on', { default: 3000 })
15
+ .option('--host <host>', 'Host to bind to', { default: 'localhost' })
16
+ .action(async (options) => {
17
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
18
+ console.log(pc.green('Starting dev server...'));
19
+ console.log(pc.dim(` → http://${options.host}:${options.port}`));
20
+ console.log();
21
+ // TODO: Phase 3 — Start Fastify + Vite dev server
22
+ console.log(pc.yellow('⚠ Dev server not yet implemented. Coming in Phase 3.'));
23
+ });
24
+ // ─── build ──────────────────────────────────────────
25
+ cli
26
+ .command('build', 'Build for production')
27
+ .action(async () => {
28
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
29
+ console.log(pc.green('Building for production...'));
30
+ console.log();
31
+ // TODO: Phase 3 — Vite production build
32
+ console.log(pc.yellow('⚠ Build not yet implemented. Coming in Phase 3.'));
33
+ });
34
+ // ─── start ──────────────────────────────────────────
35
+ cli
36
+ .command('start', 'Start the production server')
37
+ .option('--port <port>', 'Port to listen on', { default: 3000 })
38
+ .action(async (options) => {
39
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
40
+ console.log(pc.green('Starting production server...'));
41
+ console.log(pc.dim(` → port ${options.port}`));
42
+ console.log();
43
+ // TODO: Phase 3 — Start Fastify production server
44
+ console.log(pc.yellow('⚠ Production server not yet implemented. Coming in Phase 3.'));
45
+ });
46
+ // ─── generate ───────────────────────────────────────
47
+ cli
48
+ .command('generate <type> <name>', 'Generate a route, component, or model')
49
+ .alias('g')
50
+ .action(async (type, name) => {
51
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
52
+ console.log(pc.green(`Generating ${type}: ${name}`));
53
+ console.log();
54
+ // TODO: Phase 7 — Code generation
55
+ console.log(pc.yellow('⚠ Generators not yet implemented. Coming in Phase 7.'));
56
+ });
57
+ // ─── version & help ─────────────────────────────────
58
+ cli.version(VERSION);
59
+ cli.help();
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,OAAO,GAAG,OAAO,CA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AAG,CAAC,EAAE,CAAC,MAAM,CAAC,sDAAsD,CAAC,CAAC,CAAC;AACnF,CAAC,CAAC,CAAC;AAEP,uDAAuD;AACvD,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,GAAG,CAAC,IAAI,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@moriajs/cli",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "MoriaJS CLI — dev, build, and generate commands",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "moria": "./dist/bin.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "dependencies": {
18
+ "cac": "^6.7.0",
19
+ "picocolors": "^1.1.0"
20
+ },
21
+ "devDependencies": {
22
+ "typescript": "^5.7.0",
23
+ "rimraf": "^6.0.0",
24
+ "@types/node": "^22.0.0"
25
+ },
26
+ "license": "MIT",
27
+ "author": "Guntur-D <guntur.d@gmail.com>",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/guntur-d/moriajs.git",
31
+ "directory": "packages/cli"
32
+ },
33
+ "homepage": "https://github.com/guntur-d/moriajs/tree/main/packages/cli#readme",
34
+ "bugs": {
35
+ "url": "https://github.com/guntur-d/moriajs/issues"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc",
42
+ "dev": "tsc --watch",
43
+ "typecheck": "tsc --noEmit",
44
+ "clean": "rimraf dist .turbo"
45
+ }
46
+ }
package/src/bin.ts ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * MoriaJS CLI entry point.
5
+ * Usage: moria <command> [options]
6
+ */
7
+
8
+ import { cli } from './index.js';
9
+
10
+ cli.parse();
package/src/index.ts ADDED
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @moriajs/cli
3
+ *
4
+ * CLI tool for MoriaJS framework development.
5
+ * Commands: dev, build, start, generate
6
+ */
7
+
8
+ import { cac } from 'cac';
9
+ import pc from 'picocolors';
10
+
11
+ const VERSION = '0.0.1';
12
+
13
+ export const cli = cac('moria');
14
+
15
+ // ─── dev ────────────────────────────────────────────
16
+ cli
17
+ .command('dev', 'Start the development server with HMR')
18
+ .option('--port <port>', 'Port to listen on', { default: 3000 })
19
+ .option('--host <host>', 'Host to bind to', { default: 'localhost' })
20
+ .action(async (options) => {
21
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
22
+ console.log(pc.green('Starting dev server...'));
23
+ console.log(pc.dim(` → http://${options.host}:${options.port}`));
24
+ console.log();
25
+
26
+ // TODO: Phase 3 — Start Fastify + Vite dev server
27
+ console.log(pc.yellow('⚠ Dev server not yet implemented. Coming in Phase 3.'));
28
+ });
29
+
30
+ // ─── build ──────────────────────────────────────────
31
+ cli
32
+ .command('build', 'Build for production')
33
+ .action(async () => {
34
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
35
+ console.log(pc.green('Building for production...'));
36
+ console.log();
37
+
38
+ // TODO: Phase 3 — Vite production build
39
+ console.log(pc.yellow('⚠ Build not yet implemented. Coming in Phase 3.'));
40
+ });
41
+
42
+ // ─── start ──────────────────────────────────────────
43
+ cli
44
+ .command('start', 'Start the production server')
45
+ .option('--port <port>', 'Port to listen on', { default: 3000 })
46
+ .action(async (options) => {
47
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
48
+ console.log(pc.green('Starting production server...'));
49
+ console.log(pc.dim(` → port ${options.port}`));
50
+ console.log();
51
+
52
+ // TODO: Phase 3 — Start Fastify production server
53
+ console.log(pc.yellow('⚠ Production server not yet implemented. Coming in Phase 3.'));
54
+ });
55
+
56
+ // ─── generate ───────────────────────────────────────
57
+ cli
58
+ .command('generate <type> <name>', 'Generate a route, component, or model')
59
+ .alias('g')
60
+ .action(async (type: string, name: string) => {
61
+ console.log(pc.cyan('🏔️ MoriaJS') + pc.dim(` v${VERSION}`));
62
+ console.log(pc.green(`Generating ${type}: ${name}`));
63
+ console.log();
64
+
65
+ // TODO: Phase 7 — Code generation
66
+ console.log(pc.yellow('⚠ Generators not yet implemented. Coming in Phase 7.'));
67
+ });
68
+
69
+ // ─── version & help ─────────────────────────────────
70
+ cli.version(VERSION);
71
+ cli.help();
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src"
6
+ },
7
+ "include": [
8
+ "src"
9
+ ]
10
+ }