@geode/opengeodeweb-front 10.6.2 → 10.6.3-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.
Files changed (235) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/.oxlintrc.json +3 -22
  3. package/app/assets/geode_objects.js +26 -26
  4. package/app/components/Carousel.vue +62 -66
  5. package/app/components/CrsSelector.vue +48 -52
  6. package/app/components/DeleteDialog.vue +21 -37
  7. package/app/components/DragAndDrop.vue +35 -41
  8. package/app/components/ExtensionSelector.vue +50 -63
  9. package/app/components/FeedBack/ErrorBanner.vue +7 -10
  10. package/app/components/FeedBack/Snackers.vue +12 -14
  11. package/app/components/FetchingData.vue +1 -6
  12. package/app/components/FileSelector.vue +41 -47
  13. package/app/components/FileUploader.vue +62 -79
  14. package/app/components/GlassCard.vue +19 -19
  15. package/app/components/HybridRenderingView.vue +37 -38
  16. package/app/components/InfraConnected.vue +3 -3
  17. package/app/components/Inspector/InspectionButton.vue +27 -31
  18. package/app/components/Inspector/ResultPanel.vue +13 -24
  19. package/app/components/Launcher.vue +13 -13
  20. package/app/components/Loading.vue +63 -69
  21. package/app/components/MissingFilesSelector.vue +53 -73
  22. package/app/components/ObjectSelector.vue +81 -99
  23. package/app/components/PackagesVersions.vue +27 -30
  24. package/app/components/Recaptcha.vue +60 -71
  25. package/app/components/RemoteRenderingView.vue +102 -108
  26. package/app/components/Screenshot.vue +36 -42
  27. package/app/components/SearchBar.vue +5 -5
  28. package/app/components/Step.vue +37 -44
  29. package/app/components/Stepper.vue +29 -35
  30. package/app/components/VeaseViewToolbar.vue +69 -78
  31. package/app/components/ViewToolbar.vue +41 -45
  32. package/app/components/Viewer/BreadCrumb.vue +18 -30
  33. package/app/components/Viewer/ContextMenu.vue +176 -179
  34. package/app/components/Viewer/ContextMenuItem.vue +105 -117
  35. package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
  36. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
  37. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
  38. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
  39. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
  40. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
  41. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
  42. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
  43. package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
  44. package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
  45. package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
  46. package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
  47. package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
  48. package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
  49. package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
  50. package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
  51. package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
  52. package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
  53. package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
  54. package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
  55. package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
  56. package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
  57. package/app/components/Viewer/Options/ColorMapList.vue +115 -140
  58. package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
  59. package/app/components/Viewer/Options/ColorPicker.vue +9 -9
  60. package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
  61. package/app/components/Viewer/Options/TextureItem.vue +54 -58
  62. package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
  63. package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
  64. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
  65. package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
  66. package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
  67. package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
  68. package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
  69. package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
  70. package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
  71. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
  72. package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
  73. package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
  74. package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
  75. package/app/components/Viewer/TreeComponent.vue +43 -49
  76. package/app/components/Viewer/TreeObject.vue +48 -50
  77. package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
  78. package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
  79. package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
  80. package/app/components/Wrapper.vue +8 -8
  81. package/app/components/ZScaling.vue +18 -27
  82. package/app/composables/project_manager.js +57 -67
  83. package/app/composables/run_function_when_microservices_connected.js +8 -8
  84. package/app/plugins/auto_store_register.js +11 -13
  85. package/app/stores/app.js +118 -138
  86. package/app/stores/data.js +52 -68
  87. package/app/stores/data_style.js +36 -36
  88. package/app/stores/feedback.js +17 -20
  89. package/app/stores/geode.js +54 -55
  90. package/app/stores/hybrid_viewer.js +164 -177
  91. package/app/stores/infra.js +45 -55
  92. package/app/stores/lambda.js +26 -26
  93. package/app/stores/menu.js +78 -85
  94. package/app/stores/treeview.js +57 -65
  95. package/app/stores/viewer.js +92 -104
  96. package/app/utils/colormap.js +3 -3
  97. package/app/utils/config.js +16 -22
  98. package/app/utils/default_styles.js +50 -62
  99. package/app/utils/extension.js +44 -44
  100. package/app/utils/file_import_workflow.js +50 -64
  101. package/app/utils/local/app_mode.js +2 -2
  102. package/app/utils/local/cleanup.js +66 -72
  103. package/app/utils/local/microservices.js +61 -71
  104. package/app/utils/local/path.js +16 -19
  105. package/app/utils/local/scripts.js +22 -22
  106. package/app/utils/recaptcha.js +6 -6
  107. package/app/utils/server.js +21 -24
  108. package/app/utils/status.js +2 -2
  109. package/app/utils/treeview.js +4 -4
  110. package/app/utils/validate_schema.js +7 -7
  111. package/commitlint.config.js +2 -2
  112. package/eslint.config.js +4 -4
  113. package/internal/database/database.js +38 -46
  114. package/internal/database/extended_database.js +9 -10
  115. package/internal/database/tables/data.js +2 -3
  116. package/internal/database/tables/model_components.js +1 -1
  117. package/internal/database/tables/model_components_relation.js +1 -1
  118. package/internal/stores/data_style/mesh/cells/cell.js +47 -63
  119. package/internal/stores/data_style/mesh/cells/color.js +11 -16
  120. package/internal/stores/data_style/mesh/cells/common.js +6 -6
  121. package/internal/stores/data_style/mesh/cells/index.js +37 -47
  122. package/internal/stores/data_style/mesh/cells/textures.js +11 -12
  123. package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
  124. package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
  125. package/internal/stores/data_style/mesh/edges/color.js +11 -16
  126. package/internal/stores/data_style/mesh/edges/common.js +6 -6
  127. package/internal/stores/data_style/mesh/edges/edge.js +47 -63
  128. package/internal/stores/data_style/mesh/edges/index.js +38 -52
  129. package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
  130. package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
  131. package/internal/stores/data_style/mesh/edges/width.js +11 -16
  132. package/internal/stores/data_style/mesh/index.js +34 -34
  133. package/internal/stores/data_style/mesh/points/color.js +11 -16
  134. package/internal/stores/data_style/mesh/points/common.js +6 -6
  135. package/internal/stores/data_style/mesh/points/index.js +35 -49
  136. package/internal/stores/data_style/mesh/points/size.js +11 -16
  137. package/internal/stores/data_style/mesh/points/vertex.js +47 -58
  138. package/internal/stores/data_style/mesh/points/visibility.js +11 -16
  139. package/internal/stores/data_style/mesh/polygons/color.js +11 -16
  140. package/internal/stores/data_style/mesh/polygons/common.js +6 -6
  141. package/internal/stores/data_style/mesh/polygons/index.js +36 -45
  142. package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
  143. package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
  144. package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
  145. package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
  146. package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
  147. package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
  148. package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
  149. package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
  150. package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
  151. package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
  152. package/internal/stores/data_style/model/blocks/color.js +21 -24
  153. package/internal/stores/data_style/model/blocks/common.js +6 -6
  154. package/internal/stores/data_style/model/blocks/index.js +13 -17
  155. package/internal/stores/data_style/model/blocks/visibility.js +21 -24
  156. package/internal/stores/data_style/model/corners/color.js +21 -24
  157. package/internal/stores/data_style/model/corners/common.js +6 -6
  158. package/internal/stores/data_style/model/corners/index.js +14 -18
  159. package/internal/stores/data_style/model/corners/visibility.js +21 -25
  160. package/internal/stores/data_style/model/edges/common.js +4 -4
  161. package/internal/stores/data_style/model/edges/index.js +7 -7
  162. package/internal/stores/data_style/model/edges/visibility.js +11 -15
  163. package/internal/stores/data_style/model/index.js +84 -100
  164. package/internal/stores/data_style/model/lines/color.js +21 -24
  165. package/internal/stores/data_style/model/lines/common.js +6 -6
  166. package/internal/stores/data_style/model/lines/index.js +13 -17
  167. package/internal/stores/data_style/model/lines/visibility.js +21 -24
  168. package/internal/stores/data_style/model/points/common.js +4 -4
  169. package/internal/stores/data_style/model/points/index.js +9 -9
  170. package/internal/stores/data_style/model/points/size.js +11 -11
  171. package/internal/stores/data_style/model/points/visibility.js +11 -15
  172. package/internal/stores/data_style/model/surfaces/color.js +21 -24
  173. package/internal/stores/data_style/model/surfaces/common.js +6 -6
  174. package/internal/stores/data_style/model/surfaces/index.js +14 -22
  175. package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
  176. package/internal/stores/data_style/state.js +11 -11
  177. package/internal/utils/api_fetch.js +24 -34
  178. package/internal/utils/upload_file.js +19 -24
  179. package/internal/utils/viewer_call.js +23 -36
  180. package/nuxt.config.js +7 -11
  181. package/package.json +3 -3
  182. package/scripts/generate_geode_objects.js +14 -16
  183. package/server/api/app/kill.post.js +4 -4
  184. package/server/api/app/project_folder_path.post.js +11 -11
  185. package/server/api/app/run_back.post.js +12 -12
  186. package/server/api/app/run_viewer.post.js +12 -12
  187. package/server/api/extensions/run.post.js +34 -41
  188. package/server/api/extensions/upload.put.js +48 -62
  189. package/tests/integration/setup.js +43 -53
  190. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
  191. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
  192. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
  193. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
  194. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
  195. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
  196. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
  197. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
  198. package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
  199. package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
  200. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
  201. package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
  202. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
  203. package/tests/integration/stores/viewer.nuxt.test.js +35 -38
  204. package/tests/setup_indexeddb.js +2 -2
  205. package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
  206. package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
  207. package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
  208. package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
  209. package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
  210. package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
  211. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
  212. package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
  213. package/tests/unit/components/Launcher.nuxt.test.js +20 -22
  214. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
  215. package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
  216. package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
  217. package/tests/unit/components/Step.nuxt.test.js +18 -19
  218. package/tests/unit/components/Stepper.nuxt.test.js +18 -18
  219. package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
  220. package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
  221. package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
  222. package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
  223. package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
  224. package/tests/unit/stores/app.nuxt.test.js +90 -92
  225. package/tests/unit/stores/feedback.nuxt.test.js +47 -57
  226. package/tests/unit/stores/geode.nuxt.test.js +111 -115
  227. package/tests/unit/stores/infra.nuxt.test.js +148 -148
  228. package/tests/unit/stores/lambda.nuxt.test.js +72 -74
  229. package/tests/unit/stores/treeview.nuxt.test.js +19 -21
  230. package/tests/unit/stores/viewer.nuxt.test.js +109 -122
  231. package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
  232. package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
  233. package/tests/utils.js +11 -11
  234. package/tests/vitest.config.js +9 -9
  235. package/vuetify_config.js +2 -2
