@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.
@@ -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
- fs.rmSync(data_folder_path, { recursive: true, force: true })
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: 500,
214
+ milliseconds: 5000,
213
215
  message: "Failed to kill back",
214
216
  })
215
217
  }
216
218
 
217
219
  function kill_viewer(viewer_port) {
218
- async function do_kill() {
219
- const socket = new WebSocket(`ws://localhost:${viewer_port}/ws`)
220
- try {
221
- await once(socket, "open")
222
- console.log("Connected to WebSocket server")
223
- socket.send(
224
- JSON.stringify({
225
- id: "system:hello",
226
- method: "wslink.hello",
227
- args: [{ secret: "wslink-secret" }],
228
- }),
229
- )
230
-
231
- for await (const [data] of on(socket, "message")) {
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: viewer_schemas.opengeodeweb_viewer.kill.$id,
239
- method: viewer_schemas.opengeodeweb_viewer.kill.$id,
239
+ id: "application.exit",
240
+ method: "application.exit",
240
241
  }),
241
242
  )
242
- break
243
+ socket.close()
244
+ resolve()
243
245
  }
244
- }
245
- await once(socket, "close")
246
- console.log("Disconnected from WebSocket server")
247
- } catch (error) {
248
- console.error("WebSocket error:", error)
249
- } finally {
250
- if (socket.readyState === WebSocket.OPEN) {
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: 500,
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
- "rxjs": "^7.8.2",
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
  }
@@ -5,4 +5,4 @@
5
5
  # pip-compile --output-file=tests/integration/microservices/back/requirements.txt tests/integration/microservices/back/requirements.in
6
6
  #
7
7
 
8
- opengeodeweb-back==6.*,>=6.1.3
8
+ opengeodeweb-back==6.*,>=6.1.4rc1