Merge remote-tracking branch 'origin/master' into feat/auth-overview-feature-flag

This commit is contained in:
kemal committed 2025-09-30 13:46:01 +01:00
commit cd200c7241
6 files changed
+302 -43

No files matched your search

@@ -41,13 +41,13 @@ const {
'docs:compliance',
'docs:contribution',
'docs:fdw',
'docs:self-hosting',
'docs:framework_quickstarts',
'docs:full_platform',
'docs:local_development',
'docs:mobile_tutorials',
'docs:pgtap',
'docs:production_checklist',
'docs:self-hosting',
'docs:web_apps',
'integrations:partners',
'sdk:csharp',
+23 -11
View File
@@ -156,6 +156,15 @@ export interface CustomTypePropertyType {
type: TypeDetails | undefined
}
// The meaning of kind flags from `typedoc`:
// https://github.com/TypeStrong/typedoc/blob/2953b0148253589448176881a7acb46090f941bd/src/lib/output/themes/default/assets/typedoc/Application.ts#L36
const KIND_MODULE = 2
const KIND_CLASS = 128
const KIND_INTERFACE = 256
const KIND_CONSTRUCTOR = 512
const KIND_METHOD = 2048
const KIND_TYPE_LITERAL = 65536
/**
*
* New versions of `typedoc` added the variant property, so this is a quick and
@@ -205,7 +214,7 @@ function normalizeComment(original: TypedocComment | Comment | undefined): Comme
return original
}
let comment: Comment = {}
const comment: Comment = {}
if ('summary' in original) {
comment.shortText = original.summary.map((part) => part.text).join('')
@@ -218,13 +227,6 @@ function normalizeComment(original: TypedocComment | Comment | undefined): Comme
return comment
}
// The meaning of kind flags from `typedoc`:
// https://github.com/TypeStrong/typedoc/blob/2953b0148253589448176881a7acb46090f941bd/src/lib/output/themes/default/assets/typedoc/Application.ts#L36
const KIND_CLASS = 128
const KIND_CONSTRUCTOR = 512
const KIND_METHOD = 2048
const KIND_TYPE_LITERAL = 65536
export function parseTypeSpec() {
const modules = (typeSpec.children ?? []).map(parseMod)
return modules as Array<ModuleTypes>
@@ -294,7 +296,7 @@ function parseModInternal(
node.children?.forEach((child: any) => parseModInternal(child, map, updatedPath, res))
return
case 'declaration':
if (node.kind === KIND_CLASS) {
if (node.kind === KIND_CLASS || node.kind === KIND_MODULE) {
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) => parseModInternal(child, map, updatedPath, res))
} else if (node.kind === KIND_CONSTRUCTOR) {
@@ -540,6 +542,8 @@ function parseReferenceType(type: any, map: Map<number, any>) {
if (maybeType) {
return maybeType
} else if (isNewTypedoc(referenced) && referenced.kind === KIND_INTERFACE) {
return parseInterface(referenced, map)
} else if (isNewTypedoc(referenced) && referenced.kind === KIND_CLASS) {
// Class is too complicated to display here, just return its name
return {
@@ -673,7 +677,9 @@ function parseTypeLiteral(type: any, map: Map<number, any>): TypeDetails | undef
const name = nameOrAnonymous(type)
if ('children' in type.declaration) {
const properties = type.declaration.children.map((child: any) => parseTypeInternals(child, map))
const properties = type.declaration.children
.map((child: any) => parseTypeInternals(child, map))
.filter(Boolean)
return {
name,
type: 'object',
@@ -725,7 +731,9 @@ function parseTypeOperatorType(type: any, map: Map<number, any>) {
}
function parseInterface(type: any, map: Map<number, any>): CustomObjectType {
const properties = (type.children ?? []).map((child) => parseTypeInternals(child, map))
const properties = (type.children ?? [])
.map((child) => parseTypeInternals(child, map))
.filter(Boolean)
return {
type: 'object',
@@ -766,6 +774,10 @@ function parseTypeInternals(elem: any, map: Map<number, any>) {
function parseInternalProperty(elem: any, map: Map<number, any>) {
const name = nameOrAnonymous(elem)
if (!elem.type) {
return undefined
}
const type = parseType(elem.type, map)
const res = {
@@ -29616,8 +29616,9 @@ exports[`TS type spec parsing > matches snapshot 1`] = `
{
"name": "transport",
"type": {
"type": "nameOnly",
"name": "WebSocketLikeConstructor"
"type": "object",
"name": "WebSocketLikeConstructor",
"properties": []
},
"isOptional": true
},
@@ -30241,8 +30242,253 @@ exports[`TS type spec parsing > matches snapshot 1`] = `
],
"ret": {
"type": {
"type": "nameOnly",
"name": "WebSocketLike"
"type": "object",
"name": "WebSocketLike",
"properties": [
{
"name": "binaryType",
"type": {
"type": "intrinsic",
"name": "string"
},
"isOptional": true
},
{
"name": "bufferedAmount",
"type": {
"type": "intrinsic",
"name": "number"
},
"isOptional": true
},
{
"name": "CLOSED",
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"name": "CLOSING",
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"name": "CONNECTING",
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"name": "dispatchEvent",
"type": {
"type": "function",
"params": [
{
"name": "event",
"type": {
"type": "nameOnly",
"name": "Event"
}
}
],
"ret": {
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
},
"isOptional": true
},
{
"name": "extensions",
"type": {
"type": "intrinsic",
"name": "string"
},
"isOptional": true
},
{
"name": "onclose",
"type": {
"type": "union",
"subTypes": [
{
"type": "literal",
"value": null
},
{
"type": "function",
"params": [
{
"name": "this",
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"name": "ev",
"type": {
"type": "nameOnly",
"name": "CloseEvent"
}
}
],
"ret": {
"type": {
"type": "intrinsic",
"name": "any"
}
}
}
]
}
},
{
"name": "onerror",
"type": {
"type": "union",
"subTypes": [
{
"type": "literal",
"value": null
},
{
"type": "function",
"params": [
{
"name": "this",
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"name": "ev",
"type": {
"type": "nameOnly",
"name": "Event"
}
}
],
"ret": {
"type": {
"type": "intrinsic",
"name": "any"
}
}
}
]
}
},
{
"name": "onmessage",
"type": {
"type": "union",
"subTypes": [
{
"type": "literal",
"value": null
},
{
"type": "function",
"params": [
{
"name": "this",
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"name": "ev",
"type": {
"type": "nameOnly",
"name": "MessageEvent"
}
}
],
"ret": {
"type": {
"type": "intrinsic",
"name": "any"
}
}
}
]
}
},
{
"name": "onopen",
"type": {
"type": "union",
"subTypes": [
{
"type": "literal",
"value": null
},
{
"type": "function",
"params": [
{
"name": "this",
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"name": "ev",
"type": {
"type": "nameOnly",
"name": "Event"
}
}
],
"ret": {
"type": {
"type": "intrinsic",
"name": "any"
}
}
}
]
}
},
{
"name": "OPEN",
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"name": "protocol",
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"name": "readyState",
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"name": "url",
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
},
@@ -1,12 +1,12 @@
import { ChevronRight, Clipboard, Edit, Trash } from 'lucide-react'
import { Clipboard, Edit, Trash } from 'lucide-react'
import { useCallback } from 'react'
import { Item, ItemParams, Menu, Separator, Submenu } from 'react-contexify'
import { Item, ItemParams, Menu } from 'react-contexify'
import { toast } from 'sonner'
import type { SupaRow } from 'components/grid/types'
import { useTableEditorStateSnapshot } from 'state/table-editor'
import { useTableEditorTableStateSnapshot } from 'state/table-editor-table'
import { copyToClipboard } from 'ui'
import { copyToClipboard, DialogSectionSeparator } from 'ui'
import { ROW_CONTEXT_MENU_ID } from '.'
import { formatClipboardValue } from '../../utils/common'
@@ -67,27 +67,20 @@ const RowContextMenu = ({ rows }: RowContextMenuProps) => {
return (
<Menu id={ROW_CONTEXT_MENU_ID} animation={false} className="!min-w-36">
<Submenu
label={
<div className="flex items-center space-x-2">
<Clipboard size={12} />
<span className="text-xs">Copy</span>
</div>
}
arrow={<ChevronRight size={12} />}
>
<Item onClick={onCopyCellContent}>
<span className="ml-2 text-xs">Copy cell</span>
</Item>
<Item onClick={onCopyRowContent}>
<span className="ml-2 text-xs">Copy row</span>
</Item>
</Submenu>
<Item onClick={onCopyCellContent}>
<Clipboard size={12} />
<span className="ml-2 text-xs">Copy cell</span>
</Item>
<Item onClick={onCopyRowContent}>
<Clipboard size={12} />
<span className="ml-2 text-xs">Copy row</span>
</Item>
<DialogSectionSeparator className="my-1.5" />
<Item onClick={onEditRowClick} hidden={!snap.editable} data="edit">
<Edit size={12} />
<span className="ml-2 text-xs">Edit row</span>
</Item>
<Separator />
<DialogSectionSeparator className="my-1.5" />
<Item onClick={onDeleteRow} hidden={!snap.editable} data="delete">
<Trash size={12} />
<span className="ml-2 text-xs">Delete row</span>
@@ -148,23 +148,28 @@ export const RegionSelector = ({
value={value.name}
className="w-full [&>:nth-child(2)]:w-full"
>
<div className="flex flex-row items-center justify-between w-full">
<div className="flex flex-row items-center justify-between w-full gap-x-2">
<div className="flex items-center gap-x-3">
<img
alt="region icon"
className="w-5 rounded-sm"
src={`${BASE_PATH}/img/regions/${value.code}.svg`}
/>
<span className="text-foreground">{value.name}</span>
<div className="flex items-center gap-x-2">
<span className="text-foreground">{value.name}</span>
<span className="text-xs text-foreground-lighter font-mono">
{value.code}
</span>
</div>
</div>
<div>
{recommendedSpecificRegions.has(value.code) && (
{recommendedSpecificRegions.has(value.code) && (
<div>
<Badge variant="success" className="mr-1">
Recommended
</Badge>
)}
</div>
</div>
)}
</div>
</SelectItem_Shadcn_>
)
@@ -447,7 +447,10 @@ const DeployNewReplicaPanel = ({
/>
)}
>
{region.name}
<p className="flex items-center gap-x-2">
<span>{region.name}</span>
<span className="text-xs text-foreground-lighter font-mono">{region.region}</span>
</p>
</Listbox.Option>
))}
</Listbox>