@carno.js/cli 0.2.5 → 0.3.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/LICENSE +673 -673
- package/README.md +102 -102
- package/dist/bin.js +4 -4
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +35 -0
- package/dist/cli.js.map +1 -0
- package/dist/{index.ts → index.d.ts} +0 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/migrator/diff-calculator.d.ts +33 -0
- package/dist/migrator/diff-calculator.js +547 -0
- package/dist/migrator/diff-calculator.js.map +1 -0
- package/dist/migrator/migrator.d.ts +116 -0
- package/dist/migrator/migrator.js +715 -0
- package/dist/migrator/migrator.js.map +1 -0
- package/dist/migrator/snapshot-cleaner.d.ts +7 -0
- package/dist/migrator/snapshot-cleaner.js +108 -0
- package/dist/migrator/snapshot-cleaner.js.map +1 -0
- package/dist/migrator/snapshot-manager.d.ts +10 -0
- package/dist/migrator/snapshot-manager.js +74 -0
- package/dist/migrator/snapshot-manager.js.map +1 -0
- package/dist/routes/routes-command.d.ts +11 -0
- package/dist/routes/routes-command.js +221 -0
- package/dist/routes/routes-command.js.map +1 -0
- package/dist/src/migrator/migrator.js +5 -3
- package/dist/src/migrator/migrator.js.map +1 -1
- package/dist/src/routes/routes-command.js +50 -19
- package/dist/src/routes/routes-command.js.map +1 -1
- package/dist/tests/node-database.d.ts +2 -3
- package/dist/tests/node-database.js +6 -4
- package/dist/tests/node-database.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/cli.ts +0 -39
- package/dist/run-cli.sh +0 -2
package/dist/cli.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import 'reflect-metadata';
|
|
4
|
-
import { Command } from 'commander';
|
|
5
|
-
import { Migrator } from './migrator/migrator';
|
|
6
|
-
import { RoutesCommand } from './routes/routes-command';
|
|
7
|
-
|
|
8
|
-
const program = new Command();
|
|
9
|
-
|
|
10
|
-
program.name('[npx|bunx] cli').description('CLI to Carno.js ORM ');
|
|
11
|
-
|
|
12
|
-
program
|
|
13
|
-
.command('routes [file]')
|
|
14
|
-
.description('list all registered routes')
|
|
15
|
-
.action(async (file) => {
|
|
16
|
-
const routesCommand = new RoutesCommand();
|
|
17
|
-
await routesCommand.listRoutes(file);
|
|
18
|
-
process.exit(0);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
program
|
|
22
|
-
.command('migration:generate')
|
|
23
|
-
.description('generate a new migration file with a diff')
|
|
24
|
-
.action(async (str, options) => {
|
|
25
|
-
const migrator = new Migrator();
|
|
26
|
-
await migrator.generateMigration();
|
|
27
|
-
process.exit(0);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
program
|
|
31
|
-
.command('migration:run')
|
|
32
|
-
.description('run all pending migrations')
|
|
33
|
-
.action(async (str, options) => {
|
|
34
|
-
const migrator = new Migrator();
|
|
35
|
-
await migrator.migrate();
|
|
36
|
-
process.exit(0);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
program.parse();
|
package/dist/run-cli.sh
DELETED