zova-module-a-model 5.0.24 → 5.0.28
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/package.json +3 -3
- package/src/.metadata/index.ts +33 -0
- package/src/.metadata/this.ts +2 -0
- package/src/bean/bean.model/bean.model.last.ts +2 -2
- package/src/bean/local.storage.ts +1 -3
- package/src/common/cookieWrapper.ts +1 -1
- package/src/index.ts +1 -7
- package/src/monkey.ts +4 -4
- package/src/api/index.ts +0 -2
- package/src/api/interface/index.ts +0 -1
- package/src/api/service/index.ts +0 -1
- package/src/assets/css/module.scss +0 -1
- package/src/component/.gitkeep +0 -0
- package/src/config/constants.ts +0 -1
- package/src/config/errors.ts +0 -1
- package/src/config/index.ts +0 -4
- package/src/config/locale/en-us.ts +0 -1
- package/src/config/locale/zh-cn.ts +0 -1
- package/src/config/locales.ts +0 -7
- package/src/page/.gitkeep +0 -0
- package/src/resource/beans.ts +0 -5
- package/src/resource/components.ts +0 -1
- package/src/resource/index.ts +0 -3
- package/src/resource/scope.ts +0 -32
- package/src/resource/this.ts +0 -4
- package/src/routes.ts +0 -3
- package/src/typings.ts +0 -1
- /package/src/bean/{virtual.model.ts → bean.modelBase.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-model",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.28",
|
|
4
4
|
"title": "a-model",
|
|
5
5
|
"zovaModule": {
|
|
6
6
|
"capabilities": {
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"clean": "tsc -b --clean",
|
|
50
50
|
"tsc:publish": "npm run clean && tsc -b",
|
|
51
|
-
"
|
|
51
|
+
"_prepublishOnly": "npm run tsc:publish"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@tanstack/query-persist-client-core": "^5.45.0",
|
|
55
55
|
"@tanstack/vue-query": "^5.45.0",
|
|
56
56
|
"localforage": "^1.10.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "200ff5791bd6362080428f5b6c6c8f2a82c7d9d0"
|
|
59
59
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** beans: begin */
|
|
2
|
+
export * from '../bean/bean.modelBase.js';
|
|
3
|
+
import { BeanModelBase } from '../bean/bean.modelBase.js';
|
|
4
|
+
import 'zova';
|
|
5
|
+
declare module 'zova' {
|
|
6
|
+
export interface IBeanRecord {
|
|
7
|
+
'a-model.bean.modelBase': BeanModelBase;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** beans: end */
|
|
11
|
+
/** config: begin */
|
|
12
|
+
export * from '../config/config.js';
|
|
13
|
+
import { config } from '../config/config.js';
|
|
14
|
+
/** config: end */
|
|
15
|
+
/** scope: begin */
|
|
16
|
+
import { BeanScopeBase, Scope, TypeModuleResource } from 'zova';
|
|
17
|
+
|
|
18
|
+
@Scope()
|
|
19
|
+
export class ScopeModuleAModel extends BeanScopeBase {}
|
|
20
|
+
|
|
21
|
+
export interface ScopeModuleAModel extends TypeModuleResource<any, typeof config, any, any, any, any> {}
|
|
22
|
+
|
|
23
|
+
import 'zova';
|
|
24
|
+
declare module 'zova' {
|
|
25
|
+
export interface IBeanScopeRecord {
|
|
26
|
+
'a-model': ScopeModuleAModel;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IBeanScopeConfig {
|
|
30
|
+
'a-model': ReturnType<typeof config>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** scope: end */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BeanBase, Cast } from 'zova';
|
|
2
|
-
import { BeanModelBase } from '../
|
|
3
|
-
import { ScopeModule, __ThisModule__ } from '
|
|
2
|
+
import { BeanModelBase } from '../bean.modelBase.js';
|
|
3
|
+
import { ScopeModule, __ThisModule__ } from '../../.metadata/this.js';
|
|
4
4
|
|
|
5
5
|
export class BeanModelLast<TScopeModule = unknown> extends BeanBase<TScopeModule> {
|
|
6
6
|
get self() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BeanBase, Local } from 'zova';
|
|
2
|
-
import { ScopeModule } from '
|
|
2
|
+
import { ScopeModule } from '../.metadata/this.js';
|
|
3
3
|
import { dehydrate, hydrate, QueryClient, VueQueryPlugin, VueQueryPluginOptions } from '@tanstack/vue-query';
|
|
4
4
|
|
|
5
5
|
@Local()
|
|
@@ -35,6 +35,4 @@ export class LocalStorage extends BeanBase<ScopeModule> {
|
|
|
35
35
|
hydrate(queryClient, this.ctx.meta.ssr.state.query);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
protected __dispose__() {}
|
|
40
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Query } from '@tanstack/vue-query';
|
|
2
2
|
import { BeanSimple, CookieOptions } from 'zova';
|
|
3
3
|
import { QueryMetaPersister, resolveMaxAgeTime } from '../types.js';
|
|
4
|
-
import { __ThisModule__ } from '
|
|
4
|
+
import { __ThisModule__ } from '../.metadata/this.js';
|
|
5
5
|
|
|
6
6
|
export class CookieWrapper extends BeanSimple {
|
|
7
7
|
options: QueryMetaPersister;
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './config/index.js';
|
|
3
|
-
export * from './resource/index.js';
|
|
4
|
-
export * from './api/index.js';
|
|
5
|
-
export * from './routes.js';
|
|
1
|
+
export * from './.metadata/index.js';
|
|
6
2
|
export * from './types.js';
|
|
7
3
|
export * from './monkey.js';
|
|
8
|
-
|
|
9
|
-
import './typings.js';
|
package/src/monkey.ts
CHANGED
|
@@ -6,12 +6,12 @@ import { markRaw } from 'vue';
|
|
|
6
6
|
export class Monkey extends BeanSimple implements IMonkeySystem {
|
|
7
7
|
storage: LocalStorage;
|
|
8
8
|
|
|
9
|
-
async appInitialize(
|
|
9
|
+
async appInitialize() {
|
|
10
10
|
// storage
|
|
11
|
-
this.storage = await bean._newBean(LocalStorage, false);
|
|
11
|
+
this.storage = await this.bean._newBean(LocalStorage, false);
|
|
12
12
|
}
|
|
13
|
-
async appInitialized(
|
|
14
|
-
async appReady(
|
|
13
|
+
async appInitialized() {}
|
|
14
|
+
async appReady() {}
|
|
15
15
|
|
|
16
16
|
async beanInit(bean: BeanContainer, beanInstance: BeanBase) {
|
|
17
17
|
bean.defineProperty(beanInstance, '$queryClient', {
|
package/src/api/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/api/service/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const services = {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/src/component/.gitkeep
DELETED
|
File without changes
|
package/src/config/constants.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const constants = null;
|
package/src/config/errors.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export enum Errors {}
|
package/src/config/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default {};
|
package/src/config/locales.ts
DELETED
package/src/page/.gitkeep
DELETED
|
File without changes
|
package/src/resource/beans.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const components = {};
|
package/src/resource/index.ts
DELETED
package/src/resource/scope.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BeanScopeBase, Scope, TypeLocaleBase, TypeModuleResource } from 'zova';
|
|
2
|
-
import { config, Errors, locales, constants } from '../config/index.js';
|
|
3
|
-
import { components } from './components.js';
|
|
4
|
-
import { services } from '../api/service/index.js';
|
|
5
|
-
|
|
6
|
-
@Scope()
|
|
7
|
-
export class ScopeModuleAModel extends BeanScopeBase {}
|
|
8
|
-
|
|
9
|
-
export interface ScopeModuleAModel
|
|
10
|
-
extends TypeModuleResource<
|
|
11
|
-
typeof components,
|
|
12
|
-
typeof config,
|
|
13
|
-
typeof Errors,
|
|
14
|
-
(typeof locales)[TypeLocaleBase],
|
|
15
|
-
typeof constants,
|
|
16
|
-
typeof services
|
|
17
|
-
> {}
|
|
18
|
-
|
|
19
|
-
import 'zova';
|
|
20
|
-
declare module 'zova' {
|
|
21
|
-
export interface IBeanScopeRecord {
|
|
22
|
-
'a-model': ScopeModuleAModel;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IBeanScopeConfig {
|
|
26
|
-
'a-model': ReturnType<typeof config>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface IBeanScopeLocale {
|
|
30
|
-
'a-model': (typeof locales)[TypeLocaleBase];
|
|
31
|
-
}
|
|
32
|
-
}
|
package/src/resource/this.ts
DELETED
package/src/routes.ts
DELETED
package/src/typings.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|