chore: update buf deps

This commit is contained in:
Steven 2023-10-17 22:01:00 +08:00
parent 4d1705dca5
commit db9034ccf9
7 changed files with 160 additions and 32 deletions

View File

@ -15,9 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- run: buf generate
working-directory: proto
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
@ -28,6 +25,8 @@ jobs:
cache-dependency-path: "frontend/extension/pnpm-lock.yaml"
- run: pnpm install
working-directory: frontend/extension
- run: pnpm type-gen
working-directory: frontend/extension
- name: Run eslint check
run: pnpm lint
working-directory: frontend/extension
@ -36,9 +35,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- run: buf generate
working-directory: proto
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
@ -49,6 +45,8 @@ jobs:
cache-dependency-path: "frontend/extension/pnpm-lock.yaml"
- run: pnpm install
working-directory: frontend/extension
- run: pnpm type-gen
working-directory: frontend/extension
- name: Run extension build
run: pnpm build
working-directory: frontend/extension

View File

@ -15,9 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- run: buf generate
working-directory: proto
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
@ -28,6 +25,8 @@ jobs:
cache-dependency-path: "frontend/web/pnpm-lock.yaml"
- run: pnpm install
working-directory: frontend/web
- run: pnpm type-gen
working-directory: frontend/web
- name: Run eslint check
run: pnpm lint
working-directory: frontend/web
@ -36,9 +35,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- run: buf generate
working-directory: proto
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
@ -49,6 +45,8 @@ jobs:
cache-dependency-path: "frontend/web/pnpm-lock.yaml"
- run: pnpm install
working-directory: frontend/web
- run: pnpm type-gen
working-directory: frontend/web
- name: Run frontend build
run: pnpm build
working-directory: frontend/web

View File

@ -1,26 +1,12 @@
# Build protobuf.
FROM golang:1.21-alpine AS protobuf
WORKDIR /protobuf-generate
COPY . .
RUN GO111MODULE=on GOBIN=/usr/local/bin go install github.com/bufbuild/buf/cmd/buf@v1.26.1
WORKDIR /protobuf-generate/proto
RUN buf generate
# Build frontend dist.
FROM node:18-alpine AS frontend
WORKDIR /frontend-build
COPY ./frontend .
COPY . .
COPY --from=protobuf /protobuf-generate/frontend/web/src/types/proto ./web/src/types/proto
WORKDIR /frontend-build/frontend/web
WORKDIR /frontend-build/web
RUN corepack enable && pnpm i --frozen-lockfile
RUN corepack enable && pnpm i --frozen-lockfile && pnpm type-gen
RUN pnpm build
@ -29,7 +15,7 @@ FROM golang:1.21-alpine AS backend
WORKDIR /backend-build
COPY . .
COPY --from=frontend /frontend-build/web/dist ./server/dist
COPY --from=frontend /frontend-build/frontend/web/dist ./server/dist
RUN CGO_ENABLED=0 go build -o slash ./bin/slash/main.go

View File

