@adonisjs/core 7.0.0-next.0 → 7.0.0-next.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 (96) hide show
  1. package/build/commands/add.d.ts +32 -0
  2. package/build/commands/add.js +17 -0
  3. package/build/commands/build.d.ts +22 -0
  4. package/build/commands/build.js +18 -0
  5. package/build/commands/commands.json +1 -1
  6. package/build/commands/configure.d.ts +32 -9
  7. package/build/commands/configure.js +36 -9
  8. package/build/commands/eject.d.ts +27 -2
  9. package/build/commands/eject.js +21 -2
  10. package/build/commands/env/add.d.ts +39 -2
  11. package/build/commands/env/add.js +30 -3
  12. package/build/commands/generate_key.d.ts +19 -0
  13. package/build/commands/generate_key.js +13 -0
  14. package/build/commands/inspect_rcfile.d.ts +19 -1
  15. package/build/commands/inspect_rcfile.js +19 -1
  16. package/build/commands/list/routes.d.ts +31 -9
  17. package/build/commands/list/routes.js +26 -3
  18. package/build/commands/make/command.d.ts +25 -2
  19. package/build/commands/make/command.js +22 -2
  20. package/build/commands/make/controller.d.ts +33 -0
  21. package/build/commands/make/controller.js +18 -0
  22. package/build/commands/make/event.d.ts +28 -2
  23. package/build/commands/make/event.js +25 -2
  24. package/build/commands/make/exception.d.ts +28 -2
  25. package/build/commands/make/exception.js +25 -2
  26. package/build/commands/make/listener.d.ts +36 -3
  27. package/build/commands/make/listener.js +30 -3
  28. package/build/commands/make/middleware.d.ts +23 -0
  29. package/build/commands/make/middleware.js +17 -0
  30. package/build/commands/make/preload.d.ts +30 -3
  31. package/build/commands/make/preload.js +24 -4
  32. package/build/commands/make/provider.d.ts +31 -2
  33. package/build/commands/make/provider.js +25 -3
  34. package/build/commands/make/service.d.ts +19 -0
  35. package/build/commands/make/service.js +16 -0
  36. package/build/commands/make/test.d.ts +26 -3
  37. package/build/commands/make/test.js +34 -6
  38. package/build/commands/make/transformer.d.ts +43 -0
  39. package/build/commands/make/transformer.js +65 -0
  40. package/build/commands/make/validator.d.ts +34 -3
  41. package/build/commands/make/validator.js +28 -3
  42. package/build/commands/make/view.d.ts +25 -2
  43. package/build/commands/make/view.js +22 -2
  44. package/build/commands/repl.d.ts +22 -2
  45. package/build/commands/repl.js +22 -2
  46. package/build/commands/serve.d.ts +36 -0
  47. package/build/commands/serve.js +26 -9
  48. package/build/commands/test.d.ts +66 -3
  49. package/build/commands/test.js +37 -13
  50. package/build/modules/ace/codemods.d.ts +109 -14
  51. package/build/modules/ace/codemods.js +119 -16
  52. package/build/modules/ace/commands.d.ts +0 -1
  53. package/build/modules/ace/commands.js +0 -3
  54. package/build/modules/ace/main.d.ts +30 -0
  55. package/build/modules/ace/main.js +30 -0
  56. package/build/modules/app.d.ts +17 -0
  57. package/build/modules/app.js +17 -0
  58. package/build/modules/config.d.ts +17 -0
  59. package/build/modules/config.js +17 -0
  60. package/build/modules/dumper/dumper.d.ts +5 -0
  61. package/build/modules/dumper/dumper.js +11 -1
  62. package/build/modules/dumper/main.d.ts +21 -0
  63. package/build/modules/dumper/main.js +21 -0
  64. package/build/modules/encryption.d.ts +17 -0
  65. package/build/modules/encryption.js +17 -0
  66. package/build/modules/env/main.d.ts +19 -0
  67. package/build/modules/env/main.js +19 -0
  68. package/build/modules/hash/drivers/bcrypt.d.ts +11 -0
  69. package/build/modules/hash/drivers/bcrypt.js +11 -0
  70. package/build/modules/hash/main.d.ts +18 -0
  71. package/build/modules/hash/main.js +18 -0
  72. package/build/modules/http/url_builder_client.d.ts +1 -0
  73. package/build/modules/http/url_builder_client.js +9 -0
  74. package/build/providers/app_provider.d.ts +11 -23
  75. package/build/providers/app_provider.js +41 -45
  76. package/build/providers/edge_provider.js +62 -1
  77. package/build/src/assembler_hooks/index_entities.d.ts +3 -17
  78. package/build/src/assembler_hooks/index_entities.js +31 -15
  79. package/build/src/cli_formatters/routes_list.js +23 -7
  80. package/build/src/helpers/http.d.ts +20 -0
  81. package/build/src/helpers/http.js +28 -0
  82. package/build/src/helpers/main.d.ts +1 -5
  83. package/build/src/helpers/main.js +1 -5
  84. package/build/src/helpers/string.js +24 -0
  85. package/build/src/helpers/types.d.ts +1 -0
  86. package/build/src/ignitor/http.js +18 -5
  87. package/build/src/types.d.ts +7 -0
  88. package/build/src/utils.d.ts +26 -0
  89. package/build/src/utils.js +65 -0
  90. package/build/src/vine.js +14 -6
  91. package/build/stubs/make/transformer/main.stub +18 -0
  92. package/build/types/common.d.ts +1 -0
  93. package/build/types/common.js +9 -0
  94. package/build/types/helpers.d.ts +20 -0
  95. package/build/types/http.d.ts +1 -0
  96. package/package.json +26 -23
