Compare commits

..

6 Commits

Author SHA1 Message Date
github-actions[bot]
93957c8af3 chore: update versions (#2537)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @nhost/hasura-storage-js@2.4.0

### Minor Changes

-   2505b2e: fix: fix headers sent with getPresignedUrl

## @nhost/apollo@6.0.4

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost/react-apollo@8.0.1

### Patch Changes

-   @nhost/apollo@6.0.4
-   @nhost/react@3.1.1

## @nhost/react-urql@5.0.1

### Patch Changes

-   @nhost/react@3.1.1

## @nhost/nextjs@2.1.1

### Patch Changes

-   @nhost/react@3.1.1

## @nhost/nhost-js@3.0.4

### Patch Changes

-   Updated dependencies [2505b2e]
    -   @nhost/hasura-storage-js@2.4.0

## @nhost/react@3.1.1

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost/vue@2.1.1

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost/dashboard@1.6.8

### Patch Changes

-   @nhost/react-apollo@8.0.1
-   @nhost/nextjs@2.1.1

## @nhost-examples/cli@0.1.5

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost-examples/codegen-react-apollo@0.1.13

### Patch Changes

-   @nhost/react@3.1.1
-   @nhost/react-apollo@8.0.1

## @nhost-examples/codegen-react-query@0.1.14

### Patch Changes

-   @nhost/react@3.1.1

## @nhost-examples/codegen-react-urql@0.0.10

### Patch Changes

-   @nhost/react@3.1.1
-   @nhost/react-urql@5.0.1

## @nhost-examples/multi-tenant-one-to-many@2.0.3

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost-examples/nextjs@0.1.15

### Patch Changes

-   @nhost/react@3.1.1
-   @nhost/react-apollo@8.0.1
-   @nhost/nextjs@2.1.1

## @nhost-examples/node-storage@0.0.7

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost-examples/nextjs-server-components@0.2.1

### Patch Changes

-   @nhost/nhost-js@3.0.4

## @nhost-examples/react-apollo@0.2.1

### Patch Changes

-   @nhost/react@3.1.1
-   @nhost/react-apollo@8.0.1

## @nhost-examples/react-gqty@1.0.3

### Patch Changes

-   @nhost/react@3.1.1

## @nhost-examples/vue-apollo@0.1.1

### Patch Changes

-   @nhost/nhost-js@3.0.4
-   @nhost/apollo@6.0.4
-   @nhost/vue@2.1.1

## @nhost-examples/vue-quickstart@0.0.12

### Patch Changes

-   @nhost/apollo@6.0.4
-   @nhost/vue@2.1.1

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-14 10:29:57 +01:00
Nuno Pato
2505b2e26b fix: fix headers sent with getPresignedUrl (#2535) 2024-02-13 23:33:09 -01:00
Nuno Pato
5f4b4d2acc chore: update dependencies (#2536)
Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2024-02-13 20:29:47 -01:00
github-actions[bot]
71a8ce4446 chore: update versions (#2524)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @nhost/docs@2.4.0

### Minor Changes

-   791b729: fix: remove auth method

## @nhost/dashboard@1.6.7

### Patch Changes

-   5ef5189: fix: update `@apollo/client` to `3.9.4` to fix a cache bug

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-12 16:33:16 +01:00
Hassan Ben Jobrane
5ef5189898 fix(dashboard): resolve change plan modal cache issue (#2532)
related to https://github.com/nhost/nhost/issues/2530
2024-02-12 16:08:22 +01:00
Nuno Pato
791b7295fb fix: docs: remove auth method (#2475)
- https://github.com/nhost/nhost/issues/2474
2024-02-08 10:36:51 -01:00
49 changed files with 849 additions and 1820 deletions

View File

@@ -1,5 +1,18 @@
# @nhost/dashboard
## 1.6.8
### Patch Changes
- @nhost/react-apollo@8.0.1
- @nhost/nextjs@2.1.1
## 1.6.7
### Patch Changes
- 5ef5189: fix: update `@apollo/client` to `3.9.4` to fix a cache bug
## 1.6.6
### Patch Changes

View File

@@ -4,7 +4,6 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
});
const { version } = require('./package.json');
const cspHeader = `
default-src 'self' *.nhost.run ws://*.nhost.run nhost.run ws://nhost.run;
script-src 'self' 'unsafe-eval' 'unsafe-inline' cdn.segment.com js.stripe.com;
@@ -19,7 +18,7 @@ const cspHeader = `
frame-src 'self' js.stripe.com;
block-all-mixed-content;
upgrade-insecure-requests;
`
`;
module.exports = withBundleAnalyzer({
reactStrictMode: true,
@@ -41,7 +40,7 @@ module.exports = withBundleAnalyzer({
headers: [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN'
value: 'SAMEORIGIN',
},
{
key: 'Content-Security-Policy',
@@ -49,7 +48,7 @@ module.exports = withBundleAnalyzer({
},
],
},
]
];
},
async redirects() {
return [

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "1.6.6",
"version": "1.6.8",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
@@ -19,7 +19,7 @@
"e2e": "pnpm install-browsers && pnpm playwright test"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@codemirror/lang-sql": "^6.5.5",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.3",
@@ -106,7 +106,7 @@
"@storybook/addon-postcss": "^2.0.0",
"@storybook/builder-webpack5": "^6.5.16",
"@storybook/manager-webpack5": "^6.5.16",
"@storybook/react": "^6.5.16",
"@storybook/react": "^7.6.15",
"@storybook/testing-library": "^0.2.2",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/dom": "^9.3.4",

View File

@@ -25,12 +25,12 @@ function Plan({ planName, price, setPlan, planId, selectedPlanId }: any) {
return (
<button
type="button"
className="my-4 grid w-full grid-flow-col items-center justify-between gap-2 px-1"
className="grid items-center justify-between w-full grid-flow-col gap-2 px-1 my-4"
onClick={setPlan}
tabIndex={-1}
>
<div className="grid grid-flow-row gap-y-0.5">
<div className="grid grid-flow-col items-center justify-start gap-2">
<div className="grid items-center justify-start grid-flow-col gap-2">
<Checkbox
onChange={setPlan}
checked={selectedPlanId === planId}
@@ -40,7 +40,7 @@ function Plan({ planName, price, setPlan, planId, selectedPlanId }: any) {
<Text
variant="h3"
component="p"
className="self-center text-left font-medium"
className="self-center font-medium text-left"
>
Upgrade to {planName}
</Text>
@@ -156,7 +156,7 @@ export function ChangePlanModalWithData({ app, plans, close }: any) {
if (pollingCurrentProject) {
return (
<Box className="mx-auto w-full max-w-xl rounded-lg p-6 text-left">
<Box className="w-full max-w-xl p-6 mx-auto text-left rounded-lg">
<div className="flex flex-col">
<div className="mx-auto">
<Image
@@ -179,7 +179,7 @@ export function ChangePlanModalWithData({ app, plans, close }: any) {
<Button
variant="outlined"
color="secondary"
className="mx-auto mt-4 w-full max-w-sm"
className="w-full max-w-sm mx-auto mt-4"
onClick={() => {
if (close) {
close();
@@ -196,7 +196,7 @@ export function ChangePlanModalWithData({ app, plans, close }: any) {
}
return (
<Box className="w-full max-w-xl rounded-lg p-6 text-left">
<Box className="w-full max-w-xl p-6 text-left rounded-lg">
<BaseDialog
open={showPaymentModal}
onClose={() => setShowPaymentModal(false)}
@@ -241,7 +241,7 @@ export function ChangePlanModalWithData({ app, plans, close }: any) {
))}
</div>
<div className="mt-2 grid grid-flow-row gap-2">
<div className="grid grid-flow-row gap-2 mt-2">
<Button
onClick={handleChangePlanClick}
disabled={!selectedPlan}

View File

@@ -1,5 +1,11 @@
# @nhost/docs
## 2.4.0
### Minor Changes
- 791b729: fix: remove auth method
## 2.3.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/docs",
"version": "2.3.0",
"version": "2.4.0",
"private": true,
"scripts": {
"start": "mintlify dev"

View File

@@ -11,18 +11,9 @@ info:
servers:
- url: https://local.auth.nhost.run/v1
description: API Server
security:
- AdminSecret: []
- BearerAuth: []
components:
securitySchemes:
AdminSecret:
type: apiKey
in: header
name: X-Hasura-Admin-Secret
description: Hasura Admin Secret
BearerAuth:
scheme: bearer
type: http
@@ -1524,7 +1515,6 @@ paths:
schema:
$ref: '#/components/schemas/DisabledEndpointError'
description: The feature is not activated
security: []
summary: Sign In TOTP
tags:
- Authentication

View File

@@ -1,5 +1,11 @@
# @nhost-examples/cli
## 0.1.5
### Patch Changes
- @nhost/nhost-js@3.0.4
## 0.1.4
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/cli",
"version": "0.1.4",
"version": "0.1.5",
"main": "src/index.mjs",
"private": true,
"scripts": {

View File

@@ -1,5 +1,12 @@
# @nhost-examples/codegen-react-apollo
## 0.1.13
### Patch Changes
- @nhost/react@3.1.1
- @nhost/react-apollo@8.0.1
## 0.1.12
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/codegen-react-apollo",
"version": "0.1.12",
"version": "0.1.13",
"private": true,
"scripts": {
"codegen": "graphql-codegen",
@@ -15,7 +15,7 @@
]
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@nhost/react": "workspace:^",
"@nhost/react-apollo": "workspace:^",
"clsx": "^1.2.1",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/codegen-react-query
## 0.1.14
### Patch Changes
- @nhost/react@3.1.1
## 0.1.13
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/codegen-react-query",
"version": "0.1.13",
"version": "0.1.14",
"private": true,
"scripts": {
"codegen": "graphql-codegen",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-urql
## 0.0.10
### Patch Changes
- @nhost/react@3.1.1
- @nhost/react-urql@5.0.1
## 0.0.9
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/codegen-react-urql",
"private": true,
"version": "0.0.9",
"version": "0.0.10",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/multi-tenant-one-to-many
## 2.0.3
### Patch Changes
- @nhost/nhost-js@3.0.4
## 2.0.2
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/multi-tenant-one-to-many",
"private": true,
"version": "2.0.2",
"version": "2.0.3",
"description": "",
"main": "index.js",
"scripts": {},

View File

@@ -1,5 +1,13 @@
# @nhost-examples/nextjs
## 0.1.15
### Patch Changes
- @nhost/react@3.1.1
- @nhost/react-apollo@8.0.1
- @nhost/nextjs@2.1.1
## 0.1.14
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/nextjs",
"version": "0.1.14",
"version": "0.1.15",
"private": true,
"scripts": {
"dev": "next dev",
@@ -15,7 +15,7 @@
"verify:fix": "run-p prettier:fix lint:fix"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@mantine/core": "^4.2.12",
"@mantine/hooks": "^4.2.12",
"@mantine/next": "^4.2.12",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/node-storage
## 0.0.7
### Patch Changes
- @nhost/nhost-js@3.0.4
## 0.0.6
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/node-storage",
"version": "0.0.6",
"version": "0.0.7",
"private": true,
"description": "This is an example of how to use the Storage with Node.js",
"main": "src/index.mjs",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/nextjs-server-components
## 0.2.1
### Patch Changes
- @nhost/nhost-js@3.0.4
## 0.2.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/nextjs-server-components",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"dev": "next dev",
@@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@nhost/nhost-js": "workspace:^",
"autoprefixer": "10.4.15",
"cookies-next": "^3.0.0",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-apollo
## 0.2.1
### Patch Changes
- @nhost/react@3.1.1
- @nhost/react-apollo@8.0.1
## 0.2.0
### Minor Changes

View File

@@ -1,9 +1,9 @@
{
"name": "@nhost-examples/react-apollo",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@mantine/core": "^4.2.12",
"@mantine/dropzone": "^4.2.12",
"@mantine/hooks": "^4.2.12",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/react-gqty
## 1.0.3
### Patch Changes
- @nhost/react@3.1.1
## 1.0.2
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/react-gqty",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# @nhost-examples/vue-apollo
## 0.1.1
### Patch Changes
- @nhost/nhost-js@3.0.4
- @nhost/apollo@6.0.4
- @nhost/vue@2.1.1
## 0.1.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/vue-apollo",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"scripts": {
"dev": "vite",
"build": "vite build",
@@ -14,7 +14,7 @@
"verify:fix": "run-p prettier:fix lint:fix"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@mdi/font": "5.9.55",
"@nhost/apollo": "workspace:^",
"@nhost/nhost-js": "workspace:^",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/vue-quickstart
## 0.0.12
### Patch Changes
- @nhost/apollo@6.0.4
- @nhost/vue@2.1.1
## 0.0.11
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/vue-quickstart",
"version": "0.0.11",
"version": "0.0.12",
"private": true,
"scripts": {
"build": "vite build",
@@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@nhost/apollo": "workspace:^",
"@nhost/vue": "workspace:^",
"@vue/apollo-composable": "4.0.0-alpha.18",

View File

@@ -1,5 +1,11 @@
# @nhost/apollo
## 6.0.4
### Patch Changes
- @nhost/nhost-js@3.0.4
## 6.0.3
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/apollo",
"version": "6.0.3",
"version": "6.0.4",
"description": "Nhost Apollo Client library",
"license": "MIT",
"keywords": [
@@ -68,7 +68,7 @@
"graphql-ws": "^5.14.3"
},
"devDependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@nhost/nhost-js": "workspace:*"
}
}

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo
## 8.0.1
### Patch Changes
- @nhost/apollo@6.0.4
- @nhost/react@3.1.1
## 8.0.0
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react-apollo",
"version": "8.0.0",
"version": "8.0.1",
"description": "Nhost React Apollo client",
"license": "MIT",
"keywords": [
@@ -71,7 +71,7 @@
"react-dom": "^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@apollo/client": "^3.9.1",
"@apollo/client": "^3.9.4",
"@nhost/react": "workspace:*",
"@types/react": "^18.2.50",
"graphql": "16.8.1",

View File

@@ -1,5 +1,11 @@
# @nhost/react-urql
## 5.0.1
### Patch Changes
- @nhost/react@3.1.1
## 5.0.0
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react-urql",
"version": "5.0.0",
"version": "5.0.1",
"description": "Nhost React URQL client",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-storage-js
## 2.4.0
### Minor Changes
- 2505b2e: fix: fix headers sent with getPresignedUrl
## 2.3.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/hasura-storage-js",
"version": "2.3.0",
"version": "2.4.0",
"description": "Hasura-storage client",
"license": "MIT",
"keywords": [

View File

@@ -99,12 +99,6 @@ export class HasuraStorageApi {
async downloadFile(params: StorageDownloadFileParams): Promise<StorageDownloadFileResponse> {
try {
const { fileId, headers: customHeaders = {}, ...imageTransformationParams } = params
const authHeaders = this.generateAuthHeaders()
const headers = new Headers(customHeaders)
authHeaders.forEach((value, key) => {
headers?.append(key, value)
})
const urlWithParams = appendImageTransformationParameters(
`${this.url}/files/${fileId}`,
@@ -113,7 +107,7 @@ export class HasuraStorageApi {
const response = await fetch(urlWithParams, {
method: 'GET',
headers
headers: {...this.generateAuthHeaders(), ...customHeaders}
})
if (!response.ok) {
@@ -131,6 +125,7 @@ export class HasuraStorageApi {
async getPresignedUrl(params: ApiGetPresignedUrlParams): Promise<ApiGetPresignedUrlResponse> {
try {
const { fileId } = params
const response = await fetch(`${this.url}/files/${fileId}/presignedurl`, {
method: 'GET',
headers: this.generateAuthHeaders()
@@ -185,16 +180,19 @@ export class HasuraStorageApi {
return this
}
private generateAuthHeaders(): Headers {
const headers = new Headers()
private generateAuthHeaders(): HeadersInit | undefined {
if (!this.adminSecret && !this.accessToken) {
return undefined
}
if (this.adminSecret) {
headers.append('x-hasura-admin-secret', this.adminSecret)
}
if (this.accessToken) {
headers.append('Authorization', `Bearer ${this.accessToken}`)
return {
'x-hasura-admin-secret': this.adminSecret
}
}
return headers
return {
Authorization: `Bearer ${this.accessToken}`
}
}
}

View File

@@ -1,5 +1,11 @@
# @nhost/nextjs
## 2.1.1
### Patch Changes
- @nhost/react@3.1.1
## 2.1.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/nextjs",
"version": "2.1.0",
"version": "2.1.1",
"description": "Nhost NextJS library",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/nhost-js
## 3.0.4
### Patch Changes
- Updated dependencies [2505b2e]
- @nhost/hasura-storage-js@2.4.0
## 3.0.3
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/nhost-js",
"version": "3.0.3",
"version": "3.0.4",
"description": "Nhost JavaScript SDK",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react
## 3.1.1
### Patch Changes
- @nhost/nhost-js@3.0.4
## 3.1.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react",
"version": "3.1.0",
"version": "3.1.1",
"description": "Nhost React library",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/vue
## 2.1.1
### Patch Changes
- @nhost/nhost-js@3.0.4
## 2.1.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/vue",
"version": "2.1.0",
"version": "2.1.1",
"description": "Nhost Vue library",
"license": "MIT",
"keywords": [

2399
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff