Compare commits

..

31 Commits

Author SHA1 Message Date
Szilárd Dóró
463cb50c27 Merge pull request #2011 from nhost/changeset-release/main 2023-06-06 11:40:03 +02:00
github-actions[bot]
676c11f814 chore: update versions 2023-06-06 07:27:04 +00:00
Szilárd Dóró
d8442a290b Merge pull request #2010 from nhost/chore/lower-max-resources
chore(dashboard): lower the max allowed resources per service
2023-06-06 09:25:53 +02:00
Szilárd Dóró
0db333353b chore: add message to resources 2023-06-05 16:30:53 +02:00
Szilárd Dóró
7ea8120723 Merge pull request #2009 from nhost/docs/custom-urls
docs: add section about using custom URLs
2023-06-05 16:27:33 +02:00
Szilárd Dóró
64a8f41d03 chore: add changeset 2023-06-05 16:18:30 +02:00
Szilárd Dóró
8e12ded94b chore: lower the maximum allowed resources 2023-06-05 16:17:06 +02:00
Szilárd Dóró
564ce1ac2d docs: add section about custom URLs 2023-06-05 16:03:50 +02:00
Szilárd Dóró
b024817eb5 docs: add docs about using custom URLs 2023-06-05 15:55:36 +02:00
Szilárd Dóró
c1b024cf53 Merge pull request #2006 from nhost/fix/example-visibility
fix: make node-storage example private
2023-06-05 14:51:18 +02:00
Szilárd Dóró
dbacbf140b fix: make node-storage example private 2023-06-05 14:22:17 +02:00
Szilárd Dóró
0a9af5075c Merge pull request #2005 from nhost/changeset-release/main
chore: update versions
2023-06-05 13:41:52 +02:00
github-actions[bot]
15168539d8 chore: update versions 2023-06-05 11:13:57 +00:00
Szilárd Dóró
0d74217a4c Merge pull request #2003 from nhost/chore/node-18-upgrade
fix(hasura-storage-js): don't break when using Node 18
2023-06-05 13:12:10 +02:00
Szilárd Dóró
9721527324 chore: improve storage example 2023-06-05 10:48:15 +02:00
Szilárd Dóró
fd4d024bfc feat: add Nhost to the storage example 2023-06-05 10:46:29 +02:00
Szilárd Dóró
c994c8f05b Merge pull request #2000 from nhost/changeset-release/main
chore: update versions
2023-06-05 10:08:26 +02:00
Szilárd Dóró
4c00a796eb fix: don't break builds 2023-06-05 09:50:30 +02:00
github-actions[bot]
2d3a77af76 chore: update versions 2023-06-05 07:06:47 +00:00
Szilárd Dóró
ef05d69889 Merge pull request #2002 from nhost/fix/deployment-timestamp
fix(dashboard): use correct timestamps for deployments
2023-06-05 09:05:02 +02:00
Szilárd Dóró
9b1d0f7a5b fix: use correct timestamps 2023-06-02 16:25:32 +02:00
Szilárd Dóró
07abea4c16 fix: make storage work with Node 18+
feat: add Node.js storage example
2023-06-02 16:19:10 +02:00
David Barroso
8733961026 docs: added entry about seeds (#2001) 2023-06-02 14:51:19 +02:00
Szilárd Dóró
3dc97f17ae Merge pull request #1998 from nhost/renovate/react-monorepo
chore(deps): update dependency @types/react to v18.2.8
2023-06-02 10:48:46 +02:00
Szilárd Dóró
6d2963ffa7 chore: add changeset 2023-06-02 10:26:38 +02:00
renovate[bot]
d1ec8c0781 chore(deps): update dependency @types/react to v18.2.8 2023-06-02 07:29:45 +00:00
Szilárd Dóró
8b205e9c08 Merge pull request #1994 from nhost/fix/react-apollo-e2e
fix(ci): don't break E2E tests and Docker image creation
2023-06-02 09:27:28 +02:00
David Barroso
e2792cd453 docs: cli: added documentation for jsonpatches (#1996) 2023-06-02 09:00:02 +02:00
Szilárd Dóró
8871267b91 chore: downgrade pnpm to 8.5.1 2023-06-01 14:50:18 +02:00
Szilárd Dóró
e3001ba4a5 chore: add changeset 2023-06-01 14:21:49 +02:00
Szilárd Dóró
1133b76a7e fix: don't break react-apollo example e2e tests 2023-06-01 14:21:12 +02:00
105 changed files with 1607 additions and 634 deletions

View File

@@ -14,7 +14,7 @@ runs:
steps:
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.0
version: 8.5.1
run_install: false
- name: Get pnpm cache directory
id: pnpm-cache-dir

View File

@@ -1,5 +1,26 @@
# @nhost/dashboard
## 0.17.6
### Patch Changes
- 64a8f41d0: chore(resources): lower the maximum allowed resources per service
## 0.17.5
### Patch Changes
- @nhost/react-apollo@5.0.25
- @nhost/nextjs@1.13.27
## 0.17.4
### Patch Changes
- 9b1d0f7a5: fix(deployments): use correct timestamp for deployment details
- 6d2963ffa: chore(deps): bump `@types/react` to `v18.2.8`
- 8871267b9: chore(deps): downgrade `pnpm` to `v8.5.1` because of no Turborepo support
## 0.17.3
### Patch Changes

View File

@@ -29,7 +29,7 @@ ENV NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL __NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL_
ENV NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL __NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL__
ENV NEXT_PUBLIC_NHOST_HASURA_API_URL __NEXT_PUBLIC_NHOST_HASURA_API_URL__
RUN yarn global add pnpm@8.6.0
RUN yarn global add pnpm@8.5.1
COPY .gitignore .gitignore
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-*.yaml .

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "0.17.3",
"version": "0.17.6",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
@@ -104,7 +104,7 @@
"@types/lodash.debounce": "^4.0.7",
"@types/node": "^16.11.7",
"@types/pluralize": "^0.0.29",
"@types/react": "18.2.7",
"@types/react": "18.2.8",
"@types/react-dom": "18.2.4",
"@types/react-table": "^7.7.12",
"@types/testing-library__jest-dom": "^5.14.5",

View File

@@ -5,6 +5,7 @@ import { ActivityIndicator } from '@/components/ui/v2/ActivityIndicator';
import { Alert } from '@/components/ui/v2/Alert';
import { Box } from '@/components/ui/v2/Box';
import { Divider } from '@/components/ui/v2/Divider';
import { Link } from '@/components/ui/v2/Link';
import { useCurrentWorkspaceAndProject } from '@/features/projects/common/hooks/useCurrentWorkspaceAndProject';
import { useProPlan } from '@/features/projects/common/hooks/useProPlan';
import { ResourcesConfirmationDialog } from '@/features/projects/resources/settings/components/ResourcesConfirmationDialog';
@@ -348,6 +349,13 @@ export default function ResourcesForm() {
</Alert>
</Box>
)}
<Box className="px-4 pb-4">
<Alert severity="info">
In case you need more resources, please reach out to us at{' '}
<Link href="mailto:support@nhost.io">support@nhost.io</Link>.
</Alert>
</Box>
</>
) : (
<Box className={twMerge('px-4', 'pb-4')}>

View File

@@ -21,7 +21,7 @@ export const MIN_TOTAL_MEMORY =
/**
* The maximum total CPU that can be allocated.
*/
export const MAX_TOTAL_VCPU = 60 * RESOURCE_VCPU_MULTIPLIER;
export const MAX_TOTAL_VCPU = 28 * RESOURCE_VCPU_MULTIPLIER;
/**
* The maximum amount of memory that can be allocated in total.
@@ -46,7 +46,7 @@ export const MIN_SERVICE_VCPU = 0.25 * RESOURCE_VCPU_MULTIPLIER;
/**
* The maximum amount of CPU that can be allocated per service.
*/
export const MAX_SERVICE_VCPU = 15 * RESOURCE_VCPU_MULTIPLIER;
export const MAX_SERVICE_VCPU = 7 * RESOURCE_VCPU_MULTIPLIER;
/**
* The minimum amount of memory that has to be allocated per service.

View File

@@ -277,7 +277,16 @@ export default function FilesDataGrid(props: FilesDataGridProps) {
throw new Error(fileError.message);
}
triggerToast(`File has been uploaded successfully (${fileMetadata?.id})`);
if (!fileMetadata) {
throw new Error('File metadata is missing.');
}
const fileId =
'processedFiles' in fileMetadata
? fileMetadata.processedFiles[0]?.id
: fileMetadata.id;
triggerToast(`File has been uploaded successfully (${fileId})`);
await refetchFilesAndAggregate();
} catch (uploadError) {

View File

@@ -140,7 +140,7 @@ export default function DeploymentDetailsPage() {
{deployment.deploymentLogs.map((log) => (
<div key={log.id} className="flex font-mono">
<div className=" mr-2 flex-shrink-0">
{format(parseISO(log.createdAt), 'KK:mm:ss')}:
{format(parseISO(log.createdAt), 'HH:mm:ss')}:
</div>
<div className="break-all">{log.message}</div>
</div>

View File

@@ -1,5 +1,11 @@
# @nhost/docs
## 0.3.1
### Patch Changes
- 564ce1ac2: docs: add docs about using custom URLs for the Nhost SDK
## 0.3.0
### Minor Changes

View File

@@ -0,0 +1,108 @@
---
title: 'Patching Local Environment'
sidebar_label: 'Patching Local Environment'
sidebar_position: 4
---
In some cases you may need to modify your configuration file to accommodate minor deviations from your production environment. For instance, imagine your `nhost.toml` file looks like:
```
[global]
[[global.environment]]
name = 'ENVIRONMENT'
value = 'production'
... (omitted for brevity)
[hasura]
version = 'v2.24.1-ce'
... (omitted for brevity)
[hasura.logs]
level = 'warn'
... (omitted for brevity)
[auth.redirections]
clientUrl = 'https://my.app.com'
... (omitted for brevity)
[auth.method.oauth]
[auth.method.oauth.apple]
enabled = true
clientId = '{{ secrets.APPLE_CLIENT_ID }}'
keyId = '{{ secrets.APPLE_KEY_ID }}'
teamId = '{{ secrets.APPLE_TEAM_ID }}'
privateKey = '{{ secrets.APPLE_PRIVATE_KEY }}'
... (omitted for brevity)
```
While this may work in production you may want to do minor tweaks in your local development. To do so we rely on [JSON patches RFC6902](https://datatracker.ietf.org/doc/html/rfc6902). To make use of it just drop a file under `nhost/overlays/local.yaml`. For instance, a file with the following contents would apply minor modifications to your local environment without affecting production:
```
- op: replace
path: /hasura/version # override hasura version
value: "v2.25.1-ce"
- op: replace
path: /global/environment/0 # replace first environment variables
value:
name: ENVIRONMENT
value: development
- op: add # add a new env var
path: /global/environment/-
value:
name: FUNCTION_LOG_LEVEL
value: debug
- op: replace # change the client url to local
path: /auth/redirections/clientUrl
value: http://localhost:3000
- op: remove # remove apple authentication
path: /auth/method/oauth/apple
```
To verify that the file is being manipulated as we desire we can use the `nhost` cli:
```
$ nhost config show
[global]
[[global.environment]]
name = 'ENVIRONMENT'
value = 'development'
[[global.environment]]
name = 'FUNCTION_LOG_LEVEL'
value = 'debug'
... (omitted for brevity)
[hasura]
version = 'v2.25.1-ce'
... (omitted for brevity)
[auth.redirections]
clientUrl = 'http://localhost:3000'
... (omitted for brevity)
[auth.method.oauth]
[auth.method.oauth.apple]
enabled = false
... (omitted for brevity)
```
Once you have finished making changes, don't forget to restart your development environment by running the command `nhost up` after modifying your configuration.
:::info
While it may be convenient to modify your local environment for development, the further it deviates from production, the harder it is to detect issues before release. Therefore, we recommend keeping changes strictly necessary
:::

84
docs/docs/cli/seeds.mdx Normal file
View File

@@ -0,0 +1,84 @@
---
title: 'Seeds'
sidebar_label: 'Seeds'
sidebar_position: 5
---
When developing locally, it is very useful to work with a known set of data as it can simplify testing and development, especially when working in larger teams with multiple developers.
With the CLI, it is easy to extract data from an existing environment and generate a "seed" that can be shared and used to pre-populate any development environment as it initializes.
As mentioned before, you can create a seed from any environment. In this guide, we will assume that we have already started a local development with a table called "animals". At this point, we can add some data ourselves as usual. Once we are satisfied and have the data we want, we can run the following command to create a seed:
```
$ nhost dev hasura seed create some-initial-data \
--endpoint https://local.hasura.nhost.run \
--admin-secret nhost-admin-secret \
--database-name default \
--from-table animals
INFO created seed file successfully file=/app/seeds/default/1685692310174_some-initial-data.sql
```
:::info
In the previous command, we instructed the CLI to create a seed named `some-initial-data` while specifying the connection parameters for our local environment. You could also extract data from a cloud project by specifying the correct parameters. Finally, we are only extracting data from the `animals` table, but you could also extract data from any other table or even from all tables
:::
We can now inspect the file and see its contents:
```
$ cat nhost/seeds/default/1685692310174_some-initial-data.sql
SET check_function_bodies = false;
INSERT INTO public.animals (id, created_at, updated_at, name) VALUES ('d50ff2e8-ec2a-496b-a2e6-a50eecccdb16', '2023-05-16 14:01:59.072576+00', '2023-05-16 14:01:59.072576+00', 'dog');
INSERT INTO public.animals (id, created_at, updated_at, name) VALUES ('8224ec02-6fed-48ff-8c06-6c36298d0fd0', '2023-05-16 14:02:06.300074+00', '2023-05-16 14:02:06.300074+00', 'cat');
```
Now, when you start a new development environment you can pass the `--apply-seeds` argument to pre-populate your environment with the seeds:
```
$ nhost up --apply-seeds
Setting up Nhost development environment...
Starting Nhost development environment...
(...) omitted for brevity
Applying migrations...
INFO migrations applied on database: default
Applying metadata...
INFO Metadata applied
Applying seeds...
INFO Seed data planted for database: default
(...) omitted for brevity
```
Or you could also apply the seeds yourself after starting nhost:
```
$ nhost up
Setting up Nhost development environment...
Starting Nhost development environment...
(...) omitted for brevity
Applying migrations...
INFO migrations applied on database: default
Applying metadata...
INFO Metadata applied
(...) omitted for brevity
$ nhost dev hasura seed apply \
--endpoint https://local.hasura.nhost.run \
--admin-secret nhost-admin-secret \
--database-name default
INFO Help us improve Hasura! The cli collects anonymized usage stats which
allow us to keep improving Hasura at warp speed. To opt-out or read more,
visit https://hasura.io/docs/latest/graphql/core/guides/telemetry.html
INFO Seeds planted
```
:::info
Seeds are different from migrations because seeds are not automatically applied. If there is data that you want to have in all of your environments, it is best to use a database migration.
:::

View File

@@ -36,17 +36,35 @@ yarn add @nhost/nhost-js graphql
## Initializing
Initialize a single `nhost` instance using your Nhost backend URL:
Initialize a single `nhost` instance using your Nhost `subdomain` and `region`:
```ts title=utils/nhost.ts
```ts title=src/lib/nhost.ts
import { NhostClient } from '@nhost/nhost-js'
const nhost = new NhostClient({
export const nhost = new NhostClient({
subdomain: '<your-subdomain>',
region: '<your-region>'
})
```
## Using custom URLs
There are cases where you might want to use a custom URL for one or more of the
services (e.g: when you are self-hosting or you are running services on custom
ports). You can do this by passing in the custom URLs when initializing the
Nhost client:
```ts title=src/lib/nhost.ts
import { NhostClient } from '@nhost/nhost-js'
export const nhost = new NhostClient({
authUrl: 'https://auth.mydomain.com',
storageUrl: 'https://storage.mydomain.com',
graphqlUrl: 'https://graphql.mydomain.com',
functionsUrl: 'https://functions.mydomain.com'
})
```
## GraphQL Support
The Nhost client has a small GraphQL client built-in which is great to use server-side or in very simple frontend apps. For more serious frontend apps, we recommend using a more complete GraphQL client such as:

View File

@@ -31,12 +31,12 @@ yarn add @nhost/nextjs graphql
## Initializing
Initialize a single `nhost` instance and wrap your app with the `NhostProvider`.
```jsx title=pages/_app.js
import type { AppProps } from 'next/app'
Initialize a single `nhost` instance using your Nhost `subdomain` and `region`,
and wrap your app with the `NhostProvider`:
```tsx title=pages/_app.tsx
import { NhostClient, NhostProvider } from '@nhost/nextjs'
import type { AppProps } from 'next/app'
const nhost = new NhostClient({
subdomain: '<your-subdomain>',
@@ -60,6 +60,35 @@ The `nhost` instance created with the `NhostClient` above is the same as the [Ja
:::
## Using custom URLs
There are cases where you might want to use a custom URL for one or more of the
services (e.g: when you are self-hosting or you are running services on custom
ports). You can do this by passing in the custom URLs when initializing the
Nhost client:
```tsx title=pages/_app.tsx
import { NhostClient, NhostProvider } from '@nhost/nextjs'
import type { AppProps } from 'next/app'
const nhost = new NhostClient({
authUrl: 'https://auth.mydomain.com',
storageUrl: 'https://storage.mydomain.com',
graphqlUrl: 'https://graphql.mydomain.com',
functionsUrl: 'https://functions.mydomain.com'
})
function MyApp({ Component, pageProps }: AppProps) {
return (
<NhostProvider nhost={nhost} initial={pageProps.nhostSession}>
<Component {...pageProps} />
</NhostProvider>
)
}
export default MyApp
```
## Server-Side Rendering (SSR)
You need to load the session from the server first from `getServerSideProps`. Once it is done, the `_app` component will make sure to load or update the session through `pageProps`.

View File

@@ -31,17 +31,33 @@ yarn add @nhost/react graphql
## Initializing
After installation, initialize a single Nhost Client (`nhost`) under `src/lib/nhost.js`.
Initialize a single `nhost` instance using your Nhost `subdomain` and `region`:
```jsx title=src/lib/nhost.js
import { NhostClient } from '@nhost/react'
const nhost = new NhostClient({
export const nhost = new NhostClient({
subdomain: '<your-subdomain>',
region: '<your-region>'
})
```
export { nhost }
## Using custom URLs
There are cases where you might want to use a custom URL for one or more of the
services (e.g: when you are self-hosting or you are running services on custom
ports). You can do this by passing in the custom URLs when initializing the
Nhost client:
```ts title=src/lib/nhost.ts
import { NhostClient } from '@nhost/react'
export const nhost = new NhostClient({
authUrl: 'https://auth.mydomain.com',
storageUrl: 'https://storage.mydomain.com',
graphqlUrl: 'https://graphql.mydomain.com',
functionsUrl: 'https://functions.mydomain.com'
})
```
Import `nhost` and wrap your app with the `NhostProvider`.

View File

@@ -31,12 +31,12 @@ yarn add @nhost/vue graphql
## Initializing
Initialize a single `nhost` instance, and install it as a plugin in your Vue app.
Initialize a single `nhost` instance using your Nhost `subdomain` and `region`,
and install it as a plugin in your Vue app:
```js title=src/main.js
import { createApp } from 'vue'
import { NhostClient } from '@nhost/vue'
import { createApp } from 'vue'
import App from './App.vue'
const nhost = new NhostClient({
@@ -46,3 +46,25 @@ const nhost = new NhostClient({
createApp(App).use(nhost).mount('#app')
```
## Using custom URLs
There are cases where you might want to use a custom URL for one or more of the
services (e.g: when you are self-hosting or you are running services on custom
ports). You can do this by passing in the custom URLs when initializing the
Nhost client:
```js title=src/main.js
import { NhostClient } from '@nhost/vue'
import { createApp } from 'vue'
import App from './App.vue'
const nhost = new NhostClient({
authUrl: 'https://auth.mydomain.com',
storageUrl: 'https://storage.mydomain.com',
graphqlUrl: 'https://graphql.mydomain.com',
functionsUrl: 'https://functions.mydomain.com'
})
createApp(App).use(nhost).mount('#app')
```

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/docs",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",

View File

@@ -0,0 +1,3 @@
SUBDOMAIN="local"
REGION=""
ADMIN_SECRET="nhost-admin-secret"

1
examples/node-storage/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.secrets.nhost

View File

@@ -0,0 +1,8 @@
# @nhost-examples/node-storage
## 0.0.2
### Patch Changes
- 4c00a796e: feat: add example for Storage + Node.js
- @nhost/nhost-js@2.2.7

View File

@@ -0,0 +1,30 @@
# Node.js Storage Example
This example demonstrates how to use the [Nhost Storage SDK](https://docs.nhost.io/reference/javascript/storage) in Node.js.
Make sure to install the dependencies:
```bash
pnpm install
```
## Settting up the environment
Create a `.env` file in the root of the project with the following content:
```bash
SUBDOMAIN=<your-subdomain>
REGION=<your-region>
ADMIN_SECRET=<your-admin-secret>
```
You can use the `.env.example` file as a starting point.
## Running the example
```bash
pnpm start
```
The example will download a file from a public URL and upload it to your Nhost
Storage bucket.

View File

@@ -0,0 +1 @@
version: 3

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Потвърдете смяната на вашия имейл</h2>
<p>Използвайте посочения линк, за да повърдите смяната на имейл:</p>
<p>
<a href="${link}">
Смени имейл
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Потвърждение за смяна на имейл

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Потвърдете вашия имейл</h2>
<p>Използвайте посочения линк, за да потвърдите вашия имейл:</p>
<p>
<a href="${link}">
Потвърдете имейл
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Потвърждаване на имейл

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Смяна на парола</h2>
<p>Използвайте посочения линк, за да смените вашата парола:</p>
<p>
<a href="${link}">
Смяна на парола
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Смяна на парола

View File

@@ -0,0 +1 @@
Вашият код е ${code}.

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Магически линк за вход</h2>
<p>Използвайте посочения линк за защитен и бърз вход:</p>
<p>
<a href="${link}">
Вход
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Магически линк за вход

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Potvrzení změny emailové adresy</h2>
<p>Použijte tento odkaz k potvrzení změny emailové adresy:</p>
<p>
<a href="${link}">
Změnit email
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Změna vaší emailové adresy

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Ověření emailové adresy</h2>
<p>Použijte tento odkaz k ověření vaší emailové adresy:</p>
<p>
<a href="${link}">
Ověřit emailovou adresu
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Ověření vaší emailové adresy

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Obnova hesla</h2>
<p>Použijte tento odkaz k obnovení vašeho hesla:</p>
<p>
<a href="${link}">
Obnova hesla
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Obnova hesla

View File

@@ -0,0 +1 @@
Váš kód je ${code}.

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Magický odkaz</h2>
<p>Použijte tento odkaz k bezpečnému přihlášení:</p>
<p>
<a href="${link}">
Přihlášení
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Bezpečný odkaz k přihlášení

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Confirm Email Change</h2>
<p>Use this link to confirm changing email:</p>
<p>
<a href="${link}">
Change email
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Change your email address

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Verify Email</h2>
<p>Use this link to verify your email:</p>
<p>
<a href="${link}">
Verify Email
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Verify your email

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Reset Password</h2>
<p>Use this link to reset your password:</p>
<p>
<a href="${link}">
Reset password
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Reset your password

View File

@@ -0,0 +1 @@
Your code is ${code}.

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Magic Link</h2>
<p>Use this link to securely sign in:</p>
<p>
<a href="${link}">
Sign In
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Secure sign-in link

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Confirmar cambio de correo electrónico</h2>
<p>Utiliza el siguiente enlace para confirmar el cambio de correo:</p>
<p>
<a href="${link}">
Cambiar correo electrónico
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Cambiar dirección de correo electrónico

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Verificar correo electrónico</h2>
<p>Utilza el siguiente enlace para verificar tu correo:</p>
<p>
<a href="${link}">
Verificar correo electrónico
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Verifica tu correo electrónico

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Recuperar contraseña</h2>
<p>Utiliza el siguiente enlace para recuperar tu contraseña:</p>
<p>
<a href="${link}">
Recuperar contraseña
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Recuperar contraseña

View File

@@ -0,0 +1 @@
Tu código es ${code}.

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Enlace mágico</h2>
<p>Utiliza este enlace para iniciar sesión de forma segura:</p>
<p>
<a href="${link}">
Iniciar sesión
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Enlace de acceso seguro

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Confirmer changement de courriel</h2>
<p>Utilisez ce lien pour confirmer le changement de courriel:</p>
<p>
<a href="${link}">
Changer courriel
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Changez votre adresse courriel

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>V&eacute;rifiez votre courriel</h2>
<p>Utilisez ce lien pour v&eacute;rifier votre courriel:</p>
<p>
<a href="${link}">
V&eacute;rifier courriel
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Vérifier votre courriel

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>R&eacute;initializer votre mot de passe</h2>
<p>Utilisez ce lien pour r&eacute;initializer votre mot de passe:</p>
<p>
<a href="${link}">
R&eacute;initializer mot de passe
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Réinitialiser votre mot de passe

View File

@@ -0,0 +1 @@
Votre code est ${code}.

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<h2>Lien magique</h2>
<p>Utilisez ce lien pour vous connecter de fa&ccedil;on s&eacute;curitaire:</p>
<p>
<a href="${link}">
Connexion
</a>
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
Lien de connexion sécurisé

View File

@@ -0,0 +1,145 @@
[global]
[hasura]
version = 'v2.25.1-ce'
adminSecret = '{{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}'
webhookSecret = '{{ secrets.NHOST_WEBHOOK_SECRET }}'
[[hasura.jwtSecrets]]
type = 'HS256'
key = '{{ secrets.HASURA_GRAPHQL_JWT_SECRET }}'
[hasura.settings]
corsDomain = ['*']
devMode = true
enableAllowList = false
enableConsole = true
enableRemoteSchemaPermissions = false
enabledAPIs = ['metadata', 'graphql', 'pgdump', 'config']
[hasura.logs]
level = 'warn'
[hasura.events]
httpPoolSize = 100
[functions]
[functions.node]
version = 16
[auth]
version = '0.20.1'
[auth.redirections]
clientUrl = 'http://localhost:3000'
[auth.signUp]
enabled = true
[auth.user]
[auth.user.roles]
default = 'user'
allowed = ['user', 'me']
[auth.user.locale]
default = 'en'
allowed = ['en']
[auth.user.gravatar]
enabled = true
default = 'blank'
rating = 'g'
[auth.user.email]
[auth.user.emailDomains]
[auth.session]
[auth.session.accessToken]
expiresIn = 900
[auth.session.refreshToken]
expiresIn = 43200
[auth.method]
[auth.method.anonymous]
enabled = false
[auth.method.emailPasswordless]
enabled = false
[auth.method.emailPassword]
hibpEnabled = false
emailVerificationRequired = true
passwordMinLength = 9
[auth.method.smsPasswordless]
enabled = false
[auth.method.oauth]
[auth.method.oauth.apple]
enabled = false
[auth.method.oauth.azuread]
tenant = 'common'
enabled = false
[auth.method.oauth.bitbucket]
enabled = false
[auth.method.oauth.discord]
enabled = false
[auth.method.oauth.facebook]
enabled = false
[auth.method.oauth.github]
enabled = false
[auth.method.oauth.gitlab]
enabled = false
[auth.method.oauth.google]
enabled = false
[auth.method.oauth.linkedin]
enabled = false
[auth.method.oauth.spotify]
enabled = false
[auth.method.oauth.strava]
enabled = false
[auth.method.oauth.twitch]
enabled = false
[auth.method.oauth.twitter]
enabled = false
[auth.method.oauth.windowslive]
enabled = false
[auth.method.oauth.workos]
enabled = false
[auth.method.webauthn]
enabled = false
[auth.method.webauthn.attestation]
timeout = 60000
[auth.totp]
enabled = false
[postgres]
version = '14.6-20230406-2'
[provider]
[storage]
version = '0.3.5'
[observability]
[observability.grafana]
adminPassword = '{{ secrets.GRAFANA_ADMIN_PASSWORD }}'

View File

@@ -0,0 +1,22 @@
{
"name": "@nhost-examples/node-storage",
"version": "0.0.2",
"private": true,
"description": "This is an example of how to use the Storage with Node.js",
"main": "src/index.mjs",
"type": "module",
"scripts": {
"start": "node src/index.mjs"
},
"author": "",
"license": "ISC",
"dependencies": {
"@nhost/nhost-js": "*",
"dotenv": "^16.1.3",
"form-data": "^4.0.0",
"node-fetch": "^3.3.0"
},
"devDependencies": {
"@types/node": "^18.15.11"
}
}

148
examples/node-storage/pnpm-lock.yaml generated Normal file
View File

@@ -0,0 +1,148 @@
lockfileVersion: '6.0'
dependencies:
'@nhost/nhost-js':
specifier: '*'
version: 0.0.1-0
dotenv:
specifier: ^16.1.3
version: 16.1.3
form-data:
specifier: ^4.0.0
version: 4.0.0
node-fetch:
specifier: ^3.3.0
version: 3.3.0
devDependencies:
'@types/node':
specifier: ^18.15.11
version: 18.15.11
packages:
/@nhost/nhost-js@0.0.1-0:
resolution: {integrity: sha512-fXAhovIYPpuzrSewFjaI3AYgp/iUj07A0+sgPUL73k61DwrPBt1wa533xjoupQVVB9KQHnYIXPJO8wn3pEvphQ==}
dependencies:
jwt-decode: 3.1.2
query-string: 7.1.3
dev: false
/@types/node@18.15.11:
resolution: {integrity: sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==}
dev: true
/asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
dev: false
/combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
dependencies:
delayed-stream: 1.0.0
dev: false
/data-uri-to-buffer@4.0.1:
resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
engines: {node: '>= 12'}
dev: false
/decode-uri-component@0.2.2:
resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==}
engines: {node: '>=0.10'}
dev: false
/delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
dev: false
/dotenv@16.1.3:
resolution: {integrity: sha512-FYssxsmCTtKL72fGBSvb1K9dRz0/VZeWqFme/vSb7r7323x4CRaHu4LvQ5JG3+s6yt2YPbBrkpiEODktfyjI9A==}
engines: {node: '>=12'}
dev: false
/fetch-blob@3.2.0:
resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
engines: {node: ^12.20 || >= 14.13}
dependencies:
node-domexception: 1.0.0
web-streams-polyfill: 3.2.1
dev: false
/filter-obj@1.1.0:
resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==}
engines: {node: '>=0.10.0'}
dev: false
/form-data@4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
dev: false
/formdata-polyfill@4.0.10:
resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
engines: {node: '>=12.20.0'}
dependencies:
fetch-blob: 3.2.0
dev: false
/jwt-decode@3.1.2:
resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==}
dev: false
/mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
dev: false
/mime-types@2.1.35:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
dependencies:
mime-db: 1.52.0
dev: false
/node-domexception@1.0.0:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
dev: false
/node-fetch@3.3.0:
resolution: {integrity: sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
data-uri-to-buffer: 4.0.1
fetch-blob: 3.2.0
formdata-polyfill: 4.0.10
dev: false
/query-string@7.1.3:
resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==}
engines: {node: '>=6'}
dependencies:
decode-uri-component: 0.2.2
filter-obj: 1.1.0
split-on-first: 1.1.0
strict-uri-encode: 2.0.0
dev: false
/split-on-first@1.1.0:
resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==}
engines: {node: '>=6'}
dev: false
/strict-uri-encode@2.0.0:
resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==}
engines: {node: '>=4'}
dev: false
/web-streams-polyfill@3.2.1:
resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==}
engines: {node: '>= 8'}
dev: false

View File

@@ -0,0 +1,14 @@
import { NhostClient } from '@nhost/nhost-js'
/**
* Create a new Nhost client.
*
* @returns {NhostClient} A new Nhost client.
*/
export function createClient() {
return new NhostClient({
subdomain: process.env.SUBDOMAIN,
region: process.env.REGION,
adminSecret: process.env.ADMIN_SECRET
})
}

View File

@@ -0,0 +1,62 @@
import dotenv from 'dotenv'
import FormData from 'form-data'
import fetch from 'node-fetch'
import { createClient } from './client.mjs'
dotenv.config()
const client = createClient()
async function uploadImage() {
try {
// Download image from remote URL
const response = await fetch(
'https://hips.hearstapps.com/hmg-prod/images/cute-cat-photos-1593441022.jpg?crop=1.00xw:0.753xh;0,0.153xh&resize=1200:*'
)
if (!response.ok) {
console.error('Image not found!')
return
}
const arrayBuffer = await response.arrayBuffer()
const formData = new FormData()
formData.append('file[]', Buffer.from(arrayBuffer), 'cat.jpg')
// Upload file to Nhost Storage
const { error: uploadError, fileMetadata } = await client.storage.upload({
formData,
headers: { ...formData.getHeaders() }
})
if (uploadError) {
console.error(uploadError)
return
}
console.info(`File has been uploaded successfully!`)
const uploadedFile =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
console.info(`ID: ${uploadedFile?.id}`)
// Generate a presigned URL for the uploaded file
const { error: presignError, presignedUrl: blurredImage } =
await client.storage.getPresignedUrl({ fileId: uploadedFile.id })
if (presignError) {
console.error(presignError)
return
}
console.info(`Presigned URL: ${blurredImage.url}`)
} catch (error) {
console.error(error.message)
}
}
uploadImage()

View File

@@ -1,5 +1,11 @@
# @nhost-examples/react-apollo
## 0.1.13
### Patch Changes
- e3001ba4a: fix(examples): don't break E2E tests
## 0.1.12
### Patch Changes

View File

@@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker'
import { expect, test } from '@playwright/test'
import { signUpWithEmailAndPassword, verifyEmail } from '../utils'
test('should be able to change email', async ({ page }) => {
test('should be able to change email', async ({ page, browser }) => {
const email = faker.internet.email()
const password = faker.internet.password()
@@ -25,10 +25,12 @@ test('should be able to change email', async ({ page }) => {
await newPage.getByRole('button', { name: /sign out/i }).click()
const mailhogPage = await browser.newPage()
const updatedEmailPage = await verifyEmail({
page: newPage,
page: mailhogPage,
email: newEmail,
context: page.context(),
context: mailhogPage.context(),
linkText: /change email/i
})

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/react-apollo",
"version": "0.1.12",
"version": "0.1.13",
"private": true,
"dependencies": {
"@apollo/client": "^3.7.14",
@@ -22,8 +22,8 @@
"scripts": {
"dev": "vite --host localhost --port 3000",
"generate": "graphql-codegen --config graphql.config.yaml",
"e2e": "start-test e2e:start-backend https-get://local.hasura.nhost.run e2e:test",
"e2e:test": "npx playwright@1.34.0 install --with-deps && playwright test",
"e2e": "pnpm e2e:start-backend && pnpm e2e:test",
"e2e:test": "npx playwright@1.34.0 install --with-deps && playwright test; nhost down",
"e2e:start-backend": "cp .secrets.example .secrets && nhost up",
"e2e:start-ui": "run-s build preview",
"build": "vite build",
@@ -61,7 +61,6 @@
"dotenv": "^16.0.3",
"jsqr": "^1.4.0",
"pngjs": "^7.0.0",
"start-server-and-test": "^1.15.4",
"totp-generator": "^0.0.13",
"typescript": "^4.9.5",
"vite": "^4.3.7",

View File

@@ -87,9 +87,6 @@ devDependencies:
pngjs:
specifier: ^7.0.0
version: 7.0.0
start-server-and-test:
specifier: ^1.15.4
version: 1.15.4
totp-generator:
specifier: ^0.0.13
version: 0.0.13
@@ -1091,16 +1088,6 @@ packages:
dependencies:
graphql: 16.6.0
/@hapi/hoek@9.3.0:
resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==}
dev: true
/@hapi/topo@5.1.0:
resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==}
dependencies:
'@hapi/hoek': 9.3.0
dev: true
/@jridgewell/gen-mapping@0.3.3:
resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}
engines: {node: '>=6.0.0'}
@@ -1470,20 +1457,6 @@ packages:
resolution: {integrity: sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==}
dev: true
/@sideway/address@4.1.4:
resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==}
dependencies:
'@hapi/hoek': 9.3.0
dev: true
/@sideway/formula@3.0.1:
resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==}
dev: true
/@sideway/pinpoint@2.0.0:
resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==}
dev: true
/@tsconfig/node10@1.0.9:
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
dev: true
@@ -1836,10 +1809,6 @@ packages:
resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}
dev: true
/arg@5.0.2:
resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
dev: true
/argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: true
@@ -1863,10 +1832,6 @@ packages:
engines: {node: '>=8'}
dev: true
/asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
dev: true
/attr-accept@2.2.2:
resolution: {integrity: sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==}
engines: {node: '>=4'}
@@ -1875,20 +1840,11 @@ packages:
/axios@0.25.0:
resolution: {integrity: sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==}
dependencies:
follow-redirects: 1.15.2(debug@4.3.4)
follow-redirects: 1.15.2
transitivePeerDependencies:
- debug
dev: false
/axios@0.27.2(debug@4.3.4):
resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==}
dependencies:
follow-redirects: 1.15.2(debug@4.3.4)
form-data: 4.0.0
transitivePeerDependencies:
- debug
dev: true
/backo2@1.0.2:
resolution: {integrity: sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==}
dev: false
@@ -1913,10 +1869,6 @@ packages:
readable-stream: 3.6.2
dev: true
/bluebird@3.7.2:
resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==}
dev: true
/brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@@ -2039,11 +1991,6 @@ packages:
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
dev: true
/check-more-types@2.24.0:
resolution: {integrity: sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==}
engines: {node: '>= 0.8.0'}
dev: true
/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
engines: {node: '>= 8.10.0'}
@@ -2131,13 +2078,6 @@ packages:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
dev: true
/combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
dependencies:
delayed-stream: 1.0.0
dev: true
/common-tags@1.8.2:
resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==}
engines: {node: '>=4.0.0'}
@@ -2205,15 +2145,6 @@ packages:
- encoding
dev: true
/cross-spawn@7.0.3:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
dependencies:
path-key: 3.1.1
shebang-command: 2.0.0
which: 2.0.2
dev: true
/csstype@3.0.9:
resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==}
dev: false
@@ -2246,11 +2177,6 @@ packages:
clone: 1.0.4
dev: true
/delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
dev: true
/detect-indent@6.1.0:
resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==}
engines: {node: '>=8'}
@@ -2292,10 +2218,6 @@ packages:
engines: {node: '>=4'}
dev: true
/duplexer@0.1.2:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
dev: true
/electron-to-chromium@1.4.416:
resolution: {integrity: sha512-AUYh0XDTb2vrj0rj82jb3P9hHSyzQNdTPYWZIhPdCOui7/vpme7+HTE07BE5jwuqg/34TZ8ktlRz6GImJ4IXjA==}
@@ -2347,18 +2269,6 @@ packages:
resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
engines: {node: '>=0.8.0'}
/event-stream@3.3.4:
resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==}
dependencies:
duplexer: 0.1.2
from: 0.1.7
map-stream: 0.1.0
pause-stream: 0.0.11
split: 0.3.3
stream-combiner: 0.0.4
through: 2.3.8
dev: true
/eventemitter3@3.1.2:
resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==}
dev: false
@@ -2367,21 +2277,6 @@ packages:
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
dev: false
/execa@5.1.1:
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
engines: {node: '>=10'}
dependencies:
cross-spawn: 7.0.3
get-stream: 6.0.1
human-signals: 2.1.0
is-stream: 2.0.1
merge-stream: 2.0.0
npm-run-path: 4.0.1
onetime: 5.1.2
signal-exit: 3.0.7
strip-final-newline: 2.0.0
dev: true
/external-editor@3.1.0:
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
engines: {node: '>=4'}
@@ -2458,7 +2353,7 @@ packages:
to-regex-range: 5.0.1
dev: true
/follow-redirects@1.15.2(debug@4.3.4):
/follow-redirects@1.15.2:
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
peerDependencies:
@@ -2466,21 +2361,7 @@ packages:
peerDependenciesMeta:
debug:
optional: true
dependencies:
debug: 4.3.4
/form-data@4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
dev: true
/from@0.1.7:
resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==}
dev: true
dev: false
/fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
@@ -2503,11 +2384,6 @@ packages:
engines: {node: 6.* || 8.* || >= 10.*}
dev: true
/get-stream@6.0.1:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
dev: true
/glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
@@ -2648,11 +2524,6 @@ packages:
- supports-color
dev: true
/human-signals@2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
dev: true
/iconv-lite@0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
@@ -2766,11 +2637,6 @@ packages:
engines: {node: '>=0.12.0'}
dev: true
/is-stream@2.0.1:
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
engines: {node: '>=8'}
dev: true
/is-unicode-supported@0.1.0:
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'}
@@ -2782,10 +2648,6 @@ packages:
tslib: 2.5.2
dev: true
/isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
dev: true
/isomorphic-ws@5.0.0(ws@8.13.0):
resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==}
peerDependencies:
@@ -2803,16 +2665,6 @@ packages:
hasBin: true
dev: true
/joi@17.9.2:
resolution: {integrity: sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==}
dependencies:
'@hapi/hoek': 9.3.0
'@hapi/topo': 5.1.0
'@sideway/address': 4.1.4
'@sideway/formula': 3.0.1
'@sideway/pinpoint': 2.0.0
dev: true
/jose@4.14.4:
resolution: {integrity: sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==}
dev: true
@@ -2872,11 +2724,6 @@ packages:
resolution: {integrity: sha512-w9OtT4ALL+fbbwG3gw7erAO0jvS5nfvrukGPMWIAoea359B26ALXGpzy4YJSp9yGnpUvuvOw1nSjSoHDfWSr1w==}
dev: true
/lazy-ass@1.6.0:
resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==}
engines: {node: '> 0.8'}
dev: true
/lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
dev: true
@@ -2957,14 +2804,6 @@ packages:
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}
dev: true
/map-stream@0.1.0:
resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==}
dev: true
/merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
dev: true
/merge2@1.4.1:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
@@ -2990,18 +2829,6 @@ packages:
picomatch: 2.3.1
dev: true
/mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
dev: true
/mime-types@2.1.35:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
dependencies:
mime-db: 1.52.0
dev: true
/mimic-fn@2.1.0:
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
engines: {node: '>=6'}
@@ -3020,10 +2847,6 @@ packages:
brace-expansion: 1.1.11
dev: true
/minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
dev: true
/ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
@@ -3071,13 +2894,6 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/npm-run-path@4.0.1:
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
engines: {node: '>=8'}
dependencies:
path-key: 3.1.1
dev: true
/object-assign@4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
@@ -3210,22 +3026,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: false
/path-key@3.1.1:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
dev: true
/path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
dev: true
/pause-stream@0.0.11:
resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==}
dependencies:
through: 2.3.8
dev: true
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@@ -3269,14 +3074,6 @@ packages:
react-is: 16.13.1
dev: false
/ps-tree@1.2.0:
resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==}
engines: {node: '>= 0.10'}
hasBin: true
dependencies:
event-stream: 3.3.4
dev: true
/punycode@1.4.1:
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
dev: true
@@ -3542,18 +3339,6 @@ packages:
upper-case-first: 2.0.2
dev: true
/shebang-command@2.0.0:
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
dependencies:
shebang-regex: 3.0.0
dev: true
/shebang-regex@3.0.0:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
dev: true
/shell-quote@1.8.1:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
dev: true
@@ -3597,41 +3382,12 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/split@0.3.3:
resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==}
dependencies:
through: 2.3.8
dev: true
/sponge-case@1.0.1:
resolution: {integrity: sha512-dblb9Et4DAtiZ5YSUZHLl4XhH4uK80GhAZrVXdN4O2P4gQ40Wa5UIOPUHlA/nFd2PLblBZWUioLMMAVrgpoYcA==}
dependencies:
tslib: 2.5.2
dev: true
/start-server-and-test@1.15.4:
resolution: {integrity: sha512-ucQtp5+UCr0m4aHlY+aEV2JSYNTiMZKdSKK/bsIr6AlmwAWDYDnV7uGlWWEtWa7T4XvRI5cPYcPcQgeLqpz+Tg==}
engines: {node: '>=6'}
hasBin: true
dependencies:
arg: 5.0.2
bluebird: 3.7.2
check-more-types: 2.24.0
debug: 4.3.4
execa: 5.1.1
lazy-ass: 1.6.0
ps-tree: 1.2.0
wait-on: 7.0.1(debug@4.3.4)
transitivePeerDependencies:
- supports-color
dev: true
/stream-combiner@0.0.4:
resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==}
dependencies:
duplexer: 0.1.2
dev: true
/streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
@@ -3663,11 +3419,6 @@ packages:
ansi-regex: 5.0.1
dev: true
/strip-final-newline@2.0.0:
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
dev: true
/stylis@4.0.13:
resolution: {integrity: sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==}
dev: false
@@ -3975,20 +3726,6 @@ packages:
fsevents: 2.3.2
dev: true
/wait-on@7.0.1(debug@4.3.4):
resolution: {integrity: sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==}
engines: {node: '>=12.0.0'}
hasBin: true
dependencies:
axios: 0.27.2(debug@4.3.4)
joi: 17.9.2
lodash: 4.17.21
minimist: 1.2.8
rxjs: 7.8.1
transitivePeerDependencies:
- debug
dev: true
/warning@4.0.3:
resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==}
dependencies:
@@ -4027,14 +3764,6 @@ packages:
webidl-conversions: 3.0.1
dev: true
/which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
hasBin: true
dependencies:
isexe: 2.0.0
dev: true
/wrap-ansi@6.2.0:
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
engines: {node: '>=8'}

