Compare commits
49 Commits
@nhost/das
...
@nhost/das
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3ece1ad7 | ||
|
|
c81002622c | ||
|
|
35fa6bb043 | ||
|
|
b8f11a13d7 | ||
|
|
1d1555593f | ||
|
|
99fcc36250 | ||
|
|
7e4a756cfe | ||
|
|
5bf61583e0 | ||
|
|
7eac17a1cb | ||
|
|
a41aeeb9ef | ||
|
|
e33df513ff | ||
|
|
323fd5cbe3 | ||
|
|
ffb3c426d3 | ||
|
|
889ee6589e | ||
|
|
5223ee9353 | ||
|
|
c8c5ace7cc | ||
|
|
c6a4c28579 | ||
|
|
850a049ca2 | ||
|
|
eff3f0aefd | ||
|
|
2b1338f716 | ||
|
|
2b58c60747 | ||
|
|
1b2e3fbd1d | ||
|
|
6f4fdcf73f | ||
|
|
cb529dc60c | ||
|
|
68a449dbfc | ||
|
|
7d0c6d083a | ||
|
|
1353477da1 | ||
|
|
549c7cb7eb | ||
|
|
e131c12d5d | ||
|
|
8bb097c9a7 | ||
|
|
ea31e64a71 | ||
|
|
369b931689 | ||
|
|
e1ec5c1be2 | ||
|
|
9822a160d4 | ||
|
|
7c67a2c437 | ||
|
|
8e8884f4e1 | ||
|
|
9923be41ce | ||
|
|
bd6b55868a | ||
|
|
cb7c8c6398 | ||
|
|
4bf40995b5 | ||
|
|
ab5f704280 | ||
|
|
7e0e4d05aa | ||
|
|
0954a44f84 | ||
|
|
5a91c477f0 | ||
|
|
66f73d06a8 | ||
|
|
35d52aab87 | ||
|
|
832210d8ad | ||
|
|
6999562b59 | ||
|
|
7d577a68b7 |
2
.github/workflows/changesets.yaml
vendored
2
.github/workflows/changesets.yaml
vendored
@@ -98,7 +98,7 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build and push to Docker Hub
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v4
|
||||
timeout-minutes: 60
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -20,7 +20,9 @@ export default defineConfig({
|
||||
exclude: ['**/*.spec.ts', '**/*.test.ts', '**/tests/**'],
|
||||
entryRoot: 'src',
|
||||
// Was defaulting to true until version 1.7
|
||||
skipDiagnostics: true
|
||||
skipDiagnostics: true,
|
||||
// Was defaulting to true until version 2.0
|
||||
copyDtsFiles: true
|
||||
})
|
||||
],
|
||||
test: {
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# @nhost/dashboard
|
||||
|
||||
## 0.12.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react-apollo@5.0.9
|
||||
- @nhost/nextjs@1.13.14
|
||||
|
||||
## 0.12.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2b1338f7: chore(dashboard): bump `turbo` to 1.8.3
|
||||
- 5223ee93: fix(dashboard): show correct deployment status on the main page
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/nextjs@1.13.13
|
||||
- @nhost/react-apollo@5.0.8
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- Updated dependencies [35d52aab]
|
||||
- @nhost/react-apollo@5.0.7
|
||||
- @nhost/nextjs@1.13.12
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -3,7 +3,7 @@ RUN apk add --no-cache libc6-compat
|
||||
RUN apk update
|
||||
WORKDIR /app
|
||||
|
||||
RUN yarn global add turbo@1.6.3
|
||||
RUN yarn global add turbo@1.8.3
|
||||
COPY . .
|
||||
RUN turbo prune --scope="@nhost/dashboard" --docker
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "0.12.1",
|
||||
"version": "0.12.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
@@ -46,7 +46,6 @@
|
||||
"analytics-node": "^6.2.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"clsx": "^1.2.1",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"date-fns": "^2.29.3",
|
||||
"generate-password": "^1.7.0",
|
||||
"graphiql": "^2.2.0",
|
||||
@@ -112,11 +111,12 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.43.0",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"@vitest/coverage-c8": "^0.27.0",
|
||||
"@vitest/coverage-c8": "^0.29.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"babel-loader": "^8.3.0",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"csstype": "^3.0.10",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
@@ -130,6 +130,7 @@
|
||||
"lint-staged": ">=13",
|
||||
"msw": "^1.0.1",
|
||||
"msw-storybook-addon": "^1.6.3",
|
||||
"node-fetch": "^3.3.0",
|
||||
"postcss": "^8.4.19",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-organize-imports": "^3.2.0",
|
||||
@@ -140,10 +141,9 @@
|
||||
"tailwindcss": "^3.1.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^4.0.2",
|
||||
"vite-tsconfig-paths": "^4.0.3",
|
||||
"vitest": "^0.27.0",
|
||||
"vitest": "^0.29.0",
|
||||
"webpack": "^5.75.0"
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { useDeleteApplicationMutation } from '@/generated/graphql';
|
||||
import {
|
||||
GetOneUserDocument,
|
||||
useDeleteApplicationMutation,
|
||||
} from '@/generated/graphql';
|
||||
import { useCurrentWorkspaceAndApplication } from '@/hooks/useCurrentWorkspaceAndApplication';
|
||||
import Button from '@/ui/v2/Button';
|
||||
import ArrowRightIcon from '@/ui/v2/icons/ArrowRightIcon';
|
||||
@@ -12,7 +15,9 @@ import { useRouter } from 'next/router';
|
||||
|
||||
export default function ApplicationInfo() {
|
||||
const { currentApplication } = useCurrentWorkspaceAndApplication();
|
||||
const [deleteApplication, { client }] = useDeleteApplicationMutation();
|
||||
const [deleteApplication, { client }] = useDeleteApplicationMutation({
|
||||
refetchQueries: [GetOneUserDocument],
|
||||
});
|
||||
const router = useRouter();
|
||||
|
||||
async function handleClickRemove() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import DeploymentStatusMessage from '@/components/deployments/DeploymentStatusMessage';
|
||||
import { FindOldApps } from '@/components/home';
|
||||
import type { UserData } from '@/hooks/useGetAllUserWorkspacesAndApplications';
|
||||
import type { ApplicationState } from '@/types/application';
|
||||
import { ApplicationStatus } from '@/types/application';
|
||||
import { Avatar } from '@/ui/Avatar';
|
||||
import StateBadge from '@/ui/StateBadge';
|
||||
import type { DeploymentStatus } from '@/ui/StatusCircle';
|
||||
import { StatusCircle } from '@/ui/StatusCircle';
|
||||
@@ -10,59 +10,11 @@ import Divider from '@/ui/v2/Divider';
|
||||
import Link from '@/ui/v2/Link';
|
||||
import List from '@/ui/v2/List';
|
||||
import { ListItem } from '@/ui/v2/ListItem';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import { getApplicationStatusString } from '@/utils/helpers';
|
||||
import { formatDistance } from 'date-fns';
|
||||
import Image from 'next/image';
|
||||
import NavLink from 'next/link';
|
||||
import { Fragment } from 'react';
|
||||
|
||||
function ApplicationCreatedAt({ createdAt }: any) {
|
||||
return (
|
||||
<Text component="span" className="text-sm">
|
||||
created{' '}
|
||||
{formatDistance(new Date(createdAt), new Date(), {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function LastSuccessfulDeployment({ deployment }: any) {
|
||||
return (
|
||||
<span className="flex flex-row">
|
||||
<Avatar
|
||||
component="span"
|
||||
name={deployment.commitUserName}
|
||||
avatarUrl={deployment.commitUserAvatarUrl}
|
||||
className="mr-1 h-4 w-4 self-center"
|
||||
/>
|
||||
<Text component="span" className="self-center text-sm">
|
||||
{deployment.commitUserName} deployed{' '}
|
||||
{formatDistance(new Date(deployment.deploymentEndedAt), new Date(), {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</Text>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
function CurrentDeployment({ deployment }: any) {
|
||||
return (
|
||||
<span className="flex flex-row">
|
||||
<Avatar
|
||||
component="span"
|
||||
name={deployment.commitUserName}
|
||||
avatarUrl={deployment.commitUserAvatarUrl}
|
||||
className="mr-1 h-4 w-4 self-center"
|
||||
/>
|
||||
<Text component="span" className="self-center text-sm">
|
||||
{deployment.commitUserName} updated just now
|
||||
</Text>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export function checkStatusOfTheApplication(
|
||||
stateHistory: ApplicationState[] | [],
|
||||
) {
|
||||
@@ -141,27 +93,23 @@ export function RenderWorkspacesWithApps({
|
||||
</NavLink>
|
||||
<List className="grid grid-flow-row border-y">
|
||||
{workspaceProjects.map((app, index) => {
|
||||
const isDeployingToProduction = app.deployments[0]
|
||||
? ['SCHEDULED', 'PENDING', 'DEPLOYING'].includes(
|
||||
app.deployments[0].deploymentStatus,
|
||||
)
|
||||
: false;
|
||||
const [latestDeployment] = app.deployments;
|
||||
|
||||
return (
|
||||
<Fragment key={app.slug}>
|
||||
<ListItem.Root
|
||||
secondaryAction={
|
||||
<div className="grid grid-flow-col gap-px">
|
||||
{app.deployments[0] && (
|
||||
{latestDeployment && (
|
||||
<div className="mr-2 flex self-center align-middle">
|
||||
<StatusCircle
|
||||
status={
|
||||
app.deployments[0]
|
||||
.deploymentStatus as DeploymentStatus
|
||||
latestDeployment.deploymentStatus as DeploymentStatus
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<StateBadge
|
||||
status={checkStatusOfTheApplication(
|
||||
app.appStates,
|
||||
@@ -192,27 +140,10 @@ export function RenderWorkspacesWithApps({
|
||||
<ListItem.Text
|
||||
primary={app.name}
|
||||
secondary={
|
||||
<>
|
||||
{isDeployingToProduction && (
|
||||
<CurrentDeployment
|
||||
deployment={app.deployments[0]}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!isDeployingToProduction &&
|
||||
app.deployments[0] && (
|
||||
<LastSuccessfulDeployment
|
||||
deployment={app.deployments[0]}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!isDeployingToProduction &&
|
||||
!app.deployments[0] && (
|
||||
<ApplicationCreatedAt
|
||||
createdAt={app.createdAt}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
<DeploymentStatusMessage
|
||||
appCreatedAt={app.createdAt}
|
||||
deployment={latestDeployment}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</ListItem.Button>
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import type { Deployment } from '@/types/application';
|
||||
import { render, screen } from '@/utils/testUtils';
|
||||
import { test, vi } from 'vitest';
|
||||
import DeploymentStatusMessage from './DeploymentStatusMessage';
|
||||
|
||||
const defaultDeployment: Deployment = {
|
||||
id: 'de305d54-75b4-431b-adb2-eb6b9e546013',
|
||||
commitUserName: 'john.doe',
|
||||
commitUserAvatarUrl: 'https://example.com/avatar.png',
|
||||
deploymentStartedAt: '2023-02-24T12:00:00.000Z',
|
||||
deploymentEndedAt: null,
|
||||
deploymentStatus: 'SCHEDULED',
|
||||
commitSHA: '1234567890',
|
||||
commitMessage: 'Update README.md',
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
vi.useFakeTimers();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
test('should render the avatar of the user who deployed the application', () => {
|
||||
render(
|
||||
<DeploymentStatusMessage
|
||||
deployment={defaultDeployment}
|
||||
appCreatedAt="2023-02-24"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByRole('img', {
|
||||
name: `Avatar of ${defaultDeployment.commitUserName}`,
|
||||
}),
|
||||
).toHaveAttribute(
|
||||
'style',
|
||||
`background-image: url(${defaultDeployment.commitUserAvatarUrl});`,
|
||||
);
|
||||
});
|
||||
|
||||
test('should render "updated just now" when the deployment is in progress and has not ended', () => {
|
||||
render(
|
||||
<DeploymentStatusMessage
|
||||
deployment={defaultDeployment}
|
||||
appCreatedAt="2023-02-24"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText(/updated just now/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('should render "updated just now" when the deployment\'s status is DEPLOYED, but it doesn\'t have an end date for some reason', () => {
|
||||
render(
|
||||
<DeploymentStatusMessage
|
||||
deployment={{
|
||||
...defaultDeployment,
|
||||
deploymentStatus: 'DEPLOYED',
|
||||
deploymentEndedAt: null,
|
||||
}}
|
||||
appCreatedAt="2023-02-24"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText(/updated just now/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('should render "deployed 1 day ago" when the deployment has ended', () => {
|
||||
vi.setSystemTime(new Date('2023-02-25T12:25:00.000Z'));
|
||||
|
||||
render(
|
||||
<DeploymentStatusMessage
|
||||
deployment={{
|
||||
...defaultDeployment,
|
||||
deploymentStatus: 'DEPLOYED',
|
||||
deploymentEndedAt: '2023-02-24T12:15:00.000Z',
|
||||
}}
|
||||
appCreatedAt="2023-02-24"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText(/deployed 1 day ago/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('should render "created 1 day ago" if the application does not have a deployment', () => {
|
||||
vi.setSystemTime(new Date('2023-02-25T12:25:00.000Z'));
|
||||
|
||||
render(
|
||||
<DeploymentStatusMessage deployment={null} appCreatedAt="2023-02-24" />,
|
||||
);
|
||||
|
||||
expect(screen.getByText(/created 1 day ago/i)).toBeInTheDocument();
|
||||
});
|
||||
@@ -0,0 +1,73 @@
|
||||
import type { Deployment } from '@/types/application';
|
||||
import { Avatar } from '@/ui/Avatar';
|
||||
import Text from '@/ui/v2/Text';
|
||||
import formatDistance from 'date-fns/formatDistance';
|
||||
|
||||
export interface DeploymentStatusMessageProps {
|
||||
/**
|
||||
* The deployment to render the status message for.
|
||||
*/
|
||||
deployment: Partial<Deployment>;
|
||||
/**
|
||||
* The date the application was created.
|
||||
*/
|
||||
appCreatedAt: string;
|
||||
}
|
||||
|
||||
export default function DeploymentStatusMessage({
|
||||
deployment,
|
||||
appCreatedAt,
|
||||
}: DeploymentStatusMessageProps) {
|
||||
const isDeployingToProduction = [
|
||||
'SCHEDULED',
|
||||
'PENDING',
|
||||
'DEPLOYING',
|
||||
].includes(deployment?.deploymentStatus);
|
||||
|
||||
if (
|
||||
isDeployingToProduction ||
|
||||
(deployment && !deployment.deploymentEndedAt)
|
||||
) {
|
||||
return (
|
||||
<span className="flex flex-row">
|
||||
<Avatar
|
||||
component="span"
|
||||
name={deployment.commitUserName}
|
||||
avatarUrl={deployment.commitUserAvatarUrl}
|
||||
className="mr-1 h-4 w-4 self-center"
|
||||
/>
|
||||
<Text component="span" className="self-center text-sm">
|
||||
{deployment.commitUserName} updated just now
|
||||
</Text>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
if (!isDeployingToProduction && deployment?.deploymentEndedAt) {
|
||||
return (
|
||||
<span className="flex flex-row">
|
||||
<Avatar
|
||||
component="span"
|
||||
name={deployment.commitUserName}
|
||||
avatarUrl={deployment.commitUserAvatarUrl}
|
||||
className="mr-1 h-4 w-4 self-center"
|
||||
/>
|
||||
<Text component="span" className="self-center text-sm">
|
||||
{deployment.commitUserName} deployed{' '}
|
||||
{formatDistance(new Date(deployment.deploymentEndedAt), new Date(), {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</Text>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Text component="span" className="text-sm">
|
||||
created{' '}
|
||||
{formatDistance(new Date(appCreatedAt), new Date(), {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './DeploymentStatusMessage';
|
||||
export { default } from './DeploymentStatusMessage';
|
||||
@@ -59,7 +59,8 @@ export function Avatar({
|
||||
<Box
|
||||
style={Object.assign(style, { backgroundImage: `url(${avatarUrl})` })}
|
||||
className={classes}
|
||||
aria-label="Avatar"
|
||||
aria-label={name ? `Avatar of ${name}` : 'Avatar'}
|
||||
role="img"
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,6 @@ import generateAppServiceUrl from '@/utils/common/generateAppServiceUrl';
|
||||
import getServerError from '@/utils/settings/getServerError';
|
||||
import { getToastStyleProps } from '@/utils/settings/settingsConstants';
|
||||
import { yupResolver } from '@hookform/resolvers/yup';
|
||||
import fetch from 'cross-fetch';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import fetch from 'cross-fetch';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import type { ManagePermissionOptions } from './managePermission';
|
||||
import managePermission from './managePermission';
|
||||
|
||||
global.fetch = fetch;
|
||||
|
||||
const defaultParameters: ManagePermissionOptions = {
|
||||
dataSource: 'default',
|
||||
schema: 'public',
|
||||
|
||||
@@ -4,7 +4,6 @@ import type {
|
||||
MutationOrQueryBaseOptions,
|
||||
QueryError,
|
||||
} from '@/types/dataBrowser';
|
||||
import fetch from 'cross-fetch';
|
||||
|
||||
export interface FetchMetadataOptions
|
||||
extends Omit<MutationOrQueryBaseOptions, 'schema' | 'table'> {}
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
import extractForeignKeyRelation from '@/utils/dataBrowser/extractForeignKeyRelation';
|
||||
import { getPreparedReadOnlyHasuraQuery } from '@/utils/dataBrowser/hasuraQueryHelpers';
|
||||
import { POSTGRESQL_ERROR_CODES } from '@/utils/dataBrowser/postgresqlConstants';
|
||||
import fetch from 'cross-fetch';
|
||||
import { formatWithArray } from 'node-pg-format';
|
||||
|
||||
export interface FetchTableOptions extends MutationOrQueryBaseOptions {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
import matchers from '@testing-library/jest-dom/matchers';
|
||||
import fetch from 'node-fetch';
|
||||
import { expect } from 'vitest';
|
||||
|
||||
// @ts-ignore
|
||||
global.fetch = fetch;
|
||||
|
||||
expect.extend(matchers);
|
||||
|
||||
@@ -13,7 +13,6 @@ import { NhostApolloProvider } from '@nhost/react-apollo';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import type { queries, Queries, RenderOptions } from '@testing-library/react';
|
||||
import { render as rtlRender } from '@testing-library/react';
|
||||
import fetch from 'cross-fetch';
|
||||
import { RouterContext } from 'next/dist/shared/lib/router-context';
|
||||
import type { NextRouter } from 'next/router';
|
||||
import type { PropsWithChildren, ReactElement } from 'react';
|
||||
@@ -32,8 +31,6 @@ const queryClient = new QueryClient({
|
||||
},
|
||||
});
|
||||
|
||||
global.fetch = fetch;
|
||||
|
||||
export const mockRouter: NextRouter = {
|
||||
basePath: '',
|
||||
pathname: '/',
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# @nhost-examples/vue-quickstart
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [7eac17a1]
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/vue@1.13.13
|
||||
- @nhost/apollo@5.0.7
|
||||
|
||||
## 0.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- @nhost/apollo@5.0.6
|
||||
- @nhost/vue@1.13.12
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-quickstart",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.8",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
@@ -37,7 +37,6 @@
|
||||
"unplugin-vue-components": "^0.19.9",
|
||||
"vite": "^4.0.2",
|
||||
"vite-plugin-pages": "^0.28.0",
|
||||
"vitest": "^0.12.4",
|
||||
"vue-tsc": "^0.38.9"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,30 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 5.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d155559]
|
||||
- @nhost/nhost-js@2.0.8
|
||||
|
||||
## 5.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/nhost-js@2.0.7
|
||||
|
||||
## 5.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- Updated dependencies [35d52aab]
|
||||
- @nhost/nhost-js@2.0.6
|
||||
|
||||
## 5.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "5.0.5",
|
||||
"version": "5.0.8",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 5.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@5.0.8
|
||||
- @nhost/react@2.0.8
|
||||
|
||||
## 5.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/apollo@5.0.7
|
||||
- @nhost/react@2.0.7
|
||||
|
||||
## 5.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- @nhost/apollo@5.0.6
|
||||
- @nhost/react@2.0.6
|
||||
|
||||
## 5.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "5.0.6",
|
||||
"version": "5.0.9",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# @nhost/react-urql
|
||||
|
||||
## 2.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.8
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/react@2.0.7
|
||||
|
||||
## 2.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- @nhost/react@2.0.6
|
||||
|
||||
## 2.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-urql",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.8",
|
||||
"description": "Nhost React URQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
10
package.json
10
package.json
@@ -61,7 +61,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||
"@typescript-eslint/parser": "^5.42.1",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"@vitest/coverage-c8": "^0.27.0",
|
||||
"@vitest/coverage-c8": "^0.29.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"eslint-plugin-cypress": "^2.12.1",
|
||||
@@ -76,13 +76,13 @@
|
||||
"husky": "^8.0.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.7.1",
|
||||
"turbo": "1.6.3",
|
||||
"turbo": "1.8.3",
|
||||
"typedoc": "^0.22.18",
|
||||
"typescript": "4.9.4",
|
||||
"typescript": "4.9.5",
|
||||
"vite": "^4.0.2",
|
||||
"vite-plugin-dts": "^1.7.1",
|
||||
"vite-plugin-dts": "^2.0.0",
|
||||
"vite-tsconfig-paths": "^4.0.3",
|
||||
"vitest": "^0.27.0"
|
||||
"vitest": "^0.29.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"graphql": "16.6.0"
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @nhost/docgen
|
||||
|
||||
## 0.1.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
|
||||
## 0.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
|
||||
## 0.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@nhost/docgen",
|
||||
"description": "Documentation generator for classes and functions",
|
||||
"private": true,
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.8",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @nhost/graphql-js
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/graphql-js",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.5",
|
||||
"description": "Nhost GraphQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -53,7 +53,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"cross-fetch": "^3.1.5"
|
||||
"isomorphic-unfetch": "^3.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TypedDocumentNode } from '@graphql-typed-document-node/core'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { parseRequestArgs } from './parse-args'
|
||||
import { resolveRequestDocument } from './resolve-request-document'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @nhost/hasura-auth-js
|
||||
|
||||
## 2.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { faker } from '@faker-js/faker'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { auth, getHtmlLink, mailhog } from './helpers'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { load } from 'cheerio'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import createMailhogClient from 'mailhog'
|
||||
import { expect } from 'vitest'
|
||||
import { HasuraAuthClient, SignUpParams } from '../src'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { faker } from '@faker-js/faker'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { auth, getHtmlLink, signUpAndInUser, signUpAndVerifyUser } from './helpers'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { faker } from '@faker-js/faker'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { USER_ALREADY_SIGNED_IN } from '../src'
|
||||
import { auth, getHtmlLink, signUpAndInUser, signUpAndVerifyUser } from './helpers'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-auth-js",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"description": "Hasura-auth client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@simplewebauthn/browser": "^6.0.0",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"isomorphic-unfetch": "^3.1.0",
|
||||
"js-cookie": "^3.0.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"xstate": "^4.33.5"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { NETWORK_ERROR_CODE } from '../errors'
|
||||
import { NullableErrorResponse } from '../types'
|
||||
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @nhost/hasura-storage-js
|
||||
|
||||
## 2.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 889ee658: added tests
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
|
||||
## 2.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-storage-js",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.3",
|
||||
"description": "Hasura-storage client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -60,11 +60,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"form-data": "^4.0.0",
|
||||
"isomorphic-unfetch": "^3.1.0",
|
||||
"xstate": "^4.33.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"jpeg-js": "^0.4.4",
|
||||
"pixelmatch": "^5.3.0",
|
||||
"start-server-and-test": "^1.15.2",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import fetch from 'cross-fetch'
|
||||
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import {
|
||||
ApiDeleteParams,
|
||||
ApiDeleteResponse,
|
||||
|
||||
@@ -131,7 +131,7 @@ export const createMultipleFilesUploadMachine = () => {
|
||||
const additions = files
|
||||
? Array.isArray(files)
|
||||
? files // File[]
|
||||
: 'length' in files // FileList
|
||||
: 'item' in files // FileList
|
||||
? Array.from(files)
|
||||
: [files] // File
|
||||
: [] // No file
|
||||
|
||||
@@ -7,7 +7,7 @@ export const appendImageTransformationParameters = (
|
||||
params: StorageImageTransformationParams
|
||||
): string => {
|
||||
const queryParameters = Object.entries(params)
|
||||
.map(([key, value]) => `${Array.from(key)[0]}=${value}`)
|
||||
.map(([key, value]) => `${key.charAt(0)}=${value}`)
|
||||
.join('&')
|
||||
return queryParameters ? `${url}?${queryParameters}` : url
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import fetch from 'cross-fetch'
|
||||
import FormData from 'form-data'
|
||||
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { ErrorPayload, StorageUploadResponse } from './types'
|
||||
|
||||
/** Convert any string into ISO-8859-1 */
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import fs from 'fs'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import fetch from 'cross-fetch'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
import { storage } from './utils/helpers'
|
||||
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'
|
||||
|
||||
describe('test get file', () => {
|
||||
it('should be able to get uploaded file', async () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fetch from 'cross-fetch'
|
||||
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'
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import fetch from 'cross-fetch'
|
||||
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'
|
||||
|
||||
describe('test upload', () => {
|
||||
|
||||
23
packages/hasura-storage-js/tests/utils.test.ts
Normal file
23
packages/hasura-storage-js/tests/utils.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { appendImageTransformationParameters, StorageImageTransformationParams } from '../src/utils'
|
||||
|
||||
describe('appendImageTransformationParameters', () => {
|
||||
it('appends image transformation parameters to the url', () => {
|
||||
const url = 'https://example.com/image.jpg'
|
||||
const params: StorageImageTransformationParams = {
|
||||
width: 200,
|
||||
height: 300,
|
||||
quality: 80,
|
||||
blur: 10
|
||||
}
|
||||
const result = appendImageTransformationParameters(url, params)
|
||||
expect(result).toBe('https://example.com/image.jpg?w=200&h=300&q=80&b=10')
|
||||
})
|
||||
|
||||
it('returns the original url when no parameters are provided', () => {
|
||||
const url = 'https://example.com/image.jpg'
|
||||
const params: StorageImageTransformationParams = {}
|
||||
const result = appendImageTransformationParameters(url, params)
|
||||
expect(result).toBe('https://example.com/image.jpg')
|
||||
})
|
||||
})
|
||||
@@ -1,5 +1,30 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 1.13.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.8
|
||||
|
||||
## 1.13.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/react@2.0.7
|
||||
|
||||
## 1.13.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- @nhost/react@2.0.6
|
||||
|
||||
## 1.13.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.13.11",
|
||||
"version": "1.13.14",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -64,7 +64,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nhost/react": "workspace:*",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"isomorphic-unfetch": "^3.1.0",
|
||||
"js-cookie": "^3.0.1",
|
||||
"xstate": "^4.33.5"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NhostClient, NhostSession } from '@nhost/react'
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
export const refresh = async (nhostUrl: string, refreshToken: string): Promise<NhostSession> => {
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 2.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1d155559: fix(nhost-js): allow `null` as body and return JSON when `content-type` is `application/json`
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [889ee658]
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/hasura-storage-js@2.0.3
|
||||
- @nhost/graphql-js@0.0.5
|
||||
- @nhost/hasura-auth-js@2.0.2
|
||||
|
||||
## 2.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- 35d52aab: chore(deps): replace `cross-fetch` with `isomorphic-unfetch`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- Updated dependencies [35d52aab]
|
||||
- @nhost/graphql-js@0.0.4
|
||||
- @nhost/hasura-auth-js@2.0.1
|
||||
- @nhost/hasura-storage-js@2.0.2
|
||||
|
||||
## 2.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.8",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -61,7 +61,7 @@
|
||||
"@nhost/graphql-js": "workspace:*",
|
||||
"@nhost/hasura-auth-js": "workspace:*",
|
||||
"@nhost/hasura-storage-js": "workspace:*",
|
||||
"cross-fetch": "^3.1.5"
|
||||
"isomorphic-unfetch": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"graphql": "16.6.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import fetch from 'cross-fetch'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import { buildUrl, urlFromSubdomain } from '../../utils/helpers'
|
||||
import { NhostClientConstructorParams } from '../../utils/types'
|
||||
import {
|
||||
@@ -40,7 +40,7 @@ export class NhostFunctionsClient {
|
||||
|
||||
async call<T = unknown, D = any>(
|
||||
url: string,
|
||||
data: D,
|
||||
data: D | null,
|
||||
config?: NhostFunctionCallConfig
|
||||
): Promise<NhostFunctionCallResponse<T>>
|
||||
|
||||
@@ -56,7 +56,7 @@ export class NhostFunctionsClient {
|
||||
*/
|
||||
async call<T = unknown, D = any>(
|
||||
url: string,
|
||||
body: D,
|
||||
body: D | null,
|
||||
config?: NhostFunctionCallConfig
|
||||
): Promise<NhostFunctionCallResponse<T>> {
|
||||
const headers: HeadersInit = {
|
||||
@@ -69,7 +69,7 @@ export class NhostFunctionsClient {
|
||||
|
||||
try {
|
||||
const result = await fetch(fullUrl, {
|
||||
body: JSON.stringify(body),
|
||||
body: body ? JSON.stringify(body) : null,
|
||||
headers,
|
||||
method: 'POST'
|
||||
})
|
||||
@@ -80,7 +80,7 @@ export class NhostFunctionsClient {
|
||||
|
||||
let data: T
|
||||
|
||||
if (result.headers.get('content-type') === 'application/json') {
|
||||
if (result.headers.get('content-type')?.includes('application/json')) {
|
||||
data = await result.json()
|
||||
} else {
|
||||
data = (await result.text()) as unknown as T
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# @nhost/react
|
||||
|
||||
## 2.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d155559]
|
||||
- @nhost/nhost-js@2.0.8
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/nhost-js@2.0.7
|
||||
|
||||
## 2.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- Updated dependencies [35d52aab]
|
||||
- @nhost/nhost-js@2.0.6
|
||||
|
||||
## 2.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.8",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @nhost/sync-versions
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 549c7cb7: chore(deps): bump `glob` to v9
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@nhost/sync-versions",
|
||||
"description": "Sync the versions of Nhost services in each of the packages of a pnpm workspace",
|
||||
"private": true,
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.6",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -27,14 +27,14 @@
|
||||
"devDependencies": {
|
||||
"@swc-node/register": "^1.5.4",
|
||||
"@swc/core": "^1.3.11",
|
||||
"@types/glob": "^8.0.0",
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/node": "^16.11.7",
|
||||
"@types/object-path": "^0.11.1",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pnpm/find-workspace-dir": "^5.0.0",
|
||||
"glob": "^8.0.3",
|
||||
"glob": "^9.0.0",
|
||||
"object-path": "^0.11.8",
|
||||
"yaml": "^2.1.1"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
import { findWorkspaceDir } from '@pnpm/find-workspace-dir'
|
||||
import fs from 'fs'
|
||||
import glob from 'glob'
|
||||
import { globSync } from 'glob'
|
||||
import { set } from 'object-path'
|
||||
import path from 'path'
|
||||
import yaml from 'yaml'
|
||||
@@ -19,7 +19,7 @@ const main = async () => {
|
||||
fs.readFileSync(path.join(root!, 'nhost-cloud.yaml'), 'utf-8')
|
||||
)
|
||||
|
||||
const nhostConfigs = glob.sync('**/nhost/config.yaml', {
|
||||
const nhostConfigs = globSync('**/nhost/config.yaml', {
|
||||
cwd: root,
|
||||
absolute: true,
|
||||
realpath: true
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 1.13.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d155559]
|
||||
- @nhost/nhost-js@2.0.8
|
||||
|
||||
## 1.13.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7eac17a1: chore(deps): bump `@xstate/inspect` to 0.8.0
|
||||
- 850a049c: chore(deps): update docker/build-push-action action to v4
|
||||
- Updated dependencies [850a049c]
|
||||
- @nhost/nhost-js@2.0.7
|
||||
|
||||
## 1.13.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4bf40995: chore(deps): bump `typescript` to `4.9.5`
|
||||
- 8bb097c9: chore(deps): bump `vitest`
|
||||
- Updated dependencies [4bf40995]
|
||||
- Updated dependencies [8bb097c9]
|
||||
- Updated dependencies [35d52aab]
|
||||
- @nhost/nhost-js@2.0.6
|
||||
|
||||
## 1.13.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "1.13.11",
|
||||
"version": "1.13.14",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -72,7 +72,7 @@
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@xstate/inspect": "^0.7.0",
|
||||
"@xstate/inspect": "^0.8.0",
|
||||
"vue": "^3.2.41",
|
||||
"vue-router": "^4.1.6",
|
||||
"ws": "^8.10.0",
|
||||
|
||||
1689
pnpm-lock.yaml
generated
1689
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user