@ -8,7 +8,8 @@
"build": "plasmo build",
"package": "plasmo package",
"lint": "eslint --ext .js,.ts,.tsx, src",
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix"
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix",
"type-gen": "cd ../../proto && buf generate"
},
"dependencies": {
"@emotion/react": "^11.11.1",
@ -26,6 +27,7 @@
"zustand": "^4.4.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.27.0",
"@trivago/prettier-plugin-sort-imports": "4.1.0",
"@types/chrome": "0.0.241",
"@types/lodash-es": "^4.17.9",

View File

@ -46,6 +46,9 @@ dependencies:
version: 4.4.1(@types/react@18.2.15)(react@18.2.0)
devDependencies:
'@bufbuild/buf':
specifier: ^1.27.0
version: 1.27.0
'@trivago/prettier-plugin-sort-imports':
specifier: 4.1.0
version: 4.1.0(prettier@2.6.2)
@ -345,6 +348,74 @@ packages:
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
/@bufbuild/buf-darwin-arm64@1.27.0:
resolution: {integrity: sha512-Bsdo9BkkIlIgBpQJ2jyIXl9ggSqDdSJ12euxgU1y4pbT5iD11mdiUA7eq5/ssxLJilUrUGj2Gk1h1KbYG/JfVA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-darwin-x64@1.27.0:
resolution: {integrity: sha512-aJmSZvO6uNxHST8+kN5cukv7/ZLgDnvklp+r6uyokocg5sk1rgWQVBqiVtGmoDWwPbotpMhb3EuqtwN9hdNrOg==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-linux-aarch64@1.27.0:
resolution: {integrity: sha512-1NPHARYENNVWOK3bQxbnYsMLU09em4/kdyAnCwyGkNhr+pWUlWdCBu3X5tdrRW+mnhjeagIcomTMhgVjxIAS7g==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-linux-x64@1.27.0:
resolution: {integrity: sha512-3LMTSJlwJAeOfjPuB0NBK+1Yfg1Bybadt+c1X/vF8XSXut1u0Ju1/fbRDz75BF4AlMidMQPdGS+vPWmPcb51hA==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-win32-arm64@1.27.0:
resolution: {integrity: sha512-Za5d3obNvSfLZAlQW8IAWtv1Yv0gQTFDVMPyYiOh70rKIfKIxrWZxT4E4nzFLZZ54VQDFoUl81bAjOYLOgaspQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-win32-x64@1.27.0:
resolution: {integrity: sha512-OzVK4Fz162Z6fFHAAZhHPW2GiCXjweCG/hwjOtFt2gza1t3ImYp0CwxJI6ePGY+th3Y9yu8rY0iHiI59ezMa4Q==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf@1.27.0:
resolution: {integrity: sha512-vR/ke6gUNgGSC3z7WkHLcbO+ur+zvGTC4ohHsLo2dZqEWysWySjNpcU70SKdIN3G5M4fSS1ki6MkZPes3E+83w==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@bufbuild/buf-darwin-arm64': 1.27.0
'@bufbuild/buf-darwin-x64': 1.27.0
'@bufbuild/buf-linux-aarch64': 1.27.0
'@bufbuild/buf-linux-x64': 1.27.0
'@bufbuild/buf-win32-arm64': 1.27.0
'@bufbuild/buf-win32-x64': 1.27.0
dev: true
/@emotion/babel-plugin@11.11.0:
resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==}
dependencies:

View File

@ -5,7 +5,8 @@
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.ts,.tsx, src",
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix"
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix",
"type-gen": "cd ../../proto && buf generate"
},
"dependencies": {
"@emotion/react": "^11.11.1",
@ -32,6 +33,7 @@
"zustand": "^4.4.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.27.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/lodash-es": "^4.17.9",
"@types/react": "^18.2.23",

View File

@ -73,6 +73,9 @@ dependencies:
version: 4.4.1(@types/react@18.2.23)(react@18.2.0)
devDependencies:
'@bufbuild/buf':
specifier: ^1.27.0
version: 1.27.0
'@trivago/prettier-plugin-sort-imports':
specifier: ^4.2.0
version: 4.2.0(prettier@2.6.2)
@ -264,6 +267,74 @@ packages:
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
/@bufbuild/buf-darwin-arm64@1.27.0:
resolution: {integrity: sha512-Bsdo9BkkIlIgBpQJ2jyIXl9ggSqDdSJ12euxgU1y4pbT5iD11mdiUA7eq5/ssxLJilUrUGj2Gk1h1KbYG/JfVA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-darwin-x64@1.27.0:
resolution: {integrity: sha512-aJmSZvO6uNxHST8+kN5cukv7/ZLgDnvklp+r6uyokocg5sk1rgWQVBqiVtGmoDWwPbotpMhb3EuqtwN9hdNrOg==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-linux-aarch64@1.27.0:
resolution: {integrity: sha512-1NPHARYENNVWOK3bQxbnYsMLU09em4/kdyAnCwyGkNhr+pWUlWdCBu3X5tdrRW+mnhjeagIcomTMhgVjxIAS7g==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-linux-x64@1.27.0:
resolution: {integrity: sha512-3LMTSJlwJAeOfjPuB0NBK+1Yfg1Bybadt+c1X/vF8XSXut1u0Ju1/fbRDz75BF4AlMidMQPdGS+vPWmPcb51hA==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-win32-arm64@1.27.0:
resolution: {integrity: sha512-Za5d3obNvSfLZAlQW8IAWtv1Yv0gQTFDVMPyYiOh70rKIfKIxrWZxT4E4nzFLZZ54VQDFoUl81bAjOYLOgaspQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf-win32-x64@1.27.0:
resolution: {integrity: sha512-OzVK4Fz162Z6fFHAAZhHPW2GiCXjweCG/hwjOtFt2gza1t3ImYp0CwxJI6ePGY+th3Y9yu8rY0iHiI59ezMa4Q==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@bufbuild/buf@1.27.0:
resolution: {integrity: sha512-vR/ke6gUNgGSC3z7WkHLcbO+ur+zvGTC4ohHsLo2dZqEWysWySjNpcU70SKdIN3G5M4fSS1ki6MkZPes3E+83w==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@bufbuild/buf-darwin-arm64': 1.27.0
'@bufbuild/buf-darwin-x64': 1.27.0
'@bufbuild/buf-linux-aarch64': 1.27.0
'@bufbuild/buf-linux-x64': 1.27.0
'@bufbuild/buf-win32-arm64': 1.27.0
'@bufbuild/buf-win32-x64': 1.27.0
dev: true
/@emotion/babel-plugin@11.11.0:
resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==}
dependencies: