vona-module-a-startup 5.0.13 → 5.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.metadata/index.d.ts +28 -28
- package/dist/index.js +17 -18
- package/package.json +1 -1
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
/** service: begin */
|
|
2
|
+
export * from '../service/startup.ts';
|
|
3
|
+
import 'vona';
|
|
4
|
+
declare module 'vona-module-a-bean' {
|
|
5
|
+
interface IServiceRecord {
|
|
6
|
+
'a-startup:startup': never;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare module 'vona-module-a-startup' {
|
|
10
|
+
interface ServiceStartup {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** service: end */
|
|
14
|
+
/** service: begin */
|
|
15
|
+
import type { ServiceStartup } from '../service/startup.ts';
|
|
16
|
+
export interface IModuleService {
|
|
17
|
+
'startup': ServiceStartup;
|
|
18
|
+
}
|
|
19
|
+
/** service: end */
|
|
20
|
+
/** service: begin */
|
|
21
|
+
import 'vona';
|
|
22
|
+
declare module 'vona' {
|
|
23
|
+
interface IBeanRecordGeneral {
|
|
24
|
+
'a-startup.service.startup': ServiceStartup;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** service: end */
|
|
1
28
|
/** cacheRedis: begin */
|
|
2
29
|
export * from '../bean/cacheRedis.startupDebounce.ts';
|
|
3
30
|
import { type IDecoratorCacheRedisOptions } from 'vona-module-a-cache';
|
|
@@ -33,33 +60,6 @@ declare module 'vona-module-a-startup' {
|
|
|
33
60
|
/** meta redlock: begin */
|
|
34
61
|
import type { MetaRedlock } from '../bean/meta.redlock.ts';
|
|
35
62
|
/** meta redlock: end */
|
|
36
|
-
/** service: begin */
|
|
37
|
-
export * from '../service/startup.ts';
|
|
38
|
-
import 'vona';
|
|
39
|
-
declare module 'vona-module-a-web' {
|
|
40
|
-
interface IServiceRecord {
|
|
41
|
-
'a-startup:startup': never;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
declare module 'vona-module-a-startup' {
|
|
45
|
-
interface ServiceStartup {
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** service: end */
|
|
49
|
-
/** service: begin */
|
|
50
|
-
import type { ServiceStartup } from '../service/startup.ts';
|
|
51
|
-
export interface IModuleService {
|
|
52
|
-
'startup': ServiceStartup;
|
|
53
|
-
}
|
|
54
|
-
/** service: end */
|
|
55
|
-
/** service: begin */
|
|
56
|
-
import 'vona';
|
|
57
|
-
declare module 'vona' {
|
|
58
|
-
interface IBeanRecordGeneral {
|
|
59
|
-
'a-startup.service.startup': ServiceStartup;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/** service: end */
|
|
63
63
|
/** config: begin */
|
|
64
64
|
export * from '../config/config.ts';
|
|
65
65
|
import type { config } from '../config/config.ts';
|
|
@@ -74,9 +74,9 @@ export declare class ScopeModuleAStartup extends BeanScopeBase {
|
|
|
74
74
|
export interface ScopeModuleAStartup {
|
|
75
75
|
util: BeanScopeUtil;
|
|
76
76
|
config: TypeModuleConfig<typeof config>;
|
|
77
|
+
service: IModuleService;
|
|
77
78
|
cacheRedis: IModuleCacheRedis;
|
|
78
79
|
redlock: MetaRedlock;
|
|
79
|
-
service: IModuleService;
|
|
80
80
|
}
|
|
81
81
|
import 'vona';
|
|
82
82
|
declare module 'vona' {
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
import { BeanInfo, BeanBase, cast, BeanSimple, BeanScopeBase, createBeanDecorator } from 'vona';
|
|
2
|
-
import { CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
3
|
-
import { Meta } from 'vona-module-a-meta';
|
|
4
|
-
import { BeanRedlockBase } from 'vona-module-a-redlock';
|
|
5
2
|
import path from 'node:path';
|
|
6
3
|
import { isNil } from '@cabloy/utils';
|
|
7
4
|
import fse from 'fs-extra';
|
|
8
|
-
import { Service } from 'vona-module-a-
|
|
9
|
-
import {
|
|
5
|
+
import { Service, Scope } from 'vona-module-a-bean';
|
|
6
|
+
import { CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
7
|
+
import { Meta } from 'vona-module-a-meta';
|
|
8
|
+
import { BeanRedlockBase } from 'vona-module-a-redlock';
|
|
10
9
|
|
|
11
10
|
var _dec$3, _dec2$3, _class$3;
|
|
12
|
-
let
|
|
13
|
-
module: "a-startup"
|
|
14
|
-
}), _dec$3(_class$3 = _dec2$3(_class$3 = class CacheRedisStartupDebounce extends BeanCacheRedisBase {}) || _class$3) || _class$3);
|
|
15
|
-
|
|
16
|
-
var _dec$2, _dec2$2, _class$2;
|
|
17
|
-
let MetaRedlock = (_dec$2 = Meta(), _dec2$2 = BeanInfo({
|
|
11
|
+
let ServiceStartup = (_dec$3 = Service(), _dec2$3 = BeanInfo({
|
|
18
12
|
module: "a-startup"
|
|
19
|
-
}), _dec$
|
|
20
|
-
|
|
21
|
-
var _dec$1, _dec2$1, _class$1;
|
|
22
|
-
let ServiceStartup = (_dec$1 = Service(), _dec2$1 = BeanInfo({
|
|
23
|
-
module: "a-startup"
|
|
24
|
-
}), _dec$1(_class$1 = _dec2$1(_class$1 = class ServiceStartup extends BeanBase {
|
|
13
|
+
}), _dec$3(_class$3 = _dec2$3(_class$3 = class ServiceStartup extends BeanBase {
|
|
25
14
|
async appStart() {
|
|
26
15
|
// clear keys
|
|
27
16
|
await this._clearResources();
|
|
@@ -155,7 +144,17 @@ let ServiceStartup = (_dec$1 = Service(), _dec2$1 = BeanInfo({
|
|
|
155
144
|
// .app/public
|
|
156
145
|
await fse.remove(path.join(this.app.config.server.publicDir, '1'));
|
|
157
146
|
}
|
|
158
|
-
}) || _class$
|
|
147
|
+
}) || _class$3) || _class$3);
|
|
148
|
+
|
|
149
|
+
var _dec$2, _dec2$2, _class$2;
|
|
150
|
+
let CacheRedisStartupDebounce = (_dec$2 = CacheRedis(), _dec2$2 = BeanInfo({
|
|
151
|
+
module: "a-startup"
|
|
152
|
+
}), _dec$2(_class$2 = _dec2$2(_class$2 = class CacheRedisStartupDebounce extends BeanCacheRedisBase {}) || _class$2) || _class$2);
|
|
153
|
+
|
|
154
|
+
var _dec$1, _dec2$1, _class$1;
|
|
155
|
+
let MetaRedlock = (_dec$1 = Meta(), _dec2$1 = BeanInfo({
|
|
156
|
+
module: "a-startup"
|
|
157
|
+
}), _dec$1(_class$1 = _dec2$1(_class$1 = class MetaRedlock extends BeanRedlockBase {}) || _class$1) || _class$1);
|
|
159
158
|
|
|
160
159
|
function config(_app) {
|
|
161
160
|
return {
|