@vnodes/cli 0.1.8 → 0.1.10

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 (137) hide show
  1. package/dist/cli/bye/bye.d.ts +12 -0
  2. package/dist/cli/bye/bye.d.ts.map +1 -0
  3. package/dist/cli/bye/bye.js +13 -0
  4. package/dist/cli/bye/bye.js.map +1 -0
  5. package/dist/cli/cli.js +5 -1
  6. package/dist/cli/cli.js.map +1 -1
  7. package/dist/cli/rm/rm.d.ts +1 -1
  8. package/dist/cli/rm/rm.d.ts.map +1 -1
  9. package/dist/cli/rm/rm.js +7 -5
  10. package/dist/cli/rm/rm.js.map +1 -1
  11. package/dist/cli/suffix/suffix.d.ts +6 -2
  12. package/dist/cli/suffix/suffix.d.ts.map +1 -1
  13. package/dist/cli/suffix/suffix.js +9 -5
  14. package/dist/cli/suffix/suffix.js.map +1 -1
  15. package/dist/cli/wd/wd.js +1 -1
  16. package/dist/cli/wd/wd.js.map +1 -1
  17. package/dist/cli/workspace/files/.eslint/allow-self-import.mjs.template +17 -0
  18. package/dist/cli/workspace/files/.eslint/common.mjs.template +22 -0
  19. package/dist/cli/workspace/files/.eslint/dependency-check.mjs.template +22 -0
  20. package/dist/cli/workspace/files/.eslint/eslint.base.mjs.template +8 -0
  21. package/dist/cli/workspace/files/.eslint/module-boundries.mjs.template +40 -0
  22. package/dist/cli/workspace/files/.eslint/no-undefined.mjs.template +16 -0
  23. package/dist/cli/workspace/files/.eslint/node-protocol.mjs.template +13 -0
  24. package/dist/cli/workspace/files/.eslint/plugin-check.mjs.template +11 -0
  25. package/dist/cli/workspace/files/.github/workflows/ci.yml.template +79 -0
  26. package/dist/cli/workspace/files/.gitignore.template +52 -0
  27. package/dist/cli/workspace/files/.husky/_/.gitignore.template +1 -0
  28. package/dist/cli/workspace/files/.husky/_/applypatch-msg.template +2 -0
  29. package/dist/cli/workspace/files/.husky/_/commit-msg.template +2 -0
  30. package/dist/cli/workspace/files/.husky/_/h.template +22 -0
  31. package/dist/cli/workspace/files/.husky/_/husky.sh.template +9 -0
  32. package/dist/cli/workspace/files/.husky/_/post-applypatch.template +2 -0
  33. package/dist/cli/workspace/files/.husky/_/post-checkout.template +2 -0
  34. package/dist/cli/workspace/files/.husky/_/post-commit.template +2 -0
  35. package/dist/cli/workspace/files/.husky/_/post-merge.template +2 -0
  36. package/dist/cli/workspace/files/.husky/_/post-rewrite.template +2 -0
  37. package/dist/cli/workspace/files/.husky/_/pre-applypatch.template +2 -0
  38. package/dist/cli/workspace/files/.husky/_/pre-auto-gc.template +2 -0
  39. package/dist/cli/workspace/files/.husky/_/pre-commit.template +2 -0
  40. package/dist/cli/workspace/files/.husky/_/pre-merge-commit.template +2 -0
  41. package/dist/cli/workspace/files/.husky/_/pre-push.template +2 -0
  42. package/dist/cli/workspace/files/.husky/_/pre-rebase.template +2 -0
  43. package/dist/cli/workspace/files/.husky/_/prepare-commit-msg.template +2 -0
  44. package/dist/cli/workspace/files/.husky/commit-msg.template +24 -0
  45. package/dist/cli/workspace/files/.husky/pre-commit.template +11 -0
  46. package/dist/cli/workspace/files/.prettierignore.template +5 -0
  47. package/dist/cli/workspace/files/.prettierrc.template +4 -0
  48. package/dist/cli/workspace/files/.verdaccio/config.yml.template +28 -0
  49. package/dist/cli/workspace/files/.vscode/_.code-snippets.template +8 -0
  50. package/dist/cli/workspace/files/.vscode/cli.code-snippets.template +25 -0
  51. package/dist/cli/workspace/files/.vscode/extensions.json.template +14 -0
  52. package/dist/cli/workspace/files/.vscode/nest.code-snippets.template +16 -0
  53. package/dist/cli/workspace/files/.vscode/settings.json.template +27 -0
  54. package/dist/cli/workspace/files/.vscode/ts.code-snippets.template +16 -0
  55. package/dist/cli/workspace/files/eslint.config.mjs.template +4 -0
  56. package/dist/cli/workspace/files/pnpm-workspace.yaml.template +13 -0
  57. package/dist/cli/workspace/files/tsconfig.json.template +5 -0
  58. package/dist/cli/workspace/files/vitest.workspace.ts.template +4 -0
  59. package/dist/cli/workspace/templates/README.md.ejs +34 -0
  60. package/dist/cli/workspace/templates/nx.json.ejs +127 -0
  61. package/dist/cli/workspace/templates/package.json.ejs +63 -0
  62. package/dist/cli/workspace/templates/project.json.ejs +14 -0
  63. package/dist/cli/workspace/templates/tsconfig.base.json.ejs +38 -0
  64. package/dist/cli/workspace/workspace.d.ts +12 -0
  65. package/dist/cli/workspace/workspace.d.ts.map +1 -0
  66. package/dist/cli/workspace/workspace.js +50 -0
  67. package/dist/cli/workspace/workspace.js.map +1 -0
  68. package/dist/generators/command/command.d.ts +5 -0
  69. package/dist/generators/command/command.d.ts.map +1 -0
  70. package/dist/generators/command/command.js +18 -0
  71. package/dist/generators/command/command.js.map +1 -0
  72. package/dist/generators/command/files/__fileName__.ts.template +17 -0
  73. package/dist/generators/command/schema.d.js +3 -0
  74. package/dist/generators/command/schema.d.js.map +1 -0
  75. package/dist/generators/command/schema.d.ts +3 -0
  76. package/dist/generators/command/schema.json +18 -0
  77. package/dist/generators/generator/files/__fileName__.ts.template +18 -0
  78. package/dist/generators/generator/files/files/__fileName__.json.template.template +3 -0
  79. package/dist/generators/generator/files/schema.d.ts.template +3 -0
  80. package/dist/generators/generator/files/schema.json.template +18 -0
  81. package/dist/generators/generator/generator.d.ts +5 -0
  82. package/dist/generators/generator/generator.d.ts.map +1 -0
  83. package/dist/generators/generator/generator.js +25 -0
  84. package/dist/generators/generator/generator.js.map +1 -0
  85. package/dist/generators/generator/schema.d.js +3 -0
  86. package/dist/generators/generator/schema.d.js.map +1 -0
  87. package/dist/generators/generator/schema.d.ts +3 -0
  88. package/dist/generators/generator/schema.json +18 -0
  89. package/dist/generators/hello/files/__fileName__.json.template +3 -0
  90. package/dist/generators/hello/hello.d.ts +5 -0
  91. package/dist/generators/hello/hello.d.ts.map +1 -0
  92. package/dist/generators/hello/hello.js +16 -0
  93. package/dist/generators/hello/hello.js.map +1 -0
  94. package/dist/generators/hello/schema.d.js +3 -0
  95. package/dist/generators/hello/schema.d.js.map +1 -0
  96. package/dist/generators/hello/schema.d.ts +3 -0
  97. package/dist/generators/hello/schema.json +18 -0
  98. package/dist/generators/project/api/package.json.template +1 -1
  99. package/dist/generators/project/api/src/app/resources/resource.module.ts.template +1 -1
  100. package/dist/generators/project/api/src/app/resources/sample/sample.controller.ts.template +1 -1
  101. package/dist/generators/project/api/src/app/resources/sample/sample.module.ts.template +1 -1
  102. package/dist/generators/project/cli/bin/__fileName__.mjs.template +3 -0
  103. package/dist/generators/project/cli/eslint.config.mjs.template +4 -0
  104. package/dist/generators/project/cli/generators.json.template +9 -0
  105. package/dist/generators/project/cli/package.json.template +96 -0
  106. package/dist/generators/project/cli/src/cli/cli.ts.template +11 -0
  107. package/dist/generators/project/cli/src/cli/hello/hello.ts.template +17 -0
  108. package/dist/generators/project/cli/src/generators/hello/files/hello.template.template +1 -0
  109. package/dist/generators/project/cli/src/generators/hello/hello.spec.ts.template +7 -0
  110. package/dist/generators/project/cli/src/generators/hello/hello.ts.template +19 -0
  111. package/dist/generators/project/cli/src/generators/hello/schema.d.ts.template +3 -0
  112. package/dist/generators/project/cli/src/generators/hello/schema.json.template +18 -0
  113. package/dist/generators/project/cli/src/index.ts.template +4 -0
  114. package/dist/generators/project/prisma/.env.template +0 -1
  115. package/dist/generators/project/prisma/package.json.template +4 -6
  116. package/dist/generators/project/prisma/prisma.config.ts.template +4 -10
  117. package/dist/generators/project/project.d.ts +2 -0
  118. package/dist/generators/project/project.d.ts.map +1 -1
  119. package/dist/generators/project/project.js +18 -13
  120. package/dist/generators/project/project.js.map +1 -1
  121. package/dist/generators/project/schema.json +2 -12
  122. package/dist/package.json +6 -2
  123. package/dist/peer-dependencies.d.ts +2 -0
  124. package/dist/peer-dependencies.d.ts.map +1 -0
  125. package/dist/peer-dependencies.js +3 -0
  126. package/dist/peer-dependencies.js.map +1 -0
  127. package/dist/utils/infer-project-configuration.d.ts +3 -0
  128. package/dist/utils/infer-project-configuration.d.ts.map +1 -0
  129. package/dist/utils/infer-project-configuration.js +13 -0
  130. package/dist/utils/infer-project-configuration.js.map +1 -0
  131. package/generators.json +16 -1
  132. package/package.json +6 -2
  133. package/dist/generators/project/api/.swcrc.template +0 -29
  134. package/dist/generators/project/api/prisma/schema.prisma.template +0 -14
  135. package/dist/generators/project/api/prisma.config.ts.template +0 -12
  136. package/dist/generators/project/api/tsconfig.app.json.template +0 -14
  137. /package/dist/generators/project/{lib → common}/.swcrc.template +0 -0
