mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add standalone test for web uploading - https://github.com/emsesp/EMS-ESP32/issues/1564
This commit is contained in:
22
.gitignore
vendored
22
.gitignore
vendored
@@ -30,7 +30,7 @@ stats.html
|
|||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
.pnp.*
|
.pnp.*
|
||||||
.yarn/*
|
*/.yarn/*
|
||||||
!.yarn/patches
|
!.yarn/patches
|
||||||
!.yarn/plugins
|
!.yarn/plugins
|
||||||
!.yarn/releases
|
!.yarn/releases
|
||||||
@@ -39,6 +39,16 @@ stats.html
|
|||||||
yarn.lock
|
yarn.lock
|
||||||
analyse.html
|
analyse.html
|
||||||
interface/vite.config.ts.timestamp*
|
interface/vite.config.ts.timestamp*
|
||||||
|
*.local
|
||||||
|
# i18n generated files
|
||||||
|
interface/src/i18n/i18n-react.tsx
|
||||||
|
interface/src/i18n/i18n-types.ts
|
||||||
|
interface/src/i18n/i18n-util.ts
|
||||||
|
interface/src/i18n/i18n-util.sync.ts
|
||||||
|
interface/src/i18n/i18n-util.async.ts
|
||||||
|
# mock-api uploads
|
||||||
|
*/uploads/*
|
||||||
|
!uploads/README.md
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
test.sh
|
test.sh
|
||||||
@@ -46,18 +56,10 @@ scripts/run.sh
|
|||||||
scripts/__pycache__
|
scripts/__pycache__
|
||||||
scripts/stackdmp.txt
|
scripts/stackdmp.txt
|
||||||
|
|
||||||
# i18n generated files
|
|
||||||
interface/src/i18n/i18n-react.tsx
|
|
||||||
interface/src/i18n/i18n-types.ts
|
|
||||||
interface/src/i18n/i18n-util.ts
|
|
||||||
interface/src/i18n/i18n-util.sync.ts
|
|
||||||
interface/src/i18n/i18n-util.async.ts
|
|
||||||
|
|
||||||
# sonar
|
# sonar
|
||||||
.scannerwork/
|
.scannerwork/
|
||||||
sonar/
|
sonar/
|
||||||
bw-output/
|
bw-output/
|
||||||
|
|
||||||
# testing
|
# standalone executable for testing
|
||||||
emsesp
|
emsesp
|
||||||
|
|
||||||
|
|||||||
7
interface/.gitignore
vendored
7
interface/.gitignore
vendored
@@ -1,7 +0,0 @@
|
|||||||
.pnp.*
|
|
||||||
.yarn/*
|
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/sdks
|
|
||||||
!.yarn/versions
|
|
||||||
@@ -14,8 +14,9 @@
|
|||||||
"preview-standalone": "typesafe-i18n --no-watch && vite build && concurrently -c \"auto\" \"npm:mock-api\" \"vite preview\"",
|
"preview-standalone": "typesafe-i18n --no-watch && vite build && concurrently -c \"auto\" \"npm:mock-api\" \"vite preview\"",
|
||||||
"mock-api": "bun --watch ../mock-api/rest_server.ts",
|
"mock-api": "bun --watch ../mock-api/rest_server.ts",
|
||||||
"mock-es": "bun --watch ../mock-api/es_server.ts",
|
"mock-es": "bun --watch ../mock-api/es_server.ts",
|
||||||
|
"mock-upload": "bun --watch ../mock-api/upload_server.ts",
|
||||||
"old_mock-api": "bun --watch ../mock-api/server.js",
|
"old_mock-api": "bun --watch ../mock-api/server.js",
|
||||||
"standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:mock-api\" \"npm:mock-es\" \"vite\"",
|
"standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:mock-api\" \"npm:mock-es\" \"npm:mock-upload\" \"vite\"",
|
||||||
"old_standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:old_mock-api\" \"vite\"",
|
"old_standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:old_mock-api\" \"vite\"",
|
||||||
"typesafe-i18n": "typesafe-i18n --no-watch",
|
"typesafe-i18n": "typesafe-i18n --no-watch",
|
||||||
"webUI": "node progmem-generator.js",
|
"webUI": "node progmem-generator.js",
|
||||||
@@ -24,19 +25,19 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alova/adapter-xhr": "^1.0.3",
|
"@alova/adapter-xhr": "^1.0.3",
|
||||||
"@babel/core": "^7.24.3",
|
"@babel/core": "^7.24.4",
|
||||||
"@emotion/react": "^11.11.4",
|
"@emotion/react": "^11.11.4",
|
||||||
"@emotion/styled": "^11.11.5",
|
"@emotion/styled": "^11.11.5",
|
||||||
"@mui/icons-material": "^5.15.14",
|
"@mui/icons-material": "^5.15.15",
|
||||||
"@mui/material": "^5.15.14",
|
"@mui/material": "^5.15.15",
|
||||||
"@table-library/react-table-library": "4.1.7",
|
"@table-library/react-table-library": "4.1.7",
|
||||||
"@types/imagemin": "^8.0.5",
|
"@types/imagemin": "^8.0.5",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^20.12.2",
|
"@types/node": "^20.12.5",
|
||||||
"@types/react": "^18.2.74",
|
"@types/react": "^18.2.74",
|
||||||
"@types/react-dom": "^18.2.23",
|
"@types/react-dom": "^18.2.24",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"alova": "^2.18.2",
|
"alova": "^2.18.3",
|
||||||
"async-validator": "^4.2.5",
|
"async-validator": "^4.2.5",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"history": "^5.3.0",
|
"history": "^5.3.0",
|
||||||
@@ -50,7 +51,7 @@
|
|||||||
"react-router-dom": "^6.22.3",
|
"react-router-dom": "^6.22.3",
|
||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"typesafe-i18n": "^5.26.2",
|
"typesafe-i18n": "^5.26.2",
|
||||||
"typescript": "^5.4.3"
|
"typescript": "^5.4.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preact/compat": "^17.1.2",
|
"@preact/compat": "^17.1.2",
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
||||||
"@typescript-eslint/parser": "^7.5.0",
|
"@typescript-eslint/parser": "^7.5.0",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.0.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-import-resolver-typescript": "^3.6.1",
|
"eslint-import-resolver-typescript": "^3.6.1",
|
||||||
"eslint-plugin-autofix": "^1.1.0",
|
"eslint-plugin-autofix": "^1.1.0",
|
||||||
@@ -68,8 +69,8 @@
|
|||||||
"preact": "^10.20.1",
|
"preact": "^10.20.1",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"terser": "^5.30.2",
|
"terser": "^5.30.3",
|
||||||
"vite": "^5.2.7",
|
"vite": "^5.2.8",
|
||||||
"vite-plugin-imagemin": "^0.6.1",
|
"vite-plugin-imagemin": "^0.6.1",
|
||||||
"vite-tsconfig-paths": "^4.3.2"
|
"vite-tsconfig-paths": "^4.3.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
open: true,
|
open: true,
|
||||||
port: mode == 'production' ? 4173 : 3000,
|
port: mode == 'production' ? 4173 : 3000,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/rest': 'http://localhost:3080',
|
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:3080',
|
target: 'http://localhost:3080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
@@ -23,7 +22,9 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
target: 'http://localhost:3081',
|
target: 'http://localhost:3081',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false
|
secure: false
|
||||||
}
|
},
|
||||||
|
'/rest/uploadFile': 'http://localhost:3082', // this must come first to work!
|
||||||
|
'/rest': 'http://localhost:3080'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@babel/core@npm:^7.22.1, @babel/core@npm:^7.24.3":
|
"@babel/core@npm:^7.22.1":
|
||||||
version: 7.24.3
|
version: 7.24.3
|
||||||
resolution: "@babel/core@npm:7.24.3"
|
resolution: "@babel/core@npm:7.24.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -69,6 +69,29 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/core@npm:^7.24.4":
|
||||||
|
version: 7.24.4
|
||||||
|
resolution: "@babel/core@npm:7.24.4"
|
||||||
|
dependencies:
|
||||||
|
"@ampproject/remapping": "npm:^2.2.0"
|
||||||
|
"@babel/code-frame": "npm:^7.24.2"
|
||||||
|
"@babel/generator": "npm:^7.24.4"
|
||||||
|
"@babel/helper-compilation-targets": "npm:^7.23.6"
|
||||||
|
"@babel/helper-module-transforms": "npm:^7.23.3"
|
||||||
|
"@babel/helpers": "npm:^7.24.4"
|
||||||
|
"@babel/parser": "npm:^7.24.4"
|
||||||
|
"@babel/template": "npm:^7.24.0"
|
||||||
|
"@babel/traverse": "npm:^7.24.1"
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
convert-source-map: "npm:^2.0.0"
|
||||||
|
debug: "npm:^4.1.0"
|
||||||
|
gensync: "npm:^1.0.0-beta.2"
|
||||||
|
json5: "npm:^2.2.3"
|
||||||
|
semver: "npm:^6.3.1"
|
||||||
|
checksum: 10/1e049f8df26be0fe5be36173fd7c33dfb004eeeec28152fea83c90e71784f9a6f2237296f43a2ee7d9041e2a33a05f43da48ce2d4e0cd473a682328ca07ce7e0
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/generator@npm:^7.24.1":
|
"@babel/generator@npm:^7.24.1":
|
||||||
version: 7.24.1
|
version: 7.24.1
|
||||||
resolution: "@babel/generator@npm:7.24.1"
|
resolution: "@babel/generator@npm:7.24.1"
|
||||||
@@ -81,6 +104,18 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/generator@npm:^7.24.4":
|
||||||
|
version: 7.24.4
|
||||||
|
resolution: "@babel/generator@npm:7.24.4"
|
||||||
|
dependencies:
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
"@jridgewell/gen-mapping": "npm:^0.3.5"
|
||||||
|
"@jridgewell/trace-mapping": "npm:^0.3.25"
|
||||||
|
jsesc: "npm:^2.5.1"
|
||||||
|
checksum: 10/69e1772dcf8f95baec951f422cca091d59a3f29b5eedc989ad87f7262289b94625983f6fe654302ca17aae0a32f9232332b83fcc85533311d6267b09c58b1061
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/helper-annotate-as-pure@npm:^7.22.5":
|
"@babel/helper-annotate-as-pure@npm:^7.22.5":
|
||||||
version: 7.22.5
|
version: 7.22.5
|
||||||
resolution: "@babel/helper-annotate-as-pure@npm:7.22.5"
|
resolution: "@babel/helper-annotate-as-pure@npm:7.22.5"
|
||||||
@@ -210,6 +245,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/helpers@npm:^7.24.4":
|
||||||
|
version: 7.24.4
|
||||||
|
resolution: "@babel/helpers@npm:7.24.4"
|
||||||
|
dependencies:
|
||||||
|
"@babel/template": "npm:^7.24.0"
|
||||||
|
"@babel/traverse": "npm:^7.24.1"
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
checksum: 10/54a9d0f86f2803fcc216cfa23b66b871ea0fa0a892af1c9a79075872c2437de71afbb150ed8216f30e00b19a0b9c5c9d5845173d170e1ebfbbf8887839b89dde
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/highlight@npm:^7.24.2":
|
"@babel/highlight@npm:^7.24.2":
|
||||||
version: 7.24.2
|
version: 7.24.2
|
||||||
resolution: "@babel/highlight@npm:7.24.2"
|
resolution: "@babel/highlight@npm:7.24.2"
|
||||||
@@ -231,6 +277,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/parser@npm:^7.24.4":
|
||||||
|
version: 7.24.4
|
||||||
|
resolution: "@babel/parser@npm:7.24.4"
|
||||||
|
bin:
|
||||||
|
parser: ./bin/babel-parser.js
|
||||||
|
checksum: 10/3742cc5068036287e6395269dce5a2735e6349cdc8d4b53297c75f98c580d7e1c8cb43235623999d151f2ef975d677dbc2c2357573a1855caa71c271bf3046c9
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/plugin-syntax-jsx@npm:^7.23.3":
|
"@babel/plugin-syntax-jsx@npm:^7.23.3":
|
||||||
version: 7.24.1
|
version: 7.24.1
|
||||||
resolution: "@babel/plugin-syntax-jsx@npm:7.24.1"
|
resolution: "@babel/plugin-syntax-jsx@npm:7.24.1"
|
||||||
@@ -662,27 +717,27 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/eslintrc@npm:^2.1.4":
|
"@eslint/eslintrc@npm:^3.0.2":
|
||||||
version: 2.1.4
|
version: 3.0.2
|
||||||
resolution: "@eslint/eslintrc@npm:2.1.4"
|
resolution: "@eslint/eslintrc@npm:3.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
ajv: "npm:^6.12.4"
|
ajv: "npm:^6.12.4"
|
||||||
debug: "npm:^4.3.2"
|
debug: "npm:^4.3.2"
|
||||||
espree: "npm:^9.6.0"
|
espree: "npm:^10.0.1"
|
||||||
globals: "npm:^13.19.0"
|
globals: "npm:^14.0.0"
|
||||||
ignore: "npm:^5.2.0"
|
ignore: "npm:^5.2.0"
|
||||||
import-fresh: "npm:^3.2.1"
|
import-fresh: "npm:^3.2.1"
|
||||||
js-yaml: "npm:^4.1.0"
|
js-yaml: "npm:^4.1.0"
|
||||||
minimatch: "npm:^3.1.2"
|
minimatch: "npm:^3.1.2"
|
||||||
strip-json-comments: "npm:^3.1.1"
|
strip-json-comments: "npm:^3.1.1"
|
||||||
checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8
|
checksum: 10/04e3d7de2b16fd59ba8985ecd6922eb488e630f94e4433858567a8a6c99b478bb7b47854b166b830b44905759547d0a03654eb1265952c812d5d1d70e3e4ccf9
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/js@npm:8.57.0":
|
"@eslint/js@npm:9.0.0":
|
||||||
version: 8.57.0
|
version: 9.0.0
|
||||||
resolution: "@eslint/js@npm:8.57.0"
|
resolution: "@eslint/js@npm:9.0.0"
|
||||||
checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0
|
checksum: 10/b14b20af72410ef53e3e77e7d83cc1d6e6554b0092ceb9f969d25d765f4d775b4be32b0cd99bbfd6ce72eb2e4fb6b39b42a159b31909fbe1b3a5e88d75211687
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -724,14 +779,14 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@humanwhocodes/config-array@npm:^0.11.14":
|
"@humanwhocodes/config-array@npm:^0.12.3":
|
||||||
version: 0.11.14
|
version: 0.12.3
|
||||||
resolution: "@humanwhocodes/config-array@npm:0.11.14"
|
resolution: "@humanwhocodes/config-array@npm:0.12.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@humanwhocodes/object-schema": "npm:^2.0.2"
|
"@humanwhocodes/object-schema": "npm:^2.0.3"
|
||||||
debug: "npm:^4.3.1"
|
debug: "npm:^4.3.1"
|
||||||
minimatch: "npm:^3.0.5"
|
minimatch: "npm:^3.0.5"
|
||||||
checksum: 10/3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a
|
checksum: 10/b05f528c110aa1657d95d213e4ad2662f4161e838806af01a4d3f3b6ee3878d9b6f87d1b10704917f5c2f116757cb5c818480c32c4c4c6f84fe775a170b5f758
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -742,10 +797,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@humanwhocodes/object-schema@npm:^2.0.2":
|
"@humanwhocodes/object-schema@npm:^2.0.3":
|
||||||
version: 2.0.2
|
version: 2.0.3
|
||||||
resolution: "@humanwhocodes/object-schema@npm:2.0.2"
|
resolution: "@humanwhocodes/object-schema@npm:2.0.3"
|
||||||
checksum: 10/ef915e3e2f34652f3d383b28a9a99cfea476fa991482370889ab14aac8ecd2b38d47cc21932526c6d949da0daf4a4a6bf629d30f41b0caca25e146819cbfa70e
|
checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -837,16 +892,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/core-downloads-tracker@npm:^5.15.14":
|
"@mui/core-downloads-tracker@npm:^5.15.15":
|
||||||
version: 5.15.14
|
version: 5.15.15
|
||||||
resolution: "@mui/core-downloads-tracker@npm:5.15.14"
|
resolution: "@mui/core-downloads-tracker@npm:5.15.15"
|
||||||
checksum: 10/0a1c63d906af594d0a7fb63d1d574482b3916351ea8908e8621c8bfa16ac38cf4edb5a334f0e28084f583ac928b587cab6e031f992195e0a590186faba13b9a5
|
checksum: 10/3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/icons-material@npm:^5.15.14":
|
"@mui/icons-material@npm:^5.15.15":
|
||||||
version: 5.15.14
|
version: 5.15.15
|
||||||
resolution: "@mui/icons-material@npm:5.15.14"
|
resolution: "@mui/icons-material@npm:5.15.15"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -856,18 +911,18 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/a5033b67d4ff455f5fdd91fc51d26d967d634e861cde194b9dde02a8cc3f557d1b3f7e0b3175bc654b8e944f2118d46620485734ecd9d2ed4a6f748386447933
|
checksum: 10/e8810d7ffbba914baf21509e5d664f5f23bdba5d2a7ec7c485a3c7ddbbcb417e555c31feff2a3fa9c7d7fa0d22d4380f32488559ab3b170d891641dbc2161b22
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/material@npm:^5.15.14":
|
"@mui/material@npm:^5.15.15":
|
||||||
version: 5.15.14
|
version: 5.15.15
|
||||||
resolution: "@mui/material@npm:5.15.14"
|
resolution: "@mui/material@npm:5.15.15"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@mui/base": "npm:5.0.0-beta.40"
|
"@mui/base": "npm:5.0.0-beta.40"
|
||||||
"@mui/core-downloads-tracker": "npm:^5.15.14"
|
"@mui/core-downloads-tracker": "npm:^5.15.15"
|
||||||
"@mui/system": "npm:^5.15.14"
|
"@mui/system": "npm:^5.15.15"
|
||||||
"@mui/types": "npm:^7.2.14"
|
"@mui/types": "npm:^7.2.14"
|
||||||
"@mui/utils": "npm:^5.15.14"
|
"@mui/utils": "npm:^5.15.14"
|
||||||
"@types/react-transition-group": "npm:^4.4.10"
|
"@types/react-transition-group": "npm:^4.4.10"
|
||||||
@@ -889,7 +944,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/a2c3355b39b86472bf2debb84d6c032b1ea4ba691fbda0f25803f2702f9106130bb85a7d2757545ce97540fe185f07cf24574d5786a29df26baa298ff7db063b
|
checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -931,9 +986,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/system@npm:^5.15.14":
|
"@mui/system@npm:^5.15.15":
|
||||||
version: 5.15.14
|
version: 5.15.15
|
||||||
resolution: "@mui/system@npm:5.15.14"
|
resolution: "@mui/system@npm:5.15.15"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@mui/private-theming": "npm:^5.15.14"
|
"@mui/private-theming": "npm:^5.15.14"
|
||||||
@@ -955,7 +1010,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/64a9eac1bebefad3042cce28a75d0af2828aa71acd4c32fb0267f5e68bc75b16a093b6fb30709db83ec32130f14f1d67c1c27457ef62733e54a9d04f9b027cee
|
checksum: 10/90a84ad0bc1b401b6e53b13fe9cfe8a34668e84885d391abf5ab80b3cd0f37370be25cb40af253cdd468746386282fed24964315933fcb28d2d6e62de0db7bf1
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1419,12 +1474,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^20.12.2":
|
"@types/node@npm:^20.12.5":
|
||||||
version: 20.12.2
|
version: 20.12.5
|
||||||
resolution: "@types/node@npm:20.12.2"
|
resolution: "@types/node@npm:20.12.5"
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: "npm:~5.26.4"
|
undici-types: "npm:~5.26.4"
|
||||||
checksum: 10/f1f0ebfe475aefa183763b856e0023b81b76554196e8676a45b9fcfd1012cdd20d32adefb3c0330001c0011e074676603c34c24821a4924228250ea13a75da43
|
checksum: 10/7b647ea6679016e4e58e1aa439c46b610230ffcbe19173911fbf1d1fa329ec6fd1eeba4e3e2d8743206d3b00d5a0cad75f1c90189e1d1ec057eb48df1a1dd747
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1442,12 +1497,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/react-dom@npm:^18.2.23":
|
"@types/react-dom@npm:^18.2.24":
|
||||||
version: 18.2.23
|
version: 18.2.24
|
||||||
resolution: "@types/react-dom@npm:18.2.23"
|
resolution: "@types/react-dom@npm:18.2.24"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/react": "npm:*"
|
"@types/react": "npm:*"
|
||||||
checksum: 10/8311c67767b0aafb5cd94176a90f801f0f5f6930731d57caaa04bb0d87fdef6bc6f723a116d9777d2082ec022682acaad7a62d04dc27e330e818cf34f2ef2703
|
checksum: 10/bbd4005f2f65b7606505e9b8759b6e99e222d503602765594ea327893fb7061de8951279baef47a1932f04d94d1865daea05a32f9fcf6f9f1143dbabce5b33de
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1657,38 +1712,31 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@ungap/structured-clone@npm:^1.2.0":
|
|
||||||
version: 1.2.0
|
|
||||||
resolution: "@ungap/structured-clone@npm:1.2.0"
|
|
||||||
checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"EMS-ESP@workspace:.":
|
"EMS-ESP@workspace:.":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "EMS-ESP@workspace:."
|
resolution: "EMS-ESP@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@alova/adapter-xhr": "npm:^1.0.3"
|
"@alova/adapter-xhr": "npm:^1.0.3"
|
||||||
"@babel/core": "npm:^7.24.3"
|
"@babel/core": "npm:^7.24.4"
|
||||||
"@emotion/react": "npm:^11.11.4"
|
"@emotion/react": "npm:^11.11.4"
|
||||||
"@emotion/styled": "npm:^11.11.5"
|
"@emotion/styled": "npm:^11.11.5"
|
||||||
"@mui/icons-material": "npm:^5.15.14"
|
"@mui/icons-material": "npm:^5.15.15"
|
||||||
"@mui/material": "npm:^5.15.14"
|
"@mui/material": "npm:^5.15.15"
|
||||||
"@preact/compat": "npm:^17.1.2"
|
"@preact/compat": "npm:^17.1.2"
|
||||||
"@preact/preset-vite": "npm:^2.8.2"
|
"@preact/preset-vite": "npm:^2.8.2"
|
||||||
"@table-library/react-table-library": "npm:4.1.7"
|
"@table-library/react-table-library": "npm:4.1.7"
|
||||||
"@types/imagemin": "npm:^8.0.5"
|
"@types/imagemin": "npm:^8.0.5"
|
||||||
"@types/lodash-es": "npm:^4.17.12"
|
"@types/lodash-es": "npm:^4.17.12"
|
||||||
"@types/node": "npm:^20.12.2"
|
"@types/node": "npm:^20.12.5"
|
||||||
"@types/react": "npm:^18.2.74"
|
"@types/react": "npm:^18.2.74"
|
||||||
"@types/react-dom": "npm:^18.2.23"
|
"@types/react-dom": "npm:^18.2.24"
|
||||||
"@types/react-router-dom": "npm:^5.3.3"
|
"@types/react-router-dom": "npm:^5.3.3"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^7.5.0"
|
"@typescript-eslint/eslint-plugin": "npm:^7.5.0"
|
||||||
"@typescript-eslint/parser": "npm:^7.5.0"
|
"@typescript-eslint/parser": "npm:^7.5.0"
|
||||||
alova: "npm:^2.18.2"
|
alova: "npm:^2.18.3"
|
||||||
async-validator: "npm:^4.2.5"
|
async-validator: "npm:^4.2.5"
|
||||||
concurrently: "npm:^8.2.2"
|
concurrently: "npm:^8.2.2"
|
||||||
eslint: "npm:^8.57.0"
|
eslint: "npm:^9.0.0"
|
||||||
eslint-config-prettier: "npm:^9.1.0"
|
eslint-config-prettier: "npm:^9.1.0"
|
||||||
eslint-import-resolver-typescript: "npm:^3.6.1"
|
eslint-import-resolver-typescript: "npm:^3.6.1"
|
||||||
eslint-plugin-autofix: "npm:^1.1.0"
|
eslint-plugin-autofix: "npm:^1.1.0"
|
||||||
@@ -1709,10 +1757,10 @@ __metadata:
|
|||||||
react-router-dom: "npm:^6.22.3"
|
react-router-dom: "npm:^6.22.3"
|
||||||
react-toastify: "npm:^10.0.5"
|
react-toastify: "npm:^10.0.5"
|
||||||
rollup-plugin-visualizer: "npm:^5.12.0"
|
rollup-plugin-visualizer: "npm:^5.12.0"
|
||||||
terser: "npm:^5.30.2"
|
terser: "npm:^5.30.3"
|
||||||
typesafe-i18n: "npm:^5.26.2"
|
typesafe-i18n: "npm:^5.26.2"
|
||||||
typescript: "npm:^5.4.3"
|
typescript: "npm:^5.4.4"
|
||||||
vite: "npm:^5.2.7"
|
vite: "npm:^5.2.8"
|
||||||
vite-plugin-imagemin: "npm:^0.6.1"
|
vite-plugin-imagemin: "npm:^0.6.1"
|
||||||
vite-tsconfig-paths: "npm:^4.3.2"
|
vite-tsconfig-paths: "npm:^4.3.2"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
@@ -1734,7 +1782,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"acorn@npm:^8.8.2, acorn@npm:^8.9.0":
|
"acorn@npm:^8.11.3, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
|
||||||
version: 8.11.3
|
version: 8.11.3
|
||||||
resolution: "acorn@npm:8.11.3"
|
resolution: "acorn@npm:8.11.3"
|
||||||
bin:
|
bin:
|
||||||
@@ -1774,10 +1822,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"alova@npm:^2.18.2":
|
"alova@npm:^2.18.3":
|
||||||
version: 2.18.2
|
version: 2.18.3
|
||||||
resolution: "alova@npm:2.18.2"
|
resolution: "alova@npm:2.18.3"
|
||||||
checksum: 10/715d97c5b80c2b3541b7b5dd203bb7496d7308a49682df31ed007c12a7d716ee910f3da852accc2398c2283db3808748678074cb87324b5d77bb991018431bf3
|
checksum: 10/0a76cd8aed07a8af0409efb1f39e1c6c6423eb763dbc86b937052497157bdbe10faf77d01b8785934fbd74deb78efe6303949b0b2d410a24bbc687671ec3ae6c
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -2834,15 +2882,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"doctrine@npm:^3.0.0":
|
|
||||||
version: 3.0.0
|
|
||||||
resolution: "doctrine@npm:3.0.0"
|
|
||||||
dependencies:
|
|
||||||
esutils: "npm:^2.0.2"
|
|
||||||
checksum: 10/b4b28f1df5c563f7d876e7461254a4597b8cabe915abe94d7c5d1633fed263fcf9a85e8d3836591fc2d040108e822b0d32758e5ec1fe31c590dc7e08086e3e48
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"dom-helpers@npm:^5.0.1":
|
"dom-helpers@npm:^5.0.1":
|
||||||
version: 5.2.1
|
version: 5.2.1
|
||||||
resolution: "dom-helpers@npm:5.2.1"
|
resolution: "dom-helpers@npm:5.2.1"
|
||||||
@@ -3666,57 +3705,60 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint-scope@npm:^7.2.2":
|
"eslint-scope@npm:^8.0.1":
|
||||||
version: 7.2.2
|
version: 8.0.1
|
||||||
resolution: "eslint-scope@npm:7.2.2"
|
resolution: "eslint-scope@npm:8.0.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
esrecurse: "npm:^4.3.0"
|
esrecurse: "npm:^4.3.0"
|
||||||
estraverse: "npm:^5.2.0"
|
estraverse: "npm:^5.2.0"
|
||||||
checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491
|
checksum: 10/458513863d3c79005b599f40250437bddba923f18549058ea45820a8d3d4bbc67fe292751d522a0cab69dd01fe211ffde5c1a5fc867e86f2d28727b1d61610da
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3":
|
"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1":
|
||||||
version: 3.4.3
|
version: 3.4.3
|
||||||
resolution: "eslint-visitor-keys@npm:3.4.3"
|
resolution: "eslint-visitor-keys@npm:3.4.3"
|
||||||
checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b
|
checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint@npm:^8.57.0":
|
"eslint-visitor-keys@npm:^4.0.0":
|
||||||
version: 8.57.0
|
version: 4.0.0
|
||||||
resolution: "eslint@npm:8.57.0"
|
resolution: "eslint-visitor-keys@npm:4.0.0"
|
||||||
|
checksum: 10/c7617166e6291a15ce2982b5c4b9cdfb6409f5c14562712d12e2584480cdf18609694b21d7dad35b02df0fa2cd037505048ded54d2f405c64f600949564eb334
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"eslint@npm:^9.0.0":
|
||||||
|
version: 9.0.0
|
||||||
|
resolution: "eslint@npm:9.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/eslint-utils": "npm:^4.2.0"
|
"@eslint-community/eslint-utils": "npm:^4.2.0"
|
||||||
"@eslint-community/regexpp": "npm:^4.6.1"
|
"@eslint-community/regexpp": "npm:^4.6.1"
|
||||||
"@eslint/eslintrc": "npm:^2.1.4"
|
"@eslint/eslintrc": "npm:^3.0.2"
|
||||||
"@eslint/js": "npm:8.57.0"
|
"@eslint/js": "npm:9.0.0"
|
||||||
"@humanwhocodes/config-array": "npm:^0.11.14"
|
"@humanwhocodes/config-array": "npm:^0.12.3"
|
||||||
"@humanwhocodes/module-importer": "npm:^1.0.1"
|
"@humanwhocodes/module-importer": "npm:^1.0.1"
|
||||||
"@nodelib/fs.walk": "npm:^1.2.8"
|
"@nodelib/fs.walk": "npm:^1.2.8"
|
||||||
"@ungap/structured-clone": "npm:^1.2.0"
|
|
||||||
ajv: "npm:^6.12.4"
|
ajv: "npm:^6.12.4"
|
||||||
chalk: "npm:^4.0.0"
|
chalk: "npm:^4.0.0"
|
||||||
cross-spawn: "npm:^7.0.2"
|
cross-spawn: "npm:^7.0.2"
|
||||||
debug: "npm:^4.3.2"
|
debug: "npm:^4.3.2"
|
||||||
doctrine: "npm:^3.0.0"
|
|
||||||
escape-string-regexp: "npm:^4.0.0"
|
escape-string-regexp: "npm:^4.0.0"
|
||||||
eslint-scope: "npm:^7.2.2"
|
eslint-scope: "npm:^8.0.1"
|
||||||
eslint-visitor-keys: "npm:^3.4.3"
|
eslint-visitor-keys: "npm:^4.0.0"
|
||||||
espree: "npm:^9.6.1"
|
espree: "npm:^10.0.1"
|
||||||
esquery: "npm:^1.4.2"
|
esquery: "npm:^1.4.2"
|
||||||
esutils: "npm:^2.0.2"
|
esutils: "npm:^2.0.2"
|
||||||
fast-deep-equal: "npm:^3.1.3"
|
fast-deep-equal: "npm:^3.1.3"
|
||||||
file-entry-cache: "npm:^6.0.1"
|
file-entry-cache: "npm:^8.0.0"
|
||||||
find-up: "npm:^5.0.0"
|
find-up: "npm:^5.0.0"
|
||||||
glob-parent: "npm:^6.0.2"
|
glob-parent: "npm:^6.0.2"
|
||||||
globals: "npm:^13.19.0"
|
|
||||||
graphemer: "npm:^1.4.0"
|
graphemer: "npm:^1.4.0"
|
||||||
ignore: "npm:^5.2.0"
|
ignore: "npm:^5.2.0"
|
||||||
imurmurhash: "npm:^0.1.4"
|
imurmurhash: "npm:^0.1.4"
|
||||||
is-glob: "npm:^4.0.0"
|
is-glob: "npm:^4.0.0"
|
||||||
is-path-inside: "npm:^3.0.3"
|
is-path-inside: "npm:^3.0.3"
|
||||||
js-yaml: "npm:^4.1.0"
|
|
||||||
json-stable-stringify-without-jsonify: "npm:^1.0.1"
|
json-stable-stringify-without-jsonify: "npm:^1.0.1"
|
||||||
levn: "npm:^0.4.1"
|
levn: "npm:^0.4.1"
|
||||||
lodash.merge: "npm:^4.6.2"
|
lodash.merge: "npm:^4.6.2"
|
||||||
@@ -3727,11 +3769,22 @@ __metadata:
|
|||||||
text-table: "npm:^0.2.0"
|
text-table: "npm:^0.2.0"
|
||||||
bin:
|
bin:
|
||||||
eslint: bin/eslint.js
|
eslint: bin/eslint.js
|
||||||
checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15
|
checksum: 10/5cf03e14eb114f95bc4e553c8ae2da65ec09d519779beb08e326d98518bce647ce9c8bf3467bcea4cab35a2657cc3a8e945717e784afa4b1bdb9d1ecd9173ba0
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"espree@npm:^9.0.0, espree@npm:^9.6.0, espree@npm:^9.6.1":
|
"espree@npm:^10.0.1":
|
||||||
|
version: 10.0.1
|
||||||
|
resolution: "espree@npm:10.0.1"
|
||||||
|
dependencies:
|
||||||
|
acorn: "npm:^8.11.3"
|
||||||
|
acorn-jsx: "npm:^5.3.2"
|
||||||
|
eslint-visitor-keys: "npm:^4.0.0"
|
||||||
|
checksum: 10/557d6cfb4894b1489effcaed8702682086033f8a2449568933bc59493734733d750f2a87907ba575844d3933340aea2d84288f5e67020c6152f6fd18a86497b2
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"espree@npm:^9.0.0":
|
||||||
version: 9.6.1
|
version: 9.6.1
|
||||||
resolution: "espree@npm:9.6.1"
|
resolution: "espree@npm:9.6.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3973,12 +4026,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"file-entry-cache@npm:^6.0.1":
|
"file-entry-cache@npm:^8.0.0":
|
||||||
version: 6.0.1
|
version: 8.0.0
|
||||||
resolution: "file-entry-cache@npm:6.0.1"
|
resolution: "file-entry-cache@npm:8.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
flat-cache: "npm:^3.0.4"
|
flat-cache: "npm:^4.0.0"
|
||||||
checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b
|
checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -4103,14 +4156,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"flat-cache@npm:^3.0.4":
|
"flat-cache@npm:^4.0.0":
|
||||||
version: 3.2.0
|
version: 4.0.1
|
||||||
resolution: "flat-cache@npm:3.2.0"
|
resolution: "flat-cache@npm:4.0.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
flatted: "npm:^3.2.9"
|
flatted: "npm:^3.2.9"
|
||||||
keyv: "npm:^4.5.3"
|
keyv: "npm:^4.5.4"
|
||||||
rimraf: "npm:^3.0.2"
|
checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc
|
||||||
checksum: 10/02381c6ece5e9fa5b826c9bbea481d7fd77645d96e4b0b1395238124d581d10e56f17f723d897b6d133970f7a57f0fab9148cbbb67237a0a0ffe794ba60c0c70
|
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -4424,12 +4476,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"globals@npm:^13.19.0":
|
"globals@npm:^14.0.0":
|
||||||
version: 13.24.0
|
version: 14.0.0
|
||||||
resolution: "globals@npm:13.24.0"
|
resolution: "globals@npm:14.0.0"
|
||||||
dependencies:
|
checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021
|
||||||
type-fest: "npm:^0.20.2"
|
|
||||||
checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e
|
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -5513,7 +5563,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"keyv@npm:^4.5.3":
|
"keyv@npm:^4.5.4":
|
||||||
version: 4.5.4
|
version: 4.5.4
|
||||||
resolution: "keyv@npm:4.5.4"
|
resolution: "keyv@npm:4.5.4"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -7049,17 +7099,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"rimraf@npm:^3.0.2":
|
|
||||||
version: 3.0.2
|
|
||||||
resolution: "rimraf@npm:3.0.2"
|
|
||||||
dependencies:
|
|
||||||
glob: "npm:^7.1.3"
|
|
||||||
bin:
|
|
||||||
rimraf: bin.js
|
|
||||||
checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"rollup-plugin-visualizer@npm:^5.12.0":
|
"rollup-plugin-visualizer@npm:^5.12.0":
|
||||||
version: 5.12.0
|
version: 5.12.0
|
||||||
resolution: "rollup-plugin-visualizer@npm:5.12.0"
|
resolution: "rollup-plugin-visualizer@npm:5.12.0"
|
||||||
@@ -7861,9 +7900,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"terser@npm:^5.30.2":
|
"terser@npm:^5.30.3":
|
||||||
version: 5.30.2
|
version: 5.30.3
|
||||||
resolution: "terser@npm:5.30.2"
|
resolution: "terser@npm:5.30.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/source-map": "npm:^0.3.3"
|
"@jridgewell/source-map": "npm:^0.3.3"
|
||||||
acorn: "npm:^8.8.2"
|
acorn: "npm:^8.8.2"
|
||||||
@@ -7871,7 +7910,7 @@ __metadata:
|
|||||||
source-map-support: "npm:~0.5.20"
|
source-map-support: "npm:~0.5.20"
|
||||||
bin:
|
bin:
|
||||||
terser: bin/terser
|
terser: bin/terser
|
||||||
checksum: 10/df671714eb9160cc61d340ddbe6e54f66060bc893c2d420090e10df7f1a2e459725a56dc2e547e992c021ad4523b81eabc8f5a551c53505def80b7320a72506a
|
checksum: 10/f4ee378065a327c85472f351ac232fa47ec84d4f15df7ec58c044b41e3c063cf11aaedd90dcfe9c7f2a6ef01d4aab23deb61622301170dc77d0a8b6a6a83cf5e
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -8011,13 +8050,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"type-fest@npm:^0.20.2":
|
|
||||||
version: 0.20.2
|
|
||||||
resolution: "type-fest@npm:0.20.2"
|
|
||||||
checksum: 10/8907e16284b2d6cfa4f4817e93520121941baba36b39219ea36acfe64c86b9dbc10c9941af450bd60832c8f43464974d51c0957f9858bc66b952b66b6914cbb9
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"typed-array-buffer@npm:^1.0.2":
|
"typed-array-buffer@npm:^1.0.2":
|
||||||
version: 1.0.2
|
version: 1.0.2
|
||||||
resolution: "typed-array-buffer@npm:1.0.2"
|
resolution: "typed-array-buffer@npm:1.0.2"
|
||||||
@@ -8081,23 +8113,23 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@npm:^5.4.3":
|
"typescript@npm:^5.4.4":
|
||||||
version: 5.4.3
|
version: 5.4.4
|
||||||
resolution: "typescript@npm:5.4.3"
|
resolution: "typescript@npm:5.4.4"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 10/de4c69f49a7ad4b1ea66a6dcc8b055ac34eb56af059a069d8988dd811c5e649be07e042e5bf573e8d0ac3ec2f30e6c999aa651cd09f6e9cbc6113749e8b6be20
|
checksum: 10/bade322d88fd93c8179e262aca9ba7f7b4417c09117879819c87946578c782ab123e3acb4733046a6e38714c47ef927360045a1f9292a1bff3a05a6577d27ca2
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@npm%3A^5.4.3#optional!builtin<compat/typescript>":
|
"typescript@patch:typescript@npm%3A^5.4.4#optional!builtin<compat/typescript>":
|
||||||
version: 5.4.3
|
version: 5.4.4
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin<compat/typescript>::version=5.4.3&hash=5adc0c"
|
resolution: "typescript@patch:typescript@npm%3A5.4.4#optional!builtin<compat/typescript>::version=5.4.4&hash=5adc0c"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 10/5aedd97595582b08aadb8a70e8e3ddebaf5a9c1e5ad4d6503c2fcfc15329b5cf8d01145b09913e9555683ac16c5123a96be32b6d72614098ebd42df520eed9b1
|
checksum: 10/88aff3244c31d4c6ede05b4fd28732fc8935a7fc638f2a3dcbbb767d1ac98e4b077f21ec74bc97f43c9307bc3f27e2359def1d793f9918c3429a744408fd75b4
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -8278,9 +8310,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"vite@npm:^5.2.7":
|
"vite@npm:^5.2.8":
|
||||||
version: 5.2.7
|
version: 5.2.8
|
||||||
resolution: "vite@npm:5.2.7"
|
resolution: "vite@npm:5.2.8"
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: "npm:^0.20.1"
|
esbuild: "npm:^0.20.1"
|
||||||
fsevents: "npm:~2.3.3"
|
fsevents: "npm:~2.3.3"
|
||||||
@@ -8314,7 +8346,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
vite: bin/vite.js
|
vite: bin/vite.js
|
||||||
checksum: 10/a00173446c8392069a70a92be78b060f7e5895f28c229eb25198953daa55c16ffbddcd4e8f015f220b2b1113e12d30e7a892221de34be336b222a12cddbb78a4
|
checksum: 10/caa40343c2c4e6d8e257fccb4c3029f62909c319a86063ce727ed550925c0a834460b0d1ca20c4d6c915f35302aa1052f6ec5193099a47ce21d74b9b817e69e1
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
[*.{js,json,yml}]
|
|
||||||
charset = utf-8
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
4
mock-api/.gitattributes
vendored
4
mock-api/.gitattributes
vendored
@@ -1,4 +0,0 @@
|
|||||||
/.yarn/** linguist-vendored
|
|
||||||
/.yarn/releases/* binary
|
|
||||||
/.yarn/plugins/**/* binary
|
|
||||||
/.pnp.* binary linguist-generated
|
|
||||||
9
mock-api/.gitignore
vendored
9
mock-api/.gitignore
vendored
@@ -1,9 +0,0 @@
|
|||||||
.pnp.*
|
|
||||||
.yarn/*
|
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/sdks
|
|
||||||
!.yarn/versions
|
|
||||||
uploads/*
|
|
||||||
!uploads/README.md
|
|
||||||
@@ -64,4 +64,4 @@ rest_server.get(ES_LOG_ENDPOINT, (_req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// start eventsource server
|
// start eventsource server
|
||||||
rest_server.listen(port, () => console.log(`EMS-ESP EventSource server running on http://localhost:${port}/`));
|
rest_server.listen(port, () => console.log(`EMS-ESP EventSource mock server running on http://localhost:${port}/`));
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,14 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"mock-api": "bun --watch rest_server.ts",
|
"mock-api": "bun --watch rest_server.ts",
|
||||||
"mock-es": "bun --watch es_server.ts"
|
"mock-es": "bun --watch es_server.ts",
|
||||||
|
"mock-upload": "bun --watch upload_server.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@msgpack/msgpack": "^2.8.0",
|
"@msgpack/msgpack": "^2.8.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"itty-router": "^5.0.5",
|
"itty-router": "^5.0.9",
|
||||||
"multer": "^1.4.5-lts.1"
|
"multer": "^1.4.5-lts.1"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.1.1",
|
"packageManager": "yarn@4.1.1",
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import { AutoRouter, error, status } from 'itty-router';
|
import { AutoRouter, error, status } from 'itty-router';
|
||||||
import { Encoder } from '@msgpack/msgpack';
|
import { Encoder } from '@msgpack/msgpack';
|
||||||
|
|
||||||
// import busboy from 'busboy';
|
|
||||||
// import multer from 'multer';
|
|
||||||
// const upload = multer({ dest: '../mock-api/uploads' });
|
|
||||||
|
|
||||||
const encoder = new Encoder();
|
const encoder = new Encoder();
|
||||||
|
|
||||||
const router = AutoRouter({
|
const router = AutoRouter({
|
||||||
port: 3080,
|
port: 3080,
|
||||||
missing: () => error(404, 'Error, not found')
|
missing: () => error(404, 'Error, endpoint not found')
|
||||||
});
|
});
|
||||||
|
|
||||||
const REST_ENDPOINT_ROOT = '/rest/';
|
const REST_ENDPOINT_ROOT = '/rest/';
|
||||||
@@ -24,17 +20,6 @@ const headers = {
|
|||||||
// GLOBAL VARIABLES
|
// GLOBAL VARIABLES
|
||||||
let countWifiScanPoll = 0; // wifi network scan
|
let countWifiScanPoll = 0; // wifi network scan
|
||||||
|
|
||||||
// FUNCTIONS
|
|
||||||
// const delay = (ms) => new Promise((res) => setTimeout(res, ms));
|
|
||||||
// function delay_blocking(milliseconds) {
|
|
||||||
// var start = new Date().getTime();
|
|
||||||
// for (var i = 0; i < 1e7; i++) {
|
|
||||||
// if (new Date().getTime() - start > milliseconds) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
function updateMask(entity: any, de: any, dd: any) {
|
function updateMask(entity: any, de: any, dd: any) {
|
||||||
const current_mask = parseInt(entity.slice(0, 2), 16);
|
const current_mask = parseInt(entity.slice(0, 2), 16);
|
||||||
|
|
||||||
@@ -364,7 +349,6 @@ const ESPSYSTEM_STATUS_ENDPOINT = REST_ENDPOINT_ROOT + 'ESPSystemStatus';
|
|||||||
const SECURITY_SETTINGS_ENDPOINT = REST_ENDPOINT_ROOT + 'securitySettings';
|
const SECURITY_SETTINGS_ENDPOINT = REST_ENDPOINT_ROOT + 'securitySettings';
|
||||||
const RESTART_ENDPOINT = REST_ENDPOINT_ROOT + 'restart';
|
const RESTART_ENDPOINT = REST_ENDPOINT_ROOT + 'restart';
|
||||||
const FACTORY_RESET_ENDPOINT = REST_ENDPOINT_ROOT + 'factoryReset';
|
const FACTORY_RESET_ENDPOINT = REST_ENDPOINT_ROOT + 'factoryReset';
|
||||||
const UPLOAD_FILE_ENDPOINT = REST_ENDPOINT_ROOT + 'uploadFile';
|
|
||||||
|
|
||||||
// SYSTEM SIGNIN
|
// SYSTEM SIGNIN
|
||||||
const VERIFY_AUTHORIZATION_ENDPOINT = REST_ENDPOINT_ROOT + 'verifyAuthorization';
|
const VERIFY_AUTHORIZATION_ENDPOINT = REST_ENDPOINT_ROOT + 'verifyAuthorization';
|
||||||
@@ -2394,107 +2378,9 @@ router
|
|||||||
.get(VERIFY_AUTHORIZATION_ENDPOINT, () => verify_authentication)
|
.get(VERIFY_AUTHORIZATION_ENDPOINT, () => verify_authentication)
|
||||||
.post(RESTART_ENDPOINT, () => status(200))
|
.post(RESTART_ENDPOINT, () => status(200))
|
||||||
.post(FACTORY_RESET_ENDPOINT, () => status(200))
|
.post(FACTORY_RESET_ENDPOINT, () => status(200))
|
||||||
.post(UPLOAD_FILE_ENDPOINT, () => status(404)) // TODO remove upload when fixed
|
|
||||||
.post(SIGN_IN_ENDPOINT, () => signin)
|
.post(SIGN_IN_ENDPOINT, () => signin)
|
||||||
.get(GENERATE_TOKEN_ENDPOINT, () => generate_token);
|
.get(GENERATE_TOKEN_ENDPOINT, () => generate_token);
|
||||||
|
|
||||||
// uploads // TODO fix uploading later
|
|
||||||
|
|
||||||
// const progress_middleware = async (req: any) => {
|
|
||||||
// console.log('progress_middleware');
|
|
||||||
// let progress = 0;
|
|
||||||
// const file_size = req.headers['content-length'];
|
|
||||||
|
|
||||||
// // set event listener
|
|
||||||
// req.on('data', async (chunk) => {
|
|
||||||
// progress += chunk.length;
|
|
||||||
// const percentage = (progress / file_size) * 100;
|
|
||||||
// console.log(`Progress: ${Math.round(percentage)}%`);
|
|
||||||
// delay_blocking(200); // slow it down
|
|
||||||
// });
|
|
||||||
// // next(); // invoke next middleware which is multer
|
|
||||||
// };
|
|
||||||
|
|
||||||
// const withContent = async (request) => {
|
|
||||||
// const { headers } = request;
|
|
||||||
// const type = headers.get('content-type');
|
|
||||||
|
|
||||||
// // console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(request)));
|
|
||||||
|
|
||||||
// if (type?.includes('form-data')) {
|
|
||||||
// console.log('withContent: got formdata');
|
|
||||||
// // request.content = await request.formData();
|
|
||||||
|
|
||||||
// // const bb = busboy({ headers: request.headers });
|
|
||||||
// // console.log('bb created');
|
|
||||||
// // bb.on('file', (name, file, info) => {
|
|
||||||
// // const { filename, encoding, mimeType } = info;
|
|
||||||
// // console.log(`File [${name}]: filename: %j, encoding: %j, mimeType: %j`, filename, encoding, mimeType);
|
|
||||||
// // request.filename = filename;
|
|
||||||
|
|
||||||
// // file
|
|
||||||
// // .on('data', (data) => {
|
|
||||||
// // console.log(`File [${name}] got ${data.length} bytes`);
|
|
||||||
// // })
|
|
||||||
// // .on('close', () => {
|
|
||||||
// // console.log(`File [${name}] done`);
|
|
||||||
// // });
|
|
||||||
// // });
|
|
||||||
// // bb.on('field', (name, val, info) => {
|
|
||||||
// // console.log(`Field [${name}]: value: %j`, val);
|
|
||||||
// // });
|
|
||||||
// // bb.on('close', () => {
|
|
||||||
// // console.log('Done parsing form!');
|
|
||||||
// // // res.writeHead(303, { Connection: 'close', Location: '/' });
|
|
||||||
// // // res.end();
|
|
||||||
// // });
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// const makeMiddleware = (req) => {
|
|
||||||
// console.log('makeMiddleware');
|
|
||||||
// // const bb = busboy({ headers: req.headers });
|
|
||||||
|
|
||||||
// // bb.on('error', (err) => {
|
|
||||||
// // // Send this error along to the global error handler
|
|
||||||
// // console.log('Error' + err);
|
|
||||||
// // return;
|
|
||||||
// // });
|
|
||||||
// // bb.on('file', (name, file, info) => {
|
|
||||||
// // const { filename, encoding, mimeType } = info;
|
|
||||||
// // console.log(`File [${name}]: filename: %j, encoding: %j, mimeType: %j`, filename, encoding, mimeType);
|
|
||||||
// // req.filename = filename;
|
|
||||||
|
|
||||||
// // file
|
|
||||||
// // .on('data', (data) => {
|
|
||||||
// // console.log(`File [${name}] got ${data.length} bytes`);
|
|
||||||
// // })
|
|
||||||
// // .on('close', () => {
|
|
||||||
// // console.log(`File [${name}] done`);
|
|
||||||
// // });
|
|
||||||
// // });
|
|
||||||
// // bb.end(req.rawBody);
|
|
||||||
// // req.pipe(bb);
|
|
||||||
// };
|
|
||||||
|
|
||||||
// router.post(UPLOAD_FILE_ENDPOINT, withContent, makeMiddleware, progress_middleware, ({ filename }) => {
|
|
||||||
// console.log('filename: ' + filename);
|
|
||||||
|
|
||||||
// // if (req.file) {
|
|
||||||
// // const filename = req.file.originalname;
|
|
||||||
// // const ext = filename.substring(filename.lastIndexOf('.') + 1);
|
|
||||||
// // console.log(req.file);
|
|
||||||
// // console.log('ext: ' + ext);
|
|
||||||
|
|
||||||
// // if (ext === 'bin' || ext === 'json') {
|
|
||||||
// // return res.sendStatus(200);
|
|
||||||
// // } else if (ext === 'md5') {
|
|
||||||
// // return res.json({ md5: 'ef4304fc4d9025a58dcf25d71c882d2c' });
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// return new Response('OK', { status: 200 });
|
|
||||||
// });
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// EMS-ESP Project stuff
|
// EMS-ESP Project stuff
|
||||||
//
|
//
|
||||||
|
|||||||
57
mock-api/upload_server.ts
Normal file
57
mock-api/upload_server.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import express from 'express';
|
||||||
|
import multer from 'multer';
|
||||||
|
|
||||||
|
const rest_server = express();
|
||||||
|
const port = 3082;
|
||||||
|
const upload = multer({ dest: './uploads' });
|
||||||
|
|
||||||
|
const UPLOAD_FILE_ENDPOINT = '/rest/uploadFile';
|
||||||
|
|
||||||
|
// delay functions, 2 different types
|
||||||
|
const delay = (ms) => new Promise((res) => setTimeout(res, ms));
|
||||||
|
|
||||||
|
function delay_blocking(milliseconds) {
|
||||||
|
var start = new Date().getTime();
|
||||||
|
// for (var i = 0; i < 1e7; i++) {
|
||||||
|
while (true) {
|
||||||
|
if (new Date().getTime() - start > milliseconds) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function progress_middleware(req, res, next) {
|
||||||
|
let progress = 0;
|
||||||
|
const file_size = req.headers['content-length'];
|
||||||
|
console.log('Uploading file. Size ' + file_size + ' bytes');
|
||||||
|
|
||||||
|
// set event listener
|
||||||
|
req.on('data', async (chunk) => {
|
||||||
|
progress += chunk.length;
|
||||||
|
const percentage = (progress / file_size) * 100;
|
||||||
|
console.log(`Progress: ${Math.round(percentage)}%`);
|
||||||
|
// await delay(1000); // slow it down
|
||||||
|
delay_blocking(1000); // slow it down
|
||||||
|
});
|
||||||
|
next(); // invoke next middleware which is multer
|
||||||
|
}
|
||||||
|
|
||||||
|
rest_server.post(UPLOAD_FILE_ENDPOINT, progress_middleware, upload.single('file'), (req, res) => {
|
||||||
|
if (req.file) {
|
||||||
|
const filename = req.file.originalname;
|
||||||
|
const ext = filename.substring(filename.lastIndexOf('.') + 1);
|
||||||
|
console.log(req.file);
|
||||||
|
|
||||||
|
if (ext === 'bin' || ext === 'json') {
|
||||||
|
console.log('Received firmware or json file, extension: ' + ext);
|
||||||
|
return res.sendStatus(200);
|
||||||
|
} else if (ext === 'md5') {
|
||||||
|
return res.json({ md5: 'ef4304fc4d9025a58dcf25d71c882d2c' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('Invalid file extension');
|
||||||
|
return res.sendStatus(400);
|
||||||
|
});
|
||||||
|
|
||||||
|
// start server
|
||||||
|
rest_server.listen(port, () => console.log(`EMS-ESP File Upload mock server running on http://localhost:${port}/`));
|
||||||
@@ -140,7 +140,7 @@ __metadata:
|
|||||||
"@types/multer": "npm:^1.4.11"
|
"@types/multer": "npm:^1.4.11"
|
||||||
compression: "npm:^1.7.4"
|
compression: "npm:^1.7.4"
|
||||||
express: "npm:^4.19.2"
|
express: "npm:^4.19.2"
|
||||||
itty-router: "npm:^5.0.5"
|
itty-router: "npm:^5.0.9"
|
||||||
multer: "npm:^1.4.5-lts.1"
|
multer: "npm:^1.4.5-lts.1"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@@ -526,10 +526,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"itty-router@npm:^5.0.5":
|
"itty-router@npm:^5.0.9":
|
||||||
version: 5.0.5
|
version: 5.0.9
|
||||||
resolution: "itty-router@npm:5.0.5"
|
resolution: "itty-router@npm:5.0.9"
|
||||||
checksum: 10/b10ddeb65568e4ed5eb5a99b5e5e660bae62d53ab88ffdf56a9045d6323a87f561a000f3d8835dcd15451c565fd01083e049122e46d55ffd24fa675f9446971c
|
checksum: 10/b11684cfcb08658620d878ad1a62bcd140491909610d48bd3b83e278cd898acfa9fcd63af126c6705647a5c69911f82f5a54bb2de8dc2ea395dbaf2bcb6faf45
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
@host = http://ems-esp.local
|
@host = http://ems-esp.local
|
||||||
@host_dev = http://10.10.10.20
|
@host_dev = http://10.10.10.20
|
||||||
@host_standalone = http://localhost:3080
|
@host_standalone = http://localhost:3080
|
||||||
|
@host_standalone2 = http://localhost:3082
|
||||||
|
|
||||||
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg
|
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg
|
||||||
|
|
||||||
@@ -114,3 +115,18 @@ GET {{host_dev}}/api/thermostat/seltemp
|
|||||||
GET {{host_standalone}}/api/system/info
|
GET {{host_standalone}}/api/system/info
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
POST {{host_standalone2}}/rest/uploadFile
|
||||||
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
|
||||||
|
|
||||||
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
||||||
|
Content-Disposition: form-data; name="text"
|
||||||
|
|
||||||
|
title
|
||||||
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
||||||
|
Content-Disposition: form-data; name="file"; filename="emsesp_settings.json"
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
< ./standalone_file_export/emsesp_settings.json
|
||||||
|
------WebKitFormBoundary7MA4YWxkTrZu0gW--
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user