@cheetah.js/cli 0.1.17 → 0.1.19

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 CHANGED
@@ -1,27 +1,27 @@
1
- ## Cheetah.js CLI
2
- The CLI (Command Line Interface) for Cheetah.js.
3
-
4
- ### Instalação
5
- To install, you can use npm or bun:
6
- ```bash
7
- bun install @cheetahjs/cli
8
- ```
9
-
10
- ### Uso
11
- Você pode usar a CLI com npx ou bunx.
12
-
13
- ### Gerar uma nova migração
14
- Para gerar uma nova migração, use o comando
15
- ```bash
16
- bunx cli migration:generate
17
- ```
18
- Isso irá gerar um novo arquivo de migração com uma diferença.
19
-
20
- ### Executar todas as migrações pendentes
21
- Para executar todas as migrações pendentes, use o comando
22
- ```bash
23
- bunx cli migration:run
24
- ```
25
-
26
- ### Contribuição
1
+ ## Cheetah.js CLI
2
+ The CLI (Command Line Interface) for Cheetah.js.
3
+
4
+ ### Instalação
5
+ To install, you can use npm or bun:
6
+ ```bash
7
+ bun install @cheetahjs/cli
8
+ ```
9
+
10
+ ### Uso
11
+ Você pode usar a CLI com npx ou bunx.
12
+
13
+ ### Gerar uma nova migração
14
+ Para gerar uma nova migração, use o comando
15
+ ```bash
16
+ bunx cli migration:generate
17
+ ```
18
+ Isso irá gerar um novo arquivo de migração com uma diferença.
19
+
20
+ ### Executar todas as migrações pendentes
21
+ Para executar todas as migrações pendentes, use o comando
22
+ ```bash
23
+ bunx cli migration:run
24
+ ```
25
+
26
+ ### Contribuição
27
27
  Contribuições são bem-vindas. Por favor, abra um problema ou faça um pull request com suas mudanças.
