@adonisjs/core 6.1.5-2 → 6.1.5-20

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 (197) hide show
  1. package/build/commands/build.d.ts +10 -0
  2. package/build/commands/build.js +65 -22
  3. package/build/commands/commands.json +1 -1
  4. package/build/commands/configure.d.ts +30 -3
  5. package/build/commands/configure.js +103 -25
  6. package/build/commands/eject.d.ts +4 -0
  7. package/build/commands/eject.js +16 -8
  8. package/build/commands/generate_key.d.ts +4 -0
  9. package/build/commands/generate_key.js +15 -8
  10. package/build/commands/inspect_rcfile.d.ts +9 -0
  11. package/build/commands/inspect_rcfile.js +36 -0
  12. package/build/commands/list/routes.d.ts +23 -0
  13. package/build/commands/list/routes.js +29 -13
  14. package/build/commands/main.d.ts +4 -0
  15. package/build/commands/make/command.d.ts +7 -1
  16. package/build/commands/make/command.js +20 -7
  17. package/build/commands/make/controller.d.ts +10 -1
  18. package/build/commands/make/controller.js +35 -14
  19. package/build/commands/make/event.d.ts +7 -1
  20. package/build/commands/make/event.js +20 -8
  21. package/build/commands/make/exception.d.ts +14 -0
  22. package/build/commands/make/exception.js +37 -0
  23. package/build/commands/make/listener.d.ts +8 -1
  24. package/build/commands/make/listener.js +28 -12
  25. package/build/commands/make/middleware.d.ts +8 -1
  26. package/build/commands/make/middleware.js +21 -8
  27. package/build/commands/make/preload.d.ts +22 -0
  28. package/build/commands/make/preload.js +99 -0
  29. package/build/commands/make/provider.d.ts +7 -1
  30. package/build/commands/make/provider.js +28 -8
  31. package/build/commands/make/service.d.ts +14 -0
  32. package/build/commands/make/service.js +37 -0
  33. package/build/commands/make/test.d.ts +10 -1
  34. package/build/commands/make/test.js +46 -10
  35. package/build/commands/make/validator.d.ts +14 -0
  36. package/build/commands/make/validator.js +37 -0
  37. package/build/commands/make/view.d.ts +14 -0
  38. package/build/commands/make/view.js +37 -0
  39. package/build/commands/repl.d.ts +14 -0
  40. package/build/commands/repl.js +30 -0
  41. package/build/commands/serve.d.ts +12 -0
  42. package/build/commands/serve.js +78 -27
  43. package/build/commands/test.d.ts +32 -0
  44. package/build/commands/test.js +203 -0
  45. package/build/factories/app.js +8 -0
  46. package/build/factories/bodyparser.js +8 -0
  47. package/build/factories/core/ace.d.ts +4 -1
  48. package/build/factories/core/ace.js +11 -0
  49. package/build/factories/core/ignitor.d.ts +20 -1
  50. package/build/factories/core/ignitor.js +35 -1
  51. package/build/factories/core/main.js +8 -0
  52. package/build/factories/core/test_utils.d.ts +4 -1
  53. package/build/factories/core/test_utils.js +11 -0
  54. package/build/factories/encryption.js +8 -0
  55. package/build/factories/events.js +8 -0
  56. package/build/factories/hash.js +8 -0
  57. package/build/factories/http.js +8 -0
  58. package/build/factories/logger.js +8 -0
  59. package/build/factories/stubs.d.ts +10 -0
  60. package/build/factories/stubs.js +23 -1
  61. package/build/index.d.ts +6 -2
  62. package/build/index.js +14 -1
  63. package/build/modules/ace/codemods.d.ts +54 -0
  64. package/build/modules/ace/codemods.js +133 -0
  65. package/build/modules/ace/commands.d.ts +48 -0
  66. package/build/modules/ace/commands.js +54 -0
  67. package/build/modules/ace/create_kernel.d.ts +9 -0
  68. package/build/modules/ace/create_kernel.js +32 -1
  69. package/build/modules/ace/kernel.d.ts +4 -0
  70. package/build/modules/ace/kernel.js +12 -0
  71. package/build/modules/ace/main.js +8 -0
  72. package/build/modules/ace/shell.d.ts +9 -1
  73. package/build/modules/ace/shell.js +21 -0
  74. package/build/modules/app.js +8 -0
  75. package/build/modules/bodyparser/bodyparser_middleware.d.ts +4 -0
  76. package/build/modules/bodyparser/bodyparser_middleware.js +12 -0
  77. package/build/modules/bodyparser/main.js +8 -0
  78. package/build/modules/config.js +8 -0
  79. package/build/modules/container.js +8 -0
  80. package/build/modules/encryption.js +8 -0
  81. package/build/modules/env.js +8 -0
  82. package/build/modules/events.js +8 -0
  83. package/build/modules/hash/define_config.d.ts +4 -0
  84. package/build/modules/hash/define_config.js +23 -0
  85. package/build/modules/hash/drivers/argon.d.ts +1 -0
  86. package/build/modules/hash/drivers/argon.js +9 -0
  87. package/build/modules/hash/drivers/bcrypt.d.ts +1 -0
  88. package/build/modules/hash/drivers/bcrypt.js +9 -0
  89. package/build/modules/hash/drivers/scrypt.d.ts +1 -0
  90. package/build/modules/hash/drivers/scrypt.js +9 -0
  91. package/build/modules/hash/drivers_collection.d.ts +16 -4
  92. package/build/modules/hash/drivers_collection.js +31 -8
  93. package/build/modules/hash/main.d.ts +1 -0
  94. package/build/modules/hash/main.js +9 -0
  95. package/build/modules/http/main.js +9 -0
  96. package/build/modules/http/request_validator.d.ts +44 -0
  97. package/build/modules/http/request_validator.js +74 -0
  98. package/build/modules/logger.js +8 -0
  99. package/build/modules/repl.d.ts +1 -0
  100. package/build/modules/repl.js +9 -0
  101. package/build/providers/app_provider.d.ts +31 -2
  102. package/build/providers/app_provider.js +44 -15
  103. package/build/providers/edge_provider.d.ts +10 -0
  104. package/build/providers/edge_provider.js +22 -0
  105. package/build/providers/hash_provider.d.ts +22 -2
  106. package/build/providers/hash_provider.js +49 -7
  107. package/build/providers/http_provider.d.ts +17 -0
  108. package/build/providers/http_provider.js +26 -1
  109. package/build/providers/repl_provider.d.ts +13 -0
  110. package/build/providers/repl_provider.js +35 -0
  111. package/build/providers/vinejs_provider.d.ts +5 -0
  112. package/build/providers/vinejs_provider.js +13 -0
  113. package/build/services/ace.js +15 -0
  114. package/build/services/app.d.ts +8 -0
  115. package/build/services/app.js +16 -0
  116. package/build/services/config.js +11 -0
  117. package/build/services/emitter.js +13 -2
  118. package/build/services/encryption.js +13 -2
  119. package/build/services/hash.js +13 -2
  120. package/build/services/logger.js +13 -2
  121. package/build/services/repl.d.ts +3 -0
  122. package/build/services/repl.js +18 -0
  123. package/build/services/router.js +13 -2
  124. package/build/services/server.js +13 -2
  125. package/build/services/test_utils.js +15 -0
  126. package/build/src/bindings/edge/main.d.ts +7 -0
  127. package/build/src/bindings/edge/main.js +58 -0
  128. package/build/src/bindings/edge/types.d.ts +18 -0
  129. package/build/src/bindings/edge/types.js +9 -0
  130. package/build/src/bindings/repl.d.ts +6 -0
  131. package/build/src/bindings/repl.js +78 -0
  132. package/build/src/bindings/vinejs/main.d.ts +13 -0
  133. package/build/src/bindings/vinejs/main.js +76 -0
  134. package/build/src/bindings/vinejs/types.d.ts +12 -0
  135. package/build/src/bindings/vinejs/types.js +9 -0
  136. package/build/src/cli_formatters/routes_list.d.ts +24 -1
  137. package/build/src/cli_formatters/routes_list.js +118 -0
  138. package/build/src/debug.d.ts +1 -1
  139. package/build/src/debug.js +8 -0
  140. package/build/src/exceptions.d.ts +1 -0
  141. package/build/src/exceptions.js +9 -0
  142. package/build/src/helpers/is.js +8 -0
  143. package/build/src/helpers/main.d.ts +1 -1
  144. package/build/src/helpers/main.js +9 -1
  145. package/build/src/helpers/parse_binding_reference.d.ts +40 -0
  146. package/build/src/helpers/parse_binding_reference.js +60 -0
  147. package/build/src/helpers/string.d.ts +26 -0
  148. package/build/src/helpers/string.js +15 -0
  149. package/build/src/helpers/types.d.ts +114 -16
  150. package/build/src/helpers/types.js +13 -0
  151. package/build/src/ignitor/ace.d.ts +12 -0
  152. package/build/src/ignitor/ace.js +50 -1
  153. package/build/src/ignitor/http.d.ts +9 -2
  154. package/build/src/ignitor/http.js +67 -0
  155. package/build/src/ignitor/main.d.ts +29 -1
  156. package/build/src/ignitor/main.js +56 -0
  157. package/build/src/ignitor/test.d.ts +10 -0
  158. package/build/src/ignitor/test.js +25 -0
  159. package/build/src/internal_helpers.d.ts +12 -5
  160. package/build/src/internal_helpers.js +35 -7
  161. package/build/src/test_utils/http.d.ts +10 -2
  162. package/build/src/test_utils/http.js +19 -0
  163. package/build/src/test_utils/main.d.ts +21 -3
  164. package/build/src/test_utils/main.js +27 -1
  165. package/build/src/types.d.ts +65 -4
  166. package/build/src/types.js +8 -0
  167. package/build/stubs/main.js +10 -0
  168. package/build/stubs/make/exception/main.stub +10 -0
  169. package/build/stubs/make/preload_file/main.stub +4 -0
  170. package/build/stubs/make/service/main.stub +4 -0
  171. package/build/stubs/make/validator/main.stub +5 -0
  172. package/build/stubs/make/view/main.stub +4 -0
  173. package/build/toolkit/commands/index_commands.d.ts +4 -0
  174. package/build/toolkit/commands/index_commands.js +13 -5
  175. package/build/toolkit/main.js +11 -0
  176. package/build/types/ace.js +8 -0
  177. package/build/types/app.js +8 -0
  178. package/build/types/bodyparser.js +8 -0
  179. package/build/types/container.js +8 -0
  180. package/build/types/encryption.js +8 -0
  181. package/build/types/events.js +8 -0
  182. package/build/types/hash.js +8 -0
  183. package/build/types/http.js +8 -0
  184. package/build/types/logger.js +8 -0
  185. package/build/types/repl.d.ts +1 -0
  186. package/build/types/repl.js +9 -0
  187. package/package.json +83 -121
  188. package/build/commands/make/_base.d.ts +0 -6
  189. package/build/commands/make/_base.js +0 -19
  190. package/build/legacy/validator.d.ts +0 -1
  191. package/build/legacy/validator.js +0 -1
  192. package/build/modules/http.js +0 -1
  193. package/build/src/helpers/string_builder.d.ts +0 -23
  194. package/build/src/helpers/string_builder.js +0 -86
  195. package/build/stubs/index.js +0 -2
  196. /package/build/modules/{http.d.ts → http/main.d.ts} +0 -0
  197. /package/build/stubs/{index.d.ts → main.d.ts} +0 -0
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@adonisjs/core",
3
- "version": "6.1.5-2",
4
3
  "description": "Core of AdonisJS",