@@ -1,55 +1,50 @@
1
- import { useFeedbackStore } from "@ogw_front/stores/feedback.js"
1
+ import { useFeedbackStore } from "@ogw_front/stores/feedback.js";
2
2
 
3
3
  async function upload_file(
4
4
  microservice,
5
5
  { route, file },
6
6
  { request_error_function, response_function, response_error_function } = {},
7
7
  ) {
8
- console.log("[UPLOAD_FILE] Uploading file", { route, file })
9
- const feedbackStore = useFeedbackStore()
8
+ console.log("[UPLOAD_FILE] Uploading file", { route, file });
9
+ const feedbackStore = useFeedbackStore();
10
10
  if (!(file instanceof File)) {
11
- throw new Error("file must be a instance of File")
11
+ throw new Error("file must be a instance of File");
12
12
  }
13
13
 
14
- const body = new FormData()
15
- body.append("file", file)
14
+ const body = new FormData();
15
+ body.append("file", file);
16
16
 
17
17
  const request_options = {
18
18
  method: "PUT",
19
19
  body: body,
20
- }
21
- microservice.start_request()
22
- return $fetch(route, {
20
+ };
21
+ microservice.start_request();
22
+ return await $fetch(route, {
23
23
  baseURL: microservice.base_url || "",
24
24
  ...request_options,
25
25
  onRequestError({ error }) {
26
- microservice.stop_request()
27
- feedbackStore.add_error(error.code, route, error.message, error.stack)
26
+ microservice.stop_request();
27
+ feedbackStore.add_error(error.code, route, error.message, error.stack);
28
28
  if (request_error_function) {
29
- request_error_function(error)
29
+ request_error_function(error);
30
30
  }
31
31
  },
32
32
  onResponse({ response }) {
33
33
  if (response.ok) {
34
- microservice.stop_request()
34
+ microservice.stop_request();
35
35
  if (response_function) {
36
- response_function(response)
36
+ response_function(response);
37
37
  }
38
38
  }
39
39
  },
40
40
  onResponseError({ response }) {
41
- microservice.stop_request()
42
- feedbackStore.add_error(
43
- response.status,
44
- route,
45
- response.name,
46
- response.description,
47
- )
41
+ microservice.stop_request();
42
+ feedbackStore.add_error(response.status, route, response.name, response.description);
48
43
  if (response_error_function) {
49
- response_error_function(response)
44
+ response_error_function(response);
50
45
  }
51
46
  },
52
- })
47
+ });
53
48
  }
