@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.
- package/.eslintrc.cjs +1 -1
- package/.oxlintrc.json +3 -22
- package/app/assets/geode_objects.js +26 -26
- package/app/components/Carousel.vue +62 -66
- package/app/components/CrsSelector.vue +48 -52
- package/app/components/DeleteDialog.vue +21 -37
- package/app/components/DragAndDrop.vue +35 -41
- package/app/components/ExtensionSelector.vue +50 -63
- package/app/components/FeedBack/ErrorBanner.vue +7 -10
- package/app/components/FeedBack/Snackers.vue +12 -14
- package/app/components/FetchingData.vue +1 -6
- package/app/components/FileSelector.vue +41 -47
- package/app/components/FileUploader.vue +62 -79
- package/app/components/GlassCard.vue +19 -19
- package/app/components/HybridRenderingView.vue +37 -38
- package/app/components/InfraConnected.vue +3 -3
- package/app/components/Inspector/InspectionButton.vue +27 -31
- package/app/components/Inspector/ResultPanel.vue +13 -24
- package/app/components/Launcher.vue +13 -13
- package/app/components/Loading.vue +63 -69
- package/app/components/MissingFilesSelector.vue +53 -73
- package/app/components/ObjectSelector.vue +81 -99
- package/app/components/PackagesVersions.vue +27 -30
- package/app/components/Recaptcha.vue +60 -71
- package/app/components/RemoteRenderingView.vue +102 -108
- package/app/components/Screenshot.vue +36 -42
- package/app/components/SearchBar.vue +5 -5
- package/app/components/Step.vue +37 -44
- package/app/components/Stepper.vue +29 -35
- package/app/components/VeaseViewToolbar.vue +69 -78
- package/app/components/ViewToolbar.vue +41 -45
- package/app/components/Viewer/BreadCrumb.vue +18 -30
- package/app/components/Viewer/ContextMenu.vue +176 -179
- package/app/components/Viewer/ContextMenuItem.vue +105 -117
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
- package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
- package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
- package/app/components/Viewer/Options/ColorMapList.vue +115 -140
- package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
- package/app/components/Viewer/Options/TextureItem.vue +54 -58
- package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
- package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
- package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
- package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
- package/app/components/Viewer/TreeComponent.vue +43 -49
- package/app/components/Viewer/TreeObject.vue +48 -50
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
- package/app/components/Wrapper.vue +8 -8
- package/app/components/ZScaling.vue +18 -27
- package/app/composables/project_manager.js +57 -67
- package/app/composables/run_function_when_microservices_connected.js +8 -8
- package/app/plugins/auto_store_register.js +11 -13
- package/app/stores/app.js +118 -138
- package/app/stores/data.js +52 -68
- package/app/stores/data_style.js +36 -36
- package/app/stores/feedback.js +17 -20
- package/app/stores/geode.js +54 -55
- package/app/stores/hybrid_viewer.js +164 -177
- package/app/stores/infra.js +45 -55
- package/app/stores/lambda.js +26 -26
- package/app/stores/menu.js +78 -85
- package/app/stores/treeview.js +57 -65
- package/app/stores/viewer.js +92 -104
- package/app/utils/colormap.js +3 -3
- package/app/utils/config.js +16 -22
- package/app/utils/default_styles.js +50 -62
- package/app/utils/extension.js +44 -44
- package/app/utils/file_import_workflow.js +50 -64
- package/app/utils/local/app_mode.js +2 -2
- package/app/utils/local/cleanup.js +66 -72
- package/app/utils/local/microservices.js +61 -71
- package/app/utils/local/path.js +16 -19
- package/app/utils/local/scripts.js +22 -22
- package/app/utils/recaptcha.js +6 -6
- package/app/utils/server.js +21 -24
- package/app/utils/status.js +2 -2
- package/app/utils/treeview.js +4 -4
- package/app/utils/validate_schema.js +7 -7
- package/commitlint.config.js +2 -2
- package/eslint.config.js +4 -4
- package/internal/database/database.js +38 -46
- package/internal/database/extended_database.js +9 -10
- package/internal/database/tables/data.js +2 -3
- package/internal/database/tables/model_components.js +1 -1
- package/internal/database/tables/model_components_relation.js +1 -1
- package/internal/stores/data_style/mesh/cells/cell.js +47 -63
- package/internal/stores/data_style/mesh/cells/color.js +11 -16
- package/internal/stores/data_style/mesh/cells/common.js +6 -6
- package/internal/stores/data_style/mesh/cells/index.js +37 -47
- package/internal/stores/data_style/mesh/cells/textures.js +11 -12
- package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
- package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/color.js +11 -16
- package/internal/stores/data_style/mesh/edges/common.js +6 -6
- package/internal/stores/data_style/mesh/edges/edge.js +47 -63
- package/internal/stores/data_style/mesh/edges/index.js +38 -52
- package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
- package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/width.js +11 -16
- package/internal/stores/data_style/mesh/index.js +34 -34
- package/internal/stores/data_style/mesh/points/color.js +11 -16
- package/internal/stores/data_style/mesh/points/common.js +6 -6
- package/internal/stores/data_style/mesh/points/index.js +35 -49
- package/internal/stores/data_style/mesh/points/size.js +11 -16
- package/internal/stores/data_style/mesh/points/vertex.js +47 -58
- package/internal/stores/data_style/mesh/points/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polygons/color.js +11 -16
- package/internal/stores/data_style/mesh/polygons/common.js +6 -6
- package/internal/stores/data_style/mesh/polygons/index.js +36 -45
- package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
- package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
- package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
- package/internal/stores/data_style/model/blocks/color.js +21 -24
- package/internal/stores/data_style/model/blocks/common.js +6 -6
- package/internal/stores/data_style/model/blocks/index.js +13 -17
- package/internal/stores/data_style/model/blocks/visibility.js +21 -24
- package/internal/stores/data_style/model/corners/color.js +21 -24
- package/internal/stores/data_style/model/corners/common.js +6 -6
- package/internal/stores/data_style/model/corners/index.js +14 -18
- package/internal/stores/data_style/model/corners/visibility.js +21 -25
- package/internal/stores/data_style/model/edges/common.js +4 -4
- package/internal/stores/data_style/model/edges/index.js +7 -7
- package/internal/stores/data_style/model/edges/visibility.js +11 -15
- package/internal/stores/data_style/model/index.js +84 -100
- package/internal/stores/data_style/model/lines/color.js +21 -24
- package/internal/stores/data_style/model/lines/common.js +6 -6
- package/internal/stores/data_style/model/lines/index.js +13 -17
- package/internal/stores/data_style/model/lines/visibility.js +21 -24
- package/internal/stores/data_style/model/points/common.js +4 -4
- package/internal/stores/data_style/model/points/index.js +9 -9
- package/internal/stores/data_style/model/points/size.js +11 -11
- package/internal/stores/data_style/model/points/visibility.js +11 -15
- package/internal/stores/data_style/model/surfaces/color.js +21 -24
- package/internal/stores/data_style/model/surfaces/common.js +6 -6
- package/internal/stores/data_style/model/surfaces/index.js +14 -22
- package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
- package/internal/stores/data_style/state.js +11 -11
- package/internal/utils/api_fetch.js +24 -34
- package/internal/utils/upload_file.js +19 -24
- package/internal/utils/viewer_call.js +23 -36
- package/nuxt.config.js +7 -11
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +14 -16
- package/server/api/app/kill.post.js +4 -4
- package/server/api/app/project_folder_path.post.js +11 -11
- package/server/api/app/run_back.post.js +12 -12
- package/server/api/app/run_viewer.post.js +12 -12
- package/server/api/extensions/run.post.js +34 -41
- package/server/api/extensions/upload.put.js +48 -62
- package/tests/integration/setup.js +43 -53
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
- package/tests/integration/stores/viewer.nuxt.test.js +35 -38
- package/tests/setup_indexeddb.js +2 -2
- package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
- package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
- package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
- package/tests/unit/components/Launcher.nuxt.test.js +20 -22
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
- package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
- package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
- package/tests/unit/components/Step.nuxt.test.js +18 -19
- package/tests/unit/components/Stepper.nuxt.test.js +18 -18
- package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
- package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
- package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
- package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
- package/tests/unit/stores/app.nuxt.test.js +90 -92
- package/tests/unit/stores/feedback.nuxt.test.js +47 -57
- package/tests/unit/stores/geode.nuxt.test.js +111 -115
- package/tests/unit/stores/infra.nuxt.test.js +148 -148
- package/tests/unit/stores/lambda.nuxt.test.js +72 -74
- package/tests/unit/stores/treeview.nuxt.test.js +19 -21
- package/tests/unit/stores/viewer.nuxt.test.js +109 -122
- package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
- package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
- package/tests/utils.js +11 -11
- package/tests/vitest.config.js +9 -9
- package/vuetify_config.js +2 -2
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
// Node imports
|
|
2
|
-
import child_process from "node:child_process"
|
|
3
|
-
import fs from "node:fs"
|
|
4
|
-
import path from "node:path"
|
|
2
|
+
import child_process from "node:child_process";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
// Third party imports
|
|
7
|
-
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" with { type: "json" }
|
|
8
|
-
import { getPort } from "get-port-please"
|
|
9
|
-
import pTimeout from "p-timeout"
|
|
7
|
+
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" with { type: "json" };
|
|
8
|
+
import { getPort } from "get-port-please";
|
|
9
|
+
import pTimeout from "p-timeout";
|
|
10
10
|
|
|
11
11
|
// Local imports
|
|
12
|
-
import { commandExistsSync, waitForReady } from "./scripts.js"
|
|
13
|
-
import { executableName, executablePath } from "./path.js"
|
|
14
|
-
import { microservicesMetadatasPath } from "./cleanup.js"
|
|
12
|
+
import { commandExistsSync, waitForReady } from "./scripts.js";
|
|
13
|
+
import { executableName, executablePath } from "./path.js";
|
|
14
|
+
import { microservicesMetadatasPath } from "./cleanup.js";
|
|
15
15
|
|
|
16
|
-
const DEFAULT_TIMEOUT_SECONDS = 30
|
|
17
|
-
const MILLISECONDS_PER_SECOND = 1000
|
|
16
|
+
const DEFAULT_TIMEOUT_SECONDS = 30;
|
|
17
|
+
const MILLISECONDS_PER_SECOND = 1000;
|
|
18
18
|
|
|
19
19
|
function getAvailablePort() {
|
|
20
20
|
return getPort({
|
|
21
21
|
host: "localhost",
|
|
22
22
|
random: true,
|
|
23
|
-
})
|
|
23
|
+
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async function runScript(
|
|
@@ -30,126 +30,116 @@ async function runScript(
|
|
|
30
30
|
expectedResponse,
|
|
31
31
|
timeoutSeconds = DEFAULT_TIMEOUT_SECONDS,
|
|
32
32
|
) {
|
|
33
|
-
let command = ""
|
|
33
|
+
let command = "";
|
|
34
34
|
if (commandExistsSync(execName)) {
|
|
35
|
-
command = execName
|
|
35
|
+
command = execName;
|
|
36
36
|
} else {
|
|
37
|
-
command = path.join(executablePath(execPath), executableName(execName))
|
|
37
|
+
command = path.join(executablePath(execPath), executableName(execName));
|
|
38
38
|
}
|
|
39
|
-
console.log("runScript", command, args)
|
|
39
|
+
console.log("runScript", command, args);
|
|
40
40
|
const child = child_process.spawn(command, args, {
|
|
41
41
|
encoding: "utf8",
|
|
42
42
|
shell: true,
|
|
43
|
-
})
|
|
43
|
+
});
|
|
44
44
|
|
|
45
|
-
child.stdout.on("data", (data) =>
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
child.stderr.on("data", (data) =>
|
|
49
|
-
console.log(`[${execName}] ${data.toString()}`),
|
|
50
|
-
)
|
|
45
|
+
child.stdout.on("data", (data) => console.log(`[${execName}] ${data.toString()}`));
|
|
46
|
+
child.stderr.on("data", (data) => console.log(`[${execName}] ${data.toString()}`));
|
|
51
47
|
|
|
52
48
|
child.on("error", async (error) => {
|
|
53
|
-
const electron = await import("electron")
|
|
49
|
+
const electron = await import("electron");
|
|
54
50
|
electron.dialog.showMessageBox({
|
|
55
51
|
title: "Title",
|
|
56
52
|
type: "warning",
|
|
57
53
|
message: `Error occured.\r\n${error}`,
|
|
58
|
-
})
|
|
59
|
-
})
|
|
54
|
+
});
|
|
55
|
+
});
|
|
60
56
|
|
|
61
|
-
child.on("close", (code) =>
|
|
62
|
-
console.log(`[${execName}] exited with code ${code}`),
|
|
63
|
-
)
|
|
57
|
+
child.on("close", (code) => console.log(`[${execName}] exited with code ${code}`));
|
|
64
58
|
child.on("kill", () => {
|
|
65
|
-
console.log(`[${execName}] process killed`)
|
|
66
|
-
})
|
|
67
|
-
child.name = command.replace(/^.*[\\/]/, "")
|
|
59
|
+
console.log(`[${execName}] process killed`);
|
|
60
|
+
});
|
|
61
|
+
child.name = command.replace(/^.*[\\/]/, "");
|
|
68
62
|
|
|
69
63
|
try {
|
|
70
64
|
return await pTimeout(waitForReady(child, expectedResponse), {
|
|
71
65
|
milliseconds: timeoutSeconds * MILLISECONDS_PER_SECOND,
|
|
72
66
|
message: `Timed out after ${timeoutSeconds} seconds`,
|
|
73
|
-
})
|
|
67
|
+
});
|
|
74
68
|
} catch (error) {
|
|
75
|
-
child.kill()
|
|
76
|
-
throw error
|
|
69
|
+
child.kill();
|
|
70
|
+
throw error;
|
|
77
71
|
}
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
async function runBack(execName, execPath, args = {}) {
|
|
81
|
-
const { projectFolderPath } = args
|
|
75
|
+
const { projectFolderPath } = args;
|
|
82
76
|
if (!projectFolderPath) {
|
|
83
|
-
throw new Error("projectFolderPath is required")
|
|
77
|
+
throw new Error("projectFolderPath is required");
|
|
84
78
|
}
|
|
85
|
-
let { uploadFolderPath } = args
|
|
79
|
+
let { uploadFolderPath } = args;
|
|
86
80
|
if (!uploadFolderPath) {
|
|
87
|
-
uploadFolderPath = path.join(projectFolderPath, "uploads")
|
|
81
|
+
uploadFolderPath = path.join(projectFolderPath, "uploads");
|
|
88
82
|
}
|
|
89
|
-
const port = await getAvailablePort()
|
|
83
|
+
const port = await getAvailablePort();
|
|
90
84
|
const backArgs = [
|
|
91
85
|
`--port ${port}`,
|
|
92
86
|
`--data_folder_path ${projectFolderPath}`,
|
|
93
87
|
`--upload_folder_path ${uploadFolderPath}`,
|
|
94
88
|
`--allowed_origin http://localhost:*`,
|
|
95
89
|
`--timeout ${0}`,
|
|
96
|
-
]
|
|
90
|
+
];
|
|
97
91
|
if (process.env.NODE_ENV === "development" || !process.env.NODE_ENV) {
|
|
98
|
-
backArgs.push("--debug")
|
|
92
|
+
backArgs.push("--debug");
|
|
99
93
|
}
|
|
100
|
-
console.log("runBack", execName, execPath, backArgs)
|
|
101
|
-
await runScript(execName, execPath, backArgs, "Serving Flask app")
|
|
102
|
-
return port
|
|
94
|
+
console.log("runBack", execName, execPath, backArgs);
|
|
95
|
+
await runScript(execName, execPath, backArgs, "Serving Flask app");
|
|
96
|
+
return port;
|
|
103
97
|
}
|
|
104
98
|
|
|
105
99
|
async function runViewer(execName, execPath, args = {}) {
|
|
106
|
-
const { projectFolderPath } = args
|
|
100
|
+
const { projectFolderPath } = args;
|
|
107
101
|
if (!projectFolderPath) {
|
|
108
|
-
throw new Error("projectFolderPath is required")
|
|
102
|
+
throw new Error("projectFolderPath is required");
|
|
109
103
|
}
|
|
110
|
-
const port = await getAvailablePort()
|
|
104
|
+
const port = await getAvailablePort();
|
|
111
105
|
const viewerArgs = [
|
|
112
106
|
`--port ${port}`,
|
|
113
107
|
`--data_folder_path ${projectFolderPath}`,
|
|
114
108
|
`--timeout ${0}`,
|
|
115
|
-
]
|
|
116
|
-
console.log("runViewer", execName, execPath, viewerArgs)
|
|
117
|
-
await runScript(execName, execPath, viewerArgs, "Starting factory")
|
|
118
|
-
return port
|
|
109
|
+
];
|
|
110
|
+
console.log("runViewer", execName, execPath, viewerArgs);
|
|
111
|
+
await runScript(execName, execPath, viewerArgs, "Starting factory");
|
|
112
|
+
return port;
|
|
119
113
|
}
|
|
120
114
|
|
|
121
115
|
function projectMicroservices(projectFolderPath) {
|
|
122
|
-
console.log("projectMicroservices", { projectFolderPath })
|
|
123
|
-
const filePath = microservicesMetadatasPath(projectFolderPath)
|
|
116
|
+
console.log("projectMicroservices", { projectFolderPath });
|
|
117
|
+
const filePath = microservicesMetadatasPath(projectFolderPath);
|
|
124
118
|
|
|
125
119
|
if (!fs.existsSync(filePath)) {
|
|
126
|
-
const microservicesMetadatas = { microservices: [] }
|
|
127
|
-
fs.writeFileSync(
|
|
128
|
-
filePath,
|
|
129
|
-
JSON.stringify(microservicesMetadatas, undefined, 2),
|
|
130
|
-
"utf8",
|
|
131
|
-
)
|
|
120
|
+
const microservicesMetadatas = { microservices: [] };
|
|
121
|
+
fs.writeFileSync(filePath, JSON.stringify(microservicesMetadatas, undefined, 2), "utf8");
|
|
132
122
|
}
|
|
133
|
-
const content = JSON.parse(fs.readFileSync(filePath, "utf8"))
|
|
134
|
-
return content.microservices
|
|
123
|
+
const content = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
124
|
+
return content.microservices;
|
|
135
125
|
}
|
|
136
126
|
|
|
137
127
|
function addMicroserviceMetadatas(projectFolderPath, serviceObj) {
|
|
138
|
-
const microservices = projectMicroservices(projectFolderPath)
|
|
128
|
+
const microservices = projectMicroservices(projectFolderPath);
|
|
139
129
|
if (serviceObj.type === "back") {
|
|
140
|
-
const schema = back_schemas.opengeodeweb_back.kill
|
|
141
|
-
serviceObj.url = `http://localhost:${serviceObj.port}/${schema.$id}
|
|
142
|
-
const [method] = schema.methods
|
|
143
|
-
serviceObj.method = method
|
|
130
|
+
const schema = back_schemas.opengeodeweb_back.kill;
|
|
131
|
+
serviceObj.url = `http://localhost:${serviceObj.port}/${schema.$id}`;
|
|
132
|
+
const [method] = schema.methods;
|
|
133
|
+
serviceObj.method = method;
|
|
144
134
|
} else if (serviceObj.type === "viewer") {
|
|
145
|
-
serviceObj.url = `ws://localhost:${serviceObj.port}/ws
|
|
135
|
+
serviceObj.url = `ws://localhost:${serviceObj.port}/ws`;
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
microservices.push(serviceObj)
|
|
138
|
+
microservices.push(serviceObj);
|
|
149
139
|
fs.writeFileSync(
|
|
150
140
|
microservicesMetadatasPath(projectFolderPath),
|
|
151
141
|
JSON.stringify({ microservices }, undefined, 2),
|
|
152
|
-
)
|
|
142
|
+
);
|
|
153
143
|
}
|
|
154
144
|
|
|
155
|
-
export { addMicroserviceMetadatas, getAvailablePort, runBack, runViewer }
|
|
145
|
+
export { addMicroserviceMetadatas, getAvailablePort, runBack, runViewer };
|
package/app/utils/local/path.js
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
1
|
// Node imports
|
|
2
|
-
import fs from "node:fs"
|
|
3
|
-
import os from "node:os"
|
|
4
|
-
import path from "node:path"
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
// Third party imports
|
|
7
|
-
import { v4 as uuidv4 } from "uuid"
|
|
7
|
+
import { v4 as uuidv4 } from "uuid";
|
|
8
8
|
|
|
9
9
|
// Local imports
|
|
10
|
-
import { appMode } from "./app_mode.js"
|
|
10
|
+
import { appMode } from "./app_mode.js";
|
|
11
11
|
|
|
12
12
|
function executablePath(microservicePath) {
|
|
13
|
-
console.log("[executablePath]", { microservicePath }, process.env.NODE_ENV)
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
process.env.NODE_ENV === "production"
|
|
17
|
-
) {
|
|
18
|
-
return process.env.RESOURCES_PATH
|
|
13
|
+
console.log("[executablePath]", { microservicePath }, process.env.NODE_ENV);
|
|
14
|
+
if (useRuntimeConfig().public.MODE === appMode.DESKTOP && process.env.NODE_ENV === "production") {
|
|
15
|
+
return process.env.RESOURCES_PATH;
|
|
19
16
|
}
|
|
20
|
-
return microservicePath
|
|
17
|
+
return microservicePath;
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
function executableName(name) {
|
|
24
21
|
if (process.platform === "win32") {
|
|
25
|
-
return `${name}.exe
|
|
22
|
+
return `${name}.exe`;
|
|
26
23
|
}
|
|
27
|
-
return name
|
|
24
|
+
return name;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
function createPath(dirPath) {
|
|
31
28
|
if (!fs.existsSync(dirPath)) {
|
|
32
|
-
fs.mkdirSync(dirPath, { recursive: true })
|
|
33
|
-
console.log(`${dirPath} directory created successfully!`)
|
|
29
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
30
|
+
console.log(`${dirPath} directory created successfully!`);
|
|
34
31
|
}
|
|
35
|
-
return dirPath
|
|
32
|
+
return dirPath;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
function generateProjectFolderPath(projectName) {
|
|
39
|
-
return path.join(os.tmpdir(), projectName.
|
|
36
|
+
return path.join(os.tmpdir(), projectName.replaceAll("/", "_"), uuidv4());
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
export { createPath, executablePath, executableName, generateProjectFolderPath }
|
|
39
|
+
export { createPath, executablePath, executableName, generateProjectFolderPath };
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
// Node imports
|
|
2
|
-
import child_process from "node:child_process"
|
|
3
|
-
import fs from "node:fs"
|
|
4
|
-
import { on } from "node:events"
|
|
5
|
-
import path from "node:path"
|
|
2
|
+
import child_process from "node:child_process";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import { on } from "node:events";
|
|
5
|
+
import path from "node:path";
|
|
6
6
|
|
|
7
|
-
import { appMode } from "./app_mode.js"
|
|
7
|
+
import { appMode } from "./app_mode.js";
|
|
8
8
|
|
|
9
9
|
function commandExistsSync(execName) {
|
|
10
|
-
const envPath = process.env.PATH || ""
|
|
10
|
+
const envPath = process.env.PATH || "";
|
|
11
11
|
return envPath.split(path.delimiter).some((dir) => {
|
|
12
|
-
const filePath = path.join(dir, execName)
|
|
13
|
-
return fs.existsSync(filePath) && fs.statSync(filePath).isFile()
|
|
14
|
-
})
|
|
12
|
+
const filePath = path.join(dir, execName);
|
|
13
|
+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
|
|
14
|
+
});
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
async function waitForReady(child, expectedResponse) {
|
|
18
18
|
for await (const [data] of on(child.stdout, "data")) {
|
|
19
19
|
if (data.toString().includes(expectedResponse)) {
|
|
20
|
-
return child
|
|
20
|
+
return child;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
throw new Error("Process closed before signal")
|
|
23
|
+
throw new Error("Process closed before signal");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async function waitNuxt(nuxtProcess) {
|
|
27
27
|
for await (const [data] of on(nuxtProcess.stdout, "data")) {
|
|
28
|
-
const output = data.toString()
|
|
29
|
-
console.log("Nuxt:", output)
|
|
30
|
-
const portMatch = output.match(/Listening on http:\/\/\[::\]:(\d+)/)
|
|
28
|
+
const output = data.toString();
|
|
29
|
+
console.log("Nuxt:", output);
|
|
30
|
+
const portMatch = output.match(/Listening on http:\/\/\[::\]:(\d+)/);
|
|
31
31
|
if (portMatch) {
|
|
32
|
-
const [, nuxtPort] = portMatch
|
|
32
|
+
const [, nuxtPort] = portMatch;
|
|
33
33
|
|
|
34
|
-
console.log("Nuxt listening on port", nuxtPort)
|
|
35
|
-
return nuxtPort
|
|
34
|
+
console.log("Nuxt listening on port", nuxtPort);
|
|
35
|
+
return nuxtPort;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
throw new Error("Nuxt process closed without accepting connections")
|
|
38
|
+
throw new Error("Nuxt process closed without accepting connections");
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async function runBrowser(scriptName) {
|
|
42
|
-
process.env.MODE = appMode.BROWSER
|
|
42
|
+
process.env.MODE = appMode.BROWSER;
|
|
43
43
|
|
|
44
44
|
const nuxtProcess = child_process.spawn("npm", ["run", scriptName], {
|
|
45
45
|
shell: true,
|
|
46
46
|
FORCE_COLOR: true,
|
|
47
|
-
})
|
|
48
|
-
return await waitNuxt(nuxtProcess)
|
|
47
|
+
});
|
|
48
|
+
return await waitNuxt(nuxtProcess);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export { runBrowser, waitForReady, commandExistsSync }
|
|
51
|
+
export { runBrowser, waitForReady, commandExistsSync };
|
package/app/utils/recaptcha.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
function check_recaptcha_params(name, email, launch) {
|
|
2
|
-
console.log("check_recaptcha_params", { name, email, launch })
|
|
2
|
+
console.log("check_recaptcha_params", { name, email, launch });
|
|
3
3
|
if (name !== "") {
|
|
4
4
|
return {
|
|
5
5
|
statusCode: 500,
|
|
6
6
|
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
}
|
|
9
9
|
if (email !== "") {
|
|
10
10
|
return {
|
|
11
11
|
statusCode: 500,
|
|
12
12
|
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
}
|
|
15
15
|
if (launch !== false) {
|
|
16
16
|
return {
|
|
17
17
|
statusCode: 500,
|
|
18
18
|
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
}
|
|
21
|
-
return { statusCode: 200, body: JSON.stringify({ message: "OK" }) }
|
|
21
|
+
return { statusCode: 200, body: JSON.stringify({ message: "OK" }) };
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export { check_recaptcha_params }
|
|
24
|
+
export { check_recaptcha_params };
|
package/app/utils/server.js
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
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 JSZip from "jszip"
|
|
6
|
+
import JSZip from "jszip";
|
|
7
7
|
|
|
8
|
-
async function unzipFile(
|
|
9
|
-
zipFilePath,
|
|
10
|
-
outputDir = zipFilePath.replace(/\.[^/.]+$/, ""), // Remove the file extension
|
|
11
|
-
) {
|
|
12
|
-
console.log("Unzipping file...", zipFilePath, outputDir)
|
|
8
|
+
async function unzipFile(zipFilePath, outputDir = zipFilePath.replace(/\.[^/.]+$/, "")) {
|
|
9
|
+
console.log("Unzipping file...", zipFilePath, outputDir);
|
|
13
10
|
try {
|
|
14
|
-
const data = await fs.promises.readFile(zipFilePath)
|
|
15
|
-
const zip = await JSZip.loadAsync(data)
|
|
16
|
-
await fs.promises.mkdir(outputDir, { recursive: true })
|
|
17
|
-
const promises = []
|
|
11
|
+
const data = await fs.promises.readFile(zipFilePath);
|
|
12
|
+
const zip = await JSZip.loadAsync(data);
|
|
13
|
+
await fs.promises.mkdir(outputDir, { recursive: true });
|
|
14
|
+
const promises = [];
|
|
18
15
|
|
|
19
16
|
for (const [relativePath, zipEntry] of Object.entries(zip.files)) {
|
|
20
|
-
const outputPath = path.join(outputDir, relativePath)
|
|
17
|
+
const outputPath = path.join(outputDir, relativePath);
|
|
21
18
|
|
|
22
19
|
if (zipEntry.dir) {
|
|
23
|
-
promises.push(fs.promises.mkdir(outputPath, { recursive: true }))
|
|
20
|
+
promises.push(fs.promises.mkdir(outputPath, { recursive: true }));
|
|
24
21
|
} else {
|
|
25
22
|
promises.push(
|
|
26
23
|
(async () => {
|
|
27
|
-
const content = await zipEntry.async("nodebuffer")
|
|
24
|
+
const content = await zipEntry.async("nodebuffer");
|
|
28
25
|
await fs.promises.mkdir(path.dirname(outputPath), {
|
|
29
26
|
recursive: true,
|
|
30
|
-
})
|
|
31
|
-
await fs.promises.writeFile(outputPath, content)
|
|
27
|
+
});
|
|
28
|
+
await fs.promises.writeFile(outputPath, content);
|
|
32
29
|
})(),
|
|
33
|
-
)
|
|
30
|
+
);
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
await Promise.all(promises)
|
|
38
|
-
console.log("Extraction complete!")
|
|
39
|
-
return outputDir
|
|
34
|
+
await Promise.all(promises);
|
|
35
|
+
console.log("Extraction complete!");
|
|
36
|
+
return outputDir;
|
|
40
37
|
} catch (error) {
|
|
41
|
-
console.error("Error unzipping file:", error)
|
|
42
|
-
throw error
|
|
38
|
+
console.error("Error unzipping file:", error);
|
|
39
|
+
throw error;
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
export { unzipFile }
|
|
43
|
+
export { unzipFile };
|
package/app/utils/status.js
CHANGED
package/app/utils/treeview.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function compareSelections(current, previous) {
|
|
2
|
-
const added = current.filter((item) => !previous.includes(item))
|
|
3
|
-
const removed = previous.filter((item) => !current.includes(item))
|
|
4
|
-
return { added, removed }
|
|
2
|
+
const added = current.filter((item) => !previous.includes(item));
|
|
3
|
+
const removed = previous.filter((item) => !current.includes(item));
|
|
4
|
+
return { added, removed };
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export { compareSelections }
|
|
7
|
+
export { compareSelections };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Ajv from "ajv"
|
|
1
|
+
import Ajv from "ajv";
|
|
2
2
|
|
|
3
3
|
function validate_schema(schema, body) {
|
|
4
|
-
const ajv = new Ajv()
|
|
5
|
-
const list_keywords = ["methods", "route", "max_retry", "rpc"]
|
|
4
|
+
const ajv = new Ajv();
|
|
5
|
+
const list_keywords = ["methods", "route", "max_retry", "rpc"];
|
|
6
6
|
for (const keyword of list_keywords) {
|
|
7
|
-
ajv.addKeyword(keyword)
|
|
7
|
+
ajv.addKeyword(keyword);
|
|
8
8
|
}
|
|
9
|
-
const valid = ajv.validate(schema, body)
|
|
10
|
-
return { valid, error: ajv.errorsText() }
|
|
9
|
+
const valid = ajv.validate(schema, body);
|
|
10
|
+
return { valid, error: ajv.errorsText() };
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export { validate_schema }
|
|
13
|
+
export { validate_schema };
|
package/commitlint.config.js
CHANGED
package/eslint.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import nuxt from "eslint-plugin-nuxt"
|
|
2
|
-
import vue from "eslint-plugin-vue"
|
|
3
|
-
import vuetify from "eslint-plugin-vuetify"
|
|
1
|
+
import nuxt from "eslint-plugin-nuxt";
|
|
2
|
+
import vue from "eslint-plugin-vue";
|
|
3
|
+
import vuetify from "eslint-plugin-vuetify";
|
|
4
4
|
|
|
5
5
|
// oxlint-disable-next-line import/no-anonymous-default-export
|
|
6
6
|
export default [
|
|
@@ -25,4 +25,4 @@ export default [
|
|
|
25
25
|
...nuxt.configs.recommended.rules,
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
|
-
]
|
|
28
|
+
];
|
|
@@ -1,92 +1,84 @@
|
|
|
1
|
-
import { Dexie } from "dexie"
|
|
2
|
-
import { ExtendedDatabase } from "./extended_database"
|
|
3
|
-
import { dataTable } from "./tables/data"
|
|
4
|
-
import { modelComponentsRelationTable } from "./tables/model_components_relation"
|
|
5
|
-
import { modelComponentsTable } from "./tables/model_components"
|
|
1
|
+
import { Dexie } from "dexie";
|
|
2
|
+
import { ExtendedDatabase } from "./extended_database";
|
|
3
|
+
import { dataTable } from "./tables/data";
|
|
4
|
+
import { modelComponentsRelationTable } from "./tables/model_components_relation";
|
|
5
|
+
import { modelComponentsTable } from "./tables/model_components";
|
|
6
6
|
|
|
7
7
|
class Database extends Dexie {
|
|
8
8
|
constructor() {
|
|
9
|
-
super("Database")
|
|
9
|
+
super("Database");
|
|
10
10
|
|
|
11
11
|
this.version(1).stores({
|
|
12
12
|
[dataTable.name]: dataTable.schema,
|
|
13
13
|
[modelComponentsTable.name]: modelComponentsTable.schema,
|
|
14
14
|
[modelComponentsRelationTable.name]: modelComponentsRelationTable.schema,
|
|
15
|
-
})
|
|
15
|
+
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
static async addTable(tableName, schemaDefinition) {
|
|
19
|
-
await this.addTables({ [tableName]: schemaDefinition })
|
|
19
|
+
await this.addTables({ [tableName]: schemaDefinition });
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
static async addTables(newTables) {
|
|
23
|
-
const tempDb = new Dexie("Database")
|
|
24
|
-
await tempDb.open()
|
|
23
|
+
const tempDb = new Dexie("Database");
|
|
24
|
+
await tempDb.open();
|
|
25
25
|
|
|
26
|
-
const currentVersion = tempDb.verno
|
|
27
|
-
const currentStores = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
modelComponentsRelationTable.schema
|
|
26
|
+
const currentVersion = tempDb.verno;
|
|
27
|
+
const currentStores = {
|
|
28
|
+
[dataTable.name]: dataTable.schema,
|
|
29
|
+
[modelComponentsTable.name]: modelComponentsTable.schema,
|
|
30
|
+
[modelComponentsRelationTable.name]: modelComponentsRelationTable.schema,
|
|
31
|
+
};
|
|
33
32
|
|
|
34
33
|
for (const table of tempDb.tables) {
|
|
35
|
-
const keyPath = table.schema.primKey.src
|
|
36
|
-
const indexes = table.schema.indexes.map((index) => index.src)
|
|
37
|
-
const parts = keyPath ? [keyPath, ...indexes] : indexes
|
|
38
|
-
currentStores[table.name] = parts.join(",")
|
|
34
|
+
const keyPath = table.schema.primKey.src;
|
|
35
|
+
const indexes = table.schema.indexes.map((index) => index.src);
|
|
36
|
+
const parts = keyPath ? [keyPath, ...indexes] : indexes;
|
|
37
|
+
currentStores[table.name] = parts.join(",");
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
tempDb.close()
|
|
40
|
+
tempDb.close();
|
|
42
41
|
|
|
43
|
-
const allExisting = Object.keys(newTables).every(
|
|
44
|
-
(tableName) => currentStores[tableName],
|
|
45
|
-
)
|
|
42
|
+
const allExisting = Object.keys(newTables).every((tableName) => currentStores[tableName]);
|
|
46
43
|
|
|
47
|
-
databaseContainer.instance.close()
|
|
44
|
+
databaseContainer.instance.close();
|
|
48
45
|
|
|
49
46
|
if (allExisting) {
|
|
50
|
-
const existingDb = new Dexie("Database")
|
|
47
|
+
const existingDb = new Dexie("Database");
|
|
51
48
|
for (let version = 1; version <= currentVersion; version += 1) {
|
|
52
49
|
if (version === 1) {
|
|
53
50
|
existingDb.version(1).stores({
|
|
54
51
|
[dataTable.name]: dataTable.schema,
|
|
55
52
|
[modelComponentsTable.name]: modelComponentsTable.schema,
|
|
56
|
-
[modelComponentsRelationTable.name]:
|
|
57
|
-
|
|
58
|
-
})
|
|
53
|
+
[modelComponentsRelationTable.name]: modelComponentsRelationTable.schema,
|
|
54
|
+
});
|
|
59
55
|
} else {
|
|
60
|
-
existingDb.version(version).stores(currentStores)
|
|
56
|
+
existingDb.version(version).stores(currentStores);
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
|
-
await existingDb.open()
|
|
64
|
-
databaseContainer.instance = existingDb
|
|
59
|
+
await existingDb.open();
|
|
60
|
+
databaseContainer.instance = existingDb;
|
|
65
61
|
} else {
|
|
66
|
-
const newDb = new ExtendedDatabase(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
newTables,
|
|
70
|
-
)
|
|
71
|
-
await newDb.open()
|
|
72
|
-
databaseContainer.instance = newDb
|
|
62
|
+
const newDb = new ExtendedDatabase(currentVersion, currentStores, newTables);
|
|
63
|
+
await newDb.open();
|
|
64
|
+
databaseContainer.instance = newDb;
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
68
|
|
|
77
|
-
const databaseContainer = { instance: new Database() }
|
|
69
|
+
const databaseContainer = { instance: new Database() };
|
|
78
70
|
|
|
79
71
|
const database = new Proxy(
|
|
80
72
|
{},
|
|
81
73
|
{
|
|
82
74
|
get(target, prop) {
|
|
83
|
-
const value = databaseContainer.instance[prop]
|
|
75
|
+
const value = databaseContainer.instance[prop];
|
|
84
76
|
if (typeof value === "function") {
|
|
85
|
-
return value.bind(databaseContainer.instance)
|
|
77
|
+
return value.bind(databaseContainer.instance);
|
|
86
78
|
}
|
|
87
|
-
return value
|
|
79
|
+
return value;
|
|
88
80
|
},
|
|
89
81
|
},
|
|
90
|
-
)
|
|
82
|
+
);
|
|
91
83
|
|
|
92
|
-
export { Database, database }
|
|
84
|
+
export { Database, database };
|