@adonisjs/application
Advanced tools
Comparing version 7.1.2-9 to 7.1.2-10
@@ -48,2 +48,5 @@ /* | ||
#importPreloadModule(preload) { | ||
if (typeof preload.file === 'function') { | ||
return preload.file(); | ||
} | ||
return this.#importer(preload.file); | ||
@@ -50,0 +53,0 @@ } |
@@ -76,2 +76,6 @@ /* | ||
async #resolveProvider(provider) { | ||
if (typeof provider.file === 'function') { | ||
const providerClass = await provider.file(); | ||
return providerClass.default; | ||
} | ||
const providerClass = await this.#importProvider(provider.file); | ||
@@ -78,0 +82,0 @@ this.#ensureIsClass(provider.file, providerClass); |
@@ -76,3 +76,3 @@ import type { Application } from './application.js'; | ||
export type PreloadNode = { | ||
file: string; | ||
file: string | (() => Promise<any>); | ||
environment: Exclude<AppEnvironments, 'unknown'>[]; | ||
@@ -84,3 +84,5 @@ }; | ||
export type ProviderNode = { | ||
file: string; | ||
file: string | (() => Promise<{ | ||
default: new (app: Application<any>) => ContainerProviderContract; | ||
}>); | ||
environment: Exclude<AppEnvironments, 'unknown'>[]; | ||
@@ -159,3 +161,3 @@ }; | ||
*/ | ||
commands: string[]; | ||
commands: (string | (() => Promise<any>))[]; | ||
/** | ||
@@ -162,0 +164,0 @@ * Custom command aliases |
{ | ||
"name": "@adonisjs/application", | ||
"version": "7.1.2-9", | ||
"version": "7.1.2-10", | ||
"description": "AdonisJS application class to read app related data", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109496
3396