54
49
 
55
- export { upload_file }
50
+ export { upload_file };
@@ -1,64 +1,51 @@
1
- import pTimeout from "p-timeout"
2
- import { useFeedbackStore } from "@ogw_front/stores/feedback"
3
- import { validate_schema } from "@ogw_front/utils/validate_schema"
1
+ import pTimeout from "p-timeout";
2
+ import { useFeedbackStore } from "@ogw_front/stores/feedback";
3
+ import { validate_schema } from "@ogw_front/utils/validate_schema";
4
4
 
5
- const ERROR_400 = 400
5
+ const ERROR_400 = 400;
6
6
 
7
7
  export async function viewer_call(
8
8
  microservice,
9
9
  { schema, params = {} },
10
- {
11
- request_error_function,
12
- response_function,
13
- response_error_function,
14
- timeout,
15
- } = {},
10
+ { request_error_function, response_function, response_error_function, timeout } = {},
16
11
  ) {
17
- const feedbackStore = useFeedbackStore()
12
+ const feedbackStore = useFeedbackStore();
18
13
 
19
- const { valid, error: schema_error } = validate_schema(schema, params)
14
+ const { valid, error: schema_error } = validate_schema(schema, params);
20
15
 
21
16
  if (!valid) {
22
17
  if (process.env.NODE_ENV !== "production") {
23
- console.log("Bad request", schema_error, schema, params)
18
+ console.log("Bad request", schema_error, schema, params);
24
19
  }
25
- feedbackStore.add_error(ERROR_400, schema.$id, "Bad request", schema_error)
26
- throw new Error(`${schema.$id}: ${schema_error}`)
20
+ feedbackStore.add_error(ERROR_400, schema.$id, "Bad request", schema_error);
21
+ throw new Error(`${schema.$id}: ${schema_error}`);
27
22
  }
28
23
 
29
- const { client } = microservice
24
+ const { client } = microservice;
30
25
 
31
26
  async function performCall() {
32
27
  if (!client.getConnection) {
33
- return
28
+ return;
34
29
  }
35
- microservice.start_request()
30
+ microservice.start_request();
36
31
 
37
32
  try {
38
- const value = await client
39
- .getConnection()
40
- .getSession()
41
- .call(schema.$id, [params])
33
+ const value = await client.getConnection().getSession().call(schema.$id, [params]);
42
34
  if (response_function) {
43
- response_function(value)
35
+ response_function(value);
44
36
  }
45
- return value
37
+ return value;
46
38
  } catch (error) {
47
- feedbackStore.add_error(
48
- error.code,
49
- schema.$id,
50
- error.message,
51
- error.message,
52
- )
39
+ feedbackStore.add_error(error.code, schema.$id, error.message, error.message);
53
40
  if (request_error_function) {
54
- request_error_function(error)
41
+ request_error_function(error);
55
42
  }
56
43
  if (response_error_function) {
57
- response_error_function(error)
44
+ response_error_function(error);
58
45
  }
59
- throw error
46
+ throw error;
60
47
  } finally {
61
- microservice.stop_request()
48
+ microservice.stop_request();
62
49
  }
63
50
  }
64
51
 
@@ -66,8 +53,8 @@ export async function viewer_call(
66
53
  return await pTimeout(performCall(), {
67
54
  milliseconds: timeout,
68
55
  message: `${schema.$id}: Timed out after ${timeout}ms`,
69
- })
56
+ });
70
57
  }
