fix: validate drive env

This commit is contained in:
Sergey Yarkov 2021-09-05 16:40:19 +03:00
parent bd27dfb1dc
commit d2edc9eb6f
3 changed files with 2 additions and 8 deletions

View File

@ -1,10 +1,3 @@
/**
* Contract source: https://git.io/JBt3I
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
declare module '@ioc:Adonis/Core/Drive' { declare module '@ioc:Adonis/Core/Drive' {
interface DisksList { interface DisksList {
local: { local: {

2
env.ts
View File

@ -20,7 +20,7 @@ export default Env.rules({
APP_KEY: Env.schema.string(), APP_KEY: Env.schema.string(),
APP_NAME: Env.schema.string(), APP_NAME: Env.schema.string(),
NODE_ENV: Env.schema.enum(['development', 'production', 'testing'] as const), NODE_ENV: Env.schema.enum(['development', 'production', 'testing'] as const),
DRIVE_DISK: Env.schema.string(), DRIVE_DISK: Env.schema.enum(['local'] as const),
PG_HOST: Env.schema.string({ format: 'host' }), PG_HOST: Env.schema.string({ format: 'host' }),
PG_PORT: Env.schema.number(), PG_PORT: Env.schema.number(),
PG_USER: Env.schema.string(), PG_USER: Env.schema.string(),

View File

@ -34,6 +34,7 @@
"dependencies": { "dependencies": {
"@adonisjs/auth": "^8.0.9", "@adonisjs/auth": "^8.0.9",
"@adonisjs/core": "^5.3.2", "@adonisjs/core": "^5.3.2",
"@adonisjs/drive": "^2.0.6",
"@adonisjs/lucid": "^15.0.3", "@adonisjs/lucid": "^15.0.3",
"@adonisjs/redis": "^7.0.9", "@adonisjs/redis": "^7.0.9",
"@adonisjs/repl": "^3.1.6", "@adonisjs/repl": "^3.1.6",