4
+ "version": "6.1.5-20",
5
+ "engines": {
6
+ "node": ">=18.16.0"
7
+ },
5
8
  "main": "build/index.js",
6
9
  "type": "module",
7
10
  "files": [
@@ -26,60 +29,36 @@
26
29
  "./commands": "./build/commands/main.js",
27
30
  "./commands/*": "./build/commands/*.js",
28
31
  "./factories": "./build/factories/core/main.js",
29
- "./factories/app": "./build/factories/app.js",
30
- "./factories/bodyparser": "./build/factories/bodyparser.js",
31
- "./factories/encryption": "./build/factories/encryption.js",
32
- "./factories/events": "./build/factories/events.js",
33
- "./factories/hash": "./build/factories/hash.js",
34
- "./factories/http": "./build/factories/http.js",
35
- "./factories/logger": "./build/factories/logger.js",
32
+ "./factories/*": "./build/factories/*.js",
36
33
  "./types": "./build/src/types.js",
37
- "./types/ace": "./build/types/ace.js",
38
- "./types/app": "./build/types/app.js",
39
- "./types/bodyparser": "./build/types/bodyparser.js",
40
- "./types/container": "./build/types/container.js",
41
- "./types/encryption": "./build/types/encryption.js",
42
- "./types/events": "./build/types/events.js",
43
- "./types/hash": "./build/types/hash.js",
44
- "./types/http": "./build/types/http.js",
45
- "./types/logger": "./build/types/logger.js",
46
- "./services/ace": "./build/services/ace.js",
47
- "./services/app": "./build/services/app.js",
48
- "./services/config": "./build/services/config.js",
49
- "./services/emitter": "./build/services/emitter.js",
50
- "./services/encryption": "./build/services/encryption.js",
51
- "./services/hash": "./build/services/hash.js",
52
- "./services/logger": "./build/services/logger.js",
53
- "./services/router": "./build/services/router.js",
54
- "./services/server": "./build/services/server.js",
55
- "./services/test_utils": "./build/services/test_utils.js",
56
- "./providers/app_provider": "./build/providers/app_provider.js",
57
- "./providers/hash_provider": "./build/providers/hash_provider.js",
58
- "./providers/http_provider": "./build/providers/http_provider.js",
59
- "./legacy/validator": "./build/legacy/validator.js",
34
+ "./types/*": "./build/types/*.js",
35
+ "./services/*": "./build/services/*.js",
36
+ "./providers/*": "./build/providers/*.js",
60
37
  "./helpers": "./build/src/helpers/main.js",
61
- "./helpers/is": "./build/src/helpers/is.js",
62
- "./helpers/types": "./build/src/helpers/types.js",
63
- "./helpers/string": "./build/src/helpers/string.js",
64
- "./helpers/string_builder": "./build/src/helpers/string_builder.js",
65
- "./ace/shell": "./build/modules/ace/shell.js",
38
+ "./helpers/*": "./build/src/helpers/*.js",
66
39
  "./ace": "./build/modules/ace/main.js",
40
+ "./ace/shell": "./build/modules/ace/shell.js",
67
41
  "./bodyparser": "./build/modules/bodyparser/main.js",
68
42
  "./bodyparser_middleware": "./build/modules/bodyparser/bodyparser_middleware.js",
69
43
  "./hash": "./build/modules/hash/main.js",
44
+ "./hash/drivers/argon": "./build/modules/hash/drivers/argon.js",
45
+ "./hash/drivers/bcrypt": "./build/modules/hash/drivers/bcrypt.js",
46
+ "./hash/drivers/scrypt": "./build/modules/hash/drivers/scrypt.js",
70
47
  "./app": "./build/modules/app.js",
71
48
  "./config": "./build/modules/config.js",
72
49
  "./container": "./build/modules/container.js",
73
50
  "./encryption": "./build/modules/encryption.js",
74
51
  "./env": "./build/modules/env.js",
75
52
  "./events": "./build/modules/events.js",
76
- "./http": "./build/modules/http.js",
53
+ "./http": "./build/modules/http/main.js",
77
54
  "./logger": "./build/modules/logger.js",
78
- "./package.json": "./package.json"
55
+ "./repl": "./build/modules/repl.js",
56
+ "./package.json": "./package.json",
57
+ "./exceptions": "./build/src/exceptions.js"
79
58
  },
