@geode/opengeodeweb-front 10.44.0-rc.3 → 10.44.0-rc.4
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/.build/server/utils/microservices.js +9 -85
- package/.build/server/utils/microservices_process.js +85 -0
- package/app/components/ClippingPlanes.vue +16 -82
- package/app/components/DragAndDrop.vue +1 -74
- package/app/components/ThresholdCard.vue +205 -0
- package/app/components/ThresholdFilter.vue +77 -216
- package/app/components/ViewToolbar.vue +15 -231
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +209 -0
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +3 -191
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +228 -0
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +3 -210
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +211 -0
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -192
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +234 -0
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +3 -215
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +221 -0
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +3 -203
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +2 -18
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +145 -0
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +13 -294
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +173 -0
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +218 -0
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +13 -425
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +229 -0
- package/app/components/Viewer/Options/AttributeSelector.vue +26 -133
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +36 -74
- package/app/components/Viewer/Options/NoDataColorInfo.vue +56 -0
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +217 -0
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +4 -199
- package/app/components/Viewer/Surface/PolygonsColoring.vue +231 -0
- package/app/components/Viewer/Surface/PolygonsOptions.vue +3 -213
- package/app/composables/attribute_selector.ts +126 -0
- package/app/composables/clipping_slices.ts +166 -0
- package/app/composables/view_toolbar_options.ts +126 -0
- package/app/composables/view_toolbar_tool_options.ts +115 -0
- package/app/composables/view_toolbar_tools.ts +108 -0
- package/app/composables/virtual_tree.ts +20 -138
- package/app/composables/virtual_tree_flatten.ts +86 -0
- package/app/composables/virtual_tree_types.ts +81 -0
- package/app/stores/app.ts +8 -55
- package/app/stores/app_helpers/registry.ts +69 -0
- package/app/stores/menu.ts +1 -124
- package/app/stores/menu_helpers/menus_data.ts +127 -0
- package/app/stores/viewer.ts +17 -78
- package/app/stores/viewer_helpers/actions.ts +68 -0
- package/app/stores/viewer_helpers/request.ts +61 -0
- package/app/utils/clipping_planes.ts +4 -132
- package/app/utils/clipping_planes_scene.ts +131 -0
- package/app/utils/coloring_styles.ts +101 -0
- package/app/utils/default_styles/mesh_components.ts +168 -0
- package/app/utils/default_styles/meshes.ts +13 -153
- package/app/utils/default_styles/model_components.ts +170 -0
- package/app/utils/default_styles/models.ts +16 -153
- package/app/utils/drag_and_drop.ts +80 -0
- package/app/utils/model_component_coloring.ts +46 -0
- package/app/utils/threshold.ts +33 -0
- package/app/utils/threshold_sources.ts +51 -0
- package/internal/stores/data_style/mesh/cells/cell.ts +27 -150
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +74 -0
- package/internal/stores/data_style/mesh/cells/cell_config.ts +152 -0
- package/internal/stores/data_style/mesh/cells/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/edges/edge.ts +27 -150
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +74 -0
- package/internal/stores/data_style/mesh/edges/edge_config.ts +152 -0
- package/internal/stores/data_style/mesh/edges/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/points/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/points/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/polygons/polygon.ts +27 -152
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +148 -0
- package/internal/stores/data_style/mesh/polygons/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +27 -160
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +82 -0
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +157 -0
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +152 -0
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +173 -0
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/blocks/index.ts +12 -140
- package/internal/stores/data_style/model/common.ts +10 -119
- package/internal/stores/data_style/model/common_mutations.ts +184 -0
- package/internal/stores/data_style/model/lines/apply_coloring.ts +154 -0
- package/internal/stores/data_style/model/lines/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/lines/index.ts +10 -134
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +186 -0
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/surfaces/index.ts +16 -160
- package/internal/stores/data_style/model/visibility.ts +3 -156
- package/internal/stores/data_style/model/visibility_dispatch.ts +160 -0
- package/internal/stores/data_style/state.ts +1 -181
- package/internal/stores/data_style/state_shared.ts +191 -0
- package/internal/stores/hybrid_viewer/camera.ts +7 -161
- package/internal/stores/hybrid_viewer/camera_helpers.ts +120 -0
- package/internal/stores/hybrid_viewer/camera_orientation.ts +60 -0
- package/internal/stores/hybrid_viewer/filters.ts +54 -11
- package/package.json +1 -1
- package/server/utils/microservices.ts +10 -109
- package/server/utils/microservices_process.ts +127 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Node imports
|
|
2
|
+
import child_process from "node:child_process";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
// Third party imports
|
|
6
|
+
import { consola } from "consola";
|
|
7
|
+
|
|
8
|
+
// Local imports
|
|
9
|
+
import { type NamedChildProcess, waitForReady } from "./scripts.js";
|
|
10
|
+
import { executablePath } from "./path.js";
|
|
11
|
+
|
|
12
|
+
interface RunArgs {
|
|
13
|
+
projectFolderPath: string;
|
|
14
|
+
uploadFolderPath?: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const MILLISECONDS_PER_SECOND = 1000;
|
|
19
|
+
const DEFAULT_TIMEOUT_SECONDS = 120;
|
|
20
|
+
const MAX_PORT_RETRIES = 1;
|
|
21
|
+
const DEFAULT_RUN_ARGS: RunArgs = { projectFolderPath: "" };
|
|
22
|
+
const LISTENING_LOG_PATTERN = /^Listening on https?:\/\/.+:\d+\/?\s*$/mu;
|
|
23
|
+
|
|
24
|
+
async function runScript(
|
|
25
|
+
execPath: string,
|
|
26
|
+
execName: string,
|
|
27
|
+
args: readonly string[],
|
|
28
|
+
expectedResponse: string,
|
|
29
|
+
timeoutSeconds = DEFAULT_TIMEOUT_SECONDS,
|
|
30
|
+
): Promise<NamedChildProcess> {
|
|
31
|
+
const command = executablePath(execPath, execName);
|
|
32
|
+
consola.debug("runScript", command, args);
|
|
33
|
+
const child = child_process.spawn(command, args, {
|
|
34
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
35
|
+
}) as NamedChildProcess;
|
|
36
|
+
child.name = command.replace(/^.*[\\/]/u, "");
|
|
37
|
+
child.on("spawn", () => {
|
|
38
|
+
consola.info(`[${child.name}] spawned, pid=${child.pid}`);
|
|
39
|
+
});
|
|
40
|
+
const controller = new AbortController();
|
|
41
|
+
const timer = setTimeout(() => {
|
|
42
|
+
controller.abort();
|
|
43
|
+
}, timeoutSeconds * MILLISECONDS_PER_SECOND);
|
|
44
|
+
if (typeof timer.unref === "function") {
|
|
45
|
+
timer.unref();
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const result = await waitForReady(child, expectedResponse, controller.signal);
|
|
49
|
+
clearTimeout(timer);
|
|
50
|
+
return result;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
clearTimeout(timer);
|
|
53
|
+
child.kill();
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function isPortInUseError(error: unknown): boolean {
|
|
59
|
+
return /EADDRINUSE|address already in use|port already in use/iu.test(String(error));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function resolveUploadFolderPath(
|
|
63
|
+
projectFolderPath: string,
|
|
64
|
+
uploadFolderPath: string | undefined,
|
|
65
|
+
): string {
|
|
66
|
+
if (uploadFolderPath !== undefined && uploadFolderPath !== "") {
|
|
67
|
+
return uploadFolderPath;
|
|
68
|
+
}
|
|
69
|
+
return path.join(projectFolderPath, "uploads");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function backArgs(args: RunArgs, port: number): string[] {
|
|
73
|
+
const { projectFolderPath } = args;
|
|
74
|
+
if (!projectFolderPath) {
|
|
75
|
+
throw new Error("projectFolderPath is required");
|
|
76
|
+
}
|
|
77
|
+
const uploadFolderPath = resolveUploadFolderPath(projectFolderPath, args.uploadFolderPath);
|
|
78
|
+
const executableArgs = [
|
|
79
|
+
"--port",
|
|
80
|
+
String(port),
|
|
81
|
+
"--project_folder_path",
|
|
82
|
+
projectFolderPath,
|
|
83
|
+
"--upload_folder_path",
|
|
84
|
+
uploadFolderPath,
|
|
85
|
+
"--allowed_origins",
|
|
86
|
+
"http://localhost:*",
|
|
87
|
+
"--timeout",
|
|
88
|
+
"0",
|
|
89
|
+
];
|
|
90
|
+
if (process.env.NODE_ENV === undefined || process.env.NODE_ENV === "development") {
|
|
91
|
+
executableArgs.push("--debug");
|
|
92
|
+
}
|
|
93
|
+
return executableArgs;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function waitUntilListening(
|
|
97
|
+
child: child_process.ChildProcessWithoutNullStreams,
|
|
98
|
+
): Promise<void> {
|
|
99
|
+
child.stderr.on("data", (data: Buffer) => {
|
|
100
|
+
consola.info(`[${child.spawnfile}] STDERR:`, data.toString().trim());
|
|
101
|
+
});
|
|
102
|
+
child.on("close", (code) => {
|
|
103
|
+
consola.info(`[${child.spawnfile}] exited with code ${code}`);
|
|
104
|
+
});
|
|
105
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition
|
|
106
|
+
for await (const chunk of child.stdout) {
|
|
107
|
+
const output = String(chunk);
|
|
108
|
+
consola.info(`[${child.spawnfile}] STDOUT:`, output.trim());
|
|
109
|
+
if (LISTENING_LOG_PATTERN.test(output)) {
|
|
110
|
+
child.stdout.on("data", (data: Buffer) => {
|
|
111
|
+
consola.info(`[${child.spawnfile}] STDOUT:`, data.toString().trim());
|
|
112
|
+
});
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
throw new Error(`${child.spawnfile} exited before becoming ready`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export {
|
|
120
|
+
DEFAULT_RUN_ARGS,
|
|
121
|
+
MAX_PORT_RETRIES,
|
|
122
|
+
backArgs,
|
|
123
|
+
isPortInUseError,
|
|
124
|
+
runScript,
|
|
125
|
+
waitUntilListening,
|
|
126
|
+
};
|
|
127
|
+
export type { RunArgs };
|