8000 chore: finalize pg-api -> postgres-meta · wasabigeek/postgres-meta@0058cc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0058cc7

Browse files
committed
chore: finalize pg-api -> postgres-meta
Things renamed: * Repo name & url, docs, names in config files * Docker image name * Binary name (pg-api-<os> -> postgres-meta-<os>) * Envs (PG_API_* -> PG_META_*)
1 parent 0258f0f commit 0058cc7

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
npm run build
2929
3030
- name: Get version before
31-
run: echo "VERSION_BEFORE=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
31+
run: echo "VERSION_BEFORE=$(curl -s https://api.github.com/repos/supabase/postgres-meta/releases/latest | jq .name -r)" >> $GITHUB_ENV
3232

3333
- name: Release on GitHub
3434
run: npx semantic-release
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737

3838
- name: Get version after
39-
run: echo "VERSION_AFTER=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
39+
run: echo "VERSION_AFTER=$(curl -s https://api.github.com/repos/supabase/postgres-meta/releases/latest | jq .name -r)" >> $GITHUB_ENV
4040

4141
- name: Check version difference
4242
run: |
@@ -99,7 +99,7 @@ jobs:
9999
100100
- name: Get upload url
101101
if: env.HAS_NEW_RELEASE == 1
102-
run: echo "UPLOAD_URL=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .upload_url -r)" >> $GITHUB_ENV
102+
run: echo "UPLOAD_URL=$(curl -s https://api.github.com/repos/supabase/postgres-meta/releases/latest | jq .upload_url -r)" >> $GITHUB_ENV
103103

104104
- name: Upload linux release asset
105105
if: env.HAS_NEW_RELEASE == 1
@@ -135,13 +135,13 @@ jobs:
135135
asset_content_type: application/gzip
136136

137137
- name: Get version
138-
run: echo "VERSION=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
138+
run: echo "VERSION=$(curl -s https://api.github.com/repos/supabase/postgres-meta/releases/latest | jq .name -r)" >> $GITHUB_ENV
139139

140140
- name: Upload image to Docker Hub
141141
if: env.HAS_NEW_RELEASE == 1
142142
uses: docker/build-push-action@v1
143143
with:
144144
username: ${{ secrets.DOCKER_USERNAME }}
145145
password: ${{ secrets.DOCKER_PASSWORD }}
146-
repository: supabase/pg-api
146+
repository: supabase/postgres-meta
147147
tags: latest,${{ env.VERSION }}

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# docker build -t pg-api .
2-
# docker run -t -i -p8080:8080 pg-api
1+
# docker build -t postgres-meta .
2+
# docker run -t -i -p8080:8080 postgres-meta
33

44
FROM debian:stable-slim
5-
COPY ./bin/pg-api-linux /bin/
6-
ENV PG_API_PORT=8080
7-
ENTRYPOINT "/bin/pg-api-linux"
5+
COPY ./bin/postgres-meta-linux /bin/
6+
ENV PG_META_PORT=8080
7+
ENTRYPOINT "/bin/postgres-meta-linux"
88
EXPOSE 8080

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Full documentation: https://supabase.github.io/postgres-meta/
1111
Set the following ENV VARS:
1212

1313
```bash
14-
PG_API_PORT=8080
15-
PG_API_DB_HOST="postgres"
16-
PG_API_DB_NAME="postgres"
17-
PG_API_DB_USER="postgres"
18-
PG_API_DB_PORT=5432
19-
PG_API_DB_PASSWORD="postgres"
14+
PG_META_PORT=8080
15+
PG_META_DB_HOST="postgres"
16+
PG_META_DB_NAME="postgres"
17+
PG_META_DB_USER="postgres"
18+
PG_META_DB_PORT=5432
19+
PG_META_DB_PASSWORD="postgres"
2020
```
2121

2222
Then run any of the binaries in the releases.
@@ -39,6 +39,6 @@ Apache 2.0
3939

4040
## Sponsors
4141

42-
We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves.
42+
We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves.
4343