71
58
 
72
- return await performCall()
59
+ return await performCall();
73
60
  }
package/nuxt.config.js CHANGED
@@ -1,11 +1,11 @@
1
1
  // Node imports
2
- import path, { dirname } from "node:path"
3
- import { fileURLToPath } from "node:url"
2
+ import path, { dirname } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
4
 
5
5
  // Local imports
6
- import package_json from "./package.json"
6
+ import package_json from "./package.json";
7
7
 
8
- const __dirname = dirname(fileURLToPath(import.meta.url))
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
 
10
10
  export default defineNuxtConfig({
11
11
  runtimeConfig: {
@@ -16,15 +16,11 @@ export default defineNuxtConfig({
16
16
  NUXT_ROOT_PATH: __dirname,
17
17
  MODE: process.env.MODE || "CLOUD",
18
18
  PROJECT: package_json.name,
19
- SITE_BRANCH:
20
- process.env.NODE_ENV === "production" ? process.env.SITE_BRANCH : "",
19
+ SITE_BRANCH: process.env.NODE_ENV === "production" ? process.env.SITE_BRANCH : "",
21
20
  },
22
21
  },
23
22
 
24
- modules: [
25
- ["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }],
26
- "@vueuse/nuxt",
27
- ],
23
+ modules: [["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }], "@vueuse/nuxt"],
28
24
  imports: {
29
25
  scan: false,
30
26
  },
@@ -62,4 +58,4 @@ export default defineNuxtConfig({
62
58
  ],
63
59
  },
64
60
  },
65
- })
61
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.6.2",
3
+ "version": "10.6.3-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",
@@ -1,26 +1,24 @@
1
1
  /* oxlint-disable vitest/require-hook */
2
- import fs from "node:fs"
3
- import path from "node:path"
4
- import process from "node:process"
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ import process from "node:process";
5
5
 
6
- const output_file = path.join(process.cwd(), "assets/geode_objects")
6
+ const output_file = path.join(process.cwd(), "assets/geode_objects");
7
7
 
8
8
  if (fs.existsSync(output_file)) {
9
- fs.unlinkSync(output_file)
9
+ fs.unlinkSync(output_file);
10
10
  }
11
11
 
12
- const files = fs.readdirSync("assets/img/geode_objects/")
13
- let imports = ""
14
- let geode_objects = "const geode_objects = {"
12
+ const files = fs.readdirSync("assets/img/geode_objects/");
13
+ let imports = "";
14
+ let geode_objects = "const geode_objects = {";
15
15
 
16
16
  for (const file of files) {
17
- const geode_object = file.replace(".svg", "")
18
- imports +=
19
- `import ${geode_object} from "@ogw_front/assets/img/geode_objects/${file}"` +
20
- "\n"
21
- geode_objects += `${geode_object}:{\n tooltip: "${geode_object}",\n image: ${geode_object},\n},\n`
17
+ const geode_object = file.replace(".svg", "");
18
+ imports += `import ${geode_object} from "@ogw_front/assets/img/geode_objects/${file}"\n`;
19
+ geode_objects += `${geode_object}:{\n tooltip: "${geode_object}",\n image: ${geode_object},\n},\n`;
22
20
  }
23
- geode_objects += "}\n\n export default geode_objects"
24
- fs.writeFileSync(output_file, `${imports}\n${geode_objects}`)
21
+ geode_objects += "}\n\n export default geode_objects";
22
+ fs.writeFileSync(output_file, `${imports}\n${geode_objects}`);
25
23
 
26
- console.log("Fichier JS créé avec succès :", output_file)
24
+ console.log("Fichier JS créé avec succès :", output_file);
@@ -1,12 +1,12 @@
1
1
  // Node imports
2
2
 
3
3
  // Third party imports
4
- import { defineEventHandler } from "h3"
4
+ import { defineEventHandler } from "h3";
5
5
 
6
6
  // Local imports
7
7
 
8
8
  export default defineEventHandler(() => {
9
- console.log("Killing node server process")
9
+ console.log("Killing node server process");
10
10
  // oxlint-disable-next-line no-process-exit
11
- process.exit()
12
- })
11
+ process.exit();
12
+ });
@@ -1,32 +1,32 @@
1
1
  // Node imports
2
2
 
3
3
  // Third party imports
4
- import { createError, defineEventHandler } from "h3"
4
+ import { createError, defineEventHandler } from "h3";
5
5
 
6
6
  // Local imports
7
7
  import {
8
8
  createPath,
9
9
  generateProjectFolderPath,
10
- } from "@geode/opengeodeweb-front/app/utils/local/path.js"
10
+ } from "@geode/opengeodeweb-front/app/utils/local/path.js";
11
11
 