80
59
  "scripts": {
81
60
  "pretest": "npm run lint",
82
- "test": "cross-env NODE_DEBUG=adonisjs:core c8 npm run vscode:test",
61
+ "test": "cross-env NODE_DEBUG=adonisjs:core c8 npm run quick:test",
83
62
  "clean": "del-cli build",
84
63
  "copy:templates": "copyfiles \"stubs/**/**/*.stub\" build",
85
64
  "precompile": "npm run lint",
@@ -90,83 +69,80 @@
90
69
  "version": "npm run build",
91
70
  "prepublishOnly": "npm run build",
92
71
  "lint": "eslint . --ext=.ts",
72
+ "typecheck": "tsc --noEmit",
93
73
  "format": "prettier --write .",
94
74
  "sync-labels": "github-label-sync --labels .github/labels.json adonisjs/core",
95
- "vscode:test": "node --loader=ts-node/esm --experimental-import-meta-resolve bin/test.ts",
75
+ "quick:test": "node --loader=ts-node/esm --enable-source-maps --experimental-import-meta-resolve bin/test.ts --force-exit",
96
76
  "index:commands": "node --loader=ts-node/esm toolkit/main.js index build/commands"
97
77
  },
98
- "keywords": [
99
- "adonisjs",
100
- "framework",
101
- "mvc"
102
- ],
103
- "author": "virk,adonisjs",
104
- "license": "MIT",
105
78
  "devDependencies": {
106
- "@adonisjs/assembler": "^6.1.3-3",
107
- "@commitlint/cli": "^17.4.4",
108
- "@commitlint/config-conventional": "^17.4.4",
109
- "@japa/assert": "^1.4.1",
110
- "@japa/expect-type": "^1.0.3",
111
- "@japa/file-system": "^1.0.1",
112
- "@japa/run-failed-tests": "^1.1.1",
113
- "@japa/runner": "^2.5.1",
114
- "@japa/spec-reporter": "^1.3.3",
115
- "@swc/core": "^1.3.40",
116
- "@types/node": "^18.15.3",
79
+ "@adonisjs/assembler": "^6.1.3-18",
80
+ "@adonisjs/eslint-config": "^1.1.8",
81
+ "@adonisjs/prettier-config": "^1.1.8",
82
+ "@adonisjs/tsconfig": "^1.1.8",
83
+ "@commitlint/cli": "^17.7.1",
84
+ "@commitlint/config-conventional": "^17.7.0",
85
+ "@japa/assert": "2.0.0-1",
86
+ "@japa/expect-type": "2.0.0-0",
87
+ "@japa/file-system": "2.0.0-1",
88
+ "@japa/runner": "^3.0.0-5",
89
+ "@swc/core": "^1.3.78",
90
+ "@types/node": "^20.5.1",
117
91
  "@types/pretty-hrtime": "^1.0.1",
118
- "@types/sinon": "^10.0.13",
92
+ "@types/sinon": "^10.0.15",
119
93
  "@types/supertest": "^2.0.12",
120
94
  "@types/test-console": "^2.0.0",
121
- "c8": "^7.13.0",
95
+ "@vinejs/vine": "^1.6.0",
96
+ "c8": "^8.0.1",
122
97
  "copyfiles": "^2.4.1",
123
98
  "cross-env": "^7.0.3",
124
99
  "del-cli": "^5.0.0",
125
- "eslint": "^8.36.0",
126
- "eslint-config-prettier": "^8.7.0",
127
- "eslint-plugin-adonis": "^3.0.3",
128
- "eslint-plugin-prettier": "^4.2.1",
129
- "get-port": "^6.1.2",
100
+ "edge.js": "^6.0.0-8",
101
+ "eslint": "^8.47.0",
102
+ "get-port": "^7.0.0",
130
103
  "github-label-sync": "^2.3.1",
131
104
  "husky": "^8.0.3",
132
- "np": "^7.6.3",
133
- "prettier": "^2.8.4",
134
- "sinon": "^15.0.2",
105
+ "np": "^8.0.4",
106
+ "prettier": "^3.0.2",
107
+ "sinon": "^15.2.0",
135
108
  "supertest": "^6.3.3",
136
109
  "test-console": "^2.0.0",
137
110
  "ts-node": "^10.9.1",
138
- "typescript": "^4.9.5"
111
+ "typescript": "^5.1.6"
139
112
  },
