@geode/opengeodeweb-front 10.31.0-rc.1 → 10.31.0
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/app/stores/app.js +4 -12
- package/app/stores/back.js +3 -11
- package/app/stores/cloud.js +3 -10
- package/app/stores/viewer.js +6 -12
- package/app/utils/extension.js +7 -43
- package/opengeodeweb_front_schemas.json +230 -0
- package/package.json +8 -3
- package/server/api/cloud/extensions/schemas/run.json +11 -0
- package/server/api/local/app/schemas/kill.json +8 -0
- package/server/api/local/app/schemas/project_folder_path.json +8 -0
- package/server/api/local/app/schemas/run_back.json +11 -0
- package/server/api/local/app/schemas/run_viewer.json +11 -0
- package/server/api/local/extensions/schemas/kill.json +12 -0
- package/server/api/local/extensions/schemas/run.json +11 -0
- package/server/api/local/extensions/schemas/upload.json +12 -0
- package/server/api/microservice/app/schemas/get_is_app_ready.json +8 -0
- package/server/api/microservice/app/schemas/set_app_base_url.json +10 -0
- package/server/api/microservice/app/schemas/set_back_base_url.json +10 -0
- package/server/api/microservice/app/schemas/set_is_app_ready.json +10 -0
- package/server/api/microservice/app/schemas/set_viewer_base_url.json +10 -0
- package/server/api/microservice/extensions/schemas/download.json +11 -0
- package/server/api/serverless/run_cloud.post.js +1 -1
- package/server/api/serverless/schemas/run_cloud.json +10 -0
- package/shared/scripts.js +7 -48
- package/microservices.json +0 -3
package/app/stores/app.js
CHANGED
|
@@ -6,6 +6,8 @@ import { killExtension } from "@ogw_front/utils/extension.js";
|
|
|
6
6
|
import { upload_file } from "@ogw_internal/utils/upload_file.js";
|
|
7
7
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
8
8
|
|
|
9
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
10
|
+
|
|
9
11
|
// oxlint-disable-next-line max-lines-per-function, max-statements
|
|
10
12
|
export const useAppStore = defineStore("app", () => {
|
|
11
13
|
const stores = [];
|
|
@@ -227,11 +229,8 @@ export const useAppStore = defineStore("app", () => {
|
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
function upload(file, callbacks = {}) {
|
|
230
|
-
const schema = {
|
|
231
|
-
$id: "/api/local/extensions/upload",
|
|
232
|
-
methods: ["OPTIONS", "PUT"],
|
|
233
|
-
};
|
|
234
232
|
const store = useAppStore();
|
|
233
|
+
const schema = opengeodeweb_front_schemas.api.local.extensions.upload;
|
|
235
234
|
const { PROJECT: projectName } = useRuntimeConfig().public;
|
|
236
235
|
const params = { projectName };
|
|
237
236
|
return upload_file(
|
|
@@ -278,14 +277,7 @@ export const useAppStore = defineStore("app", () => {
|
|
|
278
277
|
|
|
279
278
|
function createProjectFolder() {
|
|
280
279
|
const { PROJECT } = useRuntimeConfig().public;
|
|
281
|
-
const schema =
|
|
282
|
-
$id: "/api/local/app/project_folder_path",
|
|
283
|
-
methods: ["POST"],
|
|
284
|
-
type: "object",
|
|
285
|
-
properties: { PROJECT: { type: "string" } },
|
|
286
|
-
required: ["PROJECT"],
|
|
287
|
-
additionalProperties: true,
|
|
288
|
-
};
|
|
280
|
+
const schema = opengeodeweb_front_schemas.api.local.app.project_folder_path;
|
|
289
281
|
const params = { PROJECT };
|
|
290
282
|
return request(
|
|
291
283
|
{ schema, params },
|
package/app/stores/back.js
CHANGED
|
@@ -7,6 +7,8 @@ import { useAppStore } from "@ogw_front/stores/app";
|
|
|
7
7
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
8
8
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
9
9
|
|
|
10
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
11
|
+
|
|
10
12
|
const MILLISECONDS_IN_SECOND = 1000;
|
|
11
13
|
const DEFAULT_PING_INTERVAL_SECONDS = 10;
|
|
12
14
|
|
|
@@ -74,17 +76,7 @@ export const useBackStore = defineStore("back", {
|
|
|
74
76
|
console.log("[GEODE] Launching back microservice...", { args });
|
|
75
77
|
const appStore = useAppStore();
|
|
76
78
|
const { COMMAND_BACK, NUXT_ROOT_PATH } = useRuntimeConfig().public;
|
|
77
|
-
const schema =
|
|
78
|
-
$id: "/api/local/app/run_back",
|
|
79
|
-
methods: ["POST"],
|
|
80
|
-
type: "object",
|
|
81
|
-
properties: {
|
|
82
|
-
COMMAND_BACK: { type: "string" },
|
|
83
|
-
NUXT_ROOT_PATH: { type: "string" },
|
|
84
|
-
},
|
|
85
|
-
required: ["COMMAND_BACK", "NUXT_ROOT_PATH"],
|
|
86
|
-
additionalProperties: true,
|
|
87
|
-
};
|
|
79
|
+
const schema = opengeodeweb_front_schemas.api.local.app.run_back;
|
|
88
80
|
const params = { COMMAND_BACK, NUXT_ROOT_PATH, args };
|
|
89
81
|
|
|
90
82
|
console.log("[GEODE] params", params);
|
package/app/stores/cloud.js
CHANGED
|
@@ -5,6 +5,8 @@ import { useAppStore } from "./app";
|
|
|
5
5
|
import { useFeedbackStore } from "./feedback";
|
|
6
6
|
import { useInfraStore } from "./infra";
|
|
7
7
|
|
|
8
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
9
|
+
|
|
8
10
|
export const useCloudStore = defineStore("cloud", {
|
|
9
11
|
state: () => ({
|
|
10
12
|
status: Status.NOT_CONNECTED,
|
|
@@ -13,16 +15,7 @@ export const useCloudStore = defineStore("cloud", {
|
|
|
13
15
|
launch(email) {
|
|
14
16
|
this.status = Status.CONNECTING;
|
|
15
17
|
console.log("[CLOUD] Launching cloud backend...");
|
|
16
|
-
const schema =
|
|
17
|
-
$id: "/api/serverless/run_cloud",
|
|
18
|
-
methods: ["POST"],
|
|
19
|
-
type: "object",
|
|
20
|
-
properties: {
|
|
21
|
-
email: { type: "string" },
|
|
22
|
-
},
|
|
23
|
-
required: ["email"],
|
|
24
|
-
additionalProperties: true,
|
|
25
|
-
};
|
|
18
|
+
const schema = opengeodeweb_front_schemas.api.serverless.run_cloud;
|
|
26
19
|
const params = { email };
|
|
27
20
|
console.log("[CLOUD] params", params);
|
|
28
21
|
const appStore = useAppStore();
|
package/app/stores/viewer.js
CHANGED
|
@@ -5,7 +5,9 @@ import _ from "lodash";
|
|
|
5
5
|
import "@kitware/vtk.js/Rendering/OpenGL/Profiles/Geometry";
|
|
6
6
|
import SmartConnect from "wslink/src/SmartConnect";
|
|
7
7
|
import { connectImageStream } from "@kitware/vtk.js/Rendering/Misc/RemoteView";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
10
|
+
import opengeodeweb_viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" };
|
|
9
11
|
|
|
10
12
|
// Local imports
|
|
11
13
|
import {
|
|
@@ -57,7 +59,7 @@ export const useViewerStore = defineStore(
|
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
async function set_picked_point(x, y) {
|
|
60
|
-
const schema =
|
|
62
|
+
const schema = opengeodeweb_viewer_schemas.opengeodeweb_viewer.viewer.get_point_position;
|
|
61
63
|
const params = { x: Math.round(x), y: Math.round(y) };
|
|
62
64
|
const response = await request({ schema, params });
|
|
63
65
|
const { x: world_x, y: world_y, z: world_z } = response;
|
|
@@ -101,7 +103,7 @@ export const useViewerStore = defineStore(
|
|
|
101
103
|
});
|
|
102
104
|
connectImageStream(client.value.getConnection().getSession());
|
|
103
105
|
client.value.endBusy();
|
|
104
|
-
const schema =
|
|
106
|
+
const schema = opengeodeweb_viewer_schemas.opengeodeweb_viewer.viewer.reset_visualization;
|
|
105
107
|
const timeout = undefined;
|
|
106
108
|
await request({ schema, timeout });
|
|
107
109
|
status.value = Status.CONNECTED;
|
|
@@ -126,15 +128,7 @@ export const useViewerStore = defineStore(
|
|
|
126
128
|
const appStore = useAppStore();
|
|
127
129
|
|
|
128
130
|
const { COMMAND_VIEWER, NUXT_ROOT_PATH } = useRuntimeConfig().public;
|
|
129
|
-
const schema =
|
|
130
|
-
$id: "/api/local/app/run_viewer",
|
|
131
|
-
methods: ["POST"],
|
|
132
|
-
type: "object",
|
|
133
|
-
properties: { COMMAND_VIEWER: { type: "string" }, NUXT_ROOT_PATH: { type: "string" } },
|
|
134
|
-
required: ["COMMAND_VIEWER", "NUXT_ROOT_PATH"],
|
|
135
|
-
additionalProperties: true,
|
|
136
|
-
};
|
|
137
|
-
|
|
131
|
+
const schema = opengeodeweb_front_schemas.api.local.app.run_viewer;
|
|
138
132
|
const params = { COMMAND_VIEWER, NUXT_ROOT_PATH, args };
|
|
139
133
|
console.log("[VIEWER] params", params);
|
|
140
134
|
|
package/app/utils/extension.js
CHANGED
|
@@ -8,6 +8,8 @@ import { isCloudMode } from "@ogw_front/utils/stores";
|
|
|
8
8
|
import { useAppStore } from "@ogw_front/stores/app";
|
|
9
9
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
10
10
|
|
|
11
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
12
|
+
|
|
11
13
|
async function importExtensionFile(file) {
|
|
12
14
|
await uploadExtension(file);
|
|
13
15
|
return registerRunningExtensions();
|
|
@@ -83,21 +85,8 @@ async function uploadExtension(file) {
|
|
|
83
85
|
function downloadExtension({ url, extensionFileName }) {
|
|
84
86
|
const appStore = useAppStore();
|
|
85
87
|
const { PROJECT: projectName } = useRuntimeConfig().public;
|
|
88
|
+
const schema = opengeodeweb_front_schemas.api.microservice.extensions.download;
|
|
86
89
|
const params = { projectName, url, extensionFileName };
|
|
87
|
-
|
|
88
|
-
const schema = {
|
|
89
|
-
$id: "/api/microservice/extensions/download",
|
|
90
|
-
methods: ["POST"],
|
|
91
|
-
type: "object",
|
|
92
|
-
properties: {
|
|
93
|
-
extensionFileName: { type: "string" },
|
|
94
|
-
projectName: { type: "string" },
|
|
95
|
-
url: { type: "string" },
|
|
96
|
-
},
|
|
97
|
-
required: ["extensionFileName", "projectName", "url"],
|
|
98
|
-
additionalProperties: false,
|
|
99
|
-
};
|
|
100
|
-
|
|
101
90
|
return appStore.request({ schema, params });
|
|
102
91
|
}
|
|
103
92
|
|
|
@@ -105,20 +94,10 @@ function runExtensions() {
|
|
|
105
94
|
const appStore = useAppStore();
|
|
106
95
|
const { projectFolderPath } = appStore;
|
|
107
96
|
const { PROJECT: projectName } = useRuntimeConfig().public;
|
|
97
|
+
const schema = isCloudMode()
|
|
98
|
+
? opengeodeweb_front_schemas.api.cloud.extensions.run
|
|
99
|
+
: opengeodeweb_front_schemas.api.local.extensions.run;
|
|
108
100
|
const params = { projectFolderPath, projectName };
|
|
109
|
-
const endpoint = isCloudMode() ? "cloud" : "local";
|
|
110
|
-
const schema = {
|
|
111
|
-
$id: `/api/${endpoint}/extensions/run`,
|
|
112
|
-
methods: ["POST"],
|
|
113
|
-
type: "object",
|
|
114
|
-
properties: {
|
|
115
|
-
projectFolderPath: { type: "string" },
|
|
116
|
-
projectName: { type: "string" },
|
|
117
|
-
},
|
|
118
|
-
required: ["projectFolderPath", "projectName"],
|
|
119
|
-
additionalProperties: false,
|
|
120
|
-
};
|
|
121
|
-
|
|
122
101
|
return appStore.request({ schema, params });
|
|
123
102
|
}
|
|
124
103
|
|
|
@@ -126,23 +105,8 @@ function killExtension(extensionId) {
|
|
|
126
105
|
const appStore = useAppStore();
|
|
127
106
|
const { projectFolderPath } = appStore;
|
|
128
107
|
const { PROJECT: projectName } = useRuntimeConfig().public;
|
|
108
|
+
const schema = opengeodeweb_front_schemas.api.local.extensions.kill;
|
|
129
109
|
const params = { extensionId, projectFolderPath, projectName };
|
|
130
|
-
|
|
131
|
-
console.log(`[AppStore] Killing extension: ${extensionId}`, { params });
|
|
132
|
-
|
|
133
|
-
const schema = {
|
|
134
|
-
$id: "/api/local/extensions/kill",
|
|
135
|
-
methods: ["POST"],
|
|
136
|
-
type: "object",
|
|
137
|
-
properties: {
|
|
138
|
-
extensionId: { type: "string" },
|
|
139
|
-
projectFolderPath: { type: "string" },
|
|
140
|
-
projectName: { type: "string" },
|
|
141
|
-
},
|
|
142
|
-
required: ["extensionId", "projectFolderPath", "projectName"],
|
|
143
|
-
additionalProperties: false,
|
|
144
|
-
};
|
|
145
|
-
|
|
146
110
|
return appStore.request({ schema, params });
|
|
147
111
|
}
|
|
148
112
|
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"cloud": {
|
|
4
|
+
"extensions": {
|
|
5
|
+
"run": {
|
|
6
|
+
"$id": "api/cloud/extensions/run",
|
|
7
|
+
"route": "/run",
|
|
8
|
+
"methods": ["POST"],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"projectFolderPath": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"projectName": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["projectFolderPath", "projectName"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"local": {
|
|
24
|
+
"app": {
|
|
25
|
+
"run_viewer": {
|
|
26
|
+
"$id": "api/local/app/run_viewer",
|
|
27
|
+
"route": "/run_viewer",
|
|
28
|
+
"methods": ["POST"],
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"COMMAND_VIEWER": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"NUXT_ROOT_PATH": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": ["COMMAND_VIEWER", "NUXT_ROOT_PATH"],
|
|
39
|
+
"additionalProperties": true
|
|
40
|
+
},
|
|
41
|
+
"run_back": {
|
|
42
|
+
"$id": "api/local/app/run_back",
|
|
43
|
+
"route": "/run_back",
|
|
44
|
+
"methods": ["POST"],
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"COMMAND_BACK": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"NUXT_ROOT_PATH": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["COMMAND_BACK", "NUXT_ROOT_PATH"],
|
|
55
|
+
"additionalProperties": true
|
|
56
|
+
},
|
|
57
|
+
"project_folder_path": {
|
|
58
|
+
"$id": "api/local/app/project_folder_path",
|
|
59
|
+
"route": "/project_folder_path",
|
|
60
|
+
"methods": ["POST"],
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"PROJECT": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": ["PROJECT"],
|
|
68
|
+
"additionalProperties": true
|
|
69
|
+
},
|
|
70
|
+
"kill": {
|
|
71
|
+
"$id": "api/local/app/kill",
|
|
72
|
+
"route": "/kill",
|
|
73
|
+
"methods": ["POST"],
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {},
|
|
76
|
+
"required": [],
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"extensions": {
|
|
81
|
+
"upload": {
|
|
82
|
+
"$id": "api/local/extensions/upload",
|
|
83
|
+
"route": "/upload",
|
|
84
|
+
"methods": ["OPTIONS", "PUT"],
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"filename": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
"run": {
|
|
95
|
+
"$id": "api/local/extensions/run",
|
|
96
|
+
"route": "/run",
|
|
97
|
+
"methods": ["POST"],
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"projectFolderPath": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"projectName": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": ["projectFolderPath", "projectName"],
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
},
|
|
110
|
+
"kill": {
|
|
111
|
+
"$id": "api/local/extensions/kill",
|
|
112
|
+
"route": "/kill",
|
|
113
|
+
"methods": ["POST"],
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"extensionId": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"projectFolderPath": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"projectName": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": ["extensionId", "projectFolderPath", "projectName"],
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"microservice": {
|
|
132
|
+
"app": {
|
|
133
|
+
"set_viewer_base_url": {
|
|
134
|
+
"$id": "api/microservice/app/set_viewer_base_url",
|
|
135
|
+
"route": "/set_viewer_base_url",
|
|
136
|
+
"methods": ["POST"],
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"baseUrl": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": ["baseUrl"],
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
},
|
|
146
|
+
"set_is_app_ready": {
|
|
147
|
+
"$id": "api/microservice/app/set_is_app_ready",
|
|
148
|
+
"route": "/set_is_app_ready",
|
|
149
|
+
"methods": ["POST"],
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"isReady": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": ["isReady"],
|
|
157
|
+
"additionalProperties": false
|
|
158
|
+
},
|
|
159
|
+
"set_back_base_url": {
|
|
160
|
+
"$id": "api/microservice/app/set_back_base_url",
|
|
161
|
+
"route": "/set_back_base_url",
|
|
162
|
+
"methods": ["POST"],
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"baseUrl": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": ["baseUrl"],
|
|
170
|
+
"additionalProperties": false
|
|
171
|
+
},
|
|
172
|
+
"set_app_base_url": {
|
|
173
|
+
"$id": "api/microservice/app/set_app_base_url",
|
|
174
|
+
"route": "/set_app_base_url",
|
|
175
|
+
"methods": ["POST"],
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"baseUrl": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": ["baseUrl"],
|
|
183
|
+
"additionalProperties": false
|
|
184
|
+
},
|
|
185
|
+
"get_is_app_ready": {
|
|
186
|
+
"$id": "api/microservice/app/api/microservice/app/get_is_app_ready",
|
|
187
|
+
"route": "/api/microservice/app/get_is_app_ready",
|
|
188
|
+
"methods": ["GET"],
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {},
|
|
191
|
+
"required": [],
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"extensions": {
|
|
196
|
+
"download": {
|
|
197
|
+
"$id": "api/microservice/extensions/download",
|
|
198
|
+
"route": "/download",
|
|
199
|
+
"methods": ["POST"],
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"extension": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"platform": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"required": ["extension", "platform"],
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"serverless": {
|
|
215
|
+
"run_cloud": {
|
|
216
|
+
"$id": "api/serverless/run_cloud",
|
|
217
|
+
"route": "/run_cloud",
|
|
218
|
+
"methods": ["POST"],
|
|
219
|
+
"type": "object",
|
|
220
|
+
"properties": {
|
|
221
|
+
"email": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": ["email"],
|
|
226
|
+
"additionalProperties": false
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"version": "10.31.0
|
|
3
|
+
"version": "10.31.0",
|
|
4
4
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
5
5
|
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
6
6
|
"bugs": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./nuxt.config.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": "./nuxt.config.js",
|
|
23
|
+
"./*": "./*"
|
|
24
|
+
},
|
|
21
25
|
"publishConfig": {
|
|
22
26
|
"access": "public"
|
|
23
27
|
},
|
|
@@ -26,6 +30,7 @@
|
|
|
26
30
|
"build:back": "npx opengeodeweb-microservice-pyinstaller ../OpenGeodeWeb-Back",
|
|
27
31
|
"build:viewer": "npx opengeodeweb-microservice-pyinstaller ../OpenGeodeWeb-Viewer",
|
|
28
32
|
"build:microservices": "concurrently \"npm run build:back\" \"npm run build:viewer\"",
|
|
33
|
+
"json": "npx opengeodeweb-microservice-generate --startDir server/api --key route --separator / --prefix api",
|
|
29
34
|
"test": "npm run test:unit",
|
|
30
35
|
"tests": "vitest --config ./tests/vitest.config.js",
|
|
31
36
|
"test:unit": "npm run tests -- --project unit",
|
|
@@ -34,8 +39,8 @@
|
|
|
34
39
|
"build": ""
|
|
35
40
|
},
|
|
36
41
|
"dependencies": {
|
|
37
|
-
"@geode/opengeodeweb-back": "
|
|
38
|
-
"@geode/opengeodeweb-viewer": "
|
|
42
|
+
"@geode/opengeodeweb-back": "latest",
|
|
43
|
+
"@geode/opengeodeweb-viewer": "latest",
|
|
39
44
|
"@google-cloud/run": "3.2.0",
|
|
40
45
|
"@kitware/vtk.js": "33.3.0",
|
|
41
46
|
"@mdi/font": "7.4.47",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"route": "/run",
|
|
3
|
+
"methods": ["POST"],
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"projectFolderPath": { "type": "string" },
|
|
7
|
+
"projectName": { "type": "string" }
|
|
8
|
+
},
|
|
9
|
+
"required": ["projectFolderPath", "projectName"],
|
|
10
|
+
"additionalProperties": false
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"route": "/run_back",
|
|
3
|
+
"methods": ["POST"],
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"COMMAND_BACK": { "type": "string" },
|
|
7
|
+
"NUXT_ROOT_PATH": { "type": "string" }
|
|
8
|
+
},
|
|
9
|
+
"required": ["COMMAND_BACK", "NUXT_ROOT_PATH"],
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"route": "/run_viewer",
|
|
3
|
+
"methods": ["POST"],
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"COMMAND_VIEWER": { "type": "string" },
|
|
7
|
+
"NUXT_ROOT_PATH": { "type": "string" }
|
|
8
|
+
},
|
|
9
|
+
"required": ["COMMAND_VIEWER", "NUXT_ROOT_PATH"],
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"route": "/kill",
|
|
3
|
+
"methods": ["POST"],
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"extensionId": { "type": "string" },
|
|
7
|
+
"projectFolderPath": { "type": "string" },
|
|
8
|
+
"projectName": { "type": "string" }
|
|
9
|
+
},
|
|
10
|
+
"required": ["extensionId", "projectFolderPath", "projectName"],
|
|
11
|
+
"additionalProperties": false
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"route": "/run",
|
|
3
|
+
"methods": ["POST"],
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"projectFolderPath": { "type": "string" },
|
|
7
|
+
"projectName": { "type": "string" }
|
|
8
|
+
},
|
|
9
|
+
"required": ["projectFolderPath", "projectName"],
|
|
10
|
+
"additionalProperties": false
|
|
11
|
+
}
|
|
@@ -6,7 +6,7 @@ import { GoogleAuth } from "google-auth-library";
|
|
|
6
6
|
import { ServicesClient } from "@google-cloud/run";
|
|
7
7
|
|
|
8
8
|
// Local imports
|
|
9
|
-
import { artifactImage, requestConfig } from "@geode/opengeodeweb-front/server/utils/cloud";
|
|
9
|
+
import { artifactImage, requestConfig } from "@geode/opengeodeweb-front/server/utils/cloud.js";
|
|
10
10
|
|
|
11
11
|
export default defineEventHandler(async (event) => {
|
|
12
12
|
try {
|
package/shared/scripts.js
CHANGED
|
@@ -5,80 +5,39 @@
|
|
|
5
5
|
// Local imports
|
|
6
6
|
import { fetchSchema } from "./utils/fetch_schema.js";
|
|
7
7
|
|
|
8
|
+
import opengeodeweb_front_schemas from "@geode/opengeodeweb-front/opengeodeweb_front_schemas.json" with { type: "json" };
|
|
9
|
+
|
|
8
10
|
function setAppBaseUrl(appBaseUrl) {
|
|
9
11
|
console.log("[API] setAppBaseUrl", appBaseUrl);
|
|
10
|
-
const schema =
|
|
11
|
-
$id: "/api/microservice/app/set_app_base_url",
|
|
12
|
-
methods: ["POST"],
|
|
13
|
-
type: "object",
|
|
14
|
-
properties: {
|
|
15
|
-
baseUrl: { type: "string" },
|
|
16
|
-
},
|
|
17
|
-
required: ["baseUrl"],
|
|
18
|
-
additionalProperties: false,
|
|
19
|
-
};
|
|
12
|
+
const schema = opengeodeweb_front_schemas.api.microservice.app.set_app_base_url;
|
|
20
13
|
const params = { baseUrl: appBaseUrl };
|
|
21
14
|
return fetchSchema({ schema, params, baseURL: appBaseUrl });
|
|
22
15
|
}
|
|
23
16
|
|
|
24
17
|
function setBackBaseUrl(appBaseUrl, backBaseUrl) {
|
|
25
18
|
console.log("[API] setBackBaseUrl", appBaseUrl, backBaseUrl);
|
|
26
|
-
const schema =
|
|
27
|
-
$id: "/api/microservice/app/set_back_base_url",
|
|
28
|
-
methods: ["POST"],
|
|
29
|
-
type: "object",
|
|
30
|
-
properties: {
|
|
31
|
-
baseUrl: { type: "string" },
|
|
32
|
-
},
|
|
33
|
-
required: ["baseUrl"],
|
|
34
|
-
additionalProperties: false,
|
|
35
|
-
};
|
|
19
|
+
const schema = opengeodeweb_front_schemas.api.microservice.app.set_back_base_url;
|
|
36
20
|
const params = { baseUrl: backBaseUrl };
|
|
37
21
|
return fetchSchema({ schema, params, baseURL: appBaseUrl });
|
|
38
22
|
}
|
|
39
23
|
|
|
40
24
|
function setViewerBaseUrl(appBaseUrl, viewerBaseUrl) {
|
|
41
25
|
console.log("[API] setViewerBaseUrl", appBaseUrl, viewerBaseUrl);
|
|
42
|
-
const schema =
|
|
43
|
-
$id: "/api/microservice/app/set_viewer_base_url",
|
|
44
|
-
methods: ["POST"],
|
|
45
|
-
type: "object",
|
|
46
|
-
properties: {
|
|
47
|
-
baseUrl: { type: "string" },
|
|
48
|
-
},
|
|
49
|
-
required: ["baseUrl"],
|
|
50
|
-
additionalProperties: false,
|
|
51
|
-
};
|
|
26
|
+
const schema = opengeodeweb_front_schemas.api.microservice.app.set_viewer_base_url;
|
|
52
27
|
const params = { baseUrl: viewerBaseUrl };
|
|
53
28
|
return fetchSchema({ schema, params, baseURL: appBaseUrl });
|
|
54
29
|
}
|
|
55
30
|
|
|
56
31
|
function setIsAppReady(appBaseUrl, isReady) {
|
|
57
32
|
console.log("[API] setIsAppReady", isReady);
|
|
58
|
-
const schema =
|
|
59
|
-
$id: "/api/microservice/app/set_is_app_ready",
|
|
60
|
-
methods: ["POST"],
|
|
61
|
-
type: "object",
|
|
62
|
-
properties: {
|
|
63
|
-
isReady: { type: "boolean" },
|
|
64
|
-
},
|
|
65
|
-
required: ["isReady"],
|
|
66
|
-
additionalProperties: false,
|
|
67
|
-
};
|
|
33
|
+
const schema = opengeodeweb_front_schemas.api.microservice.app.set_is_app_ready;
|
|
68
34
|
const params = { isReady };
|
|
69
35
|
return fetchSchema({ schema, params, baseURL: appBaseUrl });
|
|
70
36
|
}
|
|
71
37
|
|
|
72
38
|
function getIsAppReady(appBaseUrl) {
|
|
73
39
|
console.log("[API] getIsAppReady");
|
|
74
|
-
const schema =
|
|
75
|
-
$id: "/api/microservice/app/get_is_app_ready",
|
|
76
|
-
methods: ["GET"],
|
|
77
|
-
type: "object",
|
|
78
|
-
properties: {},
|
|
79
|
-
required: [],
|
|
80
|
-
additionalProperties: false,
|
|
81
|
-
};
|
|
40
|
+
const schema = opengeodeweb_front_schemas.api.microservice.app.get_is_app_ready;
|
|
82
41
|
return fetchSchema({ schema, baseURL: appBaseUrl });
|
|
83
42
|
}
|
|
84
43
|
|
package/microservices.json
DELETED