@@ -147,7 +147,19 @@ export class Codemods extends EventEmitter {
147
147
  return transformer.project;
148
148
  }
149
149
  /**
150
- * Define validations for the environment variables
150
+ * Define validations for the environment variables in the start/env.ts file.
151
+ * This method updates the environment validation schema using the assembler.
152
+ *
153
+ * @param validations - Validation schema node for environment variables
154
+ *
155
+ * @example
156
+ * ```ts
157
+ * await codemods.defineEnvValidations({
158
+ * NODE_ENV: 'Env.schema.enum(["development", "production", "test"] as const)',
159
+ * PORT: 'Env.schema.number()',
160
+ * HOST: 'Env.schema.string({ format: "host" })'
161
+ * })
162
+ * ```
151
163
  */
152
164
  async defineEnvValidations(validations) {
153
165
  const transformer = await this.#getCodeTransformer();
@@ -166,7 +178,21 @@ export class Codemods extends EventEmitter {
166
178
  }
167
179
  }
168
180
  /**
169
- * Define validations for the environment variables
181
+ * Register middleware in the start/kernel.ts file.
182
+ * This method adds middleware to the specified stack (server, router, or named).
183
+ *
184
+ * @param stack - The middleware stack to register to ('server' | 'router' | 'named')
185
+ * @param middleware - Array of middleware nodes to register
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * await codemods.registerMiddleware('server', [
190
+ * {
191
+ * name: 'cors',
192
+ * path: '@adonisjs/cors/cors_middleware'
193
+ * }
194
+ * ])
195
+ * ```
170
196
  */
171
197
  async registerMiddleware(stack, middleware) {
172
198
  const transformer = await this.#getCodeTransformer();
@@ -185,9 +211,21 @@ export class Codemods extends EventEmitter {
185
211
  }
186
212
  }
187
213
  /**
188
- * Register bouncer policies to the list of policies
189
- * collection exported from the "app/policies/main.ts"
190
- * file.
214
+ * Register bouncer policies to the list of policies collection exported from
215
+ * the "app/policies/main.ts" file. This method adds new policy definitions
216
+ * to the policies export.
217
+ *
218
+ * @param policies - Array of policy nodes to register
219
+ *
220
+ * @example
221
+ * ```ts
222
+ * await codemods.registerPolicies([
223
+ * {
224
+ * name: 'UserPolicy',
225
+ * path: '#policies/user_policy'
226
+ * }
227
+ * ])
228
+ * ```
191
229
  */
192
230
  async registerPolicies(policies) {
193
231
  const transformer = await this.#getCodeTransformer();
@@ -206,7 +244,18 @@ export class Codemods extends EventEmitter {
206
244
  }
207
245
  }
208
246
  /**
209
- * Update RCFile
247
+ * Update the adonisrc.ts file with new configuration settings.
248
+ * This method allows modification of the AdonisJS runtime configuration.
249
+ *
250
+ * @param params - Parameters for updating the RC file (varies based on update type)
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * await codemods.updateRcFile((rcFile) => {
255
+ * rcFile.addCommand('make:custom')
256
+ * rcFile.addPreloadFile('#app/events/main')
257
+ * })
258
+ * ```
210
259
  */
