@adonisjs/core 7.0.0-next.1 → 7.0.0-next.11

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 (145) hide show
  1. package/build/commands/add.js +40 -110
  2. package/build/commands/build.js +51 -107
  3. package/build/commands/configure.js +82 -177
  4. package/build/commands/eject.js +17 -60
  5. package/build/commands/env/add.js +55 -134
  6. package/build/commands/generate_key.js +22 -66
  7. package/build/commands/inspect_rcfile.js +27 -55
  8. package/build/commands/list/routes.js +246 -116
  9. package/build/commands/make/command.js +15 -57
  10. package/build/commands/make/controller.js +43 -120
  11. package/build/commands/make/event.js +16 -62
  12. package/build/commands/make/exception.js +16 -62
  13. package/build/commands/make/listener.js +36 -93
  14. package/build/commands/make/middleware.js +41 -101
  15. package/build/commands/make/preload.js +47 -113
  16. package/build/commands/make/provider.js +47 -112
  17. package/build/commands/make/service.js +16 -55
  18. package/build/commands/make/test.js +47 -132
  19. package/build/commands/make/transformer.js +17 -64
  20. package/build/commands/make/validator.js +20 -80
  21. package/build/commands/make/view.js +15 -56
  22. package/build/commands/repl.js +17 -50
  23. package/build/commands/serve.js +80 -156
  24. package/build/commands/test.js +92 -208
  25. package/build/factories/app.js +2 -9
  26. package/build/factories/bodyparser.js +2 -9
  27. package/build/factories/core/ace.js +15 -46
  28. package/build/factories/core/ignitor.js +12 -180
  29. package/build/factories/core/main.js +22 -11
  30. package/build/factories/core/test_utils.js +19 -43
  31. package/build/factories/encryption.js +2 -9
  32. package/build/factories/events.js +2 -9
  33. package/build/factories/hash.js +2 -9
  34. package/build/factories/http.js +2 -9
  35. package/build/factories/logger.js +2 -9
  36. package/build/factories/stubs.js +28 -91
  37. package/build/index.js +13 -46
  38. package/build/modules/ace/codemods.d.ts +109 -14
  39. package/build/modules/ace/codemods.js +222 -374
  40. package/build/modules/ace/main.d.ts +30 -0
  41. package/build/modules/ace/main.js +2 -11
  42. package/build/modules/app.d.ts +17 -0
  43. package/build/modules/app.js +4 -9
  44. package/build/modules/bodyparser/bodyparser_middleware.js +2 -14
  45. package/build/modules/bodyparser/main.js +4 -9
  46. package/build/modules/config.d.ts +17 -0
  47. package/build/modules/config.js +4 -9
  48. package/build/modules/container.js +4 -9
  49. package/build/modules/dumper/dumper.d.ts +5 -0
  50. package/build/modules/dumper/main.d.ts +21 -0
  51. package/build/modules/dumper/main.js +6 -11
  52. package/build/modules/dumper/plugins/edge.js +2 -62
  53. package/build/modules/encryption.d.ts +17 -0
  54. package/build/modules/encryption.js +4 -9
  55. package/build/modules/env/editor.js +2 -9
  56. package/build/modules/env/main.d.ts +19 -0
  57. package/build/modules/env/main.js +2 -9
  58. package/build/modules/events.js +4 -9
  59. package/build/modules/hash/drivers/argon.js +2 -9
  60. package/build/modules/hash/drivers/bcrypt.d.ts +11 -0
  61. package/build/modules/hash/drivers/bcrypt.js +2 -9
  62. package/build/modules/hash/drivers/scrypt.js +2 -9
  63. package/build/modules/hash/main.d.ts +18 -0
  64. package/build/modules/hash/main.js +6 -10
  65. package/build/modules/hash/phc_formatter.js +2 -9
  66. package/build/modules/health.js +2 -9
  67. package/build/modules/http/main.js +4 -15
  68. package/build/modules/http/url_builder_client.d.ts +1 -0
  69. package/build/modules/http/url_builder_client.js +2 -0
  70. package/build/modules/logger.d.ts +30 -0
  71. package/build/modules/logger.js +4 -9
  72. package/build/modules/repl.js +4 -9
  73. package/build/modules/transformers/main.js +4 -9
  74. package/build/providers/app_provider.d.ts +9 -21
  75. package/build/providers/app_provider.js +147 -363
  76. package/build/providers/edge_provider.js +97 -104
  77. package/build/providers/hash_provider.js +29 -91
  78. package/build/providers/repl_provider.js +61 -152
  79. package/build/providers/vinejs_provider.d.ts +1 -1
  80. package/build/providers/vinejs_provider.js +20 -66
  81. package/build/services/ace.js +2 -17
  82. package/build/services/app.js +2 -21
  83. package/build/services/config.js +2 -13
  84. package/build/services/dumper.js +5 -21
  85. package/build/services/emitter.js +2 -14
  86. package/build/services/encryption.js +2 -14
  87. package/build/services/hash.js +2 -14
  88. package/build/services/logger.js +2 -14
  89. package/build/services/repl.js +2 -14
  90. package/build/services/router.js +2 -14
  91. package/build/services/server.js +2 -14
  92. package/build/services/test_utils.js +2 -17
  93. package/build/services/url_builder.js +5 -17
  94. package/build/src/exceptions.js +2 -49
  95. package/build/src/helpers/assert.js +2 -55
  96. package/build/src/helpers/http.d.ts +20 -0
  97. package/build/src/helpers/http.js +2 -0
  98. package/build/src/helpers/is.js +3 -31
  99. package/build/src/helpers/main.d.ts +1 -5
  100. package/build/src/helpers/main.js +5 -56
  101. package/build/src/helpers/string.js +2 -60
  102. package/build/src/helpers/types.js +26 -135
  103. package/build/src/helpers/verification_token.js +2 -120
  104. package/build/src/test_utils/main.js +5 -77
  105. package/build/src/types.d.ts +1 -0
  106. package/build/src/types.js +0 -8
  107. package/build/src/utils.d.ts +1 -1
  108. package/build/src/vine.js +2 -97
  109. package/build/types/ace.js +2 -9
  110. package/build/types/app.js +2 -9
  111. package/build/types/bodyparser.js +2 -9
  112. package/build/types/common.js +2 -9
  113. package/build/types/container.js +2 -9
  114. package/build/types/encryption.js +2 -9
  115. package/build/types/events.js +2 -9
  116. package/build/types/hash.js +2 -9
  117. package/build/types/health.js +2 -9
  118. package/build/types/helpers.d.ts +20 -0
  119. package/build/types/helpers.js +0 -8
  120. package/build/types/http.js +2 -9
  121. package/build/types/logger.js +2 -9
  122. package/build/types/repl.js +2 -9
  123. package/build/types/transformers.js +2 -9
  124. package/package.json +88 -30
  125. package/build/modules/ace/commands.js +0 -157
  126. package/build/modules/ace/create_kernel.js +0 -91
  127. package/build/modules/ace/kernel.js +0 -40
  128. package/build/modules/dumper/define_config.js +0 -36
  129. package/build/modules/dumper/dumper.js +0 -256
  130. package/build/modules/dumper/errors.js +0 -119
  131. package/build/modules/hash/define_config.js +0 -125
  132. package/build/modules/http/request_validator.js +0 -100
  133. package/build/src/assembler_hooks/index_entities.js +0 -106
  134. package/build/src/cli_formatters/routes_list.js +0 -381
  135. package/build/src/config_provider.js +0 -71
  136. package/build/src/debug.js +0 -25
  137. package/build/src/ignitor/ace.js +0 -102
  138. package/build/src/ignitor/http.js +0 -146
  139. package/build/src/ignitor/main.js +0 -124
  140. package/build/src/ignitor/test.js +0 -66
  141. package/build/src/test_utils/http.js +0 -82
  142. package/build/src/utils.js +0 -104
  143. package/build/stubs/main.js +0 -9
  144. package/build/toolkit/commands/index_commands.js +0 -30
  145. package/build/toolkit/main.js +0 -27
