Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Finally, if you're not sure whether you should open an issue or ask a question o

### :lock: Reporting Security Issues

If you've found a security issue in Briefer, please don't open an issue. Instead, send an email to [[email protected]](mailto:[email protected]) or open the Vunerability Report using the Security tab in this repository.
If you've found a security issue in Briefer, please don't open an issue. Instead, send an email to [[email protected]](mailto:[email protected]) or open the Vulnerability Report using the Security tab in this repository.
Additionally read our [Security Policy](./SECURITY.md)

<br />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</p>

<p align="center">
<a href="https://github.com/briefercloud/briefer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/briefercloud/briefer" alt="Github Stars"></a>
<a href="https://github.com/briefercloud/briefer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/briefercloud/briefer" alt="GitHub Stars"></a>
<a href="https://pypi.org/project/briefer/" target="_blank"><img src="https://img.shields.io/pypi/v/briefer.svg?style=flat-square&label=PyPI+briefer" alt="PyPi Briefer"></a>
<a href="https://github.com/briefercloud/briefer/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-red" alt="License"></a>
<a href="https://www.ycombinator.com/companies/briefer"><img src="https://img.shields.io/badge/Y%20Combinator-S23-orange" alt="Backed by Y Combinator S23"></a>
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

You have two channels for this:

1. Using [repository](https://github.com/briefercloud/briefer) > Security > Report a vunerability. Make sure to fill in as much information as possible and enter your contact details so we can contact you to ask for more details.
1. Using [repository](https://github.com/briefercloud/briefer) > Security > Report a vulnerability. Make sure to fill in as much information as possible and enter your contact details so we can contact you to ask for more details.
2. Using the founders email: [[email protected]](mailto:[email protected])
4 changes: 2 additions & 2 deletions apps/api/src/websocket/complete-python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type PythonCompletionMessage = {
value: PythonSuggestion
}

const completPython =
const completePython =
(io: IOServer, socket: Socket, { user, userWorkspaces }: Session) =>
async (data: unknown) => {
const parsedData = z
Expand Down Expand Up @@ -159,4 +159,4 @@ const completPython =
}
}

export default completPython
export default completePython
8 changes: 4 additions & 4 deletions apps/api/src/yjs/v2/executors/blocks/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type PythonEffects = {
editWithAI: typeof editWithAI
}

type RunninCode = {
type RunningCode = {
abortController: AbortController
abort?: () => Promise<void>
}
Expand All @@ -71,7 +71,7 @@ export class PythonExecutor implements IPythonExecutor {
private workspaceId: string
private documentId: string
private executionQueue: PQueue
private runningCode = new Map<Y.XmlElement<PythonBlock>, RunninCode>()
private runningCode = new Map<Y.XmlElement<PythonBlock>, RunningCode>()
private dataframes: Y.Map<DataFrame>
private blocks: Y.Map<YBlock>
private effects: PythonEffects
Expand Down Expand Up @@ -107,7 +107,7 @@ export class PythonExecutor implements IPythonExecutor {
this.events.pythonRun(EventContext.fromYTransaction(tr))

const abortController = new AbortController()
const runningCode: RunninCode = { abortController }
const runningCode: RunningCode = { abortController }
this.runningCode.set(block, runningCode)
block.setAttribute('result', [])

Expand All @@ -117,7 +117,7 @@ export class PythonExecutor implements IPythonExecutor {
workspaceId: this.workspaceId,
documentId: this.documentId,
blockId: block.getAttribute('id'),
queeueSize: this.executionQueue.size,
queueSize: this.executionQueue.size,
},
'enqueueing python block execution'
)
Expand Down
6 changes: 3 additions & 3 deletions apps/api/src/yjs/v2/executors/blocks/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export type SQLEffects = {
editWithAI: typeof editWithAI
}

type RunninQuery = {
type RunningQuery = {
abortController: AbortController
abort?: () => Promise<void>
}
Expand All @@ -121,7 +121,7 @@ export class SQLExecutor implements ISQLExecutor {
private executionQueue: PQueue
private dataframes: Y.Map<DataFrame>
private blocks: Y.Map<YBlock>
private runningQueries = new Map<Y.XmlElement<SQLBlock>, RunninQuery>()
private runningQueries = new Map<Y.XmlElement<SQLBlock>, RunningQuery>()
private jupyterManager: IJupyterManager
private effects: SQLEffects
private events: SQLEvents
Expand Down Expand Up @@ -159,7 +159,7 @@ export class SQLExecutor implements ISQLExecutor {
) {
this.events.sqlRun(EventContext.fromYTransaction(tr))
const abortController = new AbortController()
const runningQuery: RunninQuery = { abortController }
const runningQuery: RunningQuery = { abortController }
this.runningQueries.set(block, runningQuery)

try {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/yjs/v2/executors/blocks/writeback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class WritebackExecutor implements IWritebackExecutor {
workspaceId: this.workspaceId,
documentId: this.documentId,
blockId: block.getAttribute('id'),
queeueSize: this.executionQueue.size,
queueSize: this.executionQueue.size,
},
'enqueueing writeback block execution'
)
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/yjs/v2/observers/blocks/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class PythonObserver implements IPythonObserver {
'Error while handling block status change'
)

// TODO: introduce an unexpetected error result
// TODO: introduce an unexpected error result
block.setAttribute('status', 'idle')
}

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/yjs/v2/observers/blocks/visualization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class VisualizationObserver implements IVisualizationObserver {
'Error while handling block status change'
)

// TODO: introduce an unexpetected error result
// TODO: introduce an unexpected error result
block.setAttribute('status', 'idle')
}

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/yjs/v2/observers/blocks/writeback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class WritebackObserver implements IWritebackObserver {
'Error while handling block status change'
)

// TODO: introduce an unexpetected error result
// TODO: introduce an unexpected error result
block.setAttribute('status', 'idle')
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Link from 'next/link'
import DashboardSkeleton from './DashboardSkeleton'
import RunAllV2 from '../RunAllV2'
import ShareDropdown from '../ShareDropdown'
import DashboardNotebookGroupButton from '../DashboarNotebookGroupButton'
import DashboardNotebookGroupButton from '../DashboardNotebookGroupButton'
import { isNil } from 'ramda'
import EllipsisDropdown from '../EllipsisDropdown'
import Comments from '../Comments'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/PrivateDocumentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import useFullScreenDocument from '@/hooks/useFullScreenDocument'
import Schedules from './Schedules'
import Snapshots from './Snapshots'
import { useYDoc } from '@/hooks/useYDoc'
import DashboardNotebookGroupButton from './DashboarNotebookGroupButton'
import DashboardNotebookGroupButton from './DashboardNotebookGroupButton'
import EllipsisDropdown from './EllipsisDropdown'
import Link from 'next/link'
import { EyeIcon, PencilIcon } from '@heroicons/react/24/outline'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
PythonSucceededText,
} from '@/components/ExecutionStatusText'
import { ConnectDragPreview } from 'react-dnd'
import ApproveDiffButons from '../../ApproveDiffButtons'
import ApproveDiffButtons from '../../ApproveDiffButtons'
import EditWithAIForm from '../../EditWithAIForm'
import { PythonExecTooltip } from '../../ExecTooltip'
import { useMonacoContext } from '@/components/MonacoProvider'
Expand Down Expand Up @@ -363,7 +363,7 @@ function PythonBlock(props: Props) {
/>
</div>
</div>
<ApproveDiffButons
<ApproveDiffButtons
visible={diffButtonsVisible}
canTry={status === 'idle'}
onTry={onTry}
Expand Down Expand Up @@ -396,7 +396,7 @@ function PythonBlock(props: Props) {
className={clsx(
!props.isEditable || !hasOaiKey
? 'cursor-not-allowed bg-gray-200'
: 'cusor-pointer hover:bg-gray-50 hover:text-gray-700',
: 'cursor-pointer hover:bg-gray-50 hover:text-gray-700',
'flex items-center border rounded-sm border-gray-200 px-2 py-1 gap-x-2 text-gray-400 group relative font-sans'
)}
>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/v2Editor/customBlocks/sql/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
} from '@/components/ExecutionStatusText'
import { ConnectDragPreview } from 'react-dnd'
import EditWithAIForm from '../../EditWithAIForm'
import ApproveDiffButons from '../../ApproveDiffButtons'
import ApproveDiffButtons from '../../ApproveDiffButtons'
import { SQLExecTooltip } from '../../ExecTooltip'
import LargeSpinner from '@/components/LargeSpinner'
import { useMonacoContext } from '@/components/MonacoProvider'
Expand Down Expand Up @@ -519,7 +519,7 @@ function SQLBlock(props: Props) {
/>
</div>
</div>
<ApproveDiffButons
<ApproveDiffButtons
visible={diffButtonsVisible}
canTry={status === 'idle'}
onTry={onTry}
Expand Down Expand Up @@ -553,7 +553,7 @@ function SQLBlock(props: Props) {
className={clsx(
!props.isEditable || !hasOaiKey
? 'cursor-not-allowed bg-gray-200'
: 'cusor-pointer hover:bg-gray-50 hover:text-gray-700',
: 'cursor-pointer hover:bg-gray-50 hover:text-gray-700',
'flex items-center border rounded-sm border-gray-200 px-2 py-1 gap-x-2 text-gray-400 group relative font-sans'
)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function VisualizationControls(props: Props) {
) : (
<AxisModifierSelector
label={
props.chartType === 'number' ? 'Choosen value' : 'Sort'
props.chartType === 'number' ? 'Chosen value' : 'Sort'
}
value={props.xAxisSort}
options={[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fontFamily as twFontFamiliy } from 'tailwindcss/defaultTheme'
import { fontFamily as twFontFamily } from 'tailwindcss/defaultTheme'
import { timeFormat } from 'd3-time-format'
import { format as d3Format } from 'd3-format'
import {
Expand All @@ -22,7 +22,7 @@ import { useEffect, useLayoutEffect, useMemo, useRef } from 'react'
import debounce from 'lodash.debounce'
import { findMaxFontSize, measureText } from '@/measureText'

const FONT_FAMILY = ['Inter', ...twFontFamiliy.sans].join(', ')
const FONT_FAMILY = ['Inter', ...twFontFamily.sans].join(', ')

interface Props {
title: string
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/hooks/useDocuments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ export function useDocuments(workspaceId: string): UseDocuments {
) {
// if changing orderIndex
if (doc.parentId === document.parentId) {
// we ned to increment orderIndex of all documents that comes after futureOrderIndex
// we need to increment orderIndex of all documents that comes after futureOrderIndex
if (doc.orderIndex >= futureOrderIndex) {
affectedDocuments = affectedDocuments.set(doc.id, {
...doc,
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/pages/workspaces/[workspaceId]/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function Profile(props: Props) {
})

const [success, setSuccess] = useState(false)
const onCloseSuccessNotificaiton = useCallback(() => {
const onCloseSuccessNotification = useCallback(() => {
setSuccess(false)
}, [])

Expand Down Expand Up @@ -270,7 +270,7 @@ function Profile(props: Props) {
</div>
<SuccessNotification
show={success}
onClose={onCloseSuccessNotificaiton}
onClose={onCloseSuccessNotification}
/>
</Layout>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/database/src/datasources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export async function getDatabaseURL(
): Promise<string> {
switch (ds.type) {
case 'psql': {
// TODO: differenciate DataSource and APIDataSource
// TODO: differentiate DataSource and APIDataSource
const dbDs = await prisma().postgreSQLDataSource.findFirstOrThrow({
where: { id: ds.data.id },
})
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/blocks/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { v4 as uuidv4 } from 'uuid'
import * as Y from 'yjs'
import {
YBlock,
computeDepencyQueue,
computeDependencyQueue,
makeFileUploadBlock,
makePythonBlock,
makeRichTextBlock,
} from './index.js'
import { YBlockGroup, makeYBlockGroup } from '../operations/blockGroup.js'

describe('computeDepencyQueue', () => {
describe('computeDependencyQueue', () => {
let doc: Y.Doc
let blocks: Y.Map<YBlock>
let layout: Y.Array<YBlockGroup>
Expand Down Expand Up @@ -82,7 +82,7 @@ describe('computeDepencyQueue', () => {

layout.push([blockGroup])

const queue = computeDepencyQueue(
const queue = computeDependencyQueue(
clickedBlock,
layout,
blocks,
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const requestRun = <B extends YBlock>(
) => {
const dependencies = skipDependencyCheck
? []
: computeDepencyQueue(block, layout, blocks, environmentStartedAt)
: computeDependencyQueue(block, layout, blocks, environmentStartedAt)

const queue = dependencies
if (!customOnRequestRun) {
Expand Down Expand Up @@ -160,7 +160,7 @@ export const requestTrySuggestion = (
) => {
const dependencies = skipDependencyCheck
? []
: computeDepencyQueue(block, layout, blocks, environmentStartedAt)
: computeDependencyQueue(block, layout, blocks, environmentStartedAt)
const queue = dependencies.concat(block)

for (const block of queue) {
Expand Down Expand Up @@ -409,7 +409,7 @@ function mustExecute(
return dfns.isAfter(environmentStartedAt, executedAt)
}

export function computeDepencyQueue(
export function computeDependencyQueue(
block: YBlock,
layout: Y.Array<YBlockGroup>,
blocks: Y.Map<YBlock>,
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/blocks/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function closePythonEditWithAIPrompt(
block: Y.XmlElement<PythonBlock>,
cleanPrompt: boolean
) {
const opeartion = () => {
const operation = () => {
const prompt = getPythonBlockEditWithAIPrompt(block)
if (cleanPrompt) {
prompt.delete(0, prompt.length)
Expand All @@ -243,9 +243,9 @@ export function closePythonEditWithAIPrompt(
}

if (block.doc) {
block.doc.transact(opeartion)
block.doc.transact(operation)
} else {
opeartion()
operation()
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/blocks/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export function closeSQLEditWithAIPrompt(
block: Y.XmlElement<SQLBlock>,
cleanPrompt: boolean
) {
const opeartion = () => {
const operation = () => {
const prompt = getSQLBlockEditWithAIPrompt(block)
if (cleanPrompt) {
prompt.delete(0, prompt.length)
Expand All @@ -297,9 +297,9 @@ export function closeSQLEditWithAIPrompt(
}

if (block.doc) {
block.doc.transact(opeartion)
block.doc.transact(operation)
} else {
opeartion()
operation()
}
}

Expand Down