From 7205ef88717c6b6f821bac51a447da4794d758df Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Wed, 7 Sep 2022 22:15:24 +0200 Subject: [PATCH] chore: Add license Signed-off-by: Christoph Heiss --- LICENSE | 21 +++++++++++++++++++++ create-user.js | 2 ++ package-lock.json | 1 + package.json | 1 + src/components/base-layout.tsx | 2 ++ src/components/interface.tsx | 2 ++ src/components/peer.tsx | 2 ++ src/lib/database.ts | 2 ++ src/lib/utils.ts | 2 ++ src/lib/wireguard.ts | 2 ++ src/lib/withSession.ts | 2 ++ src/pages/_app.tsx | 2 ++ src/pages/_document.tsx | 2 ++ src/pages/api/interfaces.ts | 2 ++ src/pages/api/login.ts | 2 ++ src/pages/api/logout.ts | 2 ++ src/pages/index.tsx | 2 ++ src/pages/login.tsx | 2 ++ src/styles/globals.scss | 2 ++ src/types/blake2b.d.ts | 2 ++ src/types/iron-session.d.ts | 2 ++ 21 files changed, 59 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2cf9051 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Christoph Heiss + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/create-user.js b/create-user.js index 2f22b5f..f65d154 100644 --- a/create-user.js +++ b/create-user.js @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + const crypto = require('node:crypto'); const blake2b = require('blake2b'); const sqlite3 = require('sqlite3'); diff --git a/package-lock.json b/package-lock.json index fcc49e3..55da89e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "wgdash", "version": "0.1.0", + "license": "MIT", "dependencies": { "@js-temporal/polyfill": "^0.4.1", "blake2b": "^2.1.4", diff --git a/package.json b/package.json index 05fafba..ef7052e 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "name": "wgdash", "version": "0.1.0", "private": true, + "license": "MIT", "repository": { "type": "git", "url": "git@github.com:christoph-heiss/wgdash.git" diff --git a/src/components/base-layout.tsx b/src/components/base-layout.tsx index a9382ce..1e996cb 100644 --- a/src/components/base-layout.tsx +++ b/src/components/base-layout.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { useState, ReactNode, SyntheticEvent } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/router'; diff --git a/src/components/interface.tsx b/src/components/interface.tsx index 8e847f8..3189e73 100644 --- a/src/components/interface.tsx +++ b/src/components/interface.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import Peer from 'components/peer'; import type { WireguardInterface } from 'lib/wireguard'; import { formatTraffic } from 'lib/utils'; diff --git a/src/components/peer.tsx b/src/components/peer.tsx index 247e182..9be9b57 100644 --- a/src/components/peer.tsx +++ b/src/components/peer.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import type { WireguardPeer } from 'lib/wireguard'; import { formatKeepAlive, formatTimeDelta, formatTraffic } from 'lib/utils'; diff --git a/src/lib/database.ts b/src/lib/database.ts index c44f434..18505d8 100644 --- a/src/lib/database.ts +++ b/src/lib/database.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import path from 'node:path'; import { Model } from 'objection'; import Knex from 'knex'; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index a3ea718..ec6aa3e 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { Temporal } from '@js-temporal/polyfill'; export function classNames(...args: any[]): string { diff --git a/src/lib/wireguard.ts b/src/lib/wireguard.ts index c4fdf95..f007bc1 100644 --- a/src/lib/wireguard.ts +++ b/src/lib/wireguard.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { createRtNetlink, createGenericNetlink, diff --git a/src/lib/withSession.ts b/src/lib/withSession.ts index db358fc..364ac66 100644 --- a/src/lib/withSession.ts +++ b/src/lib/withSession.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { GetServerSidePropsContext, GetServerSidePropsResult, diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 17e28bf..cc7253d 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { AppProps } from 'next/app'; import Head from 'next/head'; import 'styles/globals.scss'; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 3676246..2af4699 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import Document, { Html, Head, Main, NextScript, } from 'next/document'; diff --git a/src/pages/api/interfaces.ts b/src/pages/api/interfaces.ts index 443c879..b737bf5 100644 --- a/src/pages/api/interfaces.ts +++ b/src/pages/api/interfaces.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import type { NextApiRequest, NextApiResponse } from 'next'; import { getWireguardInterfaces, WireguardInterface } from 'lib/wireguard'; import { withSessionRoute } from 'lib/withSession'; diff --git a/src/pages/api/login.ts b/src/pages/api/login.ts index 714cc6f..91073e4 100644 --- a/src/pages/api/login.ts +++ b/src/pages/api/login.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { NextApiRequest, NextApiResponse } from 'next'; import blake2b from 'blake2b'; import { User } from 'lib/database'; diff --git a/src/pages/api/logout.ts b/src/pages/api/logout.ts index 981d10d..38183e3 100644 --- a/src/pages/api/logout.ts +++ b/src/pages/api/logout.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { NextApiRequest, NextApiResponse } from 'next'; import { withSessionRoute } from 'lib/withSession'; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6b85d1f..fd5084d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { useEffect, useState } from 'react'; import BaseLayout from 'components/base-layout'; import Interface from 'components/interface'; diff --git a/src/pages/login.tsx b/src/pages/login.tsx index f00e17f..f6c6382 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + import { useState, SyntheticEvent } from 'react'; import { useRouter } from 'next/router'; import BaseLayout from 'components/base-layout'; diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 1943256..c35a8e7 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + @tailwind base; @tailwind components; @tailwind utilities; diff --git a/src/types/blake2b.d.ts b/src/types/blake2b.d.ts index e0506e7..9de7fcd 100644 --- a/src/types/blake2b.d.ts +++ b/src/types/blake2b.d.ts @@ -1 +1,3 @@ +// SPDX-License-Identifier: MIT + declare module 'blake2b'; diff --git a/src/types/iron-session.d.ts b/src/types/iron-session.d.ts index abe7a67..99bfb01 100644 --- a/src/types/iron-session.d.ts +++ b/src/types/iron-session.d.ts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + declare module 'iron-session' { interface IronSessionData { user?: string;