View File

@@ -1,5 +1,13 @@
# @nhost-examples/vue-quickstart
## 0.0.9
### Patch Changes
- 4c00a796e: chore(autoimports): update type definitions
- @nhost/apollo@5.2.9
- @nhost/vue@1.13.27
## 0.0.8
### Patch Changes

View File

@@ -13,7 +13,9 @@ declare global {
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
@@ -21,9 +23,6 @@ declare global {
const extendRef: typeof import('@vueuse/core')['extendRef']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const isDefined: typeof import('@vueuse/core')['isDefined']
const logicAnd: typeof import('@vueuse/core')['logicAnd']
const logicNot: typeof import('@vueuse/core')['logicNot']
const logicOr: typeof import('@vueuse/core')['logicOr']
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
@@ -48,6 +47,8 @@ declare global {
const throttledRef: typeof import('@vueuse/core')['throttledRef']
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
const toReactive: typeof import('@vueuse/core')['toReactive']
const toRef: typeof import('@vueuse/core')['toRef']
const toValue: typeof import('@vueuse/core')['toValue']
const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
@@ -56,6 +57,19 @@ declare global {
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useAnimate: typeof import('@vueuse/core')['useAnimate']
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
const useArraySome: typeof import('@vueuse/core')['useArraySome']
const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useBase64: typeof import('@vueuse/core')['useBase64']
@@ -65,8 +79,8 @@ declare global {
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
const useCached: typeof import('@vueuse/core')['useCached']
const useClamp: typeof import('@vueuse/core')['useClamp']
const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useCloned: typeof import('@vueuse/core')['useCloned']
const useColorMode: typeof import('@vueuse/core')['useColorMode']
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
const useCounter: typeof import('@vueuse/core')['useCounter']
@@ -133,12 +147,18 @@ declare global {
const useOnline: typeof import('@vueuse/core')['useOnline']
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
const useParallax: typeof import('@vueuse/core')['useParallax']
const useParentElement: typeof import('@vueuse/core')['useParentElement']
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
const usePermission: typeof import('@vueuse/core')['usePermission']
const usePointer: typeof import('@vueuse/core')['usePointer']
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
const usePrevious: typeof import('@vueuse/core')['usePrevious']
const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
@@ -151,15 +171,18 @@ declare global {
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
const useShare: typeof import('@vueuse/core')['useShare']
const useSorted: typeof import('@vueuse/core')['useSorted']
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
const useStepper: typeof import('@vueuse/core')['useStepper']
const useStorage: typeof import('@vueuse/core')['useStorage']
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
const useSupported: typeof import('@vueuse/core')['useSupported']
const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
const useThrottle: typeof import('@vueuse/core')['useThrottle']
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
@@ -171,6 +194,8 @@ declare global {
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
const useTitle: typeof import('@vueuse/core')['useTitle']
const useToggle: typeof import('@vueuse/core')['useToggle']
const useToNumber: typeof import('@vueuse/core')['useToNumber']
const useToString: typeof import('@vueuse/core')['useToString']
const useTransition: typeof import('@vueuse/core')['useTransition']
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
@@ -189,7 +214,9 @@ declare global {
const watchArray: typeof import('@vueuse/core')['watchArray']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
const watchDeep: typeof import('@vueuse/core')['watchDeep']
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
const watchOnce: typeof import('@vueuse/core')['watchOnce']
const watchPausable: typeof import('@vueuse/core')['watchPausable']
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/vue-quickstart",
"version": "0.0.8",
"version": "0.0.9",
"private": true,
"scripts": {
"build": "vite build",

View File

@@ -1,5 +1,11 @@
# @nhost/apollo
## 5.2.9
### Patch Changes
- @nhost/nhost-js@2.2.7
## 5.2.8
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/apollo",
"version": "5.2.8",
"version": "5.2.9",
"description": "Nhost Apollo Client library",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo
## 5.0.25
### Patch Changes
- @nhost/apollo@5.2.9
- @nhost/react@2.0.21
## 5.0.24
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react-apollo",
"version": "5.0.24",
"version": "5.0.25",
"description": "Nhost React Apollo client",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react-urql
## 2.0.22
### Patch Changes
- @nhost/react@2.0.21
## 2.0.21
### Patch Changes

View File

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

View File

@@ -87,12 +87,12 @@
"resolutions": {
"graphql": "16.6.0"
},
"packageManager": "pnpm@8.6.0",
"packageManager": "pnpm@8.5.1",
"engines": {
"node": ">=16 <17",
"node": ">=18 <19",
"pnpm": ">=8.0.0"
},
"eslintConfig": {
"extends": "./config/.eslintrc.js"
}
}
}

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-storage-js
## 2.1.5
### Patch Changes
- 4c00a796e: fix(upload): don't break upload in Node 18
## 2.1.4
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/hasura-storage-js",
"version": "2.1.4",
"version": "2.1.5",
"description": "Hasura-storage client",
"license": "MIT",
"keywords": [
@@ -62,8 +62,8 @@
"docgen": "pnpm typedoc && docgen --config ./storage.docgen.json"
},
"dependencies": {
"fetch-ponyfill": "^7.1.0",
"form-data": "^4.0.0",
"isomorphic-unfetch": "^3.1.0",
"xstate": "^4.33.5"
},
"devDependencies": {

View File

@@ -1,14 +1,16 @@
import fetch from 'isomorphic-unfetch'
import fetchPonyfill from 'fetch-ponyfill'
import {
ApiDeleteParams,
ApiDeleteResponse,
ApiGetPresignedUrlParams,
ApiGetPresignedUrlResponse,
ApiUploadParams,
StorageUploadFormDataParams,
StorageUploadResponse
} from './utils/types'
import { fetchUpload } from './utils/upload'
const { fetch } = fetchPonyfill()
/**
* @internal
* This is an internal class.
@@ -22,15 +24,20 @@ export class HasuraStorageApi {
this.url = url
}
async upload(params: ApiUploadParams): Promise<StorageUploadResponse> {
const { formData } = params
async upload({
formData,
headers,
bucketId,
id,
name
}: StorageUploadFormDataParams): Promise<StorageUploadResponse> {
return fetchUpload(this.url, formData, {
accessToken: this.accessToken,
adminSecret: this.adminSecret,
bucketId: params.bucketId,
fileId: params.id,
name: params.name
bucketId,
fileId: id,
name,
headers
})
}

View File

@@ -76,19 +76,18 @@ export class HasuraStorageClient {
async upload(params: StorageUploadFileParams): Promise<StorageUploadResponse>
async upload(params: StorageUploadFormDataParams): Promise<StorageUploadResponse>
async upload(params: StorageUploadParams): Promise<StorageUploadResponse> {
let formData: FormData
if ('file' in params) {
formData = new FormData()
formData.append('file', params.file)
} else {
formData = params.formData
const formData = new FormData()
formData.append('file[]', params.file)
return this.api.upload({
...params,
formData
})
}
return this.api.upload({
...params,
formData
})
return this.api.upload(params)
}
/**

View File

@@ -143,10 +143,16 @@ export const createFileUploadMachine = () =>
if (error) {
callback({ type: 'UPLOAD_ERROR', error })
}
if (fileMetadata) {
if (fileMetadata && !('processedFiles' in fileMetadata)) {
const { id, bucketId } = fileMetadata
callback({ type: 'UPLOAD_DONE', id, bucketId })
}
if (fileMetadata && 'processedFiles' in fileMetadata) {
// TODO: Add support for multiple files
const { id, bucketId } = fileMetadata.processedFiles[0]
callback({ type: 'UPLOAD_DONE', id, bucketId })
}
})
return () => {}

View File

@@ -39,13 +39,14 @@ export interface StorageUploadFormDataParams {
id?: string
name?: string
bucketId?: string
headers?: Record<string, string>
}
// works in browser and server
export type StorageUploadParams = StorageUploadFileParams | StorageUploadFormDataParams
export type StorageUploadResponse =
| { fileMetadata: FileResponse; error: null }
| { fileMetadata: FileResponse | { processedFiles: FileResponse[] }; error: null }
| { fileMetadata: null; error: StorageErrorPayload }
export interface StorageImageTransformationParams {
@@ -94,13 +95,6 @@ export interface FileResponse {
uploadedByUserId: string
}
export interface ApiUploadParams {
formData: FormData
id?: string
name?: string
bucketId?: string
}
// TODO not implemented yet in hasura-storage
// export interface ApiGetPresignedUrlParams extends StorageImageTransformationParams {
export interface ApiGetPresignedUrlParams {

View File

@@ -1,5 +1,5 @@
import fetchPonyfill from 'fetch-ponyfill'
import FormData from 'form-data'
import fetch from 'isomorphic-unfetch'
import { StorageErrorPayload, StorageUploadResponse } from './types'
/** Convert any string into ISO-8859-1 */
@@ -12,6 +12,8 @@ export const toIso88591 = (fileName: string) => {
}
}
const { fetch } = fetchPonyfill()
export const fetchUpload = async (
backendUrl: string,
data: FormData,
@@ -21,7 +23,8 @@ export const fetchUpload = async (
fileId,
bucketId,
adminSecret,
onUploadProgress
onUploadProgress,
headers: initialHeaders = {}
}: {
accessToken?: string
name?: string
@@ -29,9 +32,13 @@ export const fetchUpload = async (
bucketId?: string
adminSecret?: string
onUploadProgress?: (event: { total: number; loaded: number }) => void
headers?: Record<string, string>
} = {}
): Promise<StorageUploadResponse> => {
const headers: HeadersInit = {}
const headers: HeadersInit = {
...initialHeaders
}
if (fileId) {
headers['x-nhost-file-id'] = fileId
}
@@ -58,16 +65,18 @@ export const fetchUpload = async (
body: data as any // * https://github.com/form-data/form-data/issues/513
})
const responseData = await response.json()
if (!response.ok) {
const error: StorageErrorPayload = {
status: response.status,
message: await response.text(),
message: responseData?.error?.message || response.statusText,
// * errors from hasura-storage are not codified
error: response.statusText
}
return { error, fileMetadata: null }
}
const fileMetadata = await response.json()
const fileMetadata = responseData
return { fileMetadata, error: null }
} catch (e) {
const error: StorageErrorPayload = {
@@ -78,6 +87,7 @@ export const fetchUpload = async (
return { error, fileMetadata: null }
}
}
// * Browser environment: XMLHttpRequest is available
return new Promise((resolve) => {
let xhr = new XMLHttpRequest()

View File

@@ -1,6 +1,5 @@
import FormData from 'form-data'
import fs from 'fs'
import fetch from 'isomorphic-unfetch'
import { v4 as uuidv4 } from 'uuid'
import { describe, expect, it } from 'vitest'
import { storage } from './utils/helpers'
@@ -12,8 +11,17 @@ describe('test get presigned url of file', () => {
const { fileMetadata } = await storage.upload({ formData })
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const fileId =
'processedFiles' in fileMetadata
? fileMetadata.processedFiles[0]?.id
: (fileMetadata.id as string)
const { presignedUrl, error } = await storage.getPresignedUrl({
fileId: fileMetadata?.id as string
fileId
})
expect(presignedUrl).not.toBeNull()

View File

@@ -1,6 +1,5 @@
import FormData from 'form-data'
import fs from 'fs'
import fetch from 'isomorphic-unfetch'
import { v4 as uuidv4 } from 'uuid'
import { describe, expect, it } from 'vitest'
import { storage } from './utils/helpers'
@@ -15,8 +14,17 @@ describe('test get file', () => {
})
expect(error).toBeNull()
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const fileId =
'processedFiles' in fileMetadata
? fileMetadata.processedFiles[0]?.id
: (fileMetadata.id as string)
const url = storage.getPublicUrl({
fileId: fileMetadata?.id as string
fileId
})
expect(url).toBeTruthy()

View File

@@ -1,6 +1,5 @@
import FormData from 'form-data'
import fs from 'fs'
import fetch from 'isomorphic-unfetch'
import jpeg from 'jpeg-js'
import pixelmatch from 'pixelmatch'
import { beforeAll, describe, expect, it } from 'vitest'
@@ -18,7 +17,15 @@ describe('Image transformation', () => {
const { fileMetadata } = await storage.upload({
formData: fd
})
fileId = fileMetadata?.id as string
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
fileId =
'processedFiles' in fileMetadata
? fileMetadata.processedFiles[0]?.id
: (fileMetadata.id as string)
})
it('should be able to change the image width in a public url', async () => {

View File

@@ -1,10 +1,12 @@
import fetchPonyfill from 'fetch-ponyfill'
import FormData from 'form-data'
import fs from 'fs'
import fetch from 'isomorphic-unfetch'
import { v4 as uuidv4 } from 'uuid'
import { describe, expect, it } from 'vitest'
import { storage } from './utils/helpers'
const { fetch } = fetchPonyfill()
describe('test upload', () => {
it('should upload a file from the file system', async () => {
const fd = new FormData()
@@ -44,8 +46,15 @@ describe('test upload', () => {
id: RANDOM_UUID
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { id: fileId } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.id).toBe(RANDOM_UUID)
expect(fileId).toBe(RANDOM_UUID)
})
it('should upload a file with specific name', async () => {
@@ -59,8 +68,15 @@ describe('test upload', () => {
name: FILE_NAME
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { name: fileName } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.name).toBe(FILE_NAME)
expect(fileName).toBe(FILE_NAME)
})
it('should upload a file with a non-ISO 8859-1 name', async () => {
@@ -72,8 +88,15 @@ describe('test upload', () => {
name: '你 好'
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { name: fileName } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.name).toMatchInlineSnapshot('"%E4%BD%A0%20%E5%A5%BD"')
expect(fileName).toMatchInlineSnapshot('"%E4%BD%A0%20%E5%A5%BD"')
})
it('should upload a file with specific id and name', async () => {
@@ -89,9 +112,16 @@ describe('test upload', () => {
name: FILE_NAME
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { id: fileId, name: fileName } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.id).toBe(RANDOM_UUID)
expect(fileMetadata?.name).toBe(FILE_NAME)
expect(fileId).toBe(RANDOM_UUID)
expect(fileName).toBe(FILE_NAME)
})
it('should upload a file with specific bucket id', async () => {
@@ -103,8 +133,15 @@ describe('test upload', () => {
bucketId: 'default'
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { bucketId } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.bucketId).toBe('default')
expect(bucketId).toBe('default')
})
it('should upload a file with specific bucket id (test-bucket)', async () => {
@@ -116,7 +153,14 @@ describe('test upload', () => {
bucketId: 'test-bucket'
})
if (!fileMetadata) {
throw new Error('fileMetadata is missing')
}
const { bucketId } =
'processedFiles' in fileMetadata ? fileMetadata.processedFiles[0] : fileMetadata
expect(error).toBeNull()
expect(fileMetadata?.bucketId).toBe('test-bucket')
expect(bucketId).toBe('test-bucket')
})
})

View File

@@ -1,5 +1,11 @@
# @nhost/nextjs
## 1.13.27
### Patch Changes
- @nhost/react@2.0.21
## 1.13.26
### Patch Changes

View File

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

View File

@@ -1,5 +1,12 @@
# @nhost/nhost-js
## 2.2.7
### Patch Changes
- Updated dependencies [4c00a796e]
- @nhost/hasura-storage-js@2.1.5
## 2.2.6
### Patch Changes

View File

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

Some files were not shown because too many files have changed in this diff Show More