@geode/opengeodeweb-front 9.12.1 → 9.12.2-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/package.json
CHANGED
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "9.12.1",
|
|
43
|
+
"version": "9.12.2-rc.1",
|
|
44
44
|
"main": "./nuxt.config.js",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@geode/opengeodeweb-back": "
|
|
47
|
-
"@geode/opengeodeweb-viewer": "
|
|
46
|
+
"@geode/opengeodeweb-back": "next",
|
|
47
|
+
"@geode/opengeodeweb-viewer": "next",
|
|
48
48
|
"@kitware/vtk.js": "33.3.0",
|
|
49
49
|
"@mdi/font": "7.4.47",
|
|
50
50
|
"@pinia/nuxt": "0.5.4",
|
|
@@ -42,20 +42,16 @@ async function setupIntegrationTests(file_name, geode_object, object_type) {
|
|
|
42
42
|
const microservices_path = path.join("tests", "integration", "microservices")
|
|
43
43
|
const project_folder_path = path.join(__dirname, "data", uuidv4())
|
|
44
44
|
const upload_folder_path = path.join(__dirname, "data", "uploads")
|
|
45
|
-
const back_path = path.join(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
)
|
|
49
|
-
const viewer_path = path.join(
|
|
50
|
-
executable_path(path.join(microservices_path, "viewer")),
|
|
51
|
-
executable_name("opengeodeweb-viewer"),
|
|
52
|
-
)
|
|
45
|
+
const back_path = executable_path(path.join(microservices_path, "back"))
|
|
46
|
+
const back_name = executable_name("opengeodeweb-back")
|
|
47
|
+
const viewer_path = executable_path(path.join(microservices_path, "viewer"))
|
|
48
|
+
const viewer_name = executable_name("opengeodeweb-viewer")
|
|
53
49
|
const [back_port, viewer_port] = await Promise.all([
|
|
54
|
-
run_back(back_path, {
|
|
50
|
+
run_back(back_name, back_path, {
|
|
55
51
|
project_folder_path: project_folder_path,
|
|
56
52
|
upload_folder_path: upload_folder_path,
|
|
57
53
|
}),
|
|
58
|
-
run_viewer(viewer_path, {
|
|
54
|
+
run_viewer(viewer_name, viewer_path, {
|
|
59
55
|
project_folder_path: project_folder_path,
|
|
60
56
|
}),
|
|
61
57
|
])
|
package/utils/local.js
CHANGED
|
@@ -57,8 +57,17 @@ function get_available_port() {
|
|
|
57
57
|
})
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
function commandExistsSync(executable_name) {
|
|
61
|
+
const envPath = process.env.PATH || ""
|
|
62
|
+
return envPath.split(path.delimiter).some((dir) => {
|
|
63
|
+
const filePath = path.join(dir, executable_name)
|
|
64
|
+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile()
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
async function run_script(
|
|
61
|
-
|
|
69
|
+
executable_name,
|
|
70
|
+
executable_path,
|
|
62
71
|
args,
|
|
63
72
|
expected_response,
|
|
64
73
|
timeout_seconds = 30,
|
|
@@ -68,6 +77,10 @@ async function run_script(
|
|
|
68
77
|
reject("Timed out after " + timeout_seconds + " seconds")
|
|
69
78
|
}, timeout_seconds * 1000)
|
|
70
79
|
|
|
80
|
+
const command = commandExistsSync(executable_name)
|
|
81
|
+
? executable_name
|
|
82
|
+
: path.join(executable_path, executable_name)
|
|
83
|
+
console.log("run_script", command, args)
|
|
71
84
|
const child = child_process.spawn(command, args, {
|
|
72
85
|
encoding: "utf8",
|
|
73
86
|
shell: true,
|
|
@@ -109,7 +122,8 @@ async function run_script(
|
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
async function run_back(
|
|
112
|
-
|
|
125
|
+
executable_name,
|
|
126
|
+
executable_path,
|
|
113
127
|
args = {
|
|
114
128
|
project_folder_path,
|
|
115
129
|
upload_folder_path: undefined,
|
|
@@ -128,13 +142,22 @@ async function run_back(
|
|
|
128
142
|
"--allowed_origin http://localhost:*",
|
|
129
143
|
"--timeout " + 0,
|
|
130
144
|
]
|
|
131
|
-
console.log("run_back",
|
|
132
|
-
await run_script(
|
|
145
|
+
console.log("run_back", executable_name, executable_path, back_args)
|
|
146
|
+
await run_script(
|
|
147
|
+
executable_name,
|
|
148
|
+
executable_path,
|
|
149
|
+
back_args,
|
|
150
|
+
"Serving Flask app",
|
|
151
|
+
)
|
|
133
152
|
resolve(port)
|
|
134
153
|
})
|
|
135
154
|
}
|
|
136
155
|
|
|
137
|
-
async function run_viewer(
|
|
156
|
+
async function run_viewer(
|
|
157
|
+
executable_name,
|
|
158
|
+
executable_path,
|
|
159
|
+
args = { project_folder_path },
|
|
160
|
+
) {
|
|
138
161
|
return new Promise(async (resolve, reject) => {
|
|
139
162
|
const port = await get_available_port()
|
|
140
163
|
const viewer_args = [
|
|
@@ -142,8 +165,13 @@ async function run_viewer(command, args = { project_folder_path }) {
|
|
|
142
165
|
"--data_folder_path " + args.project_folder_path,
|
|
143
166
|
"--timeout " + 0,
|
|
144
167
|
]
|
|
145
|
-
console.log("run_viewer",
|
|
146
|
-
await run_script(
|
|
168
|
+
console.log("run_viewer", executable_name, executable_path, viewer_args)
|
|
169
|
+
await run_script(
|
|
170
|
+
executable_name,
|
|
171
|
+
executable_path,
|
|
172
|
+
viewer_args,
|
|
173
|
+
"Starting factory",
|
|
174
|
+
)
|
|
147
175
|
resolve(port)
|
|
148
176
|
})
|
|
149
177
|
}
|
|
@@ -224,19 +252,27 @@ function kill_viewer(viewer_port) {
|
|
|
224
252
|
async function run_browser(
|
|
225
253
|
script_name,
|
|
226
254
|
microservices_options = {
|
|
227
|
-
back: {
|
|
228
|
-
viewer: {
|
|
255
|
+
back: { executable_name, executable_path, args: { project_folder_path } },
|
|
256
|
+
viewer: { executable_name, executable_path, args: { project_folder_path } },
|
|
229
257
|
},
|
|
230
258
|
) {
|
|
231
259
|
console.log("microservices_options", microservices_options)
|
|
232
|
-
const back_promise = run_back(
|
|
233
|
-
|
|
234
|
-
|
|
260
|
+
const back_promise = run_back(
|
|
261
|
+
microservices_options.back.executable_name,
|
|
262
|
+
microservices_options.back.executable_path,
|
|
263
|
+
{
|
|
264
|
+
...microservices_options.back.args,
|
|
265
|
+
},
|
|
266
|
+
)
|
|
235
267
|
console.log("back_promise", back_promise)
|
|
236
268
|
|
|
237
|
-
const viewer_promise = run_viewer(
|
|
238
|
-
|
|
239
|
-
|
|
269
|
+
const viewer_promise = run_viewer(
|
|
270
|
+
microservices_options.viewer.executable_name,
|
|
271
|
+
microservices_options.viewer.executable_path,
|
|
272
|
+
{
|
|
273
|
+
...microservices_options.viewer.args,
|
|
274
|
+
},
|
|
275
|
+
)
|
|
240
276
|
console.log("viewer_promise", viewer_promise)
|
|
241
277
|
|
|
242
278
|
const [back_port, viewer_port] = await Promise.all([
|