@geode/opengeodeweb-front 10.27.0-rc.5 → 10.27.0-rc.7

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.
@@ -39,8 +39,7 @@ function killHttpMicroservice(microservice) {
39
39
  const failMessage = `Failed to kill ${microservice.name}`;
40
40
  async function do_kill() {
41
41
  try {
42
- const fetchFunc = typeof $fetch === "undefined" ? fetch : $fetch;
43
- await fetchFunc(microservice.url, {
42
+ await fetch(microservice.url, {
44
43
  method: microservice.method,
45
44
  });
46
45
  } catch (error) {
@@ -7,18 +7,13 @@ import path from "node:path";
7
7
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" with { type: "json" };
8
8
 
9
9
  // Local imports
10
- import { commandExistsSync, getAvailablePort, waitForReady } from "./scripts.js";
10
+ import { getAvailablePort, waitForReady } from "./scripts.js";
11
11
  import { microservicesMetadatasPath, projectMicroservices } from "./cleanup.js";
12
12
  import { executablePath } from "./path.js";
13
13
 
14
14
  const MILLISECONDS_PER_SECOND = 1000;
15
15
  const DEFAULT_TIMEOUT_SECONDS = 30;
16
16
 
17
- function resolveCommand(execPath, execName) {
18
- const command = commandExistsSync(execName) ? execName : executablePath(execPath, execName);
19
- return command;
20
- }
21
-
22
17
  async function runScript(
23
18
  execPath,
24
19
  execName,
@@ -26,7 +21,7 @@ async function runScript(
26
21
  expectedResponse,
27
22
  timeoutSeconds = DEFAULT_TIMEOUT_SECONDS,
28
23
  ) {
29
- const command = resolveCommand(execPath, execName);
24
+ const command = executablePath(execPath, execName);
30
25
  console.log("runScript", command, args);
31
26
 
32
27
  const child = child_process.spawn(command, args, {
@@ -69,7 +64,7 @@ async function runBack(execName, execPath, args = {}) {
69
64
  const backArgs = [
70
65
  "--port",
71
66
  String(port),
72
- "--data_folder_path",
67
+ "--project_folder_path",
73
68
  projectFolderPath,
74
69
  "--upload_folder_path",
75
70
  uploadFolderPath,
@@ -95,7 +90,7 @@ async function runViewer(execName, execPath, args = {}) {
95
90
  const viewerArgs = [
96
91
  "--port",
97
92
  String(port),
98
- "--data_folder_path",
93
+ "--project_folder_path",
99
94
  projectFolderPath,
100
95
  "--timeout",
101
96
  "0",
@@ -9,25 +9,31 @@ import { v4 as uuidv4 } from "uuid";
9
9
 
10
10
  // Local imports
11
11
  import { appMode } from "./app_mode.js";
12
+ import { commandExistsSync } from "./scripts.js";
12
13
 
13
14
  function executablePath(execPath, execName) {
15
+ const osExecutableName = executableName(execName);
14
16
  const resourcesPath = process.env.RESOURCES_PATH;
15
17
  const mode = process.env.MODE;
16
18
  const nodeEnv = process.env.NODE_ENV;
17
19
  console.log("[executablePath]", { execPath, execName, mode, nodeEnv, resourcesPath });
18
20
  if (mode === appMode.DESKTOP && nodeEnv === "production") {
19
- const execPathInResources = path.join(resourcesPath, executableName(execName));
21
+ const execPathInResources = path.join(resourcesPath, osExecutableName);
20
22
  if (fs.existsSync(execPathInResources)) {
21
23
  console.log(`[executablePath] Found executable in resources path: ${execPathInResources}`);
22
24
  return execPathInResources;
23
25
  }
24
26
  }
25
- const localExecPath = path.join(execPath, executableName(execName));
27
+ const localExecPath = path.join(execPath, osExecutableName);
26
28
  if (fs.existsSync(localExecPath)) {
27
29
  console.log(`[executablePath] Found executable in local path: ${localExecPath}`);
28
30
  return localExecPath;
29
31
  }
30
- throw new Error(`Executable not found: ${execName}`);
32
+ if (commandExistsSync(osExecutableName)) {
33
+ console.log(`[executablePath] Found executable in PATH: ${osExecutableName}`);
34
+ return osExecutableName;
35
+ }
36
+ throw new Error(`Executable not found: ${osExecutableName}`);
31
37
  }
32
38
 
33
39
  function executableName(execName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.27.0-rc.5",
3
+ "version": "10.27.0-rc.7",
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": {
@@ -20,7 +20,7 @@ async function artifactImage(registry, parent, repo) {
20
20
  name,
21
21
  });
22
22
  const artifactRegistry = `europe-west9-docker.pkg.dev/${projectId}/github`;
23
- const digest = response.data.version.split("/").pop();
23
+ const digest = response.project.version.split("/").pop();
24
24
  const image = `${artifactRegistry}/${repo}@${digest}`;
25
25
  console.log("Found image for", repo, image);
26
26
  return image;
@@ -48,8 +48,8 @@ function requestConfig(parent, routerImage, backImage, viewerImage) {
48
48
  },
49
49
  };
50
50
  const volumeMounts = {
51
- name: "data",
52
- mountPath: "/data",
51
+ name: "project",
52
+ mountPath: "/project",
53
53
  };
54
54
  return {
55
55
  parent,
@@ -63,7 +63,7 @@ function requestConfig(parent, routerImage, backImage, viewerImage) {
63
63
  template: {
64
64
  volumes: [
65
65
  {
66
- name: "data",
66
+ name: "project",
67
67
  emptyDir: {
68
68
  medium: "MEMORY",
69
69
  },