211
260
  async updateRcFile(...params) {
212
261
  const transformer = await this.#getCodeTransformer();
@@ -225,7 +274,19 @@ export class Codemods extends EventEmitter {
225
274
  }
226
275
  }
227
276
  /**
228
- * Register a new Vite plugin in the `vite.config.ts` file
277
+ * Register a new Vite plugin in the vite.config.ts file.
278
+ * This method adds plugin configuration to the Vite build configuration.
279
+ *
280
+ * @param params - Parameters for adding the Vite plugin (varies based on plugin type)
281
+ *
282
+ * @example
283
+ * ```ts
284
+ * await codemods.registerVitePlugin({
285
+ * name: 'vue',
286
+ * import: 'import vue from "@vitejs/plugin-vue"',
287
+ * options: '()'
288
+ * })
289
+ * ```
229
290
  */
230
291
  async registerVitePlugin(...params) {
231
292
  const transformer = await this.#getCodeTransformer();
@@ -244,7 +305,18 @@ export class Codemods extends EventEmitter {
244
305
  }
245
306
  }
246
307
  /**
247
- * Register a new Japa plugin in the `tests/bootstrap.ts` file
308
+ * Register a new Japa plugin in the tests/bootstrap.ts file.
309
+ * This method adds plugin configuration to the test runner setup.
310
+ *
311
+ * @param params - Parameters for adding the Japa plugin (varies based on plugin type)
312
+ *
313
+ * @example
314
+ * ```ts
315
+ * await codemods.registerJapaPlugin({
316
+ * name: 'expect',
317
+ * import: 'import { expect } from "@japa/expect"'
318
+ * })
319
+ * ```
248
320
  */