@@ -0,0 +1,3 @@
1
+ export interface <%- className %>GeneratorSchema {
2
+ directory: string;
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "<%- propertyName %>",
4
+ "title": "<%- className %>",
5
+ "type": "object",
6
+ "properties": {
7
+ "directory": {
8
+ "type": "string",
9
+ "description": "",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "What directory would you like to use?"
15
+ }
16
+ },
17
+ "required": ["directory"]
18
+ }
@@ -0,0 +1,5 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import { type GeneratorGeneratorSchema } from './schema.js';
3
+ export declare function generatorGenerator(tree: Tree, options: GeneratorGeneratorSchema): Promise<void>;
4
+ export default generatorGenerator;
5
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/generator/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAO5D,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB,iBAkBrF;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { formatFiles, generateFiles, names, updateJson } from '@nx/devkit';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { inferProjectConfiguration } from '../../utils/infer-project-configuration.js';
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ export async function generatorGenerator(tree, options) {
7
+ const sourceRoot = join(__dirname, 'files');
8
+ const projectConfig = inferProjectConfiguration(tree);
9
+ const generatorRoot = join(projectConfig.root, 'src', 'generators', options.name);
10
+ generateFiles(tree, sourceRoot, generatorRoot, {
11
+ ...names(options.name)
12
+ });
13
+ updateJson(tree, join(projectConfig.root, 'generators.json'), (value)=>{
14
+ value.generators[options.name] = {
15
+ factory: `./dist/generators/${options.name}/${options.name}.js`,
16
+ schema: `./dist/generators/${options.name}/schema.json`,
17
+ description: `${options.name} generator`
18
+ };
19
+ return value;
20
+ });
21
+ await formatFiles(tree);
22
+ }
23
+ export default generatorGenerator;
24
+
25
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/generators/generator/generator.ts"],"sourcesContent":["import { formatFiles, generateFiles, names, updateJson, type Tree } from '@nx/devkit';\n\nimport { type GeneratorGeneratorSchema } from './schema.js';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { inferProjectConfiguration } from '../../utils/infer-project-configuration.js';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport async function generatorGenerator(tree: Tree, options: GeneratorGeneratorSchema) {\n const sourceRoot = join(__dirname, 'files');\n\n const projectConfig = inferProjectConfiguration(tree);\n\n const generatorRoot = join(projectConfig.root, 'src', 'generators', options.name);\n\n generateFiles(tree, sourceRoot, generatorRoot, { ...names(options.name) });\n\n updateJson(tree, join(projectConfig.root, 'generators.json'), (value) => {\n value.generators[options.name] = {\n factory: `./dist/generators/${options.name}/${options.name}.js`,\n schema: `./dist/generators/${options.name}/schema.json`,\n description: `${options.name} generator`,\n };\n return value;\n });\n await formatFiles(tree);\n}\n\nexport default generatorGenerator;\n"],"names":["formatFiles","generateFiles","names","updateJson","dirname","join","fileURLToPath","inferProjectConfiguration","__dirname","url","generatorGenerator","tree","options","sourceRoot","projectConfig","generatorRoot","root","name","value","generators","factory","schema","description"],"mappings":"AAAA,SAASA,WAAW,EAAEC,aAAa,EAAEC,KAAK,EAAEC,UAAU,QAAmB,aAAa;AAGtF,SAASC,OAAO,EAAEC,IAAI,QAAQ,YAAY;AAC1C,SAASC,aAAa,QAAQ,WAAW;AACzC,SAASC,yBAAyB,QAAQ,6CAA6C;AAEvF,MAAMC,YAAYJ,QAAQE,cAAc,YAAYG,GAAG;AAEvD,OAAO,eAAeC,mBAAmBC,IAAU,EAAEC,OAAiC;IACpF,MAAMC,aAAaR,KAAKG,WAAW;IAEnC,MAAMM,gBAAgBP,0BAA0BI;IAEhD,MAAMI,gBAAgBV,KAAKS,cAAcE,IAAI,EAAE,OAAO,cAAcJ,QAAQK,IAAI;IAEhFhB,cAAcU,MAAME,YAAYE,eAAe;QAAE,GAAGb,MAAMU,QAAQK,IAAI,CAAC;IAAC;IAExEd,WAAWQ,MAAMN,KAAKS,cAAcE,IAAI,EAAE,oBAAoB,CAACE;QAC7DA,MAAMC,UAAU,CAACP,QAAQK,IAAI,CAAC,GAAG;YAC/BG,SAAS,CAAC,kBAAkB,EAAER,QAAQK,IAAI,CAAC,CAAC,EAAEL,QAAQK,IAAI,CAAC,GAAG,CAAC;YAC/DI,QAAQ,CAAC,kBAAkB,EAAET,QAAQK,IAAI,CAAC,YAAY,CAAC;YACvDK,aAAa,GAAGV,QAAQK,IAAI,CAAC,UAAU,CAAC;QAC1C;QACA,OAAOC;IACT;IACA,MAAMlB,YAAYW;AACpB;AAEA,eAAeD,mBAAmB"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=schema.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/generators/generator/schema.d.ts"],"sourcesContent":["export interface GeneratorGeneratorSchema {\n name: string;\n}\n"],"names":[],"mappings":"AAAA,WAEC"}
@@ -0,0 +1,3 @@
1
+ export interface GeneratorGeneratorSchema {
2
+ name: string;
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "Generator",
4
+ "title": "Generate Generator",
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "description": "Generator name",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "What name would you like to use?"
15
+ }
16
+ },
17
+ "required": ["name"]
18
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "<%- propertyName %>":"<%- fileName %>"
3
+ }
@@ -0,0 +1,5 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { HelloGeneratorSchema } from './schema.js';
3
+ export declare function helloGenerator(tree: Tree, options: HelloGeneratorSchema): Promise<void>;
4
+ export default helloGenerator;
5
+ //# sourceMappingURL=hello.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hello.d.ts","sourceRoot":"","sources":["../../../src/generators/hello/hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMxD,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,iBAS7E;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { formatFiles, generateFiles, names } from '@nx/devkit';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { basename, dirname, join } from 'node:path';
4
+ const __dirname = dirname(fileURLToPath(import.meta.url));
5
+ export async function helloGenerator(tree, options) {
6
+ const sourceRoot = join(__dirname, 'files');
7
+ const name = basename(options.directory);
8
+ const targetRoot = options.directory;
9
+ generateFiles(tree, sourceRoot, targetRoot, {
10
+ ...names(name)
11
+ });
12
+ await formatFiles(tree);
13
+ }
14
+ export default helloGenerator;
15
+
16
+ //# sourceMappingURL=hello.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/generators/hello/hello.ts"],"sourcesContent":["import { formatFiles, generateFiles, names, type Tree } from '@nx/devkit';\n\nimport type { HelloGeneratorSchema } from './schema.js';\nimport { fileURLToPath } from 'node:url';\nimport { basename, dirname, join } from 'node:path';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport async function helloGenerator(tree: Tree, options: HelloGeneratorSchema) {\n const sourceRoot = join(__dirname, 'files');\n\n const name = basename(options.directory);\n\n const targetRoot = options.directory;\n\n generateFiles(tree, sourceRoot, targetRoot, { ...names(name) });\n await formatFiles(tree);\n}\n\nexport default helloGenerator;\n"],"names":["formatFiles","generateFiles","names","fileURLToPath","basename","dirname","join","__dirname","url","helloGenerator","tree","options","sourceRoot","name","directory","targetRoot"],"mappings":"AAAA,SAASA,WAAW,EAAEC,aAAa,EAAEC,KAAK,QAAmB,aAAa;AAG1E,SAASC,aAAa,QAAQ,WAAW;AACzC,SAASC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,QAAQ,YAAY;AAEpD,MAAMC,YAAYF,QAAQF,cAAc,YAAYK,GAAG;AAEvD,OAAO,eAAeC,eAAeC,IAAU,EAAEC,OAA6B;IAC5E,MAAMC,aAAaN,KAAKC,WAAW;IAEnC,MAAMM,OAAOT,SAASO,QAAQG,SAAS;IAEvC,MAAMC,aAAaJ,QAAQG,SAAS;IAEpCb,cAAcS,MAAME,YAAYG,YAAY;QAAE,GAAGb,MAAMW,KAAK;IAAC;IAC7D,MAAMb,YAAYU;AACpB;AAEA,eAAeD,eAAe"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=schema.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/generators/hello/schema.d.ts"],"sourcesContent":["export interface HelloGeneratorSchema {\n directory: string;\n}\n"],"names":[],"mappings":"AAAA,WAEC"}
@@ -0,0 +1,3 @@
1
+ export interface HelloGeneratorSchema {
2
+ directory: string;
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "Hello",
4
+ "title": "Generate a hello file",
5
+ "type": "object",
6
+ "properties": {
7
+ "directory": {
8
+ "type": "string",
9
+ "description": "",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "What directory would you like to use?"
15
+ }
16
+ },
17
+ "required": ["directory"]
18
+ }
@@ -90,7 +90,7 @@
90
90
  "@vnodes/nest": "<%- workspaceVersion %>",