12
- import { useRuntimeConfig } from "nitropack/runtime"
12
+ import { useRuntimeConfig } from "nitropack/runtime";
13
13
 
14
14
  export default defineEventHandler(async (event) => {
15
15
  try {
16
- const config = useRuntimeConfig(event).public
17
- const { PROJECT } = config
18
- const projectFolderPath = generateProjectFolderPath(PROJECT)
19
- await createPath(projectFolderPath)
16
+ const config = useRuntimeConfig(event).public;
17
+ const { PROJECT } = config;
18
+ const projectFolderPath = generateProjectFolderPath(PROJECT);
19
+ await createPath(projectFolderPath);
20
20
 
21
21
  return {
22
22
  statusCode: 200,
23
23
  projectFolderPath,
24
- }
24
+ };
25
25
  } catch (error) {
26
- console.log(error)
26
+ console.log(error);
27
27
  throw createError({
28
28
  statusCode: 500,
29
29
  statusMessage: error.message,
30
- })
30
+ });
31
31
  }
32
- })
32
+ });
@@ -1,37 +1,37 @@
1
1
  // Node imports
2
2
 
3
3
  // Third party imports
4
- import { createError, defineEventHandler, readBody } from "h3"
4
+ import { createError, defineEventHandler, readBody } from "h3";
5
5
 