4444
[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@supabase/postgres-meta",
33
"version": "0.0.0-automated",
44
"description": "A RESTful API for managing your Postgres.",
5-
"homepage": "https://github.com/supabase/pg-api",
6-
"bugs": "https://github.com/supabase/pg-api/issues",
5+
"homepage": "https://github.com/supabase/postgres-meta",
6+
"bugs": "https://github.com/supabase/postgres-meta/issues",
77
"license": "MIT",
88
"author": "Supabase",
99
"files": [
@@ -14,7 +14,7 @@
1414
"bin": {
1515
"postgres-meta": "bin/src/server/app.js"
1616
},
17-
"repository": "supabase/pg-api",
17+
"repository": "supabase/postgres-meta",
1818
"scripts": {
1919
"clean": "rimraf bin dist",
2020
"format": "prettier --write \"{src,test}/**/*.ts\"",

src/server/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import express from 'express'
2-
import { PG_API_PORT } from './constants'
2+
import { PG_META_PORT } from './constants'
33
import routes from './routes'
44
import pkg from '../../package.json'
55
import logger from './logger'
@@ -12,10 +12,10 @@ app.get('/', (_req, res) =>
1212
status: 200,
1313
name: pkg.name,
1414
version: pkg.version,
15-
documentation: 'https://supabase.github.io/pg-api/',
15+
documentation: 'https://supabase.github.io/postgres-meta/',
1616
})
1717
)
1818
app.get('/health', (_req, res) => res.status(200).json({ date: new Date() }))
19-
app.listen(PG_API_PORT, () => {
20-
logger.info(`App started on port ${PG_API_PORT}`)
19+
app.listen(PG_META_PORT, () => {
20+
logger.info(`App started on port ${PG_META_PORT}`)
2121
})

src/server/constants.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
export const PG_API_PORT = Number(process.env.PG_API_PORT || 1337)
1+
export const PG_META_PORT = Number(process.env.PG_META_PORT || 1337)
22
export const CRYPTO_KEY = process.env.CRYPTO_KEY || 'SAMPLE_KEY'
33

4-
const PG_API_DB_HOST = process.env.PG_API_DB_HOST || 'localhost'
5-
const PG_API_DB_NAME = process.env.PG_API_DB_NAME || 'postgres'
6-
const PG_API_DB_USER = process.env.PG_API_DB_USER || 'postgres'
7-
const PG_API_DB_PORT = Number(process.env.PG_API_DB_PORT) || 5432
8-
const PG_API_DB_PASSWORD = process.env.PG_API_DB_PASSWORD || 'postgres'
4+
const PG_META_DB_HOST = process.env.PG_META_DB_HOST || 'localhost'
5+
const PG_META_DB_NAME = process.env.PG_META_DB_NAME || 'postgres'
6+
const PG_META_DB_USER = process.env.PG_META_DB_USER || 'postgres'
7+
const PG_META_DB_PORT = Number(process.env.PG_META_DB_PORT) || 5432
8+
const PG_META_DB_PASSWORD = process.env.PG_META_DB_PASSWORD || 'postgres'
99

10-
export const PG_CONNECTION = `postgres://${PG_API_DB_USER}:${PG_API_DB_PASSWORD}@${PG_API_DB_HOST}:${PG_API_DB_PORT}/${PG_API_DB_NAME}`
10+
export const PG_CONNECTION = `postgres://${PG_META_DB_USER}:${PG_META_DB_PASSWORD}@${PG_META_DB_HOST}:${PG_META_DB_PORT}/${PG_META_DB_NAME}`

test/integration/index.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
var assert = require('assert')
22
const CryptoJS = require('crypto-js')
33
import axios from 'axios'
4-
import { PG_API_PORT, PG_CONNECTION, CRYPTO_KEY } from '../../bin/src/server/constants'
4+
import { PG_META_PORT, PG_CONNECTION, CRYPTO_KEY } from '../../bin/src/server/constants'
55

6-
const URL = `http://localhost:${PG_API_PORT}`
6+
const URL = `http://localhost:${PG_META_PORT}`
77
const STATUS = {
88
SUCCESS: 200,
99
ERROR: 500,

0 commit comments

Comments
 (0)
0