parent
db4731e1af
commit
bbf41f41a9
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"es2021": true,
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"airbnb-typescript/base",
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended"
|
|
||||||
],
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"import",
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"overrides": [],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"sourceType": "module",
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"eol-last": [
|
|
||||||
"error",
|
|
||||||
"always"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "app",
|
|
||||||
"version": "1.3.1",
|
|
||||||
"description": "",
|
|
||||||
"main": "index.js",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"predev": "npm install && rimraf dist/*",
|
|
||||||
"prestart": "resolve-tspaths --out \"/opt/backend/dist/backend/src\"",
|
|
||||||
"start": "node --inspect=0.0.0.0:9229 dist/backend/src/app.js",
|
|
||||||
"dev": "tsc-watch --onSuccess \"npm run start\" --onFailure \"echo WHOOPS! Server compilation failed\""
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "Fionn Sperath",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"axios": "^1.3.4",
|
|
||||||
"express": "^4.18.1",
|
|
||||||
"morgan": "^1.10.0",
|
|
||||||
"node-schedule": "^2.1.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/express": "^4.17.13",
|
|
||||||
"@types/morgan": "^1.9.4",
|
|
||||||
"@types/node": "^18.7.6",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
||||||
"@typescript-eslint/parser": "^5.38.1",
|
|
||||||
"eslint": "^8.23.1",
|
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
||||||
"eslint-plugin-import": "^2.26.0",
|
|
||||||
"eslint-plugin-n": "^15.2.5",
|
|
||||||
"eslint-plugin-promise": "^6.0.1",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"tsc-watch": "^5.0.3",
|
|
||||||
"resolve-tspaths": "^0.8.8",
|
|
||||||
"typescript": "^4.7.4"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"es2021": true,
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"airbnb-typescript/base",
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended"
|
|
||||||
],
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"import",
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"overrides": [],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"sourceType": "module",
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"import/extensions": "off",
|
|
||||||
"eol-last": [
|
|
||||||
"error",
|
|
||||||
"always"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ignorePatterns": [
|
|
||||||
"**/vite.config.ts"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
lerna-debug.log*
|
|
||||||
|
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
dist-ssr
|
|
||||||
*.local
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.vscode/*
|
|
||||||
!.vscode/extensions.json
|
|
||||||
.idea
|
|
||||||
.DS_Store
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.sw?
|
|
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "frontend",
|
|
||||||
"private": true,
|
|
||||||
"version": "1.3.1",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "tsc && vite build",
|
|
||||||
"preview": "vite preview"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"axios": "^1.4.0",
|
|
||||||
"bootstrap": "^5.2.3",
|
|
||||||
"leaflet": "^1.9.3",
|
|
||||||
"react": "^18.2.0",
|
|
||||||
"react-bootstrap": "^2.7.4",
|
|
||||||
"react-dom": "^18.2.0",
|
|
||||||
"react-leaflet": "^4.2.1",
|
|
||||||
"react-router": "^6.11.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/leaflet": "^1.9.3",
|
|
||||||
"@types/node": "^18.16.3",
|
|
||||||
"@types/react": "^18.0.26",
|
|
||||||
"@types/react-dom": "^18.0.9",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
||||||
"@typescript-eslint/parser": "^5.38.1",
|
|
||||||
"@vitejs/plugin-react": "^3.0.0",
|
|
||||||
"eslint": "^8.23.1",
|
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
||||||
"eslint-plugin-import": "^2.26.0",
|
|
||||||
"eslint-plugin-n": "^15.2.5",
|
|
||||||
"eslint-plugin-promise": "^6.0.1",
|
|
||||||
"eslint-plugin-react": "^7.31.11",
|
|
||||||
"typescript": "^4.9.4",
|
|
||||||
"vite": "^4.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ESNext",
|
|
||||||
"useDefineForClassFields": true,
|
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
||||||
"allowJs": false,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"esModuleInterop": false,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"strict": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "Node",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"jsx": "react-jsx",
|
|
||||||
"paths": {
|
|
||||||
"@shared/*": ["../shared/src/*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"include": ["src"],
|
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "Node",
|
|
||||||
"allowSyntheticDefaultImports": true
|
|
||||||
},
|
|
||||||
"include": ["vite.config.ts"]
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,106 @@
|
|||||||
|
{
|
||||||
|
"name": "iassure-wx",
|
||||||
|
"version": "1.3.2",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"paths": "resolve-tspaths --out \"dist\"",
|
||||||
|
"start": "resolve-tspaths --out \"dist\" && node --inspect=0.0.0.0:9229 dist/backend/app.js",
|
||||||
|
"dev": "tsc-watch -p ./tsconfig.node.json --onSuccess \"npm run start\" --onFailure \"echo WHOOPS! Server compilation failed\"",
|
||||||
|
"spa-dev": "vite --config=src/frontend/vite.config.ts",
|
||||||
|
"spa-build": "tsc -p ./tsconfig.web.json && vite --config=src/frontend/vite.config.ts build",
|
||||||
|
"spa-preview": "vite --config=src/frontend/vite.config.ts"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "Fionn Sperath",
|
||||||
|
"license": "AGPL-3.0-only",
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^1.3.4",
|
||||||
|
"express": "^4.18.1",
|
||||||
|
"morgan": "^1.10.0",
|
||||||
|
"node-schedule": "^2.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.13",
|
||||||
|
"@types/leaflet": "^1.9.3",
|
||||||
|
"@types/morgan": "^1.9.4",
|
||||||
|
"@types/node": "^18.16.3",
|
||||||
|
"@types/react-dom": "^18.0.9",
|
||||||
|
"@types/react": "^18.0.26",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
||||||
|
"@typescript-eslint/parser": "^5.38.1",
|
||||||
|
"@vitejs/plugin-react": "^3.0.0",
|
||||||
|
"bootstrap": "^5.2.3",
|
||||||
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||||
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
"eslint-plugin-n": "^15.2.5",
|
||||||
|
"eslint-plugin-promise": "^6.0.1",
|
||||||
|
"eslint-plugin-react": "^7.31.11",
|
||||||
|
"eslint": "^8.23.1",
|
||||||
|
"leaflet": "^1.9.3",
|
||||||
|
"react-bootstrap": "^2.7.4",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-leaflet": "^4.2.1",
|
||||||
|
"react-router": "^6.11.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"resolve-tspaths": "^0.8.8",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"tsc-watch": "^5.0.3",
|
||||||
|
"typescript": "^4.9.4",
|
||||||
|
"vite": "^4.0.0"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"env": {
|
||||||
|
"es2021": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"airbnb-typescript/base",
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"root": true,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint",
|
||||||
|
"import",
|
||||||
|
"promise"
|
||||||
|
],
|
||||||
|
"overrides": [],
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest",
|
||||||
|
"sourceType": "module",
|
||||||
|
"project": [
|
||||||
|
"./tsconfig.node.json",
|
||||||
|
"./tsconfig.web.json"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-console": "warn",
|
||||||
|
"import/extensions": "off",
|
||||||
|
"eol-last": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"import/no-extraneous-dependencies": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"devDependencies": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"import/order": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"newlines-between": "always",
|
||||||
|
"alphabetize": {
|
||||||
|
"order": "asc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"es2021": true,
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"airbnb-typescript/base",
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended"
|
|
||||||
],
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"import",
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"overrides": [],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"sourceType": "module",
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"eol-last": [
|
|
||||||
"error",
|
|
||||||
"always"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^18.6.2",
|
|
||||||
"eslint": "^8.23.1",
|
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
||||||
"eslint-plugin-import": "^2.26.0",
|
|
||||||
"eslint-plugin-n": "^15.2.5",
|
|
||||||
"eslint-plugin-promise": "^6.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"compileOnSave": false,
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "dist",
|
|
||||||
"baseUrl": "./src",
|
|
||||||
"module": "ES2022",
|
|
||||||
"target": "ES2022",
|
|
||||||
"lib": ["ES2022"],
|
|
||||||
"sourceMap": true,
|
|
||||||
"strictNullChecks": true,
|
|
||||||
"noImplicitAny": false,
|
|
||||||
"preserveConstEnums": true,
|
|
||||||
"removeComments": true,
|
|
||||||
"forceConsistentCasingInFileNames": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
|
||||||
import regionsService from '../services/regions.service';
|
import regionsService from '../services/regions.service';
|
||||||
|
|
||||||
export async function getRegions(req: express.Request, res: express.Response, next: express.NextFunction) {
|
export async function getRegions(req: express.Request, res: express.Response, next: express.NextFunction) {
|
@ -1,4 +1,5 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
|
||||||
import wxService from '../services/wx.service';
|
import wxService from '../services/wx.service';
|
||||||
|
|
||||||
export async function getRegionWx(req: express.Request, res: express.Response, next: express.NextFunction) {
|
export async function getRegionWx(req: express.Request, res: express.Response, next: express.NextFunction) {
|
@ -1,5 +1,6 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { WxConfig } from '@shared/types/config.types';
|
|
||||||
|
import { WxConfig } from '@/shared/types/config.types';
|
||||||
|
|
||||||
|
|
||||||
export function getConfig(): WxConfig {
|
export function getConfig(): WxConfig {
|
@ -1,5 +1,6 @@
|
|||||||
import configService from './config.service';
|
import configService from './config.service';
|
||||||
import { WxConfig, WxRegion } from '@shared/types/config.types';
|
|
||||||
|
import { WxConfig, WxRegion } from '@/shared/types/config.types';
|
||||||
|
|
||||||
export function getRegions(): WxConfig['regions'] {
|
export function getRegions(): WxConfig['regions'] {
|
||||||
return configService.getConfig().regions;
|
return configService.getConfig().regions;
|
@ -1,8 +1,9 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import regionsService from './regions.service';
|
import regionsService from './regions.service';
|
||||||
|
|
||||||
import { WxFix } from '@shared/types/config.types';
|
import { WxFix } from '@/shared/types/config.types';
|
||||||
import { WxFixData, WxData } from '@shared/types/wx.types';
|
import { WxFixData, WxData } from '@/shared/types/wx.types';
|
||||||
|
|
||||||
const cachedData: { [key: string]: WxData } = {};
|
const cachedData: { [key: string]: WxData } = {};
|
||||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1,14 +1,16 @@
|
|||||||
import 'leaflet/dist/leaflet.css';
|
import 'leaflet/dist/leaflet.css';
|
||||||
import 'bootstrap/dist/css/bootstrap.css';
|
import 'bootstrap/dist/css/bootstrap.css';
|
||||||
|
|
||||||
import { MapContainer, TileLayer, LayersControl, LayerGroup, Popup, Marker } from 'react-leaflet';
|
import { DivIcon } from 'leaflet';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
import { Button, Modal, Table } from 'react-bootstrap';
|
import { Button, Modal, Table } from 'react-bootstrap';
|
||||||
|
import { MapContainer, TileLayer, LayersControl, LayerGroup, Popup, Marker } from 'react-leaflet';
|
||||||
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import wxService from './services/wx.service';
|
import wxService from './services/wx.service';
|
||||||
import { WxRegion } from '@shared/types/config.types';
|
|
||||||
import { WxData } from '../../shared/src/types/wx.types';
|
import { WxRegion } from '@/shared/types/config.types';
|
||||||
import { DivIcon } from 'leaflet';
|
import { WxData } from '@/shared/types/wx.types';
|
||||||
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
@ -1,7 +1,8 @@
|
|||||||
import { WxRegion } from '@shared/types/config.types';
|
|
||||||
import { WxData } from '@shared/types/wx.types';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
import { WxRegion } from '@/shared/types/config.types';
|
||||||
|
import { WxData } from '@/shared/types/wx.types';
|
||||||
|
|
||||||
async function getRegions(): Promise<WxRegion[]> {
|
async function getRegions(): Promise<WxRegion[]> {
|
||||||
const response = await axios.get<WxRegion[]>('/api/regions');
|
const response = await axios.get<WxRegion[]>('/api/regions');
|
||||||
return response.data;
|
return response.data;
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/backend/**/*",
|
||||||
|
"src/shared/**/*",
|
||||||
|
"src/frontend/vite.config.ts"
|
||||||
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": false
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/frontend/**/*",
|
||||||
|
"src/shared/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"src/frontend/vite.config.ts"
|
||||||
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"composite": false,
|
||||||
|
"noEmit": true,
|
||||||
|
"allowJs": false,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue