Partial dependencies upgrade and cleanup for old packages (#904)

This commit is contained in:
Dotan Simha 2022-12-27 23:36:08 +01:00 committed by GitHub
parent ee74946f77
commit 20edc8c5e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 3906 additions and 4692 deletions

View file

@ -0,0 +1,5 @@
---
'@graphql-hive/cli': patch
---
Upgrade dependency git-parse to v3

View file

@ -0,0 +1,5 @@
---
'@graphql-hive/client': patch
---
Upgrade dependency `axios` to v1

View file

@ -0,0 +1,5 @@
---
'@graphql-hive/client': patch
---
Upgrade dependency `apollo-server-plugin-base`

View file

@ -8,6 +8,7 @@ module.exports = {
'scripts',
'rules',
'out',
'.hive',
'public',
'packages/web/app/src/graphql/index.ts',
'packages/libraries/cli/src/sdk.ts',

View file

@ -12,6 +12,7 @@ __generated__/
/packages/web/app/src/gql/gql.d.ts
/packages/web/app/src/gql/graphql.ts
/packages/web/app/src/graphql/index.ts
/packages/web/app/next.config.mjs
# test fixtures
integration-tests/fixtures/init-invalid-schema.graphql
@ -20,3 +21,6 @@ tmp
pnpm-lock.yaml
.bob/
# temp volumes
.hive

View file

@ -68,7 +68,7 @@ generates:
UsageEstimationScope: '../shared/mappers#TargetsEstimationDateFilter'
BillingPaymentMethod: 'StripeTypes.PaymentMethod.Card'
BillingDetails: 'StripeTypes.PaymentMethod.BillingDetails'
BillingInvoice: 'StripeTypes.Invoice'
BillingInvoice: 'StripeTypes.Invoice | StripeTypes.UpcomingInvoice'
OrganizationGetStarted:
../shared/entities#OrganizationGetStarted as OrganizationGetStartedMapper
SchemaExplorer: ../shared/mappers#SchemaExplorerMapper

View file

@ -17,6 +17,6 @@
"devDependencies": {
"@types/js-yaml": "4.0.5",
"@types/mime-types": "2.1.1",
"@types/node": "18.11.5"
"@types/node": "18.11.18"
}
}

View file

@ -14,6 +14,15 @@ Developing Hive locally requires you to have the following software installed lo
- Clone the repository locally
- Make sure to install the recommended VSCode extensions (defined in `.vscode/extensions.json`)
- In the root of the repo, run `nvm use` to use the same version of node as mentioned
- Create `.env` file in the root, and use the following:
-
```
SERVER_ENDPOINT=http://localhost:3001
ENVIRONMENT=local
CDN_AUTH_PRIVATE_KEY=$(openssl rand -hex 16)
```
- Run `pnpm i` at the root to install all the dependencies and run the hooks
- Run `pnpm run --filter @hive/storage setup` to create local databases
- Run `pnpm generate` to generate the typings from the graphql files (use `pnpm graphql:generate` if

View file

@ -18,12 +18,11 @@
"@trpc/client": "10.7.0",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"auth0": "2.44.1",
"axios": "0.27.2",
"date-fns": "2.29.3",
"dependency-graph": "0.11.0",
"dotenv": "10.0.0",
"ioredis": "4.28.5",
"dotenv": "16.0.3",
"graphql": "16.6.0",
"ioredis": "5.2.4",
"rxjs": "^6.5.4",
"slonik": "30.1.2",
"tsup": "6.5.0",
@ -32,7 +31,6 @@
},
"devDependencies": {
"@hive/server": "workspace:*",
"@types/ioredis": "4.28.10",
"tslib": "2.4.1"
}
}

View file

@ -31,8 +31,9 @@
"graphql:generate": "graphql-codegen",
"lint": "eslint --cache --ignore-path .gitignore \"{packages,cypress}/**/*.{ts,tsx}\"",
"lint:prettier": "prettier --cache --check .",
"postinstall": "husky install && node ./scripts/patch-manifests.js && pnpm env:sync && node ./scripts/turborepo-cleanup.js && node ./scripts/turborepo-setup.js",
"postinstall": "node ./scripts/patch-manifests.js && pnpm env:sync && node ./scripts/turborepo-cleanup.js && node ./scripts/turborepo-setup.js",
"pre-commit": "lint-staged",
"prepare": "husky install",
"prerelease": "pnpm build:libraries",
"prettier": "prettier --cache --write --list-different .",
"release": "pnpm build:libraries && changeset publish",
@ -46,64 +47,60 @@
"workspace": "pnpm run --filter $1 $2"
},
"devDependencies": {
"@babel/core": "7.19.1",
"@babel/core": "7.20.7",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.19.1",
"@babel/preset-env": "7.19.1",
"@babel/plugin-proposal-decorators": "7.20.7",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@changesets/changelog-github": "0.4.6",
"@changesets/cli": "2.24.3",
"@graphql-codegen/add": "3.2.1",
"@graphql-codegen/cli": "2.15.0",
"@graphql-codegen/gql-tag-operations-preset": "1.7.0",
"@graphql-codegen/graphql-modules-preset": "2.5.7",
"@graphql-codegen/typed-document-node": "2.3.8",
"@graphql-codegen/typescript": "2.8.3",
"@graphql-codegen/typescript-graphql-request": "4.5.8",
"@graphql-codegen/typescript-operations": "2.5.8",
"@graphql-codegen/typescript-resolvers": "2.7.8",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.0",
"@graphql-codegen/add": "3.2.3",
"@graphql-codegen/cli": "2.16.2",
"@graphql-codegen/gql-tag-operations-preset": "1.7.3",
"@graphql-codegen/graphql-modules-preset": "2.5.10",
"@graphql-codegen/typed-document-node": "2.3.11",
"@graphql-codegen/typescript": "2.8.6",
"@graphql-codegen/typescript-operations": "2.5.11",
"@graphql-codegen/typescript-resolvers": "2.7.11",
"@graphql-inspector/cli": "3.4.0",
"@sentry/cli": "2.9.0",
"@swc/core": "1.2.185",
"@sentry/cli": "2.11.0",
"@swc/core": "1.3.24",
"@theguild/prettier-config": "1.0.0",
"@types/jest": "29.2.0",
"@types/lru-cache": "7.10.9",
"@types/node": "18.11.15",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"babel-jest": "29.0.3",
"@types/jest": "29.2.4",
"@types/node": "18.11.18",
"@typescript-eslint/eslint-plugin": "5.47.1",
"@typescript-eslint/parser": "5.47.1",
"babel-jest": "29.3.1",
"babel-plugin-parameter-decorator": "1.0.16",
"babel-plugin-transform-typescript-metadata": "0.3.2",
"bob-the-bundler": "4.0.0",
"cypress": "12.1.0",
"bob-the-bundler": "4.1.1",
"cypress": "12.2.0",
"dotenv": "16.0.3",
"env-cmd": "10.1.0",
"eslint": "8.27.0",
"eslint": "8.30.0",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-hive": "file:./rules",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-simple-import-sort": "8.0.0",
"fs-extra": "10.1.0",
"eslint-plugin-tailwindcss": "3.7.1",
"fs-extra": "11.1.0",
"glob": "8.0.3",
"graphql": "16.6.0",
"husky": "7.0.4",
"jest": "29.2.2",
"lint-staged": "11.2.6",
"prettier": "2.7.1",
"prettier-plugin-tailwindcss": "0.1.11",
"husky": "8.0.2",
"jest": "29.3.1",
"lint-staged": "13.1.0",
"prettier": "2.8.1",
"prettier-plugin-tailwindcss": "0.2.1",
"pretty-quick": "3.1.3",
"rimraf": "3.0.2",
"ts-jest": "29.0.3",
"ts-node": "10.9.1",
"tsup": "6.5.0",
"turbo": "1.6.3",
"typescript": "4.8.4"
},
"resolutions": {
"@emotion/react": "11.10.5",
"@types/react": "17.0.52",
"@urql/core": "2.6.1",
"graphql": "16.6.0",
"ts-node": "10.9.1"
"typescript": "4.9.4"
},
"husky": {
"hooks": {
@ -121,14 +118,13 @@
"pnpm": {
"patchedDependencies": {
"@n1ru4l/dockest@2.1.0-rc.6": "patches/@n1ru4l__dockest@2.1.0-rc.6.patch",
"@tgriesser/schemats@7.0.0": "patches/@tgriesser__schemats@7.0.0.patch",
"@tgriesser/schemats@7.0.1": "patches/@tgriesser__schemats@7.0.1.patch",
"@theguild/buddy@0.1.0": "patches/@theguild__buddy@0.1.0.patch",
"atomic-sleep@1.0.0": "patches/atomic-sleep@1.0.0.patch",
"bullmq@1.81.4": "patches/bullmq@1.81.4.patch",
"mjml-core@4.13.0": "patches/mjml-core@4.13.0.patch",
"slonik@30.1.2": "patches/slonik@30.1.2.patch",
"bob-the-bundler@4.0.0": "patches/bob-the-bundler@4.0.0.patch",
"oclif@3.2.25": "patches/oclif@3.2.25.patch"
"oclif@3.2.25": "patches/oclif@3.2.25.patch",
"@graphql-inspector/core@3.4.0": "patches/@graphql-inspector__core@3.4.0.patch"
}
}
}

View file

@ -57,7 +57,7 @@
"@oclif/plugin-update": "3.0.9",
"colors": "1.4.0",
"env-ci": "7.3.0",
"git-parse": "2.1.2",
"git-parse": "3.0.1",
"graphql": "^16.0.0",
"graphql-request": "4.3.0",
"graphql-tag": "2.12.6",
@ -68,8 +68,8 @@
"tslib": "2.4.1"
},
"devDependencies": {
"@graphql-codegen/typescript-graphql-request": "4.5.8",
"@types/env-ci": "3.1.1",
"@types/git-parse": "2.1.2",
"@types/mkdirp": "1.0.2",
"oclif": "^3.2.25"
},

