@nexus-ioc/cli 0.1.4 → 0.1.6

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 (32) hide show
  1. package/README.md +133 -1
  2. package/dist/actions/abstract.action.d.ts +1 -1
  3. package/dist/actions/bootstrap.action.d.ts +10 -0
  4. package/dist/actions/bootstrap.action.js +83 -0
  5. package/dist/actions/bootstrap.action.js.map +1 -0
  6. package/dist/actions/visualize.action.d.ts +10 -0
  7. package/dist/actions/visualize.action.js +80 -0
  8. package/dist/actions/visualize.action.js.map +1 -0
  9. package/dist/commands/abstract.command.d.ts +3 -0
  10. package/dist/commands/abstract.command.js +3 -0
  11. package/dist/commands/abstract.command.js.map +1 -1
  12. package/dist/commands/bootstrap.command.d.ts +5 -0
  13. package/dist/commands/bootstrap.command.js +23 -0
  14. package/dist/commands/bootstrap.command.js.map +1 -0
  15. package/dist/commands/generate.command.d.ts +0 -3
  16. package/dist/commands/generate.command.js +0 -4
  17. package/dist/commands/generate.command.js.map +1 -1
  18. package/dist/commands/install.command.d.ts +0 -3
  19. package/dist/commands/install.command.js +1 -5
  20. package/dist/commands/install.command.js.map +1 -1
  21. package/dist/commands/visualizer.command.d.ts +5 -0
  22. package/dist/commands/visualizer.command.js +24 -0
  23. package/dist/commands/visualizer.command.js.map +1 -0
  24. package/dist/commands.helper.js +16 -0
  25. package/dist/commands.helper.js.map +1 -1
  26. package/dist/templates/bootstrap.template.d.ts +4 -0
  27. package/dist/templates/bootstrap.template.js +22 -0
  28. package/dist/templates/bootstrap.template.js.map +1 -0
  29. package/dist/templates/visualizer.template.d.ts +4 -0
  30. package/dist/templates/visualizer.template.js +25 -0
  31. package/dist/templates/visualizer.template.js.map +1 -0
  32. package/package.json +7 -9
