Dockerfied

This commit is contained in:
Ipmake 2024-03-13 09:45:34 +01:00
parent 3ce6ee1c5f
commit 7601afd05c
32 changed files with 63 additions and 1359 deletions

3
backend/.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.env
node_modules
dist

12
backend/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM node:lts-buster
WORKDIR /app
COPY package.json /app
RUN npm install
COPY . /app
EXPOSE 3001
CMD ["npm", "run deploy"]

View File

@ -4,7 +4,8 @@
"description": "",
"main": "./dist/index.js",
"scripts": {
"start": "npx tsc && node dist/index.js"
"start": "npx tsc && node dist/index.js",
"deploy": "npx prisma db push && npx prisma generate && npx tsc && node dist/index.js"
},
"keywords": [],
"author": "",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.3145608a.css",
"main.js": "/static/js/main.20c1133d.js",
"main.js": "/static/js/main.d5b20504.js",
"static/media/lexend-latin-wght-normal.woff2": "/static/media/lexend-latin-wght-normal.f0861a122355d47a9b27.woff2",
"static/media/overpass-latin-wght-normal.woff2": "/static/media/overpass-latin-wght-normal.4b83544cf101ef6f5e10.woff2",
"static/media/overpass-latin-ext-wght-normal.woff2": "/static/media/overpass-latin-ext-wght-normal.c7886930b5698c36c8d2.woff2",
@ -12,10 +12,10 @@
"static/media/overpass-vietnamese-wght-normal.woff2": "/static/media/overpass-vietnamese-wght-normal.d1e91653b90562a59206.woff2",
"index.html": "/index.html",
"main.3145608a.css.map": "/static/css/main.3145608a.css.map",
"main.20c1133d.js.map": "/static/js/main.20c1133d.js.map"
"main.d5b20504.js.map": "/static/js/main.d5b20504.js.map"
},
"entrypoints": [
"static/css/main.3145608a.css",
"static/js/main.20c1133d.js"
"static/js/main.d5b20504.js"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>DWL Birthdays</title><script defer="defer" src="/static/js/main.20c1133d.js"></script><link href="/static/css/main.3145608a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>DWL Birthdays</title><script defer="defer" src="/static/js/main.d5b20504.js"></script><link href="/static/css/main.3145608a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View File

@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "DWLDash",
"name": "Event dashboard for DWL",
"icons": [
{
"src": "favicon.ico",

View File

@ -1,3 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,9 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/* @license
Papa Parse
v5.4.1
https://github.com/mholt/PapaParse
License: MIT
*/
/**
* @license React

File diff suppressed because one or more lines are too long

View File

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading</title>
</head>
<body>
</body>
</html>

View File

@ -26,6 +26,13 @@ app.use((req, res, next) => {
app.use(express.static('public'))
// all 404 requests go to the index in that folder
app.use((req, res, next) => {
// ihnore /api routes
if (req.path.startsWith('/api')) return next()
res.sendFile('index.html', { root: 'public' })
})
export { prisma, app }
init()

21
docker-compose.yaml Normal file
View File

@ -0,0 +1,21 @@
name: dwldash
services:
postgres:
volumes:
- dwldashdb:/var/lib/postgres
restart: no
environment:
POSTGRES_PASSWORD: bQnroQrK9uUrq7
image: postgres
app:
volumes:
- /var/run/dwldash/docker/data:/dwldash
restart: no
environment:
DATABASE_URL: postgres://postgres:bQnroQrK9uUrq7@postgres:5432/DWL
PORT: 3000
image: git.ipmake.me/bkrheine/dwldashboard:latest
ports:
- "3000:3000"
volumes:
dwldashdb:

View File

@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "DWLDash",
"name": "Event dashboard for DWL",
"icons": [
{
"src": "favicon.ico",

View File

@ -1,657 +0,0 @@
{
"name": "manager",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "manager",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@inquirer/prompts": "^3.3.0",
"chalk": "^3.0.0"
},
"devDependencies": {
"@types/inquirer": "^9.0.7",
"@types/node": "^20.11.5",
"typescript": "^5.3.3"
}
},
"node_modules/@inquirer/checkbox": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-1.5.0.tgz",
"integrity": "sha512-3cKJkW1vIZAs4NaS0reFsnpAjP0azffYII4I2R7PTI7ZTMg5Y1at4vzXccOH3762b2c2L4drBhpJpf9uiaGNxA==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"ansi-escapes": "^4.3.2",
"chalk": "^4.1.2",
"figures": "^3.2.0"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/checkbox/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/confirm": {
"version": "2.0.15",
"resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-2.0.15.tgz",
"integrity": "sha512-hj8Q/z7sQXsF0DSpLQZVDhWYGN6KLM/gNjjqGkpKwBzljbQofGjn0ueHADy4HUY+OqDHmXuwk/bY+tZyIuuB0w==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"chalk": "^4.1.2"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/confirm/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/core": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@inquirer/core/-/core-5.1.1.tgz",
"integrity": "sha512-IuJyZQUg75+L5AmopgnzxYrgcU6PJKL0hoIs332G1Gv55CnmZrhG6BzNOeZ5sOsTi1YCGOopw4rYICv74ejMFg==",
"dependencies": {
"@inquirer/type": "^1.1.5",
"@types/mute-stream": "^0.0.4",
"@types/node": "^20.9.0",
"@types/wrap-ansi": "^3.0.0",
"ansi-escapes": "^4.3.2",
"chalk": "^4.1.2",
"cli-spinners": "^2.9.1",
"cli-width": "^4.1.0",
"figures": "^3.2.0",
"mute-stream": "^1.0.0",
"run-async": "^3.0.0",
"signal-exit": "^4.1.0",
"strip-ansi": "^6.0.1",
"wrap-ansi": "^6.2.0"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/core/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/editor": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-1.2.13.tgz",
"integrity": "sha512-gBxjqt0B9GLN0j6M/tkEcmcIvB2fo9Cw0f5NRqDTkYyB9AaCzj7qvgG0onQ3GVPbMyMbbP4tWYxrBOaOdKpzNA==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"chalk": "^4.1.2",
"external-editor": "^3.1.0"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/editor/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/expand": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-1.1.14.tgz",
"integrity": "sha512-yS6fJ8jZYAsxdxuw2c8XTFMTvMR1NxZAw3LxDaFnqh7BZ++wTQ6rSp/2gGJhMacdZ85osb+tHxjVgx7F+ilv5g==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"chalk": "^4.1.2",
"figures": "^3.2.0"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/expand/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/input": {
"version": "1.2.14",
"resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.2.14.tgz",
"integrity": "sha512-tISLGpUKXixIQue7jypNEShrdzJoLvEvZOJ4QRsw5XTfrIYfoWFqAjMQLerGs9CzR86yAI89JR6snHmKwnNddw==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"chalk": "^4.1.2"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/input/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/password": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.1.14.tgz",
"integrity": "sha512-vL2BFxfMo8EvuGuZYlryiyAB3XsgtbxOcFs4H9WI9szAS/VZCAwdVqs8rqEeaAf/GV/eZOghIOYxvD91IsRWSg==",
"dependencies": {
"@inquirer/input": "^1.2.14",
"@inquirer/type": "^1.1.5",
"ansi-escapes": "^4.3.2",
"chalk": "^4.1.2"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/password/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/prompts": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-3.3.0.tgz",
"integrity": "sha512-BBCqdSnhNs+WziSIo4f/RNDu6HAj4R/Q5nMgJb5MNPFX8sJGCvj9BoALdmR0HTWXyDS7TO8euKj6W6vtqCQG7A==",
"dependencies": {
"@inquirer/checkbox": "^1.5.0",
"@inquirer/confirm": "^2.0.15",
"@inquirer/core": "^5.1.1",
"@inquirer/editor": "^1.2.13",
"@inquirer/expand": "^1.1.14",
"@inquirer/input": "^1.2.14",
"@inquirer/password": "^1.1.14",
"@inquirer/rawlist": "^1.2.14",
"@inquirer/select": "^1.3.1"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/rawlist": {
"version": "1.2.14",
"resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-1.2.14.tgz",
"integrity": "sha512-xIYmDpYgfz2XGCKubSDLKEvadkIZAKbehHdWF082AyC2I4eHK44RUfXaoOAqnbqItZq4KHXS6jDJ78F2BmQvxg==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"chalk": "^4.1.2"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/rawlist/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/select": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@inquirer/select/-/select-1.3.1.tgz",
"integrity": "sha512-EgOPHv7XOHEqiBwBJTyiMg9r57ySyW4oyYCumGp+pGyOaXQaLb2kTnccWI6NFd9HSi5kDJhF7YjA+3RfMQJ2JQ==",
"dependencies": {
"@inquirer/core": "^5.1.1",
"@inquirer/type": "^1.1.5",
"ansi-escapes": "^4.3.2",
"chalk": "^4.1.2",
"figures": "^3.2.0"
},
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@inquirer/select/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@inquirer/type": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.1.5.tgz",
"integrity": "sha512-wmwHvHozpPo4IZkkNtbYenem/0wnfI6hvOcGKmPEa0DwuaH5XUQzFqy6OpEpjEegZMhYIk8HDYITI16BPLtrRA==",
"engines": {
"node": ">=14.18.0"
}
},
"node_modules/@types/inquirer": {
"version": "9.0.7",
"resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz",
"integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==",
"dev": true,
"dependencies": {
"@types/through": "*",
"rxjs": "^7.2.0"
}
},
"node_modules/@types/mute-stream": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz",
"integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "20.11.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz",
"integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==",
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/through": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz",
"integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/wrap-ansi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz",
"integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g=="
},
"node_modules/ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"dependencies": {
"type-fest": "^0.21.3"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
},
"node_modules/cli-spinners": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
"integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cli-width": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
"integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
"engines": {
"node": ">= 12"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/external-editor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
"integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
"dependencies": {
"chardet": "^0.7.0",
"iconv-lite": "^0.4.24",
"tmp": "^0.0.33"
},
"engines": {
"node": ">=4"
}
},
"node_modules/figures": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
"integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dependencies": {
"escape-string-regexp": "^1.0.5"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"engines": {
"node": ">=8"
}
},
"node_modules/mute-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz",
"integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==",
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/run-async": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",
"integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/rxjs": {
"version": "7.8.1",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dependencies": {
"os-tmpdir": "~1.0.2"
},
"engines": {
"node": ">=0.6.0"
}
},
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
},
"node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/typescript": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
},
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
}
}
}

View File

@ -1,21 +0,0 @@
{
"name": "manager",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"start": "npx tsc && node ."
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/inquirer": "^9.0.7",
"@types/node": "^20.11.5",
"typescript": "^5.3.3"
},
"dependencies": {
"@inquirer/prompts": "^3.3.0",
"chalk": "^3.0.0"
}
}

View File

@ -1,54 +0,0 @@
import chalk from "chalk";
export default class LoadSpinner {
spinner: string[] = [
'⠋',
'⠙',
'⠹',
'⠸',
'⠼',
'⠴',
'⠦',
'⠧',
'⠇',
'⠏'
];
spinnerIndex: number;
updateInterval: NodeJS.Timeout;
message: string;
constructor(message: string) {
this.spinnerIndex = 0;
this.message = message;
// The spinner is a loop that runs every 100ms
// the spinner should look like this: [(spinner) message]
this.updateInterval = setInterval(() => {
this.updateSpinner();
}, 100);
}
private updateSpinner() {
process.stdout.write(`\r${this.spinner[this.spinnerIndex]} ${this.message}`);
this.spinnerIndex++;
if(this.spinnerIndex >= this.spinner.length) this.spinnerIndex = 0;
}
changeMessage(message: string) {
this.message = message;
}
removeSpinner(finishMessage?: string) {
clearInterval(this.updateInterval);
// replace the spinner with a tick but keep the message
process.stdout.write(`\r${chalk.green("✓")} ${finishMessage ?? this.message}\n`);
}
failSpinner(finishMessage?: string) {
clearInterval(this.updateInterval);
// replace the spinner with a cross but keep the message
process.stdout.write(`\r${chalk.red("✗")} ${finishMessage ?? this.message}\n`);
}
}

View File

@ -1,89 +0,0 @@
import { select, confirm } from '@inquirer/prompts';
import chalk from 'chalk';
import fs from 'fs';
const configExists = fs.existsSync("../terratec.config.json");
async function MainMenu() {
if (!configExists) {
console.log(chalk.red(`No terratec.config.json found`));
const action = await confirm({
message: 'Do you want to create a new config file?',
});
if (action) return await require('./modes/ConfigCreate').default();
else process.exit(0);
}
const action = await select({
message: 'Select Terra manager action',
choices: [
{
name: 'Actions',
value: 'action',
},
{
name: 'Edit config',
value: 'edit',
},
{
name: 'Exit',
value: 'exit',
}
],
});
switch (action) {
case 'action':
{
const selectedAction = await select({
message: 'Select Terra manager action',
choices: [
{
name: 'Start Dev Server',
value: 'dev',
},
{
name: 'Start Build',
value: 'build',
},
{
name: 'Exit',
value: 'exit',
}
],
});
switch (selectedAction) {
case 'dev':
await require('./modes/Dev').default();
break;
case 'build':
await require('./modes/Build').default();
break;
case 'exit':
return MainMenu();
default:
console.log(chalk.red(`Unknown action: ${action}`));
break;
}
}
break;
case 'edit':
await require('./modes/ConfigEdit').default();
break;
case 'exit':
process.exit(0);
break;
default:
console.log(chalk.red(`Unknown action: ${action}`));
break;
}
MainMenu();
}
MainMenu();

View File

@ -1,43 +0,0 @@
import { input } from "@inquirer/prompts";
import chalk from "chalk";
import os from "os";
import fs from "fs";
import LoadSpinner from "../components/LoadSpinner";
export default async () => {
const name = (await input({
message: 'Project name',
default: 'my-app',
transformer: (input: string) => {
return input.toLowerCase().replace(/ /g, '-');
},
validate: (input: string) => {
if(input.length === 0) return 'Project name cannot be empty';
return true;
},
})).toLowerCase().replace(/ /g, '-');
const description = await input({
message: 'Project description',
default: 'My awesome app',
});
const author = await input({
message: 'Author',
default: os.userInfo().username,
});
const version = "0.0.1";
const saveSpinner = new LoadSpinner("Saving config...");
const config: Terratec.Config = {
name,
description,
version,
author,
project: []
};
fs.writeFileSync("../terratec.config.json", JSON.stringify(config, null, 2));
saveSpinner.removeSpinner("Saved config!");
};

View File

@ -1,36 +0,0 @@
import { input, select } from "@inquirer/prompts";
import chalk from "chalk";
export default async () => {
const action = await select({
message: 'Select Terra manager action',
choices: [
{
name: 'Create new part',
value: 'create',
},
{
name: 'Delete part',
value: 'delete',
},
{
name: 'Exit',
value: 'exit',
}
],
});
switch (action) {
case 'create':
await require('./PartCreate').default();
break;
case 'delete':
await require('./PartDelete').default();
break;
case 'exit':
return;
default:
console.log(chalk.red(`Unknown action: ${action}`));
break;
}
};

View File

@ -1,30 +0,0 @@
import chalk from "chalk";
import { exec } from "child_process";
export default async () => {
console.log(chalk.green("Running dev mode"));
const frontend = exec("npm run start", {
cwd: "../frontend",
});
const backend = exec("npm run start", {
cwd: "../backend",
});
frontend.stdout?.on("data", (data) => {
console.log(chalk.blueBright("[Frontend]"), data);
});
backend.stdout?.on("data", (data) => {
console.log(chalk.blueBright("[Backend]"), data);
});
frontend.stderr?.on("data", (data) => {
console.log(chalk.redBright("[Frontend]"), data);
});
backend.stderr?.on("data", (data) => {
console.log(chalk.redBright("[Backend]"), data);
});
};

View File

@ -1,76 +0,0 @@
import { input, select } from "@inquirer/prompts";
import chalk from "chalk";
import fs from "fs";
import LoadSpinner from "../components/LoadSpinner";
const configTxt = fs.readFileSync("../terratec.config.json").toString();
const config: Terratec.Config = JSON.parse(configTxt);
const takenNames = config.project.map((project) => project.name);
export default async () => {
console.log(chalk.green("Config generator"));
const type = await select({
message: 'Part type',
choices: [
{
name: 'Frontend',
value: 'frontend',
},
{
name: 'Backend',
value: 'backend',
}
],
});
const name = (await input({
message: 'Part name',
transformer: (input: string) => {
return input.toLowerCase().replace(/ /g, '-');
},
validate: (input: string) => {
if (input.length === 0) return 'Part name cannot be empty';
if (takenNames.includes(input)) return 'Part name already taken';
return true;
}
})).toLowerCase().replace(/ /g, '-');
const description = await input({
message: 'Part description',
default: 'My awesome part',
});
const readTemplatesSpinner = new LoadSpinner("Reading templates...");
const templates = fs.readdirSync(`./dist/templates/${type}`);
readTemplatesSpinner.removeSpinner("Read templates!");
const template = await select({
message: 'Part template',
choices: [
...templates.map((template) => ({
name: template,
value: template,
})),
],
});
const saveSpinner = new LoadSpinner("Saving config...");
const config: Terratec.Config = JSON.parse(fs.readFileSync("../terratec.config.json").toString());
config.project.push({
name,
description,
type: type as Terratec.ProjectType,
template,
});
fs.writeFileSync("../terratec.config.json", JSON.stringify(config, null, 2));
saveSpinner.removeSpinner("Saved config!");
await require(`../templates/${type}/${template}`).default(config.project[config.project.length - 1]);
};

View File

@ -1,41 +0,0 @@
import { input, select, confirm } from "@inquirer/prompts";
import chalk from "chalk";
import fs from "fs";
import LoadSpinner from "../components/LoadSpinner";
export default async () => {
console.log(chalk.green("Config generator"));
const configTxT = fs.readFileSync("../terratec.config.json").toString();
const config: Terratec.Config = JSON.parse(configTxT);
const part = await select({
message: 'Delete part',
choices: config.project.map((project) => (
{
name: project.name,
value: project.name,
}
)),
});
const sure = await confirm({
message: `Are you sure you want to delete ${part}? All files will be deleted!`,
default: false,
});
if (!sure) return console.log(chalk.red("Aborted"));
const saveSpinner = new LoadSpinner("Saving config...");
config.project = config.project.filter((project) => project.name !== part);
fs.writeFileSync("../terratec.config.json", JSON.stringify(config, null, 2));
saveSpinner.removeSpinner("Saved config!");
const deleteSpinner = new LoadSpinner("Removing files...");
fs.rmSync(`../${part}`, { recursive: true });
deleteSpinner.removeSpinner("Files removed!");
};

View File

@ -1,79 +0,0 @@
import { input, confirm, select, checkbox } from "@inquirer/prompts"
import { exec } from "child_process"
import LoadSpinner from "../../components/LoadSpinner"
import chalk from "chalk"
import fs from "fs"
export default async (props: Terratec.ProjectConfig) => {
console.log(chalk.green("Running template..."))
const typescript = await confirm({
message: "Use typescript?",
default: true,
});
const spinner = new LoadSpinner("Running template...");
fs.mkdirSync(`../${props.name}`);
spinner.changeMessage("Setting up package...")
await new Promise((resolve) => {
exec(`npm init -y`, {
cwd: `../${props.name}`,
}, () => {
resolve(true);
});
})
fs.mkdirSync(`../${props.name}/src`);
if(typescript) {
spinner.changeMessage("Installing typescript...")
await new Promise((resolve) => {
exec(`npm i typescript @types/node @types/express --save-dev`, {
cwd: `../${props.name}`,
}, () => {
resolve(true);
});
})
spinner.changeMessage("Creating tsconfig.json...")
fs.writeFileSync(`../${props.name}/tsconfig.json`, JSON.stringify({
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}, null, 2));
fs.writeFileSync(`../${props.name}/src/index.ts`, `console.log("Hello world!")`);
} else {
fs.writeFileSync(`../${props.name}/src/index.js`, `console.log("Hello world!")`);
}
spinner.changeMessage("Updating package.json...")
const packageJson = JSON.parse(fs.readFileSync(`../${props.name}/package.json`).toString());
packageJson.main = typescript ? "dist/index.js" : "src/index.js";
packageJson.scripts.start = typescript ? "npx tsc && node ." : "node src/index.js";
fs.writeFileSync(`../${props.name}/package.json`, JSON.stringify(packageJson, null, 2));
spinner.changeMessage("Installing dependencies...")
await new Promise((resolve) => {
exec(`npm i express`, {
cwd: `../${props.name}`,
}, () => {
resolve(true);
});
})
spinner.removeSpinner("Template execution finished!");
}

View File

@ -1,71 +0,0 @@
import { input, confirm, select, checkbox } from "@inquirer/prompts"
import { exec } from "child_process"
import LoadSpinner from "../../components/LoadSpinner"
import chalk from "chalk"
export default async (props: Terratec.ProjectConfig) => {
console.log(chalk.green("Running template..."))
const typescript = await confirm({
message: "Use typescript?",
default: true,
});
const spinner = new LoadSpinner("Running template...");
spinner.changeMessage("Running create-react-app...")
await new Promise((resolve) => {
exec(`npx create-react-app ${props.name}${typescript && " --template typescript"}`, {
cwd: "..",
}, () => {
resolve(true);
});
})
spinner.removeSpinner("Template execution finished!");
const optionDependencies = await confirm({
message: "Do you want to install optional dependencies?",
default: true,
});
if(optionDependencies) {
const dependencies = await checkbox({
message: "Select dependencies",
choices: [
{
name: "react-router-dom",
value: "react-router-dom",
},
{
name: "axios",
value: "axios",
},
{
name: "react-query",
value: "react-query",
},
{
name: "Material UI",
value: "@mui/icons-material @mui/material @emotion/styled @emotion/react",
},
{
name: "Zustand",
value: "zustand",
}
]
});
const dependenciesSpinner = new LoadSpinner("Installing dependencies...");
await new Promise((resolve) => {
exec(`npm i ${dependencies.join(" ")}`, {
cwd: `../${props.name}`,
}, () => {
resolve(true);
});
})
dependenciesSpinner.removeSpinner("Dependencies installed!");
}
}

View File

@ -1,18 +0,0 @@
declare namespace Terratec {
type ProjectType = 'frontend' | 'backend';
interface Config {
name: string;
description: string;
version: string;
author: string;
project: ProjectConfig[];
}
interface ProjectConfig {
name: string;
description: string;
type: ProjectType;
template: string;
}
}

View File

@ -1,109 +0,0 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "NodeNext", /* Specify what module code is generated. */
"rootDir": "./src", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
// "resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
/* JavaScript Support */
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
// "noEmit": true, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
// "newLine": "crlf", /* Set the newline character for emitting files. */
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
/* Interop Constraints */
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}

View File

@ -1,7 +0,0 @@
{
"name": "my-app",
"description": "My awesome app",
"version": "0.0.1",
"author": "niko",
"project": []
}