@adonisjs/core 7.0.0-next.4 → 7.0.0-next.6

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.
@@ -75,29 +75,101 @@ export declare class Codemods extends EventEmitter {
75
75
  */
76
76
  getTsMorphProject(): Promise<CodeTransformer['project'] | undefined>;
77
77
  /**
78
- * Define validations for the environment variables
78
+ * Define validations for the environment variables in the start/env.ts file.
79
+ * This method updates the environment validation schema using the assembler.
80
+ *
81
+ * @param validations - Validation schema node for environment variables
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * await codemods.defineEnvValidations({
86
+ * NODE_ENV: 'Env.schema.enum(["development", "production", "test"] as const)',
87
+ * PORT: 'Env.schema.number()',
88
+ * HOST: 'Env.schema.string({ format: "host" })'
89
+ * })
90
+ * ```
79
91
  */
80
92
  defineEnvValidations(validations: EnvValidationNode): Promise<void>;
81
93
  /**
82
- * Define validations for the environment variables
94
+ * Register middleware in the start/kernel.ts file.
95
+ * This method adds middleware to the specified stack (server, router, or named).
96
+ *
97
+ * @param stack - The middleware stack to register to ('server' | 'router' | 'named')
98
+ * @param middleware - Array of middleware nodes to register
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * await codemods.registerMiddleware('server', [
103
+ * {
104
+ * name: 'cors',
105
+ * path: '@adonisjs/cors/cors_middleware'
106
+ * }
107
+ * ])
108
+ * ```
83
109
  */
84
110
  registerMiddleware(stack: 'server' | 'router' | 'named', middleware: MiddlewareNode[]): Promise<void>;
85
111
  /**
86
- * Register bouncer policies to the list of policies
87
- * collection exported from the "app/policies/main.ts"
88
- * file.
112
+ * Register bouncer policies to the list of policies collection exported from
113
+ * the "app/policies/main.ts" file. This method adds new policy definitions
114
+ * to the policies export.
115
+ *
116
+ * @param policies - Array of policy nodes to register
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * await codemods.registerPolicies([
121
+ * {
122
+ * name: 'UserPolicy',
123
+ * path: '#policies/user_policy'
124
+ * }
125
+ * ])
126
+ * ```
89
127
  */
90
128
  registerPolicies(policies: BouncerPolicyNode[]): Promise<void>;
91
129
  /**
92
- * Update RCFile
130
+ * Update the adonisrc.ts file with new configuration settings.
131
+ * This method allows modification of the AdonisJS runtime configuration.
132
+ *
133
+ * @param params - Parameters for updating the RC file (varies based on update type)
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * await codemods.updateRcFile((rcFile) => {
138
+ * rcFile.addCommand('make:custom')
139
+ * rcFile.addPreloadFile('#app/events/main')
140
+ * })
141
+ * ```
93
142
  */
94
143
  updateRcFile(...params: Parameters<CodeTransformer['updateRcFile']>): Promise<void>;
95
144
  /**
96
- * Register a new Vite plugin in the `vite.config.ts` file
145
+ * Register a new Vite plugin in the vite.config.ts file.
146
+ * This method adds plugin configuration to the Vite build configuration.
147
+ *
148
+ * @param params - Parameters for adding the Vite plugin (varies based on plugin type)
149
+ *
150
+ * @example
151
+ * ```ts
152
+ * await codemods.registerVitePlugin({
153
+ * name: 'vue',
154
+ * import: 'import vue from "@vitejs/plugin-vue"',
155
+ * options: '()'
156
+ * })
157
+ * ```
97
158
  */
98
159
  registerVitePlugin(...params: Parameters<CodeTransformer['addVitePlugin']>): Promise<void>;
99
160
  /**
100
- * Register a new Japa plugin in the `tests/bootstrap.ts` file
161
+ * Register a new Japa plugin in the tests/bootstrap.ts file.
162
+ * This method adds plugin configuration to the test runner setup.
163
+ *
164
+ * @param params - Parameters for adding the Japa plugin (varies based on plugin type)
165
+ *
166
+ * @example
167
+ * ```ts
168
+ * await codemods.registerJapaPlugin({
169
+ * name: 'expect',
170
+ * import: 'import { expect } from "@japa/expect"'
171
+ * })
172
+ * ```
101
173
  */
102
174
  registerJapaPlugin(...params: Parameters<CodeTransformer['addJapaPlugin']>): Promise<void>;
103
175
  /**
@@ -143,12 +215,19 @@ export declare class Codemods extends EventEmitter {
143
215
  skipReason: string;
144
216
  }>;
145
217
  /**
146
- * Install packages using the correct package manager
147
- * You can specify version of each package by setting it in the
148
- * name like :
218
+ * Install packages using the detected or specified package manager.
219
+ * Automatically detects npm, yarn, or pnpm and installs dependencies accordingly.
220
+ * You can specify version of each package by setting it in the name like '@adonisjs/lucid@next'.
149
221
  *
150
- * ```
151
- * this.installPackages([{ name: '@adonisjs/lucid@next', isDevDependency: false }])
222
+ * @param packages - Array of packages with their dependency type
223
+ * @param packageManager - Optional package manager to use (auto-detected if not provided)
224
+ *
225
+ * @example
226
+ * ```ts
227
+ * const success = await codemods.installPackages([
228
+ * { name: '@adonisjs/lucid', isDevDependency: false },
229
+ * { name: '@types/node', isDevDependency: true }
230
+ * ])
152
231
  * ```
153
232
  */
154
233
  installPackages(packages: {
@@ -156,7 +235,23 @@ export declare class Codemods extends EventEmitter {
156
235
  isDevDependency: boolean;
157
236
  }[], packageManager?: SupportedPackageManager | 'pnpm@6' | 'deno'): Promise<boolean>;
158
237
  /**
159
- * List the packages one should install before using the packages
238
+ * List the packages that should be installed manually.
239
+ * This method displays installation commands for different package managers
240
+ * when automatic installation is not available or desired.
241
+ *
242
+ * @param packages - Array of packages with their dependency type
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * await codemods.listPackagesToInstall([
247
+ * { name: '@adonisjs/lucid', isDevDependency: false },
248
+ * { name: '@types/node', isDevDependency: true }
249
+ * ])
250
+ * // Output:
251
+ * // Please install following packages
252
+ * // npm i -D @types/node
253
+ * // npm i @adonisjs/lucid
254
+ * ```
160
255
  */
161
256
  listPackagesToInstall(packages: {
162
257
  name: string;
@@ -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,12 +368,19 @@ 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) {
@@ -365,7 +444,23 @@ export class Codemods extends EventEmitter {
365
444
  }
366
445
  }
367
446
  /**
368
- * 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
+ * ```
369
464
  */
370
465
  async listPackagesToInstall(packages) {
371
466
  const appPath = this.#app.makePath();
@@ -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';