mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
framework: upgrade cordis
This commit is contained in:
24 files changed
+108
-128
No files matched your search
@@ -12,12 +12,14 @@ import { I18nService } from './lib/i18n';
|
||||
|
||||
import { Logger } from './logger';
|
||||
import {
|
||||
Context, Service, FiberState, Fiber,
|
||||
Context, Service, FiberState, Fiber, ApiMixin,
|
||||
} from './context';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import { sleep, unwrapExports } from './utils';
|
||||
import { PRIV } from './model/builtin';
|
||||
import { getAddons } from './options';
|
||||
import { TimerService } from '@cordisjs/plugin-timer';
|
||||
import LoggerService from '@cordisjs/plugin-logger';
|
||||
import Schema from 'schemastery';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
@@ -162,6 +164,20 @@ export class Loader extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
app.plugin(ApiMixin);
|
||||
app.plugin(TimerService);
|
||||
app.plugin(LoggerService, {
|
||||
console: {
|
||||
showDiff: false,
|
||||
showTime: 'dd hh:mm:ss',
|
||||
label: {
|
||||
align: 'right',
|
||||
width: 9,
|
||||
margin: 1,
|
||||
},
|
||||
levels: { default: process.env.DEV ? 3 : 2 },
|
||||
},
|
||||
});
|
||||
app.plugin(I18nService);
|
||||
app.plugin(Loader);
|
||||
|
||||
|
||||
Reference in new issue
Block a user