View file

@ -46,7 +46,7 @@
"@graphql-hive/core": "^0.2.3",
"@graphql-tools/utils": "^8.12.0",
"async-retry": "1.3.3",
"axios": "^0.27.0",
"axios": "^1.2.1",
"tiny-lru": "8.0.2"
},
"devDependencies": {
@ -54,9 +54,9 @@
"@envelop/types": "3.0.1",
"@types/async-retry": "1.4.5",
"apollo-server-core": "3.11.1",
"apollo-server-plugin-base": "3.5.3",
"apollo-server-plugin-base": "3.7.1",
"graphql-yoga": "3.1.2",
"nock": "13.2.4"
"nock": "13.2.9"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",

View file

@ -58,7 +58,7 @@
},
"devDependencies": {
"@apollo/federation": "0.38.1",
"esbuild": "0.14.39",
"esbuild": "0.16.11",
"fastify": "3.29.4",
"graphql": "16.6.0"
},

View file

@ -15,17 +15,14 @@
"@aws-sdk/client-s3": "3.238.0",
"@aws-sdk/s3-request-presigner": "3.238.0",
"@graphql-inspector/core": "3.4.0",
"@graphql-tools/load-files": "6.6.1",
"@graphql-tools/schema": "9.0.12",
"@octokit/app": "12.0.7",
"@sentry/node": "7.21.1",
"@sentry/types": "7.21.1",
"@octokit/app": "13.1.0",
"@sentry/node": "7.28.1",
"@sentry/types": "7.28.1",
"@slack/web-api": "6.8.0",
"@theguild/buddy": "0.1.0",
"@trpc/client": "10.7.0",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"abort-controller": "3.0.0",
"agentkeepalive": "4.2.1",
"dataloader": "2.1.0",
"date-fns": "2.29.3",
@ -34,18 +31,12 @@
"graphql-parse-resolve-info": "4.12.3",
"graphql-scalars": "1.20.1",
"graphql-yoga": "3.1.2",
"human-id": "2.0.1",
"ioredis": "4.28.5",
"jsonwebtoken": "8.5.1",
"jwks-rsa": "2.1.5",
"ioredis": "5.2.4",
"lodash": "4.17.21",
"lru-cache": "7.14.1",
"ms": "2.1.3",
"p-retry": "5.1.2",
"p-timeout": "5.1.0",
"param-case": "3.0.4",
"supertokens-node": "12.1.4",
"uuid": "8.3.2",
"zod": "3.20.2"
},
"devDependencies": {
@ -55,13 +46,10 @@
"@hive/storage": "workspace:*",
"@hive/tokens": "workspace:*",
"@hive/webhooks": "workspace:*",
"@types/ioredis": "4.28.10",
"@types/ioredis-mock": "5.6.0",
"@types/lodash": "4.14.182",
"@types/lru-cache": "7.10.9",
"@types/ioredis-mock": "8.2.1",
"@types/lodash": "4.14.191",
"@types/ms": "0.7.31",
"@types/uuid": "8.3.4",
"ioredis-mock": "7.4.0",
"ioredis-mock": "8.2.2",
"tslib": "2.4.1"
}
}

View file

@ -27,7 +27,7 @@ const USAGE_DEFAULT_LIMITATIONS: Record<
export const resolvers: BillingModule.Resolvers = {
BillingInvoice: {
id: i => i.id || 'upcoming',
id: i => (i && 'id' in i ? i.id : 'upcoming'),
amount: i => parseFloat((i.total / 100).toFixed(2)),
pdfLink: i => i.invoice_pdf || null,
date: i => new Date(i.created * 1000).toISOString(),

View file

@ -14,13 +14,13 @@
"zod": "3.20.2"
},
"devDependencies": {
"@cloudflare/workers-types": "3.4.0",
"@cloudflare/workers-types": "4.20221111.1",
"@types/service-worker-mock": "2.0.1",
"@whatwg-node/fetch": "0.5.3",
"@whatwg-node/server": "0.5.0",
"esbuild": "0.14.39",
"esbuild": "0.16.11",
"itty-router": "2.6.6",
"itty-router-extras": "0.4.2",
"nock": "13.2.4"
"nock": "13.2.9"
}
}

