@eodash/eodash 5.0.0-alpha.1 → 5.0.0-alpha.1.11
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/README.md +1 -1
- package/bin/cli.js +20 -23
- package/bin/serverConfig.js +20 -11
- package/bin/utils.js +81 -9
- package/core/components/DashboardLayout.vue +6 -6
- package/core/components/DynamicWebComponent.vue +3 -3
- package/core/components/Footer.vue +5 -4
- package/core/components/Header.vue +6 -6
- package/core/components/MobileLayout.vue +6 -7
- package/core/composables/DefineEodash.js +45 -0
- package/core/composables/DefineWidgets.js +7 -7
- package/core/composables/index.js +2 -2
- package/core/{eodashConfig.js → eodash.js} +5 -5
- package/core/main.js +2 -2
- package/core/plugins/index.js +3 -3
- package/core/plugins/router.js +1 -1
- package/core/store/Keys.js +2 -2
- package/core/store/index.js +5 -11
- package/core/store/stac.js +4 -4
- package/core/types.d.ts +280 -264
- package/core/views/Dashboard.vue +3 -2
- package/core/vite-env.d.ts +3 -21
- package/package.json +6 -6
- package/widgets/WidgetsContainer.vue +1 -1
- package/bin/update.js +0 -19
- package/core/composables/DefineConfig.js +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.0.0-alpha.1",
|
|
3
|
+
"version": "5.0.0-alpha.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./core/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,17 +32,18 @@
|
|
|
32
32
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
33
33
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
34
34
|
"axios": "^1.6.2",
|
|
35
|
+
"commander": "^12.0.0",
|
|
35
36
|
"core-js": "^3.29.0",
|
|
36
37
|
"pinia": "^2.0.0",
|
|
37
|
-
"
|
|
38
|
+
"sass": "^1.60.0",
|
|
39
|
+
"stac-ts": "^1.0.3",
|
|
38
40
|
"vite": "^5.1.5",
|
|
39
41
|
"vite-plugin-virtual": "^0.3.0",
|
|
40
42
|
"vite-plugin-vuetify": "^2.0.0",
|
|
41
43
|
"vue": "^3.2.0",
|
|
42
44
|
"vue-router": "^4.0.0",
|
|
43
45
|
"vuetify": "^3.5.1",
|
|
44
|
-
"webfontloader": "^1.6.28"
|
|
45
|
-
"sass": "^1.60.0"
|
|
46
|
+
"webfontloader": "^1.6.28"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@babel/types": "^7.21.4",
|
|
@@ -51,7 +52,6 @@
|
|
|
51
52
|
"@vue/eslint-config-typescript": "^11.0.0",
|
|
52
53
|
"eslint": "^8.56.0",
|
|
53
54
|
"eslint-plugin-vue": "^9.19.2",
|
|
54
|
-
"stac-ts": "^1.0.3",
|
|
55
55
|
"typedoc": "^0.25.7",
|
|
56
56
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
57
57
|
"typescript": "^5.0.0",
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
"bin": {
|
|
64
64
|
"eodash": "./bin/app.js"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|
|
@@ -16,7 +16,7 @@ import 'animated-details'
|
|
|
16
16
|
|
|
17
17
|
const props = defineProps({
|
|
18
18
|
widgets: {
|
|
19
|
-
/** @type {import('vue').PropType<Omit<
|
|
19
|
+
/** @type {import('vue').PropType<Omit<import("@/types").Widget,'layout'>[]>} */
|
|
20
20
|
type: Array,
|
|
21
21
|
required: true,
|
|
22
22
|
}
|
package/bin/update.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { cp } from "fs/promises";
|
|
2
|
-
import { execPath, appPath, runtimeConfigPath } from "./utils.js";
|
|
3
|
-
import { existsSync } from "fs";
|
|
4
|
-
import path from "path";
|
|
5
|
-
|
|
6
|
-
export async function update() {
|
|
7
|
-
const execPublicPath = path.join(execPath, "/public"),
|
|
8
|
-
appPublicPath = path.join(appPath, "/public")
|
|
9
|
-
if (execPublicPath !== appPublicPath) {
|
|
10
|
-
await cp(execPublicPath, appPublicPath, { recursive: true }).catch(err => {
|
|
11
|
-
console.error(err)
|
|
12
|
-
})
|
|
13
|
-
if (existsSync(runtimeConfigPath)) {
|
|
14
|
-
await cp(runtimeConfigPath, path.join(appPath, '/public/config.js')).catch((e) => {
|
|
15
|
-
console.error(e)
|
|
16
|
-
})
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { eodashConfigKey } from "@/store/Keys"
|
|
2
|
-
import { inject } from "vue"
|
|
3
|
-
import store from '@/store'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sets user defined configuration on runtime.
|
|
7
|
-
* Consumes `/config.js` file from the base URL, and assign it to `eodashConfig`
|
|
8
|
-
* @async
|
|
9
|
-
* @returns {Promise<EodashConfig>}
|
|
10
|
-
* @see {@linkplain '@/eodashConfig.js'}
|
|
11
|
-
*/
|
|
12
|
-
export const useEodashRuntimeConfig = async () => {
|
|
13
|
-
const eodashConfig = /** @type {EodashConfig} */(inject(eodashConfigKey))
|
|
14
|
-
/**
|
|
15
|
-
* @param {EodashConfig} updatedConfig
|
|
16
|
-
*/
|
|
17
|
-
const assignConfig = (updatedConfig) => {
|
|
18
|
-
/** @type {(keyof EodashConfig)[]} */(Object.keys(eodashConfig))
|
|
19
|
-
.forEach((key) => {
|
|
20
|
-
//@ts-expect-error
|
|
21
|
-
eodashConfig[key] = updatedConfig[key]
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
assignConfig(
|
|
27
|
-
(await import( /* @vite-ignore */new URL('/config.js', import.meta.url).href)).default
|
|
28
|
-
)
|
|
29
|
-
} catch {
|
|
30
|
-
try {
|
|
31
|
-
assignConfig((await import("user:config")).default)
|
|
32
|
-
} catch {
|
|
33
|
-
console.error('no dashboard configuration assigned')
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return eodashConfig
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @param {(store:EodashStore)=>EodashConfig} configCallback
|
|
41
|
-
*/
|
|
42
|
-
export const defineCompiletimeConfig = (configCallback) => {
|
|
43
|
-
return configCallback(store)
|
|
44
|
-
}
|