Compare commits
194 Commits
@nhost/das
...
@nhost/das
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ff58d7f23 | ||
|
|
8dd1c7415b | ||
|
|
ebd2749e38 | ||
|
|
80b604adda | ||
|
|
9d73050792 | ||
|
|
91a1a41f5d | ||
|
|
22e9c27c81 | ||
|
|
2d2beb53d2 | ||
|
|
b403b0d6a0 | ||
|
|
4dbac55cb4 | ||
|
|
c6e31ac741 | ||
|
|
0d3e8b3992 | ||
|
|
b2afd14d61 | ||
|
|
f28f28b6ee | ||
|
|
834b959271 | ||
|
|
4dbc9ccc87 | ||
|
|
1666ca2ec5 | ||
|
|
346791d4d5 | ||
|
|
94bdafe22f | ||
|
|
33782e9d41 | ||
|
|
ea02e1e104 | ||
|
|
98bf6e3792 | ||
|
|
d9dcafd643 | ||
|
|
4f3d97b5ad | ||
|
|
d1801ceae9 | ||
|
|
b6f9fe6304 | ||
|
|
15b652d7e0 | ||
|
|
cdc0047cb7 | ||
|
|
7c0e71e8be | ||
|
|
175d6d8cbc | ||
|
|
2ae277409a | ||
|
|
ada10170b7 | ||
|
|
0ed77cbe8b | ||
|
|
1abc68992f | ||
|
|
795962e3c2 | ||
|
|
ba998eb632 | ||
|
|
d3fc1bbeb9 | ||
|
|
7b9c2016d0 | ||
|
|
ebf4070be6 | ||
|
|
59e3f6abc6 | ||
|
|
0c9a03a7ff | ||
|
|
42cbe27914 | ||
|
|
d7e7b0e51b | ||
|
|
036181dd75 | ||
|
|
2828a9fe01 | ||
|
|
88bc71dffc | ||
|
|
17699870a6 | ||
|
|
5c0304ab73 | ||
|
|
637265e3d9 | ||
|
|
229604d8e1 | ||
|
|
1165a33079 | ||
|
|
82c0dd9d87 | ||
|
|
a9bfab1778 | ||
|
|
60b7a664d2 | ||
|
|
4f708d04d6 | ||
|
|
a02af56056 | ||
|
|
575136dcfb | ||
|
|
2bc6346cbc | ||
|
|
91cd494a3d | ||
|
|
d57e0a5287 | ||
|
|
dd5e7093f0 | ||
|
|
3e9bb84f07 | ||
|
|
6665b58ec8 | ||
|
|
456e893cd6 | ||
|
|
fd76170ca6 | ||
|
|
682aef2d94 | ||
|
|
cb53f71d4a | ||
|
|
4fc0b40cb4 | ||
|
|
9da2d01c55 | ||
|
|
0d5e7850f8 | ||
|
|
8ed965c669 | ||
|
|
cb284b40b1 | ||
|
|
c59f622feb | ||
|
|
9a30edd038 | ||
|
|
b8b4e36175 | ||
|
|
6e47ef68d5 | ||
|
|
2697414637 | ||
|
|
e753b2faed | ||
|
|
6f62ec7d2a | ||
|
|
d365ef1953 | ||
|
|
99ee9fd10d | ||
|
|
9608a327c9 | ||
|
|
492b83ef58 | ||
|
|
09f53ae43f | ||
|
|
7724ac7e06 | ||
|
|
02343fe171 | ||
|
|
98dd8d039c | ||
|
|
456e057497 | ||
|
|
93e9b58a58 | ||
|
|
019a7c2335 | ||
|
|
64882a8e16 | ||
|
|
1ed572fe39 | ||
|
|
e06271a8ae | ||
|
|
bca239ebb2 | ||
|
|
e33caa046d | ||
|
|
cbbd331341 | ||
|
|
c41bfaffdd | ||
|
|
f2596b0b14 | ||
|
|
4d0c3111d1 | ||
|
|
7ff9644ac7 | ||
|
|
87fdaa7144 | ||
|
|
bc23d051ba | ||
|
|
132a4f4be9 | ||
|
|
c330dc1c00 | ||
|
|
4bebd9842b | ||
|
|
541f2d250c | ||
|
|
6b31e31430 | ||
|
|
9ba2208dd7 | ||
|
|
538541fc79 | ||
|
|
cb0aab48b3 | ||
|
|
dcc760b6bb | ||
|
|
d2227be0d0 | ||
|
|
93e807edc4 | ||
|
|
14738d4b58 | ||
|
|
6ac4cfa80c | ||
|
|
295c6c9110 | ||
|
|
02911e4a54 | ||
|
|
2be825de08 | ||
|
|
65afad1b91 | ||
|
|
dbea13a1d2 | ||
|
|
5e2a419700 | ||
|
|
9e6660450c | ||
|
|
2db9be03ff | ||
|
|
1b8f505050 | ||
|
|
6ab6bccded | ||
|
|
b12bc1c27f | ||
|
|
04d1641cf7 | ||
|
|
e91c09aa9c | ||
|
|
7c04aad870 | ||
|
|
520044c5ab | ||
|
|
22fed668d6 | ||
|
|
ae14fb1a2f | ||
|
|
f4ca0aab42 | ||
|
|
d8a0d196af | ||
|
|
cd53718631 | ||
|
|
1fcd3f1851 | ||
|
|
67d370feaa | ||
|
|
0173ec356b | ||
|
|
2fb43d417a | ||
|
|
966b8158c2 | ||
|
|
800fac6093 | ||
|
|
20eb04cd46 | ||
|
|
5d31a88556 | ||
|
|
06019ae7ba | ||
|
|
523af2901f | ||
|
|
1e0a2c0c43 | ||
|
|
9b60f9ca48 | ||
|
|
90bc800c92 | ||
|
|
023060cee6 | ||
|
|
0bb3b127d0 | ||
|
|
cd914d30ed | ||
|
|
71dddccb9c | ||
|
|
2a846040ef | ||
|
|
8b580d05c4 | ||
|
|
24d70e8ea8 | ||
|
|
8212432983 | ||
|
|
7df00a3291 | ||
|
|
0186aa5c98 | ||
|
|
67e5cc839c | ||
|
|
25c5bd1ccd | ||
|
|
e5fa48d818 | ||
|
|
f34da3a715 | ||
|
|
fab330ce55 | ||
|
|
3a76080e40 | ||
|
|
db57572f38 | ||
|
|
b030eae999 | ||
|
|
b10f4fa631 | ||
|
|
c408b38f28 | ||
|
|
b2336b2b33 | ||
|
|
fcf68d5c32 | ||
|
|
9e71677cd2 | ||
|
|
ce48ce0860 | ||
|
|
9b93cf95ec | ||
|
|
34d85e54d6 | ||
|
|
6ae9d6dd01 | ||
|
|
1e8d8afe70 | ||
|
|
80478e39e0 | ||
|
|
3a39970d28 | ||
|
|
b0607673ed | ||
|
|
d9f27c6c65 | ||
|
|
c92142845f | ||
|
|
c93f818315 | ||
|
|
d20ed86219 | ||
|
|
e04390307c | ||
|
|
5c931f14ae | ||
|
|
c9f88326b2 | ||
|
|
ac8efcbdd5 | ||
|
|
9bc346e8d4 | ||
|
|
efed987d31 | ||
|
|
bdab7da7d3 | ||
|
|
c2d9993968 | ||
|
|
508ba62207 | ||
|
|
a3318de06e | ||
|
|
fa9f7ca052 |
108
.github/actions/nhost-cli/README.md
vendored
Normal file
108
.github/actions/nhost-cli/README.md
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
# Nhost CLI GitHub Action
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
```
|
||||
|
||||
### Install the CLI and start the app
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nhost CLI and start the application
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
start: true
|
||||
```
|
||||
|
||||
### Set another working directory
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
path: examples/react-apollo
|
||||
start: true
|
||||
```
|
||||
|
||||
### Don't wait for the app to be ready
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nhost CLI and start app
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
start: true
|
||||
wait: false
|
||||
```
|
||||
|
||||
### Stop the app
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Start app
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
start: true
|
||||
- name: Do something
|
||||
cmd: echo "do something"
|
||||
- name: Stop
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
stop: true
|
||||
```
|
||||
|
||||
### Install a given value of the CLI
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
version: v0.8.10
|
||||
```
|
||||
|
||||
### Inject values into nhost/config.yaml
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
config: |
|
||||
services:
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.16.1
|
||||
```
|
||||
75
.github/actions/nhost-cli/action.yaml
vendored
Normal file
75
.github/actions/nhost-cli/action.yaml
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
name: Nhost CLI
|
||||
description: 'Action to install the Nhost CLI and to run an application'
|
||||
inputs:
|
||||
start:
|
||||
description: "Start the application. If false, the application won't be started"
|
||||
default: 'false'
|
||||
wait:
|
||||
description: 'If starting the application, wait until it is ready'
|
||||
default: 'true'
|
||||
stop:
|
||||
description: 'Stop the application'
|
||||
default: 'false'
|
||||
path:
|
||||
description: 'Path to the application'
|
||||
default: '.'
|
||||
version:
|
||||
description: 'Version of the Nhost CLI'
|
||||
default: 'latest'
|
||||
config:
|
||||
description: 'Values to be injected into nhost/config.yaml'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Check if Nhost CLI is already installed
|
||||
id: check-nhost-cli
|
||||
shell: bash
|
||||
# TODO check if the version is the same
|
||||
run: |
|
||||
if [ -z "$(which nhost)" ]
|
||||
then
|
||||
echo "installed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "installed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Install Nhost CLI
|
||||
if: ${{ steps.check-nhost-cli.outputs.installed == 'false' }}
|
||||
shell: bash
|
||||
run: bash <(curl --silent -L https://raw.githubusercontent.com/nhost/cli/main/get.sh) ${{ inputs.version }}
|
||||
- name: Set custom configuration
|
||||
if: ${{ inputs.config }}
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: config="${{ inputs.config }}" yq -i '. *= env(config)' nhost/config.yaml
|
||||
- name: Start the application
|
||||
if: ${{ inputs.start == 'true' }}
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: nhost dev --no-browser &
|
||||
- name: Wait for the app to be ready
|
||||
id: wait
|
||||
if: ${{ inputs.start == 'true' && inputs.wait == 'true' }}
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
curl -sSf --connect-timeout 3 \
|
||||
--max-time 5 \
|
||||
--retry 300 \
|
||||
--retry-delay 1 \
|
||||
--retry-max-time 300 \
|
||||
--retry-connrefused \
|
||||
'http://localhost:9695' > /dev/null
|
||||
- name: Log on failure
|
||||
if: steps.wait.outcome == 'failure'
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: |
|
||||
nhost logs
|
||||
exit 1
|
||||
- name: Stop the application
|
||||
if: ${{ inputs.stop == 'true' }}
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: nhost down
|
||||
22
.github/labeler.yml
vendored
Normal file
22
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
dashboard:
|
||||
- dashboard/**/*
|
||||
|
||||
documentation:
|
||||
- any:
|
||||
- docs/**/*
|
||||
- '!docs/docs/reference/docgen/**/*'
|
||||
|
||||
examples:
|
||||
- examples/**/*
|
||||
|
||||
sdk:
|
||||
- packages/**/*
|
||||
|
||||
react:
|
||||
- '{packages,examples}/*react*/**/*'
|
||||
|
||||
nextjs:
|
||||
- '{packages,examples}/*next*/**/*'
|
||||
|
||||
vue:
|
||||
- '{packages,examples}/*vue*/**/*'
|
||||
6
.github/renovate.json
vendored
6
.github/renovate.json
vendored
@@ -3,8 +3,14 @@
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"docker-compose": {
|
||||
"enabled": true
|
||||
},
|
||||
"ignoreDeps": [
|
||||
"pnpm",
|
||||
"node"
|
||||
],
|
||||
"labels": [
|
||||
"dependencies"
|
||||
]
|
||||
}
|
||||
48
.github/workflows/ci.yaml
vendored
48
.github/workflows/ci.yaml
vendored
@@ -20,46 +20,8 @@ env:
|
||||
NEXT_PUBLIC_ENV: dev
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_PUBLIC_NHOST_BACKEND_URL: http://localhost:1337
|
||||
|
||||
jobs:
|
||||
renovate-changeset:
|
||||
name: Add Renovate Changesets
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.head_ref, 'renovate/') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# * Install Node and dependencies. Package downloads will be cached for the next jobs.
|
||||
- name: Install Node and dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ env.TURBO_TEAM }}
|
||||
BUILD: 'none'
|
||||
- name: Install dictionary
|
||||
run: sudo apt-get install wbritish
|
||||
- name: Generate changeset file name
|
||||
id: file_name
|
||||
run: |
|
||||
FILE_NAME=$(shuf -n 3 /usr/share/dict/words | tr '\n' '-' | sed 's/-$//' | sed 's/'"'"'s//g' | tr '[:upper:]' '[:lower:]')
|
||||
echo "result=./.changeset/${FILE_NAME}.md" >> $GITHUB_OUTPUT
|
||||
- name: Create changeset file
|
||||
run: |
|
||||
echo "---" > ${{ steps.file_name.outputs.result }}
|
||||
pnpm recursive list --depth -1 --parseable \
|
||||
--filter='!nhost-root' \
|
||||
--filter=...[origin/${{ github.base_ref }}] \
|
||||
| xargs -I@ jq ".name" @/package.json \
|
||||
| sort \
|
||||
| uniq -u \
|
||||
| awk '$0=$0": patch"' \
|
||||
>> ${{ steps.file_name.outputs.result }}
|
||||
echo "---" >> ${{ steps.file_name.outputs.result }}
|
||||
echo >> ${{ steps.file_name.outputs.result }}
|
||||
echo "${{ github.event.pull_request.title }}" >> ${{ steps.file_name.outputs.result }}
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: ${{ github.event.pull_request.title }}
|
||||
build:
|
||||
name: Build @nhost packages
|
||||
runs-on: ubuntu-latest
|
||||
@@ -81,14 +43,16 @@ jobs:
|
||||
run: |
|
||||
FILTER_MODIFIED="${{ github.event_name == 'pull_request' && format('--filter=...[origin/{0}]', github.base_ref) || '' }}"
|
||||
PACKAGES=$(pnpm recursive list --depth -1 --parseable --filter='!nhost-root' $FILTER_MODIFIED \
|
||||
| xargs -I@ realpath --relative-to=$PWD @ \
|
||||
| xargs -I@ jq "if (.scripts.e2e | length) != 0 then {name: .name, path: \"@\"} else null end" @/package.json \
|
||||
| awk "!/null/" \
|
||||
| jq -c --slurp)
|
||||
echo "matrix=$PACKAGES" >> $GITHUB_OUTPUT
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
|
||||
e2e:
|
||||
name: 'e2e: ${{ matrix.package.name }}'
|
||||
name: 'e2e (${{ matrix.package.path }})'
|
||||
needs: build
|
||||
if: ${{ needs.build.outputs.matrix != '[]' && needs.build.outputs.matrix != '' }}
|
||||
strategy:
|
||||
@@ -108,7 +72,7 @@ jobs:
|
||||
# * Install Nhost CLI if a `nhost/config.yaml` file is found
|
||||
- name: Install Nhost CLI
|
||||
if: hashFiles(format('{0}/nhost/config.yaml', matrix.package.path)) != ''
|
||||
run: curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh | bash
|
||||
uses: ./.github/actions/nhost-cli
|
||||
# * Run the `ci` script of the current package of the matrix. Dependencies build is cached by Turborepo
|
||||
- name: Run e2e test
|
||||
run: pnpm --filter="${{ matrix.package.name }}" run e2e
|
||||
@@ -127,6 +91,7 @@ jobs:
|
||||
path: |
|
||||
${{format('{0}/cypress/screenshots/**', matrix.package.path)}}
|
||||
${{format('{0}/cypress/videos/**', matrix.package.path)}}
|
||||
|
||||
unit:
|
||||
name: Unit tests
|
||||
needs: build
|
||||
@@ -151,6 +116,7 @@ jobs:
|
||||
run: |
|
||||
echo '### Code coverage' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'Visit [codecov](https://app.codecov.io/gh/nhost/nhost/) to see the code coverage reports' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
needs: build
|
||||
|
||||
15
.github/workflows/labeler.yaml
vendored
Normal file
15
.github/workflows/labeler.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: 'Pull Request Labeler'
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: '${{ secrets.GH_PAT }}'
|
||||
sync-labels: ''
|
||||
68
.github/workflows/renovate.yaml
vendored
Normal file
68
.github/workflows/renovate.yaml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: Renovate
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [closed]
|
||||
paths-ignore:
|
||||
- 'assets/**'
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: nhost
|
||||
|
||||
jobs:
|
||||
renovate-changeset:
|
||||
name: Add changeset
|
||||
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# * Install Node and dependencies. Package downloads will be cached for the next jobs.
|
||||
- name: Install Node and dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ env.TURBO_TEAM }}
|
||||
BUILD: 'none'
|
||||
- name: Determine bumps
|
||||
id: bumps
|
||||
run: |
|
||||
LAST_NON_PR_SHA=$(git log --no-merges main origin/${{ github.head_ref }} --format=format:%h -- | head -2 | tail -1)
|
||||
echo "result<<EOF" >> $GITHUB_OUTPUT
|
||||
pnpm recursive list --depth -1 --parseable \
|
||||
--filter='!nhost-root' \
|
||||
--filter=[$LAST_NON_PR_SHA] \
|
||||
| xargs -I@ jq ".name" @/package.json \
|
||||
| sort \
|
||||
| uniq -u \
|
||||
| awk '$0=$0": patch"' \
|
||||
>> $GITHUB_OUTPUT
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
- name: Install dictionary
|
||||
if: steps.bumps.outputs.result != ''
|
||||
run: sudo apt-get install wbritish
|
||||
- name: Generate changeset file name
|
||||
id: file_name
|
||||
if: steps.bumps.outputs.result != ''
|
||||
run: |
|
||||
FILE_NAME=$(shuf -n 3 /usr/share/dict/words | tr '\n' '-' | sed 's/-$//' | sed 's/'"'"'s//g' | tr '[:upper:]' '[:lower:]')
|
||||
echo "result=./.changeset/${FILE_NAME}.md" >> $GITHUB_OUTPUT
|
||||
- name: Create changeset file
|
||||
if: steps.bumps.outputs.result != ''
|
||||
run: |
|
||||
cat <<EOF > ${{ steps.file_name.outputs.result }}
|
||||
---
|
||||
${{ steps.bumps.outputs.result }}
|
||||
---
|
||||
|
||||
${{ github.event.pull_request.title }}
|
||||
EOF
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
if: steps.bumps.outputs.result != ''
|
||||
with:
|
||||
commit_message: ${{ github.event.pull_request.title }}
|
||||
branch: main
|
||||
104
.github/workflows/test-nhost-cli-action.yaml
vendored
Normal file
104
.github/workflows/test-nhost-cli-action.yaml
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
name: Test Nhost CLI action
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- '.github/actions/nhost-cli/**'
|
||||
- '!.github/actions/nhost-cli/**/*.md'
|
||||
|
||||
jobs:
|
||||
install:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
- name: should succeed running the nhost command
|
||||
run: nhost
|
||||
|
||||
start:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI and start the application
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
path: packages/nhost-js
|
||||
start: true
|
||||
- name: should be running
|
||||
run: curl -sSf 'http://localhost:9695' > /dev/null
|
||||
|
||||
stop:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI, start and stop the application
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
path: packages/nhost-js
|
||||
start: true
|
||||
stop: true
|
||||
- name: should have no live docker container
|
||||
run: |
|
||||
if [ -z "docker ps -q" ]; then
|
||||
echo "Some docker containers are still running"
|
||||
docker ps
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wait:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI and start the application
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
path: packages/nhost-js
|
||||
start: true
|
||||
wait: false
|
||||
- name: should not be ready
|
||||
run: curl -sSf -o /dev/null 'http://localhost:9695' > /dev/null && exit 1 || true
|
||||
- name: should eventually be ready
|
||||
run: |
|
||||
curl -sSf --connect-timeout 3 \
|
||||
--max-time 5 \
|
||||
--retry 300 \
|
||||
--retry-delay 1 \
|
||||
--retry-max-time 300 \
|
||||
--retry-connrefused \
|
||||
'http://localhost:9695' > /dev/null
|
||||
|
||||
config:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI and run the application
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
path: packages/nhost-js
|
||||
start: true
|
||||
config: |
|
||||
services:
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.15.0
|
||||
- name: should find the injected hasura-auth version
|
||||
run: |
|
||||
VERSION=$(curl -sSf 'http://localhost:1337/v1/auth/version')
|
||||
EXPECTED_VERSION='{"version":"v0.15.0"}'
|
||||
if [ "$VERSION" != "$EXPECTED_VERSION" ]; then
|
||||
echo "Expected version $EXPECTED_VERSION but got $VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install the Nhost CLI
|
||||
uses: ./.github/actions/nhost-cli
|
||||
with:
|
||||
version: v0.8.10
|
||||
- name: should find the correct version
|
||||
run: nhost version | head -n 1 | grep v0.8.10 || exit 1
|
||||
@@ -1,5 +1,40 @@
|
||||
# @nhost/dashboard
|
||||
|
||||
## 0.7.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 80b604ad: fix(dashboard): use correct Hasura slug
|
||||
|
||||
## 0.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2d2beb53: fix(dashboard): prevent error on GraphQL page
|
||||
- ac8efcbd: chore(dashboard): deprecate old DNS name
|
||||
|
||||
## 0.7.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(dashboard): remove unused dependencies
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- db57572f: fix(dashboard): correct section paddings when no env vars
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
- @nhost/react-apollo@4.9.2
|
||||
- @nhost/nextjs@1.9.3
|
||||
|
||||
## 0.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 34d85e54: chore(deps): update dependency critters to ^0.0.16
|
||||
- 9b93cf95: chore(deps): update dependency @netlify/functions to ^0.11.0
|
||||
- e0439030: chore(deps): update dependency @types/react-dom to v18.0.9
|
||||
- Updated dependencies [82124329]
|
||||
- @nhost/nextjs@1.9.2
|
||||
|
||||
## 0.7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
@@ -25,7 +25,7 @@
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@fontsource/inter": "^4.5.14",
|
||||
"@fontsource/roboto-mono": "^4.5.8",
|
||||
"@graphiql/react": "^0.14.0",
|
||||
"@graphiql/react": "^0.15.0",
|
||||
"@graphiql/toolkit": "^0.8.0",
|
||||
"@headlessui/react": "^1.6.5",
|
||||
"@heroicons/react": "^1.0.6",
|
||||
@@ -34,12 +34,14 @@
|
||||
"@mui/material": "^5.10.14",
|
||||
"@mui/system": "^5.10.14",
|
||||
"@mui/x-date-pickers": "^5.0.8",
|
||||
"@nhost/core": "^0.9.4",
|
||||
"@nhost/nextjs": "^1.9.1",
|
||||
"@nhost/nhost-js": "^1.6.2",
|
||||
"@nhost/react": "^0.15.1",
|
||||
"@nhost/react-apollo": "^4.9.1",
|
||||
"@nhost/core": "workspace:*",
|
||||
"@nhost/nextjs": "workspace:*",
|
||||
"@nhost/nhost-js": "workspace:*",
|
||||
"@nhost/react": "workspace:*",
|
||||
"@nhost/react-apollo": "workspace:*",
|
||||
"@segment/snippet": "^4.15.3",
|
||||
"@stripe/react-stripe-js": "^1.10.0",
|
||||
"@stripe/stripe-js": "^1.35.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@tanstack/react-query": "^4.16.1",
|
||||
"@tanstack/react-table": "^8.5.30",
|
||||
@@ -51,21 +53,20 @@
|
||||
"cross-fetch": "^3.1.5",
|
||||
"date-fns": "^2.29.3",
|
||||
"generate-password": "^1.7.0",
|
||||
"graphiql": "^2.1.0",
|
||||
"graphiql": "^2.2.0",
|
||||
"graphql": "^16.6.0",
|
||||
"graphql-request": "^4.3.0",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"graphql-ws": "^5.11.2",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"next": "^12.3.1",
|
||||
"next-seo": "^5.14.1",
|
||||
"node-pg-format": "^1.3.5",
|
||||
"pluralize": "^8.0.0",
|
||||
"prettysize": "^2.0.0",
|
||||
"randomstring": "^1.2.3",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-error-boundary": "^3.1.4",
|
||||
"react-hook-form": "^7.39.5",
|
||||
"react-hot-toast": "^2.4.0",
|
||||
"react-is": "17.0.2",
|
||||
@@ -75,7 +76,6 @@
|
||||
"react-table": "^7.8.0",
|
||||
"sharp": "^0.31.2",
|
||||
"slugify": "^1.6.5",
|
||||
"smartlook-client": "^6.0.0",
|
||||
"stripe": "^10.17.0",
|
||||
"tailwind-merge": "^1.8.0",
|
||||
"utility-types": "^3.10.0",
|
||||
@@ -90,7 +90,6 @@
|
||||
"@graphql-codegen/typescript-graphql-request": "^4.5.1",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.1",
|
||||
"@graphql-codegen/typescript-react-apollo": "^3.3.1",
|
||||
"@netlify/functions": "^0.7.2",
|
||||
"@next/bundle-analyzer": "^12.3.1",
|
||||
"@storybook/addon-actions": "^6.5.13",
|
||||
"@storybook/addon-essentials": "^6.5.13",
|
||||
@@ -101,18 +100,15 @@
|
||||
"@storybook/manager-webpack5": "^6.5.13",
|
||||
"@storybook/react": "^6.5.13",
|
||||
"@storybook/testing-library": "^0.0.13",
|
||||
"@stripe/react-stripe-js": "^1.10.0",
|
||||
"@stripe/stripe-js": "^1.35.0",
|
||||
"@testing-library/dom": "^8.19.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/lodash.debounce": "^4.0.7",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/pluralize": "^0.0.29",
|
||||
"@types/react": "18.0.25",
|
||||
"@types/react-dom": "18.0.8",
|
||||
"@types/react-dom": "18.0.9",
|
||||
"@types/react-table": "^7.7.12",
|
||||
"@types/testing-library__jest-dom": "^5.14.5",
|
||||
"@types/validator": "^13.7.10",
|
||||
@@ -123,10 +119,7 @@
|
||||
"autoprefixer": "^10.4.13",
|
||||
"babel-loader": "^8.3.0",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"concurrently": "^6.3.0",
|
||||
"critters": "^0.0.10",
|
||||
"csstype": "^3.0.10",
|
||||
"dotenv": "^10.0.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
@@ -136,20 +129,17 @@
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-react": "^7.31.11",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"express": "^4.18.2",
|
||||
"express-validator": "^6.14.2",
|
||||
"jsdom": "^20.0.3",
|
||||
"lint-staged": ">=13",
|
||||
"msw": "^0.49.0",
|
||||
"postcss": "^8.4.19",
|
||||
"postmark": "^2.7.8",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-organize-imports": "^3.2.0",
|
||||
"prettier-plugin-tailwindcss": "^0.1.13",
|
||||
"prettier-plugin-tailwindcss": "^0.2.0",
|
||||
"react-date-fns-hooks": "^0.9.4",
|
||||
"react-error-boundary": "^3.1.4",
|
||||
"require-from-string": "^2.0.2",
|
||||
"tailwindcss": "^3.1.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.2.4",
|
||||
|
||||
44
dashboard/public/assets/BR.svg
Normal file
44
dashboard/public/assets/BR.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 19 KiB |
@@ -6,7 +6,7 @@ import ArrowSquareOutIcon from '@/ui/v2/icons/ArrowSquareOutIcon';
|
||||
import Link from '@/ui/v2/Link';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { LOCAL_HASURA_URL } from '@/utils/env';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import Image from 'next/image';
|
||||
|
||||
interface HasuraDataProps {
|
||||
@@ -26,7 +26,11 @@ export function HasuraData({ close }: HasuraDataProps) {
|
||||
const hasuraUrl =
|
||||
process.env.NEXT_PUBLIC_ENV === 'dev'
|
||||
? LOCAL_HASURA_URL
|
||||
: generateRemoteAppUrl(currentApplication.subdomain);
|
||||
: `${generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
)}/console`;
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full max-w-md px-6 py-4 text-left">
|
||||
@@ -60,7 +64,7 @@ export function HasuraData({ close }: HasuraDataProps) {
|
||||
|
||||
<div className="mt-6 grid grid-flow-row gap-2">
|
||||
<Link
|
||||
href={`${hasuraUrl}/console`}
|
||||
href={hasuraUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className="grid grid-flow-col items-center justify-center gap-1 rounded-[4px] bg-btn p-2 text-sm+ font-medium text-white hover:ring-2 motion-safe:transition-all"
|
||||
|
||||
@@ -125,7 +125,10 @@ export default function EnvironmentVariableSettings() {
|
||||
docsLink="https://docs.nhost.io/platform/environment-variables"
|
||||
docsTitle="Environment Variables"
|
||||
rootClassName="gap-0"
|
||||
className="px-0 my-2"
|
||||
className={twMerge(
|
||||
'px-0 my-2',
|
||||
availableEnvironmentVariables.length === 0 && 'gap-2',
|
||||
)}
|
||||
slotProps={{ submitButton: { className: 'hidden' } }}
|
||||
>
|
||||
<div className="grid grid-cols-2 lg:grid-cols-3 gap-2 border-b-1 border-gray-200 px-4 py-3">
|
||||
@@ -134,91 +137,98 @@ export default function EnvironmentVariableSettings() {
|
||||
</div>
|
||||
|
||||
<div className="grid grid-flow-row gap-2">
|
||||
<List>
|
||||
{availableEnvironmentVariables.map((environmentVariable, index) => {
|
||||
const timestamp = formatDistanceToNowStrict(
|
||||
parseISO(environmentVariable.updatedAt),
|
||||
{ addSuffix: true, roundingMethod: 'floor' },
|
||||
);
|
||||
{availableEnvironmentVariables.length > 0 && (
|
||||
<List>
|
||||
{availableEnvironmentVariables.map((environmentVariable, index) => {
|
||||
const timestamp = formatDistanceToNowStrict(
|
||||
parseISO(environmentVariable.updatedAt),
|
||||
{ addSuffix: true, roundingMethod: 'floor' },
|
||||
);
|
||||
|
||||
return (
|
||||
<Fragment key={environmentVariable.id}>
|
||||
<ListItem.Root
|
||||
className="px-4 grid grid-cols-2 lg:grid-cols-3 gap-2"
|
||||
secondaryAction={
|
||||
<Dropdown.Root>
|
||||
<Dropdown.Trigger
|
||||
asChild
|
||||
hideChevron
|
||||
className="absolute right-4 top-1/2 -translate-y-1/2"
|
||||
>
|
||||
<IconButton variant="borderless" color="secondary">
|
||||
<DotsVerticalIcon />
|
||||
</IconButton>
|
||||
</Dropdown.Trigger>
|
||||
|
||||
<Dropdown.Content
|
||||
menu
|
||||
PaperProps={{ className: 'w-32' }}
|
||||
anchorOrigin={{
|
||||
vertical: 'bottom',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
transformOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
>
|
||||
<Dropdown.Item
|
||||
onClick={() => handleOpenEditor(environmentVariable)}
|
||||
return (
|
||||
<Fragment key={environmentVariable.id}>
|
||||
<ListItem.Root
|
||||
className="px-4 grid grid-cols-2 lg:grid-cols-3 gap-2"
|
||||
secondaryAction={
|
||||
<Dropdown.Root>
|
||||
<Dropdown.Trigger
|
||||
asChild
|
||||
hideChevron
|
||||
className="absolute right-4 top-1/2 -translate-y-1/2"
|
||||
>
|
||||
<Text className="font-medium">Edit</Text>
|
||||
</Dropdown.Item>
|
||||
<IconButton variant="borderless" color="secondary">
|
||||
<DotsVerticalIcon />
|
||||
</IconButton>
|
||||
</Dropdown.Trigger>
|
||||
|
||||
<Divider component="li" />
|
||||
|
||||
<Dropdown.Item
|
||||
onClick={() =>
|
||||
handleConfirmDelete(environmentVariable)
|
||||
}
|
||||
<Dropdown.Content
|
||||
menu
|
||||
PaperProps={{ className: 'w-32' }}
|
||||
anchorOrigin={{
|
||||
vertical: 'bottom',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
transformOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
className="font-medium"
|
||||
sx={{
|
||||
color: (theme) => theme.palette.error.main,
|
||||
}}
|
||||
<Dropdown.Item
|
||||
onClick={() =>
|
||||
handleOpenEditor(environmentVariable)
|
||||
}
|
||||
>
|
||||
Delete
|
||||
</Text>
|
||||
</Dropdown.Item>
|
||||
</Dropdown.Content>
|
||||
</Dropdown.Root>
|
||||
}
|
||||
>
|
||||
<ListItem.Text className="truncate">
|
||||
{environmentVariable.name}
|
||||
</ListItem.Text>
|
||||
<Text className="font-medium">Edit</Text>
|
||||
</Dropdown.Item>
|
||||
|
||||
<Text variant="subtitle1" className="lg:col-span-2 truncate">
|
||||
{timestamp === '0 seconds ago' ||
|
||||
timestamp === 'in 0 seconds'
|
||||
? 'Now'
|
||||
: timestamp}
|
||||
</Text>
|
||||
</ListItem.Root>
|
||||
<Divider component="li" />
|
||||
|
||||
<Divider
|
||||
component="li"
|
||||
className={twMerge(
|
||||
index === availableEnvironmentVariables.length - 1
|
||||
? '!mt-4'
|
||||
: '!my-4',
|
||||
)}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
<Dropdown.Item
|
||||
onClick={() =>
|
||||
handleConfirmDelete(environmentVariable)
|
||||
}
|
||||
>
|
||||
<Text
|
||||
className="font-medium"
|
||||
sx={{
|
||||
color: (theme) => theme.palette.error.main,
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
</Text>
|
||||
</Dropdown.Item>
|
||||
</Dropdown.Content>
|
||||
</Dropdown.Root>
|
||||
}
|
||||
>
|
||||
<ListItem.Text className="truncate">
|
||||
{environmentVariable.name}
|
||||
</ListItem.Text>
|
||||
|
||||
<Text
|
||||
variant="subtitle1"
|
||||
className="lg:col-span-2 truncate"
|
||||
>
|
||||
{timestamp === '0 seconds ago' ||
|
||||
timestamp === 'in 0 seconds'
|
||||
? 'Now'
|
||||
: timestamp}
|
||||
</Text>
|
||||
</ListItem.Root>
|
||||
|
||||
<Divider
|
||||
component="li"
|
||||
className={twMerge(
|
||||
index === availableEnvironmentVariables.length - 1
|
||||
? '!mt-4'
|
||||
: '!my-4',
|
||||
)}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
)}
|
||||
|
||||
<Button
|
||||
className="justify-self-start mx-4"
|
||||
|
||||
@@ -14,7 +14,7 @@ import List from '@/ui/v2/List';
|
||||
import { ListItem } from '@/ui/v2/ListItem';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { LOCAL_HASURA_URL } from '@/utils/env';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl, generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { useGetAppInjectedVariablesQuery } from '@/utils/__generated__/graphql';
|
||||
import { Fragment, useState } from 'react';
|
||||
|
||||
@@ -71,11 +71,6 @@ export default function SystemEnvironmentVariableSettings() {
|
||||
});
|
||||
}
|
||||
|
||||
const hasuraUrl =
|
||||
process.env.NEXT_PUBLIC_ENV === 'dev'
|
||||
? LOCAL_HASURA_URL
|
||||
: generateRemoteAppUrl(currentApplication.subdomain);
|
||||
|
||||
const systemEnvironmentVariables = [
|
||||
{
|
||||
key: 'NHOST_BACKEND_URL',
|
||||
@@ -83,7 +78,17 @@ export default function SystemEnvironmentVariableSettings() {
|
||||
},
|
||||
{ key: 'NHOST_SUBDOMAIN', value: currentApplication.subdomain },
|
||||
{ key: 'NHOST_REGION', value: currentApplication.region.awsName },
|
||||
{ key: 'NHOST_HASURA_URL', value: `${hasuraUrl}/console` },
|
||||
{
|
||||
key: 'NHOST_HASURA_URL',
|
||||
value:
|
||||
process.env.NEXT_PUBLIC_ENV === 'dev'
|
||||
? LOCAL_HASURA_URL
|
||||
: `${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
currentApplication.region.awsName,
|
||||
'hasura',
|
||||
)}/console`,
|
||||
},
|
||||
{ key: 'NHOST_AUTH_URL', value: appClient.auth.url },
|
||||
{ key: 'NHOST_GRAPHQL_URL', value: appClient.graphql.url },
|
||||
{ key: 'NHOST_STORAGE_URL', value: appClient.storage.url },
|
||||
|
||||
@@ -11,7 +11,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -168,9 +168,11 @@ export default function AppleProviderSettings() {
|
||||
<Input
|
||||
name="redirectUrl"
|
||||
id="redirectUrl"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/apple/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/apple/callback`}
|
||||
className="col-span-2"
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
@@ -185,9 +187,11 @@ export default function AppleProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/apple/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/apple/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function DiscordProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/discord/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/discord/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function DiscordProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/discord/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/discord/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function FacebookProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/facebook/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/facebook/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function FacebookProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/facebook/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/facebook/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function GitHubProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/github/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/github/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function GitHubProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/github/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/github/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function GoogleProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/google/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/google/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function GoogleProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/google/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/google/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function LinkedInProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/linkedin/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/linkedin/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function LinkedInProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/linkedin/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/linkedin/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
import { useDialog } from '@/components/common/DialogProvider';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { Alert } from '@/ui/Alert';
|
||||
import Button from '@/ui/v2/Button';
|
||||
import ArrowSquareOutIcon from '@/ui/v2/icons/ArrowSquareOutIcon';
|
||||
import Link from '@/ui/v2/Link';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { useConfirmProvidersUpdatedMutation } from '@/utils/__generated__/graphql';
|
||||
import { useState } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
|
||||
export default function ProvidersUpdatedAlert() {
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const { openAlertDialog } = useDialog();
|
||||
const [confirmed, setConfirmed] = useState(true);
|
||||
|
||||
const [confirmProvidersUpdated] = useConfirmProvidersUpdatedMutation({
|
||||
variables: { id: currentApplication?.id },
|
||||
});
|
||||
|
||||
async function handleSubmitConfirmation() {
|
||||
const confirmProvidersUpdatedPromise = confirmProvidersUpdated();
|
||||
|
||||
await toast.promise(
|
||||
confirmProvidersUpdatedPromise,
|
||||
{
|
||||
loading: 'Confirming...',
|
||||
success: 'Your settings have been updated successfully.',
|
||||
error: 'An error occurred while trying to confirm the message.',
|
||||
},
|
||||
toastStyleProps,
|
||||
);
|
||||
|
||||
setConfirmed(false);
|
||||
}
|
||||
|
||||
function handleOpenConfirmationDialog() {
|
||||
openAlertDialog({
|
||||
title: 'Confirm all providers updated?',
|
||||
payload: (
|
||||
<Text variant="subtitle1" component="span">
|
||||
Please make sure to update all providers before continuing. Your
|
||||
sign-in flows might break if you don't.
|
||||
</Text>
|
||||
),
|
||||
props: {
|
||||
onPrimaryAction: handleSubmitConfirmation,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (!confirmed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Alert className="grid items-center grid-flow-row gap-2 p-4 place-items-center lg:grid-flow-col lg:place-content-between bg-amber-500">
|
||||
<div className="grid grid-flow-row gap-1 text-left">
|
||||
<Text className="font-semibold">
|
||||
Please update the Redirect URL for all providers being used
|
||||
</Text>
|
||||
|
||||
<Text className="text-sm+">
|
||||
We are deprecating your project's old DNS name in favor of
|
||||
individual DNS names for each service. Please make sure to update your
|
||||
providers to use the new auth specific URL under <b>Redirect URL</b>{' '}
|
||||
before the 1st of February 2023.{' '}
|
||||
<Link
|
||||
href="https://github.com/nhost/nhost/discussions/1319"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
underline="hover"
|
||||
className="font-medium"
|
||||
>
|
||||
Read the discussion here.
|
||||
<ArrowSquareOutIcon className="w-4 h-4 ml-1" />
|
||||
</Link>
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
<Button variant="borderless" onClick={handleOpenConfirmationDialog}>
|
||||
I have updated all Redirect URLs
|
||||
</Button>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './ProvidersUpdatedAlert';
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function SpotifyProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/spotify/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/spotify/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function SpotifyProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/spotify/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/spotify/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -112,9 +112,11 @@ export default function TwitchProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/twitch/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/twitch/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -125,9 +127,11 @@ export default function TwitchProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/twitch/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/twitch/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -11,7 +11,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -125,9 +125,11 @@ export default function TwitterProviderSettings() {
|
||||
<Input
|
||||
name="redirectUrl"
|
||||
id="redirectUrl"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/twitter/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/twitter/callback`}
|
||||
className="col-span-2"
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
@@ -142,9 +144,11 @@ export default function TwitterProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/twitter/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/twitter/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -111,9 +111,11 @@ export default function WindowsLiveProviderSettings() {
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
label="Redirect URL"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/microsoft/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/microsoft/callback`}
|
||||
disabled
|
||||
endAdornment={
|
||||
<InputAdornment position="end" className="absolute right-2">
|
||||
@@ -124,9 +126,11 @@ export default function WindowsLiveProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/microsoft/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/microsoft/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -11,7 +11,7 @@ import CopyIcon from '@/ui/v2/icons/CopyIcon';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import InputAdornment from '@/ui/v2/InputAdornment';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { toastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
@@ -163,9 +163,11 @@ export default function WorkOsProviderSettings() {
|
||||
<Input
|
||||
name="redirectUrl"
|
||||
id="redirectUrl"
|
||||
defaultValue={`${generateRemoteAppUrl(
|
||||
defaultValue={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/workos/callback`}
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/workos/callback`}
|
||||
className="col-span-6"
|
||||
fullWidth
|
||||
hideEmptyHelperText
|
||||
@@ -180,9 +182,11 @@ export default function WorkOsProviderSettings() {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
copy(
|
||||
`${generateRemoteAppUrl(
|
||||
`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/auth/signin/provider/workos/callback`,
|
||||
currentApplication.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signin/provider/workos/callback`,
|
||||
'Redirect URL',
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Modal } from '@/ui/Modal';
|
||||
import Button from '@/ui/v2/Button';
|
||||
import Input from '@/ui/v2/Input';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { triggerToast } from '@/utils/toast';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
import axios from 'axios';
|
||||
@@ -43,9 +43,11 @@ export function AddUserModal({ modalIsOpen, setModalIsOpen }: any) {
|
||||
return;
|
||||
}
|
||||
|
||||
const signUpUrl = `${generateRemoteAppUrl(
|
||||
const signUpUrl = `${generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
)}/v1/auth/signup/email-password`;
|
||||
currentApplication?.region.awsName,
|
||||
'auth',
|
||||
)}/v1/signup/email-password`;
|
||||
|
||||
try {
|
||||
await axios.post(signUpUrl, {
|
||||
|
||||
@@ -7,6 +7,7 @@ fragment GetAppByWorkspaceAndName on apps {
|
||||
name
|
||||
createdAt
|
||||
isProvisioned
|
||||
providersUpdated
|
||||
githubRepository {
|
||||
id
|
||||
name
|
||||
|
||||
5
dashboard/src/gql/settings/confirmProvidersUpdated.gql
Normal file
5
dashboard/src/gql/settings/confirmProvidersUpdated.gql
Normal file
@@ -0,0 +1,5 @@
|
||||
mutation confirmProvidersUpdated($id: uuid!) {
|
||||
updateApp(pk_columns: { id: $id }, _set: { providersUpdated: true }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ query getOneUser($userId: uuid!) {
|
||||
createdAt
|
||||
desiredState
|
||||
nhostBaseFolder
|
||||
providersUpdated
|
||||
featureFlags {
|
||||
description
|
||||
id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -38,7 +38,11 @@ export default function useCreateColumnMutation({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? createColumn : createColumnMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -40,7 +40,11 @@ export default function useCreateRecordMutation<TData extends object = {}>({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
const mutation = useMutation(
|
||||
(variables) =>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -36,7 +36,11 @@ export default function useCreateTableMutation({
|
||||
} = useRouter();
|
||||
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? createTable : createTableMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -38,7 +38,11 @@ export default function useDatabaseQuery(
|
||||
isReady,
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
const query = useQuery<FetchDatabaseReturnType>(
|
||||
queryKey,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -39,7 +39,11 @@ export default function useDeleteColumnMutation({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? deleteColumn : deleteColumnMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -36,7 +36,11 @@ export default function useDeleteRecordMutation({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
const mutation = useMutation(
|
||||
(variables) =>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -34,7 +34,11 @@ export default function useDeleteTableMutation({
|
||||
query: { dataSourceSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? deleteTable : deleteTableMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -39,7 +39,11 @@ export default function useMetadataQuery(
|
||||
isReady,
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
const query = useQuery<FetchMetadataReturnType>(
|
||||
queryKey,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -39,7 +39,11 @@ export default function useTableQuery(
|
||||
isReady,
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
return useQuery<FetchTableReturnType>(
|
||||
queryKey,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -34,7 +34,11 @@ export default function useTrackForeignKeyRelationMutation({
|
||||
query: { dataSourceSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform
|
||||
? trackForeignKeyRelations
|
||||
: trackForeignKeyRelationsMigration;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -35,7 +35,11 @@ export default function useTrackTableMutation({
|
||||
query: { dataSourceSlug, schemaSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? trackTable : trackTableMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -39,7 +39,11 @@ export default function useUpdateColumnMutation({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? updateColumn : updateColumnMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -40,7 +40,11 @@ export default function useUpdateRecordMutation<TData extends object = {}>({
|
||||
query: { dataSourceSlug, schemaSlug, tableSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
|
||||
const mutation = useMutation(
|
||||
(variables) =>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useIsPlatform from '@/hooks/common/useIsPlatform';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type { MutationOptions } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -35,7 +35,11 @@ export default function useUpdateTableMutation({
|
||||
query: { dataSourceSlug, schemaSlug },
|
||||
} = useRouter();
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const appUrl = generateRemoteAppUrl(currentApplication?.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region.awsName,
|
||||
'hasura',
|
||||
);
|
||||
const mutationFn = isPlatform ? updateTable : updateTableMigration;
|
||||
|
||||
const mutation = useMutation(
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import type { QueryError, QueryResult } from '@/types/data-browser';
|
||||
import normalizeQueryError from '@/utils/dataBrowser/normalizeQueryError';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
|
||||
export interface FetchProjectDatabaseSizeOptions {
|
||||
/**
|
||||
* Project subdomain.
|
||||
*/
|
||||
subdomain: string;
|
||||
/**
|
||||
* Project region.
|
||||
*/
|
||||
region: string;
|
||||
/**
|
||||
* Admin secret for the project.
|
||||
*/
|
||||
@@ -25,24 +29,26 @@ export interface FetchProjectDatabaseSizeReturnType {
|
||||
*/
|
||||
export default async function fetchProjectDatabaseSize({
|
||||
subdomain,
|
||||
region,
|
||||
adminSecret,
|
||||
}: FetchProjectDatabaseSizeOptions): Promise<FetchProjectDatabaseSizeReturnType> {
|
||||
const appEndpoint = `${generateRemoteAppUrl(subdomain)}/v2/query`;
|
||||
|
||||
const response = await fetch(appEndpoint, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'x-hasura-admin-secret': adminSecret,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: 'run_sql',
|
||||
args: {
|
||||
sql: `SELECT pg_database_size('${
|
||||
subdomain === 'localhost' ? 'postgres' : subdomain
|
||||
}');`,
|
||||
const response = await fetch(
|
||||
`${generateAppServiceUrl(subdomain, region, 'hasura')}/v2/query`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'x-hasura-admin-secret': adminSecret,
|
||||
},
|
||||
}),
|
||||
});
|
||||
body: JSON.stringify({
|
||||
type: 'run_sql',
|
||||
args: {
|
||||
sql: `SELECT pg_database_size('${
|
||||
subdomain === 'localhost' ? 'postgres' : subdomain
|
||||
}');`,
|
||||
},
|
||||
}),
|
||||
},
|
||||
);
|
||||
|
||||
const responseData: QueryResult<string[]> | QueryError =
|
||||
await response.json();
|
||||
|
||||
@@ -22,6 +22,7 @@ export default function useDatabaseSizeOfApplication(
|
||||
() =>
|
||||
fetchProjectDatabaseSize({
|
||||
subdomain: currentApplication?.subdomain,
|
||||
region: currentApplication?.region.awsName,
|
||||
adminSecret: currentApplication?.hasuraGraphqlAdminSecret,
|
||||
}),
|
||||
{
|
||||
|
||||
@@ -47,6 +47,7 @@ export function useCurrentWorkspaceAndApplication(): UseCurrentWorkspaceAndAppli
|
||||
createdAt: new Date().toISOString(),
|
||||
desiredState: ApplicationStatus.Live,
|
||||
featureFlags: [],
|
||||
providersUpdated: true,
|
||||
};
|
||||
|
||||
setCurrentWorkspaceAndApplication({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import type {
|
||||
Files_Order_By as FilesOrderBy,
|
||||
GetFilesQuery,
|
||||
@@ -66,9 +66,11 @@ export default function useFiles({
|
||||
init: RequestInit,
|
||||
size?: { width?: number; height?: number },
|
||||
) => {
|
||||
const fetchUrl = `${generateRemoteAppUrl(
|
||||
const fetchUrl = `${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/storage/files/${file.id}`;
|
||||
currentApplication.region.awsName,
|
||||
'storage',
|
||||
)}/v1/files/${file.id}`;
|
||||
|
||||
const fetchParams = new URLSearchParams();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
@@ -15,9 +15,11 @@ export function useRemoteApplicationGQLClient() {
|
||||
new ApolloClient({
|
||||
cache: new InMemoryCache(),
|
||||
link: new HttpLink({
|
||||
uri: `${generateRemoteAppUrl(
|
||||
uri: `${generateAppServiceUrl(
|
||||
currentApplication?.subdomain,
|
||||
)}/v1/graphql`,
|
||||
currentApplication?.region.awsName,
|
||||
'graphql',
|
||||
)}/v1`,
|
||||
headers: {
|
||||
'x-hasura-admin-secret':
|
||||
process.env.NEXT_PUBLIC_ENV === 'dev'
|
||||
@@ -28,6 +30,7 @@ export function useRemoteApplicationGQLClient() {
|
||||
}),
|
||||
[
|
||||
currentApplication?.subdomain,
|
||||
currentApplication?.region,
|
||||
currentApplication?.hasuraGraphqlAdminSecret,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ import DelayedLoading from '@/ui/DelayedLoading';
|
||||
import { Modal } from '@/ui/Modal';
|
||||
import Status, { StatusEnum } from '@/ui/Status';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { useGetAppFunctionsMetadataQuery } from '@/utils/__generated__/graphql';
|
||||
import { ChevronRightIcon } from '@heroicons/react/solid';
|
||||
import clsx from 'clsx';
|
||||
@@ -252,9 +252,11 @@ export default function FunctionsPage() {
|
||||
<div className="text-center">
|
||||
<Text size="tiny" color="greyscaleDark" className="font-medium">
|
||||
Base URL for function endpoints is{' '}
|
||||
{`${generateRemoteAppUrl(
|
||||
{`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/functions/`}
|
||||
currentApplication.region.awsName,
|
||||
'functions',
|
||||
)}/v1`}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ import ProjectLayout from '@/components/layout/ProjectLayout';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { useGetAllUserWorkspacesAndApplications } from '@/hooks/useGetAllUserWorkspacesAndApplications';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { generateRemoteAppUrl, yieldFunction } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl, yieldFunction } from '@/utils/helpers';
|
||||
import { useGetAppFunctionsMetadataQuery } from '@/utils/__generated__/graphql';
|
||||
import Image from 'next/image';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -84,15 +84,19 @@ export default function FunctionDetailsPage() {
|
||||
</Text>
|
||||
<a
|
||||
className="ml-2 text-xs font-medium text-greyscaleGrey"
|
||||
href={`${generateRemoteAppUrl(
|
||||
href={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/functions${currentFunction?.route}`}
|
||||
currentApplication.region.awsName,
|
||||
'functions',
|
||||
)}/v1${currentFunction?.route}`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{`${generateRemoteAppUrl(
|
||||
{`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/functions${currentFunction?.route}`}
|
||||
currentApplication.region.awsName,
|
||||
'functions',
|
||||
)}/v1${currentFunction?.route}`}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ import PlayIcon from '@/ui/v2/icons/PlayIcon';
|
||||
import Option from '@/ui/v2/Option';
|
||||
import Select from '@/ui/v2/Select';
|
||||
import Tooltip from '@/ui/v2/Tooltip';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { triggerToast } from '@/utils/toast';
|
||||
import {
|
||||
DOC_EXPLORER_PLUGIN,
|
||||
@@ -260,11 +260,15 @@ export default function GraphQLPage() {
|
||||
return <LoadingScreen />;
|
||||
}
|
||||
|
||||
const appUrl = generateRemoteAppUrl(currentApplication.subdomain);
|
||||
const appUrl = generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
currentApplication.region.awsName,
|
||||
'graphql',
|
||||
);
|
||||
|
||||
const subscriptionUrl = `${appUrl
|
||||
.replace('https', 'wss')
|
||||
.replace('http', 'ws')}/v1/graphql`;
|
||||
.replace('http', 'ws')}/v1`;
|
||||
|
||||
const headers = {
|
||||
'content-type': 'application/json',
|
||||
@@ -273,7 +277,7 @@ export default function GraphQLPage() {
|
||||
};
|
||||
|
||||
const fetcher = createGraphiQLFetcher({
|
||||
url: `${appUrl}/v1/graphql`,
|
||||
url: `${appUrl}/v1`,
|
||||
headers,
|
||||
wsClient: createClient({
|
||||
url: subscriptionUrl,
|
||||
|
||||
@@ -9,6 +9,7 @@ import GitHubProviderSettings from '@/components/settings/signInMethods/GitHubPr
|
||||
import GoogleProviderSettings from '@/components/settings/signInMethods/GoogleProviderSettings';
|
||||
import LinkedInProviderSettings from '@/components/settings/signInMethods/LinkedInProviderSettings';
|
||||
import MagicLinkSettings from '@/components/settings/signInMethods/MagicLinkSettings';
|
||||
import ProvidersUpdatedAlert from '@/components/settings/signInMethods/ProvidersUpdatedAlert';
|
||||
import SMSSettings from '@/components/settings/signInMethods/SMSSettings';
|
||||
import SpotifyProviderSettings from '@/components/settings/signInMethods/SpotifyProviderSettings';
|
||||
import TwitchProviderSettings from '@/components/settings/signInMethods/TwitchProviderSettings';
|
||||
@@ -55,6 +56,7 @@ export default function SettingsSignInMethodsPage() {
|
||||
<WebAuthnSettings />
|
||||
<AnonymousSignInSettings />
|
||||
<SMSSettings />
|
||||
{!currentApplication.providersUpdated && <ProvidersUpdatedAlert />}
|
||||
<AppleProviderSettings />
|
||||
<DiscordProviderSettings />
|
||||
<FacebookProviderSettings />
|
||||
|
||||
@@ -3,7 +3,7 @@ import RetryableErrorBoundary from '@/components/common/RetryableErrorBoundary';
|
||||
import FilesDataGrid from '@/components/files/FilesDataGrid';
|
||||
import ProjectLayout from '@/components/layout/ProjectLayout';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { NhostApolloProvider } from '@nhost/react-apollo';
|
||||
import type { ReactElement } from 'react';
|
||||
|
||||
@@ -16,9 +16,11 @@ export default function StoragePage() {
|
||||
|
||||
return (
|
||||
<NhostApolloProvider
|
||||
graphqlUrl={`${generateRemoteAppUrl(
|
||||
currentApplication?.subdomain,
|
||||
)}/v1/graphql`}
|
||||
graphqlUrl={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
currentApplication.region.awsName,
|
||||
'graphql',
|
||||
)}/v1`}
|
||||
fetchPolicy="cache-first"
|
||||
headers={{
|
||||
'x-hasura-admin-secret':
|
||||
|
||||
@@ -20,7 +20,7 @@ import Option from '@/ui/v2/Option';
|
||||
import Select from '@/ui/v2/Select';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { copy } from '@/utils/copy';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { triggerToast } from '@/utils/toast';
|
||||
import type {
|
||||
GetRemoteAppUserAuthRolesFragment,
|
||||
@@ -629,9 +629,11 @@ export default function UserDetailsByIdPage() {
|
||||
|
||||
return (
|
||||
<NhostApolloProvider
|
||||
graphqlUrl={`${generateRemoteAppUrl(
|
||||
graphqlUrl={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/graphql`}
|
||||
currentApplication.region.awsName,
|
||||
'graphql',
|
||||
)}/v1`}
|
||||
fetchPolicy="cache-first"
|
||||
headers={{
|
||||
'x-hasura-admin-secret':
|
||||
|
||||
@@ -3,7 +3,7 @@ import Container from '@/components/layout/Container';
|
||||
import ProjectLayout from '@/components/layout/ProjectLayout';
|
||||
import UsersList from '@/components/users/UsersList';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import { generateRemoteAppUrl } from '@/utils/helpers';
|
||||
import { generateAppServiceUrl } from '@/utils/helpers';
|
||||
import { NhostApolloProvider } from '@nhost/react-apollo';
|
||||
import type { ReactElement } from 'react';
|
||||
|
||||
@@ -16,9 +16,11 @@ export default function UsersPage() {
|
||||
|
||||
return (
|
||||
<NhostApolloProvider
|
||||
graphqlUrl={`${generateRemoteAppUrl(
|
||||
graphqlUrl={`${generateAppServiceUrl(
|
||||
currentApplication.subdomain,
|
||||
)}/v1/graphql`}
|
||||
currentApplication.region.awsName,
|
||||
'graphql',
|
||||
)}/v1`}
|
||||
fetchPolicy="cache-first"
|
||||
headers={{
|
||||
'x-hasura-admin-secret':
|
||||
|
||||
@@ -76,6 +76,7 @@ export type Application = {
|
||||
desiredState: DesiredState;
|
||||
nhostBaseFolder?: string;
|
||||
featureFlags: FeatureFlag[];
|
||||
providersUpdated: boolean;
|
||||
};
|
||||
|
||||
export type CustomClaim = {
|
||||
|
||||
66
dashboard/src/utils/__generated__/graphql.ts
generated
66
dashboard/src/utils/__generated__/graphql.ts
generated
@@ -884,6 +884,7 @@ export type Apps = {
|
||||
postgresSchemaMigrationUser?: Maybe<Scalars['String']>;
|
||||
postgresUser?: Maybe<Scalars['String']>;
|
||||
postgresVersion: Scalars['String'];
|
||||
providersUpdated?: Maybe<Scalars['Boolean']>;
|
||||
/** An object relationship */
|
||||
region: Regions;
|
||||
regionId: Scalars['uuid'];
|
||||
@@ -1262,6 +1263,7 @@ export type Apps_Bool_Exp = {
|
||||
postgresSchemaMigrationUser?: InputMaybe<String_Comparison_Exp>;
|
||||
postgresUser?: InputMaybe<String_Comparison_Exp>;
|
||||
postgresVersion?: InputMaybe<String_Comparison_Exp>;
|
||||
providersUpdated?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
region?: InputMaybe<Regions_Bool_Exp>;
|
||||
regionId?: InputMaybe<Uuid_Comparison_Exp>;
|
||||
repositoryProductionBranch?: InputMaybe<String_Comparison_Exp>;
|
||||
@@ -1453,6 +1455,7 @@ export type Apps_Insert_Input = {
|
||||
postgresSchemaMigrationUser?: InputMaybe<Scalars['String']>;
|
||||
postgresUser?: InputMaybe<Scalars['String']>;
|
||||
postgresVersion?: InputMaybe<Scalars['String']>;
|
||||
providersUpdated?: InputMaybe<Scalars['Boolean']>;
|
||||
region?: InputMaybe<Regions_Obj_Rel_Insert_Input>;
|
||||
regionId?: InputMaybe<Scalars['uuid']>;
|
||||
repositoryProductionBranch?: InputMaybe<Scalars['String']>;
|
||||
@@ -2070,6 +2073,7 @@ export type Apps_Order_By = {
|
||||
postgresSchemaMigrationUser?: InputMaybe<Order_By>;
|
||||
postgresUser?: InputMaybe<Order_By>;
|
||||
postgresVersion?: InputMaybe<Order_By>;
|
||||
providersUpdated?: InputMaybe<Order_By>;
|
||||
region?: InputMaybe<Regions_Order_By>;
|
||||
regionId?: InputMaybe<Order_By>;
|
||||
repositoryProductionBranch?: InputMaybe<Order_By>;
|
||||
@@ -2354,6 +2358,8 @@ export enum Apps_Select_Column {
|
||||
/** column name */
|
||||
PostgresVersion = 'postgresVersion',
|
||||
/** column name */
|
||||
ProvidersUpdated = 'providersUpdated',
|
||||
/** column name */
|
||||
RegionId = 'regionId',
|
||||
/** column name */
|
||||
RepositoryProductionBranch = 'repositoryProductionBranch',
|
||||
@@ -2432,7 +2438,9 @@ export enum Apps_Select_Column_Apps_Aggregate_Bool_Exp_Bool_And_Arguments_Column
|
||||
/** column name */
|
||||
Paused = 'paused',
|
||||
/** column name */
|
||||
PostgresPublicAccess = 'postgresPublicAccess'
|
||||
PostgresPublicAccess = 'postgresPublicAccess',
|
||||
/** column name */
|
||||
ProvidersUpdated = 'providersUpdated'
|
||||
}
|
||||
|
||||
/** select "apps_aggregate_bool_exp_bool_or_arguments_columns" columns of table "apps" */
|
||||
@@ -2496,7 +2504,9 @@ export enum Apps_Select_Column_Apps_Aggregate_Bool_Exp_Bool_Or_Arguments_Columns
|
||||
/** column name */
|
||||
Paused = 'paused',
|
||||
/** column name */
|
||||
PostgresPublicAccess = 'postgresPublicAccess'
|
||||
PostgresPublicAccess = 'postgresPublicAccess',
|
||||
/** column name */
|
||||
ProvidersUpdated = 'providersUpdated'
|
||||
}
|
||||
|
||||
/** input type for updating data in table "apps" */
|
||||
@@ -2632,6 +2642,7 @@ export type Apps_Set_Input = {
|
||||
postgresSchemaMigrationUser?: InputMaybe<Scalars['String']>;
|
||||
postgresUser?: InputMaybe<Scalars['String']>;
|
||||
postgresVersion?: InputMaybe<Scalars['String']>;
|
||||
providersUpdated?: InputMaybe<Scalars['Boolean']>;
|
||||
regionId?: InputMaybe<Scalars['uuid']>;
|
||||
repositoryProductionBranch?: InputMaybe<Scalars['String']>;
|
||||
slug?: InputMaybe<Scalars['String']>;
|
||||
@@ -2840,6 +2851,7 @@ export type Apps_Stream_Cursor_Value_Input = {
|
||||
postgresSchemaMigrationUser?: InputMaybe<Scalars['String']>;
|
||||
postgresUser?: InputMaybe<Scalars['String']>;
|
||||
postgresVersion?: InputMaybe<Scalars['String']>;
|
||||
providersUpdated?: InputMaybe<Scalars['Boolean']>;
|
||||
regionId?: InputMaybe<Scalars['uuid']>;
|
||||
repositoryProductionBranch?: InputMaybe<Scalars['String']>;
|
||||
slug?: InputMaybe<Scalars['String']>;
|
||||
@@ -3130,6 +3142,8 @@ export enum Apps_Update_Column {
|
||||
/** column name */
|
||||
PostgresVersion = 'postgresVersion',
|
||||
/** column name */
|
||||
ProvidersUpdated = 'providersUpdated',
|
||||
/** column name */
|
||||
RegionId = 'regionId',
|
||||
/** column name */
|
||||
RepositoryProductionBranch = 'repositoryProductionBranch',
|
||||
@@ -17042,7 +17056,7 @@ export type GetAppQueryVariables = Exact<{
|
||||
|
||||
export type GetAppQuery = { __typename?: 'query_root', app?: { __typename?: 'apps', id: any, slug: string, subdomain: string, name: string, createdAt: any, authEmailSigninEmailVerifiedRequired: boolean, authPasswordHibpEnabled: boolean, authEmailPasswordlessEnabled: boolean, authSmsPasswordlessEnabled: boolean, authWebAuthnEnabled: boolean, authClientUrl: string, authEmailTemplateFetchUrl?: string | null, authAccessControlAllowedEmails: string, authAccessControlAllowedEmailDomains: string, authAccessControlBlockedEmails: string, authAccessControlBlockedEmailDomains: string, authAccessControlAllowedRedirectUrls: string, authGithubEnabled: boolean, authGithubClientId: string, authGithubClientSecret: string, authGoogleEnabled: boolean, authGoogleClientId: string, authGoogleClientSecret: string, authFacebookEnabled: boolean, authFacebookClientId: string, authFacebookClientSecret: string, authLinkedinEnabled: boolean, authLinkedinClientId: string, authLinkedinClientSecret: string, authTwitterEnabled: boolean, authTwitterConsumerKey: string, authTwitterConsumerSecret: string, authAppleEnabled: boolean, authAppleTeamId: string, authAppleKeyId: string, authAppleClientId: string, authApplePrivateKey: string, authAppleScope: string, authWindowsLiveEnabled: boolean, authWindowsLiveClientId: string, authWindowsLiveClientSecret: string, authSpotifyEnabled: boolean, authSpotifyClientId: string, authSpotifyClientSecret: string, authWorkOsEnabled: boolean, authWorkOsClientId: string, authWorkOsClientSecret: string, authWorkOsDefaultDomain: string, authWorkOsDefaultOrganization: string, authWorkOsDefaultConnection: string } | null };
|
||||
|
||||
export type GetAppByWorkspaceAndNameFragment = { __typename?: 'apps', updatedAt: any, id: any, slug: string, subdomain: string, hasuraGraphqlAdminSecret: string, name: string, createdAt: any, isProvisioned: boolean, repositoryProductionBranch: string, githubRepositoryId?: any | null, workspaceId: any, githubRepository?: { __typename?: 'githubRepositories', id: any, name: string, githubAppInstallation: { __typename?: 'githubAppInstallations', id: any, accountLogin?: string | null } } | null, region: { __typename?: 'regions', countryCode: string, city: string }, workspace: { __typename?: 'workspaces', name: string, slug: string, id: any } };
|
||||
export type GetAppByWorkspaceAndNameFragment = { __typename?: 'apps', updatedAt: any, id: any, slug: string, subdomain: string, hasuraGraphqlAdminSecret: string, name: string, createdAt: any, isProvisioned: boolean, providersUpdated?: boolean | null, repositoryProductionBranch: string, githubRepositoryId?: any | null, workspaceId: any, githubRepository?: { __typename?: 'githubRepositories', id: any, name: string, githubAppInstallation: { __typename?: 'githubAppInstallations', id: any, accountLogin?: string | null } } | null, region: { __typename?: 'regions', countryCode: string, city: string }, workspace: { __typename?: 'workspaces', name: string, slug: string, id: any } };
|
||||
|
||||
export type GetAppByWorkspaceAndNameQueryVariables = Exact<{
|
||||
workspace: Scalars['String'];
|
||||
@@ -17050,7 +17064,7 @@ export type GetAppByWorkspaceAndNameQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type GetAppByWorkspaceAndNameQuery = { __typename?: 'query_root', apps: Array<{ __typename?: 'apps', updatedAt: any, id: any, slug: string, subdomain: string, hasuraGraphqlAdminSecret: string, name: string, createdAt: any, isProvisioned: boolean, repositoryProductionBranch: string, githubRepositoryId?: any | null, workspaceId: any, githubRepository?: { __typename?: 'githubRepositories', id: any, name: string, githubAppInstallation: { __typename?: 'githubAppInstallations', id: any, accountLogin?: string | null } } | null, region: { __typename?: 'regions', countryCode: string, city: string }, workspace: { __typename?: 'workspaces', name: string, slug: string, id: any } }> };
|
||||
export type GetAppByWorkspaceAndNameQuery = { __typename?: 'query_root', apps: Array<{ __typename?: 'apps', updatedAt: any, id: any, slug: string, subdomain: string, hasuraGraphqlAdminSecret: string, name: string, createdAt: any, isProvisioned: boolean, providersUpdated?: boolean | null, repositoryProductionBranch: string, githubRepositoryId?: any | null, workspaceId: any, githubRepository?: { __typename?: 'githubRepositories', id: any, name: string, githubAppInstallation: { __typename?: 'githubAppInstallations', id: any, accountLogin?: string | null } } | null, region: { __typename?: 'regions', countryCode: string, city: string }, workspace: { __typename?: 'workspaces', name: string, slug: string, id: any } }> };
|
||||
|
||||
export type GetAppCustomClaimsQueryVariables = Exact<{
|
||||
id: Scalars['uuid'];
|
||||
@@ -17498,6 +17512,13 @@ export type DeleteRemoteAppUserRolesMutationVariables = Exact<{
|
||||
|
||||
export type DeleteRemoteAppUserRolesMutation = { __typename?: 'mutation_root', deleteAuthUserRoles?: { __typename?: 'authUserRoles_mutation_response', affected_rows: number } | null };
|
||||
|
||||
export type ConfirmProvidersUpdatedMutationVariables = Exact<{
|
||||
id: Scalars['uuid'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ConfirmProvidersUpdatedMutation = { __typename?: 'mutation_root', updateApp?: { __typename?: 'apps', id: any } | null };
|
||||
|
||||
export type GetDatabaseConnectionInfoQueryVariables = Exact<{
|
||||
id: Scalars['uuid'];
|
||||
}>;
|
||||
@@ -17529,7 +17550,7 @@ export type GetOneUserQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type GetOneUserQuery = { __typename?: 'query_root', user?: { __typename?: 'users', id: any, displayName: string, avatarUrl: string, workspaceMembers: Array<{ __typename?: 'workspaceMembers', id: any, userId: any, workspaceId: any, type: string, workspace: { __typename?: 'workspaces', creatorUserId?: any | null, id: any, slug: string, name: string, apps: Array<{ __typename?: 'apps', id: any, slug: string, name: string, hasuraGraphqlAdminSecret: string, repositoryProductionBranch: string, subdomain: string, isProvisioned: boolean, createdAt: any, desiredState: number, nhostBaseFolder: string, featureFlags: Array<{ __typename?: 'featureFlags', description: string, id: any, name: string, value: string }>, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }>, region: { __typename?: 'regions', id: any, countryCode: string, awsName: string, city: string }, plan: { __typename?: 'plans', id: any, name: string, isFree: boolean }, githubRepository?: { __typename?: 'githubRepositories', fullName: string } | null, deployments: Array<{ __typename?: 'deployments', id: any, commitSHA: string, commitMessage?: string | null, commitUserName?: string | null, deploymentStartedAt?: any | null, deploymentEndedAt?: any | null, commitUserAvatarUrl?: string | null, deploymentStatus?: string | null }> }> } }> } | null };
|
||||
export type GetOneUserQuery = { __typename?: 'query_root', user?: { __typename?: 'users', id: any, displayName: string, avatarUrl: string, workspaceMembers: Array<{ __typename?: 'workspaceMembers', id: any, userId: any, workspaceId: any, type: string, workspace: { __typename?: 'workspaces', creatorUserId?: any | null, id: any, slug: string, name: string, apps: Array<{ __typename?: 'apps', id: any, slug: string, name: string, hasuraGraphqlAdminSecret: string, repositoryProductionBranch: string, subdomain: string, isProvisioned: boolean, createdAt: any, desiredState: number, nhostBaseFolder: string, providersUpdated?: boolean | null, featureFlags: Array<{ __typename?: 'featureFlags', description: string, id: any, name: string, value: string }>, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }>, region: { __typename?: 'regions', id: any, countryCode: string, awsName: string, city: string }, plan: { __typename?: 'plans', id: any, name: string, isFree: boolean }, githubRepository?: { __typename?: 'githubRepositories', fullName: string } | null, deployments: Array<{ __typename?: 'deployments', id: any, commitSHA: string, commitMessage?: string | null, commitUserName?: string | null, deploymentStartedAt?: any | null, deploymentEndedAt?: any | null, commitUserAvatarUrl?: string | null, deploymentStatus?: string | null }> }> } }> } | null };
|
||||
|
||||
export type GetUserAllWorkspacesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -17758,6 +17779,7 @@ export const GetAppByWorkspaceAndNameFragmentDoc = gql`
|
||||
name
|
||||
createdAt
|
||||
isProvisioned
|
||||
providersUpdated
|
||||
githubRepository {
|
||||
id
|
||||
name
|
||||
@@ -20748,6 +20770,39 @@ export function useDeleteRemoteAppUserRolesMutation(baseOptions?: Apollo.Mutatio
|
||||
export type DeleteRemoteAppUserRolesMutationHookResult = ReturnType<typeof useDeleteRemoteAppUserRolesMutation>;
|
||||
export type DeleteRemoteAppUserRolesMutationResult = Apollo.MutationResult<DeleteRemoteAppUserRolesMutation>;
|
||||
export type DeleteRemoteAppUserRolesMutationOptions = Apollo.BaseMutationOptions<DeleteRemoteAppUserRolesMutation, DeleteRemoteAppUserRolesMutationVariables>;
|
||||
export const ConfirmProvidersUpdatedDocument = gql`
|
||||
mutation confirmProvidersUpdated($id: uuid!) {
|
||||
updateApp(pk_columns: {id: $id}, _set: {providersUpdated: true}) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type ConfirmProvidersUpdatedMutationFn = Apollo.MutationFunction<ConfirmProvidersUpdatedMutation, ConfirmProvidersUpdatedMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useConfirmProvidersUpdatedMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useConfirmProvidersUpdatedMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useConfirmProvidersUpdatedMutation` returns a tuple that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - An object with fields that represent the current status of the mutation's execution
|
||||
*
|
||||
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
||||
*
|
||||
* @example
|
||||
* const [confirmProvidersUpdatedMutation, { data, loading, error }] = useConfirmProvidersUpdatedMutation({
|
||||
* variables: {
|
||||
* id: // value for 'id'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useConfirmProvidersUpdatedMutation(baseOptions?: Apollo.MutationHookOptions<ConfirmProvidersUpdatedMutation, ConfirmProvidersUpdatedMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<ConfirmProvidersUpdatedMutation, ConfirmProvidersUpdatedMutationVariables>(ConfirmProvidersUpdatedDocument, options);
|
||||
}
|
||||
export type ConfirmProvidersUpdatedMutationHookResult = ReturnType<typeof useConfirmProvidersUpdatedMutation>;
|
||||
export type ConfirmProvidersUpdatedMutationResult = Apollo.MutationResult<ConfirmProvidersUpdatedMutation>;
|
||||
export type ConfirmProvidersUpdatedMutationOptions = Apollo.BaseMutationOptions<ConfirmProvidersUpdatedMutation, ConfirmProvidersUpdatedMutationVariables>;
|
||||
export const GetDatabaseConnectionInfoDocument = gql`
|
||||
query getDatabaseConnectionInfo($id: uuid!) {
|
||||
app(id: $id) {
|
||||
@@ -20991,6 +21046,7 @@ export const GetOneUserDocument = gql`
|
||||
createdAt
|
||||
desiredState
|
||||
nhostBaseFolder
|
||||
providersUpdated
|
||||
featureFlags {
|
||||
description
|
||||
id
|
||||
|
||||
@@ -72,6 +72,26 @@ export function generateRemoteAppUrl(subdomain: string): string {
|
||||
return `https://${subdomain}.nhost.run`;
|
||||
}
|
||||
|
||||
export function generateAppServiceUrl(
|
||||
subdomain: string,
|
||||
region: string,
|
||||
service: 'auth' | 'graphql' | 'functions' | 'storage' | 'hasura',
|
||||
) {
|
||||
if (process.env.NEXT_PUBLIC_NHOST_PLATFORM !== 'true') {
|
||||
return LOCAL_BACKEND_URL;
|
||||
}
|
||||
|
||||
if (process.env.NEXT_PUBLIC_ENV === 'dev') {
|
||||
return process.env.NEXT_PUBLIC_NHOST_BACKEND_URL || LOCAL_BACKEND_URL;
|
||||
}
|
||||
|
||||
if (process.env.NEXT_PUBLIC_ENV === 'staging') {
|
||||
return `https://${subdomain}.${service}.${region}.staging.nhost.run`;
|
||||
}
|
||||
|
||||
return `https://${subdomain}.${service}.${region}.nhost.run`;
|
||||
}
|
||||
|
||||
export function emptyWorkspace() {
|
||||
return {
|
||||
id: '',
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/docs
|
||||
|
||||
## 0.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1b8f5050: fix(deps): update docusaurus monorepo to v2.2.0
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -40,7 +40,7 @@ query {
|
||||
Users should be created using the sign-up or sign-in flows as described under [sign-in methods](/authentication/sign-in-methods).
|
||||
|
||||
- **Never** create users directly via GraphQL or database, unless you [import users](#import-users) from an external system.
|
||||
- **Never** modify the `auth.users` table.
|
||||
- **Never** modify the database schema for the `auth.users` table.
|
||||
- **Never** modify the GraphQL root queries or fields for any of the tables in the `auth` schema.
|
||||
|
||||
You're allowed to:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/docs",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
@@ -16,9 +16,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@algolia/client-search": "^4.9.1",
|
||||
"@docusaurus/core": "2.1.0",
|
||||
"@docusaurus/plugin-sitemap": "2.1.0",
|
||||
"@docusaurus/preset-classic": "2.1.0",
|
||||
"@docusaurus/core": "2.2.0",
|
||||
"@docusaurus/plugin-sitemap": "2.2.0",
|
||||
"@docusaurus/preset-classic": "2.2.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"docusaurus-plugin-image-zoom": "^0.1.1",
|
||||
@@ -30,7 +30,7 @@
|
||||
"unist-util-visit": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.1.0",
|
||||
"@docusaurus/module-type-aliases": "2.2.0",
|
||||
"@tsconfig/docusaurus": "^1.0.6",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @nhost-examples/codegen-react-apollo
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
- @nhost/react-apollo@4.9.2
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-apollo",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.6.9",
|
||||
@@ -39,8 +39,8 @@
|
||||
"@graphql-codegen/typescript-operations": "^2.5.3",
|
||||
"@graphql-codegen/typescript-react-apollo": "^3.3.3",
|
||||
"@types/node": "^16.11.56",
|
||||
"@types/react": "^18.0.18",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"typescript": "^4.8.2",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/codegen-react-query
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-query",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@nhost/react": "*",
|
||||
@@ -39,8 +39,8 @@
|
||||
"@graphql-codegen/typescript-operations": "^2.5.3",
|
||||
"@graphql-codegen/typescript-react-query": "^4.0.1",
|
||||
"@types/node": "^16.11.56",
|
||||
"@types/react": "^18.0.18",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"eslint": "^8.23.0",
|
||||
"typescript": "^4.8.2",
|
||||
"vite": "^3.2.2"
|
||||
|
||||
11
examples/docker-compose/CHANGELOG.md
Normal file
11
examples/docker-compose/CHANGELOG.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# @nhost-examples/docker-compose
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 26974146: Improve QA
|
||||
|
||||
- Add end-to-end tests
|
||||
- Use the default health checks from the services
|
||||
- Do not use `latest` tags so we are sure the docker-compose example works for the given versions of the services
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
- "traefik.http.routers.hasura.rule=Host(`localhost`) && PathPrefix(`/`)"
|
||||
- "traefik.http.routers.hasura.entrypoints=web"
|
||||
auth:
|
||||
image: nhost/hasura-auth:latest
|
||||
image: nhost/hasura-auth:0.16.2
|
||||
depends_on:
|
||||
- postgres
|
||||
- graphql-engine
|
||||
@@ -63,8 +63,6 @@ services:
|
||||
AUTH_SMTP_SENDER: mail@example.com
|
||||
expose:
|
||||
- 4000
|
||||
healthcheck:
|
||||
disable: true
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.middlewares.strip-auth.stripprefix.prefixes=/v1/auth"
|
||||
@@ -80,8 +78,6 @@ services:
|
||||
restart: always
|
||||
expose:
|
||||
- 8000
|
||||
healthcheck:
|
||||
disable: true
|
||||
environment:
|
||||
PUBLIC_URL: http://localhost:${PROXY_PORT:-1337}
|
||||
HASURA_METADATA: 1
|
||||
@@ -103,7 +99,7 @@ services:
|
||||
- "traefik.http.routers.storage.middlewares=strip-suffix@docker"
|
||||
command: serve
|
||||
functions:
|
||||
image: nhost/functions:latest
|
||||
image: nhost/functions:0.1.8
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.middlewares.strip-functions.stripprefix.prefixes=/v1/functions"
|
||||
@@ -113,8 +109,6 @@ services:
|
||||
restart: always
|
||||
expose:
|
||||
- 3000
|
||||
healthcheck:
|
||||
disable: true
|
||||
volumes:
|
||||
- .:/opt/project
|
||||
- functions_node_modules:/opt/project/node_modules
|
||||
@@ -146,7 +140,7 @@ services:
|
||||
volumes:
|
||||
- ./data/mailhog:/maildir
|
||||
dashboard:
|
||||
image: nhost/dashboard:latest
|
||||
image: nhost/dashboard:0.7.4
|
||||
ports:
|
||||
- "3030:3000"
|
||||
volumes:
|
||||
|
||||
11
examples/docker-compose/package.json
Normal file
11
examples/docker-compose/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@nhost-examples/docker-compose",
|
||||
"version": "0.0.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"e2e": "vitest run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-fetch": "^3.1.5"
|
||||
}
|
||||
}
|
||||
72
examples/docker-compose/test/docker-compose.test.ts
Normal file
72
examples/docker-compose/test/docker-compose.test.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import { exec } from 'child_process'
|
||||
import fetch from 'cross-fetch'
|
||||
import { promisify } from 'util'
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
||||
|
||||
const promisifiedExec = promisify(exec)
|
||||
|
||||
describe(
|
||||
'docker-compose should start, work and stop',
|
||||
() => {
|
||||
beforeAll(async () => {
|
||||
// * Start docker compose
|
||||
await promisifiedExec(
|
||||
'docker compose -f docker-compose.yaml --env-file .env.example up --wait --quiet-pull'
|
||||
)
|
||||
}, 5 * 60 * 1000)
|
||||
|
||||
afterAll(async () => {
|
||||
// * Stop docker compose
|
||||
await promisifiedExec('docker compose -f docker-compose.yaml --env-file .env.example down')
|
||||
}, 5 * 60 * 1000)
|
||||
|
||||
it(
|
||||
'Hasura',
|
||||
async () => {
|
||||
await expect(
|
||||
fetch('http://localhost:1337/healthz').then((res) => res.status)
|
||||
).resolves.toEqual(200)
|
||||
},
|
||||
{ retry: 10, timeout: 1000 }
|
||||
)
|
||||
|
||||
it(
|
||||
'Hasura auth',
|
||||
async () => {
|
||||
await expect(
|
||||
fetch('http://localhost:1337/v1/auth/healthz').then((res) => res.status)
|
||||
).resolves.toEqual(200)
|
||||
},
|
||||
{ retry: 10, timeout: 1000 }
|
||||
)
|
||||
|
||||
it(
|
||||
'Hasura storage',
|
||||
async () => {
|
||||
await expect(
|
||||
fetch('http://localhost:1337/v1/storage/version').then((res) => res.status)
|
||||
).resolves.toEqual(200)
|
||||
},
|
||||
{ retry: 10, timeout: 1000 }
|
||||
)
|
||||
|
||||
it(
|
||||
'Serverless functions',
|
||||
async () => {
|
||||
await expect(
|
||||
fetch('http://localhost:1337/v1/functions/hello').then((res) => res.status)
|
||||
).resolves.toEqual(200)
|
||||
},
|
||||
{ retry: 10, timeout: 1000 }
|
||||
)
|
||||
|
||||
it(
|
||||
'Dashboard',
|
||||
async () => {
|
||||
await expect(fetch('http://localhost:3030').then((res) => res.status)).resolves.toEqual(200)
|
||||
},
|
||||
{ retry: 10, timeout: 1000 }
|
||||
)
|
||||
},
|
||||
{ timeout: 5 * 60 * 1000 }
|
||||
)
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost-examples/nextjs
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
- @nhost/react-apollo@4.9.2
|
||||
- @nhost/nextjs@1.9.3
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/nextjs",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
@@ -32,7 +32,7 @@
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^12.2.5",
|
||||
"@types/node": "17.0.23",
|
||||
"@types/react": "18.0.8",
|
||||
"@types/react": "18.0.25",
|
||||
"@xstate/inspect": "^0.6.2",
|
||||
"eslint-config-next": "12.0.10",
|
||||
"typescript": "4.5.5",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @nhost-examples/react-apollo
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
- @nhost/react-apollo@4.9.2
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-apollo",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.6.9",
|
||||
@@ -53,8 +53,8 @@
|
||||
"@graphql-codegen/cli": "^2.12.0",
|
||||
"@nuintun/qrcode": "^3.3.0",
|
||||
"@testing-library/cypress": "^8.0.3",
|
||||
"@types/react": "^18.0.18",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@types/totp-generator": "^0.0.4",
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"@xstate/inspect": "^0.6.2",
|
||||
|
||||
9
examples/react-gqty/CHANGELOG.md
Normal file
9
examples/react-gqty/CHANGELOG.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# @nhost-examples/react-gqty
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-gqty",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -20,8 +20,8 @@
|
||||
"devDependencies": {
|
||||
"@gqty/cli": "3.3.0-alpha-d8cdbf6.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@types/react": "^18.0.17",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"postcss": "^8.4.18",
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
|
||||
- How to receive Stripe Webhooks. Read more about Stripe Webhooks here: https://stripe.com/docs/webhooks.
|
||||
- Make sure to configure your Stripe Webhook URL in the Stripe Dashboard: https://dashboard.stripe.com/webhooks.
|
||||
- You can test your Stripe Webhook by using the Stripe CLI: https://stripe.com/docs/stripe-cli.
|
||||
- Make sure to configure `STRIPE_SECRET_KEY` and `STRIPE_WEBHOOK_SECRET` in your `.env.development` file during local development. In production, use the `Environment Variables` tab in the Nhost Dashboard.
|
||||
|
||||
Test:
|
||||
|
||||
URL: http://localhost:1337/v1/functions/stripe-webhook
|
||||
*/
|
||||
|
||||
import { Request, Response } from 'express'
|
||||
|
||||
import Stripe from 'stripe'
|
||||
|
||||
type NhostResponse = Response
|
||||
type NhostRequest = Request & {
|
||||
rawBody: string
|
||||
}
|
||||
|
||||
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||
apiVersion: '2022-08-01'
|
||||
})
|
||||
|
||||
export default async function handler(req: NhostRequest, res: NhostResponse) {
|
||||
const sig = req.headers['stripe-signature'] as string
|
||||
const endpointSecret = process.env.STRIPE_WEBHOOK_SECRET
|
||||
|
||||
let event
|
||||
|
||||
// Match the raw body to content type application/json
|
||||
try {
|
||||
event = stripe.webhooks.constructEvent(req.rawBody, sig, endpointSecret)
|
||||
} catch (err: any) {
|
||||
console.log(`⚠️ Webhook signature verification failed.`)
|
||||
console.log(err)
|
||||
return res.status(400).send(`Webhook Error: ${err.message}`)
|
||||
}
|
||||
|
||||
if (!event) {
|
||||
console.log('no event found')
|
||||
return res.status(400).send('No event')
|
||||
}
|
||||
|
||||
// Handle the event
|
||||
switch (event.type) {
|
||||
case 'customer.subscription.created': {
|
||||
const { object } = event.data as any
|
||||
console.log('customer subscription created!')
|
||||
console.log(object)
|
||||
break
|
||||
}
|
||||
case 'customer.subscription.deleted': {
|
||||
const { object } = event.data as any
|
||||
console.log('customer subscription deleted!')
|
||||
console.log(object)
|
||||
}
|
||||
// ... handle other event types
|
||||
default:
|
||||
console.log(`Unhandled event type ${event.type}`)
|
||||
}
|
||||
|
||||
res.json({ received: true })
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
"cross-fetch": "^3.1.5",
|
||||
"graphql": "15.7.2",
|
||||
"nodemailer": "^6.8.0",
|
||||
"slugify": "^1.6.5"
|
||||
"slugify": "^1.6.5",
|
||||
"stripe": "^11.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/vue-apollo
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b030eae9: chore(deps): update dependency @xstate/inspect to ^0.7.0
|
||||
- Updated dependencies [b030eae9]
|
||||
- @nhost/vue@0.6.2
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-apollo",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = {
|
||||
curly: 'off',
|
||||
'quote-props': 'off',
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off'
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'eol-last': 'off'
|
||||
}
|
||||
}
|
||||
|
||||
9
examples/vue-quickstart/CHANGELOG.md
Normal file
9
examples/vue-quickstart/CHANGELOG.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# @nhost-examples/vue-quickstart
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b030eae9: chore(deps): update dependency @xstate/inspect to ^0.7.0
|
||||
- Updated dependencies [b030eae9]
|
||||
- @nhost/vue@0.6.2
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-quickstart",
|
||||
"version": "0.0.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
@@ -39,4 +40,4 @@
|
||||
"vitest": "^0.12.4",
|
||||
"vue-tsc": "^0.38.9"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@
|
||||
"eslint-plugin-react": "^7.31.10",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-vue": "^8.7.1",
|
||||
"eslint-plugin-vue": "^9.0.0",
|
||||
"husky": "^8.0.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.7.1",
|
||||
@@ -81,7 +81,7 @@
|
||||
"vite": "^3.2.2",
|
||||
"vite-plugin-dts": "^1.6.6",
|
||||
"vite-tsconfig-paths": "^3.5.2",
|
||||
"vitest": "^0.24.5"
|
||||
"vitest": "^0.25.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"graphql": "15.7.2"
|
||||
|
||||
@@ -66,6 +66,6 @@
|
||||
"devDependencies": {
|
||||
"@simplewebauthn/typescript-types": "^6.0.0",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"msw": "^0.47.4"
|
||||
"msw": "^0.49.0"
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,6 @@
|
||||
"devDependencies": {
|
||||
"@nhost/core": "workspace:*",
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@types/faker": "5",
|
||||
"cheerio": "1.0.0-rc.12",
|
||||
"mailhog": "^4.16.0",
|
||||
"start-server-and-test": "^1.14.0"
|
||||
|
||||
@@ -71,6 +71,6 @@
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"start-server-and-test": "^1.14.0",
|
||||
"uuid": "^8.3.2"
|
||||
"uuid": "^9.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 1.9.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
|
||||
## 1.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 82124329: chore(deps): update dependency next to v12.3.4
|
||||
|
||||
## 1.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.3",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -79,7 +79,7 @@
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@nhost/react": "workspace:*",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"next": "12.0.10",
|
||||
"next": "12.3.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 4.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
- Updated dependencies [132a4f4b]
|
||||
- @nhost/react@0.15.2
|
||||
|
||||
## 4.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "4.9.1",
|
||||
"version": "4.9.2",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -72,7 +72,7 @@
|
||||
"devDependencies": {
|
||||
"@apollo/client": "^3.7.1",
|
||||
"@nhost/react": "workspace:*",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react": "^18.0.25",
|
||||
"graphql": "15.7.2",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/react
|
||||
|
||||
## 0.15.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 132a4f4b: chore(deps): synchronize @types/react-dom and @types/react versions
|
||||
|
||||
## 0.15.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "0.15.1",
|
||||
"version": "0.15.2",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -71,7 +71,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react": "^18.0.25",
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/sync-versions
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a76080e: chore(deps): update dependency @types/glob to v8
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@nhost/sync-versions",
|
||||
"description": "Sync the versions of Nhost services in each of the packages of a pnpm workspace",
|
||||
"private": true,
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -27,13 +27,13 @@
|
||||
"devDependencies": {
|
||||
"@swc-node/register": "^1.5.4",
|
||||
"@swc/core": "^1.3.11",
|
||||
"@types/glob": "^7.2.0",
|
||||
"@types/glob": "^8.0.0",
|
||||
"@types/node": "^17.0.45",
|
||||
"@types/object-path": "^0.11.1",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pnpm/find-workspace-dir": "^4.0.3",
|
||||
"@pnpm/find-workspace-dir": "^5.0.0",
|
||||
"glob": "^8.0.3",
|
||||
"object-path": "^0.11.8",
|
||||
"yaml": "^2.1.1"
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
import { findWorkspaceDir } from '@pnpm/find-workspace-dir'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
import glob from 'glob'
|
||||
import { set } from 'object-path'
|
||||
import path from 'path'
|
||||
import yaml from 'yaml'
|
||||
|
||||
import findWorkspaceRoot from '@pnpm/find-workspace-dir'
|
||||
|
||||
interface NhostCloudConfig {
|
||||
hasura: string
|
||||
auth: string
|
||||
@@ -15,7 +13,7 @@ interface NhostCloudConfig {
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
const root = await findWorkspaceRoot(process.cwd())
|
||||
const root = await findWorkspaceDir(process.cwd())
|
||||
|
||||
const { hasura, auth, storage }: NhostCloudConfig = yaml.parse(
|
||||
fs.readFileSync(path.join(root!, 'nhost-cloud.yaml'), 'utf-8')
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 0.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b030eae9: chore(deps): update dependency @xstate/inspect to ^0.7.0
|
||||
|
||||
## 0.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "0.6.1",
|
||||
"version": "0.6.2",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -67,8 +67,8 @@
|
||||
"@nhost/core": "workspace:*",
|
||||
"@nhost/hasura-storage-js": "workspace:*",
|
||||
"@nhost/nhost-js": "workspace:*",
|
||||
"@vueuse/core": "^8.9.4",
|
||||
"@xstate/vue": "^1.0.0",
|
||||
"@vueuse/core": "^9.0.0",
|
||||
"@xstate/vue": "^2.0.0",
|
||||
"immer": "^9.0.15",
|
||||
"jwt-decode": "^3.1.2"
|
||||
},
|
||||
@@ -76,7 +76,7 @@
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@nhost/hasura-auth-js": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@xstate/inspect": "^0.6.2",
|
||||
"@xstate/inspect": "^0.7.0",
|
||||
"vue": "^3.2.41",
|
||||
"vue-router": "^4.1.6",
|
||||
"ws": "^8.10.0",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user