140
113
  "dependencies": {
141
- "@adonisjs/ace": "^12.3.1-3",
142
- "@adonisjs/application": "^7.1.2-2",
143
- "@adonisjs/bodyparser": "^9.3.2-2",
144
- "@adonisjs/config": "^4.2.1-0",
145
- "@adonisjs/encryption": "^5.1.2-0",
146
- "@adonisjs/env": "^4.2.0-1",
147
- "@adonisjs/events": "^8.4.9-1",
148
- "@adonisjs/fold": "^9.9.3-3",
149
- "@adonisjs/hash": "^8.3.1-1",
150
- "@adonisjs/http-server": "^6.8.2-4",
151
- "@adonisjs/logger": "^5.4.2-0",
152
- "@adonisjs/validator": "^13.0.2-0",
153
- "@paralleldrive/cuid2": "^2.2.0",
154
- "@poppinss/macroable": "^1.0.0-3",
155
- "@poppinss/utils": "^6.5.0-1",
156
- "@sindresorhus/is": "^5.3.0",
114
+ "@adonisjs/ace": "^12.3.1-10",
115
+ "@adonisjs/application": "^7.1.2-12",
116
+ "@adonisjs/bodyparser": "^9.3.2-7",
117
+ "@adonisjs/config": "^4.2.1-3",
118
+ "@adonisjs/encryption": "^5.1.2-2",
119
+ "@adonisjs/env": "^4.2.0-4",
120
+ "@adonisjs/events": "^8.4.9-4",
121
+ "@adonisjs/fold": "^9.9.3-7",
122
+ "@adonisjs/hash": "^8.3.1-5",
123
+ "@adonisjs/http-server": "^6.8.2-12",
124
+ "@adonisjs/logger": "^5.4.2-4",
125
+ "@adonisjs/repl": "^4.0.0-6",
126
+ "@antfu/install-pkg": "^0.1.1",
127
+ "@paralleldrive/cuid2": "^2.2.2",
128
+ "@poppinss/macroable": "^1.0.0-7",
129
+ "@poppinss/utils": "^6.5.0-3",
130
+ "@sindresorhus/is": "^6.0.0",
157
131
  "@types/he": "^1.2.0",
158
- "execa": "^7.1.1",
132
+ "execa": "^8.0.1",
159
133
  "he": "^1.2.0",
160
- "parse-imports": "^1.1.0",
134
+ "parse-imports": "^1.1.2",
161
135
  "pretty-hrtime": "^1.0.3",
162
- "string-width": "^5.1.2",
136
+ "string-width": "^6.1.0",
163
137
  "youch": "^3.2.3",
164
- "youch-terminal": "^2.2.0"
138
+ "youch-terminal": "^2.2.2"
165
139
  },