6
6
  // Local imports
7
7
  import {
8
8
  addMicroserviceMetadatas,
9
9
  runBack,
10
- } from "@geode/opengeodeweb-front/app/utils/local/microservices.js"
10
+ } from "@geode/opengeodeweb-front/app/utils/local/microservices.js";
11
11
 
12
- import { useRuntimeConfig } from "nitropack/runtime"
12
+ import { useRuntimeConfig } from "nitropack/runtime";
13
13
 
14
14
  export default defineEventHandler(async (event) => {
15
15
  try {
16
- const config = useRuntimeConfig(event).public
17
- const { COMMAND_BACK, NUXT_ROOT_PATH } = config
18
- const { args } = await readBody(event)
19
- const port = await runBack(COMMAND_BACK, NUXT_ROOT_PATH, args)
16
+ const config = useRuntimeConfig(event).public;
17
+ const { COMMAND_BACK, NUXT_ROOT_PATH } = config;
18
+ const { args } = await readBody(event);
19
+ const port = await runBack(COMMAND_BACK, NUXT_ROOT_PATH, args);
20
20
  await addMicroserviceMetadatas(args.projectFolderPath, {
21
21
  type: "back",
22
22
  name: COMMAND_BACK,
23
23
  port,
24
- })
24
+ });
25
25
 
26
26
  return {
27
27
  statusCode: 200,
28
28
  port,
29
- }
29
+ };
30
30
  } catch (error) {
31
- console.log(error)
31
+ console.log(error);
32
32
  throw createError({
33
33
  statusCode: 500,
34
34
  statusMessage: error.message,
35
- })
35
+ });
36
36
  }
