@vtj/local 0.8.71 → 0.8.73
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/service.d.ts +1 -1
- package/dist/service.mjs +8 -2
- package/package.json +3 -3
package/dist/service.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { type StaticRepositoryOptions } from './repository';
|
|
|
5
5
|
import type { DevToolsOptions } from './plugin';
|
|
6
6
|
export declare function notMatch(_req: ApiRequest): Promise<import("./shared").ApiResponse>;
|
|
7
7
|
export declare function saveLogs(e: any): Promise<boolean>;
|
|
8
|
-
export declare function getExtension(): Promise<import("./shared").ApiResponse>;
|
|
8
|
+
export declare function getExtension(_body: any, opts: DevToolsOptions): Promise<import("./shared").ApiResponse>;
|
|
9
9
|
export declare function init(_body: any, opts: DevToolsOptions): Promise<import("./shared").ApiResponse>;
|
|
10
10
|
export declare function saveProject(dsl: ProjectSchema): Promise<import("./shared").ApiResponse>;
|
|
11
11
|
export declare function saveFile(dsl: BlockSchema): Promise<import("./shared").ApiResponse>;
|
package/dist/service.mjs
CHANGED
|
@@ -21,11 +21,15 @@ export async function saveLogs(e) {
|
|
|
21
21
|
const json = JSON.parse(JSON.stringify(e));
|
|
22
22
|
return logs.save(name, json);
|
|
23
23
|
}
|
|
24
|
-
export async function getExtension() {
|
|
24
|
+
export async function getExtension(_body, opts) {
|
|
25
25
|
const root = resolve("./");
|
|
26
26
|
const pkg = readJsonSync(resolve(root, "package.json"));
|
|
27
27
|
const { vtj = {} } = pkg || {};
|
|
28
|
-
|
|
28
|
+
const extension = {
|
|
29
|
+
...vtj.extension || {},
|
|
30
|
+
__BASE_PATH__: opts.staticBase
|
|
31
|
+
};
|
|
32
|
+
return success(extension);
|
|
29
33
|
}
|
|
30
34
|
export async function init(_body, opts) {
|
|
31
35
|
const root = resolve("./");
|
|
@@ -46,6 +50,7 @@ export async function init(_body, opts) {
|
|
|
46
50
|
isInit = true;
|
|
47
51
|
repository.save(id, dsl);
|
|
48
52
|
}
|
|
53
|
+
dsl.__BASE_PATH__ = opts.staticBase;
|
|
49
54
|
return success(dsl);
|
|
50
55
|
} else {
|
|
51
56
|
const model = new ProjectModel({
|
|
@@ -56,6 +61,7 @@ export async function init(_body, opts) {
|
|
|
56
61
|
});
|
|
57
62
|
dsl = model.toDsl();
|
|
58
63
|
repository.save(id, dsl);
|
|
64
|
+
dsl.__BASE_PATH__ = opts.staticBase;
|
|
59
65
|
return success(dsl);
|
|
60
66
|
}
|
|
61
67
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/local",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.73",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"formidable": "~3.5.1",
|
|
8
|
-
"@vtj/coder": "~0.8.
|
|
8
|
+
"@vtj/coder": "~0.8.73",
|
|
9
9
|
"@vtj/node": "~0.8.6",
|
|
10
|
-
"@vtj/core": "~0.8.
|
|
10
|
+
"@vtj/core": "~0.8.73"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/formidable": "~3.4.5",
|