initial mvc concept
This commit is contained in:
parent
4a8e0188b3
commit
8bd2cb72d0
3
battery_board/battery_board/.gitignore
vendored
Normal file
3
battery_board/battery_board/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
battery_board-backups/
|
||||
bom/
|
||||
fp-info-cache
|
BIN
board/production/backups/PlantCtrlESP32_2024-08-29_22-21-45.zip
Normal file
BIN
board/production/backups/PlantCtrlESP32_2024-08-29_22-21-45.zip
Normal file
Binary file not shown.
512
rust/src_webpack/package-lock.json
generated
512
rust/src_webpack/package-lock.json
generated
@ -9,9 +9,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
"raw-loader": "^4.0.2",
|
||||
"ts-loader": "^9.5.1",
|
||||
"typescript": "^5.3.3",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack": "^5.97.1",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.1.0"
|
||||
}
|
||||
@ -26,52 +27,58 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
||||
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
|
||||
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/set-array": "^1.0.1",
|
||||
"@jridgewell/set-array": "^1.2.1",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10",
|
||||
"@jridgewell/trace-mapping": "^0.3.9"
|
||||
"@jridgewell/trace-mapping": "^0.3.24"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/resolve-uri": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
||||
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/set-array": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
|
||||
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
|
||||
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/source-map": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
|
||||
"integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
|
||||
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.0",
|
||||
"@jridgewell/trace-mapping": "^0.3.9"
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
|
||||
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.20",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
||||
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
||||
"version": "0.3.25",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
@ -253,9 +260,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw=="
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/express": {
|
||||
"version": "4.17.21",
|
||||
@ -418,133 +426,148 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
|
||||
"integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz",
|
||||
"integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/helper-numbers": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6"
|
||||
"@webassemblyjs/helper-numbers": "1.13.2",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.13.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
|
||||
"integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw=="
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz",
|
||||
"integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@webassemblyjs/helper-api-error": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
|
||||
"integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q=="
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz",
|
||||
"integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@webassemblyjs/helper-buffer": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",
|
||||
"integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA=="
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz",
|
||||
"integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@webassemblyjs/helper-numbers": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
|
||||
"integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz",
|
||||
"integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/floating-point-hex-parser": "1.11.6",
|
||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
||||
"@webassemblyjs/floating-point-hex-parser": "1.13.2",
|
||||
"@webassemblyjs/helper-api-error": "1.13.2",
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",
|
||||
"integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA=="
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz",
|
||||
"integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@webassemblyjs/helper-wasm-section": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",
|
||||
"integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz",
|
||||
"integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
||||
"@webassemblyjs/wasm-gen": "1.11.6"
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||
"@webassemblyjs/wasm-gen": "1.14.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/ieee754": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",
|
||||
"integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz",
|
||||
"integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@xtuc/ieee754": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/leb128": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",
|
||||
"integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz",
|
||||
"integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/utf8": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",
|
||||
"integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA=="
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz",
|
||||
"integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@webassemblyjs/wasm-edit": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",
|
||||
"integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz",
|
||||
"integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-section": "1.11.6",
|
||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
||||
"@webassemblyjs/wasm-opt": "1.11.6",
|
||||
"@webassemblyjs/wasm-parser": "1.11.6",
|
||||
"@webassemblyjs/wast-printer": "1.11.6"
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||
"@webassemblyjs/helper-wasm-section": "1.14.1",
|
||||
"@webassemblyjs/wasm-gen": "1.14.1",
|
||||
"@webassemblyjs/wasm-opt": "1.14.1",
|
||||
"@webassemblyjs/wasm-parser": "1.14.1",
|
||||
"@webassemblyjs/wast-printer": "1.14.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/wasm-gen": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",
|
||||
"integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz",
|
||||
"integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
||||
"@webassemblyjs/ieee754": "1.11.6",
|
||||
"@webassemblyjs/leb128": "1.11.6",
|
||||
"@webassemblyjs/utf8": "1.11.6"
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||
"@webassemblyjs/ieee754": "1.13.2",
|
||||
"@webassemblyjs/leb128": "1.13.2",
|
||||
"@webassemblyjs/utf8": "1.13.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/wasm-opt": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",
|
||||
"integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz",
|
||||
"integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
||||
"@webassemblyjs/wasm-parser": "1.11.6"
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||
"@webassemblyjs/wasm-gen": "1.14.1",
|
||||
"@webassemblyjs/wasm-parser": "1.14.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/wasm-parser": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",
|
||||
"integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz",
|
||||
"integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
||||
"@webassemblyjs/ieee754": "1.11.6",
|
||||
"@webassemblyjs/leb128": "1.11.6",
|
||||
"@webassemblyjs/utf8": "1.11.6"
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@webassemblyjs/helper-api-error": "1.13.2",
|
||||
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||
"@webassemblyjs/ieee754": "1.13.2",
|
||||
"@webassemblyjs/leb128": "1.13.2",
|
||||
"@webassemblyjs/utf8": "1.13.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/wast-printer": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",
|
||||
"integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz",
|
||||
"integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@webassemblyjs/ast": "1.11.6",
|
||||
"@webassemblyjs/ast": "1.14.1",
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
@ -595,12 +618,14 @@
|
||||
"node_modules/@xtuc/ieee754": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
|
||||
"integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="
|
||||
"integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@xtuc/long": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
|
||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
|
||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/abab": {
|
||||
"version": "2.0.6",
|
||||
@ -633,9 +658,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.11.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
|
||||
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@ -643,14 +669,6 @@
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-import-assertions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
|
||||
"integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
|
||||
"peerDependencies": {
|
||||
"acorn": "^8"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
@ -734,6 +752,7 @@
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
@ -772,6 +791,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
@ -847,9 +876,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.22.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
|
||||
"integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
|
||||
"version": "4.24.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz",
|
||||
"integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -864,11 +893,12 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001565",
|
||||
"electron-to-chromium": "^1.4.601",
|
||||
"node-releases": "^2.0.14",
|
||||
"update-browserslist-db": "^1.0.13"
|
||||
"caniuse-lite": "^1.0.30001669",
|
||||
"electron-to-chromium": "^1.5.41",
|
||||
"node-releases": "^2.0.18",
|
||||
"update-browserslist-db": "^1.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
@ -880,7 +910,8 @@
|
||||
"node_modules/buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bundle-name": {
|
||||
"version": "4.1.0",
|
||||
@ -929,9 +960,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001571",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz",
|
||||
"integrity": "sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==",
|
||||
"version": "1.0.30001687",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz",
|
||||
"integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -945,13 +976,15 @@
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
@ -1015,6 +1048,7 @@
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
@ -1026,7 +1060,8 @@
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "2.0.20",
|
||||
@ -1037,7 +1072,8 @@
|
||||
"node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/compressible": {
|
||||
"version": "2.0.18",
|
||||
@ -1357,9 +1393,20 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.616",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.616.tgz",
|
||||
"integrity": "sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg=="
|
||||
"version": "1.5.72",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz",
|
||||
"integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/emojis-list": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/encodeurl": {
|
||||
"version": "2.0.0",
|
||||
@ -1372,9 +1419,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.15.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz",
|
||||
"integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==",
|
||||
"version": "5.17.1",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
|
||||
"integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
"tapable": "^2.2.0"
|
||||
@ -1424,9 +1472,10 @@
|
||||
"integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w=="
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
@ -1705,21 +1754,6 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
@ -1765,7 +1799,8 @@
|
||||
"node_modules/glob-to-regexp": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
|
||||
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
|
||||
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/globby": {
|
||||
"version": "14.0.2",
|
||||
@ -2257,6 +2292,7 @@
|
||||
"version": "27.5.1",
|
||||
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
|
||||
"integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"merge-stream": "^2.0.0",
|
||||
@ -2270,6 +2306,7 @@
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
||||
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
@ -2290,6 +2327,19 @@
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"json5": "lib/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/kind-of": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
||||
@ -2318,6 +2368,21 @@
|
||||
"node": ">=6.11.5"
|
||||
}
|
||||
},
|
||||
"node_modules/loader-utils": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
@ -2330,18 +2395,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@ -2385,7 +2438,8 @@
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
@ -2506,9 +2560,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.14",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
|
||||
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw=="
|
||||
"version": "2.0.19",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
|
||||
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
@ -2691,9 +2746,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
@ -2842,6 +2898,27 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-loader": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
|
||||
"integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loader-utils": "^2.0.0",
|
||||
"schema-utils": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"webpack": "^4.0.0 || ^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
@ -3058,13 +3135,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
@ -3328,6 +3403,7 @@
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
|
||||
"integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
@ -3364,6 +3440,7 @@
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
@ -3373,6 +3450,7 @@
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@ -3484,6 +3562,7 @@
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
@ -3512,9 +3591,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.26.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz",
|
||||
"integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz",
|
||||
"integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
"acorn": "^8.8.2",
|
||||
@ -3529,15 +3609,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser-webpack-plugin": {
|
||||
"version": "5.3.9",
|
||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz",
|
||||
"integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==",
|
||||
"version": "5.3.10",
|
||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz",
|
||||
"integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.17",
|
||||
"@jridgewell/trace-mapping": "^0.3.20",
|
||||
"jest-worker": "^27.4.5",
|
||||
"schema-utils": "^3.1.1",
|
||||
"serialize-javascript": "^6.0.1",
|
||||
"terser": "^5.16.8"
|
||||
"terser": "^5.26.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
@ -3625,6 +3706,7 @@
|
||||
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz",
|
||||
"integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.0",
|
||||
"enhanced-resolve": "^5.0.0",
|
||||
@ -3703,9 +3785,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
|
||||
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
|
||||
"integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -3720,9 +3802,10 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"escalade": "^3.1.1",
|
||||
"picocolors": "^1.0.0"
|
||||
"escalade": "^3.2.0",
|
||||
"picocolors": "^1.1.0"
|
||||
},
|
||||
"bin": {
|
||||
"update-browserslist-db": "cli.js"
|
||||
@ -3777,9 +3860,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
|
||||
"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
|
||||
"integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"glob-to-regexp": "^0.4.1",
|
||||
"graceful-fs": "^4.1.2"
|
||||
@ -3799,33 +3883,33 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack": {
|
||||
"version": "5.89.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz",
|
||||
"integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==",
|
||||
"version": "5.97.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz",
|
||||
"integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.3",
|
||||
"@types/estree": "^1.0.0",
|
||||
"@webassemblyjs/ast": "^1.11.5",
|
||||
"@webassemblyjs/wasm-edit": "^1.11.5",
|
||||
"@webassemblyjs/wasm-parser": "^1.11.5",
|
||||
"acorn": "^8.7.1",
|
||||
"acorn-import-assertions": "^1.9.0",
|
||||
"browserslist": "^4.14.5",
|
||||
"@types/eslint-scope": "^3.7.7",
|
||||
"@types/estree": "^1.0.6",
|
||||
"@webassemblyjs/ast": "^1.14.1",
|
||||
"@webassemblyjs/wasm-edit": "^1.14.1",
|
||||
"@webassemblyjs/wasm-parser": "^1.14.1",
|
||||
"acorn": "^8.14.0",
|
||||
"browserslist": "^4.24.0",
|
||||
"chrome-trace-event": "^1.0.2",
|
||||
"enhanced-resolve": "^5.15.0",
|
||||
"enhanced-resolve": "^5.17.1",
|
||||
"es-module-lexer": "^1.2.1",
|
||||
"eslint-scope": "5.1.1",
|
||||
"events": "^3.2.0",
|
||||
"glob-to-regexp": "^0.4.1",
|
||||
"graceful-fs": "^4.2.9",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"json-parse-even-better-errors": "^2.3.1",
|
||||
"loader-runner": "^4.2.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"neo-async": "^2.6.2",
|
||||
"schema-utils": "^3.2.0",
|
||||
"tapable": "^2.1.1",
|
||||
"terser-webpack-plugin": "^5.3.7",
|
||||
"watchpack": "^2.4.0",
|
||||
"terser-webpack-plugin": "^5.3.10",
|
||||
"watchpack": "^2.4.1",
|
||||
"webpack-sources": "^3.2.3"
|
||||
},
|
||||
"bin": {
|
||||
@ -4189,12 +4273,6 @@
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
"raw-loader": "^4.0.2",
|
||||
"ts-loader": "^9.5.1",
|
||||
"typescript": "^5.3.3",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack": "^5.97.1",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.1.0"
|
||||
},
|
||||
|
54
rust/src_webpack/src/api.ts
Normal file
54
rust/src_webpack/src/api.ts
Normal file
@ -0,0 +1,54 @@
|
||||
interface PlantControllerConfig {
|
||||
ap_ssid: string,
|
||||
ssid: string,
|
||||
password: string,
|
||||
mqtt_url: string,
|
||||
base_topic: string,
|
||||
tank_sensor_enabled: boolean,
|
||||
tank_allow_pumping_if_sensor_error: boolean,
|
||||
tank_useable_ml: number,
|
||||
tank_warn_percent: number,
|
||||
tank_empty_percent: number,
|
||||
tank_full_percent: number,
|
||||
night_lamp_hour_start: number,
|
||||
night_lamp_hour_end: number,
|
||||
night_lamp_only_when_dark: boolean,
|
||||
max_consecutive_pump_count: number,
|
||||
|
||||
plants: PlantConfig[]
|
||||
}
|
||||
|
||||
interface PlantConfig{
|
||||
mode: string,
|
||||
target_moisture: number,
|
||||
pump_time_s: number,
|
||||
pump_cooldown_min: number,
|
||||
pump_hour_start: number,
|
||||
pump_hour_end: number,
|
||||
sensor_b: boolean
|
||||
}
|
||||
|
||||
|
||||
interface SSIDList {
|
||||
ssids: [string]
|
||||
}
|
||||
|
||||
interface TestPump {
|
||||
pump: number
|
||||
}
|
||||
|
||||
interface SetTime {
|
||||
time: string
|
||||
}
|
||||
|
||||
interface GetData {
|
||||
rtc: string,
|
||||
native: string,
|
||||
moisture_a: [number],
|
||||
moisture_b: [number],
|
||||
}
|
||||
|
||||
interface VersionInfo {
|
||||
git_hash: string,
|
||||
build_time: string
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
declare var PUBLIC_URL: string;
|
||||
|
||||
|
||||
let battery_flash_button = document.getElementById("battery_flash_button") as HTMLButtonElement;
|
||||
let battery_flash_file = document.getElementById("battery_flash_file") as HTMLInputElement;
|
||||
let battery_flash_message = document.getElementById("battery_flash_message") as HTMLElement;
|
||||
let battery_flash_progressBar = document.getElementById("battery_flash_progressBar") as HTMLProgressElement;
|
||||
let battery_flash_loaded_n_total = document.getElementById("battery_flash_loaded_n_total") as HTMLElement;
|
||||
let battery_flash_status = document.getElementById("battery_flash_status") as HTMLElement;
|
||||
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
|
||||
ajax.upload.addEventListener("progress", event => {
|
||||
battery_flash_loaded_n_total.innerHTML = "Uploaded " + event.loaded + " bytes of " + event.total;
|
||||
var percent = (event.loaded / event.total) * 100;
|
||||
battery_flash_progressBar.value = Math.round(percent);
|
||||
battery_flash_status.innerHTML = Math.round(percent) + "%";
|
||||
battery_flash_message.innerHTML = "in progress";
|
||||
}, false);
|
||||
ajax.addEventListener("load", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "finished";
|
||||
battery_flash_progressBar.value = 0;
|
||||
}, false);
|
||||
ajax.addEventListener("error", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "failed";
|
||||
}, false);
|
||||
ajax.addEventListener("abort", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "aborted";
|
||||
}, false);
|
||||
|
||||
|
||||
|
||||
|
||||
battery_flash_button.onclick = async function (){
|
||||
//ajax.open("POST", "/flashbattery");
|
||||
//ajax.send(battery_flash_file.files[0]);
|
||||
|
||||
ajax.open("POST", PUBLIC_URL + "/flashbattery?flash=true");
|
||||
ajax.send(battery_flash_file.files[0]);
|
||||
};
|
@ -1,484 +0,0 @@
|
||||
declare var PUBLIC_URL: string;
|
||||
console.log("Url is " + PUBLIC_URL);
|
||||
|
||||
interface PlantConfig {
|
||||
ap_ssid: string,
|
||||
ssid: string,
|
||||
password: string,
|
||||
mqtt_url: string,
|
||||
base_topic: string,
|
||||
tank_sensor_enabled: boolean,
|
||||
tank_allow_pumping_if_sensor_error: boolean,
|
||||
tank_useable_ml: number,
|
||||
tank_warn_percent: number,
|
||||
tank_empty_percent: number,
|
||||
tank_full_percent: number,
|
||||
night_lamp_hour_start: number,
|
||||
night_lamp_hour_end: number,
|
||||
night_lamp_only_when_dark: boolean,
|
||||
max_consecutive_pump_count: number,
|
||||
|
||||
plants: {
|
||||
mode: string,
|
||||
target_moisture: number,
|
||||
pump_time_s: number,
|
||||
pump_cooldown_min: number,
|
||||
pump_hour_start: number,
|
||||
pump_hour_end: number,
|
||||
sensor_b: boolean,
|
||||
sensor_p: boolean
|
||||
}[]
|
||||
}
|
||||
|
||||
interface SSIDList {
|
||||
ssids : [string]
|
||||
}
|
||||
|
||||
interface TestPump{
|
||||
pump: number
|
||||
}
|
||||
|
||||
interface SetTime{
|
||||
time: string
|
||||
}
|
||||
|
||||
interface GetData{
|
||||
rtc: string,
|
||||
native: string,
|
||||
moisture_a: [number],
|
||||
moisture_b: [number],
|
||||
}
|
||||
|
||||
let plants = document.getElementById("plants") as HTMLInputElement;
|
||||
|
||||
let scanWifiBtn = document.getElementById("scan") as HTMLButtonElement;
|
||||
if(scanWifiBtn){
|
||||
scanWifiBtn.onclick = scanWifi;
|
||||
}
|
||||
|
||||
let esp_time = document.getElementById("esp_time") as HTMLDivElement;
|
||||
let rtc_time = document.getElementById("rtc_time") as HTMLDivElement;
|
||||
let browser_time = document.getElementById("browser_time") as HTMLDivElement;
|
||||
let sync = document.getElementById("time_upload") as HTMLButtonElement;
|
||||
sync.onclick = setTime
|
||||
|
||||
function setTime(){
|
||||
var value: SetTime = {
|
||||
time : new Date().toISOString()
|
||||
}
|
||||
var pretty = JSON.stringify(value, undefined, 1);
|
||||
fetch(PUBLIC_URL + "/time", {
|
||||
method :"POST",
|
||||
body: pretty
|
||||
})
|
||||
}
|
||||
|
||||
function updateTime(){
|
||||
fetch(PUBLIC_URL +"/data")
|
||||
.then(response => response.json())
|
||||
.then(json => json as GetData)
|
||||
.then(time => {
|
||||
esp_time.innerText = time.native;
|
||||
rtc_time.innerText = time.rtc;
|
||||
var date = new Date();
|
||||
browser_time.innerText = date.toISOString();
|
||||
|
||||
|
||||
time.moisture_a.forEach((a, index) => {
|
||||
var id = "plant_" + index + "_moisture_a";
|
||||
console.log("id is " + id + "index is " + index)
|
||||
var target = document.getElementById(id) as HTMLDivElement;
|
||||
target.innerText = a+"";
|
||||
})
|
||||
time.moisture_b.forEach((b, index) => {
|
||||
var id = "plant_" + index + "_moisture_b";
|
||||
var target = document.getElementById(id) as HTMLDivElement;
|
||||
target.innerText = b+"";
|
||||
})
|
||||
|
||||
setTimeout(updateTime,1000);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
setTimeout(updateTime,10000);
|
||||
});
|
||||
}
|
||||
setTimeout(updateTime,1000);
|
||||
|
||||
|
||||
export function scanWifi(){
|
||||
var scanButton = (document.getElementById("scan") as HTMLButtonElement);
|
||||
scanButton.disabled = true;
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.responseType = 'json';
|
||||
ajax.onreadystatechange = () => {
|
||||
if (ajax.readyState === 4) {
|
||||
callback(ajax.response);
|
||||
}
|
||||
};
|
||||
ajax.onerror = (evt) => {
|
||||
console.log(evt)
|
||||
scanButton.disabled = false;
|
||||
alert("Failed to start see console")
|
||||
}
|
||||
ajax.open("POST", PUBLIC_URL+"/wifiscan");
|
||||
ajax.send();
|
||||
}
|
||||
|
||||
function callback(data:SSIDList){
|
||||
var ssidlist = document.getElementById("ssidlist")
|
||||
ssidlist.innerHTML = ''
|
||||
|
||||
for (var ssid of data.ssids) {
|
||||
var wi = document.createElement("option");
|
||||
wi.value = ssid;
|
||||
ssidlist.appendChild(wi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let fromWrapper = (() => {
|
||||
|
||||
let plantcount = 0;
|
||||
|
||||
function addTimeOptions(select: HTMLSelectElement) {
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let option = document.createElement("option");
|
||||
option.innerText = i.toString();
|
||||
select.appendChild(option);
|
||||
}
|
||||
}
|
||||
|
||||
var ap_ssid = (document.getElementById("ap_ssid") as HTMLInputElement);
|
||||
ap_ssid.onchange = updateJson
|
||||
var ssid = (document.getElementById("ssid") as HTMLInputElement);
|
||||
ssid.onchange = updateJson
|
||||
var password = (document.getElementById("password") as HTMLInputElement);
|
||||
password.onchange = updateJson
|
||||
let mqtt_url = document.getElementById("mqtt_url") as HTMLInputElement;
|
||||
mqtt_url.onchange = updateJson
|
||||
let base_topic = document.getElementById("base_topic") as HTMLInputElement;
|
||||
base_topic.onchange = updateJson
|
||||
let max_consecutive_pump_count = document.getElementById("max_consecutive_pump_count") as HTMLInputElement;
|
||||
max_consecutive_pump_count.onchange = updateJson
|
||||
|
||||
let tank_useable_ml = document.getElementById("tank_useable_ml") as HTMLInputElement;
|
||||
tank_useable_ml.onchange = updateJson
|
||||
let tank_empty_percent = document.getElementById("tank_empty_percent") as HTMLInputElement;
|
||||
tank_empty_percent.onchange = updateJson
|
||||
let tank_full_percent = document.getElementById("tank_full_percent") as HTMLInputElement;
|
||||
tank_full_percent.onchange = updateJson
|
||||
let tank_warn_percent = document.getElementById("tank_warn_percent") as HTMLInputElement;
|
||||
tank_warn_percent.onchange = updateJson
|
||||
let tank_sensor_enabled = document.getElementById("tank_sensor_enabled") as HTMLInputElement;
|
||||
tank_sensor_enabled.onchange = updateJson
|
||||
let tank_allow_pumping_if_sensor_error = document.getElementById("tank_allow_pumping_if_sensor_error") as HTMLInputElement;
|
||||
tank_allow_pumping_if_sensor_error.onchange = updateJson
|
||||
let night_lamp_only_when_dark = document.getElementById("night_lamp_only_when_dark") as HTMLInputElement;
|
||||
night_lamp_only_when_dark.onchange = updateJson
|
||||
let night_lamp_time_start = document.getElementById("night_lamp_time_start") as HTMLSelectElement;
|
||||
night_lamp_time_start.onchange = updateJson
|
||||
addTimeOptions(night_lamp_time_start);
|
||||
let night_lamp_time_end = document.getElementById("night_lamp_time_end") as HTMLSelectElement;
|
||||
night_lamp_time_end.onchange = updateJson
|
||||
addTimeOptions(night_lamp_time_end);
|
||||
|
||||
let json = document.getElementById('json') as HTMLInputElement
|
||||
|
||||
function createForm(current: PlantConfig) {
|
||||
for (let i = 0; i < current.plants.length; i++) {
|
||||
let plant = document.createElement("div");
|
||||
plants.appendChild(plant);
|
||||
let header = document.createElement("h4");
|
||||
header.textContent = "Plant " + (i + 1);
|
||||
plant.appendChild(header);
|
||||
|
||||
|
||||
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
|
||||
let testButton = document.createElement("button");
|
||||
testButton.innerText = "Test";
|
||||
testButton.id = "plant_" + i + "_test";
|
||||
testButton.onclick = function (){
|
||||
var body:TestPump = {
|
||||
pump: i
|
||||
}
|
||||
|
||||
var pretty = JSON.stringify(body, undefined, 1);
|
||||
fetch("/pumptest", {
|
||||
method :"POST",
|
||||
body: pretty
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(text => submit_status.innerText = text)
|
||||
};
|
||||
holder.appendChild(testButton);
|
||||
|
||||
let moisture_a = document.createElement("div");
|
||||
moisture_a.innerText = "N/A";
|
||||
moisture_a.id = "plant_" + i + "_moisture_a";
|
||||
holder.appendChild(moisture_a);
|
||||
|
||||
let moisture_b = document.createElement("div");
|
||||
moisture_b.innerText = "N/A";
|
||||
moisture_b.id = "plant_" + i + "_moisture_b";
|
||||
holder.appendChild(moisture_b);
|
||||
|
||||
let br = document.createElement("br");
|
||||
holder.appendChild(br);
|
||||
|
||||
let inputf = document.createElement("select");
|
||||
inputf.id = "plant_" + i + "_mode";
|
||||
inputf.onchange = updateJson;
|
||||
holder.appendChild(inputf)
|
||||
|
||||
let optionOff = document.createElement("option");
|
||||
optionOff.value = "OFF";
|
||||
optionOff.innerText = "Off";
|
||||
inputf.appendChild(optionOff);
|
||||
|
||||
let optionTargetMoisture = document.createElement("option");
|
||||
optionTargetMoisture.value = "TargetMoisture";
|
||||
optionTargetMoisture.innerText = "Target Moisture";
|
||||
inputf.appendChild(optionTargetMoisture);
|
||||
|
||||
let optionTimerOnly = document.createElement("option");
|
||||
optionTimerOnly.value = "TimerOnly";
|
||||
optionTimerOnly.innerText = "Timer";
|
||||
inputf.appendChild(optionTimerOnly);
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Mode"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let inputf = document.createElement("input");
|
||||
inputf.id = "plant_" + i + "_target_moisture";
|
||||
inputf.onchange = updateJson;
|
||||
inputf.type = "number";
|
||||
inputf.min = "0";
|
||||
inputf.max = "100";
|
||||
holder.appendChild(inputf)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Target Moisture"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("input");
|
||||
input.id = "plant_" + i + "_pump_time_s";
|
||||
input.onchange = updateJson;
|
||||
input.type = "number";
|
||||
input.min = "0";
|
||||
input.max = "600";
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Pump Time (s)"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("input");
|
||||
input.id = "plant_" + i + "_pump_cooldown_min";
|
||||
input.onchange = updateJson;
|
||||
input.type = "number";
|
||||
input.min = "0";
|
||||
input.max = "600";
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Pump Cooldown (m)"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("select");
|
||||
input.id = "plant_" + i + "_pump_hour_start";
|
||||
addTimeOptions(input);
|
||||
input.onchange = updateJson;
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Pump Hour Start"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("select");
|
||||
input.id = "plant_" + i + "_pump_hour_end";
|
||||
addTimeOptions(input);
|
||||
input.onchange = updateJson;
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Pump Hour End"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("input");
|
||||
input.id = "plant_" + i + "_sensor_b";
|
||||
input.type = "checkbox";
|
||||
input.onchange = updateJson;
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Sensor B installed"
|
||||
}
|
||||
{
|
||||
let holder = document.createElement("div");
|
||||
plant.appendChild(holder);
|
||||
let input = document.createElement("input");
|
||||
input.id = "plant_" + i + "_sensor_p";
|
||||
input.type = "checkbox";
|
||||
input.onchange = updateJson;
|
||||
holder.appendChild(input)
|
||||
|
||||
let text = document.createElement("span");
|
||||
holder.appendChild(text)
|
||||
text.innerHTML += "Sensor P installed"
|
||||
}
|
||||
}
|
||||
sync(current);
|
||||
}
|
||||
|
||||
function sync(current: PlantConfig) {
|
||||
plantcount = current.plants.length
|
||||
|
||||
ap_ssid.value = current.ap_ssid;
|
||||
ssid.value = current.ssid;
|
||||
password.value = current.password;
|
||||
|
||||
mqtt_url.value = current.mqtt_url;
|
||||
base_topic.value = current.base_topic;
|
||||
max_consecutive_pump_count.value = current.max_consecutive_pump_count.toString();
|
||||
|
||||
tank_useable_ml.disabled = !current.tank_sensor_enabled;
|
||||
tank_warn_percent.disabled = !current.tank_sensor_enabled;
|
||||
tank_sensor_enabled.checked = current.tank_sensor_enabled;
|
||||
tank_allow_pumping_if_sensor_error.checked = current.tank_allow_pumping_if_sensor_error;
|
||||
tank_useable_ml.value = current.tank_useable_ml.toString();
|
||||
tank_warn_percent.value = current.tank_warn_percent.toString();
|
||||
tank_empty_percent.value = current.tank_empty_percent.toString();
|
||||
tank_full_percent.value = current.tank_full_percent.toString();
|
||||
|
||||
night_lamp_time_start.value = current.night_lamp_hour_start.toString();
|
||||
night_lamp_time_end.value = current.night_lamp_hour_end.toString();
|
||||
|
||||
for (let i = 0; i < current.plants.length; i++) {
|
||||
let plant_mode = document.getElementById("plant_" + i + "_mode") as HTMLSelectElement;
|
||||
plant_mode.value = current.plants[i].mode;
|
||||
let plant_target_moisture = document.getElementById("plant_" + i + "_target_moisture") as HTMLInputElement;
|
||||
plant_target_moisture.value = current.plants[i].target_moisture.toString();
|
||||
let plant_pump_time_s = document.getElementById("plant_" + i + "_pump_time_s") as HTMLInputElement;
|
||||
plant_pump_time_s.value = current.plants[i].pump_time_s.toString();
|
||||
let plant_pump_cooldown_min = document.getElementById("plant_" + i + "_pump_cooldown_min") as HTMLInputElement;
|
||||
plant_pump_cooldown_min.value = current.plants[i].pump_cooldown_min.toString();
|
||||
let plant_pump_hour_start = document.getElementById("plant_" + i + "_pump_hour_start") as HTMLInputElement;
|
||||
plant_pump_hour_start.value = current.plants[i].pump_hour_start.toString();
|
||||
let plant_pump_hour_end = document.getElementById("plant_" + i + "_pump_hour_end") as HTMLInputElement;
|
||||
plant_pump_hour_end.value = current.plants[i].pump_hour_end.toString();
|
||||
|
||||
let plant_sensor_b = document.getElementById("plant_" + i + "_sensor_b") as HTMLInputElement;
|
||||
plant_sensor_b.checked = current.plants[i].sensor_b;
|
||||
let plant_sensor_p = document.getElementById("plant_" + i + "_sensor_p") as HTMLInputElement;
|
||||
plant_sensor_p.checked = current.plants[i].sensor_p;
|
||||
}
|
||||
}
|
||||
|
||||
function updateJson() {
|
||||
var current: PlantConfig = {
|
||||
ap_ssid: ap_ssid.value,
|
||||
ssid: ssid.value,
|
||||
password: password.value,
|
||||
max_consecutive_pump_count: +max_consecutive_pump_count.value,
|
||||
mqtt_url: mqtt_url.value,
|
||||
base_topic: base_topic.value,
|
||||
tank_allow_pumping_if_sensor_error: tank_allow_pumping_if_sensor_error.checked,
|
||||
tank_sensor_enabled: tank_sensor_enabled.checked,
|
||||
tank_useable_ml: +tank_useable_ml.value,
|
||||
tank_warn_percent: +tank_warn_percent.value,
|
||||
tank_empty_percent: +tank_empty_percent.value,
|
||||
tank_full_percent: +tank_full_percent.value,
|
||||
night_lamp_hour_start: +night_lamp_time_start.value,
|
||||
night_lamp_hour_end: +night_lamp_time_end.value,
|
||||
night_lamp_only_when_dark: night_lamp_only_when_dark.checked,
|
||||
plants: []
|
||||
}
|
||||
|
||||
for (let i = 0; i < plantcount; i++) {
|
||||
console.log("Adding plant " + i)
|
||||
let plant_mode = document.getElementById("plant_" + i + "_mode") as HTMLSelectElement;
|
||||
let plant_target_moisture = document.getElementById("plant_" + i + "_target_moisture") as HTMLInputElement;
|
||||
let plant_pump_time_s = document.getElementById("plant_" + i + "_pump_time_s") as HTMLInputElement;
|
||||
let plant_pump_cooldown_min = document.getElementById("plant_" + i + "_pump_cooldown_min") as HTMLInputElement;
|
||||
let plant_pump_hour_start = document.getElementById("plant_" + i + "_pump_hour_start") as HTMLInputElement;
|
||||
let plant_pump_hour_end = document.getElementById("plant_" + i + "_pump_hour_end") as HTMLInputElement;
|
||||
let plant_sensor_b = document.getElementById("plant_" + i + "_sensor_b") as HTMLInputElement;
|
||||
let plant_sensor_p = document.getElementById("plant_" + i + "_sensor_p") as HTMLInputElement;
|
||||
|
||||
current.plants[i] = {
|
||||
mode: plant_mode.value,
|
||||
target_moisture: +plant_target_moisture.value,
|
||||
pump_time_s: +plant_pump_time_s.value,
|
||||
pump_cooldown_min: +plant_pump_cooldown_min.value,
|
||||
pump_hour_start: +plant_pump_hour_start.value,
|
||||
pump_hour_end: +plant_pump_hour_end.value,
|
||||
sensor_b: plant_sensor_b.checked,
|
||||
sensor_p: plant_sensor_p.checked
|
||||
}
|
||||
}
|
||||
sync(current);
|
||||
console.log(current);
|
||||
|
||||
var pretty = JSON.stringify(current, undefined, 1);
|
||||
json.value = pretty;
|
||||
}
|
||||
|
||||
let submitFormBtn = document.getElementById("submit") as HTMLButtonElement
|
||||
let submit_status = document.getElementById("submit_status")
|
||||
|
||||
if (submitFormBtn) {
|
||||
|
||||
submitFormBtn.onclick = function (){
|
||||
updateJson()
|
||||
fetch(PUBLIC_URL+"/set_config", {
|
||||
method :"POST",
|
||||
body: json.value,
|
||||
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(text => submit_status.innerText = text)
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
fetch(PUBLIC_URL+"/get_config")
|
||||
.then(response => response.json())
|
||||
.then(loaded => {
|
||||
var currentConfig = loaded as PlantConfig;
|
||||
createForm(currentConfig);
|
||||
var pretty = JSON.stringify(currentConfig, undefined, 1);
|
||||
json.value = pretty;
|
||||
}
|
||||
)
|
||||
})
|
||||
if (plants) {
|
||||
fromWrapper()
|
||||
}
|
||||
|
348
rust/src_webpack/src/index.ts
Normal file
348
rust/src_webpack/src/index.ts
Normal file
@ -0,0 +1,348 @@
|
||||
|
||||
declare var PUBLIC_URL: string;
|
||||
console.log("Url is " + PUBLIC_URL);
|
||||
|
||||
|
||||
import { TimeView } from "./timeview";
|
||||
import { PlantView, PlantViews } from "./plant";
|
||||
|
||||
|
||||
export class Controller{
|
||||
private readonly timeView: TimeView
|
||||
readonly plantViews:PlantViews
|
||||
constructor(){
|
||||
this.timeView = new TimeView()
|
||||
this.plantViews = new PlantViews(this)
|
||||
}
|
||||
|
||||
configChanged() {
|
||||
updateJson()
|
||||
}
|
||||
|
||||
testPlant(plantId: number) {
|
||||
var body: TestPump = {
|
||||
pump: plantId
|
||||
}
|
||||
var pretty = JSON.stringify(body, undefined, 1);
|
||||
fetch(PUBLIC_URL + "/pumptest", {
|
||||
method: "POST",
|
||||
body: pretty
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(text => console.log(text))
|
||||
}
|
||||
|
||||
updateRealTimeData() {
|
||||
fetch(PUBLIC_URL + "/data")
|
||||
.then(response => response.json())
|
||||
.then(json => json as GetData)
|
||||
.then(time => {
|
||||
controller.timeView.update(time.native, time.rtc)
|
||||
|
||||
time.moisture_a.forEach((a, index) => {
|
||||
controller.plantViews.getPlant(index).setMoistureA(a);
|
||||
})
|
||||
time.moisture_b.forEach((b, index) => {
|
||||
controller.plantViews.getPlant(index).setMoistureB(b);
|
||||
})
|
||||
|
||||
setTimeout(controller.updateRealTimeData, 1000);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
setTimeout(controller.updateRealTimeData, 10000);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const controller = new Controller();
|
||||
setTimeout(controller.updateRealTimeData, 1000);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let scanWifiBtn = document.getElementById("scan") as HTMLButtonElement;
|
||||
if (scanWifiBtn) {
|
||||
scanWifiBtn.onclick = scanWifi;
|
||||
}
|
||||
|
||||
|
||||
export function scanWifi() {
|
||||
var scanButton = (document.getElementById("scan") as HTMLButtonElement);
|
||||
scanButton.disabled = true;
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.responseType = 'json';
|
||||
ajax.onreadystatechange = () => {
|
||||
if (ajax.readyState === 4) {
|
||||
callback(ajax.response);
|
||||
}
|
||||
};
|
||||
ajax.onerror = (evt) => {
|
||||
console.log(evt)
|
||||
scanButton.disabled = false;
|
||||
alert("Failed to start see console")
|
||||
}
|
||||
ajax.open("POST", PUBLIC_URL + "/wifiscan");
|
||||
ajax.send();
|
||||
}
|
||||
|
||||
function callback(data: SSIDList) {
|
||||
var ssidlist = document.getElementById("ssidlist") as HTMLElement
|
||||
ssidlist.innerHTML = ''
|
||||
|
||||
for (var ssid of data.ssids) {
|
||||
var wi = document.createElement("option");
|
||||
wi.value = ssid;
|
||||
ssidlist.appendChild(wi);
|
||||
}
|
||||
}
|
||||
|
||||
function addTimeOptions(select: HTMLSelectElement) {
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let option = document.createElement("option");
|
||||
option.innerText = i.toString();
|
||||
select.appendChild(option);
|
||||
}
|
||||
}
|
||||
|
||||
var ap_ssid = (document.getElementById("ap_ssid") as HTMLInputElement);
|
||||
ap_ssid.onchange = updateJson
|
||||
var ssid = (document.getElementById("ssid") as HTMLInputElement);
|
||||
ssid.onchange = updateJson
|
||||
var password = (document.getElementById("password") as HTMLInputElement);
|
||||
password.onchange = updateJson
|
||||
let mqtt_url = document.getElementById("mqtt_url") as HTMLInputElement;
|
||||
mqtt_url.onchange = updateJson
|
||||
let base_topic = document.getElementById("base_topic") as HTMLInputElement;
|
||||
base_topic.onchange = updateJson
|
||||
let max_consecutive_pump_count = document.getElementById("max_consecutive_pump_count") as HTMLInputElement;
|
||||
max_consecutive_pump_count.onchange = updateJson
|
||||
|
||||
let tank_useable_ml = document.getElementById("tank_useable_ml") as HTMLInputElement;
|
||||
tank_useable_ml.onchange = updateJson
|
||||
let tank_empty_percent = document.getElementById("tank_empty_percent") as HTMLInputElement;
|
||||
tank_empty_percent.onchange = updateJson
|
||||
let tank_full_percent = document.getElementById("tank_full_percent") as HTMLInputElement;
|
||||
tank_full_percent.onchange = updateJson
|
||||
let tank_warn_percent = document.getElementById("tank_warn_percent") as HTMLInputElement;
|
||||
tank_warn_percent.onchange = updateJson
|
||||
let tank_sensor_enabled = document.getElementById("tank_sensor_enabled") as HTMLInputElement;
|
||||
tank_sensor_enabled.onchange = updateJson
|
||||
let tank_allow_pumping_if_sensor_error = document.getElementById("tank_allow_pumping_if_sensor_error") as HTMLInputElement;
|
||||
tank_allow_pumping_if_sensor_error.onchange = updateJson
|
||||
let night_lamp_only_when_dark = document.getElementById("night_lamp_only_when_dark") as HTMLInputElement;
|
||||
night_lamp_only_when_dark.onchange = updateJson
|
||||
let night_lamp_time_start = document.getElementById("night_lamp_time_start") as HTMLSelectElement;
|
||||
night_lamp_time_start.onchange = updateJson
|
||||
addTimeOptions(night_lamp_time_start);
|
||||
let night_lamp_time_end = document.getElementById("night_lamp_time_end") as HTMLSelectElement;
|
||||
night_lamp_time_end.onchange = updateJson
|
||||
addTimeOptions(night_lamp_time_end);
|
||||
|
||||
|
||||
function updateJson() {
|
||||
var current: PlantControllerConfig = {
|
||||
ap_ssid: ap_ssid.value,
|
||||
ssid: ssid.value,
|
||||
password: password.value,
|
||||
max_consecutive_pump_count: +max_consecutive_pump_count.value,
|
||||
mqtt_url: mqtt_url.value,
|
||||
base_topic: base_topic.value,
|
||||
tank_allow_pumping_if_sensor_error: tank_allow_pumping_if_sensor_error.checked,
|
||||
tank_sensor_enabled: tank_sensor_enabled.checked,
|
||||
tank_useable_ml: +tank_useable_ml.value,
|
||||
tank_warn_percent: +tank_warn_percent.value,
|
||||
tank_empty_percent: +tank_empty_percent.value,
|
||||
tank_full_percent: +tank_full_percent.value,
|
||||
night_lamp_hour_start: +night_lamp_time_start.value,
|
||||
night_lamp_hour_end: +night_lamp_time_end.value,
|
||||
night_lamp_only_when_dark: night_lamp_only_when_dark.checked,
|
||||
plants: []
|
||||
}
|
||||
|
||||
for (let i = 0; i < 8; i++) {
|
||||
current.plants[i] = controller.plantViews.getPlant(i).getConfig();
|
||||
}
|
||||
//sync(current);
|
||||
console.log(current);
|
||||
|
||||
var pretty = JSON.stringify(current, undefined, 1);
|
||||
console.log(pretty)
|
||||
//json.value = pretty;
|
||||
}
|
||||
|
||||
let fromWrapper = (() => {
|
||||
|
||||
let plantcount = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
let json = document.getElementById('json') as HTMLInputElement
|
||||
|
||||
|
||||
function sync(current: PlantControllerConfig) {
|
||||
plantcount = current.plants.length
|
||||
|
||||
ap_ssid.value = current.ap_ssid;
|
||||
ssid.value = current.ssid;
|
||||
password.value = current.password;
|
||||
|
||||
mqtt_url.value = current.mqtt_url;
|
||||
base_topic.value = current.base_topic;
|
||||
max_consecutive_pump_count.value = current.max_consecutive_pump_count.toString();
|
||||
|
||||
tank_useable_ml.disabled = !current.tank_sensor_enabled;
|
||||
tank_warn_percent.disabled = !current.tank_sensor_enabled;
|
||||
tank_sensor_enabled.checked = current.tank_sensor_enabled;
|
||||
tank_allow_pumping_if_sensor_error.checked = current.tank_allow_pumping_if_sensor_error;
|
||||
tank_useable_ml.value = current.tank_useable_ml.toString();
|
||||
tank_warn_percent.value = current.tank_warn_percent.toString();
|
||||
tank_empty_percent.value = current.tank_empty_percent.toString();
|
||||
tank_full_percent.value = current.tank_full_percent.toString();
|
||||
|
||||
night_lamp_time_start.value = current.night_lamp_hour_start.toString();
|
||||
night_lamp_time_end.value = current.night_lamp_hour_end.toString();
|
||||
|
||||
for (let i = 0; i < current.plants.length; i++) {
|
||||
const plantConfig = current.plants[i];
|
||||
const plantView = controller.plantViews.getPlant(i);
|
||||
plantView.setConfig(plantConfig)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let submitFormBtn = document.getElementById("submit") as HTMLButtonElement
|
||||
let submit_status = document.getElementById("submit_status") as HTMLElement
|
||||
|
||||
if (submitFormBtn) {
|
||||
|
||||
submitFormBtn.onclick = function () {
|
||||
updateJson()
|
||||
fetch(PUBLIC_URL + "/set_config", {
|
||||
method: "POST",
|
||||
body: json.value,
|
||||
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(text => submit_status.innerText = text)
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
fetch(PUBLIC_URL + "/get_config")
|
||||
.then(response => response.json())
|
||||
.then(loaded => {
|
||||
var currentConfig = loaded as PlantControllerConfig;
|
||||
sync(currentConfig);
|
||||
var pretty = JSON.stringify(currentConfig, undefined, 1);
|
||||
json.value = pretty;
|
||||
}
|
||||
)
|
||||
})
|
||||
fromWrapper()
|
||||
|
||||
|
||||
|
||||
export function uploadFile() {
|
||||
var file1 = document.getElementById("file1") as HTMLInputElement;
|
||||
var loaded_n_total = document.getElementById("loaded_n_total") as HTMLElement;
|
||||
var progressBar = document.getElementById("progressBar") as HTMLProgressElement;
|
||||
var status = document.getElementById("status") as HTMLElement;
|
||||
var answer = document.getElementById("answer") as HTMLElement;
|
||||
|
||||
if (file1.files == null){
|
||||
//TODO error dialog here
|
||||
return
|
||||
}
|
||||
|
||||
var file = file1.files[0];
|
||||
var ajax = new XMLHttpRequest();
|
||||
|
||||
|
||||
ajax.upload.addEventListener("progress", event => {
|
||||
loaded_n_total.innerHTML = "Uploaded " + event.loaded + " bytes of " + event.total;
|
||||
var percent = (event.loaded / event.total) * 100;
|
||||
progressBar.value = Math.round(percent);
|
||||
status.innerHTML = Math.round(percent) + "%";
|
||||
answer.innerHTML = "in progress";
|
||||
}, false);
|
||||
ajax.addEventListener("load", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "finished";
|
||||
progressBar.value = 0;
|
||||
}, false);
|
||||
ajax.addEventListener("error", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "failed";
|
||||
}, false);
|
||||
ajax.addEventListener("abort", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "aborted";
|
||||
}, false);
|
||||
ajax.open("POST", PUBLIC_URL + "/ota");
|
||||
ajax.send(file);
|
||||
}
|
||||
|
||||
let file1Upload = document.getElementById("file1") as HTMLInputElement;
|
||||
file1Upload.onchange = uploadFile;
|
||||
|
||||
let firmware_buildtime = document.getElementById("firmware_buildtime") as HTMLDivElement;
|
||||
let firmware_githash = document.getElementById("firmware_githash") as HTMLDivElement;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
fetch(PUBLIC_URL + "/version")
|
||||
.then(response => response.json())
|
||||
.then(json => json as VersionInfo)
|
||||
.then(versionInfo => {
|
||||
firmware_buildtime.innerText = versionInfo.build_time;
|
||||
firmware_githash.innerText = versionInfo.git_hash;
|
||||
})
|
||||
}, false);
|
||||
|
||||
|
||||
let battery_flash_button = document.getElementById("battery_flash_button") as HTMLButtonElement;
|
||||
let battery_flash_file = document.getElementById("battery_flash_file") as HTMLInputElement;
|
||||
let battery_flash_message = document.getElementById("battery_flash_message") as HTMLElement;
|
||||
let battery_flash_progressBar = document.getElementById("battery_flash_progressBar") as HTMLProgressElement;
|
||||
let battery_flash_loaded_n_total = document.getElementById("battery_flash_loaded_n_total") as HTMLElement;
|
||||
let battery_flash_status = document.getElementById("battery_flash_status") as HTMLElement;
|
||||
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
|
||||
ajax.upload.addEventListener("progress", event => {
|
||||
battery_flash_loaded_n_total.innerHTML = "Uploaded " + event.loaded + " bytes of " + event.total;
|
||||
var percent = (event.loaded / event.total) * 100;
|
||||
battery_flash_progressBar.value = Math.round(percent);
|
||||
battery_flash_status.innerHTML = Math.round(percent) + "%";
|
||||
battery_flash_message.innerHTML = "in progress";
|
||||
}, false);
|
||||
ajax.addEventListener("load", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "finished";
|
||||
battery_flash_progressBar.value = 0;
|
||||
}, false);
|
||||
ajax.addEventListener("error", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "failed";
|
||||
}, false);
|
||||
ajax.addEventListener("abort", () => {
|
||||
battery_flash_status.innerHTML = ajax.responseText;
|
||||
battery_flash_message.innerHTML = "aborted";
|
||||
}, false);
|
||||
|
||||
|
||||
|
||||
|
||||
battery_flash_button.onclick = async function () {
|
||||
//ajax.open("POST", "/flashbattery");
|
||||
//ajax.send(battery_flash_file.files[0]);
|
||||
|
||||
ajax.open("POST", PUBLIC_URL + "/flashbattery?flash=true");
|
||||
ajax.send(battery_flash_file.files![0]);
|
||||
};
|
@ -1,58 +0,0 @@
|
||||
declare var PUBLIC_URL: string;
|
||||
|
||||
|
||||
export function uploadFile() {
|
||||
var file1 = document.getElementById("file1") as HTMLInputElement;
|
||||
var loaded_n_total = document.getElementById("loaded_n_total");
|
||||
var progressBar = document.getElementById("progressBar") as HTMLProgressElement;
|
||||
var status = document.getElementById("status");
|
||||
var answer = document.getElementById("answer");
|
||||
|
||||
var file = file1.files[0];
|
||||
var ajax = new XMLHttpRequest();
|
||||
|
||||
|
||||
ajax.upload.addEventListener("progress", event => {
|
||||
loaded_n_total.innerHTML = "Uploaded " + event.loaded + " bytes of " + event.total;
|
||||
var percent = (event.loaded / event.total) * 100;
|
||||
progressBar.value = Math.round(percent);
|
||||
status.innerHTML = Math.round(percent) + "%";
|
||||
answer.innerHTML = "in progress";
|
||||
}, false);
|
||||
ajax.addEventListener("load", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "finished";
|
||||
progressBar.value = 0;
|
||||
}, false);
|
||||
ajax.addEventListener("error", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "failed";
|
||||
}, false);
|
||||
ajax.addEventListener("abort", () => {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "aborted";
|
||||
}, false);
|
||||
ajax.open("POST", PUBLIC_URL+"/ota");
|
||||
ajax.send(file);
|
||||
}
|
||||
|
||||
interface VersionInfo{
|
||||
git_hash:string,
|
||||
build_time: string
|
||||
}
|
||||
|
||||
let file1Upload = document.getElementById("file1") as HTMLInputElement;
|
||||
file1Upload.onchange = uploadFile;
|
||||
|
||||
let firmware_buildtime = document.getElementById("firmware_buildtime") as HTMLDivElement;
|
||||
let firmware_githash = document.getElementById("firmware_githash") as HTMLDivElement;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
fetch(PUBLIC_URL+"/version")
|
||||
.then(response => response.json())
|
||||
.then(json => json as VersionInfo)
|
||||
.then(versionInfo => {
|
||||
firmware_buildtime.innerText = versionInfo.build_time;
|
||||
firmware_githash.innerText = versionInfo.git_hash;
|
||||
})
|
||||
}, false);
|
31
rust/src_webpack/src/plant.html
Normal file
31
rust/src_webpack/src/plant.html
Normal file
@ -0,0 +1,31 @@
|
||||
<h4 id="plant_${plantId}_header">Plant ${plantId}</h4>
|
||||
<div>
|
||||
<button id="plant_${plantId}_test">Test</button>
|
||||
</div>
|
||||
<div>
|
||||
Current:
|
||||
<br>
|
||||
Sensor A:<span id="plant_${plantId}_moisture_a">loading</span>
|
||||
<br>
|
||||
Sensor b:<span id="plant_${plantId}_moisture_b">loading</span>
|
||||
</div>
|
||||
Mode: <select id="plant_${plantId}_mode">
|
||||
<option value="OFF">Off</option>
|
||||
<option value="TargetMoisture">Target Moisture</option>
|
||||
<option value="TimerOnly">Timer Only</option>
|
||||
</select>
|
||||
|
||||
<div>
|
||||
Target Moisture: <input id="plant_${plantId}_target_moisture" type="number" min="0" max="100" placeholder="0">
|
||||
<br>
|
||||
Pump Time (s): <input id="plant_${plantId}_pump_time_s" type="number" min="0" max="600" placeholder="30">
|
||||
<br>
|
||||
Pump Cooldown (m): <input id="plant_${plantId}_pump_cooldown_min" type="number" min="0" max="600" placeholder="30">
|
||||
<br>
|
||||
"Pump Hour Start": <select id="plant_${plantId}_pump_hour_start">10</select>
|
||||
<br>
|
||||
"Pump Hour End": <select id="plant_${plantId}_pump_hour_end">19</select>
|
||||
<br>
|
||||
Sensor B installed: <input id="plant_${plantId}_sensor_b" type="checkbox">
|
||||
|
||||
</div>
|
142
rust/src_webpack/src/plant.ts
Normal file
142
rust/src_webpack/src/plant.ts
Normal file
@ -0,0 +1,142 @@
|
||||
|
||||
declare var PUBLIC_URL: string;
|
||||
|
||||
import { Controller } from ".";
|
||||
|
||||
export class PlantViews {
|
||||
private readonly plants: PlantView[] = []
|
||||
private readonly plantsDiv: HTMLDivElement
|
||||
|
||||
constructor(syncConfig:Controller) {
|
||||
this.plantsDiv = document.getElementById("plants") as HTMLDivElement;
|
||||
for (let plantId = 0; plantId < 8; plantId++) {
|
||||
this.plants[plantId] = new PlantView(plantId, this.plantsDiv, syncConfig);
|
||||
}
|
||||
}
|
||||
|
||||
getPlant(plantId: number) {
|
||||
return this.plants[plantId]
|
||||
}
|
||||
}
|
||||
|
||||
export class PlantView {
|
||||
private readonly plantId: number;
|
||||
private readonly plantDiv: HTMLDivElement;
|
||||
private readonly header: HTMLElement;
|
||||
private readonly testButton: HTMLButtonElement;
|
||||
private readonly targetMoisture: HTMLInputElement;
|
||||
private readonly pumpTimeS: HTMLInputElement;
|
||||
private readonly pumpCooldown: HTMLInputElement;
|
||||
private readonly pumpHourStart: HTMLSelectElement;
|
||||
private readonly pumpHourEnd: HTMLSelectElement;
|
||||
private readonly sensorBInstalled: HTMLInputElement;
|
||||
private readonly mode: HTMLSelectElement;
|
||||
private readonly moistureA: HTMLElement;
|
||||
private readonly moistureB: HTMLElement;
|
||||
|
||||
|
||||
constructor(plantId: number, parent:HTMLDivElement, controller:Controller) {
|
||||
const dummy = this;
|
||||
this.plantId = plantId;
|
||||
this.plantDiv = document.createElement("div")! as HTMLDivElement
|
||||
const template = require('./plant.html') as string;
|
||||
const plantRaw = template.replaceAll("${plantId}", String(plantId));
|
||||
this.plantDiv.innerHTML = plantRaw
|
||||
parent.appendChild(this.plantDiv)
|
||||
|
||||
this.header = document.getElementById("plant_"+plantId+"_header")!
|
||||
this.header.innerText = "Plant "+ (this.plantId+1)
|
||||
|
||||
this.moistureA = document.getElementById("plant_"+plantId+"_moisture_a")! as HTMLElement;
|
||||
this.moistureB = document.getElementById("plant_"+plantId+"_moisture_b")! as HTMLElement;
|
||||
|
||||
this.testButton = document.getElementById("plant_"+plantId+"_test")! as HTMLButtonElement;
|
||||
this.testButton.onclick = function(){
|
||||
controller.testPlant(plantId)
|
||||
}
|
||||
|
||||
this.mode = document.getElementById("plant_"+plantId+"_mode") as HTMLSelectElement
|
||||
this.mode.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
|
||||
this.targetMoisture = document.getElementById("plant_"+plantId+"_target_moisture")! as HTMLInputElement;
|
||||
this.targetMoisture.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
|
||||
this.pumpTimeS = document.getElementById("plant_"+plantId+"_pump_time_s") as HTMLInputElement;
|
||||
this.pumpTimeS.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
|
||||
this.pumpCooldown = document.getElementById("plant_"+plantId+"_pump_cooldown_min") as HTMLInputElement;
|
||||
this.pumpCooldown.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
|
||||
this.pumpHourStart = document.getElementById("plant_"+plantId+"_pump_hour_start") as HTMLSelectElement;
|
||||
this.pumpHourStart.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let option = document.createElement("option");
|
||||
if (i == 10){
|
||||
option.selected = true
|
||||
}
|
||||
option.innerText = i.toString();
|
||||
this.pumpHourStart.appendChild(option);
|
||||
}
|
||||
|
||||
this.pumpHourEnd = document.getElementById("plant_"+plantId+"_pump_hour_end") as HTMLSelectElement;
|
||||
this.pumpHourEnd.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let option = document.createElement("option");
|
||||
if (i == 19){
|
||||
option.selected = true
|
||||
}
|
||||
option.innerText = i.toString();
|
||||
this.pumpHourEnd.appendChild(option);
|
||||
}
|
||||
|
||||
this.sensorBInstalled = document.getElementById("plant_"+plantId+"_sensor_b") as HTMLInputElement;
|
||||
this.sensorBInstalled.onchange = function(){
|
||||
controller.configChanged()
|
||||
}
|
||||
console.log(this)
|
||||
}
|
||||
|
||||
setConfig(plantConfig: PlantConfig) {
|
||||
console.log("apply config to ui plant " + this.plantId + " config: " + JSON.stringify(plantConfig))
|
||||
this.mode.value = plantConfig.mode;
|
||||
this.targetMoisture.value = plantConfig.target_moisture.toString();
|
||||
this.pumpTimeS.value = plantConfig.pump_time_s.toString();
|
||||
this.pumpCooldown.value = plantConfig.pump_cooldown_min.toString();
|
||||
this.pumpHourStart.value = plantConfig.pump_hour_start.toString();
|
||||
this.pumpHourEnd.value = plantConfig.pump_hour_end.toString();
|
||||
this.sensorBInstalled.checked = plantConfig.sensor_b
|
||||
}
|
||||
|
||||
getConfig() :PlantConfig {
|
||||
const rv:PlantConfig = {
|
||||
mode: this.mode.value,
|
||||
target_moisture: +this.targetMoisture.value,
|
||||
pump_time_s: +this.pumpTimeS.value,
|
||||
pump_cooldown_min: +this.pumpCooldown.value,
|
||||
pump_hour_start: +this.pumpHourStart.value,
|
||||
pump_hour_end: +this.pumpHourEnd.value,
|
||||
sensor_b: this.sensorBInstalled.checked,
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
setMoistureA(a: number) {
|
||||
this.moistureA.innerText = String(a);
|
||||
}
|
||||
|
||||
setMoistureB(b: number) {
|
||||
this.moistureB.innerText = String(b);
|
||||
}
|
||||
}
|
34
rust/src_webpack/src/timeview.ts
Normal file
34
rust/src_webpack/src/timeview.ts
Normal file
@ -0,0 +1,34 @@
|
||||
declare var PUBLIC_URL: string;
|
||||
|
||||
export class TimeView {
|
||||
esp_time: HTMLDivElement
|
||||
rtc_time: HTMLDivElement
|
||||
browser_time: HTMLDivElement
|
||||
sync: HTMLButtonElement
|
||||
|
||||
constructor() {
|
||||
this.esp_time = document.getElementById("esp_time") as HTMLDivElement;
|
||||
this.rtc_time = document.getElementById("rtc_time") as HTMLDivElement;
|
||||
this.browser_time = document.getElementById("browser_time") as HTMLDivElement;
|
||||
this.sync = document.getElementById("time_upload") as HTMLButtonElement;
|
||||
this.sync.onclick = this.syncTimeFromBrowser;
|
||||
}
|
||||
|
||||
update(native: string, rtc: string) {
|
||||
this.esp_time.innerText = native;
|
||||
this.rtc_time.innerText = rtc;
|
||||
var date = new Date();
|
||||
this.browser_time.innerText = date.toISOString();
|
||||
}
|
||||
|
||||
syncTimeFromBrowser() {
|
||||
var value: SetTime = {
|
||||
time: new Date().toISOString()
|
||||
}
|
||||
var pretty = JSON.stringify(value, undefined, 1);
|
||||
fetch(PUBLIC_URL + "/time", {
|
||||
method: "POST",
|
||||
body: pretty
|
||||
})
|
||||
}
|
||||
}
|
@ -8,6 +8,11 @@
|
||||
"jsx": "react",
|
||||
"allowJs": true,
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"lib": [
|
||||
"es2021",
|
||||
"DOM"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ if (isDevServer){
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
entry: ['./src/form.ts','./src/ota.ts', "./src/battery.ts"],
|
||||
entry: ['./src/index.ts'],
|
||||
devtool: 'inline-source-map',
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
@ -34,15 +34,19 @@ module.exports = {
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
type: 'asset/source'
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
extensions: ['.tsx', '.ts', '.js', '.html'],
|
||||
},
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
|
Loading…
Reference in New Issue
Block a user