@adonisjs/core 6.1.5-0 → 6.1.5-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 (175) 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 +36 -0
  5. package/build/commands/configure.js +84 -6
  6. package/build/commands/eject.d.ts +4 -0
  7. package/build/commands/eject.js +14 -7
  8. package/build/commands/generate_key.d.ts +4 -0
  9. package/build/commands/generate_key.js +14 -7
  10. package/build/commands/inspect_rcfile.d.ts +9 -0
  11. package/build/commands/inspect_rcfile.js +20 -0
  12. package/build/commands/list/routes.d.ts +36 -0
  13. package/build/commands/list/routes.js +94 -0
  14. package/build/commands/make/_base.d.ts +31 -1
  15. package/build/commands/make/_base.js +18 -10
  16. package/build/commands/make/command.d.ts +6 -0
  17. package/build/commands/make/command.js +15 -5
  18. package/build/commands/make/controller.d.ts +9 -0
  19. package/build/commands/make/controller.js +30 -11
  20. package/build/commands/make/event.d.ts +6 -0
  21. package/build/commands/make/event.js +15 -5
  22. package/build/commands/make/exception.d.ts +14 -0
  23. package/build/commands/make/exception.js +35 -0
  24. package/build/commands/make/listener.d.ts +7 -0
  25. package/build/commands/make/listener.js +20 -7
  26. package/build/commands/make/middleware.d.ts +7 -0
  27. package/build/commands/make/middleware.js +16 -5
  28. package/build/commands/make/preload.d.ts +22 -0
  29. package/build/commands/make/preload.js +95 -0
  30. package/build/commands/make/provider.d.ts +6 -0
  31. package/build/commands/make/provider.js +22 -6
  32. package/build/commands/make/service.d.ts +14 -0
  33. package/build/commands/make/service.js +35 -0
  34. package/build/commands/make/test.d.ts +19 -0
  35. package/build/commands/make/test.js +103 -0
  36. package/build/commands/repl.d.ts +14 -0
  37. package/build/commands/repl.js +30 -0
  38. package/build/commands/serve.d.ts +12 -0
  39. package/build/commands/serve.js +78 -27
  40. package/build/commands/test.d.ts +32 -0
  41. package/build/commands/test.js +203 -0
  42. package/build/factories/app.js +8 -0
  43. package/build/factories/bodyparser.js +8 -0
  44. package/build/factories/core/ace.d.ts +4 -1
  45. package/build/factories/core/ace.js +11 -0
  46. package/build/factories/core/ignitor.d.ts +20 -1
  47. package/build/factories/core/ignitor.js +35 -1
  48. package/build/factories/core/main.js +8 -0
  49. package/build/factories/core/test_utils.d.ts +4 -1
  50. package/build/factories/core/test_utils.js +11 -0
  51. package/build/factories/encryption.js +8 -0
  52. package/build/factories/events.js +8 -0
  53. package/build/factories/hash.js +8 -0
  54. package/build/factories/http.js +8 -0
  55. package/build/factories/logger.js +8 -0
  56. package/build/factories/stubs.d.ts +10 -0
  57. package/build/factories/stubs.js +21 -0
  58. package/build/index.d.ts +5 -1
  59. package/build/index.js +13 -0
  60. package/build/modules/ace/commands.d.ts +123 -0
  61. package/build/modules/ace/commands.js +79 -0
  62. package/build/modules/ace/create_kernel.d.ts +9 -0
  63. package/build/modules/ace/create_kernel.js +31 -0
  64. package/build/modules/ace/kernel.d.ts +4 -0
  65. package/build/modules/ace/kernel.js +12 -0
  66. package/build/modules/ace/main.d.ts +1 -1
  67. package/build/modules/ace/main.js +9 -1
  68. package/build/modules/ace/shell.d.ts +9 -1
  69. package/build/modules/ace/shell.js +21 -0
  70. package/build/modules/app.js +8 -0
  71. package/build/modules/bodyparser/bodyparser_middleware.d.ts +4 -0
  72. package/build/modules/bodyparser/bodyparser_middleware.js +12 -0
  73. package/build/modules/bodyparser/main.js +8 -0
  74. package/build/modules/config.js +8 -0
  75. package/build/modules/container.js +8 -0
  76. package/build/modules/encryption.js +8 -0
  77. package/build/modules/env.js +8 -0
  78. package/build/modules/events.js +8 -0
  79. package/build/modules/hash/define_config.d.ts +3 -0
  80. package/build/modules/hash/define_config.js +20 -0
  81. package/build/modules/hash/drivers_collection.d.ts +16 -4
  82. package/build/modules/hash/drivers_collection.js +31 -8
  83. package/build/modules/hash/main.d.ts +1 -0
  84. package/build/modules/hash/main.js +9 -0
  85. package/build/modules/http/main.d.ts +2 -0
  86. package/build/modules/http/main.js +10 -0
  87. package/build/modules/http/request_validator.d.ts +44 -0
  88. package/build/modules/http/request_validator.js +74 -0
  89. package/build/modules/logger.js +8 -0
  90. package/build/modules/repl.d.ts +1 -0
  91. package/build/modules/repl.js +9 -0
  92. package/build/providers/app_provider.d.ts +31 -2
  93. package/build/providers/app_provider.js +44 -15
  94. package/build/providers/hash_provider.d.ts +16 -0
  95. package/build/providers/hash_provider.js +31 -6
  96. package/build/providers/http_provider.d.ts +17 -0
  97. package/build/providers/http_provider.js +26 -1
  98. package/build/providers/repl_provider.d.ts +13 -0
  99. package/build/providers/repl_provider.js +37 -0
  100. package/build/services/ace.js +15 -0
  101. package/build/services/app.d.ts +8 -0
  102. package/build/services/app.js +16 -0
  103. package/build/services/config.js +11 -0
  104. package/build/services/emitter.js +13 -2
  105. package/build/services/encryption.js +13 -2
  106. package/build/services/hash.js +13 -2
  107. package/build/services/logger.js +13 -2
  108. package/build/services/repl.d.ts +3 -0
  109. package/build/services/repl.js +18 -0
  110. package/build/services/router.js +13 -2
  111. package/build/services/server.js +13 -2
  112. package/build/services/test_utils.js +15 -0
  113. package/build/src/bindings/repl.d.ts +6 -0
  114. package/build/src/bindings/repl.js +78 -0
  115. package/build/src/cli_formatters/routes_list.d.ts +63 -0
  116. package/build/src/cli_formatters/routes_list.js +376 -0
  117. package/build/src/debug.d.ts +1 -1
  118. package/build/src/debug.js +8 -0
  119. package/build/src/exceptions.d.ts +1 -0
  120. package/build/src/exceptions.js +9 -0
  121. package/build/src/helpers/is.js +8 -0
  122. package/build/src/helpers/main.d.ts +3 -1
  123. package/build/src/helpers/main.js +11 -1
  124. package/build/src/helpers/parse_binding_reference.d.ts +45 -0
  125. package/build/src/helpers/parse_binding_reference.js +83 -0
  126. package/build/src/helpers/string.d.ts +26 -0
  127. package/build/src/helpers/string.js +15 -0
  128. package/build/src/helpers/types.d.ts +7 -2
  129. package/build/src/helpers/types.js +13 -0
  130. package/build/src/ignitor/ace.d.ts +12 -0
  131. package/build/src/ignitor/ace.js +50 -1
  132. package/build/src/ignitor/http.d.ts +9 -2
  133. package/build/src/ignitor/http.js +67 -0
  134. package/build/src/ignitor/main.d.ts +29 -1
  135. package/build/src/ignitor/main.js +56 -0
  136. package/build/src/ignitor/test.d.ts +10 -0
  137. package/build/src/ignitor/test.js +25 -0
  138. package/build/src/internal_helpers.d.ts +12 -5
  139. package/build/src/internal_helpers.js +35 -7
  140. package/build/src/test_utils/http.d.ts +10 -2
  141. package/build/src/test_utils/http.js +19 -0
  142. package/build/src/test_utils/main.d.ts +21 -3
  143. package/build/src/test_utils/main.js +27 -1
  144. package/build/src/types.d.ts +61 -3
  145. package/build/src/types.js +8 -0
  146. package/build/src/vinejs/extensions/main.d.ts +1 -0
  147. package/build/src/vinejs/extensions/main.js +9 -0
  148. package/build/src/vinejs/extensions/validates_files.d.ts +22 -0
  149. package/build/src/vinejs/extensions/validates_files.js +76 -0
  150. package/build/stubs/index.js +8 -0
  151. package/build/stubs/make/exception/main.stub +10 -0
  152. package/build/stubs/make/preload_file/main.stub +4 -0
  153. package/build/stubs/make/service/main.stub +4 -0
  154. package/build/stubs/make/test/main.stub +11 -0
  155. package/build/toolkit/commands/index_commands.d.ts +4 -0
  156. package/build/toolkit/commands/index_commands.js +13 -5
  157. package/build/toolkit/main.js +11 -0
  158. package/build/types/ace.js +8 -0
  159. package/build/types/app.js +8 -0
  160. package/build/types/bodyparser.js +8 -0
  161. package/build/types/container.js +8 -0
  162. package/build/types/encryption.js +8 -0
  163. package/build/types/events.js +8 -0
  164. package/build/types/hash.js +8 -0
  165. package/build/types/http.js +8 -0
  166. package/build/types/logger.js +8 -0
  167. package/build/types/repl.d.ts +1 -0
  168. package/build/types/repl.js +9 -0
  169. package/package.json +76 -123
  170. package/build/legacy/validator.d.ts +0 -1
  171. package/build/legacy/validator.js +0 -1
  172. package/build/modules/http.d.ts +0 -1
  173. package/build/modules/http.js +0 -1
  174. package/build/src/helpers/string_builder.d.ts +0 -23
  175. package/build/src/helpers/string_builder.js +0 -86
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/ace
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/bodyparser/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/fold/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/encryption/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/events/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/hash/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/http-server/types';
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export * from '@adonisjs/logger/types';
@@ -0,0 +1 @@
1
+ export * from '@adonisjs/repl/types';
@@ -0,0 +1,9 @@
1
+ /*
2
+ * @adonisjs/core
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
9
+ export * from '@adonisjs/repl/types';
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@adonisjs/core",
3
- "version": "6.1.5-0",
4
3
  "description": "Core of AdonisJS",
4
+ "version": "6.1.5-10",
5
+ "engines": {
6
+ "node": ">=18.16.0"
7
+ },
5
8
  "main": "build/index.js",
6
9
  "type": "module",
7
10
  "files": [
@@ -26,44 +29,16 @@
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",
39
+ "./vinejs/extensions": "./build/src/vinejs/extensions/main.js",
66
40
  "./ace": "./build/modules/ace/main.js",
41
+ "./ace/shell": "./build/modules/ace/shell.js",
67
42
  "./bodyparser": "./build/modules/bodyparser/main.js",
68
43
  "./bodyparser_middleware": "./build/modules/bodyparser/bodyparser_middleware.js",
69
44
  "./hash": "./build/modules/hash/main.js",
@@ -73,13 +48,15 @@
73
48
  "./encryption": "./build/modules/encryption.js",
74
49
  "./env": "./build/modules/env.js",
75
50
  "./events": "./build/modules/events.js",
76
- "./http": "./build/modules/http.js",
51
+ "./http": "./build/modules/http/main.js",
77
52
  "./logger": "./build/modules/logger.js",
78
- "./package.json": "./package.json"
53
+ "./repl": "./build/modules/repl.js",
54
+ "./package.json": "./package.json",
55
+ "./exceptions": "./build/src/exceptions.js"
79
56
  },
80
57
  "scripts": {
81
58
  "pretest": "npm run lint",
82
- "test": "cross-env NODE_DEBUG=adonisjs:core c8 npm run vscode:test",
59
+ "test": "cross-env NODE_DEBUG=adonisjs:core c8 npm run quick:test",
83
60
  "clean": "del-cli build",
84
61
  "copy:templates": "copyfiles \"stubs/**/**/*.stub\" build",
85
62
  "precompile": "npm run lint",
@@ -90,83 +67,76 @@
90
67
  "version": "npm run build",
91
68
  "prepublishOnly": "npm run build",
92
69
  "lint": "eslint . --ext=.ts",
70
+ "typecheck": "tsc --noEmit",
93
71
  "format": "prettier --write .",
94
72
  "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",
73
+ "quick:test": "node --loader=ts-node/esm --enable-source-maps --experimental-import-meta-resolve bin/test.ts --force-exit",
96
74
  "index:commands": "node --loader=ts-node/esm toolkit/main.js index build/commands"
97
75
  },
98
- "keywords": [
99
- "adonisjs",
100
- "framework",
101
- "mvc"
102
- ],
103
- "author": "virk,adonisjs",
104
- "license": "MIT",
105
76
  "devDependencies": {
106
- "@adonisjs/assembler": "^6.1.3-0",
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/preset-adonis": "^1.2.0",
113
- "@japa/run-failed-tests": "^1.1.1",
114
- "@japa/runner": "^2.5.0",
115
- "@japa/spec-reporter": "^1.3.3",
116
- "@swc/core": "^1.3.37",
117
- "@types/fs-extra": "^11.0.1",
118
- "@types/node": "^18.14.6",
77
+ "@adonisjs/assembler": "^6.1.3-13",
78
+ "@adonisjs/eslint-config": "^1.1.8",
79
+ "@adonisjs/prettier-config": "^1.1.8",
80
+ "@adonisjs/tsconfig": "^1.1.8",
81
+ "@commitlint/cli": "^17.6.7",
82
+ "@commitlint/config-conventional": "^17.6.7",
83
+ "@japa/assert": "2.0.0-1",
84
+ "@japa/expect-type": "2.0.0-0",
85
+ "@japa/file-system": "2.0.0-1",
86
+ "@japa/runner": "^3.0.0-5",
87
+ "@swc/core": "^1.3.70",
88
+ "@types/node": "^20.4.2",
119
89
  "@types/pretty-hrtime": "^1.0.1",
120
- "@types/sinon": "^10.0.13",
90
+ "@types/sinon": "^10.0.15",
121
91
  "@types/supertest": "^2.0.12",
122
92
  "@types/test-console": "^2.0.0",
123
- "c8": "^7.13.0",
93
+ "@vinejs/vine": "^1.5.2",
94
+ "c8": "^8.0.0",
124
95
  "copyfiles": "^2.4.1",
125
96
  "cross-env": "^7.0.3",
126
97
  "del-cli": "^5.0.0",
127
- "eslint": "^8.35.0",
128
- "eslint-config-prettier": "^8.6.0",
129
- "eslint-plugin-adonis": "^3.0.3",
130
- "eslint-plugin-prettier": "^4.2.1",
131
- "get-port": "^6.1.2",
132
- "github-label-sync": "^2.2.0",
98
+ "eslint": "^8.45.0",
99
+ "get-port": "^7.0.0",
100
+ "github-label-sync": "^2.3.1",
133
101
  "husky": "^8.0.3",
134
- "np": "^7.6.3",
135
- "prettier": "^2.8.4",
136
- "reflect-metadata": "^0.1.13",
137
- "sinon": "^15.0.1",
102
+ "np": "^8.0.4",
103
+ "prettier": "^3.0.0",
104
+ "sinon": "^15.2.0",
138
105
  "supertest": "^6.3.3",
139
106
  "test-console": "^2.0.0",
140
107
  "ts-node": "^10.9.1",
141
- "typescript": "^4.9.5"
108
+ "typescript": "^5.1.6"
142
109
  },
143
110
  "dependencies": {
144
- "@adonisjs/ace": "^12.3.1-0",
145
- "@adonisjs/application": "^7.1.2-0",
146
- "@adonisjs/bodyparser": "^9.3.2-0",
147
- "@adonisjs/config": "^4.2.1-0",
148
- "@adonisjs/encryption": "^5.1.2-0",
149
- "@adonisjs/env": "^4.2.0-0",
150
- "@adonisjs/events": "^8.4.9-0",
151
- "@adonisjs/fold": "^9.9.3-0",
152
- "@adonisjs/hash": "^8.3.1-0",
153
- "@adonisjs/http-server": "^6.8.2-0",
154
- "@adonisjs/logger": "^5.4.2-0",
155
- "@adonisjs/validator": "^13.0.2-0",
156
- "@poppinss/macroable": "^1.0.0-2",
157
- "@poppinss/utils": "^6.5.0-0",
158
- "@sindresorhus/is": "^5.3.0",
111
+ "@adonisjs/ace": "^12.3.1-8",
112
+ "@adonisjs/application": "^7.1.2-8",
113
+ "@adonisjs/bodyparser": "^9.3.2-6",
114
+ "@adonisjs/config": "^4.2.1-2",
115
+ "@adonisjs/encryption": "^5.1.2-2",
116
+ "@adonisjs/env": "^4.2.0-3",
117
+ "@adonisjs/events": "^8.4.9-3",
118
+ "@adonisjs/fold": "^9.9.3-6",
119
+ "@adonisjs/hash": "^8.3.1-3",
120
+ "@adonisjs/http-server": "^6.8.2-9",
121
+ "@adonisjs/logger": "^5.4.2-3",
122
+ "@adonisjs/repl": "^4.0.0-5",
123
+ "@antfu/install-pkg": "^0.1.1",
124
+ "@paralleldrive/cuid2": "^2.2.0",
125
+ "@poppinss/macroable": "^1.0.0-7",
126
+ "@poppinss/utils": "^6.5.0-3",
127
+ "@sindresorhus/is": "^5.5.2",
159
128
  "@types/he": "^1.2.0",
160
- "cuid": "^3.0.0",
161
- "execa": "^7.0.0",
162
- "fs-extra": "^11.1.0",
129
+ "execa": "^7.1.1",
163
130
  "he": "^1.2.0",
131
+ "parse-imports": "^1.1.2",
164
132
  "pretty-hrtime": "^1.0.3",
133
+ "string-width": "^6.1.0",
165
134
  "youch": "^3.2.3",
166
- "youch-terminal": "^2.2.0"
135
+ "youch-terminal": "^2.2.2"
167
136
  },
168
137
  "peerDependencies": {
169
- "@adonisjs/assembler": "^6.1.3-0",
138
+ "@adonisjs/assembler": "^6.1.3-12",
139
+ "@vinejs/vine": "^1.5.2",
170
140
  "argon2": "^0.30.3",
171
141
  "bcrypt": "^5.0.1"
172
142
  },
@@ -179,8 +149,14 @@
179
149
  },
180
150
  "@adonisjs/assembler": {
181
151
  "optional": true
152
+ },
153
+ "@vinejs/vine": {
154
+ "optional": true
182
155
  }
183
156
  },
157
+ "author": "virk,adonisjs",
158
+ "license": "MIT",
159
+ "homepage": "https://github.com/adonisjs/core#readme",
184
160
  "repository": {
185
161
  "type": "git",
186
162
  "url": "git+https://github.com/adonisjs/core.git"
@@ -188,38 +164,15 @@
188
164
  "bugs": {
189
165
  "url": "https://github.com/adonisjs/core/issues"
190
166
  },
191
- "homepage": "https://github.com/adonisjs/core#readme",
192
- "eslintConfig": {
193
- "extends": [
194
- "plugin:adonis/typescriptPackage",
195
- "prettier"
196
- ],
197
- "plugins": [
198
- "prettier"
199
- ],
200
- "rules": {
201
- "prettier/prettier": [
202
- "error",
203
- {
204
- "endOfLine": "auto"
205
- }
206
- ]
207
- }
208
- },
209
- "eslintIgnore": [
210
- "build",
211
- "backup"
167
+ "keywords": [
168
+ "adonisjs",
169
+ "framework",
170
+ "mvc"
212
171
  ],
213
- "prettier": {
214
- "trailingComma": "es5",
215
- "semi": false,
216
- "singleQuote": true,
217
- "useTabs": false,
218
- "quoteProps": "consistent",
219
- "bracketSpacing": true,
220
- "arrowParens": "always",
221
- "printWidth": 100
172
+ "eslintConfig": {
173
+ "extends": "@adonisjs/eslint-config/package"
222
174
  },
175
+ "prettier": "@adonisjs/prettier-config",
223
176
  "commitlint": {
224
177
  "extends": [
225
178
  "@commitlint/config-conventional"
@@ -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 +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
- }