Skip to content

Commit 6dda887

Browse files
authored
Chore/improvements (#508)
* fix: automatically push to mirrors after release * fix: refactored signature v4 methods * fix: http connection pool & priority * fix: add metrics route when necessary * fix: refactor internal packages
1 parent fe64a3a commit 6dda887

File tree

134 files changed

+1466
-649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1466
-649
lines changed

.github/workflows/mirror.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
packages: write
1717
id-token: write
1818
steps:
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v2
21+
with:
22+
username: ${{ secrets.DOCKER_USERNAME }}
23+
password: ${{ secrets.DOCKER_PASSWORD }}
1924
- name: configure aws credentials
2025
uses: aws-actions/configure-aws-credentials@v1
2126
with:

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,40 @@ jobs:
112112
VERSION=${{ needs.release.outputs.version }}
113113
cache-from: type=gha
114114
cache-to: type=gha,mode=max
115+
116+
mirror:
117+
runs-on: ubuntu-latest
118+
needs:
119+
- release
120+
- publish
121+
permissions:
122+
contents: read
123+
packages: write
124+
id-token: write
125+
steps:
126+
- name: Login to DockerHub
127+
uses: docker/login-action@v2
128+
with:
129+
username: ${{ secrets.DOCKER_USERNAME }}
130+
password: ${{ secrets.DOCKER_PASSWORD }}
131+
- name: configure aws credentials
132+
uses: aws-actions/configure-aws-credentials@v1
133+
with:
134+
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
135+
aws-region: 'us-east-1'
136+
- uses: docker/login-action@v2
137+
with:
138+
registry: public.ecr.aws
139+
- uses: docker/login-action@v2
140+
with:
141+
registry: ghcr.io
142+
username: ${{ github.actor }}
143+
password: ${{ secrets.GITHUB_TOKEN }}
144+
- uses: akhilerm/[email protected]
145+
with:
146+
src: docker.io/supabase/storage-api:${{ needs.release.outputs.version }}
147+
dst: |
148+
public.ecr.aws/supabase/storage-api:latest
149+
docker.io/supabase/storage-api:latest
150+
ghcr.io/supabase/storage-api:latest
151+

build.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const { build } = require('esbuild')
3+
4+
build({
5+
entryPoints: ['./src/**/*.ts'],
6+
bundle: false,
7+
outdir: 'dist',
8+
platform: 'node',
9+
format: 'cjs',
10+
target: 'node20',
11+
sourcemap: true,
12+
tsconfig: 'tsconfig.json',
13+
loader: { '.ts': 'ts' },
14+
}).catch((e) => {
15+
console.error(e)
16+
process.exit(1)
17+
})

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ module.exports = {
44
transform: {
55
'^.+\\.(t|j)sx?$': 'ts-jest',
66
},
7+
moduleNameMapper: {
8+
'^@storage/(.*)$': '<rootDir>/src/storage/$1',
9+
'^@internal/(.*)$': '<rootDir>/src/internal/$1',
10+
},
711
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
812
testEnvironment: 'node',
913
testPathIgnorePatterns: ['node_modules', 'dist'],

0 commit comments

Comments
 (0)