@geode/opengeodeweb-front 10.35.0 → 10.36.0-rc.2
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/.build/opengeodeweb_front_schemas.js +200 -21
- package/.build/server/utils/typed_handler.js +63 -0
- package/.build/shared/utils/validate_schema.js +2 -1
- package/app/components/CrsSelector.vue +5 -5
- package/app/components/ExtensionSelector.vue +6 -12
- package/app/components/FileSelector.vue +2 -4
- package/app/components/MissingFilesSelector.vue +1 -1
- package/app/components/ObjectSelector.vue +1 -1
- package/app/components/ThresholdFilter.vue +1 -1
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +1 -1
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +5 -7
- package/app/composables/global_attribute_style.ts +1 -1
- package/app/composables/project_manager.ts +1 -1
- package/app/stores/app.ts +19 -17
- package/app/stores/back.ts +27 -21
- package/app/stores/cloud.ts +1 -1
- package/app/stores/infra.ts +1 -1
- package/app/stores/viewer.ts +4 -6
- package/app/utils/extension.ts +4 -4
- package/app/utils/import_workflow.ts +1 -1
- package/internal/stores/hybrid_viewer/base64.ts +6 -0
- package/internal/stores/hybrid_viewer/scene.ts +5 -1
- package/internal/utils/api_fetch.ts +9 -8
- package/opengeodeweb_front_schemas.json +252 -19
- package/opengeodeweb_front_typed_schemas.d.ts +225 -0
- package/opengeodeweb_front_typed_schemas.js +4 -0
- package/package.json +7 -5
- package/server/api/cloud/extensions/run.post.ts +9 -21
- package/server/api/cloud/extensions/schemas/run.json +42 -3
- package/server/api/local/app/kill.post.ts +4 -2
- package/server/api/local/app/project_folder_path.post.ts +6 -22
- package/server/api/local/app/run_back.post.ts +8 -23
- package/server/api/local/app/run_viewer.post.ts +8 -23
- package/server/api/local/app/schemas/kill.json +7 -1
- package/server/api/local/app/schemas/project_folder_path.json +19 -2
- package/server/api/local/app/schemas/run_back.json +31 -4
- package/server/api/local/app/schemas/run_viewer.json +31 -4
- package/server/api/local/extensions/kill.post.ts +8 -23
- package/server/api/local/extensions/run.post.ts +8 -22
- package/server/api/local/extensions/schemas/kill.json +20 -4
- package/server/api/local/extensions/schemas/run.json +42 -3
- package/server/api/local/extensions/schemas/upload.json +11 -1
- package/server/api/local/extensions/upload.put.ts +37 -29
- package/server/api/microservice/app/get_is_app_ready.get.ts +7 -13
- package/server/api/microservice/app/schemas/get_is_app_ready.json +14 -1
- package/server/api/microservice/app/schemas/set_app_base_url.json +17 -2
- package/server/api/microservice/app/schemas/set_back_base_url.json +17 -2
- package/server/api/microservice/app/schemas/set_is_app_ready.json +17 -2
- package/server/api/microservice/app/schemas/set_viewer_base_url.json +17 -2
- package/server/api/microservice/app/set_app_base_url.post.ts +8 -17
- package/server/api/microservice/app/set_back_base_url.post.ts +8 -16
- package/server/api/microservice/app/set_is_app_ready.post.ts +8 -17
- package/server/api/microservice/app/set_viewer_base_url.post.ts +8 -16
- package/server/api/microservice/extensions/download.post.ts +8 -21
- package/server/api/microservice/extensions/schemas/download.json +21 -4
- package/server/utils/typed_handler.ts +114 -0
- package/shared/utils/types.ts +18 -3
- package/shared/utils/validate_schema.ts +1 -1
|
@@ -16,7 +16,42 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"required": ["projectFolderPath", "projectName"],
|
|
19
|
-
"additionalProperties": false
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"response": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"statusCode": {
|
|
24
|
+
"type": "integer"
|
|
25
|
+
},
|
|
26
|
+
"extensionsArray": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"name": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"version": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"frontendContent": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"port": {
|
|
44
|
+
"type": "integer"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": ["id", "name", "version", "frontendContent", "port"],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": ["statusCode", "extensionsArray"],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
20
55
|
}
|
|
21
56
|
}
|
|
22
57
|
},
|
|
@@ -33,10 +68,33 @@
|
|
|
33
68
|
},
|
|
34
69
|
"NUXT_ROOT_PATH": {
|
|
35
70
|
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"args": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"projectFolderPath": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": ["projectFolderPath"],
|
|
80
|
+
"additionalProperties": true
|
|
36
81
|
}
|
|
37
82
|
},
|
|
38
|
-
"required": ["COMMAND_VIEWER", "NUXT_ROOT_PATH"],
|
|
39
|
-
"additionalProperties": true
|
|
83
|
+
"required": ["COMMAND_VIEWER", "NUXT_ROOT_PATH", "args"],
|
|
84
|
+
"additionalProperties": true,
|
|
85
|
+
"response": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"statusCode": {
|
|
89
|
+
"type": "integer"
|
|
90
|
+
},
|
|
91
|
+
"port": {
|
|
92
|
+
"type": "integer"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": ["statusCode", "port"],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
}
|
|
40
98
|
},
|
|
41
99
|
"run_back": {
|
|
42
100
|
"$id": "api/local/app/run_back",
|
|
@@ -49,10 +107,33 @@
|
|
|
49
107
|
},
|
|
50
108
|
"NUXT_ROOT_PATH": {
|
|
51
109
|
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"args": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"projectFolderPath": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": ["projectFolderPath"],
|
|
119
|
+
"additionalProperties": true
|
|
52
120
|
}
|
|
53
121
|
},
|
|
54
|
-
"required": ["COMMAND_BACK", "NUXT_ROOT_PATH"],
|
|
55
|
-
"additionalProperties": true
|
|
122
|
+
"required": ["COMMAND_BACK", "NUXT_ROOT_PATH", "args"],
|
|
123
|
+
"additionalProperties": true,
|
|
124
|
+
"response": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"statusCode": {
|
|
128
|
+
"type": "integer"
|
|
129
|
+
},
|
|
130
|
+
"port": {
|
|
131
|
+
"type": "integer"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": ["statusCode", "port"],
|
|
135
|
+
"additionalProperties": false
|
|
136
|
+
}
|
|
56
137
|
},
|
|
57
138
|
"project_folder_path": {
|
|
58
139
|
"$id": "api/local/app/project_folder_path",
|
|
@@ -65,7 +146,20 @@
|
|
|
65
146
|
}
|
|
66
147
|
},
|
|
67
148
|
"required": ["PROJECT"],
|
|
68
|
-
"additionalProperties": true
|
|
149
|
+
"additionalProperties": true,
|
|
150
|
+
"response": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"statusCode": {
|
|
154
|
+
"type": "integer"
|
|
155
|
+
},
|
|
156
|
+
"projectFolderPath": {
|
|
157
|
+
"type": "string"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"required": ["statusCode", "projectFolderPath"],
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
}
|
|
69
163
|
},
|
|
70
164
|
"kill": {
|
|
71
165
|
"$id": "api/local/app/kill",
|
|
@@ -74,7 +168,13 @@
|
|
|
74
168
|
"type": "object",
|
|
75
169
|
"properties": {},
|
|
76
170
|
"required": [],
|
|
77
|
-
"additionalProperties": false
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"response": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"properties": {},
|
|
175
|
+
"required": [],
|
|
176
|
+
"additionalProperties": false
|
|
177
|
+
}
|
|
78
178
|
}
|
|
79
179
|
},
|
|
80
180
|
"extensions": {
|
|
@@ -89,7 +189,17 @@
|
|
|
89
189
|
"minLength": 1
|
|
90
190
|
}
|
|
91
191
|
},
|
|
92
|
-
"additionalProperties": false
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"response": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"statusCode": {
|
|
197
|
+
"type": "integer"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": ["statusCode"],
|
|
201
|
+
"additionalProperties": false
|
|
202
|
+
}
|
|
93
203
|
},
|
|
94
204
|
"run": {
|
|
95
205
|
"$id": "api/local/extensions/run",
|
|
@@ -105,7 +215,42 @@
|
|
|
105
215
|
}
|
|
106
216
|
},
|
|
107
217
|
"required": ["projectFolderPath", "projectName"],
|
|
108
|
-
"additionalProperties": false
|
|
218
|
+
"additionalProperties": false,
|
|
219
|
+
"response": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"statusCode": {
|
|
223
|
+
"type": "integer"
|
|
224
|
+
},
|
|
225
|
+
"extensionsArray": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": {
|
|
230
|
+
"id": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"name": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"version": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"frontendContent": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"port": {
|
|
243
|
+
"type": "integer"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"required": ["id", "name", "version", "frontendContent", "port"],
|
|
247
|
+
"additionalProperties": false
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"required": ["statusCode", "extensionsArray"],
|
|
252
|
+
"additionalProperties": false
|
|
253
|
+
}
|
|
109
254
|
},
|
|
110
255
|
"kill": {
|
|
111
256
|
"$id": "api/local/extensions/kill",
|
|
@@ -124,7 +269,17 @@
|
|
|
124
269
|
}
|
|
125
270
|
},
|
|
126
271
|
"required": ["extensionId", "projectFolderPath", "projectName"],
|
|
127
|
-
"additionalProperties": false
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"response": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"properties": {
|
|
276
|
+
"statusCode": {
|
|
277
|
+
"type": "integer"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": ["statusCode"],
|
|
281
|
+
"additionalProperties": false
|
|
282
|
+
}
|
|
128
283
|
}
|
|
129
284
|
}
|
|
130
285
|
},
|
|
@@ -141,7 +296,20 @@
|
|
|
141
296
|
}
|
|
142
297
|
},
|
|
143
298
|
"required": ["baseUrl"],
|
|
144
|
-
"additionalProperties": false
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"response": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"properties": {
|
|
303
|
+
"statusCode": {
|
|
304
|
+
"type": "integer"
|
|
305
|
+
},
|
|
306
|
+
"baseUrl": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"required": ["statusCode", "baseUrl"],
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
}
|
|
145
313
|
},
|
|
146
314
|
"set_is_app_ready": {
|
|
147
315
|
"$id": "api/microservice/app/set_is_app_ready",
|
|
@@ -154,7 +322,20 @@
|
|
|
154
322
|
}
|
|
155
323
|
},
|
|
156
324
|
"required": ["isReady"],
|
|
157
|
-
"additionalProperties": false
|
|
325
|
+
"additionalProperties": false,
|
|
326
|
+
"response": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"statusCode": {
|
|
330
|
+
"type": "integer"
|
|
331
|
+
},
|
|
332
|
+
"isReady": {
|
|
333
|
+
"type": "boolean"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"required": ["statusCode", "isReady"],
|
|
337
|
+
"additionalProperties": false
|
|
338
|
+
}
|
|
158
339
|
},
|
|
159
340
|
"set_back_base_url": {
|
|
160
341
|
"$id": "api/microservice/app/set_back_base_url",
|
|
@@ -167,7 +348,20 @@
|
|
|
167
348
|
}
|
|
168
349
|
},
|
|
169
350
|
"required": ["baseUrl"],
|
|
170
|
-
"additionalProperties": false
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"response": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"statusCode": {
|
|
356
|
+
"type": "integer"
|
|
357
|
+
},
|
|
358
|
+
"baseUrl": {
|
|
359
|
+
"type": "string"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"required": ["statusCode", "baseUrl"],
|
|
363
|
+
"additionalProperties": false
|
|
364
|
+
}
|
|
171
365
|
},
|
|
172
366
|
"set_app_base_url": {
|
|
173
367
|
"$id": "api/microservice/app/set_app_base_url",
|
|
@@ -180,7 +374,20 @@
|
|
|
180
374
|
}
|
|
181
375
|
},
|
|
182
376
|
"required": ["baseUrl"],
|
|
183
|
-
"additionalProperties": false
|
|
377
|
+
"additionalProperties": false,
|
|
378
|
+
"response": {
|
|
379
|
+
"type": "object",
|
|
380
|
+
"properties": {
|
|
381
|
+
"statusCode": {
|
|
382
|
+
"type": "integer"
|
|
383
|
+
},
|
|
384
|
+
"baseUrl": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"required": ["statusCode", "baseUrl"],
|
|
389
|
+
"additionalProperties": false
|
|
390
|
+
}
|
|
184
391
|
},
|
|
185
392
|
"get_is_app_ready": {
|
|
186
393
|
"$id": "api/microservice/app/get_is_app_ready",
|
|
@@ -189,7 +396,20 @@
|
|
|
189
396
|
"type": "object",
|
|
190
397
|
"properties": {},
|
|
191
398
|
"required": [],
|
|
192
|
-
"additionalProperties": false
|
|
399
|
+
"additionalProperties": false,
|
|
400
|
+
"response": {
|
|
401
|
+
"type": "object",
|
|
402
|
+
"properties": {
|
|
403
|
+
"statusCode": {
|
|
404
|
+
"type": "integer"
|
|
405
|
+
},
|
|
406
|
+
"isReady": {
|
|
407
|
+
"type": "boolean"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"required": ["statusCode", "isReady"],
|
|
411
|
+
"additionalProperties": false
|
|
412
|
+
}
|
|
193
413
|
}
|
|
194
414
|
},
|
|
195
415
|
"extensions": {
|
|
@@ -199,15 +419,28 @@
|
|
|
199
419
|
"methods": ["POST"],
|
|
200
420
|
"type": "object",
|
|
201
421
|
"properties": {
|
|
202
|
-
"
|
|
422
|
+
"projectName": {
|
|
423
|
+
"type": "string"
|
|
424
|
+
},
|
|
425
|
+
"url": {
|
|
203
426
|
"type": "string"
|
|
204
427
|
},
|
|
205
|
-
"
|
|
428
|
+
"extensionFileName": {
|
|
206
429
|
"type": "string"
|
|
207
430
|
}
|
|
208
431
|
},
|
|
209
|
-
"required": ["
|
|
210
|
-
"additionalProperties": false
|
|
432
|
+
"required": ["projectName", "url", "extensionFileName"],
|
|
433
|
+
"additionalProperties": false,
|
|
434
|
+
"response": {
|
|
435
|
+
"type": "object",
|
|
436
|
+
"properties": {
|
|
437
|
+
"statusCode": {
|
|
438
|
+
"type": "integer"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"required": ["statusCode"],
|
|
442
|
+
"additionalProperties": false
|
|
443
|
+
}
|
|
211
444
|
}
|
|
212
445
|
}
|
|
213
446
|
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// Generated by opengeodeweb-microservice-generate, do not edit.
|
|
2
|
+
import type json from "./opengeodeweb_front_schemas.json";
|
|
3
|
+
|
|
4
|
+
export interface CloudExtensionsRunParams {
|
|
5
|
+
projectFolderPath: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CloudExtensionsRunResponse {
|
|
10
|
+
extensionsArray: CloudExtensionsRunResponseExtensionsArray[];
|
|
11
|
+
statusCode: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface CloudExtensionsRunResponseExtensionsArray {
|
|
15
|
+
frontendContent: string;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
port: number;
|
|
19
|
+
version: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface LocalAppRunViewerParams {
|
|
23
|
+
args: LocalAppRunViewerParamsArgs;
|
|
24
|
+
COMMAND_VIEWER: string;
|
|
25
|
+
NUXT_ROOT_PATH: string;
|
|
26
|
+
[property: string]: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface LocalAppRunViewerParamsArgs {
|
|
30
|
+
projectFolderPath: string;
|
|
31
|
+
[property: string]: any;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface LocalAppRunViewerResponse {
|
|
35
|
+
port: number;
|
|
36
|
+
statusCode: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface LocalAppRunBackParams {
|
|
40
|
+
args: LocalAppRunBackParamsArgs;
|
|
41
|
+
COMMAND_BACK: string;
|
|
42
|
+
NUXT_ROOT_PATH: string;
|
|
43
|
+
[property: string]: any;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface LocalAppRunBackParamsArgs {
|
|
47
|
+
projectFolderPath: string;
|
|
48
|
+
[property: string]: any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface LocalAppRunBackResponse {
|
|
52
|
+
port: number;
|
|
53
|
+
statusCode: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface LocalAppProjectFolderPathParams {
|
|
57
|
+
PROJECT: string;
|
|
58
|
+
[property: string]: any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface LocalAppProjectFolderPathResponse {
|
|
62
|
+
projectFolderPath: string;
|
|
63
|
+
statusCode: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface LocalAppKillParams {}
|
|
67
|
+
|
|
68
|
+
export interface LocalAppKillResponse {}
|
|
69
|
+
|
|
70
|
+
export interface LocalExtensionsUploadParams {
|
|
71
|
+
filename?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface LocalExtensionsUploadResponse {
|
|
75
|
+
statusCode: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface LocalExtensionsRunParams {
|
|
79
|
+
projectFolderPath: string;
|
|
80
|
+
projectName: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface LocalExtensionsRunResponse {
|
|
84
|
+
extensionsArray: LocalExtensionsRunResponseExtensionsArray[];
|
|
85
|
+
statusCode: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface LocalExtensionsRunResponseExtensionsArray {
|
|
89
|
+
frontendContent: string;
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
port: number;
|
|
93
|
+
version: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface LocalExtensionsKillParams {
|
|
97
|
+
extensionId: string;
|
|
98
|
+
projectFolderPath: string;
|
|
99
|
+
projectName: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface LocalExtensionsKillResponse {
|
|
103
|
+
statusCode: number;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface MicroserviceAppSetViewerBaseURLParams {
|
|
107
|
+
baseUrl: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface MicroserviceAppSetViewerBaseURLResponse {
|
|
111
|
+
baseUrl: string;
|
|
112
|
+
statusCode: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface MicroserviceAppSetIsAppReadyParams {
|
|
116
|
+
isReady: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface MicroserviceAppSetIsAppReadyResponse {
|
|
120
|
+
isReady: boolean;
|
|
121
|
+
statusCode: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface MicroserviceAppSetBackBaseURLParams {
|
|
125
|
+
baseUrl: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface MicroserviceAppSetBackBaseURLResponse {
|
|
129
|
+
baseUrl: string;
|
|
130
|
+
statusCode: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface MicroserviceAppSetAppBaseURLParams {
|
|
134
|
+
baseUrl: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface MicroserviceAppSetAppBaseURLResponse {
|
|
138
|
+
baseUrl: string;
|
|
139
|
+
statusCode: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface MicroserviceAppGetIsAppReadyParams {}
|
|
143
|
+
|
|
144
|
+
export interface MicroserviceAppGetIsAppReadyResponse {
|
|
145
|
+
isReady: boolean;
|
|
146
|
+
statusCode: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface MicroserviceExtensionsDownloadParams {
|
|
150
|
+
extensionFileName: string;
|
|
151
|
+
projectName: string;
|
|
152
|
+
url: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface MicroserviceExtensionsDownloadResponse {
|
|
156
|
+
statusCode: number;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface ErrorResponse {
|
|
160
|
+
code: number;
|
|
161
|
+
description: string;
|
|
162
|
+
name: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// `__params` and `__response` only exist at type level, to infer request/response types from a schema.
|
|
166
|
+
// A type alias (not an interface) keeps the implicit index signature of the JSON type it is intersected with.
|
|
167
|
+
export type TypedSchema<Params, Response> = {
|
|
168
|
+
readonly __params?: Params;
|
|
169
|
+
readonly __response?: Response;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export interface Schemas {
|
|
173
|
+
readonly api: {
|
|
174
|
+
readonly cloud: {
|
|
175
|
+
readonly extensions: {
|
|
176
|
+
readonly run: (typeof json)["api"]["cloud"]["extensions"]["run"] &
|
|
177
|
+
TypedSchema<CloudExtensionsRunParams, CloudExtensionsRunResponse>;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly local: {
|
|
181
|
+
readonly app: {
|
|
182
|
+
readonly run_viewer: (typeof json)["api"]["local"]["app"]["run_viewer"] &
|
|
183
|
+
TypedSchema<LocalAppRunViewerParams, LocalAppRunViewerResponse>;
|
|
184
|
+
readonly run_back: (typeof json)["api"]["local"]["app"]["run_back"] &
|
|
185
|
+
TypedSchema<LocalAppRunBackParams, LocalAppRunBackResponse>;
|
|
186
|
+
readonly project_folder_path: (typeof json)["api"]["local"]["app"]["project_folder_path"] &
|
|
187
|
+
TypedSchema<LocalAppProjectFolderPathParams, LocalAppProjectFolderPathResponse>;
|
|
188
|
+
readonly kill: (typeof json)["api"]["local"]["app"]["kill"] &
|
|
189
|
+
TypedSchema<LocalAppKillParams, LocalAppKillResponse>;
|
|
190
|
+
};
|
|
191
|
+
readonly extensions: {
|
|
192
|
+
readonly upload: (typeof json)["api"]["local"]["extensions"]["upload"] &
|
|
193
|
+
TypedSchema<LocalExtensionsUploadParams, LocalExtensionsUploadResponse>;
|
|
194
|
+
readonly run: (typeof json)["api"]["local"]["extensions"]["run"] &
|
|
195
|
+
TypedSchema<LocalExtensionsRunParams, LocalExtensionsRunResponse>;
|
|
196
|
+
readonly kill: (typeof json)["api"]["local"]["extensions"]["kill"] &
|
|
197
|
+
TypedSchema<LocalExtensionsKillParams, LocalExtensionsKillResponse>;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly microservice: {
|
|
201
|
+
readonly app: {
|
|
202
|
+
readonly set_viewer_base_url: (typeof json)["api"]["microservice"]["app"]["set_viewer_base_url"] &
|
|
203
|
+
TypedSchema<
|
|
204
|
+
MicroserviceAppSetViewerBaseURLParams,
|
|
205
|
+
MicroserviceAppSetViewerBaseURLResponse
|
|
206
|
+
>;
|
|
207
|
+
readonly set_is_app_ready: (typeof json)["api"]["microservice"]["app"]["set_is_app_ready"] &
|
|
208
|
+
TypedSchema<MicroserviceAppSetIsAppReadyParams, MicroserviceAppSetIsAppReadyResponse>;
|
|
209
|
+
readonly set_back_base_url: (typeof json)["api"]["microservice"]["app"]["set_back_base_url"] &
|
|
210
|
+
TypedSchema<MicroserviceAppSetBackBaseURLParams, MicroserviceAppSetBackBaseURLResponse>;
|
|
211
|
+
readonly set_app_base_url: (typeof json)["api"]["microservice"]["app"]["set_app_base_url"] &
|
|
212
|
+
TypedSchema<MicroserviceAppSetAppBaseURLParams, MicroserviceAppSetAppBaseURLResponse>;
|
|
213
|
+
readonly get_is_app_ready: (typeof json)["api"]["microservice"]["app"]["get_is_app_ready"] &
|
|
214
|
+
TypedSchema<MicroserviceAppGetIsAppReadyParams, MicroserviceAppGetIsAppReadyResponse>;
|
|
215
|
+
};
|
|
216
|
+
readonly extensions: {
|
|
217
|
+
readonly download: (typeof json)["api"]["microservice"]["extensions"]["download"] &
|
|
218
|
+
TypedSchema<MicroserviceExtensionsDownloadParams, MicroserviceExtensionsDownloadResponse>;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare const schemas: Schemas;
|
|
225
|
+
export default schemas;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.36.0-rc.2",
|
|
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": {
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"nuxt.config.ts",
|
|
26
26
|
"opengeodeweb_front_schemas.json",
|
|
27
27
|
"opengeodeweb_front_schemas.js",
|
|
28
|
+
"opengeodeweb_front_typed_schemas.js",
|
|
29
|
+
"opengeodeweb_front_typed_schemas.d.ts",
|
|
28
30
|
"COPYLEFT",
|
|
29
31
|
"LICENSE",
|
|
30
32
|
"README.md"
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
"build:back": "npx opengeodeweb-microservice-pyinstaller ../OpenGeodeWeb-Back",
|
|
54
56
|
"build:viewer": "npx opengeodeweb-microservice-pyinstaller ../OpenGeodeWeb-Viewer",
|
|
55
57
|
"build:microservices": "concurrently \"npm run build:back\" \"npm run build:viewer\"",
|
|
56
|
-
"json": "npx opengeodeweb-microservice-generate --startDir server/api --key route --separator / --prefix api",
|
|
58
|
+
"json": "npx opengeodeweb-microservice-generate --startDir server/api --key route --separator / --prefix api --requireResponse",
|
|
57
59
|
"test": "npm run test:unit",
|
|
58
60
|
"tests": "npm run prepare:types && vitest --config ./tests/vitest.config.ts",
|
|
59
61
|
"test:unit": "npm run tests -- --project unit",
|
|
@@ -63,9 +65,9 @@
|
|
|
63
65
|
"prepublishOnly": "npm run build"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
66
|
-
"@geode/cloud-api": "
|
|
67
|
-
"@geode/opengeodeweb-back": "
|
|
68
|
-
"@geode/opengeodeweb-viewer": "
|
|
68
|
+
"@geode/cloud-api": "next",
|
|
69
|
+
"@geode/opengeodeweb-back": "next",
|
|
70
|
+
"@geode/opengeodeweb-viewer": "next",
|
|
69
71
|
"@kitware/vtk.js": "33.3.0",
|
|
70
72
|
"@mdi/font": "7.4.47",
|
|
71
73
|
"@pinia/nuxt": "1.0.1",
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
|
|
4
4
|
// Third party imports
|
|
5
|
-
import { type H3Event, createError, defineEventHandler, readBody } from "h3";
|
|
6
5
|
import { consola } from "consola";
|
|
7
6
|
|
|
8
7
|
// Local imports
|
|
@@ -21,15 +20,13 @@ import {
|
|
|
21
20
|
import { extensionsConf } from "@geode/opengeodeweb-front/server/utils/app_config.ts";
|
|
22
21
|
import { unzipFile } from "@geode/opengeodeweb-front/server/utils/server.ts";
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
projectName: string;
|
|
27
|
-
}
|
|
23
|
+
import { defineTypedEventHandler } from "@geode/opengeodeweb-front/server/utils/typed_handler.ts";
|
|
24
|
+
import schemas from "@geode/opengeodeweb-front/opengeodeweb_front_typed_schemas.js";
|
|
28
25
|
|
|
29
|
-
export default
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
export default defineTypedEventHandler(
|
|
27
|
+
schemas.api.cloud.extensions.run,
|
|
28
|
+
async ({ projectFolderPath, projectName }) => {
|
|
29
|
+
consola.debug("NITRO: runExtensions", { projectFolderPath, projectName });
|
|
33
30
|
const extensionsConfig = extensionsConf(projectName);
|
|
34
31
|
const extensionsArray = await Promise.all(
|
|
35
32
|
Object.entries(extensionsConfig).map(async ([extensionId, { path: extensionPath }]) => {
|
|
@@ -63,15 +60,6 @@ export default defineEventHandler(async (event: H3Event) => {
|
|
|
63
60
|
}),
|
|
64
61
|
);
|
|
65
62
|
|
|
66
|
-
return {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
} catch (error) {
|
|
71
|
-
consola.error("Error running extensions:", error);
|
|
72
|
-
throw createError({
|
|
73
|
-
statusCode: 500,
|
|
74
|
-
statusMessage: error instanceof Error ? error.message : String(error),
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
});
|
|
63
|
+
return { statusCode: 200, extensionsArray };
|
|
64
|
+
},
|
|
65
|
+
);
|