166
140
  "peerDependencies": {
167
- "@adonisjs/assembler": "^6.1.3-2",
141
+ "@adonisjs/assembler": "^6.1.3-18",
142
+ "@vinejs/vine": "^1.6.0",
168
143
  "argon2": "^0.30.3",
169
- "bcrypt": "^5.0.1"
144
+ "bcrypt": "^5.0.1",
145
+ "edge.js": "^6.0.0-8"
170
146
  },
171
147
  "peerDependenciesMeta": {
172
148
  "argon2": {
@@ -177,8 +153,17 @@
177
153
  },
178
154
  "@adonisjs/assembler": {
179
155
  "optional": true
156
+ },
157
+ "@vinejs/vine": {
158
+ "optional": true
159
+ },
160
+ "edge.js": {
161
+ "optional": true
180
162
  }
181
163
  },
164
+ "author": "virk,adonisjs",
165
+ "license": "MIT",
166
+ "homepage": "https://github.com/adonisjs/core#readme",
182
167
  "repository": {
183
168
  "type": "git",
184
169
  "url": "git+https://github.com/adonisjs/core.git"
@@ -186,38 +171,15 @@
186
171
  "bugs": {
187
172
  "url": "https://github.com/adonisjs/core/issues"
188
173
  },
189
- "homepage": "https://github.com/adonisjs/core#readme",
190
- "eslintConfig": {
191
- "extends": [
192
- "plugin:adonis/typescriptPackage",
193
- "prettier"
194
- ],
195
- "plugins": [
196
- "prettier"
197
- ],
198
- "rules": {
199
- "prettier/prettier": [
200
- "error",
201
- {
202
- "endOfLine": "auto"
203
- }
204
- ]
205
- }
206
- },
207
- "eslintIgnore": [
208
- "build",
209
- "backup"
174
+ "keywords": [
175
+ "adonisjs",
176
+ "framework",
177
+ "mvc"
210
178
  ],
211
- "prettier": {
212
- "trailingComma": "es5",
213
- "semi": false,
214
- "singleQuote": true,
215
- "useTabs": false,
216
- "quoteProps": "consistent",
217
- "bracketSpacing": true,
218
- "arrowParens": "always",
219
- "printWidth": 100
179
+ "eslintConfig": {
180
+ "extends": "@adonisjs/eslint-config/package"
220
181
  },
182
+ "prettier": "@adonisjs/prettier-config",
221
183
  "commitlint": {
222
184
  "extends": [
223
185
  "@commitlint/config-conventional"
@@ -1,6 +0,0 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import type { CommandOptions } from '../../types/ace.js';
3
- export default abstract class extends BaseCommand {
4
- static options: CommandOptions;
5
- protected generate(stubPath: string, stubState: Record<string, any>): Promise<void>;
6
- }
@@ -1,19 +0,0 @@
1
- import { slash } from '@poppinss/utils';
2
- import { stubsRoot } from '../../stubs/index.js';
3
- import { BaseCommand } from '../../modules/ace/main.js';
4
- export default class default_1 extends BaseCommand {
5
- static options = {
6
- allowUnknownFlags: true,
7
- };
8
- async generate(stubPath, stubState) {
9
- const stub = await this.app.stubs.build(stubPath, { source: stubsRoot });
10
- const output = await stub.generate(Object.assign({
11
- flags: this.parsed.flags,
12
- }, stubState));
13
- const entityFileName = slash(this.app.relativePath(output.destination));
14
- if (output.status === 'skipped') {
15
- return this.logger.action(`create ${entityFileName}`).skipped(output.skipReason);
16
- }
17
- this.logger.action(`create ${entityFileName}`).succeeded();
18
- }
19
- }
@@ -1 +0,0 @@
1
- export * from '@adonisjs/validator';
@@ -1 +0,0 @@
1
- export * from '@adonisjs/validator';
@@ -1 +0,0 @@
1
- export * from '@adonisjs/http-server';
@@ -1,23 +0,0 @@
1
- export declare class StringBuilder {
2
- #private;
3
- constructor(value: string | StringBuilder);
4
- dashCase(): this;
5
- dotCase(): this;
6
- snakeCase(): this;
7
- pascalCase(): this;
8
- camelCase(): this;
9
- capitalCase(): this;
10
- titleCase(): this;
11
- sentenceCase(): this;
12
- noCase(): this;
13
- plural(): this;
14
- singular(): this;
15
- slugify(): this;
16
- removeSuffix(suffix: string): this;
17
- suffix(suffix: string): this;
18
- removePrefix(prefix: string): this;
19
- prefix(prefix: string): this;
20
- removeExtension(): this;
21
- ext(extension: string): this;
22
- toString(): string;
23
- }
@@ -1,86 +0,0 @@
1
- import { extname } from 'node:path';
2
- import string from './string.js';
3
- export class StringBuilder {
4
- #value;
5
- constructor(value) {
6
- this.#value = typeof value === 'string' ? value : value.toString();
7
- }
8
- dashCase() {
9
- this.#value = string.dashCase(this.#value);
10
- return this;
11
- }
12
- dotCase() {
13
- this.#value = string.dotCase(this.#value);
14
- return this;
15
- }
16
- snakeCase() {
17
- this.#value = string.snakeCase(this.#value);
18
- return this;
19
- }
20
- pascalCase() {
21
- this.#value = string.pascalCase(this.#value);
22
- return this;
23
- }
24
- camelCase() {
25
- this.#value = string.camelCase(this.#value);
26
- return this;
27
- }
28
- capitalCase() {
29
- this.#value = string.capitalCase(this.#value);
30
- return this;
31
- }
32
- titleCase() {
33
- this.#value = string.titleCase(this.#value);
34
- return this;
35
- }
36
- sentenceCase() {
37
- this.#value = string.sentenceCase(this.#value);
38
- return this;
39
- }
40
- noCase() {
41
- this.#value = string.noCase(this.#value);
42
- return this;
43
- }
44
- plural() {
45
- this.#value = string.pluralize(this.#value);
46
- return this;
47
- }
48
- singular() {
49
- this.#value = string.singular(this.#value);
50
- return this;
51
- }
52
- slugify() {
53
- this.#value = string.slug(this.#value);
54
- return this;
55
- }
56
- removeSuffix(suffix) {
57
- this.#value = this.#value.replace(new RegExp(`[-_]?${suffix}$`, 'i'), '');
58
- return this;
59
- }
60
- suffix(suffix) {
61
- this.removeSuffix(suffix);
62
- this.#value = `${this.#value}${suffix}`;
63
- return this;
64
- }
65
- removePrefix(prefix) {
66
- this.#value = this.#value.replace(new RegExp(`^${prefix}[-_]?`, 'i'), '');
67
- return this;
68
- }
69
- prefix(prefix) {
70
- this.removePrefix(prefix);
71
- this.#value = `${prefix}${this.#value}`;
72
- return this;
73
- }
74
- removeExtension() {
75
- this.#value = this.#value.replace(new RegExp(`${extname(this.#value)}$`), '');
76
- return this;
77
- }
78
- ext(extension) {
79
- this.removeExtension();
80
- this.#value = `${this.#value}.${extension.replace(/^\./, '')}`;
81
- return this;
82
- }
83
- toString() {
84
- return this.#value;
85
- }
86
- }
@@ -1,2 +0,0 @@
1
- import { getDirname } from '@poppinss/utils';
2
- export const stubsRoot = getDirname(import.meta.url);
File without changes
File without changes