This commit is contained in:
Kevin Grüneberg committed 2024-03-26 20:27:48 +07:00
1 parent c60d0ad7f4
commit 3b4c3c701d
30 files changed
+4049 -3993

No files matched your search

+10 -10
View File
@@ -10,36 +10,36 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@dagrejs/dagre": "^1.0.4",
"@dagrejs/dagre": "^1.1.1",
"@gregnr/libpg-query": "13.4.0-dev.12",
"@monaco-editor/react": "^4.6.0",
"@supabase/ssr": "^0.1.0",
"@tanstack/react-query": "^5.13.4",
"ai": "^2.2.31",
"ai": "^3.0.13",
"common": "*",
"config": "*",
"dayjs": "^1.11.10",
"eslint-config-next": "^14.1.4",
"lodash": "^4.17.21",
"lucide-react": "^0.338.0",
"lucide-react": "^0.363.0",
"next": "^14.1.4",
"openai": "^4.20.1",
"openai": "^4.29.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-flow": "^1.0.3",
"sql-formatter": "^13.1.0",
"sql-formatter": "^15.3.0",
"ui": "*",
"ui-patterns": "*",
"valtio": "^1.12.0",
"valtio": "^1.13.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"autoprefixer": "^10.4.14",
"@types/react": "^18.2.71",
"@types/react-dom": "^18.2.22",
"autoprefixer": "^10.4.19",
"nextjs-node-loader": "^1.1.5-alpha.0",
"postcss": "^8.4.31",
"postcss": "^8.4.38",
"typescript": "^5.4.3"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
import isbot from 'isbot'
import { isbot } from 'isbot'
export function middleware(request: NextRequest) {
const specs = ['javascript', 'dart', 'csharp']
+23 -23
View File
@@ -23,11 +23,11 @@
"@mdx-js/loader": "^2.1.5",
"@mdx-js/react": "^2.3.0",
"@next/bundle-analyzer": "^14.1.4",
"@next/mdx": "^13.5.6",
"@octokit/auth-app": "^6.0.3",
"@octokit/core": "^5.0.2",
"@octokit/graphql": "^7.0.2",
"@octokit/plugin-paginate-graphql": "^4.0.0",
"@next/mdx": "^14.1.4",
"@octokit/auth-app": "^6.0.4",
"@octokit/core": "^6.0.1",
"@octokit/graphql": "^8.0.1",
"@octokit/plugin-paginate-graphql": "^5.1.0",
"@radix-ui/react-accordion": "^1.1.2",
"@supabase/auth-helpers-react": "^0.4.2",
"@supabase/supabase-js": "^2.39.3",
@@ -36,14 +36,14 @@
"common": "*",
"common-tags": "^1.8.2",
"config": "*",
"framer-motion": "^11.0.3",
"framer-motion": "^11.0.21",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.3",
"hast-util-has-property": "^2.0.1",
"icons": "*",
"isbot": "^3.6.5",
"jsrsasign": "^11.0.0",
"katex": "^0.16.9",
"isbot": "^5.1.2",
"jsrsasign": "^11.1.0",
"katex": "^0.16.10",
"lodash": "^4.17.21",
"markdown-toc": "^1.2.0",
"mdast": "^3.0.0",
@@ -51,20 +51,20 @@
"mdast-util-mdx": "^2.0.0",
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-to-string": "^3.1.1",
"mdx-mermaid": "2.0.0-rc3",
"mermaid": "^10.0.2",
"mdx-mermaid": "2.0.0",
"mermaid": "^10.9.0",
"micromark-extension-mdxjs": "^1.0.0",
"next": "^14.1.4",
"next-mdx-remote": "^4.4.1",
"next-plugin-yaml": "^1.0.1",
"next-seo": "^5.14.1",
"next-seo": "^6.5.0",
"next-themes": "^0.3.0",
"openai": "^4.20.1",
"openai": "^4.29.2",
"openapi-fetch": "^0.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.12",
"react-intersection-observer": "^9.5.3",
"react-error-boundary": "^4.0.13",
"react-intersection-observer": "^9.8.1",
"react-markdown": "^8.0.3",
"rehype-katex": "^7.0.0",
"rehype-slug": "^5.1.0",
@@ -79,26 +79,26 @@
"unist-util-filter": "^4.0.1",
"unist-util-visit": "^4.1.2",
"uuid": "^9.0.1",
"valtio": "^1.12.0"
"valtio": "^1.13.2"
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.410.0",
"@aws-sdk/client-secrets-manager": "^3.540.0",
"@types/hast": "^2.3.4",
"@types/jsrsasign": "^10.5.12",
"@types/jsrsasign": "^10.5.13",
"@types/node": "^20.11.16",
"@types/react": "^18.2.24",
"@types/react": "^18.2.71",
"@types/unist": "^2.0.6",
"acorn": "^8.11.3",
"config": "*",
"dotenv": "^16.0.3",
"dotenv": "^16.4.5",
"ejs": "^3.1.8",
"globby": "^13.2.2",
"globby": "^14.0.1",
"jest-environment-jsdom": "^29.7.0",
"npm-run-all": "^4.1.5",
"openapi-types": "^12.1.3",
"openapi-typescript": "^6.7.4",
"openapi-typescript": "^6.7.5",
"tsconfig": "*",
"tsx": "^4.6.2",
"tsx": "^4.7.1",
"typescript": "^5.4.3"
}
}
@@ -1,10 +1,10 @@
import { createAppAuth } from '@octokit/auth-app'
import { Octokit } from '@octokit/core'
import { paginateGraphql } from '@octokit/plugin-paginate-graphql'
import { paginateGraphQL } from '@octokit/plugin-paginate-graphql'
import { createHash } from 'crypto'
import { BaseLoader, BaseSource } from './base'
export const ExtendedOctokit = Octokit.plugin(paginateGraphql)
export const ExtendedOctokit = Octokit.plugin(paginateGraphQL)
export type ExtendedOctokit = InstanceType<typeof ExtendedOctokit>
export type Discussion = {
+2 -2
View File
@@ -22,11 +22,11 @@
"devDependencies": {
"@redocly/cli": "^1.6.0",
"@types/json-stringify-safe": "^5.0.0",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.0",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.21",
"prettier": "^4.0.0-alpha.8",
"tsx": "^4.7.0"
"tsx": "^4.7.1"
},
"prettier": {
"semi": false,
+12 -12
View File
@@ -11,22 +11,22 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@storybook/addon-essentials": "^8.0.0-rc.1",
"@storybook/addon-interactions": "^8.0.0-rc.1",
"@storybook/addon-links": "^8.0.0-rc.1",
"@storybook/addon-mdx-gfm": "^8.0.0-rc.1",
"@storybook/addon-onboarding": "^8.0.0-rc.1",
"@storybook/addon-styling-webpack": "^0.0.6",
"@storybook/addon-themes": "^8.0.0-rc.1",
"@storybook/blocks": "^8.0.0-rc.1",
"@storybook/nextjs": "^8.0.0-rc.1",
"@storybook/react": "^8.0.0-rc.1",
"@storybook/test": "^8.0.0-rc.1",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-interactions": "^8.0.4",
"@storybook/addon-links": "^8.0.4",
"@storybook/addon-mdx-gfm": "^8.0.4",
"@storybook/addon-onboarding": "^8.0.4",
"@storybook/addon-styling-webpack": "^1.0.0",
"@storybook/addon-themes": "^8.0.4",
"@storybook/blocks": "^8.0.4",
"@storybook/nextjs": "^8.0.4",
"@storybook/react": "^8.0.4",
"@storybook/test": "^8.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^8.0.4"
},
"dependencies": {
"@storybook/node-logger": "^8.0.0-rc.1"
"@storybook/node-logger": "^8.0.4"
}
}
@@ -46,13 +46,14 @@ const schema = object({
SECURITY_CAPTCHA_ENABLED: boolean().required(),
SECURITY_CAPTCHA_SECRET: string().when('SECURITY_CAPTCHA_ENABLED', {
is: true,
then: string().required('Must have a Captcha secret'),
then: (schema) => schema.required('Must have a Captcha secret'),
}),
SECURITY_CAPTCHA_PROVIDER: string().when('SECURITY_CAPTCHA_ENABLED', {
is: true,
then: string()
.oneOf(['hcaptcha', 'turnstile'])
.required('Captcha provider must be either hcaptcha or turnstile'),
then: (schema) =>
schema
.oneOf(['hcaptcha', 'turnstile'])
.required('Captcha provider must be either hcaptcha or turnstile'),
}),
SESSIONS_TIMEBOX: number().min(0, 'Must be a positive number'),
SESSIONS_INACTIVITY_TIMEOUT: number().min(0, 'Must be a positive number'),
@@ -1,6 +1,5 @@
import { compact, isObject, isString, map } from 'lodash'
// @ts-ignore
import MarkdownTable from 'markdown-table'
import { markdownTable } from 'markdown-table'
import { useRouter } from 'next/router'
import { useMemo, useRef } from 'react'
import { CSVLink } from 'react-csv'
@@ -90,7 +89,7 @@ const ResultsDropdown = ({ id }: ResultsDropdownProps) => {
return temp
})
const table = [columns].concat(rows)
const markdownData = MarkdownTable(table)
const markdownData = markdownTable(table)
copyToClipboard(markdownData, () => {
toast.success('Copied results to clipboard')
@@ -76,7 +76,7 @@ export const parseSpreadsheet = (
previewRows = results.data.slice(0, 20)
if (results.errors.length > 0) {
const formattedErrors = results.errors.map((error) => {
return { ...error, data: results.data[error.row] }
return { ...error, data: results.data[error.row!] }
})
errors.push(...formattedErrors)
}
@@ -3,7 +3,6 @@ import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import { useState } from 'react'
import { Bar, BarChart as RechartBarChart, Cell, Tooltip, XAxis, Legend } from 'recharts'
import type { CategoricalChartState } from 'recharts/types/chart/generateCategoricalChart'
import ChartHeader from './ChartHeader'
import type { CommonChartProps, Datum } from './Charts.types'
import { numberFormatter, useChartSize } from './Charts.utils'
@@ -15,7 +14,7 @@ export interface BarChartProps<D = Datum> extends CommonChartProps<D> {
xAxisKey: string
customDateFormat?: string
displayDateInUtc?: boolean
onBarClick?: (datum: Datum, tooltipData?: CategoricalChartState) => void
onBarClick?: (datum: Datum, tooltipData?: any) => void
emptyStateMessage?: string
showLegend?: boolean
xAxisIsDate?: boolean
@@ -1,5 +1,3 @@
import { AreaProps } from 'recharts'
export interface CommonChartProps<D>
extends Pick<
HeaderType<D>,
+56 -57
View File
@@ -17,11 +17,11 @@
"codegen": "openapi-typescript http://localhost:8080/api-json -o data/api.d.ts && prettier --write data/api.d.ts"
},
"dependencies": {
"@dagrejs/dagre": "^1.0.4",
"@graphiql/react": "^0.19.4",
"@dagrejs/dagre": "^1.1.1",
"@graphiql/react": "^0.20.3",
"@graphiql/toolkit": "^0.9.1",
"@hcaptcha/react-hcaptcha": "^1.8.1",
"@headlessui/react": "^1.7.17",
"@hcaptcha/react-hcaptcha": "^1.10.1",
"@headlessui/react": "^1.7.18",
"@monaco-editor/react": "^4.6.0",
"@next/bundle-analyzer": "^14.1.4",
"@radix-ui/react-popover": "^1.0.7",
@@ -29,43 +29,43 @@
"@scaleleap/pg-format": "^1.0.0",
"@sentry/nextjs": "^7.108.0",
"@serafin/schema-builder": "^0.18.2",
"@stripe/react-stripe-js": "^2.5.0",
"@stripe/stripe-js": "^3.0.5",
"@stripe/react-stripe-js": "^2.6.2",
"@stripe/stripe-js": "^3.1.0",
"@supabase/auth-helpers-react": "^0.4.2",
"@supabase/shared-types": "0.1.55",
"@supabase/shared-types": "0.1.64",
"@supabase/supabase-js": "^2.39.3",
"@tanstack/react-query": "4.35.7",
"@tanstack/react-query-devtools": "4.35.7",
"@uidotdev/usehooks": "^2.4.1",
"@zip.js/zip.js": "^2.7.29",
"ai": "^2.2.31",
"@zip.js/zip.js": "^2.7.40",
"ai": "^3.0.13",
"ai-commands": "*",
"ajv": "^8.6.3",
"awesome-debounce-promise": "^2.1.0",
"clsx": "^1.2.1",
"clsx": "^2.1.0",
"common": "*",
"common-tags": "^1.8.2",
"config": "*",
"configcat-js": "^7.0.0",
"configcat-js": "^9.5.0",
"dayjs": "^1.11.10",
"file-saver": "^2.0.5",
"framer-motion": "^11.0.3",
"framer-motion": "^11.0.21",
"generate-password-browser": "^1.1.0",
"html-to-image": "^1.10.8",
"icons": "*",
"immutability-helper": "^3.1.1",
"ip-num": "^1.5.1",
"json-logic-js": "^2.0.2",
"jsonrepair": "^3.2.3",
"jsonrepair": "^3.6.0",
"lodash": "^4.17.21",
"lucide-react": "^0.338.0",
"markdown-table": "=2.0.0",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"lucide-react": "^0.363.0",
"markdown-table": "^3.0.3",
"mobx": "^6.12.1",
"mobx-react-lite": "^4.0.6",
"monaco-editor": "0.33.0",
"next": "^14.1.4",
"next-themes": "^0.3.0",
"openai": "^4.20.1",
"openai": "^4.29.2",
"openapi-fetch": "^0.6.2",
"p-queue": "^6.6.2",
"papaparse": "^5.3.1",
@@ -81,62 +81,60 @@
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-grid-layout": "^1.4.2",
"react-grid-layout": "^1.4.4",
"react-hot-toast": "^2.4.1",
"react-inlinesvg": "^4.0.4",
"react-intersection-observer": "^9.5.3",
"react-inlinesvg": "^4.1.3",
"react-intersection-observer": "^9.8.1",
"react-markdown": "^8.0.3",
"react-simple-maps": "4.0.0-beta.6",
"react-tracked": "^1.7.11",
"react-virtualized-auto-sizer": "^1.0.20",
"react-window": "^1.8.6",
"react-window-infinite-loader": "^1.0.7",
"reactflow": "^11.10.1",
"recharts": "^2.8.0",
"semver": "^6.3.1",
"react-tracked": "^1.7.14",
"react-virtualized-auto-sizer": "^1.0.24",
"react-window": "^1.8.10",
"react-window-infinite-loader": "^1.0.9",
"reactflow": "^11.10.4",
"recharts": "^2.12.3",
"semver": "^7.6.0",
"shared-data": "*",
"sql-formatter": "^13.1.0",
"sql-formatter": "^15.3.0",
"sqlstring": "^2.3.2",
"ui": "*",
"ui-patterns": "*",
"uuid": "^9.0.1",
"valtio": "^1.12.0",
"yup": "^0.32.11",
"yup-password": "^0.2.2",
"valtio": "^1.13.2",
"yup": "^1.4.0",
"yup-password": "^0.3.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.410.0",
"@aws-sdk/client-secrets-manager": "^3.540.0",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-links": "^7.5.3",
"@storybook/react": "^7.5.3",
"@supabase/postgres-meta": "^0.64.4",
"@testing-library/dom": "^9.3.3",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^13.5.0",
"@testing-library/react": "^14.2.2",
"@testing-library/user-event": "^14.5.2",
"@types/common-tags": "^1.8.1",
"@types/file-saver": "^2.0.2",
"@types/json-logic-js": "^1.2.1",
"@types/lodash": "^4.14.172",
"@types/markdown-table": "^3.0.0",
"@types/papaparse": "^5.3.1",
"@types/react": "^18.2.24",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-csv": "^1.1.2",
"@types/file-saver": "^2.0.7",
"@types/json-logic-js": "^2.0.7",
"@types/lodash": "^4.17.0",
"@types/papaparse": "^5.3.14",
"@types/react": "^18.2.71",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-csv": "^1.1.10",
"@types/react-datepicker": "^4.3.4",
"@types/react-dom": "^18.2.8",
"@types/react-grid-layout": "^1.3.0",
"@types/react-dom": "^18.2.22",
"@types/react-grid-layout": "^1.3.5",
"@types/react-simple-maps": "^3.0.1",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@types/react-window-infinite-loader": "^1.0.5",
"@types/recharts": "^1.8.23",
"@types/semver": "^7.3.9",
"@types/sqlstring": "^2.3.0",
"@types/uuid": "^8.3.4",
"@types/zxcvbn": "^4.4.1",
"autoprefixer": "^10.4.14",
"@types/react-virtualized-auto-sizer": "^1.0.4",
"@types/react-window": "^1.8.8",
"@types/react-window-infinite-loader": "^1.0.9",
"@types/semver": "^7.5.8",
"@types/sqlstring": "^2.3.2",
"@types/uuid": "^9.0.8",
"@types/zxcvbn": "^4.4.4",
"autoprefixer": "^10.4.19",
"common": "*",
"config": "*",
"eslint-config-next": "^14.1.4",
@@ -144,11 +142,12 @@
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.7.0",
"openapi-types": "^12.1.3",
"openapi-typescript": "^6.7.4",
"postcss": "^8.4.31",
"openapi-typescript": "^6.7.5",
"postcss": "^8.4.38",
"prettier": "^4.0.0-alpha.8",
"storybook-dark-mode": "^3.0.1",
"tailwindcss": "^3.4.1",
"typescript": "^5.4.3"
"typescript": "^5.4.3",
"@types/markdown-table": "^3.0.0"
}
}
-179
View File
@@ -1,179 +0,0 @@
import { Button, Form, Input, Select } from 'ui'
import { useState } from 'react'
import countries from '~/data/Countries.json'
import supabase from '~/lib/supabaseMisc'
const INITIAL_VALUES = {
companyName: '',
contactFirstName: '',
contactLastName: '',
contactEmail: '',
contactPhone: '',
companySize: '',
details: '',
country: 'US',
}
const validate = (values: any) => {
const errors: any = {}
if (!values.companyName) {
errors.companyName = 'Required'
}
if (!values.contactFirstName) {
errors.contactFirstName = 'Required'
}
if (!values.contactLastName) {
errors.contactLastName = 'Required'
}
if (!values.contactEmail) {
errors.contactEmail = 'Required'
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.contactEmail)) {
errors.contactEmail = 'Invalid email address'
}
return errors
}
const MfaContactForm = () => {
const [formSubmitted, setFormSubmitted] = useState<boolean>(false)
const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
const { error } = await supabase.from('mfa_early_access_contacts').insert([
{
company_name: values.companyName,
contact_name: `${values.contactFirstName} ${values.contactLastName}`,
contact_first_name: values.contactFirstName,
contact_last_name: values.contactLastName,
contact_email: values.contactEmail,
contact_phone: values.contactPhone,
company_size: values.companySize,
details: values.details,
country: values.country,
},
])
// TODO: handle error
console.log('error:', error)
if (!error) {
resetForm()
setFormSubmitted(true)
}
}
return (
<div>
<Form initialValues={INITIAL_VALUES} validate={validate} onSubmit={handleFormSubmit}>
{({ isSubmitting }: any) => (
<div className="flex flex-col space-y-4">
<div>
<Input
label="Company Name *"
id="companyName"
name="companyName"
layout="vertical"
placeholder="Supa Inc."
/>
</div>
<div className="flex space-x-4">
<div className="flex-1">
<Input
label="Your First Name *"
id="contactFirstName"
name="contactFirstName"
layout="vertical"
placeholder="Jane"
/>
</div>
<div className="flex-1">
<Input
label="Your Last Name *"
id="contactLastName"
name="contactLastName"
layout="vertical"
placeholder="Doe"
/>
</div>
</div>
<div>
<Input
label="Your Business Email *"
id="contactEmail"
name="contactEmail"
layout="vertical"
placeholder="janedoe@example.com"
/>
</div>
<div>
<Select label="Company Size" id="companySize" name="companySize" layout="vertical">
<Select.Option value="">{'--'}</Select.Option>
<Select.Option value="1-10">1-10 Employees</Select.Option>
<Select.Option value="11-50">11-50 Employees</Select.Option>
<Select.Option value="51-200">51-200 Employees</Select.Option>
<Select.Option value="201-500">201-500 Employees</Select.Option>
<Select.Option value="501-1000">501-1000 Employees</Select.Option>
<Select.Option value="1001-5000">1001-5000 Employees</Select.Option>
<Select.Option value="5001+">5001+ Employees</Select.Option>
</Select>
</div>
<div>
<Input
label="Your Phone Number"
id="contactPhone"
name="contactPhone"
layout="vertical"
placeholder="+65 1234 1234"
/>
</div>
<div>
<Select label="Country / Main Timezone" id="country" name="country" layout="vertical">
{countries.map(({ code, name }) => (
<Select.Option key={code} value={code}>
{name}
</Select.Option>
))}
</Select>
</div>
<div>
<Input.TextArea
id="details"
name="details"
label="Additional Details"
placeholder="Tell us about your projects, clients, and technology..."
rows={10}
/>
</div>
<div className="col-span-2 flex w-full flex-row-reverse pt-4">
<Button
size="xlarge"
disabled={isSubmitting}
loading={isSubmitting}
htmlType="submit"
>
Send
</Button>
</div>
</div>
)}
</Form>
{formSubmitted && (
<h3 className="h3 mt-12 text-center">Thanks, we'll reach out to you shortly.</h3>
)}
</div>
)
}
export default MfaContactForm
-205
View File
@@ -1,205 +0,0 @@
import { Button, Form, Input, Select } from 'ui'
import { useState } from 'react'
import countries from '~/data/Countries.json'
import supabase from '~/lib/supabaseMisc'
const INITIAL_VALUES = {
companyName: '',
contactFirstName: '',
contactLastName: '',
contactEmail: '',
contactPhone: '',
companySize: '',
details: '',
country: 'US',
}
const validate = (values: any) => {
const errors: any = {}
if (!values.companyName) {
errors.companyName = 'Required'
}
if (!values.contactFirstName) {
errors.contactFirstName = 'Required'
}
if (!values.contactLastName) {
errors.contactLastName = 'Required'
}
if (!values.contactEmail) {
errors.contactEmail = 'Required'
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.contactEmail)) {
errors.contactEmail = 'Invalid email address'
}
return errors
}
const SOC2RequestForm = () => {
const [error, setError] = useState<string>()
const [formSubmitted, setFormSubmitted] = useState<boolean>(false)
const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
const { error } = await supabase.from('soc2_requests').insert([
{
company_name: values.companyName,
contact_name: `${values.contactFirstName} ${values.contactLastName}`,
contact_first_name: values.contactFirstName,
contact_last_name: values.contactLastName,
contact_email: values.contactEmail,
contact_phone: values.contactPhone,
company_size: values.companySize,
details: values.details,
country: values.country,
},
])
if (!error) {
resetForm()
setFormSubmitted(true)
} else {
setError(error.message)
}
}
return (
<div>
{formSubmitted ? (
<h3 className="h3 text-brand mt-12 text-center">
Thank you for your submission! A member from the Supabase team will reach out to you
shortly!
</h3>
) : (
<>
<Form initialValues={INITIAL_VALUES} validate={validate} onSubmit={handleFormSubmit}>
{({ values, isSubmitting }: any) => {
const selectedCountry = countries.find(
(country) => country.code === values['country']
)
const phonePlaceholder =
selectedCountry !== undefined ? `+${selectedCountry.phone_code}` : ''
return (
<div className="flex flex-col space-y-1">
<div>
<Input
label="Company Name *"
id="companyName"
name="companyName"
layout="vertical"
placeholder="Supa Inc."
/>
</div>
<div className="flex space-x-4">
<div className="flex-1">
<Input
label="Your First Name *"
id="contactFirstName"
name="contactFirstName"
layout="vertical"
placeholder="Jane"
/>
</div>
<div className="flex-1">
<Input
label="Your Last Name *"
id="contactLastName"
name="contactLastName"
layout="vertical"
placeholder="Doe"
/>
</div>
</div>
<div>
<Input
label="Your Business Email *"
id="contactEmail"
name="contactEmail"
layout="vertical"
placeholder="janedoe@example.com"
/>
</div>
<div>
<Select
label="Company Size"
id="companySize"
name="companySize"
layout="vertical"
>
<Select.Option value="">{'--'}</Select.Option>
<Select.Option value="1-10">1-10 Employees</Select.Option>
<Select.Option value="11-50">11-50 Employees</Select.Option>
<Select.Option value="51-200">51-200 Employees</Select.Option>
<Select.Option value="201-500">201-500 Employees</Select.Option>
<Select.Option value="501-1000">501-1000 Employees</Select.Option>
<Select.Option value="1001-5000">1001-5000 Employees</Select.Option>
<Select.Option value="5001+">5001+ Employees</Select.Option>
</Select>
</div>
<div>
<Select
label="Country / Main Timezone"
id="country"
name="country"
layout="vertical"
>
{countries.map(({ code, name }) => (
<Select.Option key={code} value={code}>
{name}
</Select.Option>
))}
</Select>
</div>
<div>
<Input
label="Your Phone Number"
id="contactPhone"
name="contactPhone"
layout="vertical"
placeholder={phonePlaceholder}
/>
</div>
<div>
<Input.TextArea
id="details"
name="details"
label="Additional Details"
placeholder="Tell us about your projects, clients, and technology..."
rows={10}
/>
</div>
<div className="col-span-2 flex w-full flex-row-reverse pt-4">
<Button
type="primary"
size="small"
className="text-white"
htmlType="submit"
disabled={isSubmitting}
loading={isSubmitting}
>
Submit request
</Button>
</div>
</div>
)
}}
</Form>
{error && <p className="text-sm">Error: {error}</p>}
</>
)}
</div>
)
}
export default SOC2RequestForm
+33 -1
View File
@@ -127,8 +127,40 @@ export interface Database {
},
]
}
dpa_downloads: {
Row: {
contact_email: string
document: string
}
Insert: {
contact_email: string
document: string
}
Update: {
contact_email: string
document: string
}
Relationships: []
}
lwx_meetups: {
Row: {
startAt: Date
}
Relationships: []
}
}
Views: {
lwx_tickets_golden: {
Row: {
name: string
username: string
ticketNumber: string
metadata: Json
golden: boolean
createdAt: Date
}
}
}
Views: {}
Functions: {}
Enums: {
partner_type: 'technology' | 'expert'
+25 -25
View File
@@ -17,29 +17,29 @@
"@heroicons/react": "^1.0.6",
"@mdx-js/react": "^2.3.0",
"@next/bundle-analyzer": "^14.1.4",
"@next/mdx": "^13.5.6",
"@octokit/auth-app": "^6.0.3",
"@octokit/core": "^5.0.2",
"@octokit/graphql": "^7.0.2",
"@octokit/plugin-paginate-graphql": "^4.0.0",
"@next/mdx": "^14.1.4",
"@octokit/auth-app": "^6.0.4",
"@octokit/core": "^6.0.1",
"@octokit/graphql": "^8.0.1",
"@octokit/plugin-paginate-graphql": "^5.1.0",
"@octokit/rest": "^20.0.2",
"@react-three/fiber": "^7.0.29",
"@react-three/fiber": "^8.16.0",
"@supabase/auth-helpers-react": "^0.4.2",
"@supabase/auth-ui-react": "^0.4.5",
"@supabase/auth-ui-react": "^0.4.7",
"@supabase/supabase-js": "^2.39.3",
"classnames": "^2.3.1",
"classnames": "^2.5.1",
"cobe": "^0.6.2",
"common": "*",
"config": "*",
"dat.gui": "^0.7.9",
"dayjs": "^1.11.10",
"framer-motion": "^11.0.3",
"globby": "^13.2.2",
"framer-motion": "^11.0.21",
"globby": "^14.0.1",
"gray-matter": "^4.0.3",
"markdown-toc": "^1.2.0",
"next": "^14.1.4",
"next-mdx-remote": "^4.4.1",
"next-seo": "^5.14.1",
"next-seo": "^6.5.0",
"next-themes": "^0.3.0",
"parse-numeric-range": "^1.3.0",
"react": "^18.2.0",
@@ -51,38 +51,38 @@
"react-syntax-highlighter": "^15.5.0",
"react-tooltip": "^4.2.17",
"react-transition-group": "^4.4.1",
"react-use": "^17.4.0",
"recharts": "^2.8.0",
"react-use": "^17.5.0",
"recharts": "^2.12.3",
"rehype-slug": "^5.1.0",
"remark": "^15.0.1",
"remark-gfm": "^3.0.1",
"remark-html": "^16.0.1",
"shared-data": "*",
"swiper": "^6.5.0",
"three": "^0.136.0",
"typed.js": "^2.0.16",
"three": "^0.162.0",
"typed.js": "^2.1.0",
"typescript": "^5.4.3",
"ui": "*",
"ui-patterns": "*",
"icons": "*",
"use-debounce": "^7.0.1",
"vanilla-tilt": "1.7.0",
"yup": "^0.32.11"
"use-debounce": "^10.0.0",
"vanilla-tilt": "1.8.1",
"yup": "^1.4.0"
},
"devDependencies": {
"@types/classnames": "^2.3.1",
"@types/dat.gui": "^0.7.10",
"@types/mdx-js__react": "^1.5.6",
"@types/mdx-js__react": "^1.5.8",
"@types/node": "^20.11.16",
"@types/parse-numeric-range": "^0.0.1",
"@types/react": "^18.2.24",
"@types/parse-numeric-range": "^0.0.3",
"@types/react": "^18.2.71",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.2.8",
"@types/react-dom": "^18.2.22",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/three": "^0.136.0",
"autoprefixer": "^10.4.14",
"@types/three": "^0.162.0",
"autoprefixer": "^10.4.19",
"config": "*",
"postcss": "^8.4.31",
"postcss": "^8.4.38",
"tsconfig": "*"
},
"license": "MIT"
+2 -2
View File
@@ -8,7 +8,7 @@ import mdxComponents from '~/lib/mdx/mdxComponents'
import { mdxSerialize } from '~/lib/mdx/mdxSerialize'
import { createAppAuth } from '@octokit/auth-app'
import { Octokit as OctokitRest } from '@octokit/rest'
import { paginateGraphql } from '@octokit/plugin-paginate-graphql'
import { paginateGraphQL } from '@octokit/plugin-paginate-graphql'
import { GetServerSideProps } from 'next'
import Link from 'next/link'
import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/outline'
@@ -95,7 +95,7 @@ export const getServerSideProps: GetServerSideProps = async ({ res, query }) =>
// uses the graphql api
async function fetchDiscussions(owner: string, repo: string, categoryId: string, cursor: string) {
const { Octokit } = await import('@octokit/core')
const ExtendedOctokit = Octokit.plugin(paginateGraphql)
const ExtendedOctokit = Octokit.plugin(paginateGraphQL)
type ExtendedOctokit = InstanceType<typeof ExtendedOctokit>
const octokit = new ExtendedOctokit({
-38
View File
@@ -1,38 +0,0 @@
import { NextSeo } from 'next-seo'
import { useRouter } from 'next/router'
import DefaultLayout from '~/components/Layouts/Default'
import MfaContactForm from '~/components/MfaContactForm'
const meta_title = 'MFA early access | Supabase'
const meta_description = ''
const EnterpriseContactPage = () => {
const router = useRouter()
return (
<DefaultLayout>
<NextSeo
title={meta_title}
description={meta_description}
openGraph={{
title: meta_title,
description: meta_description,
url: `https://supabase.com/${router.pathname}`,
images: [
{
url: `https://supabase.com/images/og/og-image-v2.jpg`,
},
],
}}
/>
<div className="mx-auto my-16 max-w-xl px-4 md:my-20 lg:my-24 xl:my-32">
<h2 className="h2 block pb-16 text-center">MFA Early access</h2>
<MfaContactForm />
</div>
</DefaultLayout>
)
}
export default EnterpriseContactPage
+1
View File
@@ -129,6 +129,7 @@ export default function LaunchWeekIndex({ meetups }: Props) {
)
}
export const getServerSideProps: GetServerSideProps = async () => {
const { data: meetups } = await supabase!.from('lwx_meetups').select('*')
@@ -143,7 +143,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
user = data
}
const ticketType = user?.metadata?.hasSecretTicket
const ticketType = (user?.metadata as { hasSecretTicket: boolean })?.hasSecretTicket
? 'secret'
: user?.golden
? 'platinum'
+3814 -3363
View File
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -12,25 +12,25 @@
"@gregnr/libpg-query": "^13.4.0-dev.12",
"@serafin/schema-builder": "^0.18.5",
"@supabase/supabase-js": "*",
"ai": "^2.2.29",
"ai": "^3.0.13",
"common-tags": "^1.8.2",
"config": "*",
"js-tiktoken": "^1.0.10",
"jsonrepair": "^3.5.0",
"openai": "^4.26.1"
"jsonrepair": "^3.6.0",
"openai": "^4.29.2"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"@babel/preset-env": "^7.24.3",
"@jest/globals": "^29.7.0",
"@types/common-tags": "^1.8.4",
"babel-jest": "^29.7.0",
"babel-plugin-transform-import-meta": "^2.2.1",
"dotenv": "^16.3.1",
"dotenv": "^16.4.5",
"jest": "^29.7.0",
"mdast-util-from-markdown": "^2.0.0",
"sql-formatter": "^15.0.2",
"ts-jest": "^29.1.1",
"sql-formatter": "^15.3.0",
"ts-jest": "^29.1.2",
"tsconfig": "*",
"typescript": "^5.4.3"
}
+5 -5
View File
@@ -15,10 +15,10 @@
"author": "",
"license": "ISC",
"devDependencies": {
"minimist": "^1.2.7",
"node-fetch": "^3.2.10",
"prettier": "2.7.1",
"svgo": "^3.0.0",
"svgson": "^5.2.1"
"minimist": "^1.2.8",
"node-fetch": "^3.3.2",
"prettier": "4.0.0-alpha.8",
"svgo": "^3.2.0",
"svgson": "^5.3.1"
}
}
+4 -4
View File
@@ -12,13 +12,13 @@
"config": "*",
"dat.gui": "^0.7.9",
"lodash": "^4.17.21",
"next-themes": "^0.2.1",
"next-themes": "^0.3.0",
"react-hot-toast": "^2.4.1",
"react-use": "^17.4.0"
"react-use": "^17.5.0"
},
"devDependencies": {
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"@types/react": "^18.2.71",
"@types/react-dom": "^18.2.22",
"tsconfig": "*",
"typescript": "^5.4.3"
},
+2 -2
View File
@@ -12,9 +12,9 @@
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/typography": "^0.5.9",
"deepmerge": "^4.2.2",
"eslint-config-next": "^14.1.0",
"eslint-config-next": "^14.1.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react": "7.34.1",
"mini-svg-data-uri": "^1.4.3",
"tailwindcss-radix": "^2.0.0"
},
+1 -1
View File
@@ -13,7 +13,7 @@
"lodash": "*",
"lucide-react": "*",
"next-themes": "*",
"react-error-boundary": "^4.0.12",
"react-error-boundary": "^4.0.13",
"react-hot-toast": "*",
"react-tooltip": "*",
"reactflow": "*",
+29 -29
View File
@@ -18,8 +18,8 @@
"test": "jest"
},
"dependencies": {
"@headlessui/react": "^1.7.17",
"@hookform/resolvers": "^3.1.1",
"@headlessui/react": "^1.7.18",
"@hookform/resolvers": "^3.3.4",
"@mertasan/tailwindcss-variables": "^2.2.3",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-alert-dialog": "^1.0.5",
@@ -50,46 +50,46 @@
"@radix-ui/react-tooltip": "^1.0.7",
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
"autoprefixer": "^10.4.19",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"color": "^4.2.3",
"colorjs.io": "^0.4.3",
"colorjs.io": "^0.5.0",
"common-tags": "^1.8.2",
"date-fns": "^2.30.0",
"formik": "^2.2.9",
"lodash": "^4.17.21",
"lucide-react": "^0.338.0",
"next-themes": "^0.2.1",
"openai": "^4.17.0",
"postcss": "^8.4.31",
"lucide-react": "^0.363.0",
"next-themes": "^0.3.0",
"openai": "^4.29.2",
"postcss": "^8.4.38",
"prop-types": "^15.7.2",
"react-copy-to-clipboard": "^5.1.0",
"react-countdown": "^2.3.5",
"react-day-picker": "^8.8.0",
"react-day-picker": "^8.10.0",
"react-feather": "^2.0.10",
"react-hook-form": "^7.45.0",
"react-hook-form": "^7.51.1",
"react-hot-toast": "^2.4.1",
"react-markdown": "^8.0.3",
"react-resizable-panels": "^2.0.11",
"react-resizable-panels": "^2.0.16",
"react-syntax-highlighter": "^15.5.0",
"react-tooltip": "^4.2.17",
"reactflow": "^11.10.1",
"reactflow": "^11.10.4",
"remark-gfm": "^3.0.1",
"sse.js": "^2.2.0",
"sse.js": "^2.4.1",
"tailwind-merge": "^1.13.2",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.6",
"tailwindcss-radix": "^2.0.0",
"yup": "^0.32.11",
"yup": "^1.4.0",
"zod": "^3.22.3"
},
"devDependencies": {
"@babel/plugin-syntax-flow": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-flow": "^7.21.4",
"@babel/plugin-syntax-flow": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@babel/preset-flow": "^7.24.1",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.4",
"@babel/preset-typescript": "^7.24.1",
"@ctrl/tinycolor": "^3.4.0",
"@jest/types": "^29.6.0",
"@storybook/addon-actions": "^7.5.3",
@@ -100,24 +100,24 @@
"@storybook/react": "^7.5.3",
"@storybook/react-webpack5": "^7.5.3",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^14.0.0",
"@testing-library/react": "^14.2.2",
"@tokens-studio/sd-transforms": "^0.8.5",
"@types/common-tags": "^1.8.1",
"@types/react": "^18.2.24",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.2.8",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/react": "^18.2.71",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-dom": "^18.2.22",
"@types/react-syntax-highlighter": "^15.5.11",
"common": "*",
"config": "*",
"copyfiles": "^2.4.1",
"glob": "^8.1.0",
"glob": "^10.3.10",
"jest-environment-jsdom": "^29.7.0",
"next": "*",
"sql-formatter": "^12.2.0",
"sql-formatter": "^15.3.0",
"storybook": "^7.5.3",
"storybook-dark-mode": "^3.0.1",
"style-dictionary": "^3.7.1",
"ts-jest": "^29.1.1",
"style-dictionary": "^3.9.2",
"ts-jest": "^29.1.2",
"tsconfig": "*",
"tsconfig-paths-webpack-plugin": "^4.0.1",
"typescript": "^5.4.3"
@@ -57,7 +57,6 @@ function Select({
name = '',
onChange,
onBlur,
placeholder,
required,
value = undefined,
defaultValue = undefined,
@@ -134,7 +133,6 @@ function Select({
value={value}
disabled={disabled}
required={required}
placeholder={placeholder}
{...props}
>
{children}
+1 -1
View File
@@ -15,7 +15,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.41.2",
"@playwright/test": "^1.42.1",
"@types/node": "^20.11.16"
}
}
+9 -9
View File
@@ -17,20 +17,20 @@
"author": "Supabase, Inc.",
"license": "MIT",
"devDependencies": {
"@faker-js/faker": "^6.1.2",
"@faker-js/faker": "^8.4.1",
"@supabase/supabase-js": "^2.39.3",
"@testdeck/jest": "^0.3.3",
"@types/jest": "^29.5.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.16",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"allure-commandline": "^2.17.2",
"allure-js-commons": "^2.0.0-beta.14",
"cross-fetch": "^3.1.5",
"ts-jest": "^29.1.1",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"allure-commandline": "^2.27.0",
"allure-js-commons": "^2.15.0",
"cross-fetch": "^4.0.0",
"ts-jest": "^29.1.2",
"jest-allure2-adapter": "^0.3.12",
"jest-environment-jsdom": "^29.7.0",
"postgres": "^3.0.5",
"postgres": "^3.4.4",
"typescript": "^5.4.3"
}
}