View file

@ -24,7 +24,7 @@
"@types/service-worker-mock": "2.0.1",
"@whatwg-node/fetch": "0.5.3",
"@whatwg-node/server": "0.5.0",
"esbuild": "0.14.39",
"esbuild": "0.16.11",
"fastify": "3.29.4",
"itty-router": "2.6.6",
"itty-router-extras": "0.4.2"

View file

@ -11,26 +11,25 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/node": "7.28.1",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"bullmq": "1.81.4",
"dotenv": "10.0.0",
"ioredis": "4.28.5",
"dotenv": "16.0.3",
"ioredis": "5.2.4",
"mjml": "4.13.0",
"nodemailer": "6.8.0",
"p-timeout": "5.1.0",
"p-timeout": "6.0.0",
"sendmail": "1.6.1",
"zod": "3.20.2"
},
"devDependencies": {
"@hive/service-common": "workspace:*",
"@types/ioredis": "4.28.10",
"@types/mjml": "4.7.0",
"@types/nodemailer": "6.4.7",
"@types/sendmail": "1.4.4",
"copyfiles": "2.4.1",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -172,11 +172,10 @@ export function createScheduler(config: {
try {
queue?.removeAllListeners();
queueScheduler?.removeAllListeners(),
await pTimeout(
Promise.all([queue?.close(), queueScheduler?.close()]),
5000,
'BullMQ close timeout',
);
await pTimeout(Promise.all([queue?.close(), queueScheduler?.close()]), {
milliseconds: 5000,
message: 'BullMQ close timeout',
});
} catch (e) {
logger.error('Failed to stop queues', e);
} finally {

View file

@ -8,8 +8,8 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@cloudflare/workers-types": "3.4.0",
"@cloudflare/workers-types": "4.20221111.1",
"@types/service-worker-mock": "2.0.1",
"esbuild": "0.14.39"
"esbuild": "0.16.11"
}
}

View file

@ -4,7 +4,10 @@ addEventListener('scheduled', event => {
event.waitUntil(handleSchedule());
});
async function execute(url: string, options: Request | RequestInit = {}): Promise<any> {
async function execute(
url: string,
options: RequestInit<RequestInitCfProperties> = {},
): Promise<any> {
const config = {
headers: {
Authorization: `Bearer ${CF_BEARER_TOKEN}`,

View file

@ -11,13 +11,13 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/client": "10.7.0",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"date-fns": "2.29.3",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"reflect-metadata": "0.1.13",
"zod": "3.20.2"
@ -26,7 +26,7 @@
"@hive/emails": "workspace:*",
"@hive/service-common": "workspace:*",
"@hive/storage": "workspace:*",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -13,22 +13,21 @@
"@apollo/federation": "0.38.1",
"@graphql-tools/stitch": "8.7.34",
"@graphql-tools/stitching-directives": "2.3.24",
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"async-retry": "1.3.3",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"graphql": "16.6.0",
"ioredis": "4.28.5",
"ioredis": "5.2.4",
"zod": "3.20.2"
},
"devDependencies": {
"@hive/service-common": "workspace:*",
"@types/async-retry": "1.4.5",
"@types/ioredis": "4.28.10",
"fastify": "3.29.4",
"pino-pretty": "6.0.0"
"pino-pretty": "9.1.1"
},
"buildOptions": {
"runify": true,

View file

@ -30,6 +30,7 @@ CDN_CF_ACCOUNT_ID=103df45224310d669213971ce28b5b70
CDN_CF_AUTH_TOKEN=85e20c26c03759603c0f45884824a1c3
CDN_CF_NAMESPACE_ID=33b1e3bbb4a4707d05ea0307cbb55c79
CDN_BASE_URL="http://localhost:4010"
CDN_AUTH_PRIVATE_KEY=<sync>
# S3 Artifacts Configuration
S3_ENDPOINT=http://localhost:9000

View file

@ -20,17 +20,17 @@
"@escape.tech/graphql-armor-max-depth": "1.8.0",
"@escape.tech/graphql-armor-max-directives": "1.6.0",
"@escape.tech/graphql-armor-max-tokens": "1.3.0",
"@sentry/integrations": "7.21.1",
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/integrations": "7.28.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"@whatwg-node/server": "0.5.0",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"graphql": "16.6.0",
"graphql-yoga": "3.1.2",
"hyperid": "2.3.1",
"hyperid": "3.0.1",
"prom-client": "14.1.0",
"reflect-metadata": "0.1.13",
"zod": "3.20.2"
@ -41,9 +41,9 @@
"@hive/cdn-script": "workspace:*",
"@hive/service-common": "workspace:*",
"@hive/storage": "workspace:*",
"@swc/core": "1.2.185",
"@swc/core": "1.3.24",
"fastify": "3.29.4",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -18,9 +18,9 @@
"zod": "3.20.2"
},
"devDependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/types": "7.21.1",
"@sentry/utils": "7.21.1"
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@sentry/types": "7.28.1",
"@sentry/utils": "7.28.1"
}
}

View file

@ -24,10 +24,10 @@
"setup": "pnpm db:start && pnpm db"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/node": "7.28.1",
"@slonik/migrator": "0.8.5",
"@theguild/buddy": "0.1.0",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"param-case": "3.0.4",
"slonik": "30.1.2",
@ -36,13 +36,15 @@
"zod": "3.20.2"
},
"devDependencies": {
"@sentry/types": "7.21.1",
"@tgriesser/schemats": "7.0.0",
"@types/pg": "8.6.5",
"@sentry/types": "7.28.1",
"@tgriesser/schemats": "7.0.1",
"@types/node": "18.11.18",
"@types/pg": "8.6.6",
"copyfiles": "2.4.1",
"pg-promise": "10.11.1",
"pg-promise": "10.15.4",
"ts-node": "10.9.1",
"tslib": "2.4.1"
"tslib": "2.4.1",
"typescript": "4.9.4"
},
"buildOptions": {
"runify": true,

View file

@ -3,7 +3,7 @@
/**
* AUTO-GENERATED FILE - DO NOT EDIT!
*
* This file was automatically generated by schemats v.7.0.0
* This file was automatically generated by schemats v.7.0.1
*
*/

View file

@ -11,22 +11,22 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/client": "10.7.0",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"date-fns": "2.29.3",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"reflect-metadata": "0.1.13",
"stripe": "8.222.0",
"stripe": "11.5.0",
"zod": "3.20.2"
},
"devDependencies": {
"@hive/service-common": "workspace:*",
"@hive/storage": "workspace:*",
"pino-pretty": "6.0.0"
"pino-pretty": "9.1.1"
},
"buildOptions": {
"runify": true,

View file

@ -24,7 +24,7 @@ export function createStripeBilling(config: {
// fetch,
// });
const stripeApi = new Stripe(config.stripe.token, {
apiVersion: '2020-08-27',
apiVersion: '2022-11-15',
typescript: true,
});
const loadStripeData$ = ensureStripeProducts();

View file

@ -10,12 +10,12 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/server": "10.7.0",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"ms": "2.1.3",
"p-timeout": "5.1.0",
"p-timeout": "6.0.0",
"reflect-metadata": "0.1.13",
"tiny-lru": "8.0.2",
"zod": "3.20.2"
@ -25,7 +25,7 @@
"@hive/storage": "workspace:*",
"@types/ms": "0.7.31",
"fastify": "3.29.4",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -53,6 +53,8 @@ export function until(fn: () => boolean, timeout: number): Promise<void> {
}
}, 200);
}),
timeout,
{
milliseconds: timeout,
},
);
}

