mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 03:25:10 +00:00
b91ca4420b
* feat: association field block * feat: association details block * feat: template add resource name * feat: add association calendar * fix: update yarn.lock * fix: remove useAssociationNames * fix: restore useFilterByTk logic * feat: client doc * fix: resolveNocobasePackagesAlias * fix: input textarea readpretty * feat: styling * fix: oho & obo * fix: field-summary component remove to collection manager * fix: translation * feat: improve code * fix(audit-logs): skip when collection does not exist * feat: m2m * fix: improve code * fix: title field Co-authored-by: chenos <chenlinxh@gmail.com>
43 lines
989 B
JavaScript
Executable File
43 lines
989 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const dotenv = require('dotenv');
|
|
const { resolve } = require('path');
|
|
const { existsSync } = require('fs');
|
|
|
|
const env = {
|
|
APP_PACKAGE_ROOT: 'app',
|
|
APP_ENV: 'development',
|
|
APP_KEY: 'test-jwt-secret',
|
|
APP_PORT: 13000,
|
|
API_BASE_PATH: '/api/',
|
|
DB_DIALECT: 'sqlite',
|
|
DB_STORAGE: 'storage/db/nocobase.sqlite',
|
|
DB_TIMEZONE: '+00:00',
|
|
DEFAULT_STORAGE_TYPE: 'local',
|
|
LOCAL_STORAGE_DEST: 'storage/uploads',
|
|
};
|
|
|
|
if ('v18' === process.version.split('.').shift()) {
|
|
process.env.NODE_OPTIONS = '--openssl-legacy-provider';
|
|
}
|
|
|
|
if (!process.env.APP_ENV_PATH && process.argv[2] && process.argv[2] === 'test') {
|
|
if (existsSync(resolve(process.cwd(), '.env.test'))) {
|
|
process.env.APP_ENV_PATH = '.env.test';
|
|
}
|
|
}
|
|
|
|
dotenv.config({
|
|
path: resolve(process.cwd(), process.env.APP_ENV_PATH || '.env'),
|
|
});
|
|
|
|
for (const key in env) {
|
|
if (!process.env[key]) {
|
|
process.env[key] = env[key];
|
|
}
|
|
}
|
|
|
|
const cli = require('../src/cli');
|
|
|
|
cli.parse(process.argv);
|