37
- })
37
+ });
@@ -1,37 +1,37 @@
1
1
  // Node imports
2
2
 
3
3
  // Third party imports
4
- import { createError, defineEventHandler, readBody } from "h3"
4
+ import { createError, defineEventHandler, readBody } from "h3";
5
5
 
6
6
  // Local imports
7
7
  import {
8
8
  addMicroserviceMetadatas,
9
9
  runViewer,
10
- } from "@geode/opengeodeweb-front/app/utils/local/microservices.js"
10
+ } from "@geode/opengeodeweb-front/app/utils/local/microservices.js";
11
11
 
12
- import { useRuntimeConfig } from "nitropack/runtime"
12
+ import { useRuntimeConfig } from "nitropack/runtime";
13
13
 
14
14
  export default defineEventHandler(async (event) => {
15
15
  try {
16
- const config = useRuntimeConfig(event).public
17
- const { COMMAND_VIEWER, NUXT_ROOT_PATH } = config
18
- const { args } = await readBody(event)
19
- const port = await runViewer(COMMAND_VIEWER, NUXT_ROOT_PATH, args)
16
+ const config = useRuntimeConfig(event).public;
17
+ const { COMMAND_VIEWER, NUXT_ROOT_PATH } = config;
18
+ const { args } = await readBody(event);
19
+ const port = await runViewer(COMMAND_VIEWER, NUXT_ROOT_PATH, args);
20
20
  await addMicroserviceMetadatas(args.projectFolderPath, {
21
21
  type: "viewer",
22
22
  name: COMMAND_VIEWER,
23
23
  port,
24
- })
24
+ });
25
25
 
26
26
  return {
27
27
  statusCode: 200,
28
28
  port,
29
- }
29
+ };
30
30
  } catch (error) {
31
- console.log(error)
31
+ console.log(error);
32
32
  throw createError({
33
33
  statusCode: 500,
34
34
  statusMessage: error.message,
35
- })
35
+ });
36
36
  }
37
- })
37
+ });
@@ -1,99 +1,92 @@
1
1
  // Node imports
2
- import fs from "node:fs"
3
- import path from "node:path"
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
4
 
5
5
  // Third party imports
6
- import { createError, defineEventHandler, readBody } from "h3"
6
+ import { createError, defineEventHandler, readBody } from "h3";
7
7
 
8
8
  // Local imports
9
9
  import {
10
10
  addMicroserviceMetadatas,
11
11
  runBack,
12
- } from "@geode/opengeodeweb-front/app/utils/local/microservices.js"
13
- import { extensionsConf } from "@geode/opengeodeweb-front/app/utils/config.js"
14
- import { unzipFile } from "@geode/opengeodeweb-front/app/utils/server.js"
12
+ } from "@geode/opengeodeweb-front/app/utils/local/microservices.js";
13
+ import { extensionsConf } from "@geode/opengeodeweb-front/app/utils/config.js";
14
+ import { unzipFile } from "@geode/opengeodeweb-front/app/utils/server.js";
15
15
 
16
- const CODE_200 = 200
16
+ const CODE_200 = 200;
17
17
 
