@geode/opengeodeweb-front 10.7.0 → 10.8.0-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.
@@ -19,7 +19,7 @@ async function registerRunningExtensions() {
19
19
 
20
20
  return Promise.all(
21
21
  extensionsArray.map(async (extension) => {
22
- const { name, version, frontendContent, port } = extension;
22
+ const { id, name, version, frontendContent, port } = extension;
23
23
  const blob = new Blob([frontendContent], {
24
24
  type: "application/javascript",
25
25
  });
@@ -36,4 +36,23 @@ function generateProjectFolderPath(projectName) {
36
36
  return path.join(os.tmpdir(), projectName.replaceAll("/", "_"), uuidv4());
37
37
  }
38
38
 
39
- export { createPath, executablePath, executableName, generateProjectFolderPath };
39
+ function extensionFrontendPath(unzippedExtensionPath, frontendFile, rootPath, extensionId) {
40
+ if (process.env.NODE_ENV === "production") {
41
+ return path.join(unzippedExtensionPath, frontendFile);
42
+ }
43
+ const extentionRepoName = extensionId
44
+ .split("-")
45
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
46
+ .join("-");
47
+ const localExtensionPath = path.join(rootPath, "..", extentionRepoName, "dist", frontendFile);
48
+ console.log("runExtensions", { localExtensionPath });
49
+ return localExtensionPath;
50
+ }
51
+
52
+ export {
53
+ createPath,
54
+ extensionFrontendPath,
55
+ executablePath,
56
+ executableName,
57
+ generateProjectFolderPath,
58
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.7.0",
3
+ "version": "10.8.0-rc.1",
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": {
@@ -34,8 +34,8 @@
34
34
  "build": ""
35
35
  },
36
36
  "dependencies": {
37
- "@geode/opengeodeweb-back": "latest",
38
- "@geode/opengeodeweb-viewer": "latest",
37
+ "@geode/opengeodeweb-back": "next",
38
+ "@geode/opengeodeweb-viewer": "next",
39
39
  "@kitware/vtk.js": "33.3.0",
40
40
  "@mdi/font": "7.4.47",
41
41
  "@pinia/nuxt": "0.11.3",
@@ -10,6 +10,7 @@ import {
10
10
  addMicroserviceMetadatas,
11
11
  runBack,
12
12
  } from "@geode/opengeodeweb-front/app/utils/local/microservices.js";
13
+ import { extensionFrontendPath } from "@geode/opengeodeweb-front/app/utils/local/path.js";
13
14
  import { extensionsConf } from "@geode/opengeodeweb-front/app/utils/config.js";
14
15
  import { unzipFile } from "@geode/opengeodeweb-front/app/utils/server.js";
15
16
 
@@ -56,8 +57,14 @@ export default defineEventHandler(async (event) => {
56
57
  });
57
58
  }
58
59
 
59
- const frontendFilePath = path.join(unzippedExtensionPath, frontendFile);
60
+ const frontendFilePath = extensionFrontendPath(
61
+ projectFolderPath,
62
+ frontendFile,
63
+ path.resolve(),
64
+ id,
65
+ );
60
66
  const frontendContent = await fs.promises.readFile(frontendFilePath, "utf8");
67
+
61
68
  const backendExecutablePath = path.join(unzippedExtensionPath, backendExecutable);
62
69
  fs.chmodSync(backendExecutablePath, "755");
63
70
  const port = await runBack(backendExecutable, backendExecutablePath, {