@riao/cli 3.0.0 → 4.0.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/LICENSE.md +20 -20
  3. package/README.md +5 -38
  4. package/bin/database-create-command.d.ts +21 -21
  5. package/bin/database-create-command.js +68 -82
  6. package/bin/database-create-command.js.map +1 -1
  7. package/bin/index.d.ts +2 -2
  8. package/bin/index.js +22 -22
  9. package/bin/index.js.map +1 -1
  10. package/bin/migration-create-command.d.ts +13 -13
  11. package/bin/migration-create-command.js +37 -51
  12. package/bin/migration-create-command.js.map +1 -1
  13. package/bin/migration-run-command.d.ts +14 -14
  14. package/bin/migration-run-command.js +19 -33
  15. package/bin/migration-run-command.js.map +1 -1
  16. package/bin/model-generate.d.ts +40 -0
  17. package/bin/model-generate.js +257 -0
  18. package/bin/model-generate.js.map +1 -0
  19. package/bin/schema-build-command.d.ts +12 -12
  20. package/bin/schema-build-command.js +17 -31
  21. package/bin/schema-build-command.js.map +1 -1
  22. package/bin/seed-create-command.d.ts +13 -13
  23. package/bin/seed-create-command.js +35 -49
  24. package/bin/seed-create-command.js.map +1 -1
  25. package/bin/seed-run-command.d.ts +15 -15
  26. package/bin/seed-run-command.js +28 -37
  27. package/bin/seed-run-command.js.map +1 -1
  28. package/index.d.ts +1 -1
  29. package/index.js +4 -4
  30. package/name-class-and-file.d.ts +10 -10
  31. package/name-class-and-file.js +33 -45
  32. package/name-class-and-file.js.map +1 -1
  33. package/options/database-option.d.ts +2 -2
  34. package/options/database-option.js +9 -9
  35. package/options/database-option.js.map +1 -1
  36. package/options/db-type-option.d.ts +13 -13
  37. package/options/db-type-option.js +57 -57
  38. package/options/db-type-option.js.map +1 -1
  39. package/options/direction-option.d.ts +2 -2
  40. package/options/direction-option.js +10 -10
  41. package/options/direction-option.js.map +1 -1
  42. package/options/index.d.ts +6 -6
  43. package/options/index.js +16 -16
  44. package/options/name-option.d.ts +2 -2
  45. package/options/name-option.js +8 -8
  46. package/options/name-option.js.map +1 -1
  47. package/options/seed-option.d.ts +2 -2
  48. package/options/seed-option.js +8 -8
  49. package/options/seed-option.js.map +1 -1
  50. package/options/steps-option.d.ts +2 -2
  51. package/options/steps-option.js +9 -9
  52. package/options/steps-option.js.map +1 -1
  53. package/package.json +7 -6
  54. package/utils/string-utils/to-pascal-case.d.ts +1 -0
  55. package/utils/string-utils/to-pascal-case.js +12 -0
  56. package/utils/string-utils/to-pascal-case.js.map +1 -0
  57. package/options/dry-run-option.d.ts +0 -2
  58. package/options/dry-run-option.js +0 -10
  59. package/options/dry-run-option.js.map +0 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.a = void 0;