package/cheetah.config.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { ConnectionSettings, PgDriver } from '@cheetah.js/orm';
2
-
3
- const config: ConnectionSettings = {
4
- host: 'localhost',
5
- port: 5432,
6
- database: 'postgres',
7
- username: 'postgres',
8
- password: 'postgres',
9
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
- // @ts-ignore
11
- driver: PgDriver,
12
- migrationPath: '/database/migration',
13
- };
14
-
15
- export default config;
1
+ import { ConnectionSettings, PgDriver } from '@cheetah.js/orm';
2
+
3
+ const config: ConnectionSettings = {
4
+ host: 'localhost',
5
+ port: 5432,
6
+ database: 'postgres',
7
+ username: 'postgres',
8
+ password: 'postgres',
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore
11
+ driver: PgDriver,
12
+ migrationPath: '/database/migration',
13
+ };
14
+
15
+ export default config;
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,42 +1,46 @@
1
- {
2
- "name": "@cheetah.js/cli",
3
- "description": "Cheetah.js CLI - Generate migrations, models, controllers and more. (In development)",
4
- "version": "0.1.17",
5
- "module": "dist/index.js",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "lint": "eslint \"{src,apps,libs,test}/**/*.ts\""
10
- },
11
- "dependencies": {
12
- "commander": "^11.1.0",
13
- "knex": "^3.0.1",
14
- "ts-node": "^10.9.1"
15
- },
16
- "devDependencies": {
17
- "@typescript-eslint/eslint-plugin": "^6.12.0",
18
- "@typescript-eslint/parser": "^6.12.0",
19
- "bun-types": "latest",
20
- "eslint": "^8.54.0",
21
- "eslint-config-prettier": "^9.0.0",
22
- "eslint-plugin-prettier": "^5.0.1",
23
- "pg": "^8.11.3",
24
- "prettier": "^3.1.0",
25
- "reflect-metadata": "^0.1.13"
26
- },
27
- "bin": "./dist/run-cli.sh",
28
- "peerDependencies": {
29
- "@cheetah.js/core": "^0.1.34",
30
- "@cheetah.js/orm": "^0.1.42",
31
- "typescript": "^5.0.0"
32
- },
33
- "peerDependenciesMeta": {
34
- "pg": {
35
- "optional": true
36
- }
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- },
41
- "author": "Lucas Mota"
42
- }
1
+ {
2
+ "name": "@cheetah.js/cli",
3
+ "description": "Cheetah.js CLI - Generate migrations, models, controllers and more. (In development)",
4
+ "version": "0.1.19",
5
+ "module": "dist/index.js",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "prepublishOnly": "npm run build",
11
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\""
12
+ },
13
+ "dependencies": {
14
+ "commander": "^11.1.0",
15
+ "knex": "^3.0.1",
16
+ "ts-node": "^10.9.1"
17
+ },
18
+ "devDependencies": {
19
+ "@typescript-eslint/eslint-plugin": "^6.12.0",
20
+ "@typescript-eslint/parser": "^6.12.0",
21
+ "bun-types": "latest",
22
+ "eslint": "^8.54.0",
23
+ "eslint-config-prettier": "^9.0.0",
24
+ "eslint-plugin-prettier": "^5.0.1",
25
+ "pg": "^8.11.3",
26
+ "prettier": "^3.1.0",
27
+ "reflect-metadata": "^0.1.13"
28
+ },
29
+ "bin": {
30
+ "cheetah": "./dist/run-cli.sh"
31
+ },
32
+ "peerDependencies": {
33
+ "@cheetah.js/core": "^0.1.34",
34
+ "@cheetah.js/orm": "^0.1.42",
35
+ "typescript": "^5.0.0"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "pg": {
39
+ "optional": true
40
+ }
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "author": "Lucas Mota"
46
+ }
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$" />
5
- <orderEntry type="inheritedJdk" />
6
- <orderEntry type="sourceFolder" forTests="false" />
7
- </component>
8
- </module>
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="GitToolBoxProjectSettings">
4
- <option name="commitMessageIssueKeyValidationOverride">
5
- <BoolValueOverride>
6
- <option name="enabled" value="true" />
7
- </BoolValueOverride>
8
- </option>
9
- <option name="commitMessageValidationEnabledOverride">
10
- <BoolValueOverride>
11
- <option name="enabled" value="true" />
12
- </BoolValueOverride>
13
- </option>
14
- </component>
15
- </project>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/cheetah-cli.iml" filepath="$PROJECT_DIR$/.idea/cheetah-cli.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/php.xml DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MessDetectorOptionsConfiguration">
4
- <option name="transferred" value="true" />
5
- </component>
6
- <component name="PHPCSFixerOptionsConfiguration">
7
- <option name="transferred" value="true" />
8
- </component>
9
- <component name="PHPCodeSnifferOptionsConfiguration">
10
- <option name="highlightLevel" value="WARNING" />
11
- <option name="transferred" value="true" />
12
- </component>
13
- <component name="PhpStanOptionsConfiguration">
14
- <option name="transferred" value="true" />
15
- </component>
16
- <component name="PsalmOptionsConfiguration">
17
- <option name="transferred" value="true" />
18
- </component>
19
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
package/bun.lockb DELETED
Binary file
@@ -1,5 +0,0 @@
1
- import { BaseEntity } from '@cheetah.js/orm';
2
- export declare class CheetahMigration extends BaseEntity {
3
- migrationFile: string;
4
- createdAt: Date;
5
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CheetahMigration = void 0;
13
- const orm_1 = require("@cheetah.js/orm");
14
- let CheetahMigration = class CheetahMigration extends orm_1.BaseEntity {
15
- constructor() {
16
- super(...arguments);
17
- this.createdAt = new Date();
18
- }
19
- };
20
- exports.CheetahMigration = CheetahMigration;
21
- __decorate([
22
- (0, orm_1.PrimaryKey)(),
23
- __metadata("design:type", String)
24
- ], CheetahMigration.prototype, "migrationFile", void 0);
25
- __decorate([
26
- (0, orm_1.Property)(),
27
- __metadata("design:type", Date)
28
- ], CheetahMigration.prototype, "createdAt", void 0);
29
- exports.CheetahMigration = CheetahMigration = __decorate([
30
- (0, orm_1.Entity)()
31
- ], CheetahMigration);
32
- //# sourceMappingURL=cheetah-migration.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cheetah-migration.entity.js","sourceRoot":"","sources":["../../src/entities/cheetah-migration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA2E;AAGpE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,gBAAU;IAAzC;;QAKE,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IACtC,CAAC;CAAA,CAAA;AANY,4CAAgB;AAEpB;IADN,IAAA,gBAAU,GAAE;;uDACgB;AAGtB;IADN,IAAA,cAAQ,GAAE;8BACO,IAAI;mDAAc;2BALzB,gBAAgB;IAD5B,IAAA,YAAM,GAAE;GACI,gBAAgB,CAM5B"}
package/dist/run-cli.sh DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/bash
2
- node --experimental-modules ./node_modules/@cheetah.js/cli/dist/cli.js "$@"