249
321
  async registerJapaPlugin(...params) {
250
322
  const transformer = await this.#getCodeTransformer();
@@ -296,20 +368,35 @@ export class Codemods extends EventEmitter {
296
368
  return result;
297
369
  }
298
370
  /**
299
- * Install packages using the correct package manager
300
- * You can specify version of each package by setting it in the
301
- * name like :
371
+ * Install packages using the detected or specified package manager.
372
+ * Automatically detects npm, yarn, or pnpm and installs dependencies accordingly.
373
+ * You can specify version of each package by setting it in the name like '@adonisjs/lucid@next'.
302
374
  *
303
- * ```
304
- * this.installPackages([{ name: '@adonisjs/lucid@next', isDevDependency: false }])
375
+ * @param packages - Array of packages with their dependency type
376
+ * @param packageManager - Optional package manager to use (auto-detected if not provided)
377
+ *
378
+ * @example
379
+ * ```ts
380
+ * const success = await codemods.installPackages([
381
+ * { name: '@adonisjs/lucid', isDevDependency: false },
382
+ * { name: '@types/node', isDevDependency: true }
383
+ * ])
305
384
  * ```
306
385
  */
307
386
  async installPackages(packages, packageManager) {
308
387
  const transformer = await this.#getCodeTransformer();
309
388
  const appPath = this.#app.makePath();
310
389
  const colors = this.#cliLogger.getColors();
311
- const devDependencies = packages.filter((pkg) => pkg.isDevDependency).map(({ name }) => name);
312
- const dependencies = packages.filter((pkg) => !pkg.isDevDependency).map(({ name }) => name);
390
+ const devDependencies = packages
391
+ .filter((pkg) => pkg.isDevDependency)
392
+ .map(({ name }) => {
393
+ return name.startsWith('@adonisjs/') ? `${name}@next` : name;
394
+ });
395
+ const dependencies = packages
396
+ .filter((pkg) => !pkg.isDevDependency)
397
+ .map(({ name }) => {
398
+ return name.startsWith('@adonisjs/') ? `${name}@next` : name;
399
+ });
313
400
  if (!transformer) {
314
401
  this.#cliLogger.warning('Cannot install packages. Install "@adonisjs/assembler" or manually install following packages');
315
402
  this.#cliLogger.log(`devDependencies: ${devDependencies.join(',')}`);
@@ -357,7 +444,23 @@ export class Codemods extends EventEmitter {
357
444
  }
358
445
  }
359
446
  /**
360
- * List the packages one should install before using the packages
447
+ * List the packages that should be installed manually.
448
+ * This method displays installation commands for different package managers
449
+ * when automatic installation is not available or desired.
450
+ *
451
+ * @param packages - Array of packages with their dependency type
452
+ *
453
+ * @example
454
+ * ```ts
455
+ * await codemods.listPackagesToInstall([
456
+ * { name: '@adonisjs/lucid', isDevDependency: false },
457
+ * { name: '@types/node', isDevDependency: true }
458
+ * ])
459
+ * // Output:
460
+ * // Please install following packages
461
+ * // npm i -D @types/node
462
+ * // npm i @adonisjs/lucid
463
+ * ```
361
464
  */
362
465
  async listPackagesToInstall(packages) {
363
466
  const appPath = this.#app.makePath();
@@ -99,7 +99,6 @@ export declare class ListCommand extends AceListCommand implements BaseCommand {
99
99
  * This method provides access to AST-based code transformations.
100
100
  */
101
101
  createCodemods(): Promise<import("./codemods.js").Codemods>;
102
- execCommand(): Promise<any>;
103
102
  /**
104
103
  * Terminate the app. A command should prefer calling this method
105
104
  * over the "app.terminate", because this method only triggers
@@ -143,9 +143,6 @@ export class ListCommand extends AceListCommand {
143
143
  const { Codemods } = await import('./codemods.js');
144
144
  return new Codemods(this.app, this.logger);
145
145
  }
146
- async execCommand() {
147
- return this.exec();
148
- }
149
146
  /**
150
147
  * Terminate the app. A command should prefer calling this method
151
148
  * over the "app.terminate", because this method only triggers
@@ -1,3 +1,33 @@
1
+ /**
2
+ * Ace command line interface module for AdonisJS applications.
3
+ * Provides the kernel, base commands, and utilities for building CLI applications.
4
+ *
5
+ * @example
6
+ * // Create and use the Ace kernel
7
+ * import { Kernel, BaseCommand } from '@adonisjs/core/ace'
8
+ *
9
+ * const kernel = new Kernel(app)
10
+ * await kernel.handle(['make:controller', 'UserController'])
11
+ *
12
+ * @example
13
+ * // Create a custom command
14
+ * import { BaseCommand, args, flags } from '@adonisjs/core/ace'
15
+ *
16
+ * export default class MakeUser extends BaseCommand {
17
+ * static commandName = 'make:user'
18
+ * static description = 'Create a new user'
19
+ *
20
+ * @args.string({ description: 'Name of the user' })
21
+ * declare name: string
22
+ *
23
+ * @flags.boolean({ description: 'Create admin user' })
24
+ * declare admin: boolean
25
+ *
26
+ * async run() {
27
+ * this.logger.info(`Creating user: ${this.name}`)
28
+ * }
29
+ * }
30
+ */
1
31
  export { Kernel } from './kernel.ts';
2
32
  export { BaseCommand, ListCommand } from './commands.ts';
3
33
  export { args, flags, errors, Parser, FsLoader, ListLoader, cliHelpers, HelpCommand, IndexGenerator, tracingChannels, } from '@adonisjs/ace';
@@ -6,6 +6,36 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Ace command line interface module for AdonisJS applications.
11
+ * Provides the kernel, base commands, and utilities for building CLI applications.
12
+ *
13
+ * @example
14
+ * // Create and use the Ace kernel
15
+ * import { Kernel, BaseCommand } from '@adonisjs/core/ace'
16
+ *
17
+ * const kernel = new Kernel(app)
18
+ * await kernel.handle(['make:controller', 'UserController'])
19
+ *
20
+ * @example
21
+ * // Create a custom command
22
+ * import { BaseCommand, args, flags } from '@adonisjs/core/ace'
23
+ *
24
+ * export default class MakeUser extends BaseCommand {
25
+ * static commandName = 'make:user'
26
+ * static description = 'Create a new user'
27
+ *
28
+ * @args.string({ description: 'Name of the user' })
29
+ * declare name: string
30
+ *
31
+ * @flags.boolean({ description: 'Create admin user' })
32
+ * declare admin: boolean
33
+ *
34
+ * async run() {
35
+ * this.logger.info(`Creating user: ${this.name}`)
36
+ * }
37
+ * }
38
+ */
9
39
  export { Kernel } from "./kernel.js";
10
40
  export { BaseCommand, ListCommand } from "./commands.js";
11
41
  export { args, flags, errors, Parser, FsLoader, ListLoader, cliHelpers, HelpCommand, IndexGenerator, tracingChannels, } from '@adonisjs/ace';
@@ -1 +1,18 @@
1
+ /**
2
+ * Application module re-exports all functionality from @adonisjs/application.
3
+ * This includes the main Application class and related types for managing
4
+ * the AdonisJS application lifecycle, container bindings, and service providers.
5
+ *
6
+ * @example
7
+ * // Import the Application class
8
+ * import { Application } from '@adonisjs/core/app'
9
+ *
10
+ * const app = new Application(new URL('../', import.meta.url))
11
+ * await app.init()
12
+ * await app.boot()
13
+ *
14
+ * @example
15
+ * // Import application types
16
+ * import type { ApplicationService, ContainerBindings } from '@adonisjs/core/app'
17
+ */
1
18
  export * from '@adonisjs/application';
@@ -6,4 +6,21 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Application module re-exports all functionality from @adonisjs/application.
11
+ * This includes the main Application class and related types for managing
12
+ * the AdonisJS application lifecycle, container bindings, and service providers.
13
+ *
14
+ * @example
15
+ * // Import the Application class
16
+ * import { Application } from '@adonisjs/core/app'
17
+ *
18
+ * const app = new Application(new URL('../', import.meta.url))
19
+ * await app.init()
20
+ * await app.boot()
21
+ *
22
+ * @example
23
+ * // Import application types
24
+ * import type { ApplicationService, ContainerBindings } from '@adonisjs/core/app'
25
+ */
9
26
  export * from '@adonisjs/application';
@@ -1 +1,18 @@
1
+ /**
2
+ * Configuration module re-exports all functionality from @adonisjs/config.
3
+ * This includes the Config class and related types for managing application
4
+ * configuration files and environment-specific settings.
5
+ *
6
+ * @example
7
+ * // Import the Config class
8
+ * import { Config } from '@adonisjs/core/config'
9
+ *
10
+ * const config = new Config()
11
+ * config.set('database.connection', 'mysql')
12
+ * const dbConnection = config.get('database.connection')
13
+ *
14
+ * @example
15
+ * // Import configuration types
16
+ * import type { ConfigProvider } from '@adonisjs/core/config'
17
+ */
1
18
  export * from '@adonisjs/config';
@@ -6,4 +6,21 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Configuration module re-exports all functionality from @adonisjs/config.
11
+ * This includes the Config class and related types for managing application
12
+ * configuration files and environment-specific settings.
13
+ *
14
+ * @example
15
+ * // Import the Config class
16
+ * import { Config } from '@adonisjs/core/config'
17
+ *
18
+ * const config = new Config()
19
+ * config.set('database.connection', 'mysql')
20
+ * const dbConnection = config.get('database.connection')
21
+ *
22
+ * @example
23
+ * // Import configuration types
24
+ * import type { ConfigProvider } from '@adonisjs/core/config'
25
+ */
9
26
  export * from '@adonisjs/config';
@@ -28,6 +28,11 @@ import type { Application } from '../app.ts';
28
28
  */
29
29
  export declare class Dumper {
30
30
  #private;
31
+ /**
32
+ * Creates a new Dumper instance
33
+ *
34
+ * @param app - The AdonisJS application instance
35
+ */
31
36
  constructor(app: Application<any>);
32
37
  /**
33
38
  * Configure the HTML formatter output options
@@ -89,12 +89,22 @@ export class Dumper {
89
89
  atom: 'atom://core/open/file?filename=%f&line=%l',
90
90
  vscode: 'vscode://file/%f:%l',
91
91
  };
92
+ /**
93
+ * Creates a new Dumper instance
94
+ *
95
+ * @param app - The AdonisJS application instance
96
+ */
92
97
  constructor(app) {
93
98
  this.#app = app;
94
99
  }
95
100
  /**
96
101
  * Returns the link to open the file using dd inside one
97
- * of the known code editors
102
+ * of the known code editors. Constructs a URL that can be used
103
+ * to open the file at a specific line in supported editors.
104
+ *
105
+ * @param source - Optional source file information
106
+ * @param source.location - The file path to open
107
+ * @param source.line - The line number to jump to
98
108
  */
99
109
  #getEditorLink(source) {
100
110
  const editorURL = this.#editors[IDE] || IDE;
@@ -1,3 +1,24 @@
1
+ /**
2
+ * Dumper module provides debugging and inspection utilities for AdonisJS applications.
3
+ * Includes the Dumper class for formatting output, error classes, and configuration helpers.
4
+ *
5
+ * @example
6
+ * // Use the dumper service
7
+ * import { Dumper } from '@adonisjs/core/dumper'
8
+ *
9
+ * const dumper = new Dumper(app)
10
+ * const htmlOutput = dumper.dumpToHtml(user, { title: 'User Data' })
11
+ * const ansiOutput = dumper.dumpToAnsi(user, { title: 'Debug User' })
12
+ *
13
+ * @example
14
+ * // Configure dumper output
15
+ * import { defineConfig } from '@adonisjs/core/dumper'
16
+ *
17
+ * export default defineConfig({
18
+ * html: { showHidden: true, depth: 5 },
19
+ * console: { collapse: ['Date', 'DateTime'] }
20
+ * })
21
+ */
1
22
  export * as errors from './errors.ts';
2
23
  export { Dumper } from './dumper.ts';
3
24
  export { defineConfig } from './define_config.ts';
@@ -6,6 +6,27 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Dumper module provides debugging and inspection utilities for AdonisJS applications.
11
+ * Includes the Dumper class for formatting output, error classes, and configuration helpers.
12
+ *
13
+ * @example
14
+ * // Use the dumper service
15
+ * import { Dumper } from '@adonisjs/core/dumper'
16
+ *
17
+ * const dumper = new Dumper(app)
18
+ * const htmlOutput = dumper.dumpToHtml(user, { title: 'User Data' })
19
+ * const ansiOutput = dumper.dumpToAnsi(user, { title: 'Debug User' })
20
+ *
21
+ * @example
22
+ * // Configure dumper output
23
+ * import { defineConfig } from '@adonisjs/core/dumper'
24
+ *
25
+ * export default defineConfig({
26
+ * html: { showHidden: true, depth: 5 },
27
+ * console: { collapse: ['Date', 'DateTime'] }
28
+ * })
29
+ */
9
30
  export * as errors from "./errors.js";
10
31
  export { Dumper } from "./dumper.js";
11
32
  export { defineConfig } from "./define_config.js";
@@ -1 +1,18 @@
1
+ /**
2
+ * Encryption module re-exports all functionality from @adonisjs/encryption.
3
+ * This includes the Encryption class and related utilities for encrypting and
4
+ * decrypting data using various algorithms and key management strategies.
5
+ *
6
+ * @example
7
+ * // Import the Encryption class
8
+ * import { Encryption } from '@adonisjs/core/encryption'
9
+ *
10
+ * const encryption = new Encryption({ secret: 'your-secret-key' })
11
+ * const encrypted = encryption.encrypt('sensitive data')
12
+ * const decrypted = encryption.decrypt(encrypted)
13
+ *
14
+ * @example
15
+ * // Import encryption types and utilities
16
+ * import type { EncryptionConfig, DriverContract } from '@adonisjs/core/encryption'
17
+ */
1
18
  export * from '@adonisjs/encryption';
@@ -6,4 +6,21 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Encryption module re-exports all functionality from @adonisjs/encryption.
11
+ * This includes the Encryption class and related utilities for encrypting and
12
+ * decrypting data using various algorithms and key management strategies.
13
+ *
14
+ * @example
15
+ * // Import the Encryption class
16
+ * import { Encryption } from '@adonisjs/core/encryption'
17
+ *
18
+ * const encryption = new Encryption({ secret: 'your-secret-key' })
19
+ * const encrypted = encryption.encrypt('sensitive data')
20
+ * const decrypted = encryption.decrypt(encrypted)
21
+ *
22
+ * @example
23
+ * // Import encryption types and utilities
24
+ * import type { EncryptionConfig, DriverContract } from '@adonisjs/core/encryption'
25
+ */
9
26
  export * from '@adonisjs/encryption';
@@ -1 +1,20 @@
1
+ /**
2
+ * Environment module re-exports all functionality from @adonisjs/env.
3
+ * This includes the Env class, validation schemas, and utilities for managing
4
+ * environment variables with type safety and validation.
5
+ *
6
+ * @example
7
+ * // Import the Env class and validation
8
+ * import { Env } from '@adonisjs/core/env'
9
+ *
10
+ * const env = await Env.create(new URL('../', import.meta.url), {
11
+ * NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
12
+ * PORT: Env.schema.number(),
13
+ * HOST: Env.schema.string({ format: 'host' })
14
+ * })
15
+ *
16
+ * @example
17
+ * // Import environment types and utilities
18
+ * import type { EnvParser, EnvEditor } from '@adonisjs/core/env'
19
+ */
1
20
  export * from '@adonisjs/env';
@@ -6,4 +6,23 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Environment module re-exports all functionality from @adonisjs/env.
11
+ * This includes the Env class, validation schemas, and utilities for managing
12
+ * environment variables with type safety and validation.
13
+ *
14
+ * @example
15
+ * // Import the Env class and validation
16
+ * import { Env } from '@adonisjs/core/env'
17
+ *
18
+ * const env = await Env.create(new URL('../', import.meta.url), {
19
+ * NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
20
+ * PORT: Env.schema.number(),
21
+ * HOST: Env.schema.string({ format: 'host' })
22
+ * })
23
+ *
24
+ * @example
25
+ * // Import environment types and utilities
26
+ * import type { EnvParser, EnvEditor } from '@adonisjs/core/env'
27
+ */
9
28
  export * from '@adonisjs/env';
@@ -1 +1,12 @@
1
+ /**
2
+ * Bcrypt hash driver re-exports from @adonisjs/hash.
3
+ * Provides bcrypt password hashing functionality with configurable rounds.
4
+ *
5
+ * @example
6
+ * import { Bcrypt } from '@adonisjs/core/hash/drivers/bcrypt'
7
+ *
8
+ * const bcrypt = new Bcrypt({ rounds: 12 })
9
+ * const hashed = await bcrypt.make('password')
10
+ * const isValid = await bcrypt.verify(hashed, 'password')
11
+ */
1
12
  export * from '@adonisjs/hash/drivers/bcrypt';
@@ -6,4 +6,15 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Bcrypt hash driver re-exports from @adonisjs/hash.
11
+ * Provides bcrypt password hashing functionality with configurable rounds.
12
+ *
13
+ * @example
14
+ * import { Bcrypt } from '@adonisjs/core/hash/drivers/bcrypt'
15
+ *
16
+ * const bcrypt = new Bcrypt({ rounds: 12 })
17
+ * const hashed = await bcrypt.make('password')
18
+ * const isValid = await bcrypt.verify(hashed, 'password')
19
+ */
9
20
  export * from '@adonisjs/hash/drivers/bcrypt';
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Hash module provides password hashing functionality with multiple driver support.
3
+ * Re-exports all functionality from @adonisjs/hash along with configuration utilities.
4
+ *
5
+ * @example
6
+ * // Import the Hash manager and drivers
7
+ * import { HashManager, Hash } from '@adonisjs/core/hash'
8
+ *
9
+ * const manager = new HashManager(config)
10
+ * const hasher = manager.use('scrypt')
11
+ * const hashed = await hasher.make('password')
12
+ * const verified = await hasher.verify(hashed, 'password')
13
+ *
14
+ * @example
15
+ * // Import configuration and driver types
16
+ * import { defineConfig, drivers } from '@adonisjs/core/hash'
17
+ * import type { HashConfig, ScryptConfig } from '@adonisjs/core/types/hash'
18
+ */
1
19
  export * from '@adonisjs/hash';
2
20
  export { defineConfig, drivers } from './define_config.ts';
@@ -6,5 +6,23 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
+ /**
10
+ * Hash module provides password hashing functionality with multiple driver support.
11
+ * Re-exports all functionality from @adonisjs/hash along with configuration utilities.
12
+ *
13
+ * @example
14
+ * // Import the Hash manager and drivers
15
+ * import { HashManager, Hash } from '@adonisjs/core/hash'
16
+ *
17
+ * const manager = new HashManager(config)
18
+ * const hasher = manager.use('scrypt')
19
+ * const hashed = await hasher.make('password')
20
+ * const verified = await hasher.verify(hashed, 'password')
21
+ *
22
+ * @example
23
+ * // Import configuration and driver types
24
+ * import { defineConfig, drivers } from '@adonisjs/core/hash'
25
+ * import type { HashConfig, ScryptConfig } from '@adonisjs/core/types/hash'
26
+ */
9
27
  export * from '@adonisjs/hash';
10
28
  export { defineConfig, drivers } from "./define_config.js";
@@ -0,0 +1 @@
1
+ export * from '@adonisjs/http-server/client/url_builder';
@@ -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/http-server/client/url_builder';