@vnodes/cli 0.0.13

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 ADDED
@@ -0,0 +1,35 @@
1
+ ![Npm version](https://img.shields.io/npm/v/@vnodes/cli)
2
+ ![Npm downloads](https://img.shields.io/npm/dm/@vnodes/cli)
3
+ ![Build Status](https://img.shields.io/github/actions/workflow/status/vnodes/vnodes/ci.yml)
4
+ ![Doc Status](https://img.shields.io/github/actions/workflow/status/vnodes/vnodes/doc.yml)
5
+ ![Bundle size](https://img.shields.io/bundlephobia/min/@vnodes/cli)
6
+
7
+ <p align="center">
8
+ <img src="https://vnodes.github.io/vnodes/plugins/cli/assets/favicon.png" alt="Logo" width="200" height="200" style="border-radius: 100%"/>
9
+ </p>
10
+
11
+ ## @vnodes/cli
12
+
13
+ Project and resource generators
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pnpm add @vnodes/cli
19
+ ```
20
+
21
+ ## 💖 Support My Work
22
+
23
+ If you find my open-source contributions or the **@vnodes/cli** project helpful, consider supporting my work. Your sponsorship helps me maintain these projects and explore new enterprise patterns.
24
+
25
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](https://cash.app/$puqlib)
26
+
27
+ ---
28
+
29
+ ## 🤝 Connect with Me
30
+
31
+ <p align="left">
32
+ <a href="mailto:robert.brightline+vnodes-cli@gmail.com">
33
+ <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white" />
34
+ </a>
35
+ </p>
@@ -0,0 +1,10 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Some text goes here
4
+ *
5
+ * @param tree
6
+ *
7
+ */
8
+ export declare function initGenerator(tree: Tree): Promise<void>;
9
+ export default initGenerator;
10
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,IAAI,EAA6B,MAAM,YAAY,CAAC;AAEzF;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,iBAkB7C;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initGenerator = initGenerator;
4
+ const tslib_1 = require("tslib");
5
+ const path = tslib_1.__importStar(require("node:path"));
6
+ const devkit_1 = require("@nx/devkit");
7
+ /**
8
+ * Some text goes here
9
+ *
10
+ * @param tree
11
+ *
12
+ */
13
+ async function initGenerator(tree) {
14
+ (0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), devkit_1.workspaceRoot, {});
15
+ await (0, devkit_1.updateJson)(tree, 'nx.json', (value) => {
16
+ if (!value.generators) {
17
+ value.generators = {};
18
+ }
19
+ if (!value.generators['@vnodes/cli:project'])
20
+ value.generators['@vnodes/cli:project'] = {
21
+ org: 'vnodes',
22
+ email: 'robert.brightline@gmail.com',
23
+ homepage: 'https://vnodes.github.io/vnodes',
24
+ funding: 'https://cash.app/$puqlib',
25
+ };
26
+ return value;
27
+ });
28
+ await (0, devkit_1.formatFiles)(tree);
29
+ }
30
+ exports.default = initGenerator;
@@ -0,0 +1,5 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { ApiE2eGeneratorSchema } from './schema';
3
+ export declare function apiE2eGenerator(tree: Tree, options: ApiE2eGeneratorSchema): Promise<void>;
4
+ export default apiE2eGenerator;
5
+ //# sourceMappingURL=api-e2e.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-e2e.d.ts","sourceRoot":"","sources":["../../../../src/generators/project/api-e2e/api-e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAuD,IAAI,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,iBAU/E;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.apiE2eGenerator = apiE2eGenerator;
4
+ const tslib_1 = require("tslib");
5
+ const path = tslib_1.__importStar(require("node:path"));
6
+ const devkit_1 = require("@nx/devkit");
7
+ async function apiE2eGenerator(tree, options) {
8
+ const projectRoot = `libs/${options.name}`;
9
+ (0, devkit_1.addProjectConfiguration)(tree, options.name, {
10
+ root: projectRoot,
11
+ projectType: 'library',
12
+ sourceRoot: `${projectRoot}/src`,
13
+ targets: {},
14
+ });
15
+ (0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
16
+ await (0, devkit_1.formatFiles)(tree);
17
+ }
18
+ exports.default = apiE2eGenerator;
@@ -0,0 +1,5 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { ProjectGeneratorSchema } from './schema';
3
+ export declare function projectGenerator(tree: Tree, options: ProjectGeneratorSchema): Promise<void>;
4
+ export default projectGenerator;
5
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,IAAI,EAAc,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAsB,iBA+BjF;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectGenerator = projectGenerator;
4
+ const node_path_1 = require("node:path");
5
+ const devkit_1 = require("@nx/devkit");
6
+ async function projectGenerator(tree, options) {
7
+ const parts = options.directory.split(/\//);
8
+ const shortProjectName = parts[parts.length - 1];
9
+ const projectName = `@${options.org}/${shortProjectName}`;
10
+ const email = options.email.replace('@', `+${options.org}-${shortProjectName}@`);
11
+ (0, devkit_1.generateFiles)(tree, (0, node_path_1.join)(__dirname, options.type), options.directory, {
12
+ projectName,
13
+ directory: options.directory,
14
+ email,
15
+ homepage: options.homepage,
16
+ org: options.org,
17
+ funding: options.funding,
18
+ username: options.username,
19
+ password: options.password,
20
+ ...(0, devkit_1.names)(shortProjectName),
21
+ });
22
+ (0, devkit_1.updateJson)(tree, 'tsconfig.json', (value) => {
23
+ if (value.references === undefined || value.references === null) {
24
+ value.references = [];
25
+ }
26
+ value.references.push({
27
+ path: `./${options.directory}`,
28
+ });
29
+ return value;
30
+ });
31
+ await (0, devkit_1.formatFiles)(tree);
32
+ }
33
+ exports.default = projectGenerator;
@@ -0,0 +1,2 @@
1
+ export declare const NO_EXPORTS = "NO_EXPORTS";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NO_EXPORTS = void 0;
4
+ exports.NO_EXPORTS = 'NO_EXPORTS';
@@ -0,0 +1,19 @@
1
+ {
2
+ "generators": {
3
+ "project": {
4
+ "factory": "./dist/generators/project/project",
5
+ "schema": "./dist/generators/project/schema.json",
6
+ "description": "project generator"
7
+ },
8
+ "init": {
9
+ "factory": "./dist/generators/init/init",
10
+ "schema": "./dist/generators/init/schema.json",
11
+ "description": "init generator"
12
+ },
13
+ "api-e2e": {
14
+ "factory": "./src/generators/project/api-e2e/api-e2e",
15
+ "schema": "./src/generators/project/api-e2e/schema.json",
16
+ "description": "api-e2e generator"
17
+ }
18
+ }
19
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@vnodes/cli",
3
+ "version": "0.0.13",
4
+ "description": "Project and resource generators",
5
+ "homepage": "https://vnodes.github.io/vnodes/plugins/cli",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "tag": "latest"
9
+ },
10
+ "author": {
11
+ "email": "robert.brightline+vnodes-cli@gmail.com",
12
+ "name": "Robert Brightline",
13
+ "url": "https://vnodes.github.io/vnodes/plugins/cli"
14
+ },
15
+ "keywords": [],
16
+ "icon": "https://vnodes.github.io/vnodes/plugins/cli/assets/favicon.png",
17
+ "funding": [
18
+ {
19
+ "type": "cashapp",
20
+ "url": "https://cash.app/$puqlib"
21
+ }
22
+ ],
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ "./package.json": "./package.json",
28
+ ".": {
29
+ "@vnodes/source": "./src/index.ts",
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "!**/*.tsbuildinfo",
38
+ "generators.json"
39
+ ],
40
+ "nx": {
41
+ "sourceRoot": "plugins/cli/src",
42
+ "targets": {
43
+ "build": {},
44
+ "lint": {},
45
+ "test": {},
46
+ "doc": {}
47
+ }
48
+ },
49
+ "dependencies": {
50
+ "@nx/devkit": "22.4.5",
51
+ "tslib": "^2.3.0"
52
+ },
53
+ "generators": "./generators.json"
54
+ }