修改后台权限
This commit is contained in:
28
node_modules/@dotenvx/dotenvx/src/lib/helpers/conventions.js
generated
vendored
Normal file
28
node_modules/@dotenvx/dotenvx/src/lib/helpers/conventions.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
const Errors = require('./errors')
|
||||
|
||||
function conventions (convention) {
|
||||
const env = process.env.DOTENV_ENV || process.env.NODE_ENV || 'development'
|
||||
|
||||
if (convention === 'nextjs') {
|
||||
const canonicalEnv = ['development', 'test', 'production'].includes(env) && env
|
||||
|
||||
return [
|
||||
canonicalEnv && { type: 'envFile', value: `.env.${canonicalEnv}.local` },
|
||||
canonicalEnv !== 'test' && { type: 'envFile', value: '.env.local' },
|
||||
canonicalEnv && { type: 'envFile', value: `.env.${canonicalEnv}` },
|
||||
{ type: 'envFile', value: '.env' }
|
||||
].filter(Boolean)
|
||||
} else if (convention === 'flow') {
|
||||
return [
|
||||
{ type: 'envFile', value: `.env.${env}.local` },
|
||||
{ type: 'envFile', value: `.env.${env}` },
|
||||
{ type: 'envFile', value: '.env.local' },
|
||||
{ type: 'envFile', value: '.env' },
|
||||
{ type: 'envFile', value: '.env.defaults' }
|
||||
]
|
||||
} else {
|
||||
throw new Errors({ convention }).invalidConvention()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = conventions
|
||||
Reference in New Issue
Block a user