4
- exports.a = true;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.a = void 0;
4
+ exports.a = true;
5
5
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,10 @@
1
- /**
2
- * Create a class & filename
3
- *
4
- * @param name Input name, in either kebab-case or pascal-case
5
- * @return Returns the file & class name
6
- */
7
- export declare function nameClassAndFile(name: string): {
8
- fileName: string;
9
- className: string;
10
- };
1
+ /**
2
+ * Create a class & filename
3
+ *
4
+ * @param name Input name, in either kebab-case or pascal-case
5
+ * @return Returns the file & class name
6
+ */
7
+ export declare function nameClassAndFile(name: string): {
8
+ fileName: string;
9
+ className: string;
10
+ };
@@ -1,46 +1,34 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameClassAndFile = void 0;
4
- /**
5
- * Create a class & filename
6
- *
7
- * @param name Input name, in either kebab-case or pascal-case
8
- * @return Returns the file & class name
9
- */
10
- function nameClassAndFile(name) {
11
- let kebabCase;
12
- let pascalCase;
13
- if (name.includes('-')) {
14
- // Kebab case
15
- kebabCase = name;
16
- // Pascal case
17
- pascalCase = name
18
- // Convert to pascal case
19
- .replace(/-([a-z])/gi, (g) => g[1].toLocaleUpperCase())
20
- // Remove any remaining hyphens
21
- .replace(/-/g, '')
22
- // Capitalize first letter
23
- .replace(/^([a-z])/, (g) => g.toLocaleUpperCase());
24
- }
25
- else {
26
- const seperateByDash = (g) => g[0] + '-' + g[1];
27
- // Kebab case
28
- kebabCase = name
29
- // Convert to kebab case
30
- .replace(/([a-z0-9][A-Z0-9])/g, seperateByDash)
31
- // Fix numbers followed by letters
32
- .replace(/([0-9][a-zA-Z])/g, seperateByDash)
33
- // To lowercase
34
- .toLocaleLowerCase();
35
- // Pascal case
36
- pascalCase = name
37
- // Capitalize first letter
38
- .replace(/^([a-z])/, (g) => g.toLocaleUpperCase());
39
- }
40
- return {
41
- fileName: `${kebabCase}.ts`,
42
- className: pascalCase,
43
- };
44
- }
45
- exports.nameClassAndFile = nameClassAndFile;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nameClassAndFile = void 0;
4
+ const to_pascal_case_1 = require("./utils/string-utils/to-pascal-case");
5
+ /**
6
+ * Create a class & filename
7
+ *
8
+ * @param name Input name, in either kebab-case or pascal-case
9
+ * @return Returns the file & class name
10
+ */
11
+ function nameClassAndFile(name) {
12
+ let kebabCase;
13
+ if (name.includes('-')) {
14
+ // Kebab case
15
+ kebabCase = name;
16
+ }
17
+ else {
18
+ const seperateByDash = (g) => g[0] + '-' + g[1];
19
+ // Kebab case
20
+ kebabCase = name
21
+ // Convert to kebab case
22
+ .replace(/([a-z0-9][A-Z0-9])/g, seperateByDash)
23
+ // Fix numbers followed by letters
24
+ .replace(/([0-9][a-zA-Z])/g, seperateByDash)
25
+ // To lowercase
26
+ .toLocaleLowerCase();
27
+ }
28
+ return {
29
+ fileName: `${kebabCase}.ts`,
30
+ className: (0, to_pascal_case_1.toPascalCase)(name),
31
+ };
32
+ }
33
+ exports.nameClassAndFile = nameClassAndFile;
46
34
  //# sourceMappingURL=name-class-and-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"name-class-and-file.js","sourceRoot":"","sources":["../../src/name-class-and-file.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC5C,IAAI,SAAiB,CAAC;IACtB,IAAI,UAAkB,CAAC;IAEvB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACvB,aAAa;QACb,SAAS,GAAG,IAAI,CAAC;QAEjB,cAAc;QACd,UAAU,GAAG,IAAI;YAChB,yBAAyB;aACxB,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;YACvD,+BAA+B;aAC9B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YAClB,0BAA0B;aACzB,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC;KACpD;SACI;QACJ,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,aAAa;QACb,SAAS,GAAG,IAAI;YACf,wBAAwB;aACvB,OAAO,CAAC,qBAAqB,EAAE,cAAc,CAAC;YAC/C,kCAAkC;aACjC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC;YAC5C,eAAe;aACd,iBAAiB,EAAE,CAAC;QAEtB,cAAc;QACd,UAAU,GAAG,IAAI;YAChB,0BAA0B;aACzB,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC;KACpD;IAED,OAAO;QACN,QAAQ,EAAE,GAAG,SAAS,KAAK;QAC3B,SAAS,EAAE,UAAU;KACrB,CAAC;AACH,CAAC;AAvCD,4CAuCC"}
