Initial commit
This commit is contained in:
3
web/frontend/.browserslistrc
Normal file
3
web/frontend/.browserslistrc
Normal file
@@ -0,0 +1,3 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
7
web/frontend/.editorconfig
Normal file
7
web/frontend/.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
||||
[*.{js,jsx,ts,tsx,vue}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
19
web/frontend/.eslintrc.js
Normal file
19
web/frontend/.eslintrc.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'@vue/airbnb',
|
||||
'@vue/typescript/recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'implicit-arrow-linebreak': 'warn',
|
||||
},
|
||||
};
|
23
web/frontend/.gitignore
vendored
Normal file
23
web/frontend/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
24
web/frontend/README.md
Normal file
24
web/frontend/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# vue-frontend
|
||||
|
||||
## Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
web/frontend/babel.config.js
Normal file
5
web/frontend/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset',
|
||||
],
|
||||
};
|
48
web/frontend/package.json
Normal file
48
web/frontend/package.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "apiary-frontend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/rubik": "^4.2.2",
|
||||
"@fontsource/secular-one": "^4.2.2",
|
||||
"axios": "^0.21.1",
|
||||
"bootstrap": "^4.6.0",
|
||||
"bootstrap-vue": "^2.21.2",
|
||||
"chart.js": "^3.0.2",
|
||||
"core-js": "^3.6.5",
|
||||
"d3": "^6.6.2",
|
||||
"d3-svg-legend": "^2.25.6",
|
||||
"faker": "^5.5.2",
|
||||
"randomcolor": "^0.6.2",
|
||||
"s-ago": "^2.2.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-class-component": "^7.2.3",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vue-router": "^3.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/d3": "^6.3.0",
|
||||
"@types/faker": "^5.5.1",
|
||||
"@types/randomcolor": "^0.5.5",
|
||||
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
||||
"@typescript-eslint/parser": "^4.18.0",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"@vue/eslint-config-airbnb": "^5.0.2",
|
||||
"@vue/eslint-config-typescript": "^7.0.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"sass": "^1.26.5",
|
||||
"sass-loader": "^8.0.2",
|
||||
"typescript": "~4.1.5",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
}
|
||||
}
|
BIN
web/frontend/public/favicon.ico
Normal file
BIN
web/frontend/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
21
web/frontend/public/index.html
Normal file
21
web/frontend/public/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title>apiary.t-juice.club</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
|
||||
Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
web/frontend/public/logo192.png
Normal file
BIN
web/frontend/public/logo192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
63
web/frontend/src/App.vue
Normal file
63
web/frontend/src/App.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div id="apiary-navbar">
|
||||
<b-navbar type="dark" variant="dark">
|
||||
<b-navbar-brand href="#">
|
||||
<img
|
||||
alt="logo"
|
||||
src="logo192.png"
|
||||
width="29"
|
||||
height="29"
|
||||
class="d-inline-block align-top"
|
||||
/>
|
||||
apiary.t-juice.club
|
||||
</b-navbar-brand>
|
||||
<b-navbar-nav>
|
||||
<b-nav-item :to="'/'">Home</b-nav-item>
|
||||
<b-nav-item :to="'/hello'">Hello</b-nav-item>
|
||||
<b-nav-item :to="'/stats'">Stats</b-nav-item>
|
||||
<b-nav-item :to="'/attempts'">Attempts</b-nav-item>
|
||||
</b-navbar-nav>
|
||||
</b-navbar>
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
|
||||
<!-- <HelloWorld msg="Welcome to Your Vue.js + TypeScript App" /> -->
|
||||
<!-- <AttemptList items="{ testAttempts }" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import HelloWorld from '@/components/HelloWorld.vue';
|
||||
import AttemptList from '@/components/AttemptList.vue';
|
||||
import Stats from '@/components/Stats.vue';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
HelloWorld,
|
||||
AttemptList,
|
||||
Stats,
|
||||
},
|
||||
})
|
||||
export default class App extends Vue {}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
$font-stack: 'Secular One';
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: 'Secular One', sans-serif;
|
||||
}
|
||||
.navbar-nav a {
|
||||
font-family: 'Rubik';
|
||||
}
|
||||
</style>
|
8
web/frontend/src/apiary/DummyClient.ts
Normal file
8
web/frontend/src/apiary/DummyClient.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ApiaryAPI, LoginAttempt } from "@/apiary/apiary";
|
||||
|
||||
|
||||
export class ApiaryDummyClient implements ApiaryAPI {
|
||||
streamLoginAttempts(): any {
|
||||
return 'a';
|
||||
}
|
||||
}
|
35
web/frontend/src/apiary/apiary.ts
Normal file
35
web/frontend/src/apiary/apiary.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import FakerStatic from 'faker';
|
||||
|
||||
export interface LoginAttempt {
|
||||
readonly date: string;
|
||||
readonly remoteIP: string;
|
||||
readonly username: string;
|
||||
readonly password: string;
|
||||
readonly sshClientVersion: string;
|
||||
readonly connectionUUID: string;
|
||||
}
|
||||
|
||||
export interface StatResult {
|
||||
name: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface ApiaryAPI {
|
||||
streamLoginAttempts(): ReadableStream<LoginAttempt>;
|
||||
}
|
||||
|
||||
export function fakeAttempt(): LoginAttempt {
|
||||
return {
|
||||
date: FakerStatic.date.recent().toLocaleDateString(),
|
||||
remoteIP: FakerStatic.internet.ip(),
|
||||
username: FakerStatic.internet.userName(),
|
||||
password: FakerStatic.internet.password(),
|
||||
sshClientVersion: FakerStatic.lorem.words(2),
|
||||
connectionUUID: FakerStatic.datatype.uuid(),
|
||||
};
|
||||
}
|
||||
|
||||
export function fakeAttemptStream(): EventSource {
|
||||
const es = new EventSource('/stream');
|
||||
return es;
|
||||
}
|
BIN
web/frontend/src/assets/logo.png
Normal file
BIN
web/frontend/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
85
web/frontend/src/components/AttemptList.vue
Normal file
85
web/frontend/src/components/AttemptList.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div class="attemptlist">
|
||||
<h1>Attempt list</h1>
|
||||
<p>
|
||||
<b-table
|
||||
striped
|
||||
hover
|
||||
:items="prettiedAttempts"
|
||||
:fields="fields"
|
||||
></b-table>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { BvTableFieldArray } from 'bootstrap-vue';
|
||||
import ago from 's-ago';
|
||||
import { LoginAttempt, fakeAttempt, fakeAttemptStream } from '@/apiary/apiary';
|
||||
|
||||
@Component
|
||||
export default class AttemptList extends Vue {
|
||||
@Prop() private items!: LoginAttempt[];
|
||||
|
||||
attempts: LoginAttempt[];
|
||||
|
||||
fields: BvTableFieldArray = [
|
||||
{
|
||||
key: 'date',
|
||||
sortable: true,
|
||||
// formatter: (value: string): string => ago(new Date(value)),
|
||||
sortByFormatted: false,
|
||||
},
|
||||
{
|
||||
key: 'username',
|
||||
},
|
||||
{
|
||||
key: 'password',
|
||||
},
|
||||
{
|
||||
key: 'remoteIP',
|
||||
sortable: true,
|
||||
},
|
||||
];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.attempts = [];
|
||||
}
|
||||
|
||||
prettiedAttempts(): LoginAttempt[] {
|
||||
const prettied = this.attempts.map<LoginAttempt>((value: LoginAttempt) => ({
|
||||
date: ago(new Date(value.date)),
|
||||
remoteIP: value.remoteIP,
|
||||
username: value.username,
|
||||
password: value.password,
|
||||
sshClientVersion: value.sshClientVersion,
|
||||
connectionUUID: value.connectionUUID,
|
||||
}));
|
||||
return prettied;
|
||||
}
|
||||
|
||||
mounted(): void {
|
||||
/**
|
||||
console.log(this);
|
||||
const at: LoginAttempt[] = [];
|
||||
|
||||
for (let i = 0; i < 5; i += 1) {
|
||||
at.push(fakeAttempt());
|
||||
}
|
||||
|
||||
setInterval(() => {
|
||||
at.push(fakeAttempt());
|
||||
}, 1000);
|
||||
*/
|
||||
|
||||
const attemptStream = fakeAttemptStream();
|
||||
attemptStream.addEventListener('message', (ev: MessageEvent<string>) => {
|
||||
console.log(ev);
|
||||
const parsed: LoginAttempt = JSON.parse(ev.data);
|
||||
this.attempts.unshift(parsed);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
59
web/frontend/src/components/HelloWorld.vue
Normal file
59
web/frontend/src/components/HelloWorld.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript" target="_blank" rel="noopener">typescript</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
|
||||
@Component
|
||||
export default class HelloWorld extends Vue {
|
||||
@Prop() private msg!: string;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped lang="scss">
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
26
web/frontend/src/components/Stats.vue
Normal file
26
web/frontend/src/components/Stats.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="stats">
|
||||
<h1>Stats!</h1>
|
||||
<stats-username />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import StatsUsername from '@/components/StatsUsername.vue';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
StatsUsername,
|
||||
},
|
||||
})
|
||||
export default class Stats extends Vue {
|
||||
@Prop() private msg!: string;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stats {
|
||||
align-content: center;
|
||||
width: 70%;
|
||||
}
|
||||
</style>
|
67
web/frontend/src/components/StatsUsername.vue
Normal file
67
web/frontend/src/components/StatsUsername.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="stats-container">
|
||||
<h2>Top 10 usernames</h2>
|
||||
<div class="chart-container">
|
||||
<canvas id="chart" widht="400" height="400"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { StatResult } from '@/apiary/apiary';
|
||||
import axios from 'axios';
|
||||
import Chart from 'chart.js/auto';
|
||||
import randomColor from 'randomcolor';
|
||||
|
||||
@Component
|
||||
export default class StatsUsername extends Vue {
|
||||
@Prop() private msg!: string;
|
||||
|
||||
stats: StatResult[];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.stats = [];
|
||||
}
|
||||
|
||||
mounted(): void {
|
||||
axios
|
||||
.get<StatResult[]>('/api/stats?type=username&limit=10')
|
||||
.then((resp) => {
|
||||
this.stats = resp.data;
|
||||
this.renderPie();
|
||||
});
|
||||
}
|
||||
|
||||
renderPie(): void {
|
||||
const elem = document.getElementById('chart') as HTMLCanvasElement;
|
||||
const ctx = elem.getContext('2d') as CanvasRenderingContext2D;
|
||||
const sortedStats = this.stats.sort();
|
||||
const values = sortedStats.map((s) => s.count);
|
||||
const headers = sortedStats.map((s) => s.name);
|
||||
const colors = sortedStats.map(() => randomColor());
|
||||
|
||||
const chart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: headers,
|
||||
options: {},
|
||||
datasets: [
|
||||
{
|
||||
data: values,
|
||||
backgroundColor: colors,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chart-container {
|
||||
max-width: 500px;
|
||||
max-height: 500px;
|
||||
}
|
||||
</style>
|
64
web/frontend/src/main.ts
Normal file
64
web/frontend/src/main.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import Vue from 'vue';
|
||||
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue';
|
||||
import VueRouter, { RouteConfig } from 'vue-router';
|
||||
import AttemptList from '@/components/AttemptList.vue';
|
||||
import HelloWorld from '@/components/HelloWorld.vue';
|
||||
import Stats from '@/components/Stats.vue';
|
||||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
||||
import '@fontsource/rubik';
|
||||
import '@fontsource/secular-one';
|
||||
import { LoginAttempt } from '@/apiary/apiary';
|
||||
import App from './App.vue';
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
// Make BootstrapVue available throughout your project
|
||||
Vue.use(BootstrapVue);
|
||||
// Optionally install the BootstrapVue icon components plugin
|
||||
Vue.use(IconsPlugin);
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes: Array<RouteConfig> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: HelloWorld,
|
||||
alias: '/home',
|
||||
},
|
||||
{
|
||||
path: '/hello',
|
||||
name: 'Hello',
|
||||
component: HelloWorld,
|
||||
props: {
|
||||
default: true,
|
||||
msg: 'LOL',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/attempts',
|
||||
name: 'Attempt List',
|
||||
component: AttemptList,
|
||||
props: {
|
||||
// items: testAttempts,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/stats',
|
||||
name: 'Stats',
|
||||
component: Stats,
|
||||
},
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes,
|
||||
});
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: (h) => h(App),
|
||||
}).$mount('#app');
|
27
web/frontend/src/router/router.ts
Normal file
27
web/frontend/src/router/router.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
import VueRouter, { RouteConfig } from 'vue-router';
|
||||
import AttemptList from "../components/Simulator.vue";
|
||||
import HelloWorld from "../components/HelloWorld.vue";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes: Array<RouteConfig> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: HelloWorld
|
||||
},
|
||||
{
|
||||
path: '/attempts',
|
||||
name: 'Attempt List',
|
||||
component: AttemptList
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
});
|
||||
|
||||
export default router;
|
13
web/frontend/src/shims-tsx.d.ts
vendored
Normal file
13
web/frontend/src/shims-tsx.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import Vue, { VNode } from 'vue';
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
interface Element extends VNode {}
|
||||
// tslint:disable no-empty-interface
|
||||
interface ElementClass extends Vue {}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any
|
||||
}
|
||||
}
|
||||
}
|
5
web/frontend/src/shims-vue.d.ts
vendored
Normal file
5
web/frontend/src/shims-vue.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module '*.vue' {
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue;
|
||||
}
|
40
web/frontend/tsconfig.json
Normal file
40
web/frontend/tsconfig.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"importHelpers": true,
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"types": [
|
||||
"webpack-env"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"tests/**/*.ts",
|
||||
"tests/**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
9954
web/frontend/yarn.lock
Normal file
9954
web/frontend/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user