@geode/opengeodeweb-front 10.4.0-rc.1 → 10.4.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/app/utils/local.js
CHANGED
|
@@ -3,6 +3,7 @@ import child_process from "node:child_process"
|
|
|
3
3
|
import fs from "node:fs"
|
|
4
4
|
import path from "node:path"
|
|
5
5
|
import { setTimeout } from "timers/promises"
|
|
6
|
+
import { rimraf } from "rimraf"
|
|
6
7
|
|
|
7
8
|
// Third party imports
|
|
8
9
|
import { WebSocket } from "ws"
|
|
@@ -182,7 +183,7 @@ async function delete_folder_recursive(data_folder_path) {
|
|
|
182
183
|
for (let i = 0; i <= MAX_DELETE_FOLDER_RETRIES; i += 1) {
|
|
183
184
|
try {
|
|
184
185
|
console.log(`Deleting folder: ${data_folder_path}`)
|
|
185
|
-
|
|
186
|
+
await rimraf(data_folder_path)
|
|
186
187
|
console.log(`Deleted folder: ${data_folder_path}`)
|
|
187
188
|
return
|
|
188
189
|
} catch (error) {
|
|
@@ -190,6 +191,7 @@ async function delete_folder_recursive(data_folder_path) {
|
|
|
190
191
|
// Wait before retrying
|
|
191
192
|
const DELAY = 1000 * (i + 1)
|
|
192
193
|
await setTimeout(DELAY)
|
|
194
|
+
console.log("Retrying delete folder")
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
197
|
}
|
|
@@ -209,52 +211,52 @@ function kill_back(back_port) {
|
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
return pTimeout(do_kill(), {
|
|
212
|
-
milliseconds:
|
|
214
|
+
milliseconds: 5000,
|
|
213
215
|
message: "Failed to kill back",
|
|
214
216
|
})
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
function kill_viewer(viewer_port) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
220
|
+
function do_kill() {
|
|
221
|
+
return new Promise((resolve) => {
|
|
222
|
+
const socket = new WebSocket("ws://localhost:" + viewer_port + "/ws")
|
|
223
|
+
socket.on("open", () => {
|
|
224
|
+
console.log("Connected to WebSocket server")
|
|
225
|
+
socket.send(
|
|
226
|
+
JSON.stringify({
|
|
227
|
+
id: "system:hello",
|
|
228
|
+
method: "wslink.hello",
|
|
229
|
+
args: [{ secret: "wslink-secret" }],
|
|
230
|
+
}),
|
|
231
|
+
)
|
|
232
|
+
})
|
|
233
|
+
socket.on("message", (data) => {
|
|
232
234
|
const message = data.toString()
|
|
233
235
|
console.log("Received from server:", message)
|
|
234
|
-
|
|
235
236
|
if (message.includes("hello")) {
|
|
236
237
|
socket.send(
|
|
237
238
|
JSON.stringify({
|
|
238
|
-
id:
|
|
239
|
-
method:
|
|
239
|
+
id: "application.exit",
|
|
240
|
+
method: "application.exit",
|
|
240
241
|
}),
|
|
241
242
|
)
|
|
242
|
-
|
|
243
|
+
socket.close()
|
|
244
|
+
resolve()
|
|
243
245
|
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
})
|
|
247
|
+
socket.on("close", () => {
|
|
248
|
+
console.log("Disconnected from WebSocket server")
|
|
249
|
+
resolve()
|
|
250
|
+
})
|
|
251
|
+
socket.on("error", (error) => {
|
|
252
|
+
console.error("WebSocket error:", error)
|
|
251
253
|
socket.close()
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
resolve()
|
|
255
|
+
})
|
|
256
|
+
})
|
|
254
257
|
}
|
|
255
|
-
|
|
256
258
|
return pTimeout(do_kill(), {
|
|
257
|
-
milliseconds:
|
|
259
|
+
milliseconds: 5000,
|
|
258
260
|
message: "Failed to kill viewer",
|
|
259
261
|
})
|
|
260
262
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
+
"version": "10.4.0-rc.2",
|
|
3
4
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
5
|
+
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/Geode-solutions/OpenGeodeWeb-Front/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Geode-solutions",
|
|
12
|
+
"email": "contact@geode-solutions.com",
|
|
13
|
+
"url": "https://geode-solutions.com/"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Geode-solutions/OpenGeodeWeb-Front.git"
|
|
18
|
+
},
|
|
4
19
|
"type": "module",
|
|
5
|
-
"version": "10.4.0-rc.1",
|
|
6
20
|
"main": "./nuxt.config.js",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
7
24
|
"scripts": {
|
|
8
25
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
|
9
26
|
"test": "npm run test:unit",
|
|
@@ -31,7 +48,8 @@
|
|
|
31
48
|
"nuxt": "4.2.2",
|
|
32
49
|
"p-timeout": "7.0.1",
|
|
33
50
|
"pinia": "3.0.4",
|
|
34
|
-
"
|
|
51
|
+
"rimraf": "6.1.3",
|
|
52
|
+
"rxjs": "7.8.2",
|
|
35
53
|
"sass": "1.87.0",
|
|
36
54
|
"semver": "7.7.1",
|
|
37
55
|
"uuid": "11.1.0",
|
|
@@ -70,22 +88,5 @@
|
|
|
70
88
|
},
|
|
71
89
|
"overrides": {
|
|
72
90
|
"vue": "latest"
|
|
73
|
-
},
|
|
74
|
-
"repository": {
|
|
75
|
-
"type": "git",
|
|
76
|
-
"url": "git+https://github.com/Geode-solutions/OpenGeodeWeb-Front.git"
|
|
77
|
-
},
|
|
78
|
-
"author": {
|
|
79
|
-
"name": "Geode-solutions",
|
|
80
|
-
"email": "contact@geode-solutions.com",
|
|
81
|
-
"url": "https://geode-solutions.com/"
|
|
82
|
-
},
|
|
83
|
-
"license": "MIT",
|
|
84
|
-
"bugs": {
|
|
85
|
-
"url": "https://github.com/Geode-solutions/OpenGeodeWeb-Front/issues"
|
|
86
|
-
},
|
|
87
|
-
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
88
|
-
"publishConfig": {
|
|
89
|
-
"access": "public"
|
|
90
91
|
}
|
|
91
92
|
}
|