package/README.md CHANGED
@@ -1 +1,133 @@
1
- nexus-cli generate auth ./apps/auth
1
+
2
+ # Nexus IoC CLI
3
+
4
+ `@nexus-ioc/cli` is a command-line interface (CLI) tool for working with the Nexus IoC library. It helps developers create services, modules, and other components, simplifying the development and setup process.
5
+
6
+ ## Installation
7
+
8
+ ### Global Installation
9
+
10
+ You can install the CLI globally using npm:
11
+
12
+ ```bash
13
+ npm install -g @nexus-ioc/cli
14
+ ```
15
+
16
+ ### Using with `npx`
17
+
18
+ You can also use the CLI without global installation using `npx`:
19
+
20
+ ```bash
21
+ npx @nexus-ioc/cli <command> [options]
22
+ ```
23
+
24
+ ## Commands
25
+
26
+ ### `generate` (or `g`)
27
+
28
+ Generates a new component, such as a service or module.
29
+
30
+ #### Syntax
31
+
32
+ ```bash
33
+ nexus-cli generate <type> <name> [path]
34
+ ```
35
+
36
+ or the shorthand form:
37
+
38
+ ```bash
39
+ nexus-cli g <type> <name> [path]
40
+ ```
41
+
42
+ - `<type>`: The type of component to generate (e.g., `service`, `module`).
43
+ - `<name>`: The name of the new component.
44
+ - `[path]`: (Optional) The path where the new component will be created.
45
+
46
+ #### Examples
47
+
48
+ Creating a new `auth` service in the `./apps/auth` folder:
49
+
50
+ ```bash
51
+ nexus-cli generate service auth ./apps/auth
52
+ ```
53
+
54
+ or
55
+
56
+ ```bash
57
+ nexus-cli g service auth ./apps/auth
58
+ ```
59
+
60
+ Creating a new `user` module in the current directory:
61
+
62
+ ```bash
63
+ nexus-cli generate module user
64
+ ```
65
+
66
+ ### `install` (or `i`)
67
+
68
+ Installs the Nexus IoC package.
69
+
70
+ #### Syntax
71
+
72
+ ```bash
73
+ nexus-cli install
74
+ ```
75
+
76
+ or the shorthand form:
77
+
78
+ ```bash
79
+ nexus-cli i
80
+ ```
81
+
82
+ Installs `nexus-ioc` in your project.
83
+
84
+ #### Example
85
+
86
+ ```bash
87
+ nexus-cli install
88
+ ```
89
+
90
+ ## Options
91
+
92
+ - `--help`: Shows help for using the command.
93
+ - `--version`: Shows the CLI version.
94
+
95
+ ## Usage Examples
96
+
97
+ 1. **Check the CLI version:**
98
+
99
+ ```bash
100
+ nexus-cli --version
101
+ ```
102
+
103
+ 2. **Get help for the generate command:**
104
+
105
+ ```bash
106
+ nexus-cli generate --help
107
+ ```
108
+
109
+ 3. **Generate a new service:**
110
+
111
+ ```bash
112
+ nexus-cli g service auth ./apps/auth
113
+ ```
114
+
115
+ ## License
116
+
117
+ This project is licensed under the MIT License. See the LICENSE file for details.
118
+
119
+ ## Author
120
+
121
+ Isqanderm (Aleksandr Melnik) - [LinkedIn](www.linkedin.com/in/isqander-melnik)
122
+
123
+ ## Contributing
124
+
125
+ Contributions are welcome! Please open an issue or submit a pull request.
126
+
127
+ ## Acknowledgements
128
+
129
+ Special thanks to the developers of Angular and NestJS for the inspiration.
130
+
131
+ ## Wiki
132
+
133
+ For more detailed documentation, please visit the [Wiki](https://github.com/Isqanderm/ioc/wiki/Testing).
@@ -1,4 +1,4 @@
1
1
  import type { Input } from "../commands/command.input";
2
2
  export declare abstract class AbstractAction {
3
- abstract handler(inputs?: Input[], options?: Input[]): Promise<void>;
3
+ abstract handler(inputs: Input[], options: Input[]): Promise<void>;
4
4
  }
@@ -0,0 +1,10 @@
1
+ import type { Input } from "../commands/command.input";
2
+ import { AbstractAction } from "./abstract.action";
3
+ export declare class BootstrapAction extends AbstractAction {
4
+ private readonly project;
5
+ handler(inputs: Input[], options: Input[]): Promise<void>;
6
+ private createBootstrap;
7
+ private createAppModule;
8
+ private installDeps;
9
+ private prettify;
10
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BootstrapAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const node_child_process_1 = require("node:child_process");
6
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
+ const prettier_1 = tslib_1.__importDefault(require("prettier"));
8
+ const ts_morph_1 = require("ts-morph");
9
+ const bootstrap_template_1 = require("../templates/bootstrap.template");
10
+ const module_template_1 = require("../templates/module.template");
11
+ const abstract_action_1 = require("./abstract.action");
12
+ class BootstrapAction extends abstract_action_1.AbstractAction {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.project = new ts_morph_1.Project();
16
+ }
17
+ async handler(inputs, options) {
18
+ if (options.find((item) => item.name === "skipDeps" && !item.value)) {
19
+ const installReact = !!options.find((item) => item.name === "skipDeps" && !item.value);
20
+ await this.installDeps({
21
+ installReact,
22
+ });
23
+ }
24
+ await this.createAppModule();
25
+ await this.createBootstrap();
26
+ await this.project.save();
27
+ console.log("Bootstrap done!");
28
+ }
29
+ async createBootstrap() {
30
+ const outputDir = process.cwd();
31
+ const filePath = node_path_1.default.join(outputDir, "bootstrap.ts");
32
+ const sourceFile = this.project.createSourceFile(filePath);
33
+ const bootstrapTemplate = new bootstrap_template_1.BootstrapTemplate();
34
+ const formattedText = await this.prettify(bootstrapTemplate.generate(), {
35
+ filepath: filePath,
36
+ });
37
+ sourceFile.replaceWithText(formattedText);
38
+ }
39
+ async createAppModule() {
40
+ const outputDir = node_path_1.default.resolve(process.cwd(), "apps");
41
+ const filePath = node_path_1.default.join(outputDir, "app.module.ts");
42
+ const sourceFile = this.project.createSourceFile(filePath, "", {
43
+ overwrite: true,
44
+ });
45
+ const moduleTemplate = new module_template_1.ModuleTemplate({ name: "App" });
46
+ const sourceText = `
47
+ import { NsModule } from 'nexus-ioc';
48
+
49
+ ${moduleTemplate.generate()}
50
+ `;
51
+ const formattedText = await this.prettify(sourceText, {
52
+ filepath: filePath,
53
+ });
54
+ sourceFile.replaceWithText(formattedText);
55
+ }
56
+ async installDeps(params) {
57
+ const devDeps = ["nexus-ioc-graph-visualizer", "nexus-ioc-testing"];
58
+ const deps = ["nexus-ico"];
59
+ if (params.installReact) {
60
+ deps.push("nexus-ioc-react-adapter");
61
+ }
62
+ return new Promise((resolve, reject) => {
63
+ (0, node_child_process_1.exec)(`npm install -save ${deps.join(" ")} && npm install --save-dev ${devDeps.join(" ")}`, (error, stdout, stderr) => {
64
+ if (error) {
65
+ console.error(`Install error: ${error.message}`);
66
+ reject();
67
+ return;
68
+ }
69
+ if (stderr) {
70
+ console.error(`Error: ${stderr}`);
71
+ reject();
72
+ return;
73
+ }
74
+ resolve();
75
+ });
76
+ });
77
+ }
78
+ async prettify(text, options) {
79
+ return prettier_1.default.format(text, options);
80
+ }
81
+ }
82
+ exports.BootstrapAction = BootstrapAction;
83
+ //# sourceMappingURL=bootstrap.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.action.js","sourceRoot":"","sources":["../../src/actions/bootstrap.action.ts"],"names":[],"mappings":";;;;AAAA,2DAA0C;AAC1C,kEAA6B;AAC7B,gEAAgC;AAChC,uCAAmC;AAEnC,wEAAoE;AACpE,kEAA8D;AAC9D,uDAAmD;AAEnD,MAAa,eAAgB,SAAQ,gCAAc;IAAnD;;QACkB,YAAO,GAAG,IAAI,kBAAO,EAAE,CAAC;IAwF1C,CAAC;IAtFA,KAAK,CAAC,OAAO,CAAC,MAAe,EAAE,OAAgB;QAC9C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACrE,MAAM,YAAY,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAClC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,KAAK,CACjD,CAAC;YACF,MAAM,IAAI,CAAC,WAAW,CAAC;gBACtB,YAAY;aACZ,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAE7B,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAE1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChC,CAAC;IAEO,KAAK,CAAC,eAAe;QAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,mBAA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AE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,IAAA,yBAAI,EACH,qBAAqB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,8BAA8B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACpF,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;gBACzB,IAAI,KAAK,EAAE,CAAC;oBACX,OAAO,CAAC,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;oBACjD,MAAM,EAAE,CAAC;oBACT,OAAO;gBACR,CAAC;gBAED,IAAI,MAAM,EAAE,CAAC;oBACZ,OAAO,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;oBAClC,MAAM,EAAE,CAAC;oBACT,OAAO;gBACR,CAAC;gBAED,OAAO,EAAE,CAAC;YACX,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,OAA6B;QACjE,OAAO,kBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACD;AAzFD,0CAyFC"}
@@ -0,0 +1,10 @@
1
+ import type { Input } from "../commands/command.input";
2
+ import { AbstractAction } from "./abstract.action";
3
+ export declare class VisualizeAction extends AbstractAction {
4
+ private readonly project;
5
+ handler(inputs?: Input[], options?: Input[]): Promise<void>;
6
+ private init;
7
+ private start;
8
+ private installDeps;
9
+ private prettify;
10
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VisualizeAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const node_child_process_1 = require("node:child_process");
6
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
+ const prettier_1 = tslib_1.__importDefault(require("prettier"));
8
+ const ts_morph_1 = require("ts-morph");
9
+ const visualizer_template_1 = require("../templates/visualizer.template");
10
+ const abstract_action_1 = require("./abstract.action");
11
+ class VisualizeAction extends abstract_action_1.AbstractAction {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.project = new ts_morph_1.Project();
15
+ }
16
+ async handler(inputs = [], options = []) {
17
+ let outputDir = process.cwd();
18
+ let type = "";
19
+ for (const input of inputs) {
20
+ if (input.name === "path") {
21
+ outputDir = node_path_1.default.resolve(outputDir, input.value);
22
+ }
23
+ else if (input.name === "type") {
24
+ type = input.value;
25
+ }
26
+ }
27
+ if (type === "init") {
28
+ if (options.find((item) => item.name === "installDeps" && item.value)) {
29
+ await this.installDeps();
30
+ }
31
+ await this.init(outputDir);
32
+ }
33
+ else if (type === "start") {
34
+ await this.start(outputDir);
35
+ }
36
+ }
37
+ async init(outputDir) {
38
+ const filePath = node_path_1.default.join(outputDir, "visualizer.ts");
39
+ const visualizerTemplate = new visualizer_template_1.VisualizerTemplate();
40
+ const sourceFile = this.project.createSourceFile(filePath, "", {
41
+ overwrite: true,
42
+ });
43
+ const formattedText = await this.prettify(visualizerTemplate.generate(), {
44
+ filepath: filePath,
45
+ });
46
+ sourceFile.replaceWithText(formattedText);
47
+ await this.project.save();
48
+ }
49
+ async start(outputDir) {
50
+ (0, node_child_process_1.exec)(`npx ts-node ${outputDir}`, (error, stdout, stderr) => {
51
+ if (!error || !stderr) {
52
+ console.log("Graph visualization ready");
53
+ return;
54
+ }
55
+ console.error("Some Error: ", error);
56
+ });
57
+ }
58
+ async installDeps() {
59
+ return new Promise((resolve, reject) => {
60
+ (0, node_child_process_1.exec)("npm install --save-dev nexus-ioc-graph-visualizer", (error, stdout, stderr) => {
61
+ if (error) {
62
+ console.error(`Install error: ${error.message}`);
63
+ reject();
64
+ return;
65
+ }
66
+ if (stderr) {
67
+ console.error(`Error: ${stderr}`);
68
+ reject();
69
+ return;
70
+ }
71
+ resolve();
72
+ });
73
+ });
74
+ }
75
+ async prettify(text, options) {
76
+ return prettier_1.default.format(text, options);
77
+ }
78
+ }
79
+ exports.VisualizeAction = VisualizeAction;
80
+ //# sourceMappingURL=visualize.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualize.action.js","sourceRoot":"","sources":["../../src/actions/visualize.action.ts"],"names":[],"mappings":";;;;AAAA,2DAA0C;AAC1C,kEAA6B;AAC7B,gEAAgC;AAChC,uCAAmC;AAEnC,0EAAsE;AACtE,uDAAmD;AAEnD,MAAa,eAAgB,SAAQ,gCAAc;IAAnD;;QACkB,YAAO,GAAG,IAAI,kBAAO,EAAE,CAAC;IA6E1C,CAAC;IA3EA,KAAK,CAAC,OAAO,CAAC,SAAkB,EAAE,EAAE,UAAmB,EAAE;QACxD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC9B,IAAI,IAAI,GAAG,EAAE,CAAC;QAEd,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC3B,SAAS,GAAG,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,KAAe,CAAC,CAAC;YAC5D,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAClC,IAAI,GAAG,KAAK,CAAC,KAAe,CAAC;YAC9B,CAAC;QACF,CAAC;QAED,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YACrB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvE,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;YAC1B,CAAC;YAED,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;aAAM,IAAI,IAAI,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AO,CAAC,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;oBACjD,MAAM,EAAE,CAAC;oBACT,OAAO;gBACR,CAAC;gBAED,IAAI,MAAM,EAAE,CAAC;oBACZ,OAAO,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;oBAClC,MAAM,EAAE,CAAC;oBACT,OAAO;gBACR,CAAC;gBAED,OAAO,EAAE,CAAC;YACX,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,OAA6B;QACjE,OAAO,kBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACD;AA9ED,0CA8EC"}
@@ -1,4 +1,7 @@
1
1
  import type { Command } from "commander";
2
+ import type { AbstractAction } from "../actions/abstract.action";
2
3
  export declare abstract class AbstractCommand {
4
+ protected readonly action: AbstractAction;
5
+ constructor(action: AbstractAction);
3
6
  abstract load(): Promise<Command>;
4
7
  }
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractCommand = void 0;
4
4
  class AbstractCommand {
5
+ constructor(action) {
6
+ this.action = action;
7
+ }
5
8
  }
6
9
  exports.AbstractCommand = AbstractCommand;
7
10
  //# sourceMappingURL=abstract.command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.command.js","sourceRoot":"","sources":["../../src/commands/abstract.command.ts"],"names":[],"mappings":";;;AAEA,MAAsB,eAAe;CAEpC;AAFD,0CAEC"}
1
+ {"version":3,"file":"abstract.command.js","sourceRoot":"","sources":["../../src/commands/abstract.command.ts"],"names":[],"mappings":";;;AAGA,MAAsB,eAAe;IACpC,YAA+B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;CAGzD;AAJD,0CAIC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "commander";
2
+ import { AbstractCommand } from "./abstract.command";
3
+ export declare class BootstrapCommand extends AbstractCommand {
4
+ load(): Promise<Command>;
5
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BootstrapCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const abstract_command_1 = require("./abstract.command");
6
+ class BootstrapCommand extends abstract_command_1.AbstractCommand {
7
+ async load() {
8
+ return new commander_1.Command("bootstrap")
9
+ .description("Bootstrap app")
10
+ .alias("boot")
11
+ .option("--react", "Install integration with react", () => true, false)
12
+ .option("--skip-deps", "Install deps", () => true, false)
13
+ .action(async (params) => {
14
+ const options = [];
15
+ options.push({ name: "skipDeps", value: params.skipDeps });
16
+ options.push({ name: "react", value: params.react });
17
+ const inputs = [];
18
+ await this.action.handler(inputs, options);
19
+ });
20
+ }
21
+ }
22
+ exports.BootstrapCommand = BootstrapCommand;
23
+ //# sourceMappingURL=bootstrap.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.command.js","sourceRoot":"","sources":["../../src/commands/bootstrap.command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,yDAAqD;AAGrD,MAAa,gBAAiB,SAAQ,kCAAe;IACpD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,mBAAO,CAAC,WAAW,CAAC;aAC7B,WAAW,CAAC,eAAe,CAAC;aAC5B,KAAK,CAAC,MAAM,CAAC;aACb,MAAM,CAAC,SAAS,EAAE,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;aACtE,MAAM,CAAC,aAAa,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;aACxD,MAAM,CAAC,KAAK,EAAE,MAA6C,EAAE,EAAE;YAC/D,MAAM,OAAO,GAAY,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC3D,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YAErD,MAAM,MAAM,GAAY,EAAE,CAAC;YAE3B,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAjBD,4CAiBC"}
@@ -1,8 +1,5 @@
1
1
  import { Command } from "commander";
2
- import type { AbstractAction } from "../actions/abstract.action";
3
2
  import { AbstractCommand } from "./abstract.command";
4
3
  export declare class GenerateCommand extends AbstractCommand {
5
- private readonly action;
6
- constructor(action: AbstractAction);
7
4
  load(): Promise<Command>;
8
5
  }
@@ -4,10 +4,6 @@ exports.GenerateCommand = void 0;
4
4
  const commander_1 = require("commander");
5
5
  const abstract_command_1 = require("./abstract.command");
6
6
  class GenerateCommand extends abstract_command_1.AbstractCommand {
7
- constructor(action) {
8
- super();
9
- this.action = action;
10
- }
11
7
  async load() {
12
8
  return new commander_1.Command("generate")
13
9
  .description("Generate a new schematic")
@@ -1 +1 @@
1
- {"version":3,"file":"generate.command.js","sourceRoot":"","sources":["../../src/commands/generate.command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAEpC,yDAAqD;AAGrD,MAAa,eAAgB,SAAQ,kCAAe;IACnD,YAA6B,MAAsB;QAClD,KAAK,EAAE,CAAC;QADoB,WAAM,GAAN,MAAM,CAAgB;IAEnD,CAAC;IAED,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,mBAAO,CAAC,UAAU,CAAC;aAC5B,WAAW,CAAC,0BAA0B,CAAC;aACvC,SAAS,CAAC,kCAAkC,CAAC;aAC7C,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,eAAe,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;aAC5D,MA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e,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;aAC5D,MAAM,CAAC,WAAW,EAAE,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;aACxE,MAAM,CACN,KAAK,EACJ,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,CAAC,EACD,MAA8C,EAC9C,OAAgB,EACf,EAAE;YACH,MAAM,OAAO,GAAY,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;YAC/D,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YAEnD,MAAM,MAAM,GAAY,EAAE,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAE3C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC,CACD,CAAC;IACJ,CAAC;CACD;AA9BD,0CA8BC"}
@@ -1,8 +1,5 @@
1
1
  import { Command } from "commander";
2
- import type { AbstractAction } from "../actions/abstract.action";
3
2
  import { AbstractCommand } from "./abstract.command";
4
3
  export declare class InstallCommand extends AbstractCommand {
5
- private readonly action;
6
- constructor(action: AbstractAction);
7
4
  load(): Promise<Command>;
8
5
  }
@@ -4,16 +4,12 @@ exports.InstallCommand = void 0;
4
4
  const commander_1 = require("commander");
5
5
  const abstract_command_1 = require("./abstract.command");
6
6
  class InstallCommand extends abstract_command_1.AbstractCommand {
7
- constructor(action) {
8
- super();
9
- this.action = action;
10
- }
11
7
  async load() {
12
8
  return new commander_1.Command("install")
13
9
  .description("install nexus-ioc package")
14
10
  .alias("i")
15
11
  .action(async () => {
16
- return this.action.handler();
12
+ return this.action.handler([], []);
17
13
  });
18
14
  }
19
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install.command.js","sourceRoot":"","sources":["../../src/commands/install.command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAEpC,yDAAqD;AAErD,MAAa,cAAe,SAAQ,kCAAe;IAClD,YAA6B,MAAsB;QAClD,KAAK,EAAE,CAAC;QADoB,WAAM,GAAN,MAAM,CAAgB;IAEnD,CAAC;IAED,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,mBAAO,CAAC,SAAS,CAAC;aAC3B,WAAW,CAAC,2BAA2B,CAAC;aACxC,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,KAAK,IAAI,EAAE;YAClB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAbD,wCAaC"}
1
+ {"version":3,"file":"install.command.js","sourceRoot":"","sources":["../../src/commands/install.command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,yDAAqD;AAErD,MAAa,cAAe,SAAQ,kCAAe;IAClD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,mBAAO,CAAC,SAAS,CAAC;aAC3B,WAAW,CAAC,2BAA2B,CAAC;aACxC,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,KAAK,IAAI,EAAE;YAClB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AATD,wCASC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "commander";
2
+ import { AbstractCommand } from "./abstract.command";
3
+ export declare class VisualizerCommand extends AbstractCommand {
4
+ load(): Promise<Command>;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VisualizerCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const abstract_command_1 = require("./abstract.command");
6
+ class VisualizerCommand extends abstract_command_1.AbstractCommand {
7
+ async load() {
8
+ return new commander_1.Command("visualizer")
9
+ .description("Visualisation helper")
10
+ .arguments("[type] [path]")
11
+ .alias("vi")
12
+ .option("--install-deps", "Install deps for this functionality", () => true, false)
13
+ .action(async (type, path, params) => {
14
+ const options = [];
15
+ options.push({ name: "installDeps", value: params.installDeps });
16
+ const inputs = [];
17
+ inputs.push({ name: "type", value: type });
18
+ inputs.push({ name: "path", value: path });
19
+ await this.action.handler(inputs, options);
20
+ });
21
+ }
22
+ }
23
+ exports.VisualizerCommand = VisualizerCommand;
24
+ //# sourceMappingURL=visualizer.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualizer.command.js","sourceRoot":"","sources":["../../src/commands/visualizer.command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,yDAAqD;AAGrD,MAAa,iBAAkB,SAAQ,kCAAe;IACrD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,mBAAO,CAAC,YAAY,CAAC;aAC9B,WAAW,CAAC,sBAAsB,CAAC;aACnC,SAAS,CAAC,eAAe,CAAC;aAC1B,KAAK,CAAC,IAAI,CAAC;aACX,MAAM,CACN,gBAAgB,EAChB,qCAAqC,EACrC,GAAG,EAAE,CAAC,IAAI,EACV,KAAK,CACL;aACA,MAAM,CACN,KAAK,EACJ,IAAY,EACZ,IAAY,EACZ,MAAgC,EAE/B,EAAE;YACH,MAAM,OAAO,GAAY,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAEjE,MAAM,MAAM,GAAY,EAAE,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAE3C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC,CACD,CAAC;IACJ,CAAC;CACD;AA9BD,8CA8BC"}
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CommandsHelper = void 0;
4
+ const bootstrap_action_1 = require("./actions/bootstrap.action");
4
5
  const generate_action_1 = require("./actions/generate.action");
5
6
  const install_action_1 = require("./actions/install.action");
7
+ const visualize_action_1 = require("./actions/visualize.action");
8
+ const bootstrap_command_1 = require("./commands/bootstrap.command");
6
9
  const generate_command_1 = require("./commands/generate.command");
7
10
  const install_command_1 = require("./commands/install.command");
11
+ const visualizer_command_1 = require("./commands/visualizer.command");
8
12
  class CommandsHelper {
9
13
  constructor() {
10
14
  this.mapper = [
@@ -20,6 +24,18 @@ class CommandsHelper {
20
24
  commander: install_command_1.InstallCommand,
21
25
  handler: install_action_1.InstallAction,
22
26
  },
27
+ {
28
+ command: "visualize",
29
+ alias: "vi",
30
+ commander: visualizer_command_1.VisualizerCommand,
31
+ handler: visualize_action_1.VisualizeAction,
32
+ },
33
+ {
34
+ command: "bootstrap",
35
+ alias: "boot",
36
+ commander: bootstrap_command_1.BootstrapCommand,
37
+ handler: bootstrap_action_1.BootstrapAction,
38
+ },
23
39
  ];
24
40
  this.commands = new Map(this.mapper.reduce((prev, next) => {
25
41
  prev.push([next.command, next]);
@@ -1 +1 @@
1
- {"version":3,"file":"commands.helper.js","sourceRoot":"","sources":["../src/commands.helper.ts"],"names":[],"mappings":";;;AACA,+DAA2D;AAC3D,6DAAyD;AAEzD,kEAA8D;AAC9D,gEAA4D;AAS5D,MAAa,cAAc;IAA3B;QACkB,WAAM,GAAoB;YAC1C;gBACC,OAAO,EAAE,UAAU;gBACnB,KAAK,EAAE,GAAG;gBACV,SAAS,EAAE,kCAAe;gBAC1B,OAAO,EAAE,gCAAc;aACvB;YACD;gBACC,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,GAAG;gBACV,SAAS,EAAE,gCAAc;gBACzB,OAAO,EAAE,8BAAa;aACtB;SACD,CAAC;QAEe,aAAQ,GAAG,IAAI,GAAG,CAClC,IAAI,CAAC,MAAM,CAAC,MAAM,CAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YAC5D,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;YAE9B,OAAO,IAAI,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CACN,CAAC;IAeH,CAAC;IAbO,cAAc;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,YAAY,CAAC,SAAiB;QACpC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEnD,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AAtCD,wCAsCC"}
1
+ {"version":3,"file":"commands.helper.js","sourceRoot":"","sources":["../src/commands.helper.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAC7D,+DAA2D;AAC3D,6DAAyD;AACzD,iEAA6D;AAE7D,oEAAgE;A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;IACjE,CAAC;CACD;AAlDD,wCAkDC"}
@@ -0,0 +1,4 @@
1
+ export declare class BootstrapTemplate {
2
+ private parse;
3
+ generate(): string;
4
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BootstrapTemplate = void 0;
4
+ class BootstrapTemplate {
5
+ parse() { }
6
+ generate() {
7
+ return `
8
+ import { NexusApplicationsBrowser } from "nexus-ioc/dist/browser";
9
+ import { AppModule } from "./apps/app.module";
10
+
11
+ async function bootstrap() {
12
+ const container = await NexusApplicationsBrowser
13
+ .create(AppModule)
14
+ .bootstrap();
15
+ }
16
+
17
+ bootstrap();
18
+ `;
19
+ }
20
+ }
21
+ exports.BootstrapTemplate = BootstrapTemplate;
22
+ //# sourceMappingURL=bootstrap.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.template.js","sourceRoot":"","sources":["../../src/templates/bootstrap.template.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;IACrB,KAAK,KAAI,CAAC;IAEX,QAAQ;QACd,OAAO;;;;;;;;;;;KAWJ,CAAC;IACL,CAAC;CACD;AAjBD,8CAiBC"}
@@ -0,0 +1,4 @@
1
+ export declare class VisualizerTemplate {
2
+ private parse;
3
+ generate(): string;
4
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VisualizerTemplate = void 0;
4
+ class VisualizerTemplate {
5
+ parse() { }
6
+ generate() {
7
+ return `
8
+ import { NexusApplicationsServer } from "nexus-ioc/dist/server";
9
+ import { GraphScannerVisualizer } from 'nexus-ioc-graph-visualizer';
10
+ import { AppModule } from "./app.module";
11
+
12
+ const visualizer = new GraphScannerVisualizer('graph.png');
13
+
14
+ async function bootstrap() {
15
+ await NexusApplicationsServer.create(AppModule)
16
+ .addScannerPlugin(visualizer)
17
+ .bootstrap();
18
+ }
19
+
20
+ bootstrap();
21
+ `;
22
+ }
23
+ }
24
+ exports.VisualizerTemplate = VisualizerTemplate;
25
+ //# sourceMappingURL=visualizer.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualizer.template.js","sourceRoot":"","sources":["../../src/templates/visualizer.template.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IACtB,KAAK,KAAI,CAAC;IAEX,QAAQ;QACd,OAAO;;;;;;;;;;;;;;KAcJ,CAAC;IACL,CAAC;CACD;AApBD,gDAoBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-ioc/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "CLI tools for Nexus IoC",
5
5
  "author": "Isqanderm <aleksandr.melnik.personal@gmail.com> (https://www.linkedin.com/in/isqander-melnik)",
6
6
  "homepage": "https://github.com/Isqanderm/ioc#readme",
@@ -34,24 +34,22 @@
34
34
  "module": "./dist/index.js",
35
35
  "types": "./dist/index.d.ts",
36
36
  "license": "MIT",
37
- "peerDependencies": {
38
- "reflect-metadata": "^0.1.12 || ^0.2.0"
39
- },
40
37
  "devDependencies": {
41
38
  "@types/jest": "^29.5.12",
42
39
  "jest": "^29.7.0",
40
+ "nexus-ioc": "^0.2.0",
41
+ "nexus-ioc-graph-visualizer": "^0.1.3",
42
+ "nexus-ioc-testing": "^0.2.0",
43
43
  "reflect-metadata": "^0.1.12 || ^0.2.0",
44
44
  "sinon": "^18.0.0",
45
45
  "ts-jest": "^29.1.4",
46
- "ts-node": "^10.9.2",
47
- "nexus-ioc": "^0.2.0",
48
- "nexus-ioc-testing": "^0.2.0"
46
+ "ts-node": "^10.9.2"
49
47
  },
50
48
  "dependencies": {
51
- "tslib": "^2.6.3",
49
+ "commander": "^12.1.0",
52
50
  "prettier": "^3.3.3",
53
51
  "ts-morph": "^23.0.0",
54
- "commander": "^12.1.0"
52
+ "tslib": "^2.6.3"
55
53
  },
56
54
  "scripts": {
57
55
  "build": "tsc",