@adonisjs/core 6.1.5-8 → 6.2.0

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 (135) hide show
  1. package/README.md +3 -5
  2. package/build/commands/build.d.ts +3 -5
  3. package/build/commands/build.js +5 -9
  4. package/build/commands/commands.json +1 -1
  5. package/build/commands/configure.d.ts +21 -28
  6. package/build/commands/configure.js +60 -118
  7. package/build/commands/eject.js +2 -1
  8. package/build/commands/generate_key.js +2 -2
  9. package/build/commands/inspect_rcfile.js +19 -2
  10. package/build/commands/main.d.ts +4 -0
  11. package/build/commands/make/command.d.ts +1 -1
  12. package/build/commands/make/command.js +5 -2
  13. package/build/commands/make/controller.d.ts +2 -1
  14. package/build/commands/make/controller.js +33 -10
  15. package/build/commands/make/event.d.ts +1 -1
  16. package/build/commands/make/event.js +5 -3
  17. package/build/commands/make/exception.d.ts +1 -1
  18. package/build/commands/make/exception.js +6 -4
  19. package/build/commands/make/listener.d.ts +1 -1
  20. package/build/commands/make/listener.js +9 -6
  21. package/build/commands/make/middleware.d.ts +2 -1
  22. package/build/commands/make/middleware.js +50 -4
  23. package/build/commands/make/preload.d.ts +4 -3
  24. package/build/commands/make/preload.js +34 -35
  25. package/build/commands/make/provider.d.ts +7 -1
  26. package/build/commands/make/provider.js +57 -7
  27. package/build/commands/make/service.d.ts +1 -1
  28. package/build/commands/make/service.js +5 -3
  29. package/build/commands/make/test.d.ts +1 -1
  30. package/build/commands/make/test.js +7 -5
  31. package/build/commands/make/validator.d.ts +19 -0
  32. package/build/commands/make/validator.js +53 -0
  33. package/build/commands/make/view.d.ts +14 -0
  34. package/build/commands/make/view.js +37 -0
  35. package/build/commands/serve.js +7 -4
  36. package/build/commands/test.js +2 -2
  37. package/build/factories/core/ace.d.ts +2 -2
  38. package/build/factories/core/ignitor.d.ts +2 -2
  39. package/build/factories/core/ignitor.js +9 -10
  40. package/build/factories/core/main.d.ts +0 -1
  41. package/build/factories/core/main.js +0 -1
  42. package/build/factories/core/test_utils.d.ts +2 -2
  43. package/build/factories/stubs.d.ts +2 -2
  44. package/build/factories/stubs.js +3 -2
  45. package/build/index.d.ts +11 -140
  46. package/build/index.js +5 -1
  47. package/build/modules/ace/codemods.d.ts +93 -0
  48. package/build/modules/ace/codemods.js +259 -0
  49. package/build/modules/ace/commands.d.ts +6 -81
  50. package/build/modules/ace/commands.js +12 -33
  51. package/build/modules/ace/create_kernel.d.ts +1 -1
  52. package/build/modules/ace/create_kernel.js +19 -3
  53. package/build/modules/env/editor.d.ts +1 -0
  54. package/build/modules/{http.js → env/editor.js} +1 -1
  55. package/build/modules/hash/define_config.d.ts +29 -12
  56. package/build/modules/hash/define_config.js +52 -11
  57. package/build/modules/hash/drivers/argon.d.ts +1 -0
  58. package/build/modules/hash/drivers/argon.js +9 -0
  59. package/build/modules/hash/drivers/bcrypt.d.ts +1 -0
  60. package/build/modules/hash/drivers/bcrypt.js +9 -0
  61. package/build/modules/hash/drivers/scrypt.d.ts +1 -0
  62. package/build/modules/hash/drivers/scrypt.js +9 -0
  63. package/build/modules/hash/main.d.ts +1 -2
  64. package/build/modules/hash/main.js +1 -2
  65. package/build/modules/hash/phc_formatter.d.ts +1 -0
  66. package/build/modules/hash/phc_formatter.js +9 -0
  67. package/build/modules/http/main.d.ts +7 -0
  68. package/build/modules/http/main.js +15 -0
  69. package/build/modules/http/request_validator.d.ts +34 -0
  70. package/build/modules/http/request_validator.js +66 -0
  71. package/build/providers/app_provider.d.ts +14 -0
  72. package/build/providers/app_provider.js +47 -3
  73. package/build/providers/edge_provider.d.ts +31 -0
  74. package/build/providers/edge_provider.js +70 -0
  75. package/build/providers/hash_provider.d.ts +0 -4
  76. package/build/providers/hash_provider.js +11 -11
  77. package/build/providers/repl_provider.js +83 -8
  78. package/build/providers/vinejs_provider.d.ts +43 -0
  79. package/build/providers/vinejs_provider.js +97 -0
  80. package/build/src/cli_formatters/routes_list.d.ts +1 -1
  81. package/build/src/config_provider.d.ts +9 -0
  82. package/build/src/config_provider.js +26 -0
  83. package/build/src/debug.d.ts +1 -1
  84. package/build/src/helpers/assert.d.ts +1 -0
  85. package/build/src/helpers/assert.js +9 -0
  86. package/build/src/helpers/main.d.ts +2 -2
  87. package/build/src/helpers/main.js +2 -2
  88. package/build/src/helpers/types.d.ts +109 -16
  89. package/build/src/helpers/types.js +3 -3
  90. package/build/src/ignitor/ace.js +3 -1
  91. package/build/src/ignitor/http.d.ts +2 -2
  92. package/build/src/ignitor/http.js +5 -1
  93. package/build/src/ignitor/main.d.ts +2 -2
  94. package/build/src/ignitor/main.js +1 -1
  95. package/build/src/test_utils/http.d.ts +2 -2
  96. package/build/src/test_utils/main.d.ts +3 -3
  97. package/build/src/test_utils/main.js +1 -1
  98. package/build/src/types.d.ts +18 -18
  99. package/build/stubs/make/command/main.stub +6 -4
  100. package/build/stubs/make/controller/actions.stub +14 -0
  101. package/build/stubs/make/controller/api.stub +6 -4
  102. package/build/stubs/make/controller/main.stub +6 -4
  103. package/build/stubs/make/controller/resource.stub +6 -4
  104. package/build/stubs/make/event/main.stub +5 -3
  105. package/build/stubs/make/exception/main.stub +5 -3
  106. package/build/stubs/make/listener/for_event.stub +6 -4
  107. package/build/stubs/make/listener/main.stub +5 -3
  108. package/build/stubs/make/middleware/main.stub +7 -5
  109. package/build/stubs/make/{preload_file → preload}/main.stub +5 -3
  110. package/build/stubs/make/provider/main.stub +6 -4
  111. package/build/stubs/make/service/main.stub +5 -3
  112. package/build/stubs/make/test/main.stub +5 -3
  113. package/build/stubs/make/validator/main.stub +7 -0
  114. package/build/stubs/make/validator/resource.stub +26 -0
  115. package/build/stubs/make/view/main.stub +6 -0
  116. package/build/types/bodyparser.js +1 -1
  117. package/build/types/helpers.d.ts +1 -0
  118. package/build/types/helpers.js +9 -0
  119. package/build/types/http.d.ts +7 -0
  120. package/package.json +71 -56
  121. package/build/commands/make/_base.d.ts +0 -36
  122. package/build/commands/make/_base.js +0 -27
  123. package/build/modules/ace/shell.d.ts +0 -12
  124. package/build/modules/ace/shell.js +0 -49
  125. package/build/modules/hash/drivers_collection.d.ts +0 -21
  126. package/build/modules/hash/drivers_collection.js +0 -45
  127. package/build/modules/http.d.ts +0 -1
  128. package/build/providers/http_provider.d.ts +0 -26
  129. package/build/providers/http_provider.js +0 -61
  130. package/build/src/bindings/repl.d.ts +0 -6
  131. package/build/src/bindings/repl.js +0 -78
  132. /package/build/modules/{env.d.ts → env/main.d.ts} +0 -0
  133. /package/build/modules/{env.js → env/main.js} +0 -0
  134. /package/build/stubs/{index.d.ts → main.d.ts} +0 -0
  135. /package/build/stubs/{index.js → main.js} +0 -0