18
18
  export default defineEventHandler(async (event) => {
19
19
  try {
20
- const body = await readBody(event)
21
- const { projectFolderPath, projectName } = body
22
- const extensionsConfig = extensionsConf(projectName)
20
+ const body = await readBody(event);
21
+ const { projectFolderPath, projectName } = body;
22
+ const extensionsConfig = extensionsConf(projectName);
23
23
 
24
24
  const extensionsArray = await Promise.all(
25
25
  Object.keys(extensionsConfig).map(async (extensionID) => {
26
- const extensionPath = extensionsConfig[extensionID].path
26
+ const extensionPath = extensionsConfig[extensionID].path;
27
27
  const unzippedExtensionPath = await unzipFile(
28
28
  extensionPath,
29
29
  path.join(projectFolderPath, "extensions"),
30
- )
31
- const metadataPath = path.join(unzippedExtensionPath, "metadata.json")
32
- const metadataContent = await fs.promises.readFile(metadataPath, "utf8")
30
+ );
31
+ const metadataPath = path.join(unzippedExtensionPath, "metadata.json");
32
+ const metadataContent = await fs.promises.readFile(metadataPath, "utf8");
33
33
 
34
34
  if (!metadataContent) {
35
35
  throw createError({
36
36
  statusCode: 400,
37
37
  statusMessage: "Invalid extension file: missing metadata.json",
38
- })
38
+ });
39
39
  }
40
- const metadata = JSON.parse(metadataContent)
41
- console.log("runExtensions", { metadata })
40
+ const metadata = JSON.parse(metadataContent);
41
+ console.log("runExtensions", { metadata });
42
42
 
43
- const { id, name, version, backendExecutable, frontendFile } = metadata
44
- console.log("runExtensions", { id, name, version, backendExecutable })
43
+ const { id, name, version, backendExecutable, frontendFile } = metadata;
44
+ console.log("runExtensions", { id, name, version, backendExecutable });
45
45
 
46
46
  if (!frontendFile) {
47
47
  throw createError({
48
48
  statusCode: 400,
49
- statusMessage:
50
- "Invalid extension file: missing frontend JavaScript",
51
- })
49
+ statusMessage: "Invalid extension file: missing frontend JavaScript",
50
+ });
52
51
  }
53
52
  if (!backendExecutable) {
54
53
  throw createError({
55
54
  statusCode: 400,
56
55
  statusMessage: "Invalid extension file: missing backend executable",
57
- })
56
+ });
58
57
  }
59
58
 
60
- const frontendFilePath = path.join(unzippedExtensionPath, frontendFile)
61
- const frontendContent = await fs.promises.readFile(
62
- frontendFilePath,
63
- "utf8",
64
- )
65
- const backendExecutablePath = path.join(
66
- unzippedExtensionPath,
67
- backendExecutable,
68
- )
69
- fs.chmodSync(backendExecutablePath, "755")
59
+ const frontendFilePath = path.join(unzippedExtensionPath, frontendFile);
60
+ const frontendContent = await fs.promises.readFile(frontendFilePath, "utf8");
61
+ const backendExecutablePath = path.join(unzippedExtensionPath, backendExecutable);
62
+ fs.chmodSync(backendExecutablePath, "755");
70
63
  const port = await runBack(backendExecutable, backendExecutablePath, {
71
64
  projectFolderPath,
72
- })
65
+ });
73
66
  await addMicroserviceMetadatas(projectFolderPath, {
74
67
  type: "back",
75
68
  name,
76
69
  port,
77
- })
70
+ });
78
71
  return {
79
72
  id,
80
73
  name,
81
74
  version,
82
75
  frontendContent,
83
76
  port,
84
- }
77
+ };
85
78
  }),
86
- )
79
+ );
87
80
 
88
81
  return {
89
82
  statusCode: CODE_200,
90
83
  extensionsArray,
91
- }
84
+ };
92
85
  } catch (error) {
93
- console.error("Error running extensions:", error)
86
+ console.error("Error running extensions:", error);
94
87
  throw createError({
95
88
  statusCode: 500,
96
89
  statusMessage: error.message,
97
- })
90
+ });
98
91
  }
99
- })
92
+ });