View file

@ -11,11 +11,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"reflect-metadata": "0.1.13",
"zod": "3.20.2"
@ -23,7 +23,7 @@
"devDependencies": {
"@hive/api": "workspace:*",
"@hive/service-common": "workspace:*",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -10,11 +10,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"agentkeepalive": "4.2.1",
"date-fns": "2.29.3",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"graphql": "16.6.0",
"kafkajs": "2.2.3",
@ -25,7 +25,7 @@
"@graphql-hive/core": "0.2.3",
"@hive/service-common": "workspace:*",
"@hive/usage-common": "workspace:*",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -10,13 +10,13 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/client": "10.7.0",
"@trpc/server": "10.7.0",
"@whatwg-node/fetch": "0.5.3",
"ajv": "8.11.2",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"graphql": "16.6.0",
"kafkajs": "2.2.3",
@ -27,7 +27,7 @@
"@hive/service-common": "workspace:*",
"@hive/tokens": "workspace:*",
"@hive/usage-common": "workspace:*",
"pino-pretty": "6.0.0"
"pino-pretty": "9.1.1"
},
"buildOptions": {
"runify": true,

View file

@ -11,21 +11,20 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@sentry/node": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/node": "7.28.1",
"@sentry/tracing": "7.28.1",
"@trpc/server": "10.7.0",
"bullmq": "1.81.4",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"got": "12.5.3",
"ioredis": "4.28.5",
"p-timeout": "5.1.0",
"ioredis": "5.2.4",
"p-timeout": "6.0.0",
"zod": "3.20.2"
},
"devDependencies": {
"@hive/service-common": "workspace:*",
"@types/ioredis": "4.28.10",
"copyfiles": "2.4.1",
"pino-pretty": "6.0.0",
"pino-pretty": "9.1.1",
"tslib": "2.4.1"
},
"buildOptions": {

View file

@ -48,11 +48,10 @@ export function createScheduler(config: Config) {
try {
webhookQueue?.removeAllListeners();
webhookQueueScheduler?.removeAllListeners(),
await pTimeout(
Promise.all([webhookQueue?.close(), webhookQueueScheduler?.close()]),
5000,
'BullMQ close timeout',
);
await pTimeout(Promise.all([webhookQueue?.close(), webhookQueueScheduler?.close()]), {
milliseconds: 5000,
message: 'BullMQ close timeout',
});
} catch (e) {
logger.error('Failed to stop queues', e);
} finally {

View file

@ -1,5 +1,7 @@
GRAPHQL_ENDPOINT="http://localhost:3001/graphql"
APP_BASE_URL="http://localhost:3000"
SERVER_ENDPOINT="<sync>"
ENVIRONMENT="<sync>"
# Supertokens

View file

@ -1,4 +1,3 @@
declare module 'node-crisp-api';
declare module 'tailwindcss/colors';
declare module '@n1ru4l/react-time-ago' {

View file

@ -34,11 +34,11 @@
"@radix-ui/react-tabs": "0.1.5",
"@radix-ui/react-toggle-group": "0.1.5",
"@radix-ui/react-toolbar": "0.1.5",
"@sentry/nextjs": "7.21.1",
"@sentry/node": "7.21.1",
"@sentry/react": "7.21.1",
"@sentry/tracing": "7.21.1",
"@sentry/types": "7.21.1",
"@sentry/nextjs": "7.28.1",
"@sentry/node": "7.28.1",
"@sentry/react": "7.28.1",
"@sentry/tracing": "7.28.1",
"@sentry/types": "7.28.1",
"@stripe/react-stripe-js": "1.16.1",
"@stripe/stripe-js": "1.46.0",
"@tanstack/react-table": "8.0.0-beta.8",
@ -59,21 +59,20 @@
"framer-motion": "4.1.17",
"graphiql": "2.2.0",
"graphql": "16.6.0",
"hyperid": "2.3.1",
"hyperid": "3.0.1",
"immer": "9.0.16",
"js-cookie": "3.0.1",
"monaco-editor": "0.27.0",
"monaco-themes": "0.4.3",
"next": "13.0.7",
"next": "13.1.1",
"nextjs-cors": "2.1.2",
"node-crisp-api": "1.12.3",
"react": "18.2.0",
"react-children-utilities": "2.8.0",
"react-date-range": "1.4.0",
"react-dom": "18.2.0",
"react-icons": "4.7.1",
"react-select": "5.7.0",
"react-string-replace": "0.5.1",
"react-string-replace": "1.1.0",
"react-virtualized-auto-sizer": "1.0.7",
"react-window": "1.8.8",
"regenerator-runtime": "0.13.11",
@ -84,39 +83,34 @@
"supertokens-website": "14.0.3",
"twin.macro": "2.8.2",
"urql": "2.0.5",
"use-debounce": "6.0.1",
"valtio": "1.7.6",
"use-debounce": "9.0.2",
"valtio": "1.8.0",
"wonka": "4.0.15",
"yup": "0.32.11",
"zod": "3.20.2"
},
"devDependencies": {
"@graphql-codegen/gql-tag-operations-preset": "1.7.0",
"@graphql-codegen/gql-tag-operations-preset": "1.7.3",
"@graphql-typed-document-node/core": "3.1.1",
"@hive/emails": "workspace:*",
"@hive/server": "workspace:*",
"@next/bundle-analyzer": "13.0.5",
"@next/eslint-plugin-next": "13.0.5",
"@tailwindcss/line-clamp": "0.3.1",
"@next/bundle-analyzer": "13.1.1",
"@next/eslint-plugin-next": "13.1.1",
"@tailwindcss/line-clamp": "0.4.2",
"@types/cookies": "0.7.7",
"@types/dompurify": "2.4.0",
"@types/express": "4.17.14",
"@types/js-cookie": "3.0.2",
"@types/react": "18.0.25",
"@types/react-date-range": "1.1.8",
"@types/react-dom": "18.0.9",
"@types/react": "18.0.26",
"@types/react-date-range": "1.4.4",
"@types/react-dom": "18.0.10",
"@types/react-virtualized-auto-sizer": "1.0.1",
"@types/react-window": "1.8.5",
"@welldone-software/why-did-you-render": "7.0.1",
"autoprefixer": "10.4.13",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-tailwindcss": "3.7.0",
"postcss": "8.4.19",
"postcss": "8.4.20",
"rimraf": "3.0.2",
"tailwindcss": "2.2.19",
"tailwindcss-radix": "2.2.0",
"tailwindcss": "3.2.4",
"tailwindcss-radix": "2.6.1",
"tslib": "2.4.1"
},
"babelMacros": {

View file

@ -1,4 +1,4 @@
import { ReactElement, useCallback, useState } from 'react';
import { ChangeEventHandler, ReactElement, useCallback, useState } from 'react';
import {
Editable,
EditableInput,
@ -251,7 +251,7 @@ function SchemaView({
const debouncedFilter = useDebouncedCallback((value: string) => {
setFilterService(value);
}, 500);
const handleChange = useCallback(
const handleChange = useCallback<ChangeEventHandler<HTMLInputElement>>(
event => {
debouncedFilter(event.target.value);
setTerm(event.target.value);

View file

@ -1,5 +1,5 @@
import 'twin.macro';
import React from 'react';
import React, { PropsWithChildren, ReactNode } from 'react';
import {
Table,
Thead,
@ -157,11 +157,16 @@ const OverallStat: React.FC<{
);
};
const Sortable: React.FC<{
const Sortable = ({
children,
isSorted,
isSortedDesc,
align = 'left',
}: PropsWithChildren<{
align?: 'center' | 'right' | 'left';
isSortedDesc?: boolean;
isSorted?: boolean;
}> = ({ children, isSorted, isSortedDesc, align = 'left' }) => {
}>) => {
return (
<Flex
direction="row"
@ -263,7 +268,7 @@ function OrganizationTableRow({ row }: { row: ReturnType<TableInstance['getRow']
{isNumeric
? formatNumber(cell.getValue() as number)
: isReact
? cell.getValue()
? (cell.getValue() as ReactNode)
: cell.renderCell()}
</Td>
);

View file

@ -1,4 +1,4 @@
import React, { ReactElement } from 'react';
import React, { PropsWithChildren, ReactElement } from 'react';
import tw, { styled } from 'twin.macro';
import Link from 'next/link';
import { FiTarget } from 'react-icons/fi';
@ -67,7 +67,7 @@ const Menu = {
},
};
const WithNavigation: React.FC<{}> = ({ children }) => {
const WithNavigation = ({ children }: PropsWithChildren) => {
const navigation = useNavigation();
const router = useRouteSelector();
@ -116,6 +116,6 @@ const WithNavigation: React.FC<{}> = ({ children }) => {
);
};
export const Page: React.FC = ({ children }) => {
export const Page = ({ children }: PropsWithChildren) => {
return <WithNavigation>{children}</WithNavigation>;
};

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { PropsWithChildren } from 'react';
import tw, { styled } from 'twin.macro';
import Head from 'next/head';
@ -22,13 +22,20 @@ const PageContent = styled.div(({ scrollable }: { scrollable: boolean }) => [
scrollable ? tw`flex-grow overflow-y-auto` : tw`h-full`,
]);
export const Page: React.FC<{
export const Page = ({
title,
subtitle = '',
scrollable = false,
actions,
children,
noPadding,
}: PropsWithChildren<{
title: string;
subtitle?: string;
actions?: React.ReactElement;
scrollable?: boolean;
noPadding?: boolean;
}> = ({ title, subtitle = '', scrollable = false, actions, children, noPadding }) => {
}>) => {
return (
<div tw="flex flex-col relative h-full dark:bg-gray-900">
<div tw="p-4 flex-shrink-0 flex flex-row justify-between items-center">

View file

@ -74,7 +74,7 @@ export function GetStartedProgress({
}}
>
<div
className="bg-orange-500 h-full"
className="h-full bg-orange-500"
style={{
width: `${(completed / total) * 100}%`,
}}

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { ChangeEventHandler, FormEventHandler } from 'react';
import 'twin.macro';
import { useMutation } from 'urql';
import {
@ -25,7 +25,7 @@ export const OrganizationCreator: React.FC<{
const router = useRouteSelector();
const [{ fetching }, mutate] = useMutation(CreateOrganizationDocument);
const [name, setName] = React.useState('');
const submit = React.useCallback(
const submit = React.useCallback<FormEventHandler<HTMLElement>>(
async evt => {
evt.preventDefault();
if (name) {
@ -48,7 +48,7 @@ export const OrganizationCreator: React.FC<{
[mutate, router, name],
);
const onNameChange = React.useCallback(
const onNameChange = React.useCallback<ChangeEventHandler<HTMLInputElement>>(
evt => {
setName(evt.target.value);
},

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { FormEventHandler } from 'react';
import 'twin.macro';
import { useMutation } from 'urql';
import { Select, AccordionItem, AccordionButton, AccordionPanel } from '@chakra-ui/react';
@ -176,7 +176,7 @@ export function usePermissionsManager({
passMemberScopes ? member.organizationAccessScopes : [],
);
const submit = React.useCallback(
const submit = React.useCallback<FormEventHandler<HTMLElement>>(
async evt => {
evt.preventDefault();
setState('LOADING');

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { PropsWithChildren } from 'react';
import {
BillingPlansDocument,
OrganizationFieldsFragment,
@ -9,9 +9,12 @@ import { PlanSummary } from './PlanSummary';
import { useQuery } from 'urql';
import { DataWrapper } from '@/components/common/DataWrapper';
export const BillingView: React.FC<{
export const BillingView = ({
organization,
children,
}: PropsWithChildren<{
organization: OrganizationFieldsFragment & OrgBillingInfoFieldsFragment;
}> = ({ organization, children }) => {
}>) => {
const [query] = useQuery({
query: BillingPlansDocument,
});

View file

@ -107,7 +107,7 @@ const ExternalCompositionForm = ({
</div>
)}
</div>
{mutation.error && <div className="mt-2 text-xs text-red-500">{mutation.error}</div>}
{mutation.error && <div className="mt-2 text-xs text-red-500">{mutation.error.message}</div>}
<div>
<Button
type="submit"

View file

@ -71,14 +71,14 @@ export function SchemaExplorerUsageStats(props: {
</div>
<div
title={`${percentage.toFixed(2)}% of all requests`}
className="bg-orange-500 relative mt-1 w-full overflow-hidden rounded bg-opacity-20"
className="relative mt-1 w-full overflow-hidden rounded bg-orange-500 bg-opacity-20"
style={{
width: 50,
height: 5,
}}
>
<div
className="bg-orange-500 h-full"
className="h-full bg-orange-500"
style={{
width: `${percentage}%`,
}}

View file

@ -23,14 +23,16 @@ function createPeriod(option: PeriodOption): Period {
};
}
const SchemaExplorerContext = React.createContext<{
type SchemaExplorerContextType = {
isArgumentListCollapsed: boolean;
setArgumentListCollapsed(isCollapsed: boolean): void;
setPeriodOption(option: PeriodOption): void;
periodOption: PeriodOption;
availablePeriodOptions: PeriodOption[];
period: Period;
}>({
};
const SchemaExplorerContext = React.createContext<SchemaExplorerContextType>({
isArgumentListCollapsed: true,
setArgumentListCollapsed: () => {},
periodOption: '7d',
@ -62,7 +64,7 @@ export function SchemaExplorerProvider(
}
}, [periodOption, setPeriodOption]);
const updatePeriod = React.useCallback(
const updatePeriod = React.useCallback<SchemaExplorerContextType['setPeriodOption']>(
option => {
setPeriodOption(option);
setPeriod(createPeriod(option));

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { ComponentType } from 'react';
import 'twin.macro';
import {
Button,
@ -17,7 +17,7 @@ import {
} from '@chakra-ui/react';
import { VscChevronDown, VscChromeClose } from 'react-icons/vsc';
import AutoSizer from 'react-virtualized-auto-sizer';
import { FixedSizeList } from 'react-window';
import { FixedSizeList, ListChildComponentProps } from 'react-window';
import { useQuery } from 'urql';
import { useDebouncedCallback } from 'use-debounce';
@ -88,7 +88,7 @@ const OperationsFilter: React.FC<{
setSelectedItems([]);
}, [setSelectedItems]);
const renderRow = React.useCallback(
const renderRow = React.useCallback<ComponentType<ListChildComponentProps>>(
({ index, style }) => {
const operation = visibleOperations[index];

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { PropsWithChildren } from 'react';
import 'twin.macro';
import {
Button,
@ -62,11 +62,16 @@ interface Operation {
document: string;
}
const Sortable: React.FC<{
const Sortable = ({
children,
isSorted,
isSortedDesc,
align = 'left',
}: PropsWithChildren<{
align?: 'center' | 'right' | 'left';
isSortedDesc?: boolean;
isSorted?: boolean;
}> = ({ children, isSorted, isSortedDesc, align = 'left' }) => {
}>) => {
return (
<Flex
direction="row"

View file

@ -226,15 +226,15 @@ export const Activities = (props: React.ComponentProps<'div'>): ReactElement =>
<Heading>Recent Activity</Heading>
<ul className="mt-4 w-full break-all rounded-md border border-gray-800 p-5">
{isLoading || !activities?.nodes
? new Array(3).fill(null).map((_, index) => {
? new Array(3).fill(null).map((_, index) => (
<ActivityContainer key={index}>
<Skeleton circle visible className="h-7 w-7 shrink-0" />
<div className="grow">
<Skeleton visible className="mb-2 h-3 w-2/5" />
<Skeleton visible className="h-3 w-full" />
</div>
</ActivityContainer>;
})
</ActivityContainer>
))
: activities.nodes.map(activity => {
const { content, icon } = getActivity(activity);

View file

@ -55,11 +55,11 @@ export const Button = forwardRef<any, ButtonProps>(
danger
? 'bg-red-500 text-white hover:brightness-110 active:bg-red-600'
: {
primary: 'bg-orange-600 active:bg-orange-700 text-white hover:brightness-110',
primary: 'bg-orange-600 text-white hover:brightness-110 active:bg-orange-700',
secondary:
'hover:text-orange-600 bg-gray-800 text-gray-500 hover:brightness-110 active:bg-gray-900',
'bg-gray-800 text-gray-500 hover:text-orange-600 hover:brightness-110 active:bg-gray-900',
default:
'hover:text-orange-600 bg-transparent text-gray-500 hover:border-gray-800',
'bg-transparent text-gray-500 hover:border-gray-800 hover:text-orange-600',
link: 'text-orange-600 hover:underline',
}[variant],
variant !== 'link' &&

View file

@ -5,8 +5,6 @@ export const Checkbox = (props: CheckboxProps): ReactElement => {
return (
<Root
className="
border-orange-500
text-orange-500
flex
h-5
w-5
@ -15,7 +13,9 @@ export const Checkbox = (props: CheckboxProps): ReactElement => {
justify-center
rounded-sm
border
border-orange-500
bg-gray-800
text-orange-500
focus:ring
disabled:cursor-not-allowed
disabled:border-gray-900

View file

@ -448,7 +448,7 @@ export const HiveLogo = ({ className }: IconProps): ReactElement => (
height="44"
viewBox="0 0 42 44"
xmlns="http://www.w3.org/2000/svg"
className={clsx('fill-none inline', className)}
className={clsx('inline fill-none', className)}
>
<path
d="M1.66721 14.57C0.65238 13.9901 0 12.9028 0 11.6705C0 9.85831 1.52227 8.33609 3.33446 8.33609C3.84187 8.33609 4.27679 8.40859 4.63923 8.62605L18.6293 0.579937C19.2817 0.217498 20.0791 0 20.804 0C21.6013 0 22.3262 0.217498 22.9786 0.579937L34.8666 7.46627C33.9968 8.04617 33.3444 8.91595 32.9094 9.93078L21.3839 3.26195C21.1664 3.11697 20.949 3.11701 20.7315 3.11701C20.514 3.11701 20.2966 3.18946 20.0791 3.26195L6.45142 11.0907C6.45142 11.3081 6.52389 11.453 6.52389 11.6705C6.52389 13.1203 5.58155 14.2801 4.34926 14.7875C4.27677 14.7875 4.13182 14.86 4.05934 14.86H3.98682C3.91434 14.86 3.76939 14.9324 3.6969 14.9324H3.62438C3.47941 14.9324 3.40692 14.9324 3.26195 14.9324C3.11697 14.9324 2.97201 14.9324 2.82704 14.9324H2.75452C2.68204 14.9324 2.53709 14.9325 2.4646 14.86H2.39208C2.17462 14.7875 1.88467 14.715 1.66721 14.57ZM41.1005 11.6705C41.1005 12.6853 40.6656 13.5552 39.9407 14.1351V29.8649C39.9407 31.4596 39.0709 32.9094 37.7661 33.7068L25.8781 40.5206C25.8781 39.4333 25.5157 38.346 24.8633 37.5487L36.1714 31.0248C36.6063 30.8073 36.8237 30.3723 36.8237 29.8649V14.86C35.4465 14.4251 34.4317 13.1927 34.4317 11.6705C34.4317 10.9456 34.6491 10.2933 35.0841 9.71337C35.1565 9.64088 35.229 9.49589 35.3015 9.4234C35.519 9.20594 35.6639 9.061 35.8814 8.91602C35.8814 8.91602 35.9539 8.91595 35.9539 8.84346C36.0264 8.77098 36.0989 8.77101 36.2438 8.69852C36.2438 8.69852 36.3164 8.69854 36.3164 8.62605C36.4613 8.55357 36.5338 8.55351 36.6788 8.48103C36.9687 8.40854 37.3312 8.33609 37.6936 8.33609C39.5783 8.33609 41.1005 9.85831 41.1005 11.6705ZM24.1384 40.6656C24.1384 40.8106 24.1384 41.0281 24.0659 41.173V41.2455C23.776 42.7678 22.4712 44 20.804 44C19.3542 44 18.1219 43.0577 17.687 41.7529L3.91435 33.7793C2.53709 32.9819 1.73972 31.5322 1.73972 29.9375V16.5272C2.24714 16.6722 2.82705 16.8171 3.33446 16.8171C3.84187 16.8171 4.34929 16.7447 4.78421 16.5997V29.9375C4.78421 30.4449 5.07414 30.8798 5.43658 31.0972L18.3394 38.5634C18.9193 37.8385 19.8616 37.4036 20.8764 37.4036C21.9638 37.4036 22.9061 37.9111 23.5585 38.7809C23.5585 38.7809 23.5585 38.7809 23.5585 38.8534C23.631 38.9259 23.631 38.9984 23.7035 39.0709C23.7035 39.0709 23.7035 39.1434 23.776 39.1434C23.776 39.2158 23.8485 39.2883 23.8485 39.2883C23.8485 39.2883 23.8484 39.3609 23.9209 39.3609C23.9209 39.4333 23.9935 39.5058 23.9935 39.5058C23.9935 39.5783 23.9934 39.5782 24.0659 39.6507C24.0659 39.7232 24.1384 39.7233 24.1384 39.7958C24.1384 39.8683 24.1384 39.8682 24.2109 39.9407C24.2109 40.0132 24.2109 40.0132 24.2109 40.0857C24.2109 40.1582 24.2109 40.2307 24.2109 40.3031C24.2109 40.3756 24.2109 40.3757 24.2109 40.4482C24.1384 40.4482 24.1384 40.5206 24.1384 40.6656Z"

View file

@ -7,7 +7,7 @@ export const InlineCode = (props: { content: string }) => {
<span className="rounded-md bg-gray-800 p-1 pl-2 font-mono">
<code>{props.content}</code>
<button
className="hover:text-orange-600 cursor-pointer p-2 pr-1 pl-2"
className="cursor-pointer p-2 hover:text-orange-600"
onClick={async ev => {
ev.preventDefault();
await navigator.clipboard.writeText(props.content);

View file

@ -1,4 +1,4 @@
import { FC, ReactElement } from 'react';
import { PropsWithChildren, ReactElement } from 'react';
import { keyframes } from '@emotion/react';
import {
Close,
@ -34,16 +34,20 @@ const widthBySize = {
lg: 'w-[800px]',
};
const Modal: FC<{
const Modal = ({
trigger,
open,
onOpenChange,
children,
className,
size = 'sm',
}: PropsWithChildren<{
trigger?: ReactElement;
open?: boolean;
size?: 'sm' | 'md' | 'lg';
onOpenChange?: (isOpen: boolean) => void;
className?: string;
}> & {
Title?: FC<DialogTitleProps>;
Description?: FC<DialogDescriptionProps>;
} = ({ trigger, open, onOpenChange, children, className, size = 'sm' }) => (
}>) => (
<Root open={open} onOpenChange={onOpenChange}>
<Trigger asChild>{trigger}</Trigger>
<Portal>
@ -82,7 +86,7 @@ const Modal: FC<{
{children}
<Close asChild>
<Button className="hover:text-orange-500 absolute top-5 right-5 text-gray-500 hover:border-gray-500">
<Button className="absolute top-5 right-5 text-gray-500 hover:border-gray-500 hover:text-orange-500">
<XIcon />
</Button>
</Close>
@ -92,7 +96,7 @@ const Modal: FC<{
</Root>
);
Modal.Title = ({ className, children, ...props }) => {
Modal.Title = ({ className, children, ...props }: PropsWithChildren<DialogTitleProps>) => {
return (
<Title className={clsx('text-2xl font-extrabold', className)} {...props}>
{children}
@ -100,7 +104,11 @@ Modal.Title = ({ className, children, ...props }) => {
);
};
Modal.Description = ({ children, className, ...props }) => {
Modal.Description = ({
children,
className,
...props
}: PropsWithChildren<DialogDescriptionProps>) => {
return (
<Description className={clsx('text-sm font-medium text-gray-500', className)} {...props}>
{children}

View file

@ -187,7 +187,7 @@ export const TransferOrganizationOwnershipModal = ({
leaveTo="opacity-0"
afterLeave={() => setSearchPhrase('')}
>
<Combobox.Options className="focus:outline-none absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-gray-800 text-base shadow-lg ring-1 ring-black/5">
<Combobox.Options className="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-gray-800 text-base shadow-lg ring-1 ring-black/5 focus:outline-none">
{filteredMembers.length === 0 && searchPhrase !== '' ? (
<div className="relative cursor-default select-none py-2 px-4 text-base text-gray-700">
Nothing found.

View file

@ -16,12 +16,12 @@ export const Radio = ({ children, className, ...props }: RadioGroupItemProps): R
className={clsx(
`
radix-state-checked:border-orange-500
hover:border-orange-500/50
relative
overflow-hidden
rounded-sm
border
text-left
hover:border-orange-500/50
focus:ring
`,
className,

View file

@ -7,7 +7,7 @@ export const Spinner = ({ className }: { className?: string }): ReactElement =>
viewBox="0 0 24 24"
height="32"
width="32"
className={clsx('text-orange-500 w-full animate-spin', className)}
className={clsx('w-full animate-spin text-orange-500', className)}
xmlns="http://www.w3.org/2000/svg"
fill="none"
>

View file

@ -1,9 +1,9 @@
import { Elements as ElementsProvider } from '@stripe/react-stripe-js';
import React from 'react';
import React, { PropsWithChildren } from 'react';
import { getStripePublicKey } from './stripe-public-key';
import { loadStripe } from '@stripe/stripe-js';
export const HiveStripeWrapper: React.FC<{}> = ({ children }) => {
export const HiveStripeWrapper = ({ children }: PropsWithChildren) => {
const [stripe] = React.useState(() => {
const stripePublicKey = getStripePublicKey();
return stripePublicKey ? loadStripe(stripePublicKey) : null;
@ -12,8 +12,9 @@ export const HiveStripeWrapper: React.FC<{}> = ({ children }) => {
if (stripe === null) {
return children as any;
}
return (
<React.Suspense fallback={() => <>{children}</>}>
<React.Suspense fallback={children}>
<ElementsProvider stripe={stripe}>{children}</ElementsProvider>
</React.Suspense>
);

View file

@ -11,15 +11,15 @@
},
"dependencies": {
"@theguild/components": "4.4.4",
"next": "13.0.7",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "3.20.2"
},
"devDependencies": {
"@theguild/tailwind-config": "0.2.1",
"@types/react": "18.0.24",
"tailwindcss": "3.2.1"
"@types/react": "18.0.26",
"tailwindcss": "3.2.4"
},
"buildOptions": {
"runify": true,

View file

@ -8,10 +8,11 @@
"dev": "next"
},
"dependencies": {
"@next/env": "13.1.1",
"@radix-ui/react-tooltip": "1.0.2",
"@theguild/components": "4.4.4",
"clsx": "1.2.1",
"next": "13.0.7",
"next": "13.1.1",
"next-themes": "*",
"react": "18.2.0",
"react-dom": "18.2.0",
@ -19,8 +20,9 @@
},
"devDependencies": {
"@theguild/tailwind-config": "0.2.1",
"@types/react": "18.0.25",
"next-sitemap": "3.1.32",
"tailwindcss": "3.2.3"
"@types/react": "18.0.26",
"next-sitemap": "3.1.43",
"postcss": "8.4.20",
"tailwindcss": "3.2.4"
}
}

View file

@ -51,7 +51,7 @@ const CookiesConsent = (): ReactElement => {
Privacy Policy
</a>
<button
className="focus:outline-none rounded-md bg-yellow-500 px-5 py-2 text-white hover:bg-yellow-700"
className="rounded-md bg-yellow-500 px-5 py-2 text-white hover:bg-yellow-700 focus:outline-none"
onClick={accept}
>
Allow Cookies
@ -92,7 +92,7 @@ function Hero() {
return (
<div className="w-full">
<div className="my-6 py-20 px-2 sm:py-24 lg:py-32">
<h1 className="to-orange-600 dark:to-orange-500 mx-auto max-w-screen-md bg-gradient-to-r from-yellow-500 bg-clip-text text-center text-5xl font-extrabold text-transparent dark:from-yellow-400 sm:text-5xl lg:text-6xl">
<h1 className="mx-auto max-w-screen-md bg-gradient-to-r from-yellow-500 to-orange-600 bg-clip-text text-center text-5xl font-extrabold text-transparent dark:from-yellow-400 dark:to-orange-500 sm:text-5xl lg:text-6xl">
Take full control of your GraphQL API
</h1>
<p className="mx-auto mt-6 max-w-screen-sm text-center text-2xl text-gray-600 dark:text-gray-400">

View file

@ -59,7 +59,7 @@ const OPERATIONS_EXPLAINER = 'GraphQL requests reported to GraphQL Hive';
export function Pricing({ gradient }: { gradient: [string, string] }): ReactElement {
return (
<div className="bg-neutral-900 w-full">
<div className="w-full bg-neutral-900">
<div className="mx-auto my-12 box-border w-full max-w-[1024px] px-6">
<h2
className="bg-clip-text text-2xl font-bold leading-normal text-white text-transparent dark:text-transparent md:text-3xl"
@ -130,7 +130,7 @@ export function Pricing({ gradient }: { gradient: [string, string] }): ReactElem
href="https://the-guild.dev"
target="_blank"
rel="noreferrer"
className="text-orange-500 font-medium transition-colors hover:underline"
className="font-medium text-orange-500 transition-colors hover:underline"
>
The Guild
</a>

View file

@ -0,0 +1,13 @@
diff --git a/index.mjs b/index.mjs
index d15799497a18926e18105636032ce65ae4a80e0e..997488a1abe945cacb253d1e387f4334eeeebf2b 100644
--- a/index.mjs
+++ b/index.mjs
@@ -2,7 +2,7 @@ import { __awaiter } from 'tslib';
import { Kind, TypeInfo, visit, visitWithTypeInfo, GraphQLError, getNamedType, isScalarType, isInterfaceType, isObjectType, isUnionType, isInputObjectType, isListType, isNonNullType, isWrappingType, isEnumType, parse, extendSchema, TokenKind, print, validate as validate$1, printType } from 'graphql';
import inspect from 'object-inspect';
import { DepGraph } from 'dependency-graph';
-import { Parser } from 'graphql/language/parser';
+import { Parser } from 'graphql/language/parser.js';
function keyMap(list, keyFn) {
return list.reduce((map, item) => {

View file

@ -1,34 +0,0 @@
diff --git a/index.js b/index.js
index fbfc8b2..6169638 100644
--- a/index.js
+++ b/index.js
@@ -5,7 +5,7 @@
if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') {
const nil = new Int32Array(new SharedArrayBuffer(4))
- function sleep (ms) {
+ function atomicSleep1 (ms) {
// also filters out NaN, non-number types, including empty strings, but allows bigints
const valid = ms > 0 && ms < Infinity
if (valid === false) {
@@ -17,10 +17,10 @@ if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined')
Atomics.wait(nil, 0, 0, Number(ms))
}
- module.exports = sleep
+ module.exports = atomicSleep1
} else {
- function sleep (ms) {
+ function atomicSleep2 (ms) {
// also filters out NaN, non-number types, including empty strings, but allows bigints
const valid = ms > 0 && ms < Infinity
if (valid === false) {
@@ -33,6 +33,6 @@ if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined')
while (target > Date.now()){}
}
- module.exports = sleep
+ module.exports = atomicSleep2
}

View file

@ -1,63 +0,0 @@
diff --git a/dist/commands/runify.js b/dist/commands/runify.js
index 0ebfbf042310483d8f6f7b0220bc0a58bb3f595a..a7c11de9cf79ffc7eab66fcc1b5593cb32846e4d 100644
--- a/dist/commands/runify.js
+++ b/dist/commands/runify.js
@@ -86,7 +86,8 @@ async function runify(packagePath, reporter) {
return;
}
if (isNext(pkg)) {
- await buildNext(cwd);
+ const additionalRequire = pkg?.buildOptions?.runify?.next?.header ?? null
+ await buildNext(cwd, additionalRequire);
await rewritePackageJson(pkg, cwd, (newPkg) => ({
...newPkg,
dependencies: pkg.dependencies,
@@ -140,7 +141,7 @@ function isNext(pkg) {
var _a, _b;
return ((_a = pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) === null || _a === void 0 ? void 0 : _a.next) || ((_b = pkg === null || pkg === void 0 ? void 0 : pkg.devDependencies) === null || _b === void 0 ? void 0 : _b.next);
}
-async function buildNext(cwd) {
+async function buildNext(cwd, additionalRequire) {
await new Promise((resolve, reject) => {
const child = (0, child_process_1.spawn)("next", ["build"], {
stdio: "inherit",
@@ -90,6 +90,7 @@ async function runify(packagePath, reporter) {
await rewritePackageJson(pkg, cwd, (newPkg) => ({
...newPkg,
dependencies: pkg.dependencies,
+ type: "commonjs"
}));
}
else {
@@ -150,6 +151,16 @@ async function buildNext(cwd) {
child.on("error", reject);
});
await fs_extra_1.default.mkdirp((0, path_1.join)(cwd, "dist"));
+ if (additionalRequire) {
+ await tsup_1.build({
+ entryPoints: [path_1.join(cwd, additionalRequire)],
+ outDir: path_1.join(cwd, "dist"),
+ target: "node18",
+ format: ["cjs"],
+ splitting: false,
+ skipNodeModulesBundle: true,
+ });
+ }
await Promise.all([
fs_extra_1.default.copy((0, path_1.join)(cwd, ".next"), (0, path_1.join)(cwd, "dist/.next"), {
filter(src) {
@@ -162,11 +173,13 @@ async function buildNext(cwd) {
`#!/usr/bin/env node`,
`process.on('SIGTERM', () => process.exit(0))`,
`process.on('SIGINT', () => process.exit(0))`,
+ additionalRequire ? `require('${additionalRequire.replace(".ts", '')}')` : ``,
`
require('next/dist/server/lib/start-server').startServer({
dir: __dirname,
hostname: '0.0.0.0',
- port: parseInt(process.env.PORT)
+ port: parseInt(process.env.PORT),
+ conf: {},
}).then(async (app)=>{
const appUrl = 'http://' + app.hostname + ':' + app.port;
console.log('started server on '+ app.hostname + ':' + app.port + ', url: ' + appUrl);

File diff suppressed because it is too large Load diff