@@ -3,10 +3,12 @@
3
3
  {{#var eventName = generators.eventName(event.name)}}
4
4
  {{#var eventFileName = generators.eventFileName(event.name)}}
5
5
  {{#var eventImportPath = generators.importPath('#events', event.path, eventFileName)}}
6
- ---
7
- to: {{ app.listenersPath(entity.path, listenerFileName) }}
8
- ---
9
- import {{ eventName }} from '{{ eventImportPath }}'
6
+ {{{
7
+ exports({
8
+ to: app.listenersPath(entity.path, listenerFileName)
9
+ })
10
+ }}}
11
+ import type {{ eventName }} from '{{ eventImportPath }}'
10
12
 
11
13
  export default class {{ listenerName }} {
12
14
  async handle(event: {{ eventName }}) {}
@@ -1,7 +1,9 @@
1
1
  {{#var listenerName = generators.listenerName(entity.name)}}
2
2
  {{#var listenerFileName = generators.listenerFileName(entity.name)}}
3
- ---
4
- to: {{ app.listenersPath(entity.path, listenerFileName) }}
5
- ---
3
+ {{{
4
+ exports({
5
+ to: app.listenersPath(entity.path, listenerFileName)
6
+ })
7
+ }}}
6
8
  export default class {{ listenerName }} {
7
9
  }
@@ -1,10 +1,12 @@
1
1
  {{#var middlewareName = generators.middlewareName(entity.name)}}
2
2
  {{#var middlewareFileName = generators.middlewareFileName(entity.name)}}
3
- ---
4
- to: {{ app.middlewarePath(entity.path, middlewareFileName) }}
5
- ---
6
- import { HttpContext } from '@adonisjs/core/http'
7
- import { NextFn } from '@adonisjs/core/types/http'
3
+ {{{
4
+ exports({
5
+ to: app.middlewarePath(entity.path, middlewareFileName)
6
+ })
7
+ }}}
8
+ import type { HttpContext } from '@adonisjs/core/http'
9
+ import type { NextFn } from '@adonisjs/core/types/http'
8
10
 
9
11
  export default class {{ middlewareName }} {
10
12
  async handle(ctx: HttpContext, next: NextFn) {
@@ -1,4 +1,6 @@
1
1
  {{#var preloadFileName = string(entity.name).snakeCase().removeExtension().ext('.ts').toString()}}
2
- ---
3
- to: {{ app.startPath(entity.path, preloadFileName) }}
4
- ---
2
+ {{{
3
+ exports({
4
+ to: app.startPath(entity.path, preloadFileName)
5
+ })
6
+ }}}
@@ -1,9 +1,11 @@
1
1
  {{#var providerName = generators.providerName(entity.name)}}
2
2
  {{#var providerFileName = generators.providerFileName(entity.name)}}
3
- ---
4
- to: {{ app.providersPath(entity.path, providerFileName) }}
5
- ---
6
- import { ApplicationService } from '@adonisjs/core/types'
3
+ {{{
4
+ exports({
5
+ to: app.providersPath(entity.path, providerFileName)
6
+ })
7
+ }}}
8
+ import type { ApplicationService } from '@adonisjs/core/types'
7
9
 
8
10
  export default class {{ providerName }} {
9
11
  constructor(protected app: ApplicationService) {}
@@ -1,4 +1,6 @@
1
1
  {{#var serviceFileName = generators.serviceFileName(entity.name)}}
2
- ---
3
- to: {{ app.servicesPath(entity.path, serviceFileName) }}
4
- ---
2
+ {{{
3
+ exports({
4
+ to: app.servicesPath(entity.path, serviceFileName)
5
+ })
6
+ }}}
@@ -1,8 +1,10 @@
1
1
  {{#var testGroupName = generators.testGroupName(entity)}}
2
2
  {{#var testFileName = generators.testFileName(entity.name)}}
3
- ---
4
- to: {{ app.makePath(suite.directory, entity.path, testFileName) }}
5
- ---
3
+ {{{
4
+ exports({
5
+ to: app.makePath(suite.directory, entity.path, testFileName)
6
+ })
7
+ }}}
6
8
  import { test } from '@japa/runner'
7
9
 
8
10
  test.group('{{ testGroupName }}', () => {
@@ -0,0 +1,7 @@
1
+ {{#var validatorFileName = generators.validatorFileName(entity.name)}}
2
+ {{{
3
+ exports({
4
+ to: app.validatorsPath(entity.path, validatorFileName)
5
+ })
6
+ }}}
7
+ import vine from '@vinejs/vine'
@@ -0,0 +1,26 @@
1
+ {{#var validatorName = string(generators.validatorName(entity.name)).noCase()}}
2
+ {{#var validatorFileName = generators.validatorFileName(entity.name)}}
3
+ {{#var createAction = generators.validatorActionName(entity.name, 'create')}}
4
+ {{#var updateAction = generators.validatorActionName(entity.name, 'update')}}
5
+ {{{
6
+ exports({
7
+ to: app.validatorsPath(entity.path, validatorFileName)
8
+ })
9
+ }}}
10
+ import vine from '@vinejs/vine'
11
+
12
+ /**
13
+ * Validator to validate the payload when creating
14
+ * a new {{ validatorName }}.
15
+ */
16
+ export const {{ createAction }} = vine.compile(
17
+ vine.object({})
18
+ )
19
+
20
+ /**
21
+ * Validator to validate the payload when updating
22
+ * an existing {{ validatorName }}.
23
+ */
24
+ export const {{ updateAction }} = vine.compile(
25
+ vine.object({})
26
+ )
@@ -0,0 +1,6 @@
1
+ {{#var viewFileName = generators.viewFileName(entity.name)}}
2
+ {{{
3
+ exports({
4
+ to: app.viewsPath(entity.path, viewFileName)
5
+ })
6
+ }}}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @adonisjs/ace
2
+ * @adonisjs/core
3
3
  *
4
4
  * (c) AdonisJS
5
5
  *
@@ -0,0 +1 @@
1
+ export type { Opaque, ReadAllFilesOptions, NormalizeConstructor, ImportAllFilesOptions, } from '@poppinss/utils/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 {};
@@ -1 +1,8 @@
1
1
  export * from '@adonisjs/http-server/types';
2
+ import type { ValidationOptions } from '@vinejs/vine/types';
3
+ /**
4
+ * Validation options accepted by the "request.validateUsing" method
5
+ */
6
+ export type RequestValidationOptions<MetaData extends undefined | Record<string, any>> = ValidationOptions<MetaData> & {
7
+ data?: any;
8
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/core",
3
3
  "description": "Core of AdonisJS",
4
- "version": "6.1.5-8",
4
+ "version": "6.2.0",
5
5
  "engines": {
6
6
  "node": ">=18.16.0"
7
7
  },
@@ -10,7 +10,6 @@
10
10
  "files": [
11
11
  "build/modules",
12
12
  "build/commands",
13
- "build/legacy",
14
13
  "build/providers",
15
14
  "build/services",
16
15
  "build/factories",
@@ -37,17 +36,22 @@
37
36
  "./helpers": "./build/src/helpers/main.js",
38
37
  "./helpers/*": "./build/src/helpers/*.js",
39
38
  "./ace": "./build/modules/ace/main.js",
40
- "./ace/shell": "./build/modules/ace/shell.js",
39
+ "./ace/codemods": "./build/modules/ace/codemods.js",
41
40
  "./bodyparser": "./build/modules/bodyparser/main.js",
42
41
  "./bodyparser_middleware": "./build/modules/bodyparser/bodyparser_middleware.js",
43
42
  "./hash": "./build/modules/hash/main.js",
43
+ "./hash/phc_formatter": "./build/modules/hash/phc_formatter.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",
44
47
  "./app": "./build/modules/app.js",
45
48
  "./config": "./build/modules/config.js",
46
49
  "./container": "./build/modules/container.js",
47
50
  "./encryption": "./build/modules/encryption.js",
48
- "./env": "./build/modules/env.js",
51
+ "./env": "./build/modules/env/main.js",
52
+ "./env/editor": "./build/modules/env/editor.js",
49
53
  "./events": "./build/modules/events.js",
50
- "./http": "./build/modules/http.js",
54
+ "./http": "./build/modules/http/main.js",
51
55
  "./logger": "./build/modules/logger.js",
52
56
  "./repl": "./build/modules/repl.js",
53
57
  "./package.json": "./package.json",
@@ -73,69 +77,74 @@
73
77
  "index:commands": "node --loader=ts-node/esm toolkit/main.js index build/commands"
74
78
  },
75
79
  "devDependencies": {
76
- "@adonisjs/assembler": "^6.1.3-13",
77
- "@adonisjs/eslint-config": "^1.1.7",
78
- "@adonisjs/prettier-config": "^1.1.7",
79
- "@adonisjs/tsconfig": "^1.1.7",
80
- "@commitlint/cli": "^17.6.6",
81
- "@commitlint/config-conventional": "^17.6.6",
82
- "@japa/assert": "2.0.0-1",
83
- "@japa/expect-type": "2.0.0-0",
84
- "@japa/file-system": "2.0.0-1",
85
- "@japa/runner": "^3.0.0-5",
86
- "@swc/core": "^1.3.68",
87
- "@types/node": "^20.4.1",
88
- "@types/pretty-hrtime": "^1.0.1",
89
- "@types/sinon": "^10.0.15",
90
- "@types/supertest": "^2.0.12",
91
- "@types/test-console": "^2.0.0",
92
- "c8": "^8.0.0",
80
+ "@adonisjs/assembler": "^7.0.0",
81
+ "@adonisjs/eslint-config": "^1.2.0",
82
+ "@adonisjs/prettier-config": "^1.2.0",
83
+ "@adonisjs/tsconfig": "^1.2.0",
84
+ "@commitlint/cli": "^18.4.4",
85
+ "@commitlint/config-conventional": "^18.4.4",
86
+ "@japa/assert": "^2.1.0",
87
+ "@japa/expect-type": "^2.0.1",
88
+ "@japa/file-system": "^2.1.0",
89
+ "@japa/runner": "^3.1.1",
90
+ "@swc/core": "^1.3.102",
91
+ "@types/node": "^20.10.7",
92
+ "@types/pretty-hrtime": "^1.0.3",
93
+ "@types/sinon": "^17.0.2",
94
+ "@types/supertest": "^6.0.2",
95
+ "@types/test-console": "^2.0.3",
96
+ "@vinejs/vine": "^1.7.0",
97
+ "argon2": "^0.31.1",
98
+ "bcrypt": "^5.1.1",
99
+ "c8": "^9.0.0",
93
100
  "copyfiles": "^2.4.1",
94
101
  "cross-env": "^7.0.3",
95
- "del-cli": "^5.0.0",
96
- "eslint": "^8.44.0",
102
+ "del-cli": "^5.1.0",
103
+ "edge.js": "^6.0.1",
104
+ "eslint": "^8.56.0",
105
+ "execa": "^8.0.1",
97
106
  "get-port": "^7.0.0",
98
107
  "github-label-sync": "^2.3.1",
99
108
  "husky": "^8.0.3",
100
- "np": "^8.0.4",
101
- "prettier": "^2.8.8",
102
- "sinon": "^15.2.0",
109
+ "np": "^9.2.0",
110
+ "prettier": "^3.1.1",
111
+ "sinon": "^17.0.1",
103
112
  "supertest": "^6.3.3",
104
113
  "test-console": "^2.0.0",
105
- "ts-node": "^10.9.1",
106
- "typescript": "^5.1.6"
114
+ "ts-node": "^10.9.2",
115
+ "typescript": "^5.3.3"
107
116
  },
108
117
  "dependencies": {
109
- "@adonisjs/ace": "^12.3.1-8",
110
- "@adonisjs/application": "^7.1.2-8",
111
- "@adonisjs/bodyparser": "^9.3.2-6",
112
- "@adonisjs/config": "^4.2.1-2",
113
- "@adonisjs/encryption": "^5.1.2-2",
114
- "@adonisjs/env": "^4.2.0-3",
115
- "@adonisjs/events": "^8.4.9-3",
116
- "@adonisjs/fold": "^9.9.3-6",
117
- "@adonisjs/hash": "^8.3.1-3",
118
- "@adonisjs/http-server": "^6.8.2-8",
119
- "@adonisjs/logger": "^5.4.2-3",
120
- "@adonisjs/repl": "^4.0.0-5",
121
- "@antfu/install-pkg": "^0.1.1",
122
- "@paralleldrive/cuid2": "^2.2.0",
123
- "@poppinss/macroable": "^1.0.0-7",
124
- "@poppinss/utils": "^6.5.0-3",
125
- "@sindresorhus/is": "^5.4.1",
126
- "@types/he": "^1.2.0",
127
- "execa": "^7.1.1",
118
+ "@adonisjs/ace": "^13.0.0",
119
+ "@adonisjs/application": "^8.0.0",
120
+ "@adonisjs/bodyparser": "^10.0.0",
121
+ "@adonisjs/config": "^5.0.0",
122
+ "@adonisjs/encryption": "^6.0.0",
123
+ "@adonisjs/env": "^5.0.0",
124
+ "@adonisjs/events": "^9.0.0",
125
+ "@adonisjs/fold": "^10.0.0",
126
+ "@adonisjs/hash": "^9.0.0",
127
+ "@adonisjs/http-server": "^7.0.0",
128
+ "@adonisjs/logger": "^6.0.0",
129
+ "@adonisjs/repl": "^4.0.0",
130
+ "@paralleldrive/cuid2": "^2.2.2",
131
+ "@poppinss/macroable": "^1.0.1",
132
+ "@poppinss/utils": "^6.7.0",
133
+ "@sindresorhus/is": "^6.0.1",
134
+ "@types/he": "^1.2.3",
128
135
  "he": "^1.2.0",
129
136
  "parse-imports": "^1.1.2",
130
137
  "pretty-hrtime": "^1.0.3",
131
- "string-width": "^6.1.0",
132
- "youch": "^3.2.3",
133
- "youch-terminal": "^2.2.2"
138
+ "string-width": "^7.0.0",
139
+ "youch": "^3.3.2",
140
+ "youch-terminal": "^2.2.3"
134
141
  },
135
142
  "peerDependencies": {
136
- "@adonisjs/assembler": "^6.1.3-12",
137
- "argon2": "^0.30.3",
138
- "bcrypt": "^5.0.1"
143
+ "@adonisjs/assembler": "^7.0.0",
144
+ "@vinejs/vine": "^1.7.0",
145
+ "argon2": "^0.31.1",
146
+ "bcrypt": "^5.1.1",
147
+ "edge.js": "^6.0.1"
139
148
  },
140
149
  "peerDependenciesMeta": {
141
150
  "argon2": {
@@ -146,6 +155,12 @@
146
155
  },
147
156
  "@adonisjs/assembler": {
148
157
  "optional": true
158
+ },
159
+ "@vinejs/vine": {
160
+ "optional": true
161
+ },
162
+ "edge.js": {
163
+ "optional": true
149
164
  }
150
165
  },
151
166
  "author": "virk,adonisjs",
@@ -174,11 +189,11 @@
174
189
  },
175
190
  "publishConfig": {
176
191
  "access": "public",
177
- "tag": "next"
192
+ "tag": "latest"
178
193
  },
179
194
  "np": {
180
195
  "message": "chore(release): %s",
181
- "tag": "next",
196
+ "tag": "latest",
182
197
  "branch": "main",
183
198
  "anyBranch": false
184
199
  },
@@ -1,36 +0,0 @@
1
- import { BaseCommand } from '../../modules/ace/main.js';
2
- import type { CommandOptions } from '../../types/ace.js';
3
- /**
4
- * Base command for make commands
5
- */
6
- export default abstract class extends BaseCommand {
7
- /**
8
- * Allowing unknown flags to enable custom workflows
9
- */
10
- static options: CommandOptions;
11
- /**
12
- * Generates the resource from stub
13
- */
14
- protected generate(stubPath: string, stubState: Record<string, any>): Promise<{
15
- relativeFileName: string;
16
- contents: any;
17
- destination: any;
18
- attributes: any;
19
- status: "created";
20
- skipReason: null;
21
- } | {
22
- relativeFileName: string;
23
- contents: any;
24
- destination: any;
25
- attributes: any;
26
- status: "force_created";
27
- skipReason: null;
28
- } | {
29
- relativeFileName: string;
30
- contents: any;
31
- destination: any;
32
- attributes: any;
33
- status: "skipped";
34
- skipReason: string;
35
- }>;
36
- }
@@ -1,27 +0,0 @@
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
- import { stubsRoot } from '../../stubs/index.js';
10
- import { BaseCommand } from '../../modules/ace/main.js';
11
- /**
12
- * Base command for make commands
13
- */
14
- export default class default_1 extends BaseCommand {
15
- /**
16
- * Allowing unknown flags to enable custom workflows
17
- */
18
- static options = {
19
- allowUnknownFlags: true,
20
- };
21
- /**
22
- * Generates the resource from stub
23
- */
24
- async generate(stubPath, stubState) {
25
- return this.makeUsingStub(stubPath, stubState, stubsRoot);
26
- }
27
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="@types/node" resolution-mode="require"/>
2
- /**
3
- * Ace shell is used to run the ace commands inside a TypeScript project
4
- * without pre-compiling TypeScript source files.
5
- *
6
- * Under the hood a child process is used to execute the "bin/console.ts" file. This
7
- * is required because we have to use "ts-node/esm" loader in order to run TypeScript
8
- * files.
9
- */
10
- export declare function aceShell(cwd: URL): {
11
- handle(argv: string[]): Promise<void>;
12
- };
@@ -1,49 +0,0 @@
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
- const DEFAULT_NODE_ARGS = [
10
- // Use ts-node/esm loader. The project must install it
11
- '--loader=ts-node/esm',
12
- // Disable annonying warnings
13
- '--no-warnings',
14
- // Enable expiremental meta resolve for cases where someone uses magic import string
15
- '--experimental-import-meta-resolve',
16
- // Enable source maps, since TSNode source maps are broken
17
- '--enable-source-maps',
18
- ];
19
- /**
20
- * Ace shell is used to run the ace commands inside a TypeScript project
21
- * without pre-compiling TypeScript source files.
22
- *
23
- * Under the hood a child process is used to execute the "bin/console.ts" file. This
24
- * is required because we have to use "ts-node/esm" loader in order to run TypeScript
25
- * files.
26
- */
27
- export function aceShell(cwd) {
28
- return {
29
- async handle(argv) {
30
- const { execaNode } = await import('execa');
31
- const childProcess = execaNode('bin/console.js', argv, {
32
- nodeOptions: DEFAULT_NODE_ARGS,
33
- preferLocal: true,
34
- windowsHide: false,
35
- localDir: cwd,
36
- cwd,
37
- buffer: false,
38
- stdio: 'inherit',
39
- });
40
- try {
41
- const result = await childProcess;
42
- process.exitCode = result.exitCode;
43
- }
44
- catch (error) {
45
- process.exitCode = 1;
46
- }
47
- },
48
- };
49
- }
@@ -1,21 +0,0 @@
1
- import type { HashDriversList } from '../../src/types.js';
2
- /**
3
- * A global collection of Hash drivers
4
- */
5
- declare class HashDriversCollection {
6
- /**
7
- * List of registered drivers
8
- */
9
- list: Partial<HashDriversList>;
10
- /**
11
- * Extend drivers collection and add a custom
12
- * driver to it.
13
- */
14
- extend<Name extends keyof HashDriversList>(driverName: Name, factoryCallback: HashDriversList[Name]): this;
15
- /**
16
- * Creates the driver instance with config
17
- */
18
- create<Name extends keyof HashDriversList>(name: Name, config: Parameters<HashDriversList[Name]>[0]): import("@adonisjs/hash").Bcrypt | import("@adonisjs/hash").Argon | import("@adonisjs/hash").Scrypt;
19
- }
20
- declare const _default: HashDriversCollection;
21
- export default _default;
@@ -1,45 +0,0 @@
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
- /**
10
- * This class exists in the core, because it maintains a list of
11
- * globally available drivers applicable to the hash manager
12
- * instance registered with the container.
13
- *
14
- * In other words, these drivers are not needed by the hash module
15
- * regular usage and specific to AdonisJS container flow.
16
- */
17
- import { RuntimeException } from '@poppinss/utils';
18
- /**
19
- * A global collection of Hash drivers
20
- */
21
- class HashDriversCollection {
22
- /**
23
- * List of registered drivers
24
- */
25
- list = {};
26
- /**
27
- * Extend drivers collection and add a custom
28
- * driver to it.
29
- */
30
- extend(driverName, factoryCallback) {
31
- this.list[driverName] = factoryCallback;
32
- return this;
33
- }
34
- /**
35
- * Creates the driver instance with config
36
- */
37
- create(name, config) {
38
- const driverFactory = this.list[name];
39
- if (!driverFactory) {
40
- throw new RuntimeException(`Unknown hash driver "${String(name)}". Make sure the driver is registered`);
41
- }
42
- return driverFactory(config);
43
- }
44
- }
45
- export default new HashDriversCollection();
@@ -1 +0,0 @@
1
- export * from '@adonisjs/http-server';
@@ -1,26 +0,0 @@
1
- import type { ApplicationService } from '../src/types.js';
2
- /**
3
- * Http Service provider binds the router and the HTTP server to
4
- * the container.
5
- */
6
- export default class HttpServiceProvider {
7
- protected app: ApplicationService;
8
- constructor(app: ApplicationService);
9
- /**
10
- * Registers the HTTP server with the container as a singleton
11
- */
12
- protected registerServer(): void;
13
- /**
14
- * Registers router with the container as a singleton
15
- */
16
- protected registerRouter(): void;
17
- /**
18
- * Self construct bodyparser middleware class, since it needs
19
- * config that cannot be resolved by the container
20
- */
21
- protected registerBodyParserMiddleware(): void;
22
- /**
23
- * Registers bindings
24
- */
25
- register(): void;
26
- }