@@ -1,43 +1,19 @@
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 { Ignitor } from "../../index.js";
10
- import { IgnitorFactory } from "./ignitor.js";
11
- import { TestUtils } from "../../src/test_utils/main.js";
12
- /**
13
- * Factory for creating TestUtils instances used in AdonisJS testing scenarios.
14
- * This factory provides convenient methods to set up test utilities either from
15
- * an existing Ignitor instance or by creating a new configured one.
16
- *
17
- * @example
18
- * ```ts
19
- * // Create from URL for testing
20
- * const factory = new TestUtilsFactory()
21
- * const testUtils = factory.create(new URL('../', import.meta.url))
22
- *
23
- * // Use in tests
24
- * const app = testUtils.app()
25
- * await app.boot()
26
- *
27
- * // Create HTTP client
28
- * const client = testUtils.httpClient()
29
- * const response = await client.get('/users')
30
- * ```
31
- */
32
- export class TestUtilsFactory {
33
- create(ignitorOrAppRoot, options) {
34
- if (ignitorOrAppRoot instanceof Ignitor) {
35
- return new TestUtils(ignitorOrAppRoot.createApp('test'));
36
- }
37
- return new TestUtils(new IgnitorFactory()
38
- .withCoreConfig()
39
- .withCoreProviders()
40
- .create(ignitorOrAppRoot, options)
41
- .createApp('console'));
42
- }
43
- }
1
+ import "../../chunk-MjwdjG2f.js";
2
+ import "../../main-kn40V-hF.js";
3
+ import "../../container-ClFvcykQ.js";
4
+ import "../../debug-DURPi9xn.js";
5
+ import "../../main-B_vbYVm1.js";
6
+ import "../../app-B6oge7b3.js";
7
+ import "../../app-BK0PN3li.js";
8
+ import "../../config_provider-CY-xuo2R.js";
9
+ import "../../string-CJ7ewUFq.js";
10
+ import "../../utils-CNQ4tlGM.js";
11
+ import "../../core-CNNCwlhc.js";
12
+ import "../../logger-Dha-0hp1.js";
13
+ import "../../main-CFmDHDls.js";
14
+ import "../../main-BrJQ1VAM.js";
15
+ import "../../main-q9TMzWUj.js";
16
+ import "../../ignitor-BWGmb0oD.js";
17
+ import "../../main-2-nm3TiB.js";
18
+ import { t as TestUtilsFactory } from "../../test_utils-CWLOHq7S.js";
19
+ export { TestUtilsFactory };
@@ -1,9 +1,2 @@
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/encryption/factories';
1
+ export * from "@adonisjs/encryption/factories";
2
+ export {};
@@ -1,9 +1,2 @@
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/events/factories';
1
+ export * from "@adonisjs/events/factories";
2
+ export {};
@@ -1,9 +1,2 @@
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/hash/factories';
1
+ export * from "@adonisjs/hash/factories";
2
+ export {};
@@ -1,9 +1,2 @@
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/factories';
1
+ export * from "@adonisjs/http-server/factories";
2
+ export {};
@@ -1,9 +1,2 @@
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/logger/factories';
1
+ export * from "@adonisjs/logger/factories";
2
+ export {};
@@ -1,91 +1,28 @@
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 { AppFactory } from '@adonisjs/application/factories';
10
- import { stubsRoot } from "../index.js";
11
- /**
12
- * Factory for preparing and processing stub templates from the "@adonisjs/core" package.
13
- * This factory is designed for internal testing and development purposes, utilizing
14
- * the core package's stub root directory.
15
- *
16
- * Note: This class is not published as it's intended for internal testing only.
17
- *
18
- * @example
19
- * ```ts
20
- * const stubsFactory = new StubsFactory()
21
- *
22
- * // Prepare a controller stub
23
- * const preparedStub = await stubsFactory.prepare('controller.stub', {
24
- * filename: 'UserController',
25
- * entity: { name: 'User' },
26
- * resourceful: true
27
- * })
28
- *
29
- * console.log(preparedStub.contents)
30
- * ```
31
- */
32
- export class StubsFactory {
33
- #parameters = {};
34
- /**
35
- * Returns an instance of application, either from parameters or creates a default one
36
- */
37
- #getApp() {
38
- return this.#parameters.app || new AppFactory().create(new URL('./', import.meta.url));
39
- }
40
- /**
41
- * Merge custom factory parameters to override defaults.
42
- * This allows you to provide a custom application instance.
43
- *
44
- * @param params - Parameters to merge
45
- * @param params.app - Custom application service instance
46
- *
47
- * @example
48
- * ```ts
49
- * const customApp = new AppFactory().create(appRoot)
50
- * const stubsFactory = new StubsFactory().merge({ app: customApp })
51
- * ```
52
- */
53
- merge(params) {
54
- this.#parameters = Object.assign(this.#parameters, params);
55
- return this;
56
- }
57
- /**
58
- * Prepare a stub template with the provided data and return the processed content.
59
- * This method initializes the application, loads the stub, and processes it with
60
- * the given template variables.
61
- *
62
- * @param stubPath - Path to the stub file relative to the stubs root
63
- * @param data - Template data to populate the stub placeholders
64
- *
65
- * @example
66
- * ```ts
67
- * const stubsFactory = new StubsFactory()
68
- * const preparedStub = await stubsFactory.prepare('controller.stub', {
69
- * filename: 'UserController',
70
- * entity: {
71
- * name: 'User',
72
- * modelName: 'User',
73
- * pluralName: 'users'
74
- * },
75
- * resourceful: true
76
- * })
77
- *
78
- * // Access the processed stub content
79
- * console.log(preparedStub.contents)
80
- * ```
81
- */
82
- async prepare(stubPath, data) {
83
- const app = this.#getApp();
84
- await app.init();
85
- const stubs = await app.stubs.create();
86
- const stub = await stubs.build(stubPath, {
87
- source: stubsRoot,
88
- });
89
- return stub.prepare(data);
90
- }
91
- }
1
+ import "../chunk-MjwdjG2f.js";
2
+ import { t as stubsRoot } from "../main-kn40V-hF.js";
3
+ import "../container-ClFvcykQ.js";
4
+ import "../debug-DURPi9xn.js";
5
+ import "../main-B_vbYVm1.js";
6
+ import "../app-B6oge7b3.js";
7
+ import "../app-BK0PN3li.js";
8
+ import "../config_provider-CY-xuo2R.js";
9
+ import "../string-CJ7ewUFq.js";
10
+ import "../utils-CNQ4tlGM.js";
11
+ import "../core-CNNCwlhc.js";
12
+ import { AppFactory } from "@adonisjs/application/factories";
13
+ var StubsFactory = class {
14
+ #parameters = {};
15
+ #getApp() {
16
+ return this.#parameters.app || new AppFactory().create(new URL("./", import.meta.url));
17
+ }
18
+ merge(params) {
19
+ this.#parameters = Object.assign(this.#parameters, params);
20
+ return this;
21
+ }
22
+ async prepare(stubPath, data) {
23
+ const app = this.#getApp();
24
+ await app.init();
25
+ return (await (await app.stubs.create()).build(stubPath, { source: stubsRoot })).prepare(data);
26
+ }
27
+ };
28
+ export { StubsFactory };
package/build/index.js CHANGED
@@ -1,46 +1,13 @@
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 { errors as aceErrors } from '@adonisjs/ace';
10
- import { errors as envErrors } from '@adonisjs/env';
11
- import { errors as appErrors } from '@adonisjs/application';
12
- import { errors as encryptionErrors } from '@adonisjs/encryption';
13
- import { errors as httpServerErrors } from '@adonisjs/http-server';
14
- export { stubsRoot } from "./stubs/main.js";
15
- export { inject } from "./modules/container.js";
16
- export { Ignitor } from "./src/ignitor/main.js";
17
- export { configProvider } from "./src/config_provider.js";
18
- export { indexEntities } from "./src/assembler_hooks/index_entities.js";
19
- /**
20
- * Aggregated errors from all modules.
21
- */
22
- export const errors = {
23
- ...encryptionErrors,
24
- ...httpServerErrors,
25
- ...appErrors,
26
- ...aceErrors,
27
- ...envErrors,
28
- };
29
- /**
30
- * Pretty prints an error with colorful output using
31
- * Youch terminal
32
- */
33
- export async function prettyPrintError(error) {
34
- if (error && typeof error === 'object' && error.code === 'E_DUMP_DIE_EXCEPTION') {
35
- console.error(error);
36
- return;
37
- }
38
- try {
39
- const { Youch } = await import('youch');
40
- const youch = new Youch();
41
- console.error(await youch.toANSI(error));
42
- }
43
- catch {
44
- console.error(error);
45
- }
46
- }
1
+ import "./chunk-MjwdjG2f.js";
2
+ import { t as stubsRoot } from "./main-kn40V-hF.js";
3
+ import { t as container_exports } from "./container-ClFvcykQ.js";
4
+ import "./debug-DURPi9xn.js";
5
+ import { t as Ignitor } from "./main-B_vbYVm1.js";
6
+ import "./app-B6oge7b3.js";
7
+ import "./app-BK0PN3li.js";
8
+ import { t as configProvider } from "./config_provider-CY-xuo2R.js";
9
+ import "./string-CJ7ewUFq.js";
10
+ import "./utils-CNQ4tlGM.js";
11
+ import { n as prettyPrintError, r as indexEntities, t as errors } from "./core-CNNCwlhc.js";
12
+ var inject = container_exports.inject;
13
+ export { Ignitor, configProvider, errors, indexEntities, inject, prettyPrintError, stubsRoot };
@@ -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;