1
+ {"version":3,"file":"name-class-and-file.js","sourceRoot":"","sources":["../../src/name-class-and-file.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC5C,IAAI,SAAiB,CAAC;IAEtB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,aAAa;QACb,SAAS,GAAG,IAAI,CAAC;IAClB,CAAC;SACI,CAAC;QACL,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,aAAa;QACb,SAAS,GAAG,IAAI;YACf,wBAAwB;aACvB,OAAO,CAAC,qBAAqB,EAAE,cAAc,CAAC;YAC/C,kCAAkC;aACjC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC;YAC5C,eAAe;aACd,iBAAiB,EAAE,CAAC;IACvB,CAAC;IAED,OAAO;QACN,QAAQ,EAAE,GAAG,SAAS,KAAK;QAC3B,SAAS,EAAE,IAAA,6BAAY,EAAC,IAAI,CAAC;KAC7B,CAAC;AACH,CAAC;AAxBD,4CAwBC"}
@@ -1,2 +1,2 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const databaseOption: CommandOptions;
1
+ import { CommandOption } from 'ts-commands';
2
+ export declare const databaseOption: CommandOption;
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.databaseOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.databaseOption = {
6
- key: 'database',
7
- type: ts_commands_1.OptionType.string,
8
- default: 'main',
9
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.databaseOption = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.databaseOption = {
6
+ key: 'database',
7
+ type: ts_commands_1.OptionType.string,
8
+ default: 'main',
9
+ };
10
10
  //# sourceMappingURL=database-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-option.js","sourceRoot":"","sources":["../../../src/options/database-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,cAAc,GAAmB;IAC7C,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM;CACf,CAAC"}
1
+ {"version":3,"file":"database-option.js","sourceRoot":"","sources":["../../../src/options/database-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAE3C,QAAA,cAAc,GAAkB;IAC5C,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM;CACf,CAAC"}
@@ -1,13 +1,13 @@
1
- import { CommandOptions } from 'ts-commands';
2
- interface DbDriverPropertiesInterface {
3
- package: string;
4
- className: string;
5
- port?: number;
6
- }
7
- export declare const dbDriverProperties: {
8
- [key: string]: DbDriverPropertiesInterface;
9
- };
10
- export type DbDrivers = keyof typeof dbDriverProperties;
11
- export declare const dbDriverKeys: string[];
12
- export declare const dbDriverOption: CommandOptions;
13
- export {};
1
+ import { CommandOption } from 'ts-commands';
2
+ interface DbDriverPropertiesInterface {
3
+ package: string;
4
+ className: string;
5
+ port?: number;
6
+ }
7
+ export declare const dbDriverProperties: {
8
+ [key: string]: DbDriverPropertiesInterface;
9
+ };
10
+ export type DbDrivers = keyof typeof dbDriverProperties;
11
+ export declare const dbDriverKeys: string[];
12
+ export declare const dbDriverOption: CommandOption;
13
+ export {};
@@ -1,58 +1,58 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dbDriverOption = exports.dbDriverKeys = exports.dbDriverProperties = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.dbDriverProperties = {
6
- mssql2017: {
7
- package: '@riao/mssql',
8
- className: 'DatabaseMsSql2017',
9
- port: 1433,
10
- },
11
- mssql2019: {
12
- package: '@riao/mssql',
13
- className: 'DatabaseMsSql2019',
14
- port: 1433,
15
- },
16
- mysql5: {
17
- package: '@riao/mysql',
18
- className: 'DatabaseMySql5',
19
- port: 3306,
20
- },
21
- mysql8: {
22
- package: '@riao/mysql',
23
- className: 'DatabaseMySql8',
24
- port: 3306,
25
- },
26
- pg12: {
27
- package: '@riao/postgres',
28
- className: 'DatabasePostgres12',
29
- port: 5432,
30
- },
31
- pg13: {
32
- package: '@riao/postgres',
33
- className: 'DatabasePostgres13',
34
- port: 5432,
35
- },
36
- pg14: {
37
- package: '@riao/postgres',
38
- className: 'DatabasePostgres14',
39
- port: 5432,
40
- },
41
- pg15: {
42
- package: '@riao/postgres',
43
- className: 'DatabasePostgres15',
44
- port: 5432,
45
- },
46
- sqlite: {
47
- package: '@riao/sqlite',
48
- className: 'DatabaseSqlite',
49
- },
50
- };
51
- exports.dbDriverKeys = Object.keys(exports.dbDriverProperties);
52
- exports.dbDriverOption = {
53
- key: 'driver',
54
- type: ts_commands_1.OptionType.string,
55
- default: 'mysql8',
56
- choices: exports.dbDriverKeys,
57
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dbDriverOption = exports.dbDriverKeys = exports.dbDriverProperties = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.dbDriverProperties = {
6
+ mssql2017: {
7
+ package: '@riao/mssql',
8
+ className: 'DatabaseMsSql2017',
9
+ port: 1433,
10
+ },
11
+ mssql2019: {
12
+ package: '@riao/mssql',
13
+ className: 'DatabaseMsSql2019',
14
+ port: 1433,
15
+ },
16
+ mysql5: {
17
+ package: '@riao/mysql',
18
+ className: 'DatabaseMySql5',
19
+ port: 3306,
20
+ },
21
+ mysql8: {
22
+ package: '@riao/mysql',
23
+ className: 'DatabaseMySql8',
24
+ port: 3306,
25
+ },
26
+ pg12: {
27
+ package: '@riao/postgres',
28
+ className: 'DatabasePostgres12',
29
+ port: 5432,
30
+ },
31
+ pg13: {
32
+ package: '@riao/postgres',
33
+ className: 'DatabasePostgres13',
34
+ port: 5432,
35
+ },
36
+ pg14: {
37
+ package: '@riao/postgres',
38
+ className: 'DatabasePostgres14',
39
+ port: 5432,
40
+ },
41
+ pg15: {
42
+ package: '@riao/postgres',
43
+ className: 'DatabasePostgres15',
44
+ port: 5432,
45
+ },
46
+ sqlite: {
47
+ package: '@riao/sqlite',
48
+ className: 'DatabaseSqlite',
49
+ },
50
+ };
51
+ exports.dbDriverKeys = Object.keys(exports.dbDriverProperties);
52
+ exports.dbDriverOption = {
53
+ key: 'driver',
54
+ type: ts_commands_1.OptionType.string,
55
+ default: 'mysql8',
56
+ choices: exports.dbDriverKeys,
57
+ };
58
58
  //# sourceMappingURL=db-type-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-type-option.js","sourceRoot":"","sources":["../../../src/options/db-type-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAQ5C,QAAA,kBAAkB,GAE3B;IACH,SAAS,EAAE;QACV,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,mBAAmB;QAC9B,IAAI,EAAE,IAAI;KACV;IACD,SAAS,EAAE;QACV,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,mBAAmB;QAC9B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,gBAAgB;KAC3B;CACD,CAAC;AAGW,QAAA,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAC,CAAC;AAE/C,QAAA,cAAc,GAAmB;IAC7C,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,oBAAY;CACrB,CAAC"}
1
+ {"version":3,"file":"db-type-option.js","sourceRoot":"","sources":["../../../src/options/db-type-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAQ3C,QAAA,kBAAkB,GAE3B;IACH,SAAS,EAAE;QACV,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,mBAAmB;QAC9B,IAAI,EAAE,IAAI;KACV;IACD,SAAS,EAAE;QACV,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,mBAAmB;QAC9B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,gBAAgB;KAC3B;CACD,CAAC;AAGW,QAAA,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAC,CAAC;AAE/C,QAAA,cAAc,GAAkB;IAC5C,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,oBAAY;CACrB,CAAC"}
@@ -1,2 +1,2 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const directionOption: CommandOptions;
1
+ import { CommandOption } from 'ts-commands';
2
+ export declare const directionOption: CommandOption;
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.directionOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.directionOption = {
6
- key: 'direction',
7
- type: ts_commands_1.OptionType.string,
8
- default: 'up',
9
- choices: ['up', 'down'],
10
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.directionOption = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.directionOption = {
6
+ key: 'direction',
7
+ type: ts_commands_1.OptionType.string,
8
+ default: 'up',
9
+ choices: ['up', 'down'],
10
+ };
11
11
  //# sourceMappingURL=direction-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"direction-option.js","sourceRoot":"","sources":["../../../src/options/direction-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,eAAe,GAAmB;IAC9C,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"direction-option.js","sourceRoot":"","sources":["../../../src/options/direction-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAE3C,QAAA,eAAe,GAAkB;IAC7C,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -1,6 +1,6 @@
1
- export { databaseOption } from './database-option';
2
- export { dbDriverOption, DbDrivers, dbDriverProperties, } from './db-type-option';
3
- export { directionOption } from './direction-option';
4
- export { nameOption } from './name-option';
5
- export { seedOption } from './seed-option';
6
- export { stepsOption } from './steps-option';
1
+ export { databaseOption } from './database-option';
2
+ export { dbDriverOption, DbDrivers, dbDriverProperties, } from './db-type-option';
3
+ export { directionOption } from './direction-option';
4
+ export { nameOption } from './name-option';
5
+ export { seedOption } from './seed-option';
6
+ export { stepsOption } from './steps-option';
package/options/index.js CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stepsOption = exports.seedOption = exports.nameOption = exports.directionOption = exports.dbDriverProperties = exports.dbDriverOption = exports.databaseOption = void 0;
4
- var database_option_1 = require("./database-option");
5
- Object.defineProperty(exports, "databaseOption", { enumerable: true, get: function () { return database_option_1.databaseOption; } });
6
- var db_type_option_1 = require("./db-type-option");
7
- Object.defineProperty(exports, "dbDriverOption", { enumerable: true, get: function () { return db_type_option_1.dbDriverOption; } });
8
- Object.defineProperty(exports, "dbDriverProperties", { enumerable: true, get: function () { return db_type_option_1.dbDriverProperties; } });
9
- var direction_option_1 = require("./direction-option");
10
- Object.defineProperty(exports, "directionOption", { enumerable: true, get: function () { return direction_option_1.directionOption; } });
11
- var name_option_1 = require("./name-option");
12
- Object.defineProperty(exports, "nameOption", { enumerable: true, get: function () { return name_option_1.nameOption; } });
13
- var seed_option_1 = require("./seed-option");
14
- Object.defineProperty(exports, "seedOption", { enumerable: true, get: function () { return seed_option_1.seedOption; } });
15
- var steps_option_1 = require("./steps-option");
16
- Object.defineProperty(exports, "stepsOption", { enumerable: true, get: function () { return steps_option_1.stepsOption; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stepsOption = exports.seedOption = exports.nameOption = exports.directionOption = exports.dbDriverProperties = exports.dbDriverOption = exports.databaseOption = void 0;
4
+ var database_option_1 = require("./database-option");
5
+ Object.defineProperty(exports, "databaseOption", { enumerable: true, get: function () { return database_option_1.databaseOption; } });
6
+ var db_type_option_1 = require("./db-type-option");
7
+ Object.defineProperty(exports, "dbDriverOption", { enumerable: true, get: function () { return db_type_option_1.dbDriverOption; } });
8
+ Object.defineProperty(exports, "dbDriverProperties", { enumerable: true, get: function () { return db_type_option_1.dbDriverProperties; } });
9
+ var direction_option_1 = require("./direction-option");
10
+ Object.defineProperty(exports, "directionOption", { enumerable: true, get: function () { return direction_option_1.directionOption; } });
11
+ var name_option_1 = require("./name-option");
12
+ Object.defineProperty(exports, "nameOption", { enumerable: true, get: function () { return name_option_1.nameOption; } });
13
+ var seed_option_1 = require("./seed-option");
14
+ Object.defineProperty(exports, "seedOption", { enumerable: true, get: function () { return seed_option_1.seedOption; } });
15
+ var steps_option_1 = require("./steps-option");
16
+ Object.defineProperty(exports, "stepsOption", { enumerable: true, get: function () { return steps_option_1.stepsOption; } });
17
17
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const nameOption: CommandOptions;
1
+ import { CommandOption } from 'ts-commands';
2
+ export declare const nameOption: CommandOption;
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.nameOption = {
6
- key: 'name',
7
- type: ts_commands_1.OptionType.string,
8
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nameOption = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.nameOption = {
6
+ key: 'name',
7
+ type: ts_commands_1.OptionType.string,
8
+ };
9
9
  //# sourceMappingURL=name-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"name-option.js","sourceRoot":"","sources":["../../../src/options/name-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,UAAU,GAAmB;IACzC,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,wBAAU,CAAC,MAAM;CACvB,CAAC"}
1
+ {"version":3,"file":"name-option.js","sourceRoot":"","sources":["../../../src/options/name-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAE3C,QAAA,UAAU,GAAkB;IACxC,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,wBAAU,CAAC,MAAM;CACvB,CAAC"}
@@ -1,2 +1,2 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const seedOption: CommandOptions;
1
+ import { CommandOption } from 'ts-commands';
2
+ export declare const seedOption: CommandOption;
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.seedOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.seedOption = {
6
- key: 'seed',
7
- type: ts_commands_1.OptionType.string,
8
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.seedOption = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.seedOption = {
6
+ key: 'seed',
7
+ type: ts_commands_1.OptionType.string,
8
+ };
9
9
  //# sourceMappingURL=seed-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"seed-option.js","sourceRoot":"","sources":["../../../src/options/seed-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,UAAU,GAAmB;IACzC,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,wBAAU,CAAC,MAAM;CACvB,CAAC"}
1
+ {"version":3,"file":"seed-option.js","sourceRoot":"","sources":["../../../src/options/seed-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAE3C,QAAA,UAAU,GAAkB;IACxC,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,wBAAU,CAAC,MAAM;CACvB,CAAC"}
@@ -1,2 +1,2 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const stepsOption: CommandOptions;
1
+ import { CommandOption } from 'ts-commands';
2
+ export declare const stepsOption: CommandOption;
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stepsOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.stepsOption = {
6
- key: 'steps',
7
- type: ts_commands_1.OptionType.number,
8
- default: -1,
9
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stepsOption = void 0;
4
+ const ts_commands_1 = require("ts-commands");
5
+ exports.stepsOption = {
6
+ key: 'steps',
7
+ type: ts_commands_1.OptionType.number,
8
+ default: -1,
9
+ };
10
10
  //# sourceMappingURL=steps-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"steps-option.js","sourceRoot":"","sources":["../../../src/options/steps-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,WAAW,GAAmB;IAC1C,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,CAAC,CAAC;CACX,CAAC"}
1
+ {"version":3,"file":"steps-option.js","sourceRoot":"","sources":["../../../src/options/steps-option.ts"],"names":[],"mappings":";;;AAAA,6CAAwD;AAE3C,QAAA,WAAW,GAAkB;IACzC,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,wBAAU,CAAC,MAAM;IACvB,OAAO,EAAE,CAAC,CAAC;CACX,CAAC"}
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
2
  "name": "@riao/cli",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "riao cli",
5
5
  "bin": {
6
6
  "riao": "./bin/index.js"
7
7
  },
8
8
  "typescript-template": {
9
- "base": "1.0.0",
10
- "cli": "1.0.0",
9
+ "base": "1.0.1",
10
+ "cli": "3.0.0",
11
11
  "jasmine": "1.0.0",
12
12
  "library": "1.0.0"
13
13
  },
14
14
  "scripts": {},
15
15
  "dependencies": {
16
- "@riao/dbal": "^3.0.1",
17
- "ts-commands": "^1.1.0"
16
+ "@riao/dbal": "^3.8.0",
17
+ "ts-commands": "^2.0.0"
18
18
  },
19
19
  "peerDependencies": {
20
- "@riao/dbal": "^3.0.0"
20
+ "@riao/dbal": "^3.0.0",
21
+ "ts-commands": "^2.0.0"
21
22
  },
22
23
  "repository": {
23
24
  "type": "git",
@@ -0,0 +1 @@
1
+ export declare function toPascalCase(name: string): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toPascalCase = void 0;
4
+ function toPascalCase(name) {
5
+ return name
6
+ .split(/[-_]+/)
7
+ .filter(Boolean)
8
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
9
+ .join('');
10
+ }
11
+ exports.toPascalCase = toPascalCase;
12
+ //# sourceMappingURL=to-pascal-case.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-pascal-case.js","sourceRoot":"","sources":["../../../../src/utils/string-utils/to-pascal-case.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAY;IACxC,OAAO,IAAI;SACT,KAAK,CAAC,OAAO,CAAC;SACd,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClD,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC;AAND,oCAMC"}
@@ -1,2 +0,0 @@
1
- import { CommandOptions } from 'ts-commands';
2
- export declare const dryRunOption: CommandOptions;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dryRunOption = void 0;
4
- const ts_commands_1 = require("ts-commands");
5
- exports.dryRunOption = {
6
- key: 'dryrun',
7
- type: ts_commands_1.OptionType.boolean,
8
- default: false,
9
- };
10
- //# sourceMappingURL=dry-run-option.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dry-run-option.js","sourceRoot":"","sources":["../../../src/options/dry-run-option.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAE5C,QAAA,YAAY,GAAmB;IAC3C,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,wBAAU,CAAC,OAAO;IACxB,OAAO,EAAE,KAAK;CACd,CAAC"}