MCPcopy
hub / github.com/adonisjs/core / create

Method create

factories/core/ignitor.ts:200–217  ·  view source on GitHub ↗

* Create a configured Ignitor instance with all specified parameters. * * @param appRoot - Application root directory URL * @param options - Optional Ignitor configuration options * * @example * ```ts * const ignitor = new IgnitorFactory() * .withCoreConfig() * .withCo

(appRoot: URL, options?: IgnitorOptions)

Source from the content-addressed store, hash-verified

198 * ```
199 */
200 create(appRoot: URL, options?: IgnitorOptions): Ignitor {
201 return new Ignitor(appRoot, options).tap((app) => {
202 app.booted(async () => {
203 for (let action of this.#preloadActions) {
204 await action(app)
205 }
206 })
207
208 if (this.#loadCoreProviders) {
209 this.#parameters.rcFileContents = this.#parameters.rcFileContents || {}
210 this.#parameters.rcFileContents.providers = this.#mergeCoreProviders(
211 this.#parameters.rcFileContents.providers
212 )
213 }
214 this.#parameters.rcFileContents && app.rcContents(this.#parameters.rcFileContents)
215 this.#parameters.config && app.useConfig(this.#parameters.config)
216 })
217 }
218}

Callers 15

makeUsingStubMethod · 0.45
defineConfigFunction · 0.45
define_config.tsFile · 0.45
defineConfigFunction · 0.45
define_config.tsFile · 0.45
#getAppMethod · 0.45
prepareMethod · 0.45
makeMethod · 0.45
main.tsFile · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 2

#mergeCoreProvidersMethod · 0.95
tapMethod · 0.80

Tested by

no test coverage detected