@vtj/renderer 0.9.7 → 0.9.9
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/index.cjs +6 -6
- package/dist/index.mjs +472 -462
- package/package.json +6 -6
- package/types/provider/apis.d.ts +1 -1
- package/types/provider/defaults.d.ts +20 -2
- package/types/provider/index.d.ts +1 -0
- package/types/provider/provider.d.ts +2 -15
- package/types/services/base.d.ts +3 -1
- package/types/version.d.ts +2 -2
package/package.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/renderer",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.9.
|
4
|
+
"version": "0.9.9",
|
5
5
|
"type": "module",
|
6
6
|
"dependencies": {
|
7
7
|
"mockjs": "~1.1.0",
|
8
|
-
"@vtj/
|
9
|
-
"@vtj/
|
8
|
+
"@vtj/core": "~0.9.9",
|
9
|
+
"@vtj/utils": "~0.9.9"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
12
|
"vue": "~3.5.5",
|
13
13
|
"vue-router": "~4.5.0",
|
14
|
-
"@vtj/
|
15
|
-
"@vtj/ui": "~0.9.
|
16
|
-
"@vtj/
|
14
|
+
"@vtj/cli": "~0.9.6",
|
15
|
+
"@vtj/ui": "~0.9.9",
|
16
|
+
"@vtj/icons": "~0.9.9"
|
17
17
|
},
|
18
18
|
"exports": {
|
19
19
|
".": {
|
package/types/provider/apis.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiSchema, MetaSchema, DataSourceSchema } from '@vtj/core';
|
2
2
|
import { IRequestConfig } from '@vtj/utils';
|
3
|
-
import { ProvideAdapter } from './
|
3
|
+
import { ProvideAdapter } from './defaults';
|
4
4
|
export declare function createSchemaApi(schema: ApiSchema, adapter: ProvideAdapter): ((query?: Record<string, any>) => Promise<any>) | ((data: any, opts?: IRequestConfig) => Promise<any>);
|
5
5
|
export declare function createMetaApi(meta: MetaSchema, adapter: ProvideAdapter): ((data: any, opts?: IRequestConfig) => Promise<any> | undefined) | undefined;
|
6
6
|
export declare function createSchemaApis(apis: ApiSchema[] | undefined, meta: MetaSchema[] | undefined, adapter: ProvideAdapter): Record<string, any>;
|
@@ -1,2 +1,20 @@
|
|
1
|
-
import { IStaticRequest } from '@vtj/utils';
|
2
|
-
|
1
|
+
import { IRequestSettings, IStaticRequest, Jsonp } from '@vtj/utils';
|
2
|
+
import { Access } from '../plugins';
|
3
|
+
export interface CreateAdapterOptions {
|
4
|
+
notify?: (msg: string) => void;
|
5
|
+
loading?: () => any;
|
6
|
+
settings?: IRequestSettings;
|
7
|
+
}
|
8
|
+
export interface ProvideAdapter {
|
9
|
+
request: IStaticRequest;
|
10
|
+
jsonp: Jsonp;
|
11
|
+
metaQuery?: (...args: any[]) => Promise<any>;
|
12
|
+
access?: Access;
|
13
|
+
startupComponent?: any;
|
14
|
+
/**
|
15
|
+
* 远程服务 host
|
16
|
+
*/
|
17
|
+
remote?: string;
|
18
|
+
[index: string]: any;
|
19
|
+
}
|
20
|
+
export declare function createAdapter(options?: CreateAdapterOptions): ProvideAdapter;
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import { App, InjectionKey } from 'vue';
|
2
2
|
import { Router, RouteRecordName, RouteMeta } from 'vue-router';
|
3
3
|
import { ProjectSchema, PageFile, BlockFile, Service, BlockSchema, NodeFromPlugin, Base } from '@vtj/core';
|
4
|
-
import { IStaticRequest, Jsonp } from '@vtj/utils';
|
5
|
-
import { Access } from '../plugins';
|
6
4
|
import { ContextMode } from '../constants';
|
7
5
|
import { CreateRendererOptions } from '../render';
|
6
|
+
import { ProvideAdapter } from './defaults';
|
8
7
|
import { Context } from '..';
|
9
8
|
export declare const providerKey: InjectionKey<Provider>;
|
10
9
|
export interface ProviderOptions {
|
@@ -12,7 +11,7 @@ export interface ProviderOptions {
|
|
12
11
|
project?: Partial<ProjectSchema>;
|
13
12
|
modules?: Record<string, () => Promise<any>>;
|
14
13
|
mode?: ContextMode;
|
15
|
-
adapter?:
|
14
|
+
adapter?: ProvideAdapter;
|
16
15
|
router?: Router;
|
17
16
|
dependencies?: Record<string, () => Promise<any>>;
|
18
17
|
materials?: Record<string, () => Promise<any>>;
|
@@ -28,18 +27,6 @@ export declare enum NodeEnv {
|
|
28
27
|
Production = "production",
|
29
28
|
Development = "development"
|
30
29
|
}
|
31
|
-
export interface ProvideAdapter {
|
32
|
-
request: IStaticRequest;
|
33
|
-
jsonp: Jsonp;
|
34
|
-
metaQuery?: (...args: any[]) => Promise<any>;
|
35
|
-
access?: Access;
|
36
|
-
startupComponent?: any;
|
37
|
-
/**
|
38
|
-
* 远程服务 host
|
39
|
-
*/
|
40
|
-
remote?: string;
|
41
|
-
[index: string]: any;
|
42
|
-
}
|
43
30
|
export declare class Provider extends Base {
|
44
31
|
options: ProviderOptions;
|
45
32
|
mode: ContextMode;
|
package/types/services/base.d.ts
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
import { ProjectSchema, PageFile, BlockFile, BlockSchema, MaterialDescription, HistorySchema, HistoryItem, Service, StaticFileInfo, NodeFromPlugin, ExtensionConfig } from '@vtj/core';
|
2
|
+
import { IStaticRequest } from '@vtj/utils';
|
3
|
+
export declare function createServiceRequest(notify?: (msg: string) => void): IStaticRequest<any, any>;
|
2
4
|
export declare class BaseService implements Service {
|
3
5
|
protected api: (type: string, data: any) => Promise<any>;
|
4
6
|
private pluginCaches;
|
5
7
|
protected uploader: (file: File, projectId: string) => Promise<StaticFileInfo>;
|
6
|
-
constructor();
|
8
|
+
constructor(req?: IStaticRequest);
|
7
9
|
getExtension(): Promise<ExtensionConfig | undefined>;
|
8
10
|
init(project: ProjectSchema): Promise<ProjectSchema>;
|
9
11
|
saveProject(project: ProjectSchema): Promise<boolean>;
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/renderer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.9.
|
5
|
+
* @version 0.9.8
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.9.
|
8
|
+
export declare const version = "0.9.8";
|