vona-module-a-startup 5.0.12 → 5.0.13
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 -27
- package/dist/index.js +21 -21
- package/package.json +1 -1
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import type { BeanScopeUtil, TypeModuleConfig } from 'vona';
|
|
2
1
|
/** cacheRedis: begin */
|
|
3
|
-
import type { IDecoratorCacheRedisOptions } from 'vona-module-a-cache';
|
|
4
|
-
/** cacheRedis: end */
|
|
5
|
-
/** cacheRedis: begin */
|
|
6
|
-
import type { CacheRedisStartupDebounce } from '../bean/cacheRedis.startupDebounce.ts';
|
|
7
|
-
/** meta: end */
|
|
8
|
-
/** meta redlock: begin */
|
|
9
|
-
import type { MetaRedlock } from '../bean/meta.redlock.ts';
|
|
10
|
-
import type { config } from '../config/config.ts';
|
|
11
|
-
/** service: end */
|
|
12
|
-
/** service: begin */
|
|
13
|
-
import type { ServiceStartup } from '../service/startup.ts';
|
|
14
|
-
/** monkey: end */
|
|
15
|
-
/** scope: begin */
|
|
16
|
-
import { BeanScopeBase } from 'vona';
|
|
17
|
-
import 'vona';
|
|
18
|
-
import 'vona';
|
|
19
|
-
import 'vona';
|
|
20
|
-
import 'vona';
|
|
21
2
|
export * from '../bean/cacheRedis.startupDebounce.ts';
|
|
3
|
+
import { type IDecoratorCacheRedisOptions } from 'vona-module-a-cache';
|
|
22
4
|
declare module 'vona-module-a-cache' {
|
|
23
5
|
interface ICacheRedisRecord {
|
|
24
6
|
'a-startup:startupDebounce': IDecoratorCacheRedisOptions;
|
|
@@ -28,12 +10,16 @@ declare module 'vona-module-a-startup' {
|
|
|
28
10
|
interface CacheRedisStartupDebounce {
|
|
29
11
|
}
|
|
30
12
|
}
|
|
13
|
+
/** cacheRedis: end */
|
|
14
|
+
/** cacheRedis: begin */
|
|
15
|
+
import type { CacheRedisStartupDebounce } from '../bean/cacheRedis.startupDebounce.ts';
|
|
31
16
|
export interface IModuleCacheRedis {
|
|
32
|
-
startupDebounce: CacheRedisStartupDebounce;
|
|
17
|
+
'startupDebounce': CacheRedisStartupDebounce;
|
|
33
18
|
}
|
|
34
19
|
/** cacheRedis: end */
|
|
35
20
|
/** meta: begin */
|
|
36
21
|
export * from '../bean/meta.redlock.ts';
|
|
22
|
+
import 'vona';
|
|
37
23
|
declare module 'vona' {
|
|
38
24
|
interface IMetaRecord {
|
|
39
25
|
'a-startup:redlock': never;
|
|
@@ -43,9 +29,13 @@ declare module 'vona-module-a-startup' {
|
|
|
43
29
|
interface MetaRedlock {
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
|
-
/**
|
|
47
|
-
/**
|
|
48
|
-
|
|
32
|
+
/** meta: end */
|
|
33
|
+
/** meta redlock: begin */
|
|
34
|
+
import type { MetaRedlock } from '../bean/meta.redlock.ts';
|
|
35
|
+
/** meta redlock: end */
|
|
36
|
+
/** service: begin */
|
|
37
|
+
export * from '../service/startup.ts';
|
|
38
|
+
import 'vona';
|
|
49
39
|
declare module 'vona-module-a-web' {
|
|
50
40
|
interface IServiceRecord {
|
|
51
41
|
'a-startup:startup': never;
|
|
@@ -55,20 +45,30 @@ declare module 'vona-module-a-startup' {
|
|
|
55
45
|
interface ServiceStartup {
|
|
56
46
|
}
|
|
57
47
|
}
|
|
48
|
+
/** service: end */
|
|
49
|
+
/** service: begin */
|
|
50
|
+
import type { ServiceStartup } from '../service/startup.ts';
|
|
58
51
|
export interface IModuleService {
|
|
59
|
-
startup: ServiceStartup;
|
|
52
|
+
'startup': ServiceStartup;
|
|
60
53
|
}
|
|
54
|
+
/** service: end */
|
|
55
|
+
/** service: begin */
|
|
56
|
+
import 'vona';
|
|
61
57
|
declare module 'vona' {
|
|
62
58
|
interface IBeanRecordGeneral {
|
|
63
59
|
'a-startup.service.startup': ServiceStartup;
|
|
64
60
|
}
|
|
65
61
|
}
|
|
62
|
+
/** service: end */
|
|
63
|
+
/** config: begin */
|
|
64
|
+
export * from '../config/config.ts';
|
|
65
|
+
import type { config } from '../config/config.ts';
|
|
66
66
|
/** config: end */
|
|
67
67
|
/** monkey: begin */
|
|
68
68
|
export * from '../monkey.ts';
|
|
69
|
-
/**
|
|
70
|
-
/**
|
|
71
|
-
|
|
69
|
+
/** monkey: end */
|
|
70
|
+
/** scope: begin */
|
|
71
|
+
import { BeanScopeBase, type BeanScopeUtil, type TypeModuleConfig } from 'vona';
|
|
72
72
|
export declare class ScopeModuleAStartup extends BeanScopeBase {
|
|
73
73
|
}
|
|
74
74
|
export interface ScopeModuleAStartup {
|
|
@@ -78,6 +78,7 @@ export interface ScopeModuleAStartup {
|
|
|
78
78
|
redlock: MetaRedlock;
|
|
79
79
|
service: IModuleService;
|
|
80
80
|
}
|
|
81
|
+
import 'vona';
|
|
81
82
|
declare module 'vona' {
|
|
82
83
|
interface IBeanScopeRecord {
|
|
83
84
|
'a-startup': ScopeModuleAStartup;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BeanInfo,
|
|
2
|
-
import { Scope } from 'vona-module-a-bean';
|
|
1
|
+
import { BeanInfo, BeanBase, cast, BeanSimple, BeanScopeBase, createBeanDecorator } from 'vona';
|
|
3
2
|
import { CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
4
3
|
import { Meta } from 'vona-module-a-meta';
|
|
5
4
|
import { BeanRedlockBase } from 'vona-module-a-redlock';
|
|
@@ -7,6 +6,7 @@ import path from 'node:path';
|
|
|
7
6
|
import { isNil } from '@cabloy/utils';
|
|
8
7
|
import fse from 'fs-extra';
|
|
9
8
|
import { Service } from 'vona-module-a-web';
|
|
9
|
+
import { Scope } from 'vona-module-a-bean';
|
|
10
10
|
|
|
11
11
|
var _dec$3, _dec2$3, _class$3;
|
|
12
12
|
let CacheRedisStartupDebounce = (_dec$3 = CacheRedis(), _dec2$3 = BeanInfo({
|
|
@@ -18,25 +18,6 @@ let MetaRedlock = (_dec$2 = Meta(), _dec2$2 = BeanInfo({
|
|
|
18
18
|
module: "a-startup"
|
|
19
19
|
}), _dec$2(_class$2 = _dec2$2(_class$2 = class MetaRedlock extends BeanRedlockBase {}) || _class$2) || _class$2);
|
|
20
20
|
|
|
21
|
-
function config(_app) {
|
|
22
|
-
return {
|
|
23
|
-
startup: {
|
|
24
|
-
debounce: 10 * 1000
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const __ThisModule__ = 'a-startup';
|
|
30
|
-
|
|
31
|
-
class Monkey extends BeanSimple {
|
|
32
|
-
async appStart() {
|
|
33
|
-
await this.bean.scope(__ThisModule__).service.startup.appStart();
|
|
34
|
-
}
|
|
35
|
-
async appReady() {
|
|
36
|
-
await this.bean.scope(__ThisModule__).service.startup.appReady();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
21
|
var _dec$1, _dec2$1, _class$1;
|
|
41
22
|
let ServiceStartup = (_dec$1 = Service(), _dec2$1 = BeanInfo({
|
|
42
23
|
module: "a-startup"
|
|
@@ -176,6 +157,25 @@ let ServiceStartup = (_dec$1 = Service(), _dec2$1 = BeanInfo({
|
|
|
176
157
|
}
|
|
177
158
|
}) || _class$1) || _class$1);
|
|
178
159
|
|
|
160
|
+
function config(_app) {
|
|
161
|
+
return {
|
|
162
|
+
startup: {
|
|
163
|
+
debounce: 10 * 1000
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const __ThisModule__ = 'a-startup';
|
|
169
|
+
|
|
170
|
+
class Monkey extends BeanSimple {
|
|
171
|
+
async appStart() {
|
|
172
|
+
await this.bean.scope(__ThisModule__).service.startup.appStart();
|
|
173
|
+
}
|
|
174
|
+
async appReady() {
|
|
175
|
+
await this.bean.scope(__ThisModule__).service.startup.appReady();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
179
|
var _dec, _dec2, _class;
|
|
180
180
|
let ScopeModuleAStartup = (_dec = Scope(), _dec2 = BeanInfo({
|
|
181
181
|
module: "a-startup"
|