From fcad5993dd226d0790d8a3968dd530869bd0f34a Mon Sep 17 00:00:00 2001 From: Rahul Yadav Date: Sat, 2 Nov 2024 12:57:14 +0400 Subject: [PATCH] Update CI workflows (#146) Co-authored-by: Ilya Egorov --- .eslintrc.cjs | 2 +- .github/CODEOWNERS | 2 + .github/workflows/deploy.yml | 126 +++++++ .github/workflows/main.yml | 72 ---- .github/workflows/rollback.yml | 63 ++++ .idea/.gitignore | 8 + .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/material_theme_project_new.xml | 12 + .idea/vcs.xml | 6 + .idea/web-ide.iml | 9 + .prettierignore | 1 + Dockerfile | 10 + helm/app/Chart.yaml | 4 + helm/app/templates/deployment.yaml | 56 +++ helm/app/templates/ghcr-secret.yaml | 10 + helm/app/templates/hpa.yaml | 25 ++ helm/app/templates/ingress.yaml | 46 +++ helm/app/templates/ns-resource-quota.yaml | 26 ++ helm/app/templates/service-monitor.yaml | 19 ++ helm/app/templates/service.yaml | 17 + helm/app/values-canary.yaml | 10 + helm/app/values-production.yaml | 9 + helm/app/values-staging.yaml | 9 + helm/app/values.yaml | 42 +++ next.config.js | 3 + package-lock.json | 342 +++++++++++++++---- package.json | 10 +- 27 files changed, 795 insertions(+), 150 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/rollback.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/material_theme_project_new.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/web-ide.iml create mode 100644 .prettierignore create mode 100644 Dockerfile create mode 100644 helm/app/Chart.yaml create mode 100644 helm/app/templates/deployment.yaml create mode 100644 helm/app/templates/ghcr-secret.yaml create mode 100644 helm/app/templates/hpa.yaml create mode 100644 helm/app/templates/ingress.yaml create mode 100644 helm/app/templates/ns-resource-quota.yaml create mode 100644 helm/app/templates/service-monitor.yaml create mode 100644 helm/app/templates/service.yaml create mode 100644 helm/app/values-canary.yaml create mode 100644 helm/app/values-production.yaml create mode 100644 helm/app/values-staging.yaml create mode 100644 helm/app/values.yaml diff --git a/.eslintrc.cjs b/.eslintrc.cjs index db7043d..5129d4d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -12,7 +12,7 @@ module.exports = { ecmaVersion: 2020, project: "./tsconfig.json", }, - ignorePatterns: ["*.cjs", "!.lintstagedrc.js", ".lintstagedrc.js"], + ignorePatterns: ["*.cjs", "!.lintstagedrc.js", ".lintstagedrc.js", "next.config.js"], plugins: ["@typescript-eslint"], root: true, env: { diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4598c5a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +/helm/ @Mobyman +/.github/ @Mobyman \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e7ff6e0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,126 @@ +name: Deploy to Kubernetes + +on: + push: + branches: + - main + - canary + - staging + +jobs: + build: + runs-on: ubuntu-latest + env: + APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || github.ref == 'refs/heads/canary' && 'canary' || github.ref == 'refs/heads/staging' && 'staging' || 'unknown' }} + APP_DOMAIN: ${{ github.ref == 'refs/heads/staging' && vars.APP_DOMAIN_STAGING || vars.APP_DOMAIN }} + + permissions: + packages: write + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ vars.AWS_REGION }} + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set sha-short + run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV + + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ steps.lower-repo.outputs.repository }} + github-token: ${{ secrets.GITHUB_TOKEN }} + tags: | + type=sha + type=sha,format=long + type=ref,event=branch + + - name: Build and push Docker image ${{ steps.lower-repo.outputs.repository }}:${{ env.APP_ENV }} + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ env.GITHUB_SHA_SHORT }},ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ env.APP_ENV }} + build-args: | + sha=${{ github.sha }} + sha_short=${{ env.GITHUB_SHA_SHORT }} + app_env=${{ vars.APP_ENV }} + + - name: Apply AWS k8s config + run: aws eks update-kubeconfig --name ${{ vars.AWS_CLUSTER }} --region ${{ vars.AWS_REGION }} + + - name: Create namespace + run: | + kubectl create ns ${{ vars.APP_NAME }}-${{ env.APP_ENV }} || echo "Namespace $EKS_NAMESPACE already exists" + + - name: Deploy ${{ vars.APP_NAME }} to Kubernetes + run: | + helm upgrade --install ${{ vars.APP_NAME }} ./helm/app \ + --namespace ${{ vars.APP_NAME }}-${{ env.APP_ENV }} \ + --values ./helm/app/values.yaml \ + --values ./helm/app/values-${{ env.APP_ENV }}.yaml \ + --set imageRepo="ghcr.io/${{ steps.lower-repo.outputs.repository }}" \ + --set imageTag="${{ env.GITHUB_SHA_SHORT }}" \ + --set host=${{ env.APP_DOMAIN }} \ + --set appName=${{ vars.APP_NAME }} \ + --set ghcrSecret=${{ secrets.GHCR_SECRET }} \ + --set secrets.publicProxyKey=${{ secrets.NEXT_PUBLIC_MIXPANEL_TOKEN }} \ + --set secrets.publicMixPanelToken=${{ secrets.NEXT_PUBLIC_ANALYTICS_ENABLED }} \ + --set secrets.publicProxyKey=${{ secrets.NEXT_PUBLIC_ANALYTICS_ENABLED }} + + - name: Verify deployment + run: | + kubectl -n ${{ vars.APP_NAME }}-${{ env.APP_ENV }} rollout status deployment/${{ vars.APP_NAME }}-${{ env.APP_ENV }} + + - name: Telegram Notify + uses: appleboy/telegram-action@v1.0.0 + if: success() && contains('${{ vars.ENABLE_DEPLOY_BOT }}', 1) + with: + to: ${{ secrets.TELEGRAM_DEPLOY_CHAT_ID }} + token: ${{ secrets.TELEGRAM_DEPLOY_TOKEN }} + format: markdown + message: | + πŸš‚ The application from repository [${{ steps.lower-repo.outputs.repository }}](https://github.com/${{ steps.lower-repo.outputs.repository }}) has been successfully deployed by [${{ github.actor }}](https://github.com/users/${{ github.actor }}) on ${{ env.APP_ENV }}. + + πŸ—οΈ [GitHub Actions Build](https://github.com/${{ steps.lower-repo.outputs.repository }}/actions/runs/${{ github.run_id }}) + 🐳 [Image](https://ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ env.GITHUB_SHA_SHORT }} + πŸ”— [Link](https://${{ env.APP_DOMAIN }}) + + - name: Telegram Notify + uses: appleboy/telegram-action@v1.0.0 + if: failure() + with: + to: ${{ secrets.TELEGRAM_DEPLOY_CHAT_ID }} + token: ${{ secrets.TELEGRAM_DEPLOY_TOKEN }} + format: markdown + message: | + 🚨Deploy of the application from repository [${{ steps.lower-repo.outputs.repository }}](https://github.com/${{ steps.lower-repo.outputs.repository }}) on ${{ env.APP_ENV }} has been failed. + + πŸ—οΈ [GitHub Actions Build](https://github.com/${{ steps.lower-repo.outputs.repository }}/actions/runs/${{ github.run_id }}) + 🐳 [Image](https://ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ env.GITHUB_SHA_SHORT }} + πŸ”— [Link](https://${{ env.APP_DOMAIN }}) + + + + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index e6e3f48..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Test and Deploy - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - name: "Prettier: Validate code formatting" - run: npm run format:check - - name: "ESLint: Validate code for errors" - run: npm run lint - - deploy: - runs-on: ubuntu-latest - needs: test - strategy: - matrix: - node-version: [18] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - uses: amondnet/vercel-action@v25 - id: now-deployment-staging - if: github.ref != 'refs/heads/main' - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - scope: ${{ secrets.VERCEL_SCOPE }} - alias-domains: | - ton-web-ide-{{BRANCH}}.vercel.app - - - uses: amondnet/vercel-action@v25 - id: now-deployment-production - if: github.ref == 'refs/heads/main' - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - scope: ${{ secrets.VERCEL_SCOPE }} - vercel-args: "${{ github.ref == 'refs/heads/main' && '--prod' || '' }}" - alias-domains: | - ton-web-ide.vercel.app diff --git a/.github/workflows/rollback.yml b/.github/workflows/rollback.yml new file mode 100644 index 0000000..7ea452e --- /dev/null +++ b/.github/workflows/rollback.yml @@ -0,0 +1,63 @@ +name: Rollback Kubernetes Deployment + +on: + workflow_dispatch: + inputs: + app_env: + description: "Select the environment" + required: true + default: production + type: choice + options: + - production + - staging + revision: + description: "Choose the Helm revision to rollback to" + required: false + +jobs: + rollback: + runs-on: ubuntu-latest + + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Apply AWS k8s config + run: aws eks update-kubeconfig --name ${{ vars.AWS_CLUSTER }} --region ${{ vars.AWS_REGION }} + + - name: Fetch Helm history + run: | + helm history ${{ vars.APP_NAME }} --namespace ${{ vars.APP_NAME }}-${{ github.event.inputs.app_env }} + + - name: Get revision number + if: github.event.inputs.revision == '' + run: | + echo "No revision provided. Exiting." + exit 1 + + - name: Perform Helm rollback + run: | + helm rollback ${{ vars.APP_NAME }} ${{ github.event.inputs.revision }} --namespace ${{ vars.APP_NAME }}-${{ github.event.inputs.app_env }} ${{ github.event.inputs.revision }} + + - name: Verify rollback + run: | + kubectl -n ${{ vars.APP_NAME }}-${{ github.event.inputs.app_env }} rollout status deployment/${{ vars.APP_NAME }}-${{ github.event.inputs.app_env }} + + - name: Show Helm history + run: | + helm history ${{ vars.APP_NAME }} --namespace ${{ vars.APP_NAME }}-${{ github.event.inputs.app_env }} + + - name: Telegram Notify + uses: appleboy/telegram-action@v1.0.0 + with: + to: ${{ secrets.TELEGRAM_DEPLOY_CHAT_ID }} + token: ${{ secrets.TELEGRAM_DEPLOY_TOKEN }} + format: markdown + message: | + πŸ”„ The deployment {{ app_env }} has been rolled back by [${{ github.actor }}](https://github.com/${{ github.actor }}) to revision ${{ github.event.inputs.revision }}. + πŸ—οΈ [GitHub Actions Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..03d9549 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml new file mode 100644 index 0000000..6170530 --- /dev/null +++ b/.idea/material_theme_project_new.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/web-ide.iml b/.idea/web-ide.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/web-ide.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ab86c3d --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +/helm diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cabec61 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:21-alpine AS base + +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +EXPOSE 3000 +CMD ["npm", "start"] diff --git a/helm/app/Chart.yaml b/helm/app/Chart.yaml new file mode 100644 index 0000000..cf9ba02 --- /dev/null +++ b/helm/app/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v2 +name: Node.js Chart +description: A Helm chart for deploying my Node.js application +version: 0.1.2 diff --git a/helm/app/templates/deployment.yaml b/helm/app/templates/deployment.yaml new file mode 100644 index 0000000..e77c4d5 --- /dev/null +++ b/helm/app/templates/deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Values.appName }}-{{ .Values.deployEnv }} + release: prometheus-stack +spec: + replicas: {{ .Values.defaultReplicaCount }} + strategy: + type: RollingUpdate + selector: + matchLabels: + app: {{ .Values.appName }}-{{ .Values.deployEnv}} + template: + metadata: + labels: + app: {{ .Values.appName }}-{{ .Values.deployEnv}} + release: prometheus-stack + spec: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app: {{ .Values.appName }}-{{ .Values.deployEnv }} + matchLabelKeys: + - pod-template-hash + containers: + - name: {{ .Values.appName }}-{{ .Values.deployEnv}} + image: "{{ .Values.imageRepo }}:{{ .Values.imageTag }}" + env: + - name: APP_ENV + value: {{ .Values.deployEnv }} + - name: APP_VERSION + value: {{ .Values.appVersion | quote }} + - name: NEXT_PUBLIC_PROXY_KEY + value: {{ .Values.secrets.publicProxyKey | quote }} + - name: NEXT_PUBLIC_MIXPANEL_TOKEN + value: {{ .Values.secrets.publicMixPanelToken | quote }} + - name: NEXT_PUBLIC_ANALYTICS_ENABLED + value: {{ .Values.secrets.publicProxyKey | quote }} + ports: + - containerPort: {{ .Values.containerPort }} + resources: + limits: + cpu: {{ .Values.cpuLimit }} + memory: {{ .Values.memoryLimit }} + requests: + cpu: {{ .Values.cpuRequest }} + memory: {{ .Values.memoryRequest }} + imagePullPolicy: Always + imagePullSecrets: + - name: dockerconfigjson-github-com diff --git a/helm/app/templates/ghcr-secret.yaml b/helm/app/templates/ghcr-secret.yaml new file mode 100644 index 0000000..d126766 --- /dev/null +++ b/helm/app/templates/ghcr-secret.yaml @@ -0,0 +1,10 @@ +kind: Secret +type: kubernetes.io/dockerconfigjson +apiVersion: v1 +metadata: + name: dockerconfigjson-github-com + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Values.appName }}-{{ .Values.deployEnv}} +data: + .dockerconfigjson: {{ .Values.ghcrSecret }} \ No newline at end of file diff --git a/helm/app/templates/hpa.yaml b/helm/app/templates/hpa.yaml new file mode 100644 index 0000000..c5c85d2 --- /dev/null +++ b/helm/app/templates/hpa.yaml @@ -0,0 +1,25 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + namespace: {{ .Release.Namespace }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + minReplicas: {{ .Values.minReplicas }} + maxReplicas: {{ .Values.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: 80 diff --git a/helm/app/templates/ingress.yaml b/helm/app/templates/ingress.yaml new file mode 100644 index 0000000..d68e314 --- /dev/null +++ b/helm/app/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{ if .Values.publicService }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + namespace: {{ .Release.Namespace }} + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/ssl-redirect: "{{ .Values.sslRedirect }}" + nginx.ingress.kubernetes.io/proxy-connect-timeout: "10s" + nginx.ingress.kubernetes.io/proxy-read-timeout: "15s" + nginx.ingress.kubernetes.io/proxy-send-timeout: "15s" + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" + nginx.ingress.kubernetes.io/proxy-next-upstream: "error timeout http_502 http_503 http_504" + nginx.ingress.kubernetes.io/proxy-next-upstream-tries: "3" + cert-manager.io/cluster-issuer: {{ .Values.tlsIssuer }} + {{- if eq .Values.deployEnv "canary" }} + nginx.ingress.kubernetes.io/canary: "true" + nginx.ingress.kubernetes.io/canary-by-cookie: {{ .Values.canaryCookie | quote }} + nginx.ingress.kubernetes.io/canary-weight: {{ .Values.canaryWeight | quote }} + {{- end }} + nginx.ingress.kubernetes.io/server-snippet: | + location ~ ^/(metrics|ready|health)$ { + return 403; + } + + labels: + release: prometheus-stack + app: {{ .Values.appName }}-{{ .Values.deployEnv}} +spec: + tls: + - hosts: + - {{ .Values.host }} + secretName: {{ .Values.host }} + rules: + - host: {{ .Values.host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Values.appName }}-{{ .Values.deployEnv }} + port: + name: http +{{- end }} diff --git a/helm/app/templates/ns-resource-quota.yaml b/helm/app/templates/ns-resource-quota.yaml new file mode 100644 index 0000000..ad5bee5 --- /dev/null +++ b/helm/app/templates/ns-resource-quota.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota + namespace: {{ .Release.Namespace }} +spec: + hard: + {{- if eq .Values.deployEnv "staging" }} + pods: "2" + requests.memory: "256Mi" + limits.cpu: "1" + limits.memory: "16Gi" + persistentvolumeclaims: "0" + {{- end }} + {{- if eq .Values.deployEnv "canary" }} + pods: "10" + limits.cpu: "4" + limits.memory: "8Gi" + persistentvolumeclaims: "0" + {{- end }} + {{- if eq .Values.deployEnv "production" }} + pods: "100" + limits.cpu: "8" + limits.memory: "16Gi" + persistentvolumeclaims: "0" + {{- end }} diff --git a/helm/app/templates/service-monitor.yaml b/helm/app/templates/service-monitor.yaml new file mode 100644 index 0000000..30b47f6 --- /dev/null +++ b/helm/app/templates/service-monitor.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + namespace: {{ .Release.Namespace }} + labels: + release: prometheus-stack +spec: + selector: + matchLabels: + app: {{ .Values.appName }}-{{ .Values.deployEnv}} + endpoints: + - port: http + interval: 30s + path: /metrics + - port: https + interval: 30s + path: /metrics + diff --git a/helm/app/templates/service.yaml b/helm/app/templates/service.yaml new file mode 100644 index 0000000..6a6d990 --- /dev/null +++ b/helm/app/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.appName }}-{{ .Values.deployEnv}} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Values.appName }}-{{ .Values.deployEnv }} + release: prometheus-stack +spec: + type: ClusterIP + selector: + app: {{ .Values.appName }}-{{ .Values.deployEnv}} + ports: + - name: http + protocol: TCP + port: 80 + targetPort: {{ .Values.containerPort }} \ No newline at end of file diff --git a/helm/app/values-canary.yaml b/helm/app/values-canary.yaml new file mode 100644 index 0000000..d5d1b10 --- /dev/null +++ b/helm/app/values-canary.yaml @@ -0,0 +1,10 @@ +deployEnv: canary +replicaCount: 2 +imageTag: "canary" +canaryWeight: 10 + +minReplicas: 1 +maxReplicas: 1 + +memoryLimit: 120Mi +memoryRequest: 100Mi diff --git a/helm/app/values-production.yaml b/helm/app/values-production.yaml new file mode 100644 index 0000000..04d5a84 --- /dev/null +++ b/helm/app/values-production.yaml @@ -0,0 +1,9 @@ +deployEnv: production +defaultReplicaCount: 2 +imageTag: "production" + +minReplicas: 2 +maxReplicas: 4 + +memoryLimit: 120Mi +memoryRequest: 100Mi diff --git a/helm/app/values-staging.yaml b/helm/app/values-staging.yaml new file mode 100644 index 0000000..0a7887b --- /dev/null +++ b/helm/app/values-staging.yaml @@ -0,0 +1,9 @@ +deployEnv: staging +replicaCount: 1 +imageTag: "staging" + +minReplicas: 1 +maxReplicas: 1 + +memoryLimit: 120Mi +memoryRequest: 100Mi diff --git a/helm/app/values.yaml b/helm/app/values.yaml new file mode 100644 index 0000000..e8a1376 --- /dev/null +++ b/helm/app/values.yaml @@ -0,0 +1,42 @@ +# app +appVersion: "0.1" + +# limits & requests +cpuLimit: "500m" +memoryLimit: "128Mi" +cpuRequest: "500m" +memoryRequest: "64Mi" + +# replicas +minReplicas: 2 +maxReplicas: 40 + +# docker +containerPort: 3000 +nodePort: 80 + +# from github deploy +imageRepo: "" +imageTag: "" +host: "" +appName: "" +ghcrSecret: "" + +tlsCert: "" +tlsKey: "" + +canaryCookie: "canary_tPIzU7rz5ecBWK2gFOs72o5s2qr0kz" + +# do not change +tlsIssuer: "letsencrypt" +certIssuingMode: false + +# http +publicService: true +sslRedirect: false + + +secrets: + publicProxyKey: "" + publicMixPanelToken: "" + secrets.publicProxyKey: "" diff --git a/next.config.js b/next.config.js index 52f42a0..077e524 100644 --- a/next.config.js +++ b/next.config.js @@ -9,6 +9,9 @@ const webpack = require("webpack"); const nextConfig = withTM({ reactStrictMode: true, + images: { + unoptimized: true, + }, webpack: (config, options) => { config.resolve.fallback = { fs: false }; config.resolve.alias = { diff --git a/package-lock.json b/package-lock.json index 4829ba0..1f2a531 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@xterm/addon-search": "^0.14.0-beta.1", "@zip.js/zip.js": "^2.7.6", "antd": "^5.2.3", - "axios": "^1.6.7", + "axios": "^1.7.4", "bn.js": "^5.2.1", "change-case": "^5.4.4", "clsx": "^1.2.1", @@ -52,11 +52,11 @@ "react-markdown": "^9.0.1", "react-split": "^2.0.14", "react-syntax-highlighter": "^15.5.0", - "react-use": "^17.4.0", + "react-use": "^17.5.1", "recoil": "^0.7.7", "recoil-persist": "^4.2.0", "reconnecting-websocket": "^4.4.0", - "rollup": "^4.20.0", + "rollup": "^4.22.4", "sass": "^1.58.3", "ts-browser-eval": "^0.0.1", "typescript": "4.9.5", @@ -1344,17 +1344,198 @@ "version": "4.0.2", "license": "MIT" }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rushstack/eslint-patch": { "version": "1.2.0", "license": "MIT" @@ -1589,8 +1770,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "license": "MIT" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" }, "node_modules/@types/estree-jsx": { "version": "1.0.3", @@ -2751,10 +2933,11 @@ } }, "node_modules/axios": { - "version": "1.6.7", - "license": "MIT", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3529,14 +3712,16 @@ }, "node_modules/css-in-js-utils": { "version": "3.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz", + "integrity": "sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==", "dependencies": { "hyphenate-style-name": "^1.0.3" } }, "node_modules/css-tree": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" @@ -3546,8 +3731,9 @@ } }, "node_modules/csstype": { - "version": "3.1.1", - "license": "MIT" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cz-conventional-changelog": { "version": "3.3.0", @@ -4017,7 +4203,8 @@ }, "node_modules/error-stack-parser": { "version": "2.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", "dependencies": { "stackframe": "^1.3.4" } @@ -4706,10 +4893,6 @@ "version": "2.0.6", "license": "MIT" }, - "node_modules/fast-loops": { - "version": "1.1.3", - "license": "MIT" - }, "node_modules/fast-plist": { "version": "0.1.3", "license": "MIT" @@ -4730,7 +4913,8 @@ }, "node_modules/fastest-stable-stringify": { "version": "2.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz", + "integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==" }, "node_modules/fastq": { "version": "1.15.0", @@ -4857,14 +5041,15 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.5", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -5497,8 +5682,9 @@ } }, "node_modules/hyphenate-style-name": { - "version": "1.0.4", - "license": "BSD-3-Clause" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", + "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==" }, "node_modules/iconv-lite": { "version": "0.4.24", @@ -5598,11 +5784,11 @@ "license": "MIT" }, "node_modules/inline-style-prefixer": { - "version": "6.0.4", - "license": "MIT", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-7.0.1.tgz", + "integrity": "sha512-lhYo5qNTQp3EvSSp3sRvXMbVQTLrvGV6DycRMJ5dm2BLMiJ30wpXKdDdgX+GmJZ5uQMucwRKHamXSst3Sj/Giw==", "dependencies": { - "css-in-js-utils": "^3.1.0", - "fast-loops": "^1.1.3" + "css-in-js-utils": "^3.1.0" } }, "node_modules/inquirer": { @@ -7085,7 +7271,8 @@ }, "node_modules/mdn-data": { "version": "2.0.14", - "license": "CC0-1.0" + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, "node_modules/meow": { "version": "13.2.0", @@ -7685,23 +7872,29 @@ "dev": true }, "node_modules/nano-css": { - "version": "5.3.5", - "license": "Unlicense", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.6.2.tgz", + "integrity": "sha512-+6bHaC8dSDGALM1HJjOHVXpuastdu2xFoZlC77Jh4cg+33Zcgm+Gxd+1xsnpZK14eyHObSp82+ll5y3SX75liw==", "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", "css-tree": "^1.1.2", - "csstype": "^3.0.6", + "csstype": "^3.1.2", "fastest-stable-stringify": "^2.0.2", - "inline-style-prefixer": "^6.0.0", - "rtl-css-js": "^1.14.0", - "sourcemap-codec": "^1.4.8", + "inline-style-prefixer": "^7.0.1", + "rtl-css-js": "^1.16.1", "stacktrace-js": "^2.0.2", - "stylis": "^4.0.6" + "stylis": "^4.3.0" }, "peerDependencies": { "react": "*", "react-dom": "*" } }, + "node_modules/nano-css/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, "node_modules/nanoid": { "version": "3.3.4", "license": "MIT", @@ -9185,8 +9378,9 @@ } }, "node_modules/react-use": { - "version": "17.4.0", - "license": "Unlicense", + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/react-use/-/react-use-17.5.1.tgz", + "integrity": "sha512-LG/uPEVRflLWMwi3j/sZqR00nF6JGqTTDblkXK2nzXsIvij06hXl1V/MZIlwj1OKIQUtlh1l9jK8gLsRyCQxMg==", "dependencies": { "@types/js-cookie": "^2.2.6", "@xobotyi/scrollbar-width": "^1.9.5", @@ -9194,7 +9388,7 @@ "fast-deep-equal": "^3.1.3", "fast-shallow-equal": "^1.0.0", "js-cookie": "^2.2.1", - "nano-css": "^5.3.1", + "nano-css": "^5.6.2", "react-universal-interface": "^0.6.2", "resize-observer-polyfill": "^1.5.1", "screenfull": "^5.1.0", @@ -9204,8 +9398,8 @@ "tslib": "^2.1.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "*", + "react-dom": "*" } }, "node_modules/react-use-measure": { @@ -9572,10 +9766,11 @@ } }, "node_modules/rollup": { - "version": "4.20.0", - "license": "MIT", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -9585,28 +9780,29 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.20.0", - "@rollup/rollup-android-arm64": "4.20.0", - "@rollup/rollup-darwin-arm64": "4.20.0", - "@rollup/rollup-darwin-x64": "4.20.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", - "@rollup/rollup-linux-arm-musleabihf": "4.20.0", - "@rollup/rollup-linux-arm64-gnu": "4.20.0", - "@rollup/rollup-linux-arm64-musl": "4.20.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", - "@rollup/rollup-linux-riscv64-gnu": "4.20.0", - "@rollup/rollup-linux-s390x-gnu": "4.20.0", - "@rollup/rollup-linux-x64-gnu": "4.20.0", - "@rollup/rollup-linux-x64-musl": "4.20.0", - "@rollup/rollup-win32-arm64-msvc": "4.20.0", - "@rollup/rollup-win32-ia32-msvc": "4.20.0", - "@rollup/rollup-win32-x64-msvc": "4.20.0", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, "node_modules/rtl-css-js": { "version": "1.16.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.16.1.tgz", + "integrity": "sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==", "dependencies": { "@babel/runtime": "^7.1.2" } @@ -9937,10 +10133,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "license": "MIT" - }, "node_modules/space-separated-tokens": { "version": "2.0.2", "license": "MIT", @@ -9968,18 +10160,21 @@ }, "node_modules/stack-generator": { "version": "2.0.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz", + "integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==", "dependencies": { "stackframe": "^1.3.4" } }, "node_modules/stackframe": { "version": "1.3.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", + "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==" }, "node_modules/stacktrace-gps": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz", + "integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==", "dependencies": { "source-map": "0.5.6", "stackframe": "^1.3.4" @@ -9987,14 +10182,16 @@ }, "node_modules/stacktrace-gps/node_modules/source-map": { "version": "0.5.6", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==", "engines": { "node": ">=0.10.0" } }, "node_modules/stacktrace-js": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz", + "integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==", "dependencies": { "error-stack-parser": "^2.0.6", "stack-generator": "^2.0.5", @@ -10252,8 +10449,9 @@ } }, "node_modules/stylis": { - "version": "4.1.3", - "license": "MIT" + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", + "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==" }, "node_modules/supports-color": { "version": "7.2.0", diff --git a/package.json b/package.json index 62194ca..0d8c13d 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "build": "next build", "start": "next start", "lint": "next lint", - "format:check": "prettier --check --ignore-path .gitignore .", - "format:fix": "prettier --write --ignore-path .gitignore .", + "format:check": "prettier --check --ignore-path .prettierignore --ignore-path .gitignore .", + "format:fix": "prettier --write --ignore-path .prettierignore --ignore-path .gitignore .", "prepare": "husky", "commit": "git-cz" }, @@ -40,7 +40,7 @@ "@xterm/addon-search": "^0.14.0-beta.1", "@zip.js/zip.js": "^2.7.6", "antd": "^5.2.3", - "axios": "^1.6.7", + "axios": "^1.7.4", "bn.js": "^5.2.1", "change-case": "^5.4.4", "clsx": "^1.2.1", @@ -65,11 +65,11 @@ "react-markdown": "^9.0.1", "react-split": "^2.0.14", "react-syntax-highlighter": "^15.5.0", - "react-use": "^17.4.0", + "react-use": "^17.5.1", "recoil": "^0.7.7", "recoil-persist": "^4.2.0", "reconnecting-websocket": "^4.4.0", - "rollup": "^4.20.0", + "rollup": "^4.22.4", "sass": "^1.58.3", "ts-browser-eval": "^0.0.1", "typescript": "4.9.5",