@ereactthohir/cli 1.1.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/README.md +47 -0
- package/dist/commands/build.d.ts +4 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +139 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/create.d.ts +2 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +584 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/generators.d.ts +12 -0
- package/dist/commands/generators.d.ts.map +1 -0
- package/dist/commands/generators.js +180 -0
- package/dist/commands/generators.js.map +1 -0
- package/dist/commands/migrate.d.ts +4 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +83 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/serve.d.ts +2 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +120 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/generators/ModelGenerator.d.ts +23 -0
- package/dist/generators/ModelGenerator.d.ts.map +1 -0
- package/dist/generators/ModelGenerator.js +143 -0
- package/dist/generators/ModelGenerator.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const create_1 = require("./commands/create");
|
|
6
|
+
const generators_1 = require("./commands/generators");
|
|
7
|
+
const serve_1 = require("./commands/serve");
|
|
8
|
+
const migrate_1 = require("./commands/migrate");
|
|
9
|
+
const build_1 = require("./commands/build");
|
|
10
|
+
const program = new commander_1.Command();
|
|
11
|
+
program
|
|
12
|
+
.name('ereact')
|
|
13
|
+
.description('CLI for EreactThohir Framework')
|
|
14
|
+
.version('0.0.1');
|
|
15
|
+
program
|
|
16
|
+
.command('create <name>')
|
|
17
|
+
.description('Create a new EreactThohir project')
|
|
18
|
+
.action(create_1.create);
|
|
19
|
+
program
|
|
20
|
+
.command('jalan')
|
|
21
|
+
.description('Mulai server pengembangan (Start development server)')
|
|
22
|
+
.action(serve_1.serve);
|
|
23
|
+
program
|
|
24
|
+
.command('migrate')
|
|
25
|
+
.description('Run database migrations')
|
|
26
|
+
.action(migrate_1.migrate);
|
|
27
|
+
program
|
|
28
|
+
.command('migrate:rollback')
|
|
29
|
+
.description('Rollback the last database migration')
|
|
30
|
+
.action(migrate_1.rollback);
|
|
31
|
+
program
|
|
32
|
+
.command('db:seed')
|
|
33
|
+
.description('Seed the database with records')
|
|
34
|
+
.action(migrate_1.seed);
|
|
35
|
+
program
|
|
36
|
+
.command('make:controller <name>')
|
|
37
|
+
.description('Create a new controller')
|
|
38
|
+
.action(generators_1.makeController);
|
|
39
|
+
program
|
|
40
|
+
.command('make:model <name>')
|
|
41
|
+
.description('Create a new model')
|
|
42
|
+
.action(generators_1.makeModel);
|
|
43
|
+
program
|
|
44
|
+
.command('make:service <name>')
|
|
45
|
+
.description('Create a new service')
|
|
46
|
+
.action(generators_1.makeService);
|
|
47
|
+
program
|
|
48
|
+
.command('make:screen <name>')
|
|
49
|
+
.description('Create a new screen')
|
|
50
|
+
.action(generators_1.makeScreen);
|
|
51
|
+
program
|
|
52
|
+
.command('make:component <name>')
|
|
53
|
+
.description('Create a new component')
|
|
54
|
+
.action(generators_1.makeComponent);
|
|
55
|
+
program
|
|
56
|
+
.command('make:migration <name>')
|
|
57
|
+
.description('Create a new migration file')
|
|
58
|
+
.action(generators_1.makeMigration);
|
|
59
|
+
program
|
|
60
|
+
.command('make:seeder <name>')
|
|
61
|
+
.description('Create a new seeder file')
|
|
62
|
+
.action(generators_1.makeSeeder);
|
|
63
|
+
program
|
|
64
|
+
.command('make:provider <name>')
|
|
65
|
+
.description('Create a new service provider')
|
|
66
|
+
.action(generators_1.makeProvider);
|
|
67
|
+
program
|
|
68
|
+
.command('make:middleware <name>')
|
|
69
|
+
.description('Create a new middleware')
|
|
70
|
+
.action(generators_1.makeMiddleware);
|
|
71
|
+
program
|
|
72
|
+
.command('make:job <name>')
|
|
73
|
+
.description('Create a new job')
|
|
74
|
+
.action(generators_1.makeJob);
|
|
75
|
+
program
|
|
76
|
+
.command('make:policy <name>')
|
|
77
|
+
.description('Create a new policy')
|
|
78
|
+
.action(generators_1.makePolicy);
|
|
79
|
+
program
|
|
80
|
+
.command('build:android')
|
|
81
|
+
.description('Build for Android')
|
|
82
|
+
.action(build_1.buildAndroid);
|
|
83
|
+
program
|
|
84
|
+
.command('build:ios')
|
|
85
|
+
.description('Build for iOS')
|
|
86
|
+
.action(build_1.buildIOS);
|
|
87
|
+
program
|
|
88
|
+
.command('build:web')
|
|
89
|
+
.description('Build for Web')
|
|
90
|
+
.action(build_1.buildWeb);
|
|
91
|
+
program
|
|
92
|
+
.command('test')
|
|
93
|
+
.description('Run tests')
|
|
94
|
+
.action(() => console.log('Running tests...'));
|
|
95
|
+
program.parse(process.argv);
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,8CAA2C;AAC3C,sDAY+B;AAC/B,4CAAyC;AACzC,gDAA6D;AAC7D,4CAAoE;AAEpE,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACF,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,gCAAgC,CAAC;KAC7C,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,OAAO;KACF,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,mCAAmC,CAAC;KAChD,MAAM,CAAC,eAAM,CAAC,CAAC;A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,uBAAU,CAAC,CAAC;AAExB,OAAO;KACF,OAAO,CAAC,sBAAsB,CAAC;KAC/B,WAAW,CAAC,+BAA+B,CAAC;KAC5C,MAAM,CAAC,yBAAY,CAAC,CAAC;AAE1B,OAAO;KACF,OAAO,CAAC,wBAAwB,CAAC;KACjC,WAAW,CAAC,yBAAyB,CAAC;KACtC,MAAM,CAAC,2BAAc,CAAC,CAAC;AAE5B,OAAO;KACF,OAAO,CAAC,iBAAiB,CAAC;KAC1B,WAAW,CAAC,kBAAkB,CAAC;KAC/B,MAAM,CAAC,oBAAO,CAAC,CAAC;AAErB,OAAO;KACF,OAAO,CAAC,oBAAoB,CAAC;KAC7B,WAAW,CAAC,qBAAqB,CAAC;KAClC,MAAM,CAAC,uBAAU,CAAC,CAAC;AAExB,OAAO;KACF,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,mBAAmB,CAAC;KAChC,MAAM,CAAC,oBAAY,CAAC,CAAC;AAE1B,OAAO;KACF,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,eAAe,CAAC;KAC5B,MAAM,CAAC,gBAAQ,CAAC,CAAC;AAEtB,OAAO;KACF,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,eAAe,CAAC;KAC5B,MAAM,CAAC,gBAAQ,CAAC,CAAC;AAEtB,OAAO;KACF,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,WAAW,CAAC;KACxB,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAEnD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ereactthohir/cli",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "CLI tools with model, controller, migration, and service generators",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"ereact": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"watch": "tsc -w",
|
|
20
|
+
"start": "node dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"cli",
|
|
24
|
+
"ereactthohir",
|
|
25
|
+
"framework"
|
|
26
|
+
],
|
|
27
|
+
"author": "KangPCode (Dhafa Nazula Permadi)",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"chalk": "^4.1.2",
|
|
31
|
+
"commander": "^12.0.0",
|
|
32
|
+
"esbuild": "^0.19.0",
|
|
33
|
+
"fs-extra": "^11.1.0",
|
|
34
|
+
"inquirer": "^9.2.0",
|
|
35
|
+
"ora": "^5.4.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/fs-extra": "^11.0.0",
|
|
39
|
+
"@types/inquirer": "^9.0.0",
|
|
40
|
+
"@types/node": "^20.19.32",
|
|
41
|
+
"@types/react": "^19.2.13",
|
|
42
|
+
"@types/react-dom": "^19.2.3",
|
|
43
|
+
"ts-node": "^10.9.2",
|
|
44
|
+
"typescript": "^5.9.3"
|
|
45
|
+
}
|
|
46
|
+
}
|