91
91
  "@vnodes/prisma": "<%- workspaceVersion %>",
92
92
  "@vnodes/types": "<%- workspaceVersion %>",
93
- "<%- projectName %>-db": "workspace:*",
93
+ "<%- databaseProjectName %>": "workspace:*",
94
94
  "cache-manager": "^7.2.8",
95
95
  "class-transformer": "^0.5.1",
96
96
  "class-validator": "^0.15.1",
@@ -1,7 +1,7 @@
1
1
  import { Module } from '@vnodes/nest';
2
2
  import { SampleModule } from './sample/sample.module.js';
3
3
  import { PrismaModule } from '@vnodes/prisma';
4
- import { PrismaClient } from '<%- projectName %>-db/client'';
4
+ import { PrismaClient } from '<%- projectName %>-db/client';
5
5
 
6
6
  @Module({
7
7
  imports: [PrismaModule.forRoot({ client: PrismaClient }), SampleModule],
@@ -14,7 +14,7 @@ import { SampleCreateDto } from './sample.dto.js';
14
14
  import { InjectDelegate } from '@vnodes/prisma';
15
15
  import { Prisma } from '<%- projectName %>-db/client';
16
16
 
17
- @ResourceController('samples')
17
+ @ResourceController()
18
18
  export class SampleController {
19
19
  constructor(
20
20
  @InjectDelegate(Prisma.ModelName.Sample)
@@ -1,7 +1,7 @@
1
1
  import { Module } from '@vnodes/nest';
2
2
  import { SampleController } from './sample.controller.js';
3
3
  import { PrismaModule } from '@vnodes/prisma';
4
- import { Prisma } from '<%- projectName %>-db/client'';
4
+ import { Prisma } from '<%- projectName %>-db/client';
5
5
 
6
6
  @Module({
7
7
  imports: [PrismaModule.forFeature({ models: [Prisma.ModelName.Sample] })],
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import '../dist/cli/cli.js';
@@ -0,0 +1,4 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+ import pluginCheck from '../../.eslint/plugin-check.mjs';
3
+
4
+ export default [...baseConfig, ...pluginCheck];
@@ -0,0 +1,9 @@
1
+ {
2
+ "generators": {
3
+ "project": {
4
+ "factory": "./dist/generators/hello/hello.js",
5
+ "schema": "./dist/generators/hello/schema.json",
6
+ "description": "hello generator"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+
3
+ "name": "<%- projectName %>",
4
+ "description":"- [ ] Add project description",
5
+ "version": "<%- version %>",
6
+ "author": {
7
+ "email": "<%- email %>",
8
+ "name": "<%- authorName %>",
9
+ "url": "<%- homePageUrl %>"
10
+ },
11
+ "bugs": {
12
+ "email": "<%- email %>",
13
+ "url": "https://github.com/<%- orgName %>/<%- repoName %>/issues"
14
+ },
15
+ "homepage": "<%- homePageUrl %>/<%- directory %>",
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "tag": "latest"
19
+ },
20
+ "funding": [
21
+ "<%- fundingUrl %>"
22
+ ],
23
+ "bin":{
24
+ "<%- fileName %>":"./bin/<%- fileName %>.mjs"
25
+ },
26
+ "keywords": [
27
+ "nx",
28
+ "cli",
29
+ "plugin"
30
+ ],
31
+ "type": "module",
32
+ "main": "./dist/index.js",
33
+ "module": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ "./package.json": "./package.json",
37
+ ".": {
38
+ "@vnodes/source": "./dist/index.ts",
39
+ "types": "./dist/index.d.ts",
40
+ "import": "./dist/index.js",
41
+ "default": "./dist/index.js"
42
+ }
43
+ },
44
+ "files": [
45
+ "bin",
46
+ "assets",
47
+ "dist",
48
+ "generators.json"
49
+ ],
50
+ "nx": {
51
+ "sourceRoot": "plugins/cli/src",
52
+ "tags": [
53
+ "<%- tag %>"
54
+ ],
55
+ "targets": {
56
+ "build": {
57
+ "executor": "@nx/js:swc",
58
+ "outputs": [
59
+ "{options.outputPath}"
60
+ ],
61
+ "options": {
62
+ "clean": true,
63
+ "outputPath": "{projectRoot}/dist",
64
+ "main": "{projectRoot}/src/index.ts",
65
+ "tsConfig": "{projectRoot}/tsconfig.lib.json",
66
+ "skipTypeCheck": false,
67
+ "stripLeadingPaths": true,
68
+ "assets": [
69
+ {
70
+ "input": "{projectRoot}/src",
71
+ "glob": "**/!(*.ts)",
72
+ "output": "."
73
+ },
74
+ {
75
+ "input": "{projectRoot}/src",
76
+ "glob": "**/*.d.ts",
77
+ "output": "."
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ "lint": {
83
+ "dependsOn": [
84
+ "build"
85
+ ]
86
+ },
87
+ "doc": {}
88
+ }
89
+ },
90
+ "dependencies": {
91
+ "@nx/devkit": "22.7.5",
92
+ "@swc/helpers": "~0.5.18",
93
+ "commander": "^15.0.0"
94
+ },
95
+ "generators": "./generators.json"
96
+ }
@@ -0,0 +1,11 @@
1
+ import { program } from 'commander';
2
+ import { hello } from './hello/hello.js';
3
+ program
4
+ .name('<%- fileName %>')
5
+ .description('<%- fileName %> description')
6
+ .version('0.1.0')
7
+ .showHelpAfterError(true);
8
+
9
+ [hello].map((c) => c(program));
10
+
11
+ program.parse();
@@ -0,0 +1,17 @@
1
+ import { Command } from 'commander';
2
+
3
+ /**
4
+ * Say hello to the user
5
+ *
6
+ * ### Example
7
+ * ````sh
8
+ * vnodes hello --username YourName
9
+ * ````
10
+ * @param command main command instance
11
+ */
12
+ export function hello(command: Command) {
13
+ command
14
+ .command('hello')
15
+ .requiredOption('-u, --username <string>', 'What is your name')
16
+ .action(({ username }) => console.log(`Hello, ${username}`));
17
+ }
@@ -0,0 +1,7 @@
1
+
2
+
3
+ describe('hello generator', () => {
4
+
5
+ it('should work', ()=>expect(1).toEqual(1) )
6
+
7
+ });
@@ -0,0 +1,19 @@
1
+ import { formatFiles, generateFiles, names, type Tree } from '@nx/devkit';
2
+ import type { HelloGeneratorSchema } from './schema.js';
3
+ import { fileURLToPath } from 'url';
4
+ import { dirname, join } from 'path';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+
8
+ export async function helloGenerator(tree: Tree, options: HelloGeneratorSchema) {
9
+ const sourceRoot = join(__dirname, 'files');
10
+
11
+ const name = options.directory.split('/').pop();
12
+
13
+ if (!name) throw new Error(`Could not extract the name from directory ${options.directory}`);
14
+ const targetRoot = options.directory;
15
+ generateFiles(tree, sourceRoot, targetRoot, { ...names(name) });
16
+ await formatFiles(tree);
17
+ }
18
+
19
+ export default helloGenerator;
@@ -0,0 +1,3 @@
1
+ export interface HelloGeneratorSchema {
2
+ directory: string;
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "Hello",
4
+ "title": "Generate a hello file",
5
+ "type": "object",
6
+ "properties": {
7
+ "directory": {
8
+ "type": "string",
9
+ "description": "",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "What directory would you like to use?"
15
+ }
16
+ },
17
+ "required": ["directory"]
18
+ }
@@ -0,0 +1,4 @@
1
+ // @index(['./generators/**/*.ts','./cli/*/**/*.ts', '!./**/*.spec.ts'], f => `export * from '${f.path}.js'`)
2
+ export * from './cli/hello/hello.js';
3
+ export * from './generators/hello/hello.js';
4
+ export * from './generators/hello/schema.d.js';
@@ -1,5 +1,4 @@
1
1
  PROFILE=DEV
2
-
3
2
  DB_MIGRATIONS_PATH=../../tmp/prisma/migrations/<%- fileName %>
4
3
  DB_URL=postgres://<%- orgName %>:password@localhost:5432/<%- orgName %>?schema=<%- fileName %>
5
4
  DB_SCHEMA=<%- fileName %>
@@ -29,7 +29,9 @@
29
29
  "files": [
30
30
  "bin",
31
31
  "dist",
32
- "assets"
32
+ "assets",
33
+ "prisma",
34
+ "prisma.config.ts"
33
35
  ],
34
36
  "type": "module",
35
37
  "main": "./dist/index.js",
@@ -60,11 +62,7 @@
60
62
  "<%- tag %>"
61
63
  ],
62
64
  "targets": {
63
- "build": {
64
- "dependsOn": [
65
- "prisma:generate"
66
- ]
67
- },
65
+ "build": {},
68
66
  "prisma:migrate": {},
69
67
  "prisma:reset": {},
70
68
  "prisma:generate": {},
@@ -1,19 +1,13 @@
1
1
  import 'dotenv/config';
2
2
  import { defineConfig } from 'prisma/config';
3
- import { envOrThrow, EnvKey, EnvDefault } from '@vnodes/env';
3
+ import { env } from '@vnodes/env';
4
4
 
5
5
  export default defineConfig({
6
- schema: envOrThrow(
7
- EnvKey.DB_PRISMA_SCHEMA_PATH,
8
- EnvDefault.DB_PRISMA_SCHEMA_PATH,
9
- ),
6
+ schema: env.DB_PRISMA_SCHEMA_PATH_OR_DEFAULT,
10
7
  migrations: {
11
- path: envOrThrow<string>(
12
- EnvKey.DB_MIGRATIONS_PATH,
13
- EnvDefault.DB_MIGRATIONS_PATH,
14
- ),
8
+ path: env.DB_MIGRATIONS_PATH_OR_DEFAULT,
15
9
  },
16
10
  datasource: {
17
- url: envOrThrow(EnvKey.DB_URL),
11
+ url: env.DB_URL_OR_THROW,
18
12
  },
19
13
  });
@@ -1,6 +1,7 @@
1
1
  import { names, type Tree } from '@nx/devkit';
2
2
  import { type ProjectGeneratorSchema, type ProjectType } from './schema.d.js';
3
3
  export declare function autoTag(projectType: ProjectType): string;
4
+ export declare function brandEmail(orgName: string, shortName: string, email: string): string;
4
5
  export type NormalizedProjectGeneratorOptions = ProjectGeneratorSchema & {
5
6
  projectName: string;
6
7
  shortName: string;
@@ -8,6 +9,7 @@ export type NormalizedProjectGeneratorOptions = ProjectGeneratorSchema & {
8
9
  targetRoot: string;
9
10
  tag: string;
10
11
  workspaceVersion: string;
12
+ databaseProjectName: string;
11
13
  } & ReturnType<typeof names>;
12
14
  export declare function normalizeProjectSchema(options: ProjectGeneratorSchema): NormalizedProjectGeneratorOptions;
13
15
  export declare function projectGenerator(tree: Tree, options: ProjectGeneratorSchema): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAEL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAK9E,wBAAgB,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAaxD;AAED,MAAM,MAAM,iCAAiC,GAAG,sBAAsB,GAAG;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAE7B,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,sBAAsB,GAC9B,iCAAiC,CAoBnC;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,iBA2BhC;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/generators/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,EAAc,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAK9E,wBAAgB,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAaxD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAE3E;AAED,MAAM,MAAM,iCAAiC,GAAG,sBAAsB,GAAG;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAE7B,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,iCAAiC,CAmBzG;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAsB,iBAqBjF;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { formatFiles, generateFiles, names, updateJson } from '@nx/devkit';
2
- import { dirname, join } from 'node:path';
2
+ import { basename, dirname, join } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  const __dirname = dirname(fileURLToPath(import.meta.url));
5
5
  export function autoTag(projectType) {
@@ -15,26 +15,31 @@ export function autoTag(projectType) {
15
15
  }
16
16
  case 'prisma':
17
17
  {
18
- return `lib:core`;
18
+ return `app:db`;
19
19
  }
20
20
  }
21
21
  }
22
+ export function brandEmail(orgName, shortName, email) {
23
+ return email.split('@').join(`+${orgName}-${shortName}@`);
24
+ }
22
25
  export function normalizeProjectSchema(options) {
23
- const normalizedOptions = {
26
+ const n = {
24
27
  ...options
25
28
  };
26
- const shortName = options.directory.split('/').pop();
27
- if (typeof shortName !== 'string') {
28
- throw new Error(`Could not resolve the short name of the project form ${options.directory}`);
29
+ const shortName = basename(options.directory);
30
+ n.shortName = shortName;
31
+ n.sourceRoot = join(__dirname, options.projectType);
32
+ n.targetRoot = join(options.directory);
33
+ n.projectName = `@${options.orgName}/${shortName}`;
34
+ n.tag = autoTag(n.projectType);
35
+ n.email = brandEmail(options.orgName, shortName, options.email);
36
+ if (n.projectName.match(/-api$/)) {
37
+ n.databaseProjectName = n.projectName.replace(/-api$/, '-db');
38
+ } else {
39
+ n.databaseProjectName = n.projectName + '-db';
29
40
  }
30
- normalizedOptions.shortName = shortName;
31
- normalizedOptions.sourceRoot = join(__dirname, options.projectType);
32
- normalizedOptions.targetRoot = join(options.directory);
33
- normalizedOptions.projectName = `@${options.orgName}/${shortName}`;
34
- normalizedOptions.tag = autoTag(normalizedOptions.projectType);
35
- normalizedOptions.email = options.email.split('@').join(`+${options.orgName}-${shortName}@`);
36
41
  return {
37
- ...normalizedOptions,
42
+ ...n,
38
43
  ...names(shortName)
39
44
  };
40
45
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/generators/project/project.ts"],"sourcesContent":["import {\n formatFiles,\n generateFiles,\n names,\n updateJson,\n type Tree,\n} from '@nx/devkit';\nimport { dirname, join } from 'node:path';\nimport { type ProjectGeneratorSchema, type ProjectType } from './schema.d.js';\nimport { fileURLToPath } from 'node:url';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport function autoTag(projectType: ProjectType): string {\n switch (projectType) {\n case 'lib': {\n return 'lib:shared';\n }\n case 'cli':\n case 'api': {\n return `app:${projectType}`;\n }\n case 'prisma': {\n return `lib:core`;\n }\n }\n}\n\nexport type NormalizedProjectGeneratorOptions = ProjectGeneratorSchema & {\n projectName: string;\n shortName: string;\n sourceRoot: string;\n targetRoot: string;\n tag: string;\n workspaceVersion: string;\n} & ReturnType<typeof names>;\n\nexport function normalizeProjectSchema(\n options: ProjectGeneratorSchema,\n): NormalizedProjectGeneratorOptions {\n const normalizedOptions = { ...options } as NormalizedProjectGeneratorOptions;\n\n const shortName = options.directory.split('/').pop();\n\n if (typeof shortName !== 'string') {\n throw new Error(\n `Could not resolve the short name of the project form ${options.directory}`,\n );\n }\n normalizedOptions.shortName = shortName;\n normalizedOptions.sourceRoot = join(__dirname, options.projectType);\n normalizedOptions.targetRoot = join(options.directory);\n normalizedOptions.projectName = `@${options.orgName}/${shortName}`;\n normalizedOptions.tag = autoTag(normalizedOptions.projectType);\n normalizedOptions.email = options.email\n .split('@')\n .join(`+${options.orgName}-${shortName}@`);\n\n return { ...normalizedOptions, ...names(shortName) };\n}\n\nexport async function projectGenerator(\n tree: Tree,\n options: ProjectGeneratorSchema,\n) {\n const normalizedOptions = normalizeProjectSchema(options);\n\n generateFiles(\n tree,\n normalizedOptions.sourceRoot,\n normalizedOptions.targetRoot,\n { ...normalizedOptions },\n );\n\n generateFiles(tree, join(__dirname, 'common'), normalizedOptions.targetRoot, {\n ...normalizedOptions,\n });\n\n updateJson(tree, 'tsconfig.json', (value) => {\n if (!value.references) {\n value.references = [];\n }\n\n value.references.push({\n path: `./${options.directory}`,\n });\n\n return value;\n });\n await formatFiles(tree);\n}\n\nexport default projectGenerator;\n"],"names":["formatFiles","generateFiles","names","updateJson","dirname","join","fileURLToPath","__dirname","url","autoTag","projectType","normalizeProjectSchema","options","normalizedOptions","shortName","directory","split","pop","Error","sourceRoot","targetRoot","projectName","orgName","tag","email","projectGenerator","tree","value","references","push","path"],"mappings":"AAAA,SACEA,WAAW,EACXC,aAAa,EACbC,KAAK,EACLC,UAAU,QAEL,aAAa;AACpB,SAASC,OAAO,EAAEC,IAAI,QAAQ,YAAY;AAE1C,SAASC,aAAa,QAAQ,WAAW;AAEzC,MAAMC,YAAYH,QAAQE,cAAc,YAAYE,GAAG;AAEvD,OAAO,SAASC,QAAQC,WAAwB;IAC9C,OAAQA;QACN,KAAK;YAAO;gBACV,OAAO;YACT;QACA,KAAK;QACL,KAAK;YAAO;gBACV,OAAO,CAAC,IAAI,EAAEA,aAAa;YAC7B;QACA,KAAK;YAAU;gBACb,OAAO,CAAC,QAAQ,CAAC;YACnB;IACF;AACF;AAWA,OAAO,SAASC,uBACdC,OAA+B;IAE/B,MAAMC,oBAAoB;QAAE,GAAGD,OAAO;IAAC;IAEvC,MAAME,YAAYF,QAAQG,SAAS,CAACC,KAAK,CAAC,KAAKC,GAAG;IAElD,IAAI,OAAOH,cAAc,UAAU;QACjC,MAAM,IAAII,MACR,CAAC,qDAAqD,EAAEN,QAAQG,SAAS,EAAE;IAE/E;IACAF,kBAAkBC,SAAS,GAAGA;IAC9BD,kBAAkBM,UAAU,GAAGd,KAAKE,WAAWK,QAAQF,WAAW;IAClEG,kBAAkBO,UAAU,GAAGf,KAAKO,QAAQG,SAAS;IACrDF,kBAAkBQ,WAAW,GAAG,CAAC,CAAC,EAAET,QAAQU,OAAO,CAAC,CAAC,EAAER,WAAW;IAClED,kBAAkBU,GAAG,GAAGd,QAAQI,kBAAkBH,WAAW;IAC7DG,kBAAkBW,KAAK,GAAGZ,QAAQY,KAAK,CACpCR,KAAK,CAAC,KACNX,IAAI,CAAC,CAAC,CAAC,EAAEO,QAAQU,OAAO,CAAC,CAAC,EAAER,UAAU,CAAC,CAAC;IAE3C,OAAO;QAAE,GAAGD,iBAAiB;QAAE,GAAGX,MAAMY,UAAU;IAAC;AACrD;AAEA,OAAO,eAAeW,iBACpBC,IAAU,EACVd,OAA+B;IAE/B,MAAMC,oBAAoBF,uBAAuBC;IAEjDX,cACEyB,MACAb,kBAAkBM,UAAU,EAC5BN,kBAAkBO,UAAU,EAC5B;QAAE,GAAGP,iBAAiB;IAAC;IAGzBZ,cAAcyB,MAAMrB,KAAKE,WAAW,WAAWM,kBAAkBO,UAAU,EAAE;QAC3E,GAAGP,iBAAiB;IACtB;IAEAV,WAAWuB,MAAM,iBAAiB,CAACC;QACjC,IAAI,CAACA,MAAMC,UAAU,EAAE;YACrBD,MAAMC,UAAU,GAAG,EAAE;QACvB;QAEAD,MAAMC,UAAU,CAACC,IAAI,CAAC;YACpBC,MAAM,CAAC,EAAE,EAAElB,QAAQG,SAAS,EAAE;QAChC;QAEA,OAAOY;IACT;IACA,MAAM3B,YAAY0B;AACpB;AAEA,eAAeD,iBAAiB"}
1
+ {"version":3,"sources":["../../../src/generators/project/project.ts"],"sourcesContent":["import { formatFiles, generateFiles, names, updateJson, type Tree } from '@nx/devkit';\nimport { basename, dirname, join } from 'node:path';\nimport { type ProjectGeneratorSchema, type ProjectType } from './schema.d.js';\nimport { fileURLToPath } from 'node:url';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport function autoTag(projectType: ProjectType): string {\n switch (projectType) {\n case 'lib': {\n return 'lib:shared';\n }\n case 'cli':\n case 'api': {\n return `app:${projectType}`;\n }\n case 'prisma': {\n return `app:db`;\n }\n }\n}\n\nexport function brandEmail(orgName: string, shortName: string, email: string) {\n return email.split('@').join(`+${orgName}-${shortName}@`);\n}\n\nexport type NormalizedProjectGeneratorOptions = ProjectGeneratorSchema & {\n projectName: string;\n shortName: string;\n sourceRoot: string;\n targetRoot: string;\n tag: string;\n workspaceVersion: string;\n databaseProjectName: string;\n} & ReturnType<typeof names>;\n\nexport function normalizeProjectSchema(options: ProjectGeneratorSchema): NormalizedProjectGeneratorOptions {\n const n = { ...options } as NormalizedProjectGeneratorOptions;\n\n const shortName = basename(options.directory);\n\n n.shortName = shortName;\n n.sourceRoot = join(__dirname, options.projectType);\n n.targetRoot = join(options.directory);\n n.projectName = `@${options.orgName}/${shortName}`;\n n.tag = autoTag(n.projectType);\n n.email = brandEmail(options.orgName, shortName, options.email);\n\n if (n.projectName.match(/-api$/)) {\n n.databaseProjectName = n.projectName.replace(/-api$/, '-db');\n } else {\n n.databaseProjectName = n.projectName + '-db';\n }\n\n return { ...n, ...names(shortName) };\n}\n\nexport async function projectGenerator(tree: Tree, options: ProjectGeneratorSchema) {\n const normalizedOptions = normalizeProjectSchema(options);\n\n generateFiles(tree, normalizedOptions.sourceRoot, normalizedOptions.targetRoot, { ...normalizedOptions });\n\n generateFiles(tree, join(__dirname, 'common'), normalizedOptions.targetRoot, {\n ...normalizedOptions,\n });\n\n updateJson(tree, 'tsconfig.json', (value) => {\n if (!value.references) {\n value.references = [];\n }\n\n value.references.push({\n path: `./${options.directory}`,\n });\n\n return value;\n });\n await formatFiles(tree);\n}\n\nexport default projectGenerator;\n"],"names":["formatFiles","generateFiles","names","updateJson","basename","dirname","join","fileURLToPath","__dirname","url","autoTag","projectType","brandEmail","orgName","shortName","email","split","normalizeProjectSchema","options","n","directory","sourceRoot","targetRoot","projectName","tag","match","databaseProjectName","replace","projectGenerator","tree","normalizedOptions","value","references","push","path"],"mappings":"AAAA,SAASA,WAAW,EAAEC,aAAa,EAAEC,KAAK,EAAEC,UAAU,QAAmB,aAAa;AACtF,SAASC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,QAAQ,YAAY;AAEpD,SAASC,aAAa,QAAQ,WAAW;AAEzC,MAAMC,YAAYH,QAAQE,cAAc,YAAYE,GAAG;AAEvD,OAAO,SAASC,QAAQC,WAAwB;IAC9C,OAAQA;QACN,KAAK;YAAO;gBACV,OAAO;YACT;QACA,KAAK;QACL,KAAK;YAAO;gBACV,OAAO,CAAC,IAAI,EAAEA,aAAa;YAC7B;QACA,KAAK;YAAU;gBACb,OAAO,CAAC,MAAM,CAAC;YACjB;IACF;AACF;AAEA,OAAO,SAASC,WAAWC,OAAe,EAAEC,SAAiB,EAAEC,KAAa;IAC1E,OAAOA,MAAMC,KAAK,CAAC,KAAKV,IAAI,CAAC,CAAC,CAAC,EAAEO,QAAQ,CAAC,EAAEC,UAAU,CAAC,CAAC;AAC1D;AAYA,OAAO,SAASG,uBAAuBC,OAA+B;IACpE,MAAMC,IAAI;QAAE,GAAGD,OAAO;IAAC;IAEvB,MAAMJ,YAAYV,SAASc,QAAQE,SAAS;IAE5CD,EAAEL,SAAS,GAAGA;IACdK,EAAEE,UAAU,GAAGf,KAAKE,WAAWU,QAAQP,WAAW;IAClDQ,EAAEG,UAAU,GAAGhB,KAAKY,QAAQE,SAAS;IACrCD,EAAEI,WAAW,GAAG,CAAC,CAAC,EAAEL,QAAQL,OAAO,CAAC,CAAC,EAAEC,WAAW;IAClDK,EAAEK,GAAG,GAAGd,QAAQS,EAAER,WAAW;IAC7BQ,EAAEJ,KAAK,GAAGH,WAAWM,QAAQL,OAAO,EAAEC,WAAWI,QAAQH,KAAK;IAE9D,IAAII,EAAEI,WAAW,CAACE,KAAK,CAAC,UAAU;QAChCN,EAAEO,mBAAmB,GAAGP,EAAEI,WAAW,CAACI,OAAO,CAAC,SAAS;IACzD,OAAO;QACLR,EAAEO,mBAAmB,GAAGP,EAAEI,WAAW,GAAG;IAC1C;IAEA,OAAO;QAAE,GAAGJ,CAAC;QAAE,GAAGjB,MAAMY,UAAU;IAAC;AACrC;AAEA,OAAO,eAAec,iBAAiBC,IAAU,EAAEX,OAA+B;IAChF,MAAMY,oBAAoBb,uBAAuBC;IAEjDjB,cAAc4B,MAAMC,kBAAkBT,UAAU,EAAES,kBAAkBR,UAAU,EAAE;QAAE,GAAGQ,iBAAiB;IAAC;IAEvG7B,cAAc4B,MAAMvB,KAAKE,WAAW,WAAWsB,kBAAkBR,UAAU,EAAE;QAC3E,GAAGQ,iBAAiB;IACtB;IAEA3B,WAAW0B,MAAM,iBAAiB,CAACE;QACjC,IAAI,CAACA,MAAMC,UAAU,EAAE;YACrBD,MAAMC,UAAU,GAAG,EAAE;QACvB;QAEAD,MAAMC,UAAU,CAACC,IAAI,CAAC;YACpBC,MAAM,CAAC,EAAE,EAAEhB,QAAQE,SAAS,EAAE;QAChC;QAEA,OAAOW;IACT;IACA,MAAM/B,YAAY6B;AACpB;AAEA,eAAeD,iBAAiB"}
@@ -16,7 +16,7 @@
16
16
  "projectType": {
17
17
  "type": "string",
18
18
  "description": "Project projectType",
19
- "enum": ["lib", "api", "prisma"],
19
+ "enum": ["lib", "api", "prisma", "cli"],
20
20
  "$default": {
21
21
  "$source": "argv",
22
22
  "index": 1
@@ -87,15 +87,5 @@
87
87
  "x-prompt": "What is the current version of vnodes packages?"
88
88
  }
89
89
  },
90
- "required": [
91
- "directory",
92
- "projectType",
93
- "orgName",
94
- "repoName",
95
- "homePageUrl",
96
- "email",
97
- "fundingUrl",
98
- "authorName",
99
- "workspaceVersion"
100
- ]
90
+ "required": ["directory", "projectType", "orgName", "repoName", "homePageUrl", "email", "fundingUrl", "authorName", "workspaceVersion"]
101
91
  }