@geode/opengeodeweb-front 10.0.5 → 10.0.6-rc.1
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/utils/local.js +68 -51
- package/package.json +28 -27
package/app/utils/local.js
CHANGED
|
@@ -9,6 +9,7 @@ import pkg from "electron"
|
|
|
9
9
|
const { app, dialog } = pkg
|
|
10
10
|
import { getPort } from "get-port-please"
|
|
11
11
|
import isElectron from "is-electron"
|
|
12
|
+
import pTimeout from "p-timeout"
|
|
12
13
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" with { type: "json" }
|
|
13
14
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
14
15
|
|
|
@@ -185,71 +186,87 @@ function delete_folder_recursive(data_folder_path) {
|
|
|
185
186
|
return
|
|
186
187
|
}
|
|
187
188
|
try {
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
for (const i = 0; i <= 5; i++) {
|
|
190
|
+
console.log(`Deleting folder: ${data_folder_path}`)
|
|
191
|
+
fs.rmSync(data_folder_path, { recursive: true, force: true })
|
|
192
|
+
console.log(`Deleted folder: ${data_folder_path}`)
|
|
193
|
+
return
|
|
194
|
+
}
|
|
190
195
|
} catch (err) {
|
|
191
196
|
console.error(`Error deleting folder ${data_folder_path}:`, err)
|
|
192
197
|
}
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
function kill_back(back_port) {
|
|
196
|
-
return
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
201
|
+
return pTimeout(
|
|
202
|
+
new Promise((resolve, reject) => {
|
|
203
|
+
fetch(
|
|
204
|
+
"http://localhost:" +
|
|
205
|
+
back_port +
|
|
206
|
+
"/" +
|
|
207
|
+
back_schemas.opengeodeweb_back.kill.$id,
|
|
208
|
+
{
|
|
209
|
+
method: back_schemas.opengeodeweb_back.kill.methods[0],
|
|
210
|
+
},
|
|
211
|
+
)
|
|
212
|
+
.then(() => {
|
|
213
|
+
console.log("Failed to kill back")
|
|
214
|
+
reject()
|
|
215
|
+
})
|
|
216
|
+
.catch(() => {
|
|
217
|
+
console.log("Back closed")
|
|
218
|
+
resolve()
|
|
219
|
+
})
|
|
220
|
+
}),
|
|
221
|
+
{
|
|
222
|
+
milliseconds: 500,
|
|
223
|
+
message: "Failed to kill back",
|
|
224
|
+
},
|
|
225
|
+
)
|
|
215
226
|
}
|
|
216
227
|
|
|
217
228
|
function kill_viewer(viewer_port) {
|
|
218
|
-
return
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
JSON.stringify({
|
|
224
|
-
id: "system:hello",
|
|
225
|
-
method: "wslink.hello",
|
|
226
|
-
args: [{ secret: "wslink-secret" }],
|
|
227
|
-
}),
|
|
228
|
-
)
|
|
229
|
-
})
|
|
230
|
-
socket.on("message", (data) => {
|
|
231
|
-
const message = data.toString()
|
|
232
|
-
console.log("Received from server:", message)
|
|
233
|
-
|
|
234
|
-
if (message.includes("hello")) {
|
|
229
|
+
return pTimeout(
|
|
230
|
+
new Promise((resolve) => {
|
|
231
|
+
const socket = new WebSocket("ws://localhost:" + viewer_port + "/ws")
|
|
232
|
+
socket.on("open", () => {
|
|
233
|
+
console.log("Connected to WebSocket server")
|
|
235
234
|
socket.send(
|
|
236
235
|
JSON.stringify({
|
|
237
|
-
id:
|
|
238
|
-
method:
|
|
236
|
+
id: "system:hello",
|
|
237
|
+
method: "wslink.hello",
|
|
238
|
+
args: [{ secret: "wslink-secret" }],
|
|
239
239
|
}),
|
|
240
240
|
)
|
|
241
|
+
})
|
|
242
|
+
socket.on("message", (data) => {
|
|
243
|
+
const message = data.toString()
|
|
244
|
+
console.log("Received from server:", message)
|
|
245
|
+
|
|
246
|
+
if (message.includes("hello")) {
|
|
247
|
+
socket.send(
|
|
248
|
+
JSON.stringify({
|
|
249
|
+
id: viewer_schemas.opengeodeweb_viewer.kill.$id,
|
|
250
|
+
method: viewer_schemas.opengeodeweb_viewer.kill.$id,
|
|
251
|
+
}),
|
|
252
|
+
)
|
|
253
|
+
resolve()
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
socket.on("close", () => {
|
|
257
|
+
console.log("Disconnected from WebSocket server")
|
|
241
258
|
resolve()
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
259
|
+
})
|
|
260
|
+
socket.on("error", (error) => {
|
|
261
|
+
console.error("WebSocket error:", error)
|
|
262
|
+
resolve()
|
|
263
|
+
})
|
|
264
|
+
}),
|
|
265
|
+
{
|
|
266
|
+
milliseconds: 500,
|
|
267
|
+
message: "Failed to kill viewer",
|
|
268
|
+
},
|
|
269
|
+
)
|
|
253
270
|
}
|
|
254
271
|
|
|
255
272
|
async function run_browser(
|
package/package.json
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
+
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "10.0.6-rc.1",
|
|
6
|
+
"main": "./nuxt.config.js",
|
|
3
7
|
"scripts": {
|
|
4
8
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
|
5
9
|
"test": "npm run test:unit",
|
|
@@ -9,6 +13,30 @@
|
|
|
9
13
|
"geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write",
|
|
10
14
|
"build": ""
|
|
11
15
|
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@geode/opengeodeweb-back": "next",
|
|
18
|
+
"@geode/opengeodeweb-viewer": "next",
|
|
19
|
+
"@kitware/vtk.js": "33.3.0",
|
|
20
|
+
"@mdi/font": "7.4.47",
|
|
21
|
+
"@pinia/nuxt": "0.11.3",
|
|
22
|
+
"@types/node": "22.15.3",
|
|
23
|
+
"@vueuse/components": "13.1.0",
|
|
24
|
+
"@vueuse/nuxt": "13.1.0",
|
|
25
|
+
"ajv": "8.17.1",
|
|
26
|
+
"get-port-please": "3.2.0",
|
|
27
|
+
"is-electron": "2.2.2",
|
|
28
|
+
"js-file-download": "0.4.12",
|
|
29
|
+
"nuxt": "4.2.2",
|
|
30
|
+
"p-timeout": "7.0.1",
|
|
31
|
+
"pinia": "3.0.4",
|
|
32
|
+
"sass": "1.87.0",
|
|
33
|
+
"semver": "7.7.1",
|
|
34
|
+
"uuid": "11.1.0",
|
|
35
|
+
"vue3-carousel": "0.3.4",
|
|
36
|
+
"vuetify": "3.10.11",
|
|
37
|
+
"ws": "8.18.3",
|
|
38
|
+
"wslink": "1.12.4"
|
|
39
|
+
},
|
|
12
40
|
"devDependencies": {
|
|
13
41
|
"@nuxt/test-utils": "3.21.0",
|
|
14
42
|
"@pinia/testing": "1.0.3",
|
|
@@ -36,33 +64,6 @@
|
|
|
36
64
|
"overrides": {
|
|
37
65
|
"vue": "latest"
|
|
38
66
|
},
|
|
39
|
-
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
40
|
-
"type": "module",
|
|
41
|
-
"version": "10.0.5",
|
|
42
|
-
"main": "./nuxt.config.js",
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@geode/opengeodeweb-back": "latest",
|
|
45
|
-
"@geode/opengeodeweb-viewer": "latest",
|
|
46
|
-
"@kitware/vtk.js": "33.3.0",
|
|
47
|
-
"@mdi/font": "7.4.47",
|
|
48
|
-
"@pinia/nuxt": "0.11.3",
|
|
49
|
-
"@types/node": "22.15.3",
|
|
50
|
-
"@vueuse/components": "13.1.0",
|
|
51
|
-
"@vueuse/nuxt": "13.1.0",
|
|
52
|
-
"ajv": "8.17.1",
|
|
53
|
-
"get-port-please": "3.2.0",
|
|
54
|
-
"is-electron": "2.2.2",
|
|
55
|
-
"js-file-download": "0.4.12",
|
|
56
|
-
"nuxt": "4.2.2",
|
|
57
|
-
"pinia": "3.0.4",
|
|
58
|
-
"sass": "1.87.0",
|
|
59
|
-
"semver": "7.7.1",
|
|
60
|
-
"uuid": "11.1.0",
|
|
61
|
-
"vue3-carousel": "0.3.4",
|
|
62
|
-
"vuetify": "3.10.11",
|
|
63
|
-
"ws": "8.18.3",
|
|
64
|
-
"wslink": "1.12.4"
|
|
65
|
-
},
|
|
66
67
|
"repository": {
|
|
67
68
|
"type": "git",
|
|
68
69
|
"url": "git+https://github.com/Geode-solutions/OpenGeodeWeb-Front.git"
|