@adonisjs/application
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -25,2 +25,4 @@ declare module '@ioc:Adonis/Core/Application' { | ||
commands: string[]; | ||
providers: string[]; | ||
aceProviders: string[]; | ||
directories: { | ||
@@ -27,0 +29,0 @@ [key: string]: string; |
@@ -11,3 +11,3 @@ "use strict"; | ||
this.isReady = false; | ||
this.cliCwd = process.env.ADONIS_CLI_CWD; | ||
this.cliCwd = process.env.ADONIS_ACE_CWD; | ||
this.isShuttingDown = false; | ||
@@ -14,0 +14,0 @@ this.inProduction = process.env.NODE_ENV === 'production'; |
@@ -32,2 +32,4 @@ "use strict"; | ||
commands: [], | ||
providers: [], | ||
aceProviders: [], | ||
}, contents); | ||
@@ -38,10 +40,17 @@ return { | ||
exceptionHandlerNamespace: contents.exceptionHandlerNamespace, | ||
preloads: contents.preloads.map(({ file, optional, environment }, index) => { | ||
if (!file) { | ||
preloads: contents.preloads.map((preload, index) => { | ||
if (typeof (preload) === 'string') { | ||
return { | ||
file: preload, | ||
optional: false, | ||
environment: ['web', 'console', 'test'], | ||
}; | ||
} | ||
if (!preload.file) { | ||
throw new utils_1.Exception(`Invalid value for preloads[${index}]`, 500, 'E_PRELOAD_MISSING_FILE_PROPERTY'); | ||
} | ||
return { | ||
file, | ||
optional: optional === undefined ? false : optional, | ||
environment: environment === undefined ? ['web', 'console', 'test'] : environment, | ||
file: preload.file, | ||
optional: preload.optional === undefined ? false : preload.optional, | ||
environment: preload.environment === undefined ? ['web', 'console', 'test'] : preload.environment, | ||
}; | ||
@@ -68,4 +77,6 @@ }), | ||
commands: contents.commands, | ||
providers: contents.providers, | ||
aceProviders: contents.aceProviders, | ||
}; | ||
} | ||
exports.parse = parse; |
{ | ||
"name": "@adonisjs/application", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "AdonisJs application class to read app related data", | ||
@@ -74,3 +74,3 @@ "files": [ | ||
"peerDependencies": { | ||
"@adonisjs/fold": "^6.x.x" | ||
"@adonisjs/fold": "^6.0.0" | ||
}, | ||
@@ -77,0 +77,0 @@ "np": { |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
16904
296