@expressots/cli 3.0.0 → 4.0.0-preview.2

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 (180) hide show
  1. package/README.md +41 -95
  2. package/bin/cicd/cli.d.ts +6 -0
  3. package/bin/cicd/cli.js +126 -0
  4. package/bin/cicd/form.d.ts +29 -0
  5. package/bin/cicd/form.js +345 -0
  6. package/bin/cicd/generators/azure-devops.d.ts +2 -0
  7. package/bin/cicd/generators/azure-devops.js +370 -0
  8. package/bin/cicd/generators/bitbucket.d.ts +2 -0
  9. package/bin/cicd/generators/bitbucket.js +217 -0
  10. package/bin/cicd/generators/circleci.d.ts +2 -0
  11. package/bin/cicd/generators/circleci.js +274 -0
  12. package/bin/cicd/generators/github-actions.d.ts +14 -0
  13. package/bin/cicd/generators/github-actions.js +426 -0
  14. package/bin/cicd/generators/gitlab-ci.d.ts +2 -0
  15. package/bin/cicd/generators/gitlab-ci.js +237 -0
  16. package/bin/cicd/generators/index.d.ts +6 -0
  17. package/bin/cicd/generators/index.js +15 -0
  18. package/bin/cicd/generators/jenkins.d.ts +2 -0
  19. package/bin/cicd/generators/jenkins.js +248 -0
  20. package/bin/cicd/generators/template-loader.d.ts +17 -0
  21. package/bin/cicd/generators/template-loader.js +128 -0
  22. package/bin/cicd/index.d.ts +1 -0
  23. package/bin/cicd/index.js +5 -0
  24. package/bin/cli.d.ts +1 -1
  25. package/bin/cli.js +18 -3
  26. package/bin/commands/project.commands.d.ts +19 -6
  27. package/bin/commands/project.commands.js +390 -61
  28. package/bin/config/index.d.ts +5 -0
  29. package/bin/config/index.js +10 -0
  30. package/bin/config/manager.d.ts +98 -0
  31. package/bin/config/manager.js +222 -0
  32. package/bin/containerize/analyzers/bootstrap-analyzer.d.ts +46 -0
  33. package/bin/containerize/analyzers/bootstrap-analyzer.js +187 -0
  34. package/bin/containerize/analyzers/project-analyzer.d.ts +20 -0
  35. package/bin/containerize/analyzers/project-analyzer.js +150 -0
  36. package/bin/containerize/cli.d.ts +4 -0
  37. package/bin/containerize/cli.js +113 -0
  38. package/bin/containerize/form.d.ts +15 -0
  39. package/bin/containerize/form.js +154 -0
  40. package/bin/containerize/generators/ci-generator.d.ts +31 -0
  41. package/bin/containerize/generators/ci-generator.js +936 -0
  42. package/bin/containerize/generators/docker-compose-generator.d.ts +8 -0
  43. package/bin/containerize/generators/docker-compose-generator.js +186 -0
  44. package/bin/containerize/generators/dockerfile-generator.d.ts +8 -0
  45. package/bin/containerize/generators/dockerfile-generator.js +635 -0
  46. package/bin/containerize/generators/kubernetes-generator.d.ts +8 -0
  47. package/bin/containerize/generators/kubernetes-generator.js +133 -0
  48. package/bin/containerize/generators/template-loader.d.ts +36 -0
  49. package/bin/containerize/generators/template-loader.js +129 -0
  50. package/bin/containerize/index.d.ts +4 -0
  51. package/bin/containerize/index.js +13 -0
  52. package/bin/containerize/presets/preset-registry.d.ts +20 -0
  53. package/bin/containerize/presets/preset-registry.js +102 -0
  54. package/bin/costs/cli.d.ts +5 -0
  55. package/bin/costs/cli.js +183 -0
  56. package/bin/costs/form.d.ts +44 -0
  57. package/bin/costs/form.js +412 -0
  58. package/bin/costs/index.d.ts +4 -0
  59. package/bin/costs/index.js +25 -0
  60. package/bin/costs/pricing-manager.d.ts +84 -0
  61. package/bin/costs/pricing-manager.js +342 -0
  62. package/bin/costs/providers/index.d.ts +32 -0
  63. package/bin/costs/providers/index.js +153 -0
  64. package/bin/costs/sources/api-source.d.ts +10 -0
  65. package/bin/costs/sources/api-source.js +32 -0
  66. package/bin/costs/sources/index.d.ts +6 -0
  67. package/bin/costs/sources/index.js +15 -0
  68. package/bin/costs/sources/local-json-source.d.ts +23 -0
  69. package/bin/costs/sources/local-json-source.js +59 -0
  70. package/bin/costs/sources/remote-json-source.d.ts +11 -0
  71. package/bin/costs/sources/remote-json-source.js +53 -0
  72. package/bin/costs/types.d.ts +53 -0
  73. package/bin/costs/types.js +5 -0
  74. package/bin/dev/cli.d.ts +4 -0
  75. package/bin/dev/cli.js +134 -0
  76. package/bin/dev/form.d.ts +36 -0
  77. package/bin/dev/form.js +254 -0
  78. package/bin/dev/index.d.ts +1 -0
  79. package/bin/dev/index.js +5 -0
  80. package/bin/generate/cli.js +29 -2
  81. package/bin/generate/form.d.ts +5 -1
  82. package/bin/generate/form.js +3 -3
  83. package/bin/generate/templates/nonopinionated/config.tpl +12 -0
  84. package/bin/generate/templates/nonopinionated/event.tpl +10 -0
  85. package/bin/generate/templates/nonopinionated/guard.tpl +18 -0
  86. package/bin/generate/templates/nonopinionated/handler.tpl +12 -0
  87. package/bin/generate/templates/nonopinionated/interceptor.tpl +27 -0
  88. package/bin/generate/templates/opinionated/config.tpl +47 -0
  89. package/bin/generate/templates/opinionated/entity.tpl +1 -8
  90. package/bin/generate/templates/opinionated/event.tpl +15 -0
  91. package/bin/generate/templates/opinionated/guard.tpl +41 -0
  92. package/bin/generate/templates/opinionated/handler.tpl +23 -0
  93. package/bin/generate/templates/opinionated/interceptor.tpl +50 -0
  94. package/bin/generate/utils/command-utils.d.ts +7 -3
  95. package/bin/generate/utils/command-utils.js +95 -31
  96. package/bin/generate/utils/nonopininated-cmd.d.ts +10 -1
  97. package/bin/generate/utils/nonopininated-cmd.js +100 -1
  98. package/bin/generate/utils/opinionated-cmd.d.ts +10 -1
  99. package/bin/generate/utils/opinionated-cmd.js +112 -7
  100. package/bin/generate/utils/string-utils.d.ts +6 -0
  101. package/bin/generate/utils/string-utils.js +13 -1
  102. package/bin/help/form.js +11 -3
  103. package/bin/migrate/analyzers/platform-detector.d.ts +14 -0
  104. package/bin/migrate/analyzers/platform-detector.js +116 -0
  105. package/bin/migrate/cli.d.ts +6 -0
  106. package/bin/migrate/cli.js +96 -0
  107. package/bin/migrate/form.d.ts +25 -0
  108. package/bin/migrate/form.js +347 -0
  109. package/bin/migrate/generators/compose-to-k8s.d.ts +2 -0
  110. package/bin/migrate/generators/compose-to-k8s.js +324 -0
  111. package/bin/migrate/generators/compose-to-railway.d.ts +2 -0
  112. package/bin/migrate/generators/compose-to-railway.js +138 -0
  113. package/bin/migrate/generators/compose-to-render.d.ts +2 -0
  114. package/bin/migrate/generators/compose-to-render.js +148 -0
  115. package/bin/migrate/generators/generic-migration.d.ts +9 -0
  116. package/bin/migrate/generators/generic-migration.js +221 -0
  117. package/bin/migrate/generators/heroku-to-fly.d.ts +2 -0
  118. package/bin/migrate/generators/heroku-to-fly.js +291 -0
  119. package/bin/migrate/generators/heroku-to-railway.d.ts +2 -0
  120. package/bin/migrate/generators/heroku-to-railway.js +283 -0
  121. package/bin/migrate/generators/heroku-to-render.d.ts +2 -0
  122. package/bin/migrate/generators/heroku-to-render.js +148 -0
  123. package/bin/migrate/generators/index.d.ts +7 -0
  124. package/bin/migrate/generators/index.js +17 -0
  125. package/bin/migrate/generators/template-loader.d.ts +21 -0
  126. package/bin/migrate/generators/template-loader.js +59 -0
  127. package/bin/migrate/index.d.ts +1 -0
  128. package/bin/migrate/index.js +5 -0
  129. package/bin/new/cli.js +21 -6
  130. package/bin/new/form.d.ts +25 -4
  131. package/bin/new/form.js +285 -70
  132. package/bin/profile/analyzers/dockerfile-analyzer.d.ts +27 -0
  133. package/bin/profile/analyzers/dockerfile-analyzer.js +122 -0
  134. package/bin/profile/analyzers/image-analyzer.d.ts +19 -0
  135. package/bin/profile/analyzers/image-analyzer.js +85 -0
  136. package/bin/profile/cli.d.ts +4 -0
  137. package/bin/profile/cli.js +92 -0
  138. package/bin/profile/form.d.ts +56 -0
  139. package/bin/profile/form.js +400 -0
  140. package/bin/profile/index.d.ts +1 -0
  141. package/bin/profile/index.js +5 -0
  142. package/bin/profile/optimizers/index.d.ts +19 -0
  143. package/bin/profile/optimizers/index.js +137 -0
  144. package/bin/providers/add/form.d.ts +1 -1
  145. package/bin/providers/add/form.js +27 -6
  146. package/bin/providers/create/form.js +2 -1
  147. package/bin/scripts/form.js +27 -5
  148. package/bin/studio/cli.d.ts +15 -0
  149. package/bin/studio/cli.js +166 -0
  150. package/bin/studio/index.d.ts +5 -0
  151. package/bin/studio/index.js +9 -0
  152. package/bin/templates/cache.d.ts +54 -0
  153. package/bin/templates/cache.js +180 -0
  154. package/bin/templates/cli.d.ts +8 -0
  155. package/bin/templates/cli.js +292 -0
  156. package/bin/templates/fetcher.d.ts +49 -0
  157. package/bin/templates/fetcher.js +208 -0
  158. package/bin/templates/index.d.ts +11 -0
  159. package/bin/templates/index.js +37 -0
  160. package/bin/templates/manager.d.ts +116 -0
  161. package/bin/templates/manager.js +323 -0
  162. package/bin/templates/renderer.d.ts +49 -0
  163. package/bin/templates/renderer.js +204 -0
  164. package/bin/templates/types.d.ts +51 -0
  165. package/bin/templates/types.js +5 -0
  166. package/bin/utils/add-module-to-container.d.ts +2 -2
  167. package/bin/utils/add-module-to-container.js +15 -5
  168. package/bin/utils/cli-ui.d.ts +30 -3
  169. package/bin/utils/cli-ui.js +95 -13
  170. package/bin/utils/index.d.ts +4 -0
  171. package/bin/utils/index.js +4 -0
  172. package/bin/utils/input-validation.d.ts +50 -0
  173. package/bin/utils/input-validation.js +143 -0
  174. package/bin/utils/package-manager-commands.d.ts +24 -0
  175. package/bin/utils/package-manager-commands.js +50 -0
  176. package/bin/utils/safe-spawn.d.ts +35 -0
  177. package/bin/utils/safe-spawn.js +51 -0
  178. package/bin/utils/update-tsconfig-paths.d.ts +35 -0
  179. package/bin/utils/update-tsconfig-paths.js +286 -0
  180. package/package.json +154 -154
package/package.json CHANGED
@@ -1,158 +1,158 @@
1
1
  {
2
- "name": "@expressots/cli",
3
- "version": "3.0.0",
4
- "description": "Expressots CLI - modern, fast, lightweight nodejs web framework (@cli)",
5
- "author": "Richard Zampieri",
6
- "license": "MIT",
7
- "bugs": {
8
- "url": "https://github.com/expressots/expressots-cli/issues"
9
- },
10
- "bin": {
11
- "expressots": "bin/cli.js",
12
- "ex": "bin/cli.js"
13
- },
14
- "engines": {
15
- "node": ">=20.18.0"
16
- },
17
- "funding": {
18
- "type": "github",
19
- "url": "https://github.com/sponsors/expressots"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/expressots/expressots-cli"
24
- },
25
- "homepage": "https://expresso-ts.com",
26
- "publishConfig": {
27
- "access": "public"
28
- },
29
- "keywords": [
30
- "ExpressoTS",
31
- "CLI",
32
- "Scaffolding"
33
- ],
34
- "scripts": {
35
- "prepare": "husky",
36
- "start:build": "npm run build && npm run start",
37
- "start": "node ./bin/cli.js",
38
- "start:dev": "tsx ./src/cli.ts",
39
- "build": "npm run clean && tsc -p tsconfig.json && npm run cp:templates && node scripts/chmod.js ./bin/cli.js",
40
- "cp:templates": "node scripts/cp.js ./src/generate/templates ./bin/generate/",
41
- "clean": "node scripts/rm.js bin",
42
- "prepublish": "npm run build && npm pack",
43
- "format": "prettier --write \"./src/**/*.ts\" --cache",
44
- "lint": "eslint \"./src/**/*.ts\"",
45
- "lint:fix": "eslint \"./src/**/*.ts\" --fix",
46
- "release": "release-it",
47
- "test": "jest",
48
- "coverage": "jest --coverage",
49
- "test:watch": "jest --watch"
50
- },
51
- "dependencies": {
52
- "axios": "1.7.7",
53
- "chalk-animation": "2.0.3",
54
- "cli-progress": "3.12.0",
55
- "cli-table3": "0.6.5",
56
- "degit": "2.8.4",
57
- "glob": "10.4.5",
58
- "inquirer": "8.2.6",
2
+ "name": "@expressots/cli",
3
+ "version": "4.0.0-preview.2",
4
+ "description": "Expressots CLI - modern, fast, lightweight nodejs web framework (@cli)",
5
+ "author": "Richard Zampieri",
6
+ "license": "MIT",
7
+ "bugs": {
8
+ "url": "https://github.com/expressots/expressots-cli/issues"
9
+ },
10
+ "bin": {
11
+ "expressots": "bin/cli.js",
12
+ "ex": "bin/cli.js"
13
+ },
14
+ "engines": {
15
+ "node": ">=20.18.0"
16
+ },
17
+ "funding": {
18
+ "type": "github",
19
+ "url": "https://github.com/sponsors/expressots"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/expressots/expressots-cli"
24
+ },
25
+ "homepage": "https://expresso-ts.com",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "keywords": [
30
+ "ExpressoTS",
31
+ "CLI",
32
+ "Scaffolding"
33
+ ],
34
+ "scripts": {
35
+ "prepare": "husky",
36
+ "start:build": "npm run build && npm run start",
37
+ "start": "node ./bin/cli.js",
38
+ "start:dev": "tsx ./src/cli.ts",
39
+ "build": "npm run clean && tsc -p tsconfig.json && npm run cp:templates && node scripts/chmod.js ./bin/cli.js",
40
+ "cp:templates": "node scripts/cp.js ./src/generate/templates ./bin/generate/",
41
+ "clean": "node scripts/rm.js bin",
42
+ "prepublish": "npm run build && npm pack",
43
+ "format": "prettier --write \"./src/**/*.ts\" --cache",
44
+ "lint": "eslint \"./src/**/*.ts\"",
45
+ "lint:fix": "eslint \"./src/**/*.ts\" --fix",
46
+ "release": "release-it",
47
+ "test": "jest",
48
+ "coverage": "jest --coverage",
49
+ "test:watch": "jest --watch"
50
+ },
51
+ "dependencies": {
52
+ "cli-progress": "3.12.0",
53
+ "cli-table3": "0.6.5",
54
+ "cross-spawn": "7.0.6",
55
+ "degit": "2.8.4",
56
+ "glob": "13.0.6",
57
+ "inquirer": "8.2.6",
59
58
  "mustache": "4.2.0",
60
- "semver": "7.6.3",
61
- "ts-node": "10.9.2",
62
- "yargs": "17.7.2"
63
- },
64
- "devDependencies": {
65
- "@codecov/vite-plugin": "0.0.1-beta.9",
66
- "@commitlint/cli": "19.2.1",
67
- "@commitlint/config-conventional": "19.1.0",
68
- "@expressots/shared": "3.0.0",
69
- "@release-it/conventional-changelog": "7.0.2",
70
- "@types/chalk-animation": "1.6.1",
71
- "@types/cli-progress": "3.11.0",
72
- "@types/degit": "2.8.3",
73
- "@types/inquirer": "9.0.3",
74
- "@types/jest": "^29.5.14",
75
- "@types/mustache": "4.2.2",
76
- "@types/node": "20.12.7",
77
- "@types/yargs": "17.0.22",
78
- "@typescript-eslint/eslint-plugin": "7.6.0",
79
- "@typescript-eslint/parser": "7.6.0",
80
- "chalk": "4.1.2",
81
- "eslint": "8.57.0",
82
- "eslint-config-prettier": "9.1.0",
83
- "husky": "9.0.11",
84
- "jest": "^29.7.0",
85
- "prettier": "3.2.5",
86
- "reflect-metadata": "0.2.2",
87
- "release-it": "16.3.0",
88
- "shx": "0.3.4",
89
- "ts-jest": "^29.2.5",
90
- "tsx": "^4.19.2",
91
- "typescript": "5.2.2"
92
- },
59
+ "ora": "5.4.1",
60
+ "semver": "7.6.3",
61
+ "ts-node": "10.9.2",
62
+ "yargs": "17.7.2"
63
+ },
64
+ "devDependencies": {
65
+ "@codecov/vite-plugin": "0.0.1-beta.9",
66
+ "@commitlint/cli": "19.2.1",
67
+ "@commitlint/config-conventional": "19.1.0",
68
+ "@expressots/shared": "file:../shared/expressots-shared-4.0.0-preview.1.tgz",
69
+ "@release-it/conventional-changelog": "7.0.2",
70
+ "@types/cli-progress": "3.11.0",
71
+ "@types/cross-spawn": "6.0.6",
72
+ "@types/degit": "2.8.3",
73
+ "@types/inquirer": "9.0.3",
74
+ "@types/jest": "^29.5.14",
75
+ "@types/mustache": "4.2.2",
76
+ "@types/node": "20.12.7",
77
+ "@types/yargs": "17.0.22",
78
+ "@typescript-eslint/eslint-plugin": "7.6.0",
79
+ "@typescript-eslint/parser": "7.6.0",
80
+ "chalk": "4.1.2",
81
+ "eslint": "8.57.0",
82
+ "eslint-config-prettier": "9.1.0",
83
+ "husky": "9.0.11",
84
+ "jest": "^29.7.0",
85
+ "prettier": "3.2.5",
86
+ "reflect-metadata": "0.2.2",
87
+ "release-it": "16.3.0",
88
+ "shx": "0.3.4",
89
+ "ts-jest": "^29.2.5",
90
+ "tsx": "^4.19.2",
91
+ "typescript": "5.2.2"
92
+ },
93
93
  "release-it": {
94
- "git": {
95
- "commitMessage": "chore: release ${version}"
96
- },
97
- "github": {
98
- "release": true
99
- },
100
- "npm": {
101
- "publish": false
102
- },
103
- "plugins": {
104
- "@release-it/conventional-changelog": {
105
- "infile": "CHANGELOG.md",
106
- "preset": {
107
- "name": "conventionalcommits",
108
- "types": [
109
- {
110
- "type": "feat",
111
- "section": "Features"
112
- },
113
- {
114
- "type": "fix",
115
- "section": "Bug Fixes"
116
- },
117
- {
118
- "type": "perf",
119
- "section": "Performance Improvements"
120
- },
121
- {
122
- "type": "revert",
123
- "section": "Reverts"
124
- },
125
- {
126
- "type": "docs",
127
- "section": "Documentation"
128
- },
129
- {
130
- "type": "style",
131
- "section": "Styles"
132
- },
133
- {
134
- "type": "refactor",
135
- "section": "Code Refactoring"
136
- },
137
- {
138
- "type": "test",
139
- "section": "Tests"
140
- },
141
- {
142
- "type": "build",
143
- "section": "Build System"
144
- },
145
- {
146
- "type": "ci",
147
- "section": "Continuous Integrations"
148
- },
149
- {
150
- "type": "chore",
151
- "hidden": true
152
- }
153
- ]
154
- }
155
- }
156
- }
157
- }
94
+ "git": {
95
+ "commitMessage": "chore: release ${version}"
96
+ },
97
+ "github": {
98
+ "release": true
99
+ },
100
+ "npm": {
101
+ "publish": false
102
+ },
103
+ "plugins": {
104
+ "@release-it/conventional-changelog": {
105
+ "infile": "CHANGELOG.md",
106
+ "preset": {
107
+ "name": "conventionalcommits",
108
+ "types": [
109
+ {
110
+ "type": "feat",
111
+ "section": "Features"
112
+ },
113
+ {
114
+ "type": "fix",
115
+ "section": "Bug Fixes"
116
+ },
117
+ {
118
+ "type": "perf",
119
+ "section": "Performance Improvements"
120
+ },
121
+ {
122
+ "type": "revert",
123
+ "section": "Reverts"
124
+ },
125
+ {
126
+ "type": "docs",
127
+ "section": "Documentation"
128
+ },
129
+ {
130
+ "type": "style",
131
+ "section": "Styles"
132
+ },
133
+ {
134
+ "type": "refactor",
135
+ "section": "Code Refactoring"
136
+ },
137
+ {
138
+ "type": "test",
139
+ "section": "Tests"
140
+ },
141
+ {
142
+ "type": "build",
143
+ "section": "Build System"
144
+ },
145
+ {
146
+ "type": "ci",
147
+ "section": "Continuous Integrations"
148
+ },
149
+ {
150
+ "type": "chore",
151
+ "hidden": true
152
+ }
153
+ ]
154
+ }
155
+ }
156
+ }
157
+ }
158
158
  }