feat: monorepo

This commit is contained in:
EGOIST
2022-05-14 01:03:20 +08:00
parent 2383f2f455
commit f17da54096
108 changed files with 208 additions and 286 deletions
-13
View File
@@ -1,13 +0,0 @@
function readPackage(pkg, context) {
if (pkg.dependencies["sort-package-json"]) {
pkg.dependencies["sort-package-json"] = "1.55.0"
}
return pkg
}
module.exports = {
hooks: {
readPackage,
},
}
-38
View File
@@ -1,38 +0,0 @@
### base
FROM node:16-bullseye-slim as base
# Install openssl for Prisma
RUN apt-get update && apt-get install -y openssl
### build
FROM base as build
RUN mkdir /app
WORKDIR /app
RUN npm i -g pnpm
ADD . .
RUN pnpm install
ENV NODE_ENV=production
RUN pnpm prisma generate
RUN pnpm build
# keep production dependencies only
RUN pnpm prune --production
# Finally, build the production image with minimal footprint
FROM base
ENV NODE_ENV=production
RUN mkdir /app
WORKDIR /app
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/build /app/build
COPY --from=build /app/public /app/public
ADD . .
CMD ["npm", "start"]
-41
View File
@@ -1,41 +0,0 @@
# fly.toml file generated for proselog on 2022-05-05T00:44:42+08:00
app = "proselog"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[env]
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
+3 -73
View File
@@ -1,78 +1,8 @@
{
"name": "proselog",
"private": true,
"description": "A publishing platform",
"license": "unlicensed",
"sideEffects": false,
"name": "proselog-workspace",
"scripts": {
"build": "pnpm db-generate && next build",
"dev": "next",
"db-generate": "prisma generate"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.81.0",
"@codemirror/commands": "^0.20.0",
"@codemirror/lang-markdown": "^0.20.0",
"@codemirror/language": "^0.20.0",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.3",
"@hapi/iron": "^6.0.0",
"@headlessui/react": "^1.6.0",
"@prisma/client": "^3.14.0",
"@trpc/client": "^9.23.2",
"@trpc/next": "^9.23.2",
"@trpc/react": "^9.23.2",
"@trpc/server": "^9.23.2",
"@web-std/form-data": "^3.0.2",
"async-busboy": "^1.1.0",
"busboy": "^1.6.0",
"clsx": "^1.1.1",
"cookie": "^0.5.0",
"dayjs": "^1.11.1",
"dotenv": "^16.0.0",
"fast-deep-equal": "^3.1.3",
"form-data": "^4.0.0",
"mailgun.js": "^5.2.2",
"markdown-it": "^13.0.0",
"nanoid": "^3.3.3",
"next": "^12.1.6",
"pica": "^9.0.1",
"prismjs": "^1.28.0",
"react": "^18.1.0",
"react-avatar-editor": "^12.0.0",
"react-dom": "^18.1.0",
"react-hook-form": "^7.31.1",
"react-hot-toast": "^2.2.0",
"react-query": "^3.39.0",
"react-sortablejs": "^6.1.1",
"sortablejs": "^1.15.0",
"ua-parser-js": "^1.0.2",
"uuid": "^8.3.2",
"zod": "^3.15.1",
"zustand": "4.0.0-rc.1"
},
"devDependencies": {
"@types/async-busboy": "^1.1.1",
"@types/busboy": "^1.5.0",
"@types/cookie": "^0.5.1",
"@types/markdown-it": "^12.2.3",
"@types/node": "^17.0.31",
"@types/pica": "^9.0.0",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.9",
"@types/react-avatar-editor": "^12.0.0",
"@types/react-dom": "^18.0.3",
"@types/sortablejs": "^1.13.0",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^8.3.4",
"eslint": "^8.15.0",
"eslint-config-next": "^12.1.6",
"postcss-import": "^14.1.0",
"prisma": "^3.14.0",
"tailwindcss": "^3.0.24",
"typescript": "^4.5.5"
},
"engines": {
"node": ">=14"
"dev": "pnpm --filter web dev",
"db-generate": "pnpm --filter web db-generate"
}
}
+125 -121
View File
@@ -1,128 +1,132 @@
lockfileVersion: 5.4
specifiers:
'@aws-sdk/client-s3': ^3.81.0
'@codemirror/commands': ^0.20.0
'@codemirror/lang-markdown': ^0.20.0
'@codemirror/language': ^0.20.0
'@codemirror/state': ^0.20.0
'@codemirror/view': ^0.20.3
'@hapi/iron': ^6.0.0
'@headlessui/react': ^1.6.0
'@prisma/client': ^3.14.0
'@trpc/client': ^9.23.2
'@trpc/next': ^9.23.2
'@trpc/react': ^9.23.2
'@trpc/server': ^9.23.2
'@types/async-busboy': ^1.1.1
'@types/busboy': ^1.5.0
'@types/cookie': ^0.5.1
'@types/markdown-it': ^12.2.3
'@types/node': ^17.0.31
'@types/pica': ^9.0.0
'@types/prismjs': ^1.26.0
'@types/react': ^18.0.9
'@types/react-avatar-editor': ^12.0.0
'@types/react-dom': ^18.0.3
'@types/sortablejs': ^1.13.0
'@types/ua-parser-js': ^0.7.36
'@types/uuid': ^8.3.4
'@web-std/form-data': ^3.0.2
async-busboy: ^1.1.0
busboy: ^1.6.0
clsx: ^1.1.1
cookie: ^0.5.0
dayjs: ^1.11.1
dotenv: ^16.0.0
eslint: ^8.15.0
eslint-config-next: ^12.1.6
fast-deep-equal: ^3.1.3
form-data: ^4.0.0
mailgun.js: ^5.2.2
markdown-it: ^13.0.0
nanoid: ^3.3.3
next: ^12.1.6
pica: ^9.0.1
postcss-import: ^14.1.0
prisma: ^3.14.0
prismjs: ^1.28.0
react: ^18.1.0
react-avatar-editor: ^12.0.0
react-dom: ^18.1.0
react-hook-form: ^7.31.1
react-hot-toast: ^2.2.0
react-query: ^3.39.0
react-sortablejs: ^6.1.1
sortablejs: ^1.15.0
tailwindcss: ^3.0.24
typescript: ^4.5.5
ua-parser-js: ^1.0.2
uuid: ^8.3.2
zod: ^3.15.1
zustand: 4.0.0-rc.1
importers:
dependencies:
'@aws-sdk/client-s3': 3.86.0
'@codemirror/commands': 0.20.0
'@codemirror/lang-markdown': 0.20.0
'@codemirror/language': 0.20.0
'@codemirror/state': 0.20.0
'@codemirror/view': 0.20.4
'@hapi/iron': 6.0.0
'@headlessui/react': 1.6.1_ef5jwxihqo6n7gxfmzogljlgcm
'@prisma/client': 3.14.0_prisma@3.14.0
'@trpc/client': 9.23.2_@trpc+server@9.23.2
'@trpc/next': 9.23.2_ekhln2aut74ytaacni4ejzffly
'@trpc/react': 9.23.2_ztktndqynogm35aelp247cafku
'@trpc/server': 9.23.2
'@web-std/form-data': 3.0.2
async-busboy: 1.1.0
busboy: 1.6.0
clsx: 1.1.1
cookie: 0.5.0
dayjs: 1.11.2
dotenv: 16.0.0
fast-deep-equal: 3.1.3
form-data: 4.0.0
mailgun.js: 5.2.2
markdown-it: 13.0.1
nanoid: 3.3.4
next: 12.1.6_ef5jwxihqo6n7gxfmzogljlgcm
pica: 9.0.1
prismjs: 1.28.0
react: 18.1.0
react-avatar-editor: 12.0.0_ef5jwxihqo6n7gxfmzogljlgcm
react-dom: 18.1.0_react@18.1.0
react-hook-form: 7.31.1_react@18.1.0
react-hot-toast: 2.2.0_ef5jwxihqo6n7gxfmzogljlgcm
react-query: 3.39.0_ef5jwxihqo6n7gxfmzogljlgcm
react-sortablejs: 6.1.1_kjz72dk5lh6hp4ogspefhm7r2u
sortablejs: 1.15.0
ua-parser-js: 1.0.2
uuid: 8.3.2
zod: 3.15.1
zustand: 4.0.0-rc.1_react@18.1.0
.:
specifiers: {}
devDependencies:
'@types/async-busboy': 1.1.1
'@types/busboy': 1.5.0
'@types/cookie': 0.5.1
'@types/markdown-it': 12.2.3
'@types/node': 17.0.31
'@types/pica': 9.0.0
'@types/prismjs': 1.26.0
'@types/react': 18.0.9
'@types/react-avatar-editor': 12.0.0
'@types/react-dom': 18.0.3
'@types/sortablejs': 1.13.0
'@types/ua-parser-js': 0.7.36
'@types/uuid': 8.3.4
eslint: 8.15.0
eslint-config-next: 12.1.6_6vdljae35l7howjttefzzsim3e
postcss-import: 14.1.0
prisma: 3.14.0
tailwindcss: 3.0.24
typescript: 4.6.4
web:
specifiers:
'@aws-sdk/client-s3': ^3.81.0
'@codemirror/commands': ^0.20.0
'@codemirror/lang-markdown': ^0.20.0
'@codemirror/language': ^0.20.0
'@codemirror/state': ^0.20.0
'@codemirror/view': ^0.20.3
'@hapi/iron': ^6.0.0
'@headlessui/react': ^1.6.0
'@prisma/client': ^3.14.0
'@trpc/client': ^9.23.2
'@trpc/next': ^9.23.2
'@trpc/react': ^9.23.2
'@trpc/server': ^9.23.2
'@types/async-busboy': ^1.1.1
'@types/busboy': ^1.5.0
'@types/cookie': ^0.5.1
'@types/markdown-it': ^12.2.3
'@types/node': ^17.0.31
'@types/pica': ^9.0.0
'@types/prismjs': ^1.26.0
'@types/react': ^18.0.9
'@types/react-avatar-editor': ^12.0.0
'@types/react-dom': ^18.0.3
'@types/sortablejs': ^1.13.0
'@types/ua-parser-js': ^0.7.36
'@types/uuid': ^8.3.4
'@web-std/form-data': ^3.0.2
async-busboy: ^1.1.0
busboy: ^1.6.0
clsx: ^1.1.1
cookie: ^0.5.0
dayjs: ^1.11.1
dotenv: ^16.0.0
eslint: ^8.15.0
eslint-config-next: ^12.1.6
fast-deep-equal: ^3.1.3
form-data: ^4.0.0
mailgun.js: ^5.2.2
markdown-it: ^13.0.0
nanoid: ^3.3.3
next: ^12.1.6
pica: ^9.0.1
postcss-import: ^14.1.0
prisma: ^3.14.0
prismjs: ^1.28.0
react: ^18.1.0
react-avatar-editor: ^12.0.0
react-dom: ^18.1.0
react-hook-form: ^7.31.1
react-hot-toast: ^2.2.0
react-query: ^3.39.0
react-sortablejs: ^6.1.1
sortablejs: ^1.15.0
tailwindcss: ^3.0.24
typescript: ^4.5.5
ua-parser-js: ^1.0.2
uuid: ^8.3.2
zod: ^3.15.1
zustand: 4.0.0-rc.1
dependencies:
'@aws-sdk/client-s3': 3.86.0
'@codemirror/commands': 0.20.0
'@codemirror/lang-markdown': 0.20.0
'@codemirror/language': 0.20.0
'@codemirror/state': 0.20.0
'@codemirror/view': 0.20.4
'@hapi/iron': 6.0.0
'@headlessui/react': 1.6.1_ef5jwxihqo6n7gxfmzogljlgcm
'@prisma/client': 3.14.0_prisma@3.14.0
'@trpc/client': 9.23.2_@trpc+server@9.23.2
'@trpc/next': 9.23.2_ekhln2aut74ytaacni4ejzffly
'@trpc/react': 9.23.2_ztktndqynogm35aelp247cafku
'@trpc/server': 9.23.2
'@web-std/form-data': 3.0.2
async-busboy: 1.1.0
busboy: 1.6.0
clsx: 1.1.1
cookie: 0.5.0
dayjs: 1.11.2
dotenv: 16.0.0
fast-deep-equal: 3.1.3
form-data: 4.0.0
mailgun.js: 5.2.2
markdown-it: 13.0.1
nanoid: 3.3.4
next: 12.1.6_ef5jwxihqo6n7gxfmzogljlgcm
pica: 9.0.1
prismjs: 1.28.0
react: 18.1.0
react-avatar-editor: 12.0.0_ef5jwxihqo6n7gxfmzogljlgcm
react-dom: 18.1.0_react@18.1.0
react-hook-form: 7.31.1_react@18.1.0
react-hot-toast: 2.2.0_ef5jwxihqo6n7gxfmzogljlgcm
react-query: 3.39.0_ef5jwxihqo6n7gxfmzogljlgcm
react-sortablejs: 6.1.1_kjz72dk5lh6hp4ogspefhm7r2u
sortablejs: 1.15.0
ua-parser-js: 1.0.2
uuid: 8.3.2
zod: 3.15.1
zustand: 4.0.0-rc.1_react@18.1.0
devDependencies:
'@types/async-busboy': 1.1.1
'@types/busboy': 1.5.0
'@types/cookie': 0.5.1
'@types/markdown-it': 12.2.3
'@types/node': 17.0.31
'@types/pica': 9.0.0
'@types/prismjs': 1.26.0
'@types/react': 18.0.9
'@types/react-avatar-editor': 12.0.0
'@types/react-dom': 18.0.3
'@types/sortablejs': 1.13.0
'@types/ua-parser-js': 0.7.36
'@types/uuid': 8.3.4
eslint: 8.15.0
eslint-config-next: 12.1.6_6vdljae35l7howjttefzzsim3e
postcss-import: 14.1.0
prisma: 3.14.0
tailwindcss: 3.0.24
typescript: 4.6.4
packages:
+2
View File
@@ -0,0 +1,2 @@
packages:
- web
View File
View File
+78
View File
@@ -0,0 +1,78 @@
{
"name": "web",
"private": true,
"description": "A publishing platform",
"license": "unlicensed",
"sideEffects": false,
"scripts": {
"build": "pnpm db-generate && next build",
"dev": "next",
"db-generate": "prisma generate"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.81.0",
"@codemirror/commands": "^0.20.0",
"@codemirror/lang-markdown": "^0.20.0",
"@codemirror/language": "^0.20.0",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.3",
"@hapi/iron": "^6.0.0",
"@headlessui/react": "^1.6.0",
"@prisma/client": "^3.14.0",
"@trpc/client": "^9.23.2",
"@trpc/next": "^9.23.2",
"@trpc/react": "^9.23.2",
"@trpc/server": "^9.23.2",
"@web-std/form-data": "^3.0.2",
"async-busboy": "^1.1.0",
"busboy": "^1.6.0",
"clsx": "^1.1.1",
"cookie": "^0.5.0",
"dayjs": "^1.11.1",
"dotenv": "^16.0.0",
"fast-deep-equal": "^3.1.3",
"form-data": "^4.0.0",
"mailgun.js": "^5.2.2",
"markdown-it": "^13.0.0",
"nanoid": "^3.3.3",
"next": "^12.1.6",
"pica": "^9.0.1",
"prismjs": "^1.28.0",
"react": "^18.1.0",
"react-avatar-editor": "^12.0.0",
"react-dom": "^18.1.0",
"react-hook-form": "^7.31.1",
"react-hot-toast": "^2.2.0",
"react-query": "^3.39.0",
"react-sortablejs": "^6.1.1",
"sortablejs": "^1.15.0",
"ua-parser-js": "^1.0.2",
"uuid": "^8.3.2",
"zod": "^3.15.1",
"zustand": "4.0.0-rc.1"
},
"devDependencies": {
"@types/async-busboy": "^1.1.1",
"@types/busboy": "^1.5.0",
"@types/cookie": "^0.5.1",
"@types/markdown-it": "^12.2.3",
"@types/node": "^17.0.31",
"@types/pica": "^9.0.0",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.9",
"@types/react-avatar-editor": "^12.0.0",
"@types/react-dom": "^18.0.3",
"@types/sortablejs": "^1.13.0",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^8.3.4",
"eslint": "^8.15.0",
"eslint-config-next": "^12.1.6",
"postcss-import": "^14.1.0",
"prisma": "^3.14.0",
"tailwindcss": "^3.0.24",
"typescript": "^4.5.5"
},
"engines": {
"node": ">=14"
}
}

Some files were not shown because too many files have changed in this diff Show More