Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add pipeline for linting and formatting (#883)

Jakub Novákb42ab2a86b4f
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index c72bda7b1..86ce739c3 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -20,7 +20,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20.x'
- registry-url: https://registry.npmjs.org
cache: pnpm
- name: Configure pnpm
@@ -28,13 +27,8 @@ jobs:
pnpm config set auto-install-peers true
pnpm config set exclude-links-from-lockfile true
- - name: Install JS dependencies
- run: |
- pnpm install --frozen-lockfile
-
- - name: Run JS linting
- run: |
- pnpm run lint
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
- name: Set up Python
uses: actions/setup-python@v4
@@ -52,9 +46,23 @@ jobs:
- name: Install Python dependencies
working-directory: packages/python-sdk
run: |
- poetry install
+ poetry install --with dev
- - name: Run Python linting
- working-directory: packages/python-sdk
+ - name: Run linting
+ run: |
+ pnpm run lint
+
+ - name: Run formatting
+ run: |
+ pnpm run format
+
+ - name: Check for uncommitted changes
run: |
- poetry run ruff check .
+ if [[ -n $(git status --porcelain) ]]; then
+ echo "❌ Files are not formatted properly:"
+ git status --short
+ git diff
+ exit 1
+ else
+ echo "✅ No changes detected."
+ fi
diff --git a/apps/web/.prettierignore b/apps/web/.prettierignore
index 05ad7aa19..078f47213 100644
--- a/apps/web/.prettierignore
+++ b/apps/web/.prettierignore
@@ -1,2 +1,3 @@
**/*.mdx
-**/code/**/*
\ No newline at end of file
+**/code/**/*
+/.next/**/*
\ No newline at end of file
diff --git a/apps/web/README.md b/apps/web/README.md
index ae11ab48f..cf176d1c1 100644
--- a/apps/web/README.md
+++ b/apps/web/README.md
@@ -9,6 +9,6 @@ Each package has its own SDK reference generator found in `{package-dir}/scripts
When pushed to `main`, a [github workflow](../../.github/workflows/generate_sdk_ref.yml) checks for diffs in the [packages](../../packages) folder, and if any are found, the SDK reference generator is run and the result is auto-commited the incoming branch.
-Finally, when building or running the dev server, a [prebuild](./prebuild.js) step is run beforehand to generate the SDK reference TOCs and routes in the [sdk-reference](./src/app/(docs)/docs/sdk-reference) directory. This can also be run manually using `npm run prebuild`.
+Finally, when building or running the dev server, a [prebuild](./prebuild.js) step is run beforehand to generate the SDK reference TOCs and routes in the [sdk-reference](<./src/app/(docs)/docs/sdk-reference>) directory. This can also be run manually using `npm run prebuild`.
-note: sometimes you may see uncommited changes or untracked files in the [sdk-reference](./src/app/(docs)/docs/sdk-reference) directory, this is fine and the files can be ignored.
+note: sometimes you may see uncommited changes or untracked files in the [sdk-reference](<./src/app/(docs)/docs/sdk-reference>) directory, this is fine and the files can be ignored.
diff --git a/apps/web/package.json b/apps/web/package.json
index 412b460b0..314b2dc17 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -8,6 +8,7 @@
"build": "node prebuild.js && next build",
"start": "next start",
"lint": "next lint",
+ "format": "prettier --write .",
"rm-next-cache": "rm -rf .next/cache",
"check-deps": "knip"
},
@@ -84,4 +85,4 @@
"sharp": "^0.32.0",
"tailwind-scrollbar": "^3.0.5"
}
-}
\ No newline at end of file
+}
diff --git a/apps/web/prebuild.js b/apps/web/prebuild.js
index 838e414aa..d44ea7fac 100644
--- a/apps/web/prebuild.js
+++ b/apps/web/prebuild.js
@@ -252,35 +252,40 @@ async function generateSitemap() {
throw new Error('Not running from apps/web directory')
}
- const pattern =
- 'src/app/\\(docs\\)/docs/**/page.mdx'
-
+ const pattern = 'src/app/\\(docs\\)/docs/**/page.mdx'
let mdxFiles = []
let patternsWithResults = []
- const files = await fg(pattern, {
- cwd: process.cwd(),
- absolute: true,
- })
+ const files = await fg(pattern, {
+ cwd: process.cwd(),
+ absolute: true,
+ })
- console.log(`Pattern: ${pattern}, Found: ${files.length} files`)
+ console.log(`Pattern: ${pattern}, Found: ${files.length} files`)
- if (files.length > 0) {
- mdxFiles.push(...files)
- patternsWithResults.push(pattern)
- }
+ if (files.length > 0) {
+ mdxFiles.push(...files)
+ patternsWithResults.push(pattern)
+ }
- console.log(`Found ${mdxFiles.length} total files using patterns: ${patternsWithResults.join(', ')}`)
+ console.log(
+ `Found ${
+ mdxFiles.length
+ } total files using patterns: ${patternsWithResults.join(', ')}`
+ )
if (mdxFiles.length === 0) {
- throw new Error(`No page.mdx files found with any pattern. Pattern: ${pattern}`)
+ throw new Error(
+ `No page.mdx files found with any pattern. Pattern: ${pattern}`
+ )
}
const docsPages = []
for (const filePath of mdxFiles) {
- const docsMatch = filePath.match(/\/app\/\(docs\)\/docs\/(.*)\/page\.mdx$/) ||
+ const docsMatch =
+ filePath.match(/\/app\/\(docs\)\/docs\/(.*)\/page\.mdx$/) ||
filePath.match(/\/app\/\(docs\)\/docs\/page\.mdx$/)
if (!docsMatch) {
@@ -297,18 +302,26 @@ async function generateSitemap() {
})
}
- const filteredPages = docsPages.filter((entry) => !entry.url.includes('/docs/legacy'))
+ const filteredPages = docsPages.filter(
+ (entry) => !entry.url.includes('/docs/legacy')
+ )
console.log(`Generated ${filteredPages.length} sitemap entries`)
- const finalEntries = filteredPages.sort((a, b) => a.url.localeCompare(b.url))
+ const finalEntries = filteredPages.sort((a, b) =>
+ a.url.localeCompare(b.url)
+ )
const sitemapXml = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-${finalEntries.map(entry => ` <url>
+${finalEntries
+ .map(
+ (entry) => ` <url>
<loc>${entry.url}</loc>
<changefreq>weekly</changefreq>
<priority>${entry.priority}</priority>
- </url>`).join('\n')}
+ </url>`
+ )
+ .join('\n')}
</urlset>`
const outputPath = path.join(process.cwd(), 'public', 'sitemap.xml')
diff --git a/apps/web/src/app/(docs)/docs/legacy/sandbox/overview/features.tsx b/apps/web/src/app/(docs)/docs/legacy/sandbox/overview/features.tsx
index 4daec5d8e..bac55341c 100644
--- a/apps/web/src/app/(docs)/docs/legacy/sandbox/overview/features.tsx
+++ b/apps/web/src/app/(docs)/docs/legacy/sandbox/overview/features.tsx
@@ -3,28 +3,29 @@ import Link from 'next/link'
export const features = [
<span>
- <Link href="https://github.com/e2b-dev/e2b" target="_blank" rel="noreferrer noopener">Open-source</Link> sandbox for LLM
+ <Link
+ href="https://github.com/e2b-dev/e2b"
+ target="_blank"
+ rel="noreferrer noopener"
+ >
+ Open-source
+ </Link>{' '}
+ sandbox for LLM
</span>,
'A full VM environment',
'No need for orchestration or infrastructure management',
'Ability to give each user of your AI app their own isolated environment',
<span>
- <Link href="/docs/getting-started/installation">
- Python & Node.js SDK
- </Link>
- {' '}for controling the sandbox&apos;s{' '}
- <Link href="/docs/sandbox/api/filesystem">
- filesystem
- </Link>
- ,{' '}
- <Link href="/docs/sandbox/api/process">
- processes
- </Link>
- , and more.
+ <Link href="/docs/getting-started/installation">Python & Node.js SDK</Link>{' '}
+ for controling the sandbox&apos;s{' '}
+ <Link href="/docs/sandbox/api/filesystem">filesystem</Link>,{' '}
+ <Link href="/docs/sandbox/api/process">processes</Link>, and more.
</span>,
'Support for up to 24h long-running sandbox sessions',
<span>
- Ability to <Link href="/docs/sandbox/api/upload">upload files</Link> to the sandbox and <Link href="/docs/sandbox/api/download">download files </Link>from the sandbox,
+ Ability to <Link href="/docs/sandbox/api/upload">upload files</Link> to the
+ sandbox and <Link href="/docs/sandbox/api/download">download files </Link>
+ from the sandbox,
</span>,
// "Premade sandbox for the Code Interpreter / Advanced Data Analysis and AI-powered browsers",
]
diff --git a/apps/web/src/app/(docs)/docs/support/Support.tsx b/apps/web/src/app/(docs)/docs/support/Support.tsx
index 5469a14f5..382503b97 100644
--- a/apps/web/src/app/(docs)/docs/support/Support.tsx
+++ b/apps/web/src/app/(docs)/docs/support/Support.tsx
@@ -1,9 +1,5 @@
import Link from 'next/link'
-import {
- Mail,
- Github,
- UsersRound,
-} from 'lucide-react'
+import { Mail, Github, UsersRound } from 'lucide-react'
export function Support() {
return (
@@ -13,8 +9,13 @@ export function Support() {
href="https://discord.com/invite/U7KEcGErtQ"
className="no-underline flex flex-col justify-center items-center gap-2 h-full w-full"
>
- <UsersRound strokeWidth={1.5} className="h-6 w-6 text-zinc-300 group-hover:text-[#5865F2] transition-colors" />
- <span className="text-zinc-300 transition-colors group-hover:text-white">Join our Discord community</span>
+ <UsersRound
+ strokeWidth={1.5}
+ className="h-6 w-6 text-zinc-300 group-hover:text-[#5865F2] transition-colors"
+ />
+ <span className="text-zinc-300 transition-colors group-hover:text-white">
+ Join our Discord community
+ </span>
</Link>
</div>
@@ -23,8 +24,13 @@ export function Support() {
href="https://github.com/e2b-dev/e2b"
className="no-underline flex flex-col justify-center items-center gap-2 h-full w-full"
>
- <Github strokeWidth={1.5} className="h-6 w-6 text-zinc-300 group-hover:text-[#6e40c9] transition-colors" />
- <span className="text-zinc-300 transition-colors group-hover:text-white">Visit our GitHub</span>
+ <Github
+ strokeWidth={1.5}
+ className="h-6 w-6 text-zinc-300 group-hover:text-[#6e40c9] transition-colors"
+ />
+ <span className="text-zinc-300 transition-colors group-hover:text-white">
+ Visit our GitHub
+ </span>
</Link>
</div>
@@ -33,10 +39,15 @@ export function Support() {
href="mailto:[email protected]"
className="no-underline flex flex-col justify-center items-center gap-2 h-full w-full"
>
- <Mail strokeWidth={1.5} className="h-6 w-6 text-zinc-300 group-hover:text-white transition-colors" />
- <span className="text-zinc-300 transition-colors group-hover:text-white">Contact us</span>
+ <Mail
+ strokeWidth={1.5}
+ className="h-6 w-6 text-zinc-300 group-hover:text-white transition-colors"
+ />
+ <span className="text-zinc-300 transition-colors group-hover:text-white">
+ Contact us
+ </span>
</Link>
</div>
</div>
)
-}
\ No newline at end of file
+}
diff --git a/apps/web/src/app/api/stream/sandbox/[sandboxId]/route.ts b/apps/web/src/app/api/stream/sandbox/[sandboxId]/route.ts
index e4b26773c..7e731d949 100644
--- a/apps/web/src/app/api/stream/sandbox/[sandboxId]/route.ts
+++ b/apps/web/src/app/api/stream/sandbox/[sandboxId]/route.ts
@@ -7,7 +7,10 @@ const supabaseServiceKey = process.env.SUPABASE_SERVICE_ROLE_KEY!
const supabase = createClient(supabaseUrl, supabaseServiceKey)
-export async function GET(request: Request, { params }: { params: { sandboxId: string } }) {
+export async function GET(
+ request: Request,
+ { params }: { params: { sandboxId: string } }
+) {
const apiKey = request.headers.get('X-API-Key')
const sandboxId = params.sandboxId
@@ -30,13 +33,18 @@ export async function GET(request: Request, { params }: { params: { sandboxId: s
.single()
if (error) {
- return NextResponse.json({ error: `Failed to retrieve stream - ${error.message}` }, { status: 500 })
+ return NextResponse.json(
+ { error: `Failed to retrieve stream - ${error.message}` },
+ { status: 500 }
+ )
}
if (!stream) {
- return NextResponse.json({ error: `Stream not found for sandbox ${sandboxId}` }, { status: 404 })
+ return NextResponse.json(
+ { error: `Stream not found for sandbox ${sandboxId}` },
+ { status: 404 }
+ )
}
return NextResponse.json({ token: stream.token }, { status: 200 })
}
-
diff --git a/apps/web/src/app/api/stream/sandbox/route.ts b/apps/web/src/app/api/stream/sandbox/route.ts
index 754e2dde4..c42067044 100644
--- a/apps/web/src/app/api/stream/sandbox/route.ts
+++ b/apps/web/src/app/api/stream/sandbox/route.ts
@@ -10,10 +10,9 @@ const supabase = createClient(supabaseUrl, supabaseServiceKey)
const mux = new Mux({
tokenId: process.env.MUX_TOKEN_ID,
- tokenSecret: process.env.MUX_TOKEN_SECRET
+ tokenSecret: process.env.MUX_TOKEN_SECRET,
})
-
// Create a new live stream and return the stream key
export async function POST(request: Request) {
const apiKey = request.headers.get('X-API-Key')
@@ -39,11 +38,21 @@ export async function POST(request: Request) {
.single()
if (existingStreamError && existingStreamError.code !== 'PGRST116') {
- return NextResponse.json({ error: `Failed to check existing stream - ${existingStreamError.message}` }, { status: 500 })
+ return NextResponse.json(
+ {
+ error: `Failed to check existing stream - ${existingStreamError.message}`,
+ },
+ { status: 500 }
+ )
}
if (existingStream) {
- return NextResponse.json({ error: `Stream for the sandbox '${sandboxId}' already exists. There can be only one stream per sandbox.` }, { status: 400 })
+ return NextResponse.json(
+ {
+ error: `Stream for the sandbox '${sandboxId}' already exists. There can be only one stream per sandbox.`,
+ },
+ { status: 400 }
+ )
}
// The stream doesn't exist yet, so create a new live stream
@@ -55,22 +64,37 @@ export async function POST(request: Request) {
})
if (!liveStream.playback_ids?.[0]?.id) {
- return NextResponse.json({ error: 'Failed to create live stream' }, { status: 500 })
+ return NextResponse.json(
+ { error: 'Failed to create live stream' },
+ { status: 500 }
+ )
}
- const { data, error }: { data: { token: string } | null, error: any } = await supabase
- .from('sandbox_streams')
- .insert([{ sandbox_id: sandboxId, playback_id: liveStream.playback_ids[0].id }])
- .select('token')
- .single()
+ const { data, error }: { data: { token: string } | null; error: any } =
+ await supabase
+ .from('sandbox_streams')
+ .insert([
+ { sandbox_id: sandboxId, playback_id: liveStream.playback_ids[0].id },
+ ])
+ .select('token')
+ .single()
if (error) {
- return NextResponse.json({ error: `Failed to insert and retrieve token - ${error.message}` }, { status: 500 })
+ return NextResponse.json(
+ { error: `Failed to insert and retrieve token - ${error.message}` },
+ { status: 500 }
+ )
}
if (!data) {
- return NextResponse.json({ error: 'Failed to insert and retrieve token - no data' }, { status: 500 })
+ return NextResponse.json(
+ { error: 'Failed to insert and retrieve token - no data' },
+ { status: 500 }
+ )
}
- return NextResponse.json({ streamKey: liveStream.stream_key, token: data.token }, { status: 201 })
+ return NextResponse.json(
+ { streamKey: liveStream.stream_key, token: data.token },
+ { status: 201 }
+ )
}
diff --git a/apps/web/src/components/Button.tsx b/apps/web/src/components/Button.tsx
index 746498b09..54279761a 100644
--- a/apps/web/src/components/Button.tsx
+++ b/apps/web/src/components/Button.tsx
@@ -3,12 +3,7 @@ import clsx from 'clsx'
function ArrowIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- fill="none"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
<path
stroke="currentColor"
strokeLinecap="round"
@@ -46,9 +41,9 @@ type ButtonProps = {
disabled?: boolean
arrow?: 'left' | 'right'
} & (
- | React.ComponentPropsWithoutRef<typeof Link>
- | (React.ComponentPropsWithoutRef<'button'> & { href?: undefined })
- )
+ | React.ComponentPropsWithoutRef<typeof Link>
+ | (React.ComponentPropsWithoutRef<'button'> & { href?: undefined })
+)
export function Button({
variant = 'primary',
@@ -62,7 +57,7 @@ export function Button({
'inline-flex gap-0.5 justify-center overflow-hidden text-base font-medium transition',
variantStyles[variant],
disabled && 'opacity-50 pointer-events-none',
- className,
+ className
)
const arrowIcon = (
@@ -71,7 +66,7 @@ export function Button({
'mt-0.5 h-5 w-5',
variant === 'text' && 'relative top-px',
arrow === 'left' && '-ml-1 rotate-180',
- arrow === 'right' && '-mr-1',
+ arrow === 'right' && '-mr-1'
)}
/>
)
@@ -87,10 +82,7 @@ export function Button({
if (typeof props.href === 'undefined') {
return (
// @ts-ignore
- <button
- className={className}
- {...props}
- >
+ <button className={className} {...props}>
{inner}
</button>
)
@@ -98,10 +90,7 @@ export function Button({
return (
// @ts-ignore
- <Link
- className={className}
- {...props}
- >
+ <Link className={className} {...props}>
{inner}
</Link>
)
diff --git a/apps/web/src/components/CodeInterpreting.tsx b/apps/web/src/components/CodeInterpreting.tsx
index dfb556d2f..8dec37b93 100644
--- a/apps/web/src/components/CodeInterpreting.tsx
+++ b/apps/web/src/components/CodeInterpreting.tsx
@@ -1,25 +1,30 @@
-import {
- FileQuestion,
- ChartNoAxesCombined,
-} from 'lucide-react'
+import { FileQuestion, ChartNoAxesCombined } from 'lucide-react'
-import {
- BoxItem,
- BoxGrid,
-} from '@/components/DocsBox'
+import { BoxItem, BoxGrid } from '@/components/DocsBox'
const items: BoxItem[] = [
{
href: '/docs/code-interpreting/analyze-data-with-ai',
title: 'Analyze data with AI',
- description: 'Learn how to use E2B run AI-generated code to analyze yourdata.',
- icon: <FileQuestion strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Learn how to use E2B run AI-generated code to analyze yourdata.',
+ icon: (
+ <FileQuestion
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/code-interpreting/create-charts-visualizations',
title: 'Create charts & visualizations',
description: 'Create interactive charts by running Python code in E2B.',
- icon: <ChartNoAxesCombined strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ icon: (
+ <ChartNoAxesCombined
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
// {
// href: '/docs/code-interpreting/connect-your-data',
diff --git a/apps/web/src/components/Concepts.tsx b/apps/web/src/components/Concepts.tsx
index e8d475d20..4dedcb5c3 100644
--- a/apps/web/src/components/Concepts.tsx
+++ b/apps/web/src/components/Concepts.tsx
@@ -1,27 +1,31 @@
-import {
- FolderTree,
- Terminal,
- Hourglass,
- RefreshCcw,
-} from 'lucide-react'
+import { FolderTree, Terminal, Hourglass, RefreshCcw } from 'lucide-react'
-import {
- BoxItem,
- BoxGrid,
-} from '@/components/DocsBox'
+import { BoxItem, BoxGrid } from '@/components/DocsBox'
const concepts: BoxItem[] = [
{
href: '/docs/sandbox',
title: 'Sandbox lifecycle',
- description: 'Learn about how to start the sandbox, manage its lifecycle, and interact with it.',
- icon: <Hourglass strokeWidth={1.5} className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Learn about how to start the sandbox, manage its lifecycle, and interact with it.',
+ icon: (
+ <Hourglass
+ strokeWidth={1.5}
+ className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/sandbox/persistence',
title: 'Sandbox persistence',
- description: 'Learn how to achieve data persistence by pausing and resuming sandboxes.',
- icon: <RefreshCcw strokeWidth={1.5} className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Learn how to achieve data persistence by pausing and resuming sandboxes.',
+ icon: (
+ <RefreshCcw
+ strokeWidth={1.5}
+ className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
// {
// href: '/docs/code-execution',
@@ -32,17 +36,29 @@ const concepts: BoxItem[] = [
{
href: '/docs/filesystem',
title: 'Filesystem',
- description: 'Sandbox has an isolated filesystem that you can use to create, read, write, and delete files.',
- icon: <FolderTree strokeWidth={1.5} className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Sandbox has an isolated filesystem that you can use to create, read, write, and delete files.',
+ icon: (
+ <FolderTree
+ strokeWidth={1.5}
+ className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/commands',
title: 'Commands',
- description: 'Run terminal commands inside the Sandbox and start any process inside the Sandbox.',
- icon: <Terminal strokeWidth={1.5} className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
- }
+ description:
+ 'Run terminal commands inside the Sandbox and start any process inside the Sandbox.',
+ icon: (
+ <Terminal
+ strokeWidth={1.5}
+ className="h-6 w-6 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
+ },
]
export function Concepts() {
return <BoxGrid items={concepts} noBackground />
-}
\ No newline at end of file
+}
diff --git a/apps/web/src/components/CopyButton.tsx b/apps/web/src/components/CopyButton.tsx
index a633eac5c..0da1547ff 100644
--- a/apps/web/src/components/CopyButton.tsx
+++ b/apps/web/src/components/CopyButton.tsx
@@ -3,11 +3,7 @@ import clsx from 'clsx'
function ClipboardIcon(props) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
d="M5.5 13.5v-5a2 2 0 0 1 2-2l.447-.894A2 2 0 0 1 9.737 4.5h.527a2 2 0 0 1 1.789 1.106l.447.894a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2Z"
@@ -24,8 +20,7 @@ function ClipboardIcon(props) {
export function CopyButton({
code,
customPositionClassNames = 'right-4 top-3.5', // default from TailwindUI, works great with code blocks
- onAfterCopy = () => {
- },
+ onAfterCopy = () => {},
}) {
const buttonRef = useRef()
const [copyCount, setCopyCount] = useState(0)
@@ -54,11 +49,11 @@ export function CopyButton({
'group/button absolute overflow-hidden rounded-full border border-zinc-700 py-1 pl-2 pr-3 text-2xs font-medium opacity-0 transition focus:opacity-100 group-hover:opacity-100',
copied
? 'bg-brand-400/20 ring-1 ring-inset ring-brand-400/20'
- : 'dark:hover:bg-red-500/ bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5',
+ : 'dark:hover:bg-red-500/ bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5'
)}
onClick={() => {
window.navigator.clipboard.writeText(code).then(() => {
- setCopyCount(count => count + 1)
+ setCopyCount((count) => count + 1)
})
onAfterCopy()
}}
@@ -67,18 +62,17 @@ export function CopyButton({
aria-hidden={copied}
className={clsx(
'pointer-events-none flex items-center justify-center gap-0.5 text-zinc-400 transition duration-300',
- copied && '-translate-y-1.5 opacity-0',
+ copied && '-translate-y-1.5 opacity-0'
)}
>
- <ClipboardIcon
- className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" />
+ <ClipboardIcon className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" />
Copy
</span>
<span
aria-hidden={!copied}
className={clsx(
'pointer-events-none absolute inset-0 flex items-center justify-center text-brand-400 transition duration-300',
- !copied && 'translate-y-1.5 opacity-0',
+ !copied && 'translate-y-1.5 opacity-0'
)}
>
Copied!
diff --git a/apps/web/src/components/DialogAnimated.tsx b/apps/web/src/components/DialogAnimated.tsx
index d256e89cd..f0bdd1d00 100644
--- a/apps/web/src/components/DialogAnimated.tsx
+++ b/apps/web/src/components/DialogAnimated.tsx
@@ -3,21 +3,16 @@ import { Dialog, Transition } from '@headlessui/react'
import clsx from 'clsx'
export function DialogAnimated({
- open,
- setOpen,
- as = Fragment,
- className = '',
- afterLeave = () => {
- },
- rootProps = {},
- children,
- }) {
+ open,
+ setOpen,
+ as = Fragment,
+ className = '',
+ afterLeave = () => {},
+ rootProps = {},
+ children,
+}) {
return (
- <Transition.Root
- show={open}
- as={as}
- afterLeave={afterLeave}
- >
+ <Transition.Root show={open} as={as} afterLeave={afterLeave}>
<Dialog
onClose={setOpen}
className={clsx('fixed inset-0 z-50', className)}
@@ -31,7 +26,7 @@ export function DialogAnimated({
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
- <div className="fixed inset-0 bg-zinc-400/25 backdrop-blur-sm dark:bg-black/40"/>
+ <div className="fixed inset-0 bg-zinc-400/25 backdrop-blur-sm dark:bg-black/40" />
</Transition.Child>
<div className="fixed inset-0 overflow-y-auto px-4 py-4 sm:px-6 sm:py-20 md:py-32 lg:px-8 lg:py-[15vh]">
@@ -44,8 +39,7 @@ export function DialogAnimated({
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
- <Dialog.Panel
- className="mx-auto transform-gpu overflow-hidden rounded-lg bg-zinc-50 shadow-xl ring-1 ring-zinc-900/7.5 dark:bg-zinc-900 dark:ring-zinc-800 sm:max-w-xl">
+ <Dialog.Panel className="mx-auto transform-gpu overflow-hidden rounded-lg bg-zinc-50 shadow-xl ring-1 ring-zinc-900/7.5 dark:bg-zinc-900 dark:ring-zinc-800 sm:max-w-xl">
<div {...rootProps}>{children}</div>
</Dialog.Panel>
</Transition.Child>
diff --git a/apps/web/src/components/DocsBox.tsx b/apps/web/src/components/DocsBox.tsx
index b7285af18..e08a352d7 100644
--- a/apps/web/src/components/DocsBox.tsx
+++ b/apps/web/src/components/DocsBox.tsx
@@ -11,20 +11,34 @@ export interface BoxItem {
icon: ReactNode
}
-function Icon({ icon, noBackground }: { icon: ReactNode, noBackground?: boolean }) {
+function Icon({
+ icon,
+ noBackground,
+}: {
+ icon: ReactNode
+ noBackground?: boolean
+}) {
return (
- <div className={
- clsx(
+ <div
+ className={clsx(
'flex h-8 w-8 items-center justify-center rounded-full backdrop-blur-[2px] transition duration-300 ',
- noBackground ? 'bg-none ring-0' : 'ring-1 ring-white/15 bg-white/7.5 group-hover:bg-brand-300/10 group-hover:ring-brand-400',
- )
- }>
+ noBackground
+ ? 'bg-none ring-0'
+ : 'ring-1 ring-white/15 bg-white/7.5 group-hover:bg-brand-300/10 group-hover:ring-brand-400'
+ )}
+ >
{icon}
</div>
)
}
-export function DocsBox({ item: { href, title, description, icon }, noBackground }: { item: BoxItem, noBackground?: boolean }) {
+export function DocsBox({
+ item: { href, title, description, icon },
+ noBackground,
+}: {
+ item: BoxItem
+ noBackground?: boolean
+}) {
const mouseX = useMotionValue(0)
const mouseY = useMotionValue(0)
@@ -38,10 +52,21 @@ export function DocsBox({ item: { href, title, description, icon }, noBackground
<div
key={href}
onMouseMove={onMouseMove}
- className={clsx('group relative flex rounded-2xl transition-shadow hover:shadow-md', noBackground ? 'bg-none hover:bg-none' : 'bg-white/2.5 hover:shadow-black/5')}
+ className={clsx(
+ 'group relative flex rounded-2xl transition-shadow hover:shadow-md',
+ noBackground
+ ? 'bg-none hover:bg-none'
+ : 'bg-white/2.5 hover:shadow-black/5'
+ )}
>
<div
- className={clsx('absolute inset-0 rounded-2xl', noBackground ? 'ring-0 outline-none' : 'ring-1 ring-inset ring-white/10 group-hover:ring-white/20')} />
+ className={clsx(
+ 'absolute inset-0 rounded-2xl',
+ noBackground
+ ? 'ring-0 outline-none'
+ : 'ring-1 ring-inset ring-white/10 group-hover:ring-white/20'
+ )}
+ />
{noBackground ? (
<div className="relative flex items-start justify-start gap-4">
<Icon icon={icon} noBackground={true} />
@@ -52,9 +77,7 @@ export function DocsBox({ item: { href, title, description, icon }, noBackground
{title}
</Link>
</h3>
- <p className="mt-1 text-sm text-zinc-400">
- {description}
- </p>
+ <p className="mt-1 text-sm text-zinc-400">{description}</p>
</div>
</div>
) : (
@@ -66,26 +89,25 @@ export function DocsBox({ item: { href, title, description, icon }, noBackground
{title}
</Link>
</h3>
- <p className="mt-1 text-sm text-zinc-400">
- {description}
- </p>
+ <p className="mt-1 text-sm text-zinc-400">{description}</p>
</div>
)}
</div>
)
}
-export function BoxGrid({ items, noBackground }: { items: Array<BoxItem>, noBackground?: boolean }) {
+export function BoxGrid({
+ items,
+ noBackground,
+}: {
+ items: Array<BoxItem>
+ noBackground?: boolean
+}) {
return (
<div className="xl:max-w-none">
- <div
- className="mt-4 not-prose grid grid-cols-1 gap-8 sm:grid-cols-2 xl:grid-cols-4">
- {items.map(item => (
- <DocsBox
- key={item.href}
- item={item}
- noBackground={noBackground}
- />
+ <div className="mt-4 not-prose grid grid-cols-1 gap-8 sm:grid-cols-2 xl:grid-cols-4">
+ {items.map((item) => (
+ <DocsBox key={item.href} item={item} noBackground={noBackground} />
))}
</div>
</div>
diff --git a/apps/web/src/components/GridPattern.tsx b/apps/web/src/components/GridPattern.tsx
index ed53e4e81..069f3bbb7 100644
--- a/apps/web/src/components/GridPattern.tsx
+++ b/apps/web/src/components/GridPattern.tsx
@@ -1,13 +1,13 @@
import { useId } from 'react'
export function GridPattern({
- width,
- height,
- x,
- y,
- squares,
- ...props
- }: React.ComponentPropsWithoutRef<'svg'> & {
+ width,
+ height,
+ x,
+ y,
+ squares,
+ ...props
+}: React.ComponentPropsWithoutRef<'svg'> & {
width: number
height: number
x: string | number
@@ -17,10 +17,7 @@ export function GridPattern({
const patternId = useId()
return (
- <svg
- aria-hidden="true"
- {...props}
- >
+ <svg aria-hidden="true" {...props}>
<defs>
<pattern
id={patternId}
@@ -30,10 +27,7 @@ export function GridPattern({
x={x}
y={y}
>
- <path
- d={`M.5 ${height}V.5H${width}`}
- fill="none"
- />
+ <path d={`M.5 ${height}V.5H${width}`} fill="none" />
</pattern>
</defs>
<rect
@@ -43,11 +37,7 @@ export function GridPattern({
fill={`url(#${patternId})`}
/>
{squares && (
- <svg
- x={x}
- y={y}
- className="overflow-visible"
- >
+ <svg x={x} y={y} className="overflow-visible">
{squares.map(([x, y]) => (
<rect
strokeWidth="0"
diff --git a/apps/web/src/components/Guides.tsx b/apps/web/src/components/Guides.tsx
index c6b2a4fed..187cf34ee 100644
--- a/apps/web/src/components/Guides.tsx
+++ b/apps/web/src/components/Guides.tsx
@@ -15,12 +15,14 @@ const guides = [
{
href: '/errors',
name: 'Errors',
- description: 'Read about the different types of errors returned by the API.',
+ description:
+ 'Read about the different types of errors returned by the API.',
},
{
href: '/webhooks',
name: 'Webhooks',
- description: 'Learn how to programmatically configure webhooks for your app.',
+ description:
+ 'Learn how to programmatically configure webhooks for your app.',
},
]
@@ -28,15 +30,11 @@ export function Guides() {
return (
<div className="my-16 xl:max-w-none">
{/* @ts-ignore */}
- <Heading
- level={2}
- id="guides"
- >
+ <Heading level={2} id="guides">
Guides
</Heading>
- <div
- className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
- {guides.map(guide => (
+ <div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
+ {guides.map((guide) => (
<div key={guide.href}>
<h3 className="text-sm font-semibold text-zinc-900 dark:text-white">
{guide.name}
@@ -46,11 +44,7 @@ export function Guides() {
</p>
<p className="mt-4">
{/* @ts-ignore */}
- <Button
- href={guide.href}
- variant="text"
- arrow="right"
- >
+ <Button href={guide.href} variant="text" arrow="right">
Read more
</Button>
</p>
diff --git a/apps/web/src/components/HeaderUtils.tsx b/apps/web/src/components/HeaderUtils.tsx
index c4269e31d..b103c6ff5 100644
--- a/apps/web/src/components/HeaderUtils.tsx
+++ b/apps/web/src/components/HeaderUtils.tsx
@@ -1,5 +1,5 @@
export function HeaderSeparator() {
return (
- <div className="hidden md:block md:h-5 md:w-px md:bg-zinc-900/10 md:dark:bg-white/15"/>
+ <div className="hidden md:block md:h-5 md:w-px md:bg-zinc-900/10 md:dark:bg-white/15" />
)
}
diff --git a/apps/web/src/components/Heading.tsx b/apps/web/src/components/Heading.tsx
index 01126a121..3e15c509b 100644
--- a/apps/web/src/components/Heading.tsx
+++ b/apps/web/src/components/Heading.tsx
@@ -33,7 +33,9 @@ function Eyebrow({ tag, label }: { tag?: string; label?: string }) {
{tag && label && (
<span className="h-0.5 w-0.5 rounded-full bg-zinc-300 dark:bg-zinc-600" />
)}
- {label && <span className="font-mono text-xs text-zinc-400">{label}</span>}
+ {label && (
+ <span className="font-mono text-xs text-zinc-400">{label}</span>
+ )}
</div>
)
}
@@ -53,12 +55,9 @@ function Anchor({
className="group text-inherit no-underline hover:text-inherit"
>
{inView && (
- <div
- className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
- <div
- className="group/anchor block h-5 w-5 rounded-lg bg-zinc-50 ring-1 ring-inset ring-zinc-300 transition hover:ring-zinc-500 dark:bg-zinc-800 dark:ring-zinc-700 dark:hover:bg-zinc-700 dark:hover:ring-zinc-600">
- <AnchorIcon
- className="h-5 w-5 stroke-zinc-500 transition dark:stroke-zinc-400 dark:group-hover/anchor:stroke-white" />
+ <div className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
+ <div className="group/anchor block h-5 w-5 rounded-lg bg-zinc-50 ring-1 ring-inset ring-zinc-300 transition hover:ring-zinc-500 dark:bg-zinc-800 dark:ring-zinc-700 dark:hover:bg-zinc-700 dark:hover:ring-zinc-600">
+ <AnchorIcon className="h-5 w-5 stroke-zinc-500 transition dark:stroke-zinc-400 dark:group-hover/anchor:stroke-white" />
</div>
</div>
)}
@@ -84,12 +83,11 @@ export function Heading<Level extends 2 | 3>({
level = level ?? (2 as Level)
const Component = `h${level}` as 'h2' | 'h3'
const ref = useRef<HTMLHeadingElement>(null)
- const registerHeading = useSectionStore(s => s.registerHeading)
+ const registerHeading = useSectionStore((s) => s.registerHeading)
const inView = useInView(ref, {
margin: `${remToPx(-3.5)}px 0px 0px 0px`,
amount: 'all',
-
})
useEffect(() => {
@@ -103,20 +101,14 @@ export function Heading<Level extends 2 | 3>({
return (
<>
- <Eyebrow
- tag={tag}
- label={label}
- />
+ <Eyebrow tag={tag} label={label} />
<Component
ref={ref}
className={tag || label ? 'mt-2 scroll-mt-32' : 'scroll-mt-24'}
{...props}
>
{anchor ? (
- <Anchor
- id={props.id}
- inView={inView}
- >
+ <Anchor id={props.id} inView={inView}>
{children}
</Anchor>
) : (
diff --git a/apps/web/src/components/HeroPattern.tsx b/apps/web/src/components/HeroPattern.tsx
index 01fd52f45..fd09baf3a 100644
--- a/apps/web/src/components/HeroPattern.tsx
+++ b/apps/web/src/components/HeroPattern.tsx
@@ -3,10 +3,8 @@ import { GridPattern } from '@/components/GridPattern'
export function HeroPattern() {
return (
<div className="absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden">
- <div
- className="absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]">
- <div
- className="absolute inset-0 bg-gradient-to-r from-[#FF8800] to-[#F15B03] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#FF8800]/30 dark:to-[#F15B03]/30 dark:opacity-100">
+ <div className="absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]">
+ <div className="absolute inset-0 bg-gradient-to-r from-[#FF8800] to-[#F15B03] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#FF8800]/30 dark:to-[#F15B03]/30 dark:opacity-100">
<GridPattern
width={72}
height={56}
@@ -43,14 +41,8 @@ export function HeroPattern() {
y2="692.501"
gradientUnits="userSpaceOnUse"
>
- <stop
- stopColor="#333333"
- stopOpacity="0.29"
- />
- <stop
- offset="1"
- stopColor="#333333"
- />
+ <stop stopColor="#333333" stopOpacity="0.29" />
+ <stop offset="1" stopColor="#333333" />
</linearGradient>
</defs>
</svg>
diff --git a/apps/web/src/components/LanguageSpecificText.tsx b/apps/web/src/components/LanguageSpecificText.tsx
index 346d299d4..33b9a46d7 100644
--- a/apps/web/src/components/LanguageSpecificText.tsx
+++ b/apps/web/src/components/LanguageSpecificText.tsx
@@ -2,7 +2,11 @@
import { Children, isValidElement } from 'react'
import { Tab } from '@headlessui/react'
-import { CodeGroupHeader, getPanelTitle, useTabGroupProps } from '@/components/Code'
+import {
+ CodeGroupHeader,
+ getPanelTitle,
+ useTabGroupProps,
+} from '@/components/Code'
export interface Props {
children: JSX.Element[]
@@ -17,8 +21,8 @@ export function LanguageSpecificText({
isFileName,
}: Props) {
const languages =
- Children.map(children, child =>
- getPanelTitle(isValidElement(child) ? child.props : {} as any),
+ Children.map(children, (child) =>
+ getPanelTitle(isValidElement(child) ? child.props : ({} as any))
) ?? []
const tabGroupProps = useTabGroupProps(languages)
@@ -28,7 +32,7 @@ export function LanguageSpecificText({
<CodeGroupHeader
title={title}
selectedIndex={tabGroupProps.selectedIndex}
- // isFileName={isFileName}
+ // isFileName={isFileName}
>
{children}
</CodeGroupHeader>
@@ -36,10 +40,7 @@ export function LanguageSpecificText({
return (
<div>
- <Tab.Group
- {...tabGroupProps}
- className={containerClassName}
- >
+ <Tab.Group {...tabGroupProps} className={containerClassName}>
{header}
<div>
<div className="group dark:bg-white/2.5">
diff --git a/apps/web/src/components/Libraries.tsx b/apps/web/src/components/Libraries.tsx
index 152a6d707..b48615f78 100644
--- a/apps/web/src/components/Libraries.tsx
+++ b/apps/web/src/components/Libraries.tsx
@@ -15,8 +15,7 @@ const libraries = [
{
href: 'https://pypi.org/project/e2b',
name: 'Python',
- description:
- 'Requires at least Python 3.8.',
+ description: 'Requires at least Python 3.8.',
logo: logoPython,
},
]
@@ -25,11 +24,8 @@ export function Libraries() {
return (
<div className="xl:max-w-none">
<div className="not-prose grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 xl:max-w-none xl:grid-cols-3">
- {libraries.map(library => (
- <div
- key={library.name}
- className="flex flex-row-reverse gap-6"
- >
+ {libraries.map((library) => (
+ <div key={library.name} className="flex flex-row-reverse gap-6">
<div className="flex flex-col flex-auto">
<h3 className="text-sm font-semibold text-zinc-900 dark:text-white">
{library.name}
@@ -39,12 +35,9 @@ export function Libraries() {
</p>
<p className="mt-4">
{/* @ts-ignore */}
- <Button
- href={library.href}
- variant="text"
- arrow="right"
- >
- Inspect on {library.name === 'JavaScript & Typescript' ? ' NPM' : 'PyPi'}
+ <Button href={library.href} variant="text" arrow="right">
+ Inspect on{' '}
+ {library.name === 'JavaScript & Typescript' ? ' NPM' : 'PyPi'}
</Button>
</p>
</div>
diff --git a/apps/web/src/components/Logo.tsx b/apps/web/src/components/Logo.tsx
index faa526716..9d543a197 100644
--- a/apps/web/src/components/Logo.tsx
+++ b/apps/web/src/components/Logo.tsx
@@ -66,10 +66,7 @@ export function Logo(props) {
filterUnits="userSpaceOnUse"
colorInterpolationFilters="sRGB"
>
- <feFlood
- floodOpacity="0"
- result="BackgroundImageFix"
- />
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
<feBlend
mode="normal"
in="SourceGraphic"
@@ -89,22 +86,10 @@ export function Logo(props) {
gradientUnits="userSpaceOnUse"
gradientTransform="translate(150.342 182.032) rotate(59.4351) scale(161.356 156.629)"
>
- <stop
- offset="0.455526"
- stopColor="white"
- />
- <stop
- offset="0.762774"
- stopColor="#FF8800"
- />
- <stop
- offset="0.895833"
- stopColor="#FF3D00"
- />
- <stop
- offset="0.916667"
- stopColor="white"
- />
+ <stop offset="0.455526" stopColor="white" />
+ <stop offset="0.762774" stopColor="#FF8800" />
+ <stop offset="0.895833" stopColor="#FF3D00" />
+ <stop offset="0.916667" stopColor="white" />
</radialGradient>
<radialGradient
id="paint1_angular_354_41876"
@@ -114,28 +99,11 @@ export function Logo(props) {
gradientUnits="userSpaceOnUse"
gradientTransform="translate(112 116.002) rotate(90) scale(115.892 110.425)"
>
- <stop
- offset="0.03125"
- stopColor="white"
- />
- <stop
- offset="0.500802"
- stopColor="white"
- />
- <stop
- offset="0.5784"
- stopColor="white"
- />
- <stop
- offset="0.787671"
- stopColor="white"
- stopOpacity="0"
- />
- <stop
- offset="1"
- stopColor="white"
- stopOpacity="0"
- />
+ <stop offset="0.03125" stopColor="white" />
+ <stop offset="0.500802" stopColor="white" />
+ <stop offset="0.5784" stopColor="white" />
+ <stop offset="0.787671" stopColor="white" stopOpacity="0" />
+ <stop offset="1" stopColor="white" stopOpacity="0" />
</radialGradient>
<linearGradient
id="paint2_linear_354_41876"
@@ -145,15 +113,9 @@ export function Logo(props) {
y2="195.449"
gradientUnits="userSpaceOnUse"
>
- <stop stopColor="white"/>
- <stop
- offset="0.720129"
- stopColor="#FF8800"
- />
- <stop
- offset="1"
- stopColor="#FF4400"
- />
+ <stop stopColor="white" />
+ <stop offset="0.720129" stopColor="#FF8800" />
+ <stop offset="1" stopColor="#FF4400" />
</linearGradient>
</defs>
</svg>
diff --git a/apps/web/src/components/Navigation/DocsTypeItems.tsx b/apps/web/src/components/Navigation/DocsTypeItems.tsx
index 88d9878cc..6d793c34f 100644
--- a/apps/web/src/components/Navigation/DocsTypeItems.tsx
+++ b/apps/web/src/components/Navigation/DocsTypeItems.tsx
@@ -15,27 +15,39 @@ function Item({
title: string
}) {
const pathname = usePathname()
- const bestMatch = allHrefs.find(h =>
- pathname.startsWith(h) &&
- (pathname.length === h.length || pathname.charAt(h.length) === '/')
+ const bestMatch = allHrefs.find(
+ (h) =>
+ pathname.startsWith(h) &&
+ (pathname.length === h.length || pathname.charAt(h.length) === '/')
)
const isActive = href === bestMatch
return (
- <Link href={href} className={clsx(
- 'text-xs flex items-center gap-2 group p-1 transition-all',
- )}>
- <div className={clsx(
- 'flex items-center justify-center p-2 rounded-md bg-gradient-to-b shadow-md group-hover:from-brand-800 group-hover:to-brand-400 border border-white/20 group-hover:border-brand-400',
- isActive ? 'from-brand-800 to-brand-400 border-brand-400' : 'from-gray-700 to-gray-900 border-white/20'
- )}>
+ <Link
+ href={href}
+ className={clsx(
+ 'text-xs flex items-center gap-2 group p-1 transition-all'
+ )}
+ >
+ <div
+ className={clsx(
+ 'flex items-center justify-center p-2 rounded-md bg-gradient-to-b shadow-md group-hover:from-brand-800 group-hover:to-brand-400 border border-white/20 group-hover:border-brand-400',
+ isActive
+ ? 'from-brand-800 to-brand-400 border-brand-400'
+ : 'from-gray-700 to-gray-900 border-white/20'
+ )}
+ >
{icon}
</div>
- <span className={clsx(
- 'font-semibold',
- isActive ? 'text-white' : 'text-zinc-400 group-hover:text-white'
- )}>{title}</span>
+ <span
+ className={clsx(
+ 'font-semibold',
+ isActive ? 'text-white' : 'text-zinc-400 group-hover:text-white'
+ )}
+ >
+ {title}
+ </span>
</Link>
)
}
@@ -44,8 +56,18 @@ export function DocsTypes() {
return (
<>
{/* Order of allHrefs is important here to calculate `bestMatch` correctly! */}
- <Item href="/docs" icon={<BookIcon className="w-4 h-4 text-white" />} title="Documentation" allHrefs={['/docs/sdk-reference', '/docs']} />
- <Item href="/docs/sdk-reference" icon={<BracesIcon className="w-4 h-4 text-white" />} title="SDK Reference" allHrefs={['/docs/sdk-reference', '/docs']} />
+ <Item
+ href="/docs"
+ icon={<BookIcon className="w-4 h-4 text-white" />}
+ title="Documentation"
+ allHrefs={['/docs/sdk-reference', '/docs']}
+ />
+ <Item
+ href="/docs/sdk-reference"
+ icon={<BracesIcon className="w-4 h-4 text-white" />}
+ title="SDK Reference"
+ allHrefs={['/docs/sdk-reference', '/docs']}
+ />
<li className="h-px bg-white/5 my-4"></li>
</>
)
diff --git a/apps/web/src/components/Navigation/apiRefRoutes.json b/apps/web/src/components/Navigation/apiRefRoutes.json
index 47384ae10..7505ec012 100644
--- a/apps/web/src/components/Navigation/apiRefRoutes.json
+++ b/apps/web/src/components/Navigation/apiRefRoutes.json
@@ -16,4 +16,4 @@
}
]
}
-]
\ No newline at end of file
+]
diff --git a/apps/web/src/components/Navigation/index.tsx b/apps/web/src/components/Navigation/index.tsx
index 444da4728..15831cc4d 100644
--- a/apps/web/src/components/Navigation/index.tsx
+++ b/apps/web/src/components/Navigation/index.tsx
@@ -1,6 +1,5 @@
'use client'
-
import clsx from 'clsx'
import { motion } from 'framer-motion'
import { usePathname, useRouter } from 'next/navigation'
@@ -101,7 +100,9 @@ function VersionedNavigationGroup({
// Manage the state of the current version of the SDK reference
// and pre-sort them from latest to oldest user semver
- const versions = Object.keys(group.versionedItems)?.sort((a, b) => semver.rcompare(a, b)) ?? []
+ const versions =
+ Object.keys(group.versionedItems)?.sort((a, b) => semver.rcompare(a, b)) ??
+ []
const [curVersion, setCurVersion] = useState(versions[0])
// If this is the mobile navigation then we always render the initial
diff --git a/apps/web/src/components/Quickstart.tsx b/apps/web/src/components/Quickstart.tsx
index 152ac91dd..79df658e0 100644
--- a/apps/web/src/components/Quickstart.tsx
+++ b/apps/web/src/components/Quickstart.tsx
@@ -5,35 +5,55 @@ import {
PackagePlus,
} from 'lucide-react'
-import {
- BoxItem,
- BoxGrid,
-} from '@/components/DocsBox'
+import { BoxItem, BoxGrid } from '@/components/DocsBox'
const items: BoxItem[] = [
{
href: '/docs/quickstart',
title: 'Running your first Sandbox',
- description: 'Learn how to start your first E2B Sandbox with our Python or JavaScript SDK.',
- icon: <PlayCircle strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Learn how to start your first E2B Sandbox with our Python or JavaScript SDK.',
+ icon: (
+ <PlayCircle
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/quickstart/connect-llms',
title: 'Connecting LLMs to E2B',
- description: 'Connect your favorite LLM to E2B to run AI-generated code inside the Sandbox.',
- icon: <BrainCircuit strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Connect your favorite LLM to E2B to run AI-generated code inside the Sandbox.',
+ icon: (
+ <BrainCircuit
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/quickstart/upload-download-files',
title: 'Uploading & downloading files',
- description: 'A quick guide on how to upload and download files to and from the Sandbox.',
- icon: <UploadCloud strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'A quick guide on how to upload and download files to and from the Sandbox.',
+ icon: (
+ <UploadCloud
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/quickstart/install-custom-packages',
title: 'Install custom packages',
description: 'Customize your Sandbox with third-party packages.',
- icon: <PackagePlus strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ icon: (
+ <PackagePlus
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
]
diff --git a/apps/web/src/components/SandboxSpec/CPUSpec.tsx b/apps/web/src/components/SandboxSpec/CPUSpec.tsx
index 43b22197b..427413867 100644
--- a/apps/web/src/components/SandboxSpec/CPUSpec.tsx
+++ b/apps/web/src/components/SandboxSpec/CPUSpec.tsx
@@ -9,16 +9,15 @@ export interface Props {
cpuPrice: number
}
-function CPUSpec({
- cpuVals,
- cpuPrice,
-}: Props) {
+function CPUSpec({ cpuVals, cpuPrice }: Props) {
return (
<div className="w-full flex flex-col gap-2 items-start justify-start">
<div className="flex items-center justify-between w-full px-2 bg-brand-500/10 rounded">
<div className="flex items-center justify-start space-between w-full w-[300px]">
<span className="text-sm flex-1 text-white font-bold">vCPUs</span>
- <span className="text-sm text-white font-bold text-left w-[150px]">Plan</span>
+ <span className="text-sm text-white font-bold text-left w-[150px]">
+ Plan
+ </span>
</div>
<span className="text-sm text-white font-bold">Costs</span>
</div>
@@ -31,13 +30,23 @@ function CPUSpec({
>
<div className="flex items-center justify-start space-between w-full w-[300px]">
<div className="flex flex-1 items-center justify-start space-between">
- <span className="text-sm font-mono text-left">{cpuVal.value}</span>
- {cpuVal.isDefault && <span className="text-sm font-mono font-semibold text-green-500 text-left ml-1">[default]</span>}
+ <span className="text-sm font-mono text-left">
+ {cpuVal.value}
+ </span>
+ {cpuVal.isDefault && (
+ <span className="text-sm font-mono font-semibold text-green-500 text-left ml-1">
+ [default]
+ </span>
+ )}
</div>
- <span className="text-sm font-mono text-left w-[150px]">{cpuVal.plan}</span>
+ <span className="text-sm font-mono text-left w-[150px]">
+ {cpuVal.plan}
+ </span>
</div>
- <span className="text-sm font-mono text-right">${(cpuVal.value * cpuPrice).toFixed(6)}/s</span>
+ <span className="text-sm font-mono text-right">
+ ${(cpuVal.value * cpuPrice).toFixed(6)}/s
+ </span>
</div>
))}
</div>
@@ -45,4 +54,4 @@ function CPUSpec({
)
}
-export default CPUSpec
\ No newline at end of file
+export default CPUSpec
diff --git a/apps/web/src/components/SandboxSpec/RAMSpec.tsx b/apps/web/src/components/SandboxSpec/RAMSpec.tsx
index 9c4161431..59ffa1e5a 100644
--- a/apps/web/src/components/SandboxSpec/RAMSpec.tsx
+++ b/apps/web/src/components/SandboxSpec/RAMSpec.tsx
@@ -3,40 +3,44 @@ export interface Props {
isDefault?: boolean
}
-function RAMSpec({
- ramPrice,
-}: Props) {
+function RAMSpec({ ramPrice }: Props) {
return (
<div className="w-full flex flex-col gap-2 items-start justify-start">
<div className="flex items-center justify-between w-full px-2 bg-brand-500/10 rounded">
<div className="flex items-center justify-start space-between w-full">
<span className="text-sm text-white font-bold w-[400px]">RAM</span>
- <span className="text-sm text-white font-bold text-right w-[45px]">Plan</span>
+ <span className="text-sm text-white font-bold text-right w-[45px]">
+ Plan
+ </span>
</div>
- <span className="text-sm text-white font-bold w-full text-center">Costs</span>
+ <span className="text-sm text-white font-bold w-full text-center">
+ Costs
+ </span>
</div>
<div className="flex items-center justify-start w-full">
<div className="flex flex-col items-sart justify-start">
- <div
- className="flex items-center justify-between w-full border-b border-white/10"
- >
+ <div className="flex items-center justify-between w-full border-b border-white/10">
{/* Hobby */}
<div className="flex items-center justify-end py-2 pl-2">
<div className="flex flex-1 items-center justify-start space-between w-[350px]">
<span className="text-sm font-mono text-left">512 MiB</span>
- <span className="text-sm font-mono font-semibold text-green-500 text-left ml-1">[default]</span>
+ <span className="text-sm font-mono font-semibold text-green-500 text-left ml-1">
+ [default]
+ </span>
</div>
- <span className="text-sm font-mono text-left w-[95px]">Hobby / Pro</span>
+ <span className="text-sm font-mono text-left w-[95px]">
+ Hobby / Pro
+ </span>
</div>
</div>
{/* Pro */}
- <div
- className="flex items-center justify-start"
- >
+ <div className="flex items-center justify-start">
<div className="flex items-center justify-end py-2 pl-2 w-full">
- <span className="text-sm flex-1 font-mono text-left w-[400px]"><b>even</b> value <b>between 128 MiB</b> and <b>8,192 MiB</b></span>
+ <span className="text-sm flex-1 font-mono text-left w-[400px]">
+ <b>even</b> value <b>between 128 MiB</b> and <b>8,192 MiB</b>
+ </span>
<span className="text-sm font-mono text-right w-[45px]">Pro</span>
</div>
</div>
@@ -50,4 +54,4 @@ function RAMSpec({
)
}
-export default RAMSpec
\ No newline at end of file
+export default RAMSpec
diff --git a/apps/web/src/components/SandboxSpec/StorageSpec.tsx b/apps/web/src/components/SandboxSpec/StorageSpec.tsx
index 55d8dcee8..86dcb8ee1 100644
--- a/apps/web/src/components/SandboxSpec/StorageSpec.tsx
+++ b/apps/web/src/components/SandboxSpec/StorageSpec.tsx
@@ -7,15 +7,15 @@ export interface Props {
storageVals: StorageValue[]
}
-function CPUSpec({
- storageVals,
-}: Props) {
+function CPUSpec({ storageVals }: Props) {
return (
<div className="w-full flex flex-col gap-2 items-start justify-start">
<div className="flex items-center justify-between w-full px-2 bg-brand-500/10 rounded">
<div className="flex items-center justify-start space-between w-full w-[300px]">
<span className="text-sm flex-1 text-white font-bold">Storage</span>
- <span className="text-sm text-white font-bold text-left w-[150px]">Plan</span>
+ <span className="text-sm text-white font-bold text-left w-[150px]">
+ Plan
+ </span>
</div>
<span className="text-sm text-white font-bold">Costs</span>
</div>
@@ -27,8 +27,12 @@ function CPUSpec({
className="flex items-center justify-between w-full p-2 border-b border-white/10"
>
<div className="flex items-center justify-start space-between w-full w-[300px]">
- <span className="text-sm flex-1 font-mono text-left">{val.value} GiB</span>
- <span className="text-sm font-mono text-left w-[150px]">{val.plan}</span>
+ <span className="text-sm flex-1 font-mono text-left">
+ {val.value} GiB
+ </span>
+ <span className="text-sm font-mono text-left w-[150px]">
+ {val.plan}
+ </span>
</div>
<span className="text-sm font-mono text-right">Free</span>
@@ -39,4 +43,4 @@ function CPUSpec({
)
}
-export default CPUSpec
\ No newline at end of file
+export default CPUSpec
diff --git a/apps/web/src/components/SandboxSpec/index.tsx b/apps/web/src/components/SandboxSpec/index.tsx
index bbc0dd430..e26408db8 100644
--- a/apps/web/src/components/SandboxSpec/index.tsx
+++ b/apps/web/src/components/SandboxSpec/index.tsx
@@ -2,7 +2,6 @@ import CPUSpec, { CPUValue } from './CPUSpec'
import RAMSpec from './RAMSpec'
import StorageSpec, { StorageValue } from './StorageSpec'
-
const cpuVals: CPUValue[] = [
{
value: 1,
@@ -45,11 +44,11 @@ const ramPrice = 0.0000045
const storageValues: StorageValue[] = [
{
value: 1,
- plan: 'Hobby'
+ plan: 'Hobby',
},
{
value: 5,
- plan: 'Pro'
+ plan: 'Pro',
},
]
@@ -74,4 +73,4 @@ function SandboxSpec() {
)
}
-export default SandboxSpec
\ No newline at end of file
+export default SandboxSpec
diff --git a/apps/web/src/components/SdkVersionSelect.tsx b/apps/web/src/components/SdkVersionSelect.tsx
index 957113ecf..20d85f5c9 100644
--- a/apps/web/src/components/SdkVersionSelect.tsx
+++ b/apps/web/src/components/SdkVersionSelect.tsx
@@ -9,7 +9,6 @@ export function SdkVersionSelect({
versions,
onVersionChange,
}: Props) {
-
return (
<select
className="
diff --git a/apps/web/src/components/SectionProvider.tsx b/apps/web/src/components/SectionProvider.tsx
index f74e66fed..3b9ab9d3d 100644
--- a/apps/web/src/components/SectionProvider.tsx
+++ b/apps/web/src/components/SectionProvider.tsx
@@ -1,6 +1,12 @@
'use client'
-import { createContext, useContext, useEffect, useLayoutEffect, useState } from 'react'
+import {
+ createContext,
+ useContext,
+ useEffect,
+ useLayoutEffect,
+ useState,
+} from 'react'
import { createStore, type StoreApi, useStore } from 'zustand'
import { remToPx } from '@/lib/remToPx'
@@ -30,19 +36,19 @@ interface SectionState {
}
function createSectionStore(sections: Array<Section>) {
- return createStore<SectionState>()(set => ({
+ return createStore<SectionState>()((set) => ({
sections,
visibleSections: [],
- setVisibleSections: visibleSections =>
- set(state =>
+ setVisibleSections: (visibleSections) =>
+ set((state) =>
state.visibleSections.join() === visibleSections.join()
? {}
- : { visibleSections },
+ : { visibleSections }
),
registerHeading: ({ id, ref, offsetRem }) =>
- set(state => {
+ set((state) => {
return {
- sections: state.sections.map(section => {
+ sections: state.sections.map((section) => {
if (section.id === id) {
return {
...section,
@@ -58,16 +64,20 @@ function createSectionStore(sections: Array<Section>) {
}
function useVisibleSections(sectionStore: StoreApi<SectionState>) {
- const setVisibleSections = useStore(sectionStore, s => s.setVisibleSections)
+ const setVisibleSections = useStore(sectionStore, (s) => s.setVisibleSections)
// @ts-ignore
- const sections = useStore(sectionStore, s => s.sections)
+ const sections = useStore(sectionStore, (s) => s.sections)
useEffect(() => {
function checkVisibleSections() {
const { innerHeight, scrollY } = window
const newVisibleSections: any[] = []
- for (let sectionIndex = 0; sectionIndex < sections.length; sectionIndex++) {
+ for (
+ let sectionIndex = 0;
+ sectionIndex < sections.length;
+ sectionIndex++
+ ) {
const { id, headingRef, offsetRem = 0 } = sections[sectionIndex]
if (!headingRef?.current) {
@@ -83,7 +93,8 @@ function useVisibleSections(sectionStore: StoreApi<SectionState>) {
const nextSection = sections[sectionIndex + 1]
const bottom =
- (nextSection?.headingRef?.current?.getBoundingClientRect().top ?? Infinity) +
+ (nextSection?.headingRef?.current?.getBoundingClientRect().top ??
+ Infinity) +
scrollY -
remToPx(nextSection?.offsetRem ?? 0)
diff --git a/apps/web/src/components/Spinner.tsx b/apps/web/src/components/Spinner.tsx
index 7f316a052..d81db94ae 100644
--- a/apps/web/src/components/Spinner.tsx
+++ b/apps/web/src/components/Spinner.tsx
@@ -1,6 +1,6 @@
import { Loader2 as Loader } from 'lucide-react'
-function Spinner({ className = '', size = '16px'}) {
+function Spinner({ className = '', size = '16px' }) {
return (
<Loader
className={`animate-spin ${className ? className : ''}`}
diff --git a/apps/web/src/components/Tag.tsx b/apps/web/src/components/Tag.tsx
index a4184b050..c699c8520 100644
--- a/apps/web/src/components/Tag.tsx
+++ b/apps/web/src/components/Tag.tsx
@@ -1,19 +1,15 @@
import clsx from 'clsx'
import React from 'react'
-export function Tag({
- children,
-}: {
- children: React.ReactNode
-}) {
+export function Tag({ children }: { children: React.ReactNode }) {
return (
<span
className={clsx(
'relative top-[1.5px] font-mono text-[0.625rem] font-semibold',
- 'text-brand-400 bg-brand-1000 ring-1 ring-inset rounded-lg px-1.5 ring-brand-400/20',
+ 'text-brand-400 bg-brand-1000 ring-1 ring-inset rounded-lg px-1.5 ring-brand-400/20'
)}
>
{children}
</span>
)
-}
\ No newline at end of file
+}
diff --git a/apps/web/src/components/Textarea.tsx b/apps/web/src/components/Textarea.tsx
index 0e09bda57..b407fb7d4 100644
--- a/apps/web/src/components/Textarea.tsx
+++ b/apps/web/src/components/Textarea.tsx
@@ -19,7 +19,7 @@ function Textarea({ value = '', className, placeholder, onChange, isOpen }) {
ref.current?.focus()
}
},
- [isOpen],
+ [isOpen]
)
return (
@@ -47,7 +47,7 @@ function Textarea({ value = '', className, placeholder, onChange, isOpen }) {
'transition-colors',
'text-white',
'placeholder:text-gray-500',
- className,
+ className
)}
onChange={onChange}
/>
diff --git a/apps/web/src/components/ThemeToggle.tsx b/apps/web/src/components/ThemeToggle.tsx
index c0ccf6db9..566d1d738 100644
--- a/apps/web/src/components/ThemeToggle.tsx
+++ b/apps/web/src/components/ThemeToggle.tsx
@@ -3,13 +3,8 @@ import { useTheme } from 'next-themes'
function SunIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- fill="none"
- aria-hidden="true"
- {...props}
- >
- <path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"/>
+ <svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
+ <path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" />
<path
strokeLinecap="round"
d="M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"
@@ -20,13 +15,8 @@ function SunIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
function MoonIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- fill="none"
- aria-hidden="true"
- {...props}
- >
- <path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z"/>
+ <svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
+ <path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z" />
</svg>
)
}
@@ -47,8 +37,8 @@ export function ThemeToggle() {
aria-label={mounted ? `Switch to ${otherTheme} theme` : 'Toggle theme'}
onClick={() => setTheme(otherTheme)}
>
- <SunIcon className="h-5 w-5 stroke-zinc-900 dark:hidden"/>
- <MoonIcon className="hidden h-5 w-5 stroke-white dark:block"/>
+ <SunIcon className="h-5 w-5 stroke-zinc-900 dark:hidden" />
+ <MoonIcon className="hidden h-5 w-5 stroke-white dark:block" />
</button>
)
}
diff --git a/apps/web/src/components/UseCases.tsx b/apps/web/src/components/UseCases.tsx
index dc9494849..60dd35e96 100644
--- a/apps/web/src/components/UseCases.tsx
+++ b/apps/web/src/components/UseCases.tsx
@@ -1,24 +1,31 @@
-import {
- Binary
-} from 'lucide-react'
+import { Binary } from 'lucide-react'
-import {
- BoxItem,
- BoxGrid,
-} from '@/components/DocsBox'
+import { BoxItem, BoxGrid } from '@/components/DocsBox'
const useCases: BoxItem[] = [
{
href: '/docs/code-execution',
title: 'Build code interpreter',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
- icon: <Binary strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: (
+ <Binary
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
{
href: '/docs/data-analysis',
title: 'AI data analysis',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
- icon: <Binary strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: (
+ <Binary
+ strokeWidth={1.5}
+ className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400"
+ />
+ ),
},
]
diff --git a/apps/web/src/components/icons/BellIcon.tsx b/apps/web/src/components/icons/BellIcon.tsx
index 90e0a02b0..1c0c2291c 100644
--- a/apps/web/src/components/icons/BellIcon.tsx
+++ b/apps/web/src/components/icons/BellIcon.tsx
@@ -1,10 +1,6 @@
export function BellIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/BoltIcon.tsx b/apps/web/src/components/icons/BoltIcon.tsx
index 37376850b..308d997cc 100644
--- a/apps/web/src/components/icons/BoltIcon.tsx
+++ b/apps/web/src/components/icons/BoltIcon.tsx
@@ -1,10 +1,6 @@
export function BoltIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/BookIcon.tsx b/apps/web/src/components/icons/BookIcon.tsx
index 4b9b9b0bf..9f7709bc3 100644
--- a/apps/web/src/components/icons/BookIcon.tsx
+++ b/apps/web/src/components/icons/BookIcon.tsx
@@ -1,10 +1,6 @@
export function BookIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/CalendarIcon.tsx b/apps/web/src/components/icons/CalendarIcon.tsx
index 9a8a90aed..e9d374867 100644
--- a/apps/web/src/components/icons/CalendarIcon.tsx
+++ b/apps/web/src/components/icons/CalendarIcon.tsx
@@ -1,10 +1,6 @@
export function CalendarIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/CartIcon.tsx b/apps/web/src/components/icons/CartIcon.tsx
index 31ee8b4f5..30c9438f7 100644
--- a/apps/web/src/components/icons/CartIcon.tsx
+++ b/apps/web/src/components/icons/CartIcon.tsx
@@ -1,10 +1,6 @@
export function CartIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
d="M5.98 11.288 3.5 5.5h14l-2.48 5.788A2 2 0 0 1 13.18 12.5H7.82a2 2 0 0 1-1.838-1.212Z"
diff --git a/apps/web/src/components/icons/ChatBubbleIcon.tsx b/apps/web/src/components/icons/ChatBubbleIcon.tsx
index aaf1b3f06..418427b05 100644
--- a/apps/web/src/components/icons/ChatBubbleIcon.tsx
+++ b/apps/web/src/components/icons/ChatBubbleIcon.tsx
@@ -1,10 +1,6 @@
export function ChatBubbleIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/CheckIcon.tsx b/apps/web/src/components/icons/CheckIcon.tsx
index 7917a1456..b9433644d 100644
--- a/apps/web/src/components/icons/CheckIcon.tsx
+++ b/apps/web/src/components/icons/CheckIcon.tsx
@@ -1,10 +1,6 @@
export function CheckIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/ChevronRightLeftIcon.tsx b/apps/web/src/components/icons/ChevronRightLeftIcon.tsx
index 4fa200725..51144c0fd 100644
--- a/apps/web/src/components/icons/ChevronRightLeftIcon.tsx
+++ b/apps/web/src/components/icons/ChevronRightLeftIcon.tsx
@@ -1,10 +1,8 @@
-export function ChevronRightLeftIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
+export function ChevronRightLeftIcon(
+ props: React.ComponentPropsWithoutRef<'svg'>
+) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/ClipboardIcon.tsx b/apps/web/src/components/icons/ClipboardIcon.tsx
index bb671f286..33d997b5b 100644
--- a/apps/web/src/components/icons/ClipboardIcon.tsx
+++ b/apps/web/src/components/icons/ClipboardIcon.tsx
@@ -1,10 +1,6 @@
export function ClipboardIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/CogIcon.tsx b/apps/web/src/components/icons/CogIcon.tsx
index 6503e3eee..cedecf542 100644
--- a/apps/web/src/components/icons/CogIcon.tsx
+++ b/apps/web/src/components/icons/CogIcon.tsx
@@ -1,10 +1,6 @@
export function CogIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
fillRule="evenodd"
@@ -17,12 +13,7 @@ export function CogIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
strokeLinejoin="round"
d="M8.938 1.5h2.124l.142 1.128c.085.682.61 1.22 1.244 1.484v0c.635.264 1.37.247 1.913-.175l.898-.699 1.503 1.503-.699.898c-.422.543-.44 1.278-.175 1.912v0c.264.635.801 1.16 1.484 1.245l1.128.142v2.124l-1.128.142c-.683.085-1.22.61-1.484 1.244v0c-.264.635-.247 1.37.175 1.913l.699.898-1.503 1.503-.898-.699c-.543-.422-1.278-.44-1.913-.175v0c-.634.264-1.16.801-1.245 1.484l-.14 1.128H8.937l-.14-1.128c-.086-.683-.611-1.22-1.246-1.484v0c-.634-.264-1.37-.247-1.912.175l-.898.699-1.503-1.503.699-.898c.422-.543.44-1.278.175-1.913v0c-.264-.634-.802-1.16-1.484-1.245l-1.128-.14V8.937l1.128-.14c.682-.086 1.22-.61 1.484-1.246v0c.264-.634.247-1.37-.175-1.912l-.699-.898 1.503-1.503.898.699c.543.422 1.278.44 1.912.175v0c.635-.264 1.16-.802 1.245-1.484L8.938 1.5Z"
/>
- <circle
- cx="10"
- cy="10"
- r="2.5"
- fill="none"
- />
+ <circle cx="10" cy="10" r="2.5" fill="none" />
</svg>
)
}
diff --git a/apps/web/src/components/icons/CopyIcon.tsx b/apps/web/src/components/icons/CopyIcon.tsx
index aee51ddd1..0eedaaa4c 100644
--- a/apps/web/src/components/icons/CopyIcon.tsx
+++ b/apps/web/src/components/icons/CopyIcon.tsx
@@ -1,10 +1,6 @@
export function CopyIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/DiscordIcon.tsx b/apps/web/src/components/icons/DiscordIcon.tsx
index b4f81aeb9..daaf5bb86 100644
--- a/apps/web/src/components/icons/DiscordIcon.tsx
+++ b/apps/web/src/components/icons/DiscordIcon.tsx
@@ -1,12 +1,7 @@
export function DiscordIcon(props) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
- <path
- d="M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z"/>
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
+ <path d="M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z" />
</svg>
)
}
diff --git a/apps/web/src/components/icons/DocumentIcon.tsx b/apps/web/src/components/icons/DocumentIcon.tsx
index 12ea33798..8f83d2094 100644
--- a/apps/web/src/components/icons/DocumentIcon.tsx
+++ b/apps/web/src/components/icons/DocumentIcon.tsx
@@ -1,10 +1,6 @@
export function DocumentIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/EnvelopeIcon.tsx b/apps/web/src/components/icons/EnvelopeIcon.tsx
index 8cb8dc287..de57e4c47 100644
--- a/apps/web/src/components/icons/EnvelopeIcon.tsx
+++ b/apps/web/src/components/icons/EnvelopeIcon.tsx
@@ -1,10 +1,6 @@
export function EnvelopeIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/FaceSmileIcon.tsx b/apps/web/src/components/icons/FaceSmileIcon.tsx
index 92a2d5251..7c855a63e 100644
--- a/apps/web/src/components/icons/FaceSmileIcon.tsx
+++ b/apps/web/src/components/icons/FaceSmileIcon.tsx
@@ -1,10 +1,6 @@
export function FaceSmileIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/FolderIcon.tsx b/apps/web/src/components/icons/FolderIcon.tsx
index 14cf6c524..050c77bb7 100644
--- a/apps/web/src/components/icons/FolderIcon.tsx
+++ b/apps/web/src/components/icons/FolderIcon.tsx
@@ -1,10 +1,6 @@
export function FolderIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/GitHubIcon.tsx b/apps/web/src/components/icons/GitHubIcon.tsx
index fb3381a92..d212759da 100644
--- a/apps/web/src/components/icons/GitHubIcon.tsx
+++ b/apps/web/src/components/icons/GitHubIcon.tsx
@@ -1,10 +1,6 @@
export function GitHubIcon(props) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
diff --git a/apps/web/src/components/icons/LinkIcon.tsx b/apps/web/src/components/icons/LinkIcon.tsx
index 4e5753402..f77d6184a 100644
--- a/apps/web/src/components/icons/LinkIcon.tsx
+++ b/apps/web/src/components/icons/LinkIcon.tsx
@@ -1,10 +1,6 @@
export function LinkIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/ListIcon.tsx b/apps/web/src/components/icons/ListIcon.tsx
index 505af9843..69354ec06 100644
--- a/apps/web/src/components/icons/ListIcon.tsx
+++ b/apps/web/src/components/icons/ListIcon.tsx
@@ -1,10 +1,6 @@
export function ListIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/MagnifyingGlassIcon.tsx b/apps/web/src/components/icons/MagnifyingGlassIcon.tsx
index c275d873d..f7d229482 100644
--- a/apps/web/src/components/icons/MagnifyingGlassIcon.tsx
+++ b/apps/web/src/components/icons/MagnifyingGlassIcon.tsx
@@ -1,14 +1,9 @@
-export function MagnifyingGlassIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
+export function MagnifyingGlassIcon(
+ props: React.ComponentPropsWithoutRef<'svg'>
+) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
- <path
- strokeWidth="0"
- d="M2.5 8.5a6 6 0 1 1 12 0 6 6 0 0 1-12 0Z"
- />
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
+ <path strokeWidth="0" d="M2.5 8.5a6 6 0 1 1 12 0 6 6 0 0 1-12 0Z" />
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/MapPinIcon.tsx b/apps/web/src/components/icons/MapPinIcon.tsx
index e571bf3ee..6070adb13 100644
--- a/apps/web/src/components/icons/MapPinIcon.tsx
+++ b/apps/web/src/components/icons/MapPinIcon.tsx
@@ -1,10 +1,6 @@
export function MapPinIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
fillRule="evenodd"
@@ -17,12 +13,7 @@ export function MapPinIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
strokeLinejoin="round"
d="M4.5 8a5.5 5.5 0 1 1 11 0c0 3.038-5.5 9.5-5.5 9.5S4.5 11.038 4.5 8Z"
/>
- <circle
- cx="10"
- cy="8"
- r="1.5"
- fill="none"
- />
+ <circle cx="10" cy="8" r="1.5" fill="none" />
</svg>
)
}
diff --git a/apps/web/src/components/icons/PackageIcon.tsx b/apps/web/src/components/icons/PackageIcon.tsx
index 7b91bbf3a..6bd9225f5 100644
--- a/apps/web/src/components/icons/PackageIcon.tsx
+++ b/apps/web/src/components/icons/PackageIcon.tsx
@@ -1,10 +1,6 @@
export function PackageIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
d="m10 9.5-7.5-4v9l7.5 4v-9ZM10 9.5l7.5-4v9l-7.5 4v-9Z"
diff --git a/apps/web/src/components/icons/PaperAirplaneIcon.tsx b/apps/web/src/components/icons/PaperAirplaneIcon.tsx
index 9e908be4d..2c93f5bc3 100644
--- a/apps/web/src/components/icons/PaperAirplaneIcon.tsx
+++ b/apps/web/src/components/icons/PaperAirplaneIcon.tsx
@@ -1,10 +1,8 @@
-export function PaperAirplaneIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
+export function PaperAirplaneIcon(
+ props: React.ComponentPropsWithoutRef<'svg'>
+) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/PaperClipIcon.tsx b/apps/web/src/components/icons/PaperClipIcon.tsx
index 8c69df37f..db51c7f70 100644
--- a/apps/web/src/components/icons/PaperClipIcon.tsx
+++ b/apps/web/src/components/icons/PaperClipIcon.tsx
@@ -1,10 +1,6 @@
export function PaperClipIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/ShapesIcon.tsx b/apps/web/src/components/icons/ShapesIcon.tsx
index b001d0f2c..ac57a52ca 100644
--- a/apps/web/src/components/icons/ShapesIcon.tsx
+++ b/apps/web/src/components/icons/ShapesIcon.tsx
@@ -1,10 +1,6 @@
export function ShapesIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/icons/ShirtIcon.tsx b/apps/web/src/components/icons/ShirtIcon.tsx
index 77adea786..f8cdfd508 100644
--- a/apps/web/src/components/icons/ShirtIcon.tsx
+++ b/apps/web/src/components/icons/ShirtIcon.tsx
@@ -1,10 +1,6 @@
export function ShirtIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/SquaresPlusIcon.tsx b/apps/web/src/components/icons/SquaresPlusIcon.tsx
index 9517431e3..0005f59d5 100644
--- a/apps/web/src/components/icons/SquaresPlusIcon.tsx
+++ b/apps/web/src/components/icons/SquaresPlusIcon.tsx
@@ -1,10 +1,6 @@
export function SquaresPlusIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/apps/web/src/components/icons/TagIcon.tsx b/apps/web/src/components/icons/TagIcon.tsx
index e95cc0b0c..f36024143 100644
--- a/apps/web/src/components/icons/TagIcon.tsx
+++ b/apps/web/src/components/icons/TagIcon.tsx
@@ -1,10 +1,6 @@
export function TagIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
fillRule="evenodd"
@@ -17,12 +13,7 @@ export function TagIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
strokeLinejoin="round"
d="M3 3V8.69499C3 9.18447 3.19444 9.65389 3.54055 10L10 16.4594C10.7207 17.1802 11.8893 17.1802 12.61 16.4594L16.4594 12.61C17.1802 11.8893 17.1802 10.7207 16.4594 10L10 3.54055C9.65389 3.19444 9.18447 3 8.69499 3H3Z"
/>
- <circle
- cx="7"
- cy="7"
- r="1.5"
- fill="none"
- />
+ <circle cx="7" cy="7" r="1.5" fill="none" />
</svg>
)
}
diff --git a/apps/web/src/components/icons/TwitterIcon.tsx b/apps/web/src/components/icons/TwitterIcon.tsx
index 3b95a20b3..e073dc4ce 100644
--- a/apps/web/src/components/icons/TwitterIcon.tsx
+++ b/apps/web/src/components/icons/TwitterIcon.tsx
@@ -5,10 +5,7 @@ export function TwitterIcon(props) {
viewBox="0 0 1668.56 1221.19"
{...props}
>
- <g
- id="layer1"
- transform="translate(52.390088,-25.058597)"
- >
+ <g id="layer1" transform="translate(52.390088,-25.058597)">
<path
id="path1009"
d="M283.94,167.31l386.39,516.64L281.5,1104h87.51l340.42-367.76L984.48,1104h297.8L874.15,558.3l361.92-390.99
diff --git a/apps/web/src/components/icons/UserIcon.tsx b/apps/web/src/components/icons/UserIcon.tsx
index 33ec84ca9..78bb8f617 100644
--- a/apps/web/src/components/icons/UserIcon.tsx
+++ b/apps/web/src/components/icons/UserIcon.tsx
@@ -1,10 +1,6 @@
export function UserIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
fillRule="evenodd"
diff --git a/apps/web/src/components/icons/UsersIcon.tsx b/apps/web/src/components/icons/UsersIcon.tsx
index 97bfa550f..aa7d13b3d 100644
--- a/apps/web/src/components/icons/UsersIcon.tsx
+++ b/apps/web/src/components/icons/UsersIcon.tsx
@@ -1,10 +1,6 @@
export function UsersIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
- <svg
- viewBox="0 0 20 20"
- aria-hidden="true"
- {...props}
- >
+ <svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
fill="none"
strokeLinecap="round"
diff --git a/apps/web/src/components/ui/Popover.tsx b/apps/web/src/components/ui/Popover.tsx
index ce5e43fed..1903cfa79 100644
--- a/apps/web/src/components/ui/Popover.tsx
+++ b/apps/web/src/components/ui/Popover.tsx
@@ -20,7 +20,7 @@ const PopoverContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/web/src/components/ui/use-toast.ts b/apps/web/src/components/ui/use-toast.ts
index b4130ef30..6651481b2 100644
--- a/apps/web/src/components/ui/use-toast.ts
+++ b/apps/web/src/components/ui/use-toast.ts
@@ -3,10 +3,7 @@
// Inspired by react-hot-toast library
import * as React from 'react'
-import type {
- ToastActionElement,
- ToastProps,
-} from '@/components/ui/toast'
+import type { ToastActionElement, ToastProps } from '@/components/ui/toast'
const TOAST_LIMIT = 1
const TOAST_REMOVE_DELAY = 1000000
diff --git a/apps/web/src/mdx/rehype.mjs b/apps/web/src/mdx/rehype.mjs
index d1fc3327e..65588fde8 100644
--- a/apps/web/src/mdx/rehype.mjs
+++ b/apps/web/src/mdx/rehype.mjs
@@ -7,7 +7,7 @@ import shiki from 'shiki'
import { visit } from 'unist-util-visit'
function rehypeParseCodeBlocks() {
- return tree => {
+ return (tree) => {
visit(tree, 'element', (node, _nodeIndex, parentNode) => {
if (node.tagName === 'code' && node.properties.className) {
parentNode.properties.language = node.properties.className[0]?.replace(
@@ -38,7 +38,7 @@ const elements = {
token({ style, children }) {
return `<span style="${style}">${children}</span>` // no changes here
- }
+ },
}
// From Shiki
@@ -47,7 +47,7 @@ const FontStyle = {
None: 0,
Italic: 1,
Bold: 2,
- Underline: 4
+ Underline: 4,
}
// Custom implementation of renderToHtml from https://raw.githubusercontent.com/shikijs/shiki/main/packages/shiki/src/renderer.ts
@@ -58,7 +58,7 @@ function customRenderToHtml(lines, language) {
children = children.filter(Boolean)
return element({
...props,
- children: type === 'code' ? children.join('\n') : children.join('')
+ children: type === 'code' ? children.join('\n') : children.join(''),
})
}
return ''
@@ -74,11 +74,14 @@ function customRenderToHtml(lines, language) {
// Not perfect, but should work fine for now
index === 0 && // Only supported on the first line
line?.some(
- token =>
- token.content === 'import' && token.color === 'var(--shiki-token-keyword)'
+ (token) =>
+ token.content === 'import' &&
+ token.color === 'var(--shiki-token-keyword)'
) && // works fine for Python and JS
line?.some(
- token => token.content === 'e2b' && token.color === 'var(--shiki-token-text)'
+ (token) =>
+ token.content === 'e2b' &&
+ token.color === 'var(--shiki-token-text)'
) // works fine for Python and JS
) {
isE2bImport = true // TODO: Actually use, probably to dim the line
@@ -87,7 +90,7 @@ function customRenderToHtml(lines, language) {
let isHighlightComment = false
if (
line?.some(
- token =>
+ (token) =>
token.content.includes('$HighlightLine') &&
token.color === 'var(--shiki-token-comment)'
)
@@ -105,7 +108,7 @@ function customRenderToHtml(lines, language) {
// Drop the token with the comment
// TODO: Dry
line = line.filter(
- token =>
+ (token) =>
!(
token.content.includes('$HighlightLine') &&
token.color === 'var(--shiki-token-comment)'
@@ -120,7 +123,7 @@ function customRenderToHtml(lines, language) {
className: lineClasses,
lines,
line,
- index
+ index,
},
line.map((token, index) => {
const cssDeclarations = [`color: ${token.color}`]
@@ -137,14 +140,14 @@ function customRenderToHtml(lines, language) {
style: cssDeclarations.join('; '),
tokens: line,
token,
- index
+ index,
},
[escapeHtml(token.content)]
)
})
)
})
- )
+ ),
])
}
@@ -153,18 +156,19 @@ const htmlEscapes = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
- "'": '&#39;'
+ "'": '&#39;',
}
function escapeHtml(html) {
- return html.replace(/[&<>"']/g, chr => htmlEscapes[chr])
+ return html.replace(/[&<>"']/g, (chr) => htmlEscapes[chr])
}
function rehypeShiki() {
- return async tree => {
- highlighter = highlighter ?? (await shiki.getHighlighter({ theme: 'css-variables' }))
+ return async (tree) => {
+ highlighter =
+ highlighter ?? (await shiki.getHighlighter({ theme: 'css-variables' }))
- visit(tree, 'element', node => {
+ visit(tree, 'element', (node) => {
if (node.tagName === 'pre' && node.children[0]?.tagName === 'code') {
const { language } = node.properties
let codeNode = node.children[0]
@@ -188,9 +192,9 @@ function rehypeShiki() {
}
function rehypeSlugify() {
- return tree => {
+ return (tree) => {
let slugify = slugifyWithCounter()
- visit(tree, 'element', node => {
+ visit(tree, 'element', (node) => {
if (node.tagName === 'h2' && !node.properties.id) {
node.properties.id = slugify(toString(node))
}
@@ -202,7 +206,7 @@ function rehypeSlugify() {
}
function rehypeAddMDXExports(getExports) {
- return tree => {
+ return (tree) => {
let exports = Object.entries(getExports(tree))
for (let [name, value] of exports) {
@@ -223,9 +227,9 @@ function rehypeAddMDXExports(getExports) {
data: {
estree: acorn.parse(exportStr, {
sourceType: 'module',
- ecmaVersion: 'latest'
- })
- }
+ ecmaVersion: 'latest',
+ }),
+ },
})
}
}
@@ -235,7 +239,10 @@ function getSections(node) {
let sections = []
for (let child of node.children ?? []) {
- if (child.type === 'element' && (child.tagName === 'h2' || child.tagName === 'h3')) {
+ if (
+ child.type === 'element' &&
+ (child.tagName === 'h2' || child.tagName === 'h3')
+ ) {
sections.push(`{
title: ${JSON.stringify(toString(child))},
id: ${JSON.stringify(child.properties.id)},
@@ -256,8 +263,8 @@ export const rehypePlugins = [
rehypeSlugify,
[
rehypeAddMDXExports,
- tree => ({
- sections: `[${getSections(tree).join()}]`
- })
- ]
+ (tree) => ({
+ sections: `[${getSections(tree).join()}]`,
+ }),
+ ],
]
diff --git a/apps/web/src/mdx/remark.mjs b/apps/web/src/mdx/remark.mjs
index 3fa0f28da..baa93e539 100644
--- a/apps/web/src/mdx/remark.mjs
+++ b/apps/web/src/mdx/remark.mjs
@@ -9,11 +9,11 @@ import fs from 'fs'
const lang2ext = {
js: 'js',
- python: 'py'
+ python: 'py',
}
function loadFileSnippet() {
- return async tree => {
+ return async (tree) => {
const fileLoadingPromises = []
visit(tree, 'code', (node, _nodeIndex, parentNode) => {
@@ -51,17 +51,21 @@ function loadFileSnippet() {
* Depends on loadFileSnippet() to load the actual code
*/
function processCodeGroupAutoload() {
- return tree => {
- visit(tree, 'mdxJsxFlowElement', node => {
+ return (tree) => {
+ visit(tree, 'mdxJsxFlowElement', (node) => {
if (node.name !== 'CodeGroupAutoload') return // only process <CodeGroupAutoload />
const { attributes, children } = node
const attrPath = attributes.find(({ name }) => name === 'path')?.value
- if (children.length) throw new Error(`CodeGroupAutoload should not have children`)
- if (!attrPath) throw new Error(`CodeGroupAutoload should have "path" attribute`)
+ if (children.length)
+ throw new Error(`CodeGroupAutoload should not have children`)
+ if (!attrPath)
+ throw new Error(`CodeGroupAutoload should have "path" attribute`)
node.name = `CodeGroup` // rename to <CodeGroup />
for (const lang of [`js`, `python`]) {
const snippetPath = `${lang}/${attrPath}.${lang2ext[lang]}`
- const fileExists = fs.existsSync(path.resolve(`./src/code/${snippetPath}`))
+ const fileExists = fs.existsSync(
+ path.resolve(`./src/code/${snippetPath}`)
+ )
if (!fileExists) {
console.warn(
`CodeGroupAutoload: snippet "${attrPath}" does not exist for language "${lang}"`
@@ -74,9 +78,9 @@ function processCodeGroupAutoload() {
lang,
data: {
hProperties: {
- annotation: `{ language: '${lang}', snippet: '${snippetPath}' }`
- }
- }
+ annotation: `{ language: '${lang}', snippet: '${snippetPath}' }`,
+ },
+ },
})
}
})
diff --git a/apps/web/src/mdx/search.mjs b/apps/web/src/mdx/search.mjs
index b33d6b8ab..ae290fd32 100644
--- a/apps/web/src/mdx/search.mjs
+++ b/apps/web/src/mdx/search.mjs
@@ -72,10 +72,12 @@ export default function (nextConfig = {}) {
let files = glob.sync('**/*.mdx', { cwd: appDir })
// Exclude legacy docs
- files = files.filter(file => !file.includes('docs/legacy'))
+ files = files.filter((file) => !file.includes('docs/legacy'))
let data = files.map((file, index, arr) => {
- console.log(`Processing MDX file ${index + 1}/${arr.length}: ${file}`)
+ console.log(
+ `Processing MDX file ${index + 1}/${arr.length}: ${file}`
+ )
let url = '/' + file.replace(/(^|\/)page\.mdx$/, '')
let mdx = fs.readFileSync(path.join(appDir, file), 'utf8')
diff --git a/apps/web/src/styles/tailwind.css b/apps/web/src/styles/tailwind.css
index 62708c74b..e22de26b9 100644
--- a/apps/web/src/styles/tailwind.css
+++ b/apps/web/src/styles/tailwind.css
@@ -47,7 +47,7 @@
#sidebar::-webkit-scrollbar-thumb {
border-radius: 10px;
}
-
+
.supabase-auth-ui_ui-button {
@apply rounded-lg;
}
diff --git a/apps/web/src/utils/obfuscate.tsx b/apps/web/src/utils/obfuscate.tsx
index 2d45f3713..da28e9600 100644
--- a/apps/web/src/utils/obfuscate.tsx
+++ b/apps/web/src/utils/obfuscate.tsx
@@ -9,7 +9,7 @@ export function obfuscateSecret(
secret: string,
start: number = 7,
end: number = 3,
- asterisks: number = 4,
+ asterisks: number = 4
) {
if (!secret) {
// This should ideally never happen, but just in case, until we have strict mode on
diff --git a/apps/web/src/utils/promise.ts b/apps/web/src/utils/promise.ts
index 33cbaed01..78173015b 100644
--- a/apps/web/src/utils/promise.ts
+++ b/apps/web/src/utils/promise.ts
@@ -1,11 +1,11 @@
export function assertFulfilled<T>(
- item: PromiseSettledResult<T>,
+ item: PromiseSettledResult<T>
): item is PromiseFulfilledResult<T> {
return item.status === 'fulfilled'
}
export function assertRejected<T>(
- item: PromiseSettledResult<T>,
+ item: PromiseSettledResult<T>
): item is PromiseRejectedResult {
return item.status === 'rejected'
}
diff --git a/apps/web/src/utils/replaceUrls.ts b/apps/web/src/utils/replaceUrls.ts
index c3e422180..36bc2ee8d 100644
--- a/apps/web/src/utils/replaceUrls.ts
+++ b/apps/web/src/utils/replaceUrls.ts
@@ -4,17 +4,19 @@ import {
blogFramerHostname,
} from '@/app/hostnames'
-export function replaceUrls(text: string, urlPathName: string, prefix: string = '', suffix: string = ''): string {
- const pattern = suffix ? `(?<url>${prefix}https://e2b-[^${suffix}]*)/${suffix}` : `(?<url>${prefix}https://e2b-.*)/$`
+export function replaceUrls(
+ text: string,
+ urlPathName: string,
+ prefix: string = '',
+ suffix: string = ''
+): string {
+ const pattern = suffix
+ ? `(?<url>${prefix}https://e2b-[^${suffix}]*)/${suffix}`
+ : `(?<url>${prefix}https://e2b-.*)/$`
- return text.replaceAll(
- new RegExp(pattern, 'g'),
- (_, url) => url + suffix,
- )
- .replaceAll(
- `${prefix}${landingPageHostname}`,
- `${prefix}https://e2b.dev`
- )
+ return text
+ .replaceAll(new RegExp(pattern, 'g'), (_, url) => url + suffix)
+ .replaceAll(`${prefix}${landingPageHostname}`, `${prefix}https://e2b.dev`)
.replaceAll(
`${prefix}${landingPageFramerHostname}`,
`${prefix}https://e2b.dev`
@@ -27,4 +29,4 @@ export function replaceUrls(text: string, urlPathName: string, prefix: string =
? `${prefix}https://e2b.dev/blog`
: `${prefix}https://e2b.dev`
)
-}
\ No newline at end of file
+}
diff --git a/apps/web/src/utils/sitemap.ts b/apps/web/src/utils/sitemap.ts
index 562d6e1d1..c364f89c0 100644
--- a/apps/web/src/utils/sitemap.ts
+++ b/apps/web/src/utils/sitemap.ts
@@ -9,7 +9,7 @@ function nonNull<T>(value: T | null): value is T {
export function getPageForSitemap(
directory: string,
urlPrefix: string,
- priority: number,
+ priority: number
): MetadataRoute.Sitemap {
const files = getFiles(directory)
@@ -21,7 +21,7 @@ export function getPageForSitemap(
.replace(/\/page\.tsx$/, '')
if (pathname == 'page.tsx' || pathname == 'page.mdx') {
- pathname = ''
+ pathname = ''
}
const url = new URL(pathname, urlPrefix).href.replace(/\/$/, '')
diff --git a/apps/web/src/utils/useExpiringState.ts b/apps/web/src/utils/useExpiringState.ts
index dc7fbfade..52145c635 100644
--- a/apps/web/src/utils/useExpiringState.ts
+++ b/apps/web/src/utils/useExpiringState.ts
@@ -14,17 +14,17 @@ function useExpiringState({ defaultValue, timeout }) {
{
leading: false,
trailing: true,
- },
+ }
),
- [timeout, defaultValue],
+ [timeout, defaultValue]
)
const set = useCallback(
- newValue => {
+ (newValue) => {
setValue(newValue)
enqueExpiration()
},
- [enqueExpiration],
+ [enqueExpiration]
)
return [value, set]
diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json
index 40d28762a..a0cd58fb2 100644
--- a/apps/web/tsconfig.json
+++ b/apps/web/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es6",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false, // originally true
@@ -24,20 +20,10 @@
}
],
"paths": {
- "@/*": [
- "./src/*"
- ]
+ "@/*": ["./src/*"]
},
"strictNullChecks": true
},
- "include": [
- "next-env.d.ts",
- "**/*.ts",
- "**/*.tsx",
- ".next/types/**/*.ts"
- ],
- "exclude": [
- "node_modules",
- "src/code"
- ]
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules", "src/code"]
}
diff --git a/package.json b/package.json
index a60431468..c2dbbc193 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,8 @@
"rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
"pnpm-install-hack": "cd packages/js-sdk && sed -i '' 's/\"version\": \".*\"/\"version\": \"9.9.9\"/g' package.json && cd ../.. && pnpm i && git checkout -- packages/js-sdk/package.json",
"generate-sdk-reference": "pnpm --if-present --recursive run generate-sdk-reference",
- "lint": "pnpm --if-present --recursive run lint"
+ "lint": "pnpm --if-present --recursive run lint",
+ "format": "pnpm --if-present --recursive run format"
},
"packageManager": "[email protected]",
"dependencies": {
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 5407c4d6c..06df25e6b 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -39,6 +39,7 @@
"build": "tsc --noEmit --skipLibCheck && tsup --minify",
"dev": "tsup --watch",
"lint": "eslint src",
+ "format": "prettier --write src",
"test": "pnpm build && cd testground/demo-basic && ../../dist/index.js template build",
"check-deps": "knip",
"update-deps": "ncu -u && pnpm i",
diff --git a/packages/cli/src/commands/auth/configure.ts b/packages/cli/src/commands/auth/configure.ts
index c7bd2e6b3..0f2b24816 100644
--- a/packages/cli/src/commands/auth/configure.ts
+++ b/packages/cli/src/commands/auth/configure.ts
@@ -5,7 +5,12 @@ import * as e2b from 'e2b'
import * as path from 'path'
import { USER_CONFIG_PATH } from 'src/user'
-import { client, connectionConfig, ensureAccessToken, ensureUserConfig } from 'src/api'
+import {
+ client,
+ connectionConfig,
+ ensureAccessToken,
+ ensureUserConfig,
+} from 'src/api'
import { asBold, asFormattedTeam } from '../../utils/format'
import { handleE2BRequestError } from '../../utils/errors'
diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts
index e12eca174..30d444c55 100644
--- a/packages/cli/src/commands/index.ts
+++ b/packages/cli/src/commands/index.ts
@@ -8,13 +8,13 @@ import { authCommand } from './auth'
export const program = new commander.Command()
.description(
`Create sandbox templates from Dockerfiles by running ${asPrimary(
- 'e2b template build',
+ 'e2b template build'
)} then use our SDKs to create sandboxes from these templates.
Visit ${asPrimary(
- 'E2B docs (https://e2b.dev/docs)',
+ 'E2B docs (https://e2b.dev/docs)'
)} to learn how to create sandbox templates and start sandboxes.
-`,
+`
)
.addCommand(authCommand)
.addCommand(templateCommand)
diff --git a/packages/cli/src/commands/sandbox/connect.ts b/packages/cli/src/commands/sandbox/connect.ts
index 20c2c2ec7..d39b4a811 100644
--- a/packages/cli/src/commands/sandbox/connect.ts
+++ b/packages/cli/src/commands/sandbox/connect.ts
@@ -38,10 +38,10 @@ async function connectToSandbox({
const sandbox = await e2b.Sandbox.connect(sandboxID, { apiKey })
console.log(
- `Terminal connecting to sandbox ${asPrimary(`${sandbox.sandboxId}`)}`,
+ `Terminal connecting to sandbox ${asPrimary(`${sandbox.sandboxId}`)}`
)
await spawnConnectedTerminal(sandbox)
console.log(
- `Closing terminal connection to sandbox ${asPrimary(sandbox.sandboxId)}`,
+ `Closing terminal connection to sandbox ${asPrimary(sandbox.sandboxId)}`
)
}
diff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.ts
index c61909fac..a9ef6ede9 100644
--- a/packages/cli/src/commands/template/build.ts
+++ b/packages/cli/src/commands/template/build.ts
@@ -20,7 +20,10 @@ import {
withDelimiter,
} from 'src/utils/format'
import { configOption, pathOption, teamOption } from 'src/options'
-import { defaultDockerfileName, fallbackDockerfileName } from 'src/docker/constants'
+import {
+ defaultDockerfileName,
+ fallbackDockerfileName,
+} from 'src/docker/constants'
import { configName, getConfigPath, loadConfig, saveConfig } from 'src/config'
import * as child_process from 'child_process'
import { handleE2BRequestError } from '../../utils/errors'
@@ -33,10 +36,10 @@ const templateCheckInterval = 500 // 0.5 sec
export const imageUriMask = process.env.E2B_IMAGE_URI_MASK
async function getTemplateBuildLogs({
- templateID,
- buildID,
- logsOffset,
- }: {
+ templateID,
+ buildID,
+ logsOffset,
+}: {
templateID: string
buildID: string
logsOffset: number
@@ -55,7 +58,7 @@ async function getTemplateBuildLogs({
logsOffset,
},
},
- },
+ }
)
handleE2BRequestError(res, 'Error getting template build status')
@@ -63,7 +66,7 @@ async function getTemplateBuildLogs({
}
async function requestTemplateBuild(
- args: e2b.paths['/templates']['post']['requestBody']['content']['application/json'],
+ args: e2b.paths['/templates']['post']['requestBody']['content']['application/json']
) {
return await client.api.POST('/templates', {
body: args,
@@ -72,7 +75,7 @@ async function requestTemplateBuild(
async function requestTemplateRebuild(
templateID: string,
- args: e2b.paths['/templates/{templateID}']['post']['requestBody']['content']['application/json'],
+ args: e2b.paths['/templates/{templateID}']['post']['requestBody']['content']['application/json']
) {
return await client.api.POST('/templates/{templateID}', {
body: args,
@@ -123,57 +126,57 @@ async function triggerTemplateBuild(templateID: string, buildID: string) {
export const buildCommand = new commander.Command('build')
.description(
`build sandbox template defined by ${asLocalRelative(
- defaultDockerfileName,
+ defaultDockerfileName
)} or ${asLocalRelative(
- fallbackDockerfileName,
+ fallbackDockerfileName
)} in root directory. By default the root directory is the current working directory. This command also creates ${asLocal(
- configName,
- )} config.`,
+ configName
+ )} config.`
)
.argument(
'[template]',
`specify ${asBold(
- '[template]',
+ '[template]'
)} to rebuild it. If you dont's specify ${asBold(
- '[template]',
+ '[template]'
)} and there is no ${asLocal(
- 'e2b.toml',
- )} a new sandbox template will be created.`,
+ 'e2b.toml'
+ )} a new sandbox template will be created.`
)
.addOption(pathOption)
.option(
'-d, --dockerfile <file>',
`specify path to Dockerfile. By default E2B tries to find ${asLocal(
- defaultDockerfileName,
- )} or ${asLocal(fallbackDockerfileName)} in root directory.`,
+ defaultDockerfileName
+ )} or ${asLocal(fallbackDockerfileName)} in root directory.`
)
.option(
'-n, --name <template-name>',
- 'specify sandbox template name. You can use the template name to start the sandbox with SDK. The template name must be lowercase and contain only letters, numbers, dashes and underscores.',
+ 'specify sandbox template name. You can use the template name to start the sandbox with SDK. The template name must be lowercase and contain only letters, numbers, dashes and underscores.'
)
.option(
'-c, --cmd <start-command>',
- 'specify command that will be executed when the sandbox is started.',
+ 'specify command that will be executed when the sandbox is started.'
)
.option(
'--ready-cmd <ready-command>',
- 'specify command that will need to exit 0 for the template to be ready.',
+ 'specify command that will need to exit 0 for the template to be ready.'
)
.addOption(teamOption)
.addOption(configOption)
.option(
'--cpu-count <cpu-count>',
'specify the number of CPUs that will be used to run the sandbox. The default value is 2.',
- parseInt,
+ parseInt
)
.option(
'--memory-mb <memory-mb>',
'specify the amount of memory in megabytes that will be used to run the sandbox. Must be an even number. The default value is 512.',
- parseInt,
+ parseInt
)
.option(
'--build-arg <args...>',
- 'specify additional build arguments for the build command. The format should be <varname>=<value>.',
+ 'specify additional build arguments for the build command. The format should be <varname>=<value>.'
)
.option('--no-cache', 'skip cache when building the template.')
.alias('bd')
@@ -192,13 +195,13 @@ export const buildCommand = new commander.Command('build')
memoryMb?: number
buildArg?: [string]
noCache?: boolean
- },
+ }
) => {
try {
const dockerInstalled = commandExists.sync('docker')
if (!dockerInstalled) {
console.error(
- 'Docker is required to build and push the sandbox template. Please install Docker and try again.',
+ 'Docker is required to build and push the sandbox template. Please install Docker and try again.'
)
process.exit(1)
}
@@ -218,8 +221,8 @@ export const buildCommand = new commander.Command('build')
if (newName && !/[a-z0-9-_]+/.test(newName)) {
console.error(
`Name ${asLocal(
- newName,
- )} is not valid. Name can only contain lowercase letters, numbers, dashes and underscores.`,
+ newName
+ )} is not valid. Name can only contain lowercase letters, numbers, dashes and underscores.`
)
process.exit(1)
}
@@ -249,8 +252,8 @@ export const buildCommand = new commander.Command('build')
? [config.template_name]
: undefined,
},
- relativeConfigPath,
- )}`,
+ relativeConfigPath
+ )}`
)
templateID = config.template_id
dockerfile = opts.dockerfile || config.dockerfile
@@ -269,7 +272,7 @@ export const buildCommand = new commander.Command('build')
if (config && templateID && config.template_id !== templateID) {
// error: you can't specify different ID than the one in config
console.error(
- 'You can\'t specify different ID than the one in config. If you want to build a new sandbox template remove the config file.',
+ "You can't specify different ID than the one in config. If you want to build a new sandbox template remove the config file."
)
process.exit(1)
}
@@ -281,21 +284,21 @@ export const buildCommand = new commander.Command('build')
) {
console.log(
`The sandbox template name will be changed from ${asLocal(
- config.template_name,
- )} to ${asLocal(newName)}.`,
+ config.template_name
+ )} to ${asLocal(newName)}.`
)
}
const name = newName || config?.template_name
const { dockerfileContent, dockerfileRelativePath } = getDockerfile(
root,
- dockerfile,
+ dockerfile
)
console.log(
`Found ${asLocalRelative(
- dockerfileRelativePath,
- )} that will be used to build the sandbox template.`,
+ dockerfileRelativePath
+ )} that will be used to build the sandbox template.`
)
const body = {
@@ -312,8 +315,8 @@ export const buildCommand = new commander.Command('build')
if (opts.memoryMb % 2 !== 0) {
console.error(
`The memory in megabytes must be an even number. You provided ${asLocal(
- opts.memoryMb.toFixed(0),
- )}.`,
+ opts.memoryMb.toFixed(0)
+ )}.`
)
process.exit(1)
}
@@ -324,8 +327,8 @@ export const buildCommand = new commander.Command('build')
console.log(
`Requested build for the sandbox template ${asFormattedSandboxTemplate(
- template,
- )} `,
+ template
+ )} `
)
await saveConfig(
@@ -340,21 +343,21 @@ export const buildCommand = new commander.Command('build')
memory_mb: memoryMB,
team_id: teamID,
},
- true,
+ true
)
if (imageUriMask == undefined) {
try {
child_process.execSync(
- `echo "${accessToken}" | docker login docker.${connectionConfig.domain} -u _e2b_access_token --password-stdin`,
- {
- stdio: 'inherit',
- cwd: root,
- },
+ `echo "${accessToken}" | docker login docker.${connectionConfig.domain} -u _e2b_access_token --password-stdin`,
+ {
+ stdio: 'inherit',
+ cwd: root,
+ }
)
} catch (err: any) {
console.error(
- 'Docker login failed. Please try to log in with `e2b auth login` and try again.',
+ 'Docker login failed. Please try to log in with `e2b auth login` and try again.'
)
process.exit(1)
}
@@ -368,7 +371,12 @@ export const buildCommand = new commander.Command('build')
const noCache = opts.noCache ? '--no-cache' : ''
- const imageUrl = dockerImageUrl(templateID, template.buildID, connectionConfig.domain, imageUriMask)
+ const imageUrl = dockerImageUrl(
+ templateID,
+ template.buildID,
+ connectionConfig.domain,
+ imageUriMask
+ )
if (imageUriMask != undefined) {
console.log('Using custom docker image URI:', imageUrl)
}
@@ -384,7 +392,7 @@ export const buildCommand = new commander.Command('build')
].join(' ')
console.log(
- `Building docker image with the following command:\n${asBold(cmd)}\n`,
+ `Building docker image with the following command:\n${asBold(cmd)}\n`
)
child_process.execSync(cmd, {
@@ -400,8 +408,8 @@ export const buildCommand = new commander.Command('build')
const pushCmd = `docker push ${imageUrl}`
console.log(
`Pushing docker image with the following command:\n${asBold(
- pushCmd,
- )}\n`,
+ pushCmd
+ )}\n`
)
try {
child_process.execSync(pushCmd, {
@@ -414,7 +422,7 @@ export const buildCommand = new commander.Command('build')
connectionConfig,
accessToken,
template,
- root,
+ root
)
}
console.log('> Docker image pushed.\n')
@@ -424,8 +432,8 @@ export const buildCommand = new commander.Command('build')
console.log(
`> Triggered build for the sandbox template ${asFormattedSandboxTemplate(
- template,
- )} with build ID: ${template.buildID}`,
+ template
+ )} with build ID: ${template.buildID}`
)
console.log('Waiting for build to finish...')
@@ -436,13 +444,13 @@ export const buildCommand = new commander.Command('build')
console.error(err)
process.exit(1)
}
- },
+ }
)
async function waitForBuildFinish(
templateID: string,
buildID: string,
- name?: string,
+ name?: string
) {
let logsOffset = 0
@@ -462,7 +470,7 @@ async function waitForBuildFinish(
logsOffset += template.logs.length
template.logs.forEach((line) =>
- process.stdout.write(asBuildLogs(stripAnsi.default(line))),
+ process.stdout.write(asBuildLogs(stripAnsi.default(line)))
)
switch (template.status) {
@@ -487,7 +495,7 @@ const sandbox = await Sandbox.create('${
}')`)
const examplesMessage = `You can now use the template to create custom sandboxes.\nLearn more on ${asPrimary(
- 'https://e2b.dev/docs',
+ 'https://e2b.dev/docs'
)}`
const exampleHeader = boxen.default(examplesMessage, {
@@ -511,14 +519,14 @@ const sandbox = await Sandbox.create('${
const exampleUsage = `${withDelimiter(
pythonExample,
- 'Python SDK',
+ 'Python SDK'
)}\n${withDelimiter(typescriptExample, 'JS SDK', true)}`
console.log(
`\n✅ Building sandbox template ${asFormattedSandboxTemplate({
aliases,
...template,
- })} finished.\n${exampleHeader}\n${exampleUsage}\n`,
+ })} finished.\n${exampleHeader}\n${exampleUsage}\n`
)
break
}
@@ -528,8 +536,8 @@ const sandbox = await Sandbox.create('${
aliases,
...template,
})} failed.\nCheck the logs above for more details or contact us ${asPrimary(
- '(https://e2b.dev/docs/support)',
- )} to get help.\n`,
+ '(https://e2b.dev/docs/support)'
+ )} to get help.\n`
)
}
} while (template.status === 'building')
@@ -553,8 +561,8 @@ function getDockerfile(root: string, file?: string) {
if (dockerfileContent === undefined) {
throw new Error(
`No ${asLocalRelative(
- dockerfileRelativePath,
- )} found in the root directory.`,
+ dockerfileRelativePath
+ )} found in the root directory.`
)
}
@@ -595,16 +603,16 @@ function getDockerfile(root: string, file?: string) {
throw new Error(
`No ${asLocalRelative(defaultDockerfileRelativePath)} or ${asLocalRelative(
- fallbackDockerfileRelativeName,
+ fallbackDockerfileRelativeName
)} found in the root directory (${root}). You can specify a custom Dockerfile with ${asBold(
- '--dockerfile <file>',
- )} option.`,
+ '--dockerfile <file>'
+ )} option.`
)
}
async function requestBuildTemplate(
args: e2b.paths['/templates']['post']['requestBody']['content']['application/json'],
- templateID?: string,
+ templateID?: string
): Promise<
Omit<
e2b.paths['/templates']['post']['responses']['202']['content']['application/json'],
@@ -628,10 +636,17 @@ async function triggerBuild(templateID: string, buildID: string) {
return
}
-function dockerImageUrl(templateID: string, buildID: string, defaultDomain: string, imageUrlMask?: string): string {
+function dockerImageUrl(
+ templateID: string,
+ buildID: string,
+ defaultDomain: string,
+ imageUrlMask?: string
+): string {
if (imageUrlMask == undefined) {
return `docker.${defaultDomain}/e2b/custom-envs/${templateID}:${buildID}`
}
- return imageUrlMask.replaceAll('{templateID}', templateID).replaceAll('{buildID}', buildID)
-}
\ No newline at end of file
+ return imageUrlMask
+ .replaceAll('{templateID}', templateID)
+ .replaceAll('{buildID}', buildID)
+}
diff --git a/packages/cli/src/commands/template/init.ts b/packages/cli/src/commands/template/init.ts
index eac75b17a..e4a9f8f1c 100644
--- a/packages/cli/src/commands/template/init.ts
+++ b/packages/cli/src/commands/template/init.ts
@@ -11,10 +11,10 @@ import { asLocalRelative, asPrimary } from 'src/utils/format'
export const initCommand = new commander.Command('init')
.description(
`create basic E2B Dockerfile (${asLocalRelative(
- 'e2b.Dockerfile',
+ 'e2b.Dockerfile'
)}) in root directory. You can then run ${asPrimary(
- 'e2b template build',
- )} to build sandbox template from this Dockerfile`,
+ 'e2b template build'
+ )} to build sandbox template from this Dockerfile`
)
.addOption(pathOption)
.alias('it')
@@ -33,7 +33,7 @@ export const initCommand = new commander.Command('init')
if (fileExists) {
console.log(
- `Dockerfile ${asLocalRelative(relativePath)} already exists.\n`,
+ `Dockerfile ${asLocalRelative(relativePath)} already exists.\n`
)
return
}
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index 7ccda48f0..4bb96e3ba 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -10,17 +10,24 @@ export const configName = 'e2b.toml'
function getConfigHeader(config: E2BConfig) {
return `# This is a config for E2B sandbox template.
-# You can use template ID (${config.template_id}) ${config.template_name ? `or template name (${config.template_name}) ` : ''
- }to create a sandbox:
+# You can use template ID (${config.template_id}) ${
+ config.template_name ? `or template name (${config.template_name}) ` : ''
+ }to create a sandbox:
# Python SDK
# from e2b import Sandbox, AsyncSandbox
-# sandbox = Sandbox("${config.template_name || config.template_id}") # Sync sandbox
-# sandbox = await AsyncSandbox.create("${config.template_name || config.template_id}") # Async sandbox
+# sandbox = Sandbox("${
+ config.template_name || config.template_id
+ }") # Sync sandbox
+# sandbox = await AsyncSandbox.create("${
+ config.template_name || config.template_id
+ }") # Async sandbox
# JS SDK
# import { Sandbox } from 'e2b'
-# const sandbox = await Sandbox.create('${config.template_name || config.template_id}')
+# const sandbox = await Sandbox.create('${
+ config.template_name || config.template_id
+ }')
`
}
@@ -81,14 +88,14 @@ export async function loadConfig(configPath: string) {
export async function saveConfig(
configPath: string,
config: E2BConfig,
- overwrite?: boolean,
+ overwrite?: boolean
) {
try {
if (!overwrite) {
const configExists = fs.existsSync(configPath)
if (configExists) {
throw new Error(
- `Config already exists on path ${asLocalRelative(configPath)}`,
+ `Config already exists on path ${asLocalRelative(configPath)}`
)
}
}
@@ -105,8 +112,8 @@ export async function saveConfig(
{
templateID: config.template_id,
},
- configPath,
- )} cannot be saved: ${err.message}`,
+ configPath
+ )} cannot be saved: ${err.message}`
)
}
}
diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts
index 2354b8bc3..d93d13f68 100644
--- a/packages/cli/src/index.ts
+++ b/packages/cli/src/index.ts
@@ -10,9 +10,8 @@ export const pkg = packageJSON
updateNotifier({
pkg,
- updateCheckInterval:1000 * 60 * 60 * 8, // 8 hours
-})
- .notify()
+ updateCheckInterval: 1000 * 60 * 60 * 8, // 8 hours
+}).notify()
const prog = program.version(
packageJSON.version,
diff --git a/packages/cli/src/options.ts b/packages/cli/src/options.ts
index 9cd36378f..1c259494e 100644
--- a/packages/cli/src/options.ts
+++ b/packages/cli/src/options.ts
@@ -5,28 +5,28 @@ import { asBold } from './utils/format'
export const pathOption = new commander.Option(
'-p, --path <path>',
`change root directory where command is executed to ${asBold(
- '<path>',
- )} directory`,
+ '<path>'
+ )} directory`
)
export const configOption = new commander.Option(
'--config <e2b-toml>',
`specify path to the E2B config toml. By default E2B tries to find ${asBold(
- './e2b.toml',
- )} in root directory.`,
+ './e2b.toml'
+ )} in root directory.`
)
export const selectOption = new commander.Option(
'-s, --select',
- 'select multiple sandbox templates from interactive list',
+ 'select multiple sandbox templates from interactive list'
)
export const selectMultipleOption = new commander.Option(
'-s, --select',
- 'select sandbox template from interactive list',
+ 'select sandbox template from interactive list'
)
export const teamOption = new commander.Option(
'-t, --team <team-id>',
- 'specify the team ID that the operation will be associated with. You can find team ID in the team settings in the E2B dashboard (https://e2b.dev/dashboard?tab=team).',
+ 'specify the team ID that the operation will be associated with. You can find team ID in the team settings in the E2B dashboard (https://e2b.dev/dashboard?tab=team).'
)
diff --git a/packages/cli/src/utils/errors.ts b/packages/cli/src/utils/errors.ts
index f8ece7b3e..dcb6dc51c 100644
--- a/packages/cli/src/utils/errors.ts
+++ b/packages/cli/src/utils/errors.ts
@@ -11,8 +11,11 @@ export class E2BRequestError extends Error {
}
export function handleE2BRequestError<T>(
- res: { data?: T | null | undefined; error?: { code: number; message: string } },
- errMsg?: string,
+ res: {
+ data?: T | null | undefined
+ error?: { code: number; message: string }
+ },
+ errMsg?: string
): asserts res is { data: T; error?: undefined } {
if (!res.error) {
return
@@ -44,6 +47,6 @@ export function handleE2BRequestError<T>(
throw new E2BRequestError(
`${errMsg && `${errMsg}: `}[${code}] ${message && `${message}: `}${
res.error?.message ?? 'no message'
- }`,
+ }`
)
}
diff --git a/packages/cli/src/utils/templatePrompt.ts b/packages/cli/src/utils/templatePrompt.ts
index 8126afcfa..7e14d5ff0 100644
--- a/packages/cli/src/utils/templatePrompt.ts
+++ b/packages/cli/src/utils/templatePrompt.ts
@@ -5,7 +5,7 @@ import { asFormattedSandboxTemplate } from 'src/utils/format'
export async function getPromptTemplates(
templates: e2b.components['schemas']['Template'][],
- text: string,
+ text: string
) {
const inquirer = await import('inquirer')
const templatesAnwsers = await inquirer.default.prompt([
diff --git a/packages/cli/src/utils/templateSort.ts b/packages/cli/src/utils/templateSort.ts
index 17dfd2f1f..0dc0d37ef 100644
--- a/packages/cli/src/utils/templateSort.ts
+++ b/packages/cli/src/utils/templateSort.ts
@@ -1,7 +1,7 @@
import * as sdk from 'e2b'
export function sortTemplatesAliases<
- E extends sdk.components['schemas']['Template']['aliases'],
+ E extends sdk.components['schemas']['Template']['aliases']
>(aliases: E) {
aliases?.sort()
}
diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json
index 6d3b4e5b1..101054611 100644
--- a/packages/js-sdk/package.json
+++ b/packages/js-sdk/package.json
@@ -28,7 +28,7 @@
"dev": "tsup --watch",
"example": "tsx example.mts",
"test": "vitest run",
- "generate": "npm-run-all generate:*",
+ "generate": "npm-run-all generate:* && pnpm run format",
"generate:api": "python ./../../spec/remove_extra_tags.py sandboxes templates auth && openapi-typescript ../../spec/openapi_generated.yml -x api_key --array-length --alphabetize --output src/api/schema.gen.ts",
"generate:envd": "cd ../../spec/envd && buf generate --template buf-js.gen.yaml\n",
"generate:envd-api": "openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts",
@@ -39,7 +39,8 @@
"test:bun": "bun test tests/runtimes/bun --env-file=.env",
"test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks",
"test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**",
- "lint": "eslint src/ tests/"
+ "lint": "eslint src/ tests/",
+ "format": "prettier --write src/ tests/ example.mts"
},
"devDependencies": {
"@testing-library/react": "^16.2.0",
diff --git a/packages/js-sdk/src/api/metadata.ts b/packages/js-sdk/src/api/metadata.ts
index b60b56367..9dbc71296 100644
--- a/packages/js-sdk/src/api/metadata.ts
+++ b/packages/js-sdk/src/api/metadata.ts
@@ -6,7 +6,14 @@ export { version }
declare let window: any
-type Runtime = 'node' | 'browser' | 'deno' | 'bun' | 'vercel-edge' | 'cloudflare-worker' | 'unknown'
+type Runtime =
+ | 'node'
+ | 'browser'
+ | 'deno'
+ | 'bun'
+ | 'vercel-edge'
+ | 'cloudflare-worker'
+ | 'unknown'
function getRuntime(): { runtime: Runtime; version: string } {
// @ts-ignore
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 966492759..70af68acd 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -4,1647 +4,1647 @@
*/
export interface paths {
- "/sandboxes": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description List all running sandboxes */
- get: {
- parameters: {
- query?: {
- /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
- metadata?: string;
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned all running sandboxes */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["ListedSandbox"][];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- /** @description Create a sandbox from the template */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["NewSandbox"];
- };
- };
- responses: {
- /** @description The sandbox was created successfully */
- 201: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Sandbox"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get a sandbox by id */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned the sandbox */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["SandboxDetail"];
- };
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- /** @description Kill a sandbox */
- delete: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The sandbox was killed successfully */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/logs": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get sandbox logs */
- get: {
- parameters: {
- query?: {
- /** @description Maximum number of logs that should be returned */
- limit?: number;
- /** @description Starting timestamp of the logs that should be returned in milliseconds */
- start?: number;
- };
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned the sandbox logs */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["SandboxLogs"];
- };
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/metrics": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get sandbox metrics */
- get: {
- parameters: {
- query?: {
- end?: number;
- /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
- start?: number;
- };
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned the sandbox metrics */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["SandboxMetric"][];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/pause": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Pause the sandbox */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The sandbox was paused successfully and can be resumed */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 409: components["responses"]["409"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/refreshes": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Refresh the sandbox extending its time to live */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: {
- content: {
- "application/json": {
- /** @description Duration for which the sandbox should be kept alive in seconds */
- duration?: number;
- };
- };
- };
- responses: {
- /** @description Successfully refreshed the sandbox */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/resume": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Resume the sandbox */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["ResumedSandbox"];
- };
- };
- responses: {
- /** @description The sandbox was resumed successfully */
- 201: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Sandbox"];
- };
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 409: components["responses"]["409"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/{sandboxID}/timeout": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- sandboxID: components["parameters"]["sandboxID"];
- };
- cookie?: never;
- };
- requestBody?: {
- content: {
- "application/json": {
- /**
- * Format: int32
- * @description Timeout in seconds from the current time after which the sandbox should expire
- */
- timeout: number;
- };
- };
- };
- responses: {
- /** @description Successfully set the sandbox timeout */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/sandboxes/metrics": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description List metrics for given sandboxes */
- get: {
- parameters: {
- query: {
- /** @description Comma-separated list of sandbox IDs to get metrics for */
- sandbox_ids: string[];
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned all running sandboxes with metrics */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["SandboxesWithMetrics"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/teams": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description List all teams */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned all teams */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Team"][];
- };
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/teams/{teamID}/metrics": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get metrics for the team */
- get: {
- parameters: {
- query?: {
- end?: number;
- /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
- start?: number;
- };
- header?: never;
- path: {
- teamID: components["parameters"]["teamID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned the team metrics */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TeamMetric"][];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 403: components["responses"]["403"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/templates": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description List all templates */
- get: {
- parameters: {
- query?: {
- teamID?: string;
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned all templates */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Template"][];
- };
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- /** @description Create a new template */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequest"];
- };
- };
- responses: {
- /** @description The build was accepted */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Template"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/templates/{templateID}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Rebuild an template */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequest"];
- };
- };
- responses: {
- /** @description The build was accepted */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Template"];
- };
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- /** @description Delete a template */
- delete: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The template was deleted successfully */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- options?: never;
- head?: never;
- /** @description Update template */
- patch: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateUpdateRequest"];
- };
- };
- responses: {
- /** @description The template was updated successfully */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- trace?: never;
- };
- "/templates/{templateID}/builds/{buildID}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Start the build */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- buildID: components["parameters"]["buildID"];
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The build has started */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/templates/{templateID}/builds/{buildID}/status": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get template build info */
- get: {
- parameters: {
- query?: {
- level?: components["schemas"]["LogLevel"];
- /** @description Index of the starting build log that should be returned with the template */
- logsOffset?: number;
- };
- header?: never;
- path: {
- buildID: components["parameters"]["buildID"];
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned the template */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TemplateBuild"];
- };
- };
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/templates/{templateID}/files/{hash}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description Get an upload link for a tar file containing build layer files */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- hash: string;
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The upload link where to upload the tar file */
- 201: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TemplateBuildFileUpload"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 404: components["responses"]["404"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/v2/sandboxes": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** @description List all sandboxes */
- get: {
- parameters: {
- query?: {
- /** @description Maximum number of items to return per page */
- limit?: number;
- /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
- metadata?: string;
- /** @description Cursor to start the list from */
- nextToken?: string;
- /** @description Filter sandboxes by one or more states */
- state?: components["schemas"]["SandboxState"][];
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully returned all running sandboxes */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["ListedSandbox"][];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/v2/templates": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Create a new template */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequestV2"];
- };
- };
- responses: {
- /** @description The build was requested successfully */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Template"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/v2/templates/{templateID}/builds/{buildID}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** @description Start the build */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- buildID: components["parameters"]["buildID"];
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildStartV2"];
- };
- };
- responses: {
- /** @description The build has started */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
-}
-export type webhooks = Record<string, never>;
-export interface components {
- schemas: {
- BuildLogEntry: {
- level: components["schemas"]["LogLevel"];
- /** @description Log message content */
- message: string;
- /**
- * Format: date-time
- * @description Timestamp of the log entry
- */
- timestamp: string;
- };
- BuildStatusReason: {
- /** @description Message with the status reason, currently reporting only for error status */
- message: string;
- /** @description Step that failed */
- step?: string;
- };
- /**
- * Format: int32
- * @description CPU cores for the sandbox
- */
- CPUCount: number;
- CreatedAccessToken: {
- /**
- * Format: date-time
- * @description Timestamp of access token creation
- */
- createdAt: string;
- /**
- * Format: uuid
- * @description Identifier of the access token
- */
- id: string;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the access token */
- name: string;
- /** @description The fully created access token */
- token: string;
- };
- CreatedTeamAPIKey: {
- /**
- * Format: date-time
- * @description Timestamp of API key creation
- */
- createdAt: string;
- createdBy?: components["schemas"]["TeamUser"] | null;
- /**
- * Format: uuid
- * @description Identifier of the API key
- */
- id: string;
- /** @description Raw value of the API key */
- key: string;
- /**
- * Format: date-time
- * @description Last time this API key was used
- */
- lastUsed?: string | null;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the API key */
- name: string;
- };
- DiskMetrics: {
- /** @description Device name */
- device: string;
- /** @description Filesystem type (e.g., ext4, xfs) */
- filesystemType: string;
- /** @description Mount point of the disk */
- mountPoint: string;
- /**
- * Format: uint64
- * @description Total space in bytes
- */
- totalBytes: number;
- /**
- * Format: uint64
- * @description Used space in bytes
- */
- usedBytes: number;
- };
- /**
- * Format: int32
- * @description Disk size for the sandbox in MiB
- */
- DiskSizeMB: number;
- /** @description Version of the envd running in the sandbox */
- EnvdVersion: string;
- EnvVars: {
- [key: string]: string;
- };
- Error: {
- /**
- * Format: int32
- * @description Error code
- */
- code: number;
- /** @description Error */
- message: string;
- };
- IdentifierMaskingDetails: {
- /** @description Prefix used in masked version of the token or key */
- maskedValuePrefix: string;
- /** @description Suffix used in masked version of the token or key */
- maskedValueSuffix: string;
- /** @description Prefix that identifies the token or key type */
- prefix: string;
- /** @description Length of the token or key */
- valueLength: number;
- };
- ListedSandbox: {
- /** @description Alias of the template */
- alias?: string;
- /**
- * @deprecated
- * @description Identifier of the client
- */
- clientID: string;
- cpuCount: components["schemas"]["CPUCount"];
- diskSizeMB: components["schemas"]["DiskSizeMB"];
- /**
- * Format: date-time
- * @description Time when the sandbox will expire
- */
- endAt: string;
- envdVersion: components["schemas"]["EnvdVersion"];
- memoryMB: components["schemas"]["MemoryMB"];
- metadata?: components["schemas"]["SandboxMetadata"];
- /** @description Identifier of the sandbox */
- sandboxID: string;
- /**
- * Format: date-time
- * @description Time when the sandbox was started
- */
- startedAt: string;
- state: components["schemas"]["SandboxState"];
- /** @description Identifier of the template from which is the sandbox created */
- templateID: string;
- };
- /**
- * @description State of the sandbox
- * @enum {string}
- */
- LogLevel: "debug" | "info" | "warn" | "error";
- /**
- * Format: int32
- * @description Memory for the sandbox in MiB
- */
- MemoryMB: number;
- NewAccessToken: {
- /** @description Name of the access token */
- name: string;
- };
- NewSandbox: {
- /** @description Allow sandbox to access the internet */
- allow_internet_access?: boolean;
- /**
- * @description Automatically pauses the sandbox after the timeout
- * @default false
- */
- autoPause: boolean;
- envVars?: components["schemas"]["EnvVars"];
- metadata?: components["schemas"]["SandboxMetadata"];
- /** @description Secure all system communication with sandbox */
- secure?: boolean;
- /** @description Identifier of the required template */
- templateID: string;
- /**
- * Format: int32
- * @description Time to live for the sandbox in seconds.
- * @default 15
- */
- timeout: number;
- };
- NewTeamAPIKey: {
- /** @description Name of the API key */
- name: string;
- };
- Node: {
- /** @description Identifier of the cluster */
- clusterID: string;
- /** @description Commit of the orchestrator */
- commit: string;
- /**
- * Format: uint64
- * @description Number of sandbox create fails
- */
- createFails: number;
- /**
- * Format: uint64
- * @description Number of sandbox create successes
- */
- createSuccesses: number;
- metrics: components["schemas"]["NodeMetrics"];
- /** @description Identifier of the node */
- nodeID: string;
- /**
- * Format: uint32
- * @description Number of sandboxes running on the node
- */
- sandboxCount: number;
- /**
- * Format: int
- * @description Number of starting Sandboxes
- */
- sandboxStartingCount: number;
- status: components["schemas"]["NodeStatus"];
- /** @description Version of the orchestrator */
- version: string;
- };
- NodeDetail: {
- /** @description List of cached builds id on the node */
- cachedBuilds: string[];
- /** @description Identifier of the cluster */
- clusterID: string;
- /** @description Commit of the orchestrator */
- commit: string;
- /**
- * Format: uint64
- * @description Number of sandbox create fails
- */
- createFails: number;
- /**
- * Format: uint64
- * @description Number of sandbox create successes
- */
- createSuccesses: number;
- metrics: components["schemas"]["NodeMetrics"];
- /** @description Identifier of the node */
- nodeID: string;
- /** @description List of sandboxes running on the node */
- sandboxes: components["schemas"]["ListedSandbox"][];
- status: components["schemas"]["NodeStatus"];
- /** @description Version of the orchestrator */
- version: string;
- };
- /** @description Node metrics */
- NodeMetrics: {
- /**
- * Format: uint32
- * @description Number of allocated CPU cores
- */
- allocatedCPU: number;
- /**
- * Format: uint64
- * @description Amount of allocated memory in bytes
- */
- allocatedMemoryBytes: number;
- /**
- * Format: uint32
- * @description Total number of CPU cores on the node
- */
- cpuCount: number;
- /**
- * Format: uint32
- * @description Node CPU usage percentage
- */
- cpuPercent: number;
- /** @description Detailed metrics for each disk/mount point */
- disks: components["schemas"]["DiskMetrics"][];
- /**
- * Format: uint64
- * @description Total node memory in bytes
- */
- memoryTotalBytes: number;
- /**
- * Format: uint64
- * @description Node memory used in bytes
- */
- memoryUsedBytes: number;
- };
- /**
- * @description Status of the node
- * @enum {string}
- */
- NodeStatus: "ready" | "draining" | "connecting" | "unhealthy";
- NodeStatusChange: {
- status: components["schemas"]["NodeStatus"];
- };
- ResumedSandbox: {
- /**
- * @deprecated
- * @description Automatically pauses the sandbox after the timeout
- * @default false
- */
- autoPause: boolean;
- /**
- * Format: int32
- * @description Time to live for the sandbox in seconds.
- * @default 15
- */
- timeout: number;
- };
- Sandbox: {
- /** @description Alias of the template */
- alias?: string;
- /**
- * @deprecated
- * @description Identifier of the client
- */
- clientID: string;
- /** @description Base domain where the sandbox traffic is accessible */
- domain?: string | null;
- /** @description Access token used for envd communication */
- envdAccessToken?: string;
- envdVersion: components["schemas"]["EnvdVersion"];
- /** @description Identifier of the sandbox */
- sandboxID: string;
- /** @description Identifier of the template from which is the sandbox created */
- templateID: string;
- };
- SandboxDetail: {
- /** @description Alias of the template */
- alias?: string;
- /**
- * @deprecated
- * @description Identifier of the client
- */
- clientID: string;
- cpuCount: components["schemas"]["CPUCount"];
- diskSizeMB: components["schemas"]["DiskSizeMB"];
- /** @description Base domain where the sandbox traffic is accessible */
- domain?: string | null;
- /**
- * Format: date-time
- * @description Time when the sandbox will expire
- */
- endAt: string;
- /** @description Access token used for envd communication */
- envdAccessToken?: string;
- envdVersion: components["schemas"]["EnvdVersion"];
- memoryMB: components["schemas"]["MemoryMB"];
- metadata?: components["schemas"]["SandboxMetadata"];
- /** @description Identifier of the sandbox */
- sandboxID: string;
- /**
- * Format: date-time
- * @description Time when the sandbox was started
- */
- startedAt: string;
- state: components["schemas"]["SandboxState"];
- /** @description Identifier of the template from which is the sandbox created */
- templateID: string;
- };
- SandboxesWithMetrics: {
- sandboxes: {
- [key: string]: components["schemas"]["SandboxMetric"];
- };
- };
- /** @description Log entry with timestamp and line */
- SandboxLog: {
- /** @description Log line content */
- line: string;
- /**
- * Format: date-time
- * @description Timestamp of the log entry
- */
- timestamp: string;
- };
- SandboxLogEntry: {
- fields: {
- [key: string]: string;
- };
- level: components["schemas"]["LogLevel"];
- /** @description Log message content */
- message: string;
- /**
- * Format: date-time
- * @description Timestamp of the log entry
- */
- timestamp: string;
- };
- SandboxLogs: {
- /** @description Structured logs of the sandbox */
- logEntries: components["schemas"]["SandboxLogEntry"][];
- /** @description Logs of the sandbox */
- logs: components["schemas"]["SandboxLog"][];
- };
- SandboxMetadata: {
- [key: string]: string;
- };
- /** @description Metric entry with timestamp and line */
- SandboxMetric: {
- /**
- * Format: int32
- * @description Number of CPU cores
- */
- cpuCount: number;
- /**
- * Format: float
- * @description CPU usage percentage
- */
- cpuUsedPct: number;
- /**
- * Format: int64
- * @description Total disk space in bytes
- */
- diskTotal: number;
- /**
- * Format: int64
- * @description Disk used in bytes
- */
- diskUsed: number;
- /**
- * Format: int64
- * @description Total memory in bytes
- */
- memTotal: number;
- /**
- * Format: int64
- * @description Memory used in bytes
- */
- memUsed: number;
- /**
- * Format: date-time
- * @description Timestamp of the metric entry
- */
- timestamp: string;
- };
- /**
- * @description State of the sandbox
- * @enum {string}
- */
- SandboxState: "running" | "paused";
- Team: {
- /** @description API key for the team */
- apiKey: string;
- /** @description Whether the team is the default team */
- isDefault: boolean;
- /** @description Name of the team */
- name: string;
- /** @description Identifier of the team */
- teamID: string;
- };
- TeamAPIKey: {
- /**
- * Format: date-time
- * @description Timestamp of API key creation
- */
- createdAt: string;
- createdBy?: components["schemas"]["TeamUser"] | null;
- /**
- * Format: uuid
- * @description Identifier of the API key
- */
- id: string;
- /**
- * Format: date-time
- * @description Last time this API key was used
- */
- lastUsed?: string | null;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the API key */
- name: string;
- };
- /** @description Team metric with timestamp */
- TeamMetric: {
- /**
- * Format: int32
- * @description The number of concurrent sandboxes for the team
- */
- concurrentSandboxes: number;
- /**
- * Format: float
- * @description Number of sandboxes started per second
- */
- sandboxStartRate: number;
- /**
- * Format: date-time
- * @description Timestamp of the metric entry
- */
- timestamp: string;
- };
- TeamUser: {
- /** @description Email of the user */
- email: string;
- /**
- * Format: uuid
- * @description Identifier of the user
- */
- id: string;
- };
- Template: {
- /** @description Aliases of the template */
- aliases?: string[];
+ '/sandboxes': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description List all running sandboxes */
+ get: {
+ parameters: {
+ query?: {
+ /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
+ metadata?: string
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned all running sandboxes */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['ListedSandbox'][]
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ /** @description Create a sandbox from the template */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['NewSandbox']
+ }
+ }
+ responses: {
+ /** @description The sandbox was created successfully */
+ 201: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Sandbox']
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get a sandbox by id */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned the sandbox */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['SandboxDetail']
+ }
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ /** @description Kill a sandbox */
+ delete: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The sandbox was killed successfully */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/logs': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get sandbox logs */
+ get: {
+ parameters: {
+ query?: {
+ /** @description Maximum number of logs that should be returned */
+ limit?: number
+ /** @description Starting timestamp of the logs that should be returned in milliseconds */
+ start?: number
+ }
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned the sandbox logs */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['SandboxLogs']
+ }
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/metrics': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get sandbox metrics */
+ get: {
+ parameters: {
+ query?: {
+ end?: number
+ /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
+ start?: number
+ }
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned the sandbox metrics */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['SandboxMetric'][]
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/pause': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Pause the sandbox */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The sandbox was paused successfully and can be resumed */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 409: components['responses']['409']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/refreshes': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Refresh the sandbox extending its time to live */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: {
+ content: {
+ 'application/json': {
+ /** @description Duration for which the sandbox should be kept alive in seconds */
+ duration?: number
+ }
+ }
+ }
+ responses: {
+ /** @description Successfully refreshed the sandbox */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/resume': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Resume the sandbox */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['ResumedSandbox']
+ }
+ }
+ responses: {
+ /** @description The sandbox was resumed successfully */
+ 201: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Sandbox']
+ }
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 409: components['responses']['409']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/{sandboxID}/timeout': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ sandboxID: components['parameters']['sandboxID']
+ }
+ cookie?: never
+ }
+ requestBody?: {
+ content: {
+ 'application/json': {
/**
* Format: int32
- * @description Number of times the template was built
- */
- buildCount: number;
- /** @description Identifier of the last successful build for given template */
- buildID: string;
- cpuCount: components["schemas"]["CPUCount"];
- /**
- * Format: date-time
- * @description Time when the template was created
- */
- createdAt: string;
- createdBy: components["schemas"]["TeamUser"] | null;
- diskSizeMB: components["schemas"]["DiskSizeMB"];
- envdVersion: components["schemas"]["EnvdVersion"];
- /**
- * Format: date-time
- * @description Time when the template was last used
- */
- lastSpawnedAt: string;
- memoryMB: components["schemas"]["MemoryMB"];
- /** @description Whether the template is public or only accessible by the team */
- public: boolean;
- /**
- * Format: int64
- * @description Number of times the template was used
- */
- spawnCount: number;
- /** @description Identifier of the template */
- templateID: string;
- /**
- * Format: date-time
- * @description Time when the template was last updated
- */
- updatedAt: string;
- };
- TemplateBuild: {
- /** @description Identifier of the build */
- buildID: string;
- /**
- * @description Build logs structured
- * @default []
- */
- logEntries: components["schemas"]["BuildLogEntry"][];
- /**
- * @description Build logs
- * @default []
- */
- logs: string[];
- reason?: components["schemas"]["BuildStatusReason"];
- /**
- * @description Status of the template
- * @enum {string}
- */
- status: "building" | "waiting" | "ready" | "error";
- /** @description Identifier of the template */
- templateID: string;
- };
- TemplateBuildFileUpload: {
- /** @description Whether the file is already present in the cache */
- present: boolean;
- /** @description Url where the file should be uploaded to */
- url?: string;
- };
- TemplateBuildRequest: {
- /** @description Alias of the template */
- alias?: string;
- cpuCount?: components["schemas"]["CPUCount"];
- /** @description Dockerfile for the template */
- dockerfile: string;
- memoryMB?: components["schemas"]["MemoryMB"];
- /** @description Ready check command to execute in the template after the build */
- readyCmd?: string;
- /** @description Start command to execute in the template after the build */
- startCmd?: string;
- /** @description Identifier of the team */
- teamID?: string;
- };
- TemplateBuildRequestV2: {
- /** @description Alias of the template */
- alias: string;
- cpuCount?: components["schemas"]["CPUCount"];
- memoryMB?: components["schemas"]["MemoryMB"];
- /** @description Identifier of the team */
- teamID?: string;
- };
- TemplateBuildStartV2: {
- /**
- * @description Whether the whole build should be forced to run regardless of the cache
- * @default false
+ * @description Timeout in seconds from the current time after which the sandbox should expire
*/
- force: boolean;
- /** @description Image to use as a base for the template build */
- fromImage?: string;
- /** @description Template to use as a base for the template build */
- fromTemplate?: string;
- /** @description Ready check command to execute in the template after the build */
- readyCmd?: string;
- /** @description Start command to execute in the template after the build */
- startCmd?: string;
- /**
- * @description List of steps to execute in the template build
- * @default []
- */
- steps: components["schemas"]["TemplateStep"][];
- };
- /** @description Step in the template build process */
- TemplateStep: {
- /**
- * @description Arguments for the step
- * @default []
- */
- args: string[];
- /** @description Hash of the files used in the step */
- filesHash?: string;
- /**
- * @description Whether the step should be forced to run regardless of the cache
- * @default false
- */
- force: boolean;
- /** @description Type of the step */
- type: string;
- };
- TemplateUpdateRequest: {
- /** @description Whether the template is public or only accessible by the team */
- public?: boolean;
- };
- UpdateTeamAPIKey: {
- /** @description New name for the API key */
- name: string;
- };
- };
- responses: {
- /** @description Bad request */
- 400: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Authentication error */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Not found */
- 404: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Conflict */
- 409: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Server error */
- 500: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- };
+ timeout: number
+ }
+ }
+ }
+ responses: {
+ /** @description Successfully set the sandbox timeout */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/sandboxes/metrics': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description List metrics for given sandboxes */
+ get: {
+ parameters: {
+ query: {
+ /** @description Comma-separated list of sandbox IDs to get metrics for */
+ sandbox_ids: string[]
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned all running sandboxes with metrics */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['SandboxesWithMetrics']
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/teams': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description List all teams */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned all teams */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Team'][]
+ }
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/teams/{teamID}/metrics': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get metrics for the team */
+ get: {
+ parameters: {
+ query?: {
+ end?: number
+ /** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
+ start?: number
+ }
+ header?: never
+ path: {
+ teamID: components['parameters']['teamID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned the team metrics */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['TeamMetric'][]
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 403: components['responses']['403']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/templates': {
parameters: {
- accessTokenID: string;
- apiKeyID: string;
- buildID: string;
- nodeID: string;
- sandboxID: string;
- teamID: string;
- templateID: string;
- };
- requestBodies: never;
- headers: never;
- pathItems: never;
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description List all templates */
+ get: {
+ parameters: {
+ query?: {
+ teamID?: string
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned all templates */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Template'][]
+ }
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ /** @description Create a new template */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['TemplateBuildRequest']
+ }
+ }
+ responses: {
+ /** @description The build was accepted */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Template']
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/templates/{templateID}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Rebuild an template */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['TemplateBuildRequest']
+ }
+ }
+ responses: {
+ /** @description The build was accepted */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Template']
+ }
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ /** @description Delete a template */
+ delete: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The template was deleted successfully */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ options?: never
+ head?: never
+ /** @description Update template */
+ patch: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['TemplateUpdateRequest']
+ }
+ }
+ responses: {
+ /** @description The template was updated successfully */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ trace?: never
+ }
+ '/templates/{templateID}/builds/{buildID}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Start the build */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ buildID: components['parameters']['buildID']
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The build has started */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/templates/{templateID}/builds/{buildID}/status': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get template build info */
+ get: {
+ parameters: {
+ query?: {
+ level?: components['schemas']['LogLevel']
+ /** @description Index of the starting build log that should be returned with the template */
+ logsOffset?: number
+ }
+ header?: never
+ path: {
+ buildID: components['parameters']['buildID']
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned the template */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['TemplateBuild']
+ }
+ }
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/templates/{templateID}/files/{hash}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description Get an upload link for a tar file containing build layer files */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ hash: string
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The upload link where to upload the tar file */
+ 201: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['TemplateBuildFileUpload']
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 404: components['responses']['404']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/v2/sandboxes': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** @description List all sandboxes */
+ get: {
+ parameters: {
+ query?: {
+ /** @description Maximum number of items to return per page */
+ limit?: number
+ /** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
+ metadata?: string
+ /** @description Cursor to start the list from */
+ nextToken?: string
+ /** @description Filter sandboxes by one or more states */
+ state?: components['schemas']['SandboxState'][]
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Successfully returned all running sandboxes */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['ListedSandbox'][]
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/v2/templates': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Create a new template */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['TemplateBuildRequestV2']
+ }
+ }
+ responses: {
+ /** @description The build was requested successfully */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Template']
+ }
+ }
+ 400: components['responses']['400']
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/v2/templates/{templateID}/builds/{buildID}': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** @description Start the build */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ buildID: components['parameters']['buildID']
+ templateID: components['parameters']['templateID']
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['TemplateBuildStartV2']
+ }
+ }
+ responses: {
+ /** @description The build has started */
+ 202: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ 401: components['responses']['401']
+ 500: components['responses']['500']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+}
+export type webhooks = Record<string, never>
+export interface components {
+ schemas: {
+ BuildLogEntry: {
+ level: components['schemas']['LogLevel']
+ /** @description Log message content */
+ message: string
+ /**
+ * Format: date-time
+ * @description Timestamp of the log entry
+ */
+ timestamp: string
+ }
+ BuildStatusReason: {
+ /** @description Message with the status reason, currently reporting only for error status */
+ message: string
+ /** @description Step that failed */
+ step?: string
+ }
+ /**
+ * Format: int32
+ * @description CPU cores for the sandbox
+ */
+ CPUCount: number
+ CreatedAccessToken: {
+ /**
+ * Format: date-time
+ * @description Timestamp of access token creation
+ */
+ createdAt: string
+ /**
+ * Format: uuid
+ * @description Identifier of the access token
+ */
+ id: string
+ mask: components['schemas']['IdentifierMaskingDetails']
+ /** @description Name of the access token */
+ name: string
+ /** @description The fully created access token */
+ token: string
+ }
+ CreatedTeamAPIKey: {
+ /**
+ * Format: date-time
+ * @description Timestamp of API key creation
+ */
+ createdAt: string
+ createdBy?: components['schemas']['TeamUser'] | null
+ /**
+ * Format: uuid
+ * @description Identifier of the API key
+ */
+ id: string
+ /** @description Raw value of the API key */
+ key: string
+ /**
+ * Format: date-time
+ * @description Last time this API key was used
+ */
+ lastUsed?: string | null
+ mask: components['schemas']['IdentifierMaskingDetails']
+ /** @description Name of the API key */
+ name: string
+ }
+ DiskMetrics: {
+ /** @description Device name */
+ device: string
+ /** @description Filesystem type (e.g., ext4, xfs) */
+ filesystemType: string
+ /** @description Mount point of the disk */
+ mountPoint: string
+ /**
+ * Format: uint64
+ * @description Total space in bytes
+ */
+ totalBytes: number
+ /**
+ * Format: uint64
+ * @description Used space in bytes
+ */
+ usedBytes: number
+ }
+ /**
+ * Format: int32
+ * @description Disk size for the sandbox in MiB
+ */
+ DiskSizeMB: number
+ /** @description Version of the envd running in the sandbox */
+ EnvdVersion: string
+ EnvVars: {
+ [key: string]: string
+ }
+ Error: {
+ /**
+ * Format: int32
+ * @description Error code
+ */
+ code: number
+ /** @description Error */
+ message: string
+ }
+ IdentifierMaskingDetails: {
+ /** @description Prefix used in masked version of the token or key */
+ maskedValuePrefix: string
+ /** @description Suffix used in masked version of the token or key */
+ maskedValueSuffix: string
+ /** @description Prefix that identifies the token or key type */
+ prefix: string
+ /** @description Length of the token or key */
+ valueLength: number
+ }
+ ListedSandbox: {
+ /** @description Alias of the template */
+ alias?: string
+ /**
+ * @deprecated
+ * @description Identifier of the client
+ */
+ clientID: string
+ cpuCount: components['schemas']['CPUCount']
+ diskSizeMB: components['schemas']['DiskSizeMB']
+ /**
+ * Format: date-time
+ * @description Time when the sandbox will expire
+ */
+ endAt: string
+ envdVersion: components['schemas']['EnvdVersion']
+ memoryMB: components['schemas']['MemoryMB']
+ metadata?: components['schemas']['SandboxMetadata']
+ /** @description Identifier of the sandbox */
+ sandboxID: string
+ /**
+ * Format: date-time
+ * @description Time when the sandbox was started
+ */
+ startedAt: string
+ state: components['schemas']['SandboxState']
+ /** @description Identifier of the template from which is the sandbox created */
+ templateID: string
+ }
+ /**
+ * @description State of the sandbox
+ * @enum {string}
+ */
+ LogLevel: 'debug' | 'info' | 'warn' | 'error'
+ /**
+ * Format: int32
+ * @description Memory for the sandbox in MiB
+ */
+ MemoryMB: number
+ NewAccessToken: {
+ /** @description Name of the access token */
+ name: string
+ }
+ NewSandbox: {
+ /** @description Allow sandbox to access the internet */
+ allow_internet_access?: boolean
+ /**
+ * @description Automatically pauses the sandbox after the timeout
+ * @default false
+ */
+ autoPause: boolean
+ envVars?: components['schemas']['EnvVars']
+ metadata?: components['schemas']['SandboxMetadata']
+ /** @description Secure all system communication with sandbox */
+ secure?: boolean
+ /** @description Identifier of the required template */
+ templateID: string
+ /**
+ * Format: int32
+ * @description Time to live for the sandbox in seconds.
+ * @default 15
+ */
+ timeout: number
+ }
+ NewTeamAPIKey: {
+ /** @description Name of the API key */
+ name: string
+ }
+ Node: {
+ /** @description Identifier of the cluster */
+ clusterID: string
+ /** @description Commit of the orchestrator */
+ commit: string
+ /**
+ * Format: uint64
+ * @description Number of sandbox create fails
+ */
+ createFails: number
+ /**
+ * Format: uint64
+ * @description Number of sandbox create successes
+ */
+ createSuccesses: number
+ metrics: components['schemas']['NodeMetrics']
+ /** @description Identifier of the node */
+ nodeID: string
+ /**
+ * Format: uint32
+ * @description Number of sandboxes running on the node
+ */
+ sandboxCount: number
+ /**
+ * Format: int
+ * @description Number of starting Sandboxes
+ */
+ sandboxStartingCount: number
+ status: components['schemas']['NodeStatus']
+ /** @description Version of the orchestrator */
+ version: string
+ }
+ NodeDetail: {
+ /** @description List of cached builds id on the node */
+ cachedBuilds: string[]
+ /** @description Identifier of the cluster */
+ clusterID: string
+ /** @description Commit of the orchestrator */
+ commit: string
+ /**
+ * Format: uint64
+ * @description Number of sandbox create fails
+ */
+ createFails: number
+ /**
+ * Format: uint64
+ * @description Number of sandbox create successes
+ */
+ createSuccesses: number
+ metrics: components['schemas']['NodeMetrics']
+ /** @description Identifier of the node */
+ nodeID: string
+ /** @description List of sandboxes running on the node */
+ sandboxes: components['schemas']['ListedSandbox'][]
+ status: components['schemas']['NodeStatus']
+ /** @description Version of the orchestrator */
+ version: string
+ }
+ /** @description Node metrics */
+ NodeMetrics: {
+ /**
+ * Format: uint32
+ * @description Number of allocated CPU cores
+ */
+ allocatedCPU: number
+ /**
+ * Format: uint64
+ * @description Amount of allocated memory in bytes
+ */
+ allocatedMemoryBytes: number
+ /**
+ * Format: uint32
+ * @description Total number of CPU cores on the node
+ */
+ cpuCount: number
+ /**
+ * Format: uint32
+ * @description Node CPU usage percentage
+ */
+ cpuPercent: number
+ /** @description Detailed metrics for each disk/mount point */
+ disks: components['schemas']['DiskMetrics'][]
+ /**
+ * Format: uint64
+ * @description Total node memory in bytes
+ */
+ memoryTotalBytes: number
+ /**
+ * Format: uint64
+ * @description Node memory used in bytes
+ */
+ memoryUsedBytes: number
+ }
+ /**
+ * @description Status of the node
+ * @enum {string}
+ */
+ NodeStatus: 'ready' | 'draining' | 'connecting' | 'unhealthy'
+ NodeStatusChange: {
+ status: components['schemas']['NodeStatus']
+ }
+ ResumedSandbox: {
+ /**
+ * @deprecated
+ * @description Automatically pauses the sandbox after the timeout
+ * @default false
+ */
+ autoPause: boolean
+ /**
+ * Format: int32
+ * @description Time to live for the sandbox in seconds.
+ * @default 15
+ */
+ timeout: number
+ }
+ Sandbox: {
+ /** @description Alias of the template */
+ alias?: string
+ /**
+ * @deprecated
+ * @description Identifier of the client
+ */
+ clientID: string
+ /** @description Base domain where the sandbox traffic is accessible */
+ domain?: string | null
+ /** @description Access token used for envd communication */
+ envdAccessToken?: string
+ envdVersion: components['schemas']['EnvdVersion']
+ /** @description Identifier of the sandbox */
+ sandboxID: string
+ /** @description Identifier of the template from which is the sandbox created */
+ templateID: string
+ }
+ SandboxDetail: {
+ /** @description Alias of the template */
+ alias?: string
+ /**
+ * @deprecated
+ * @description Identifier of the client
+ */
+ clientID: string
+ cpuCount: components['schemas']['CPUCount']
+ diskSizeMB: components['schemas']['DiskSizeMB']
+ /** @description Base domain where the sandbox traffic is accessible */
+ domain?: string | null
+ /**
+ * Format: date-time
+ * @description Time when the sandbox will expire
+ */
+ endAt: string
+ /** @description Access token used for envd communication */
+ envdAccessToken?: string
+ envdVersion: components['schemas']['EnvdVersion']
+ memoryMB: components['schemas']['MemoryMB']
+ metadata?: components['schemas']['SandboxMetadata']
+ /** @description Identifier of the sandbox */
+ sandboxID: string
+ /**
+ * Format: date-time
+ * @description Time when the sandbox was started
+ */
+ startedAt: string
+ state: components['schemas']['SandboxState']
+ /** @description Identifier of the template from which is the sandbox created */
+ templateID: string
+ }
+ SandboxesWithMetrics: {
+ sandboxes: {
+ [key: string]: components['schemas']['SandboxMetric']
+ }
+ }
+ /** @description Log entry with timestamp and line */
+ SandboxLog: {
+ /** @description Log line content */
+ line: string
+ /**
+ * Format: date-time
+ * @description Timestamp of the log entry
+ */
+ timestamp: string
+ }
+ SandboxLogEntry: {
+ fields: {
+ [key: string]: string
+ }
+ level: components['schemas']['LogLevel']
+ /** @description Log message content */
+ message: string
+ /**
+ * Format: date-time
+ * @description Timestamp of the log entry
+ */
+ timestamp: string
+ }
+ SandboxLogs: {
+ /** @description Structured logs of the sandbox */
+ logEntries: components['schemas']['SandboxLogEntry'][]
+ /** @description Logs of the sandbox */
+ logs: components['schemas']['SandboxLog'][]
+ }
+ SandboxMetadata: {
+ [key: string]: string
+ }
+ /** @description Metric entry with timestamp and line */
+ SandboxMetric: {
+ /**
+ * Format: int32
+ * @description Number of CPU cores
+ */
+ cpuCount: number
+ /**
+ * Format: float
+ * @description CPU usage percentage
+ */
+ cpuUsedPct: number
+ /**
+ * Format: int64
+ * @description Total disk space in bytes
+ */
+ diskTotal: number
+ /**
+ * Format: int64
+ * @description Disk used in bytes
+ */
+ diskUsed: number
+ /**
+ * Format: int64
+ * @description Total memory in bytes
+ */
+ memTotal: number
+ /**
+ * Format: int64
+ * @description Memory used in bytes
+ */
+ memUsed: number
+ /**
+ * Format: date-time
+ * @description Timestamp of the metric entry
+ */
+ timestamp: string
+ }
+ /**
+ * @description State of the sandbox
+ * @enum {string}
+ */
+ SandboxState: 'running' | 'paused'
+ Team: {
+ /** @description API key for the team */
+ apiKey: string
+ /** @description Whether the team is the default team */
+ isDefault: boolean
+ /** @description Name of the team */
+ name: string
+ /** @description Identifier of the team */
+ teamID: string
+ }
+ TeamAPIKey: {
+ /**
+ * Format: date-time
+ * @description Timestamp of API key creation
+ */
+ createdAt: string
+ createdBy?: components['schemas']['TeamUser'] | null
+ /**
+ * Format: uuid
+ * @description Identifier of the API key
+ */
+ id: string
+ /**
+ * Format: date-time
+ * @description Last time this API key was used
+ */
+ lastUsed?: string | null
+ mask: components['schemas']['IdentifierMaskingDetails']
+ /** @description Name of the API key */
+ name: string
+ }
+ /** @description Team metric with timestamp */
+ TeamMetric: {
+ /**
+ * Format: int32
+ * @description The number of concurrent sandboxes for the team
+ */
+ concurrentSandboxes: number
+ /**
+ * Format: float
+ * @description Number of sandboxes started per second
+ */
+ sandboxStartRate: number
+ /**
+ * Format: date-time
+ * @description Timestamp of the metric entry
+ */
+ timestamp: string
+ }
+ TeamUser: {
+ /** @description Email of the user */
+ email: string
+ /**
+ * Format: uuid
+ * @description Identifier of the user
+ */
+ id: string
+ }
+ Template: {
+ /** @description Aliases of the template */
+ aliases?: string[]
+ /**
+ * Format: int32
+ * @description Number of times the template was built
+ */
+ buildCount: number
+ /** @description Identifier of the last successful build for given template */
+ buildID: string
+ cpuCount: components['schemas']['CPUCount']
+ /**
+ * Format: date-time
+ * @description Time when the template was created
+ */
+ createdAt: string
+ createdBy: components['schemas']['TeamUser'] | null
+ diskSizeMB: components['schemas']['DiskSizeMB']
+ envdVersion: components['schemas']['EnvdVersion']
+ /**
+ * Format: date-time
+ * @description Time when the template was last used
+ */
+ lastSpawnedAt: string
+ memoryMB: components['schemas']['MemoryMB']
+ /** @description Whether the template is public or only accessible by the team */
+ public: boolean
+ /**
+ * Format: int64
+ * @description Number of times the template was used
+ */
+ spawnCount: number
+ /** @description Identifier of the template */
+ templateID: string
+ /**
+ * Format: date-time
+ * @description Time when the template was last updated
+ */
+ updatedAt: string
+ }
+ TemplateBuild: {
+ /** @description Identifier of the build */
+ buildID: string
+ /**
+ * @description Build logs structured
+ * @default []
+ */
+ logEntries: components['schemas']['BuildLogEntry'][]
+ /**
+ * @description Build logs
+ * @default []
+ */
+ logs: string[]
+ reason?: components['schemas']['BuildStatusReason']
+ /**
+ * @description Status of the template
+ * @enum {string}
+ */
+ status: 'building' | 'waiting' | 'ready' | 'error'
+ /** @description Identifier of the template */
+ templateID: string
+ }
+ TemplateBuildFileUpload: {
+ /** @description Whether the file is already present in the cache */
+ present: boolean
+ /** @description Url where the file should be uploaded to */
+ url?: string
+ }
+ TemplateBuildRequest: {
+ /** @description Alias of the template */
+ alias?: string
+ cpuCount?: components['schemas']['CPUCount']
+ /** @description Dockerfile for the template */
+ dockerfile: string
+ memoryMB?: components['schemas']['MemoryMB']
+ /** @description Ready check command to execute in the template after the build */
+ readyCmd?: string
+ /** @description Start command to execute in the template after the build */
+ startCmd?: string
+ /** @description Identifier of the team */
+ teamID?: string
+ }
+ TemplateBuildRequestV2: {
+ /** @description Alias of the template */
+ alias: string
+ cpuCount?: components['schemas']['CPUCount']
+ memoryMB?: components['schemas']['MemoryMB']
+ /** @description Identifier of the team */
+ teamID?: string
+ }
+ TemplateBuildStartV2: {
+ /**
+ * @description Whether the whole build should be forced to run regardless of the cache
+ * @default false
+ */
+ force: boolean
+ /** @description Image to use as a base for the template build */
+ fromImage?: string
+ /** @description Template to use as a base for the template build */
+ fromTemplate?: string
+ /** @description Ready check command to execute in the template after the build */
+ readyCmd?: string
+ /** @description Start command to execute in the template after the build */
+ startCmd?: string
+ /**
+ * @description List of steps to execute in the template build
+ * @default []
+ */
+ steps: components['schemas']['TemplateStep'][]
+ }
+ /** @description Step in the template build process */
+ TemplateStep: {
+ /**
+ * @description Arguments for the step
+ * @default []
+ */
+ args: string[]
+ /** @description Hash of the files used in the step */
+ filesHash?: string
+ /**
+ * @description Whether the step should be forced to run regardless of the cache
+ * @default false
+ */
+ force: boolean
+ /** @description Type of the step */
+ type: string
+ }
+ TemplateUpdateRequest: {
+ /** @description Whether the template is public or only accessible by the team */
+ public?: boolean
+ }
+ UpdateTeamAPIKey: {
+ /** @description New name for the API key */
+ name: string
+ }
+ }
+ responses: {
+ /** @description Bad request */
+ 400: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Authentication error */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Not found */
+ 404: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Conflict */
+ 409: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Server error */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ }
+ parameters: {
+ accessTokenID: string
+ apiKeyID: string
+ buildID: string
+ nodeID: string
+ sandboxID: string
+ teamID: string
+ templateID: string
+ }
+ requestBodies: never
+ headers: never
+ pathItems: never
}
-export type $defs = Record<string, never>;
-export type operations = Record<string, never>;
+export type $defs = Record<string, never>
+export type operations = Record<string, never>
diff --git a/packages/js-sdk/src/envd/api.ts b/packages/js-sdk/src/envd/api.ts
index bb7936cd0..ef0323c59 100644
--- a/packages/js-sdk/src/envd/api.ts
+++ b/packages/js-sdk/src/envd/api.ts
@@ -98,10 +98,13 @@ class EnvdApiClient {
readonly version: string | undefined
constructor(
- config: Pick<ConnectionConfig, 'apiUrl' | 'logger' | 'accessToken'> & { fetch?: (request: Request) => ReturnType<typeof fetch>, headers?: Record<string, string> },
+ config: Pick<ConnectionConfig, 'apiUrl' | 'logger' | 'accessToken'> & {
+ fetch?: (request: Request) => ReturnType<typeof fetch>
+ headers?: Record<string, string>
+ },
metadata: {
version?: string
- },
+ }
) {
this.api = createClient({
baseUrl: config.apiUrl,
diff --git a/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts b/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
index 67a84f4af..0a30537ac 100644
--- a/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
+++ b/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
@@ -3,20 +3,39 @@
/* eslint-disable */
// @ts-nocheck
-import { CreateWatcherRequest, CreateWatcherResponse, GetWatcherEventsRequest, GetWatcherEventsResponse, ListDirRequest, ListDirResponse, MakeDirRequest, MakeDirResponse, MoveRequest, MoveResponse, RemoveRequest, RemoveResponse, RemoveWatcherRequest, RemoveWatcherResponse, StatRequest, StatResponse, WatchDirRequest, WatchDirResponse } from "./filesystem_pb.js";
-import { MethodKind } from "@bufbuild/protobuf";
+import {
+ CreateWatcherRequest,
+ CreateWatcherResponse,
+ GetWatcherEventsRequest,
+ GetWatcherEventsResponse,
+ ListDirRequest,
+ ListDirResponse,
+ MakeDirRequest,
+ MakeDirResponse,
+ MoveRequest,
+ MoveResponse,
+ RemoveRequest,
+ RemoveResponse,
+ RemoveWatcherRequest,
+ RemoveWatcherResponse,
+ StatRequest,
+ StatResponse,
+ WatchDirRequest,
+ WatchDirResponse,
+} from './filesystem_pb.js'
+import { MethodKind } from '@bufbuild/protobuf'
/**
* @generated from service filesystem.Filesystem
*/
export const Filesystem = {
- typeName: "filesystem.Filesystem",
+ typeName: 'filesystem.Filesystem',
methods: {
/**
* @generated from rpc filesystem.Filesystem.Stat
*/
stat: {
- name: "Stat",
+ name: 'Stat',
I: StatRequest,
O: StatResponse,
kind: MethodKind.Unary,
@@ -25,7 +44,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.MakeDir
*/
makeDir: {
- name: "MakeDir",
+ name: 'MakeDir',
I: MakeDirRequest,
O: MakeDirResponse,
kind: MethodKind.Unary,
@@ -34,7 +53,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.Move
*/
move: {
- name: "Move",
+ name: 'Move',
I: MoveRequest,
O: MoveResponse,
kind: MethodKind.Unary,
@@ -43,7 +62,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.ListDir
*/
listDir: {
- name: "ListDir",
+ name: 'ListDir',
I: ListDirRequest,
O: ListDirResponse,
kind: MethodKind.Unary,
@@ -52,7 +71,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.Remove
*/
remove: {
- name: "Remove",
+ name: 'Remove',
I: RemoveRequest,
O: RemoveResponse,
kind: MethodKind.Unary,
@@ -61,7 +80,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.WatchDir
*/
watchDir: {
- name: "WatchDir",
+ name: 'WatchDir',
I: WatchDirRequest,
O: WatchDirResponse,
kind: MethodKind.ServerStreaming,
@@ -72,7 +91,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.CreateWatcher
*/
createWatcher: {
- name: "CreateWatcher",
+ name: 'CreateWatcher',
I: CreateWatcherRequest,
O: CreateWatcherResponse,
kind: MethodKind.Unary,
@@ -81,7 +100,7 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.GetWatcherEvents
*/
getWatcherEvents: {
- name: "GetWatcherEvents",
+ name: 'GetWatcherEvents',
I: GetWatcherEventsRequest,
O: GetWatcherEventsResponse,
kind: MethodKind.Unary,
@@ -90,11 +109,10 @@ export const Filesystem = {
* @generated from rpc filesystem.Filesystem.RemoveWatcher
*/
removeWatcher: {
- name: "RemoveWatcher",
+ name: 'RemoveWatcher',
I: RemoveWatcherRequest,
O: RemoveWatcherResponse,
kind: MethodKind.Unary,
},
- }
-} as const;
-
+ },
+} as const
diff --git a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
index ea9798d1f..06138291c 100644
--- a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
+++ b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
@@ -2,465 +2,509 @@
// @generated from file filesystem/filesystem.proto (package filesystem, syntax proto3)
/* eslint-disable */
-import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
-import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
-import type { Timestamp } from "@bufbuild/protobuf/wkt";
-import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
-import type { Message } from "@bufbuild/protobuf";
+import type {
+ GenEnum,
+ GenFile,
+ GenMessage,
+ GenService,
+} from '@bufbuild/protobuf/codegenv2'
+import {
+ enumDesc,
+ fileDesc,
+ messageDesc,
+ serviceDesc,
+} from '@bufbuild/protobuf/codegenv2'
+import type { Timestamp } from '@bufbuild/protobuf/wkt'
+import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'
+import type { Message } from '@bufbuild/protobuf'
/**
* Describes the file filesystem/filesystem.proto.
*/
-export const file_filesystem_filesystem: GenFile = /*@__PURE__*/
- fileDesc("ChtmaWxlc3lzdGVtL2ZpbGVzeXN0ZW0ucHJvdG8SCmZpbGVzeXN0ZW0iMgoLTW92ZVJlcXVlc3QSDgoGc291cmNlGAEgASgJEhMKC2Rlc3RpbmF0aW9uGAIgASgJIjQKDE1vdmVSZXNwb25zZRIkCgVlbnRyeRgBIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvIh4KDk1ha2VEaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkiNwoPTWFrZURpclJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8iHQoNUmVtb3ZlUmVxdWVzdBIMCgRwYXRoGAEgASgJIhAKDlJlbW92ZVJlc3BvbnNlIhsKC1N0YXRSZXF1ZXN0EgwKBHBhdGgYASABKAkiNAoMU3RhdFJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8i/QEKCUVudHJ5SW5mbxIMCgRuYW1lGAEgASgJEiIKBHR5cGUYAiABKA4yFC5maWxlc3lzdGVtLkZpbGVUeXBlEgwKBHBhdGgYAyABKAkSDAoEc2l6ZRgEIAEoAxIMCgRtb2RlGAUgASgNEhMKC3Blcm1pc3Npb25zGAYgASgJEg0KBW93bmVyGAcgASgJEg0KBWdyb3VwGAggASgJEjEKDW1vZGlmaWVkX3RpbWUYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhsKDnN5bWxpbmtfdGFyZ2V0GAogASgJSACIAQFCEQoPX3N5bWxpbmtfdGFyZ2V0Ii0KDkxpc3REaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkSDQoFZGVwdGgYAiABKA0iOQoPTGlzdERpclJlc3BvbnNlEiYKB2VudHJpZXMYASADKAsyFS5maWxlc3lzdGVtLkVudHJ5SW5mbyIyCg9XYXRjaERpclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgiRAoPRmlsZXN5c3RlbUV2ZW50EgwKBG5hbWUYASABKAkSIwoEdHlwZRgCIAEoDjIVLmZpbGVzeXN0ZW0uRXZlbnRUeXBlIuABChBXYXRjaERpclJlc3BvbnNlEjgKBXN0YXJ0GAEgASgLMicuZmlsZXN5c3RlbS5XYXRjaERpclJlc3BvbnNlLlN0YXJ0RXZlbnRIABIxCgpmaWxlc3lzdGVtGAIgASgLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnRIABI7CglrZWVwYWxpdmUYAyABKAsyJi5maWxlc3lzdGVtLldhdGNoRGlyUmVzcG9uc2UuS2VlcEFsaXZlSAAaDAoKU3RhcnRFdmVudBoLCglLZWVwQWxpdmVCBwoFZXZlbnQiNwoUQ3JlYXRlV2F0Y2hlclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgiKwoVQ3JlYXRlV2F0Y2hlclJlc3BvbnNlEhIKCndhdGNoZXJfaWQYASABKAkiLQoXR2V0V2F0Y2hlckV2ZW50c1JlcXVlc3QSEgoKd2F0Y2hlcl9pZBgBIAEoCSJHChhHZXRXYXRjaGVyRXZlbnRzUmVzcG9uc2USKwoGZXZlbnRzGAEgAygLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnQiKgoUUmVtb3ZlV2F0Y2hlclJlcXVlc3QSEgoKd2F0Y2hlcl9pZBgBIAEoCSIXChVSZW1vdmVXYXRjaGVyUmVzcG9uc2UqUgoIRmlsZVR5cGUSGQoVRklMRV9UWVBFX1VOU1BFQ0lGSUVEEAASEgoORklMRV9UWVBFX0ZJTEUQARIXChNGSUxFX1RZUEVfRElSRUNUT1JZEAIqmAEKCUV2ZW50VHlwZRIaChZFVkVOVF9UWVBFX1VOU1BFQ0lGSUVEEAASFQoRRVZFTlRfVFlQRV9DUkVBVEUQARIUChBFVkVOVF9UWVBFX1dSSVRFEAISFQoRRVZFTlRfVFlQRV9SRU1PVkUQAxIVChFFVkVOVF9UWVBFX1JFTkFNRRAEEhQKEEVWRU5UX1RZUEVfQ0hNT0QQBTKfBQoKRmlsZXN5c3RlbRI5CgRTdGF0EhcuZmlsZXN5c3RlbS5TdGF0UmVxdWVzdBoYLmZpbGVzeXN0ZW0uU3RhdFJlc3BvbnNlEkIKB01ha2VEaXISGi5maWxlc3lzdGVtLk1ha2VEaXJSZXF1ZXN0GhsuZmlsZXN5c3RlbS5NYWtlRGlyUmVzcG9uc2USOQoETW92ZRIXLmZpbGVzeXN0ZW0uTW92ZVJlcXVlc3QaGC5maWxlc3lzdGVtLk1vdmVSZXNwb25zZRJCCgdMaXN0RGlyEhouZmlsZXN5c3RlbS5MaXN0RGlyUmVxdWVzdBobLmZpbGVzeXN0ZW0uTGlzdERpclJlc3BvbnNlEj8KBlJlbW92ZRIZLmZpbGVzeXN0ZW0uUmVtb3ZlUmVxdWVzdBoaLmZpbGVzeXN0ZW0uUmVtb3ZlUmVzcG9uc2USRwoIV2F0Y2hEaXISGy5maWxlc3lzdGVtLldhdGNoRGlyUmVxdWVzdBocLmZpbGVzeXN0ZW0uV2F0Y2hEaXJSZXNwb25zZTABElQKDUNyZWF0ZVdhdGNoZXISIC5maWxlc3lzdGVtLkNyZWF0ZVdhdGNoZXJSZXF1ZXN0GiEuZmlsZXN5c3RlbS5DcmVhdGVXYXRjaGVyUmVzcG9uc2USXQoQR2V0V2F0Y2hlckV2ZW50cxIjLmZpbGVzeXN0ZW0uR2V0V2F0Y2hlckV2ZW50c1JlcXVlc3QaJC5maWxlc3lzdGVtLkdldFdhdGNoZXJFdmVudHNSZXNwb25zZRJUCg1SZW1vdmVXYXRjaGVyEiAuZmlsZXN5c3RlbS5SZW1vdmVXYXRjaGVyUmVxdWVzdBohLmZpbGVzeXN0ZW0uUmVtb3ZlV2F0Y2hlclJlc3BvbnNlQmkKDmNvbS5maWxlc3lzdGVtQg9GaWxlc3lzdGVtUHJvdG9QAaICA0ZYWKoCCkZpbGVzeXN0ZW3KAgpGaWxlc3lzdGVt4gIWRmlsZXN5c3RlbVxHUEJNZXRhZGF0YeoCCkZpbGVzeXN0ZW1iBnByb3RvMw", [file_google_protobuf_timestamp]);
+export const file_filesystem_filesystem: GenFile =
+ /*@__PURE__*/
+ fileDesc(
+ 'ChtmaWxlc3lzdGVtL2ZpbGVzeXN0ZW0ucHJvdG8SCmZpbGVzeXN0ZW0iMgoLTW92ZVJlcXVlc3QSDgoGc291cmNlGAEgASgJEhMKC2Rlc3RpbmF0aW9uGAIgASgJIjQKDE1vdmVSZXNwb25zZRIkCgVlbnRyeRgBIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvIh4KDk1ha2VEaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkiNwoPTWFrZURpclJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8iHQoNUmVtb3ZlUmVxdWVzdBIMCgRwYXRoGAEgASgJIhAKDlJlbW92ZVJlc3BvbnNlIhsKC1N0YXRSZXF1ZXN0EgwKBHBhdGgYASABKAkiNAoMU3RhdFJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8i/QEKCUVudHJ5SW5mbxIMCgRuYW1lGAEgASgJEiIKBHR5cGUYAiABKA4yFC5maWxlc3lzdGVtLkZpbGVUeXBlEgwKBHBhdGgYAyABKAkSDAoEc2l6ZRgEIAEoAxIMCgRtb2RlGAUgASgNEhMKC3Blcm1pc3Npb25zGAYgASgJEg0KBW93bmVyGAcgASgJEg0KBWdyb3VwGAggASgJEjEKDW1vZGlmaWVkX3RpbWUYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhsKDnN5bWxpbmtfdGFyZ2V0GAogASgJSACIAQFCEQoPX3N5bWxpbmtfdGFyZ2V0Ii0KDkxpc3REaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkSDQoFZGVwdGgYAiABKA0iOQoPTGlzdERpclJlc3BvbnNlEiYKB2VudHJpZXMYASADKAsyFS5maWxlc3lzdGVtLkVudHJ5SW5mbyIyCg9XYXRjaERpclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgiRAoPRmlsZXN5c3RlbUV2ZW50EgwKBG5hbWUYASABKAkSIwoEdHlwZRgCIAEoDjIVLmZpbGVzeXN0ZW0uRXZlbnRUeXBlIuABChBXYXRjaERpclJlc3BvbnNlEjgKBXN0YXJ0GAEgASgLMicuZmlsZXN5c3RlbS5XYXRjaERpclJlc3BvbnNlLlN0YXJ0RXZlbnRIABIxCgpmaWxlc3lzdGVtGAIgASgLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnRIABI7CglrZWVwYWxpdmUYAyABKAsyJi5maWxlc3lzdGVtLldhdGNoRGlyUmVzcG9uc2UuS2VlcEFsaXZlSAAaDAoKU3RhcnRFdmVudBoLCglLZWVwQWxpdmVCBwoFZXZlbnQiNwoUQ3JlYXRlV2F0Y2hlclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgiKwoVQ3JlYXRlV2F0Y2hlclJlc3BvbnNlEhIKCndhdGNoZXJfaWQYASABKAkiLQoXR2V0V2F0Y2hlckV2ZW50c1JlcXVlc3QSEgoKd2F0Y2hlcl9pZBgBIAEoCSJHChhHZXRXYXRjaGVyRXZlbnRzUmVzcG9uc2USKwoGZXZlbnRzGAEgAygLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnQiKgoUUmVtb3ZlV2F0Y2hlclJlcXVlc3QSEgoKd2F0Y2hlcl9pZBgBIAEoCSIXChVSZW1vdmVXYXRjaGVyUmVzcG9uc2UqUgoIRmlsZVR5cGUSGQoVRklMRV9UWVBFX1VOU1BFQ0lGSUVEEAASEgoORklMRV9UWVBFX0ZJTEUQARIXChNGSUxFX1RZUEVfRElSRUNUT1JZEAIqmAEKCUV2ZW50VHlwZRIaChZFVkVOVF9UWVBFX1VOU1BFQ0lGSUVEEAASFQoRRVZFTlRfVFlQRV9DUkVBVEUQARIUChBFVkVOVF9UWVBFX1dSSVRFEAISFQoRRVZFTlRfVFlQRV9SRU1PVkUQAxIVChFFVkVOVF9UWVBFX1JFTkFNRRAEEhQKEEVWRU5UX1RZUEVfQ0hNT0QQBTKfBQoKRmlsZXN5c3RlbRI5CgRTdGF0EhcuZmlsZXN5c3RlbS5TdGF0UmVxdWVzdBoYLmZpbGVzeXN0ZW0uU3RhdFJlc3BvbnNlEkIKB01ha2VEaXISGi5maWxlc3lzdGVtLk1ha2VEaXJSZXF1ZXN0GhsuZmlsZXN5c3RlbS5NYWtlRGlyUmVzcG9uc2USOQoETW92ZRIXLmZpbGVzeXN0ZW0uTW92ZVJlcXVlc3QaGC5maWxlc3lzdGVtLk1vdmVSZXNwb25zZRJCCgdMaXN0RGlyEhouZmlsZXN5c3RlbS5MaXN0RGlyUmVxdWVzdBobLmZpbGVzeXN0ZW0uTGlzdERpclJlc3BvbnNlEj8KBlJlbW92ZRIZLmZpbGVzeXN0ZW0uUmVtb3ZlUmVxdWVzdBoaLmZpbGVzeXN0ZW0uUmVtb3ZlUmVzcG9uc2USRwoIV2F0Y2hEaXISGy5maWxlc3lzdGVtLldhdGNoRGlyUmVxdWVzdBocLmZpbGVzeXN0ZW0uV2F0Y2hEaXJSZXNwb25zZTABElQKDUNyZWF0ZVdhdGNoZXISIC5maWxlc3lzdGVtLkNyZWF0ZVdhdGNoZXJSZXF1ZXN0GiEuZmlsZXN5c3RlbS5DcmVhdGVXYXRjaGVyUmVzcG9uc2USXQoQR2V0V2F0Y2hlckV2ZW50cxIjLmZpbGVzeXN0ZW0uR2V0V2F0Y2hlckV2ZW50c1JlcXVlc3QaJC5maWxlc3lzdGVtLkdldFdhdGNoZXJFdmVudHNSZXNwb25zZRJUCg1SZW1vdmVXYXRjaGVyEiAuZmlsZXN5c3RlbS5SZW1vdmVXYXRjaGVyUmVxdWVzdBohLmZpbGVzeXN0ZW0uUmVtb3ZlV2F0Y2hlclJlc3BvbnNlQmkKDmNvbS5maWxlc3lzdGVtQg9GaWxlc3lzdGVtUHJvdG9QAaICA0ZYWKoCCkZpbGVzeXN0ZW3KAgpGaWxlc3lzdGVt4gIWRmlsZXN5c3RlbVxHUEJNZXRhZGF0YeoCCkZpbGVzeXN0ZW1iBnByb3RvMw',
+ [file_google_protobuf_timestamp]
+ )
/**
* @generated from message filesystem.MoveRequest
*/
-export type MoveRequest = Message<"filesystem.MoveRequest"> & {
+export type MoveRequest = Message<'filesystem.MoveRequest'> & {
/**
* @generated from field: string source = 1;
*/
- source: string;
+ source: string
/**
* @generated from field: string destination = 2;
*/
- destination: string;
-};
+ destination: string
+}
/**
* Describes the message filesystem.MoveRequest.
* Use `create(MoveRequestSchema)` to create a new message.
*/
-export const MoveRequestSchema: GenMessage<MoveRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 0);
+export const MoveRequestSchema: GenMessage<MoveRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 0)
/**
* @generated from message filesystem.MoveResponse
*/
-export type MoveResponse = Message<"filesystem.MoveResponse"> & {
+export type MoveResponse = Message<'filesystem.MoveResponse'> & {
/**
* @generated from field: filesystem.EntryInfo entry = 1;
*/
- entry?: EntryInfo;
-};
+ entry?: EntryInfo
+}
/**
* Describes the message filesystem.MoveResponse.
* Use `create(MoveResponseSchema)` to create a new message.
*/
-export const MoveResponseSchema: GenMessage<MoveResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 1);
+export const MoveResponseSchema: GenMessage<MoveResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 1)
/**
* @generated from message filesystem.MakeDirRequest
*/
-export type MakeDirRequest = Message<"filesystem.MakeDirRequest"> & {
+export type MakeDirRequest = Message<'filesystem.MakeDirRequest'> & {
/**
* @generated from field: string path = 1;
*/
- path: string;
-};
+ path: string
+}
/**
* Describes the message filesystem.MakeDirRequest.
* Use `create(MakeDirRequestSchema)` to create a new message.
*/
-export const MakeDirRequestSchema: GenMessage<MakeDirRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 2);
+export const MakeDirRequestSchema: GenMessage<MakeDirRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 2)
/**
* @generated from message filesystem.MakeDirResponse
*/
-export type MakeDirResponse = Message<"filesystem.MakeDirResponse"> & {
+export type MakeDirResponse = Message<'filesystem.MakeDirResponse'> & {
/**
* @generated from field: filesystem.EntryInfo entry = 1;
*/
- entry?: EntryInfo;
-};
+ entry?: EntryInfo
+}
/**
* Describes the message filesystem.MakeDirResponse.
* Use `create(MakeDirResponseSchema)` to create a new message.
*/
-export const MakeDirResponseSchema: GenMessage<MakeDirResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 3);
+export const MakeDirResponseSchema: GenMessage<MakeDirResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 3)
/**
* @generated from message filesystem.RemoveRequest
*/
-export type RemoveRequest = Message<"filesystem.RemoveRequest"> & {
+export type RemoveRequest = Message<'filesystem.RemoveRequest'> & {
/**
* @generated from field: string path = 1;
*/
- path: string;
-};
+ path: string
+}
/**
* Describes the message filesystem.RemoveRequest.
* Use `create(RemoveRequestSchema)` to create a new message.
*/
-export const RemoveRequestSchema: GenMessage<RemoveRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 4);
+export const RemoveRequestSchema: GenMessage<RemoveRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 4)
/**
* @generated from message filesystem.RemoveResponse
*/
-export type RemoveResponse = Message<"filesystem.RemoveResponse"> & {
-};
+export type RemoveResponse = Message<'filesystem.RemoveResponse'> & {}
/**
* Describes the message filesystem.RemoveResponse.
* Use `create(RemoveResponseSchema)` to create a new message.
*/
-export const RemoveResponseSchema: GenMessage<RemoveResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 5);
+export const RemoveResponseSchema: GenMessage<RemoveResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 5)
/**
* @generated from message filesystem.StatRequest
*/
-export type StatRequest = Message<"filesystem.StatRequest"> & {
+export type StatRequest = Message<'filesystem.StatRequest'> & {
/**
* @generated from field: string path = 1;
*/
- path: string;
-};
+ path: string
+}
/**
* Describes the message filesystem.StatRequest.
* Use `create(StatRequestSchema)` to create a new message.
*/
-export const StatRequestSchema: GenMessage<StatRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 6);
+export const StatRequestSchema: GenMessage<StatRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 6)
/**
* @generated from message filesystem.StatResponse
*/
-export type StatResponse = Message<"filesystem.StatResponse"> & {
+export type StatResponse = Message<'filesystem.StatResponse'> & {
/**
* @generated from field: filesystem.EntryInfo entry = 1;
*/
- entry?: EntryInfo;
-};
+ entry?: EntryInfo
+}
/**
* Describes the message filesystem.StatResponse.
* Use `create(StatResponseSchema)` to create a new message.
*/
-export const StatResponseSchema: GenMessage<StatResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 7);
+export const StatResponseSchema: GenMessage<StatResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 7)
/**
* @generated from message filesystem.EntryInfo
*/
-export type EntryInfo = Message<"filesystem.EntryInfo"> & {
+export type EntryInfo = Message<'filesystem.EntryInfo'> & {
/**
* @generated from field: string name = 1;
*/
- name: string;
+ name: string
/**
* @generated from field: filesystem.FileType type = 2;
*/
- type: FileType;
+ type: FileType
/**
* @generated from field: string path = 3;
*/
- path: string;
+ path: string
/**
* @generated from field: int64 size = 4;
*/
- size: bigint;
+ size: bigint
/**
* @generated from field: uint32 mode = 5;
*/
- mode: number;
+ mode: number
/**
* @generated from field: string permissions = 6;
*/
- permissions: string;
+ permissions: string
/**
* @generated from field: string owner = 7;
*/
- owner: string;
+ owner: string
/**
* @generated from field: string group = 8;
*/
- group: string;
+ group: string
/**
* @generated from field: google.protobuf.Timestamp modified_time = 9;
*/
- modifiedTime?: Timestamp;
+ modifiedTime?: Timestamp
/**
* If the entry is a symlink, this field contains the target of the symlink.
*
* @generated from field: optional string symlink_target = 10;
*/
- symlinkTarget?: string;
-};
+ symlinkTarget?: string
+}
/**
* Describes the message filesystem.EntryInfo.
* Use `create(EntryInfoSchema)` to create a new message.
*/
-export const EntryInfoSchema: GenMessage<EntryInfo> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 8);
+export const EntryInfoSchema: GenMessage<EntryInfo> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 8)
/**
* @generated from message filesystem.ListDirRequest
*/
-export type ListDirRequest = Message<"filesystem.ListDirRequest"> & {
+export type ListDirRequest = Message<'filesystem.ListDirRequest'> & {
/**
* @generated from field: string path = 1;
*/
- path: string;
+ path: string
/**
* @generated from field: uint32 depth = 2;
*/
- depth: number;
-};
+ depth: number
+}
/**
* Describes the message filesystem.ListDirRequest.
* Use `create(ListDirRequestSchema)` to create a new message.
*/
-export const ListDirRequestSchema: GenMessage<ListDirRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 9);
+export const ListDirRequestSchema: GenMessage<ListDirRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 9)
/**
* @generated from message filesystem.ListDirResponse
*/
-export type ListDirResponse = Message<"filesystem.ListDirResponse"> & {
+export type ListDirResponse = Message<'filesystem.ListDirResponse'> & {
/**
* @generated from field: repeated filesystem.EntryInfo entries = 1;
*/
- entries: EntryInfo[];
-};
+ entries: EntryInfo[]
+}
/**
* Describes the message filesystem.ListDirResponse.
* Use `create(ListDirResponseSchema)` to create a new message.
*/
-export const ListDirResponseSchema: GenMessage<ListDirResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 10);
+export const ListDirResponseSchema: GenMessage<ListDirResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 10)
/**
* @generated from message filesystem.WatchDirRequest
*/
-export type WatchDirRequest = Message<"filesystem.WatchDirRequest"> & {
+export type WatchDirRequest = Message<'filesystem.WatchDirRequest'> & {
/**
* @generated from field: string path = 1;
*/
- path: string;
+ path: string
/**
* @generated from field: bool recursive = 2;
*/
- recursive: boolean;
-};
+ recursive: boolean
+}
/**
* Describes the message filesystem.WatchDirRequest.
* Use `create(WatchDirRequestSchema)` to create a new message.
*/
-export const WatchDirRequestSchema: GenMessage<WatchDirRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 11);
+export const WatchDirRequestSchema: GenMessage<WatchDirRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 11)
/**
* @generated from message filesystem.FilesystemEvent
*/
-export type FilesystemEvent = Message<"filesystem.FilesystemEvent"> & {
+export type FilesystemEvent = Message<'filesystem.FilesystemEvent'> & {
/**
* @generated from field: string name = 1;
*/
- name: string;
+ name: string
/**
* @generated from field: filesystem.EventType type = 2;
*/
- type: EventType;
-};
+ type: EventType
+}
/**
* Describes the message filesystem.FilesystemEvent.
* Use `create(FilesystemEventSchema)` to create a new message.
*/
-export const FilesystemEventSchema: GenMessage<FilesystemEvent> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 12);
+export const FilesystemEventSchema: GenMessage<FilesystemEvent> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 12)
/**
* @generated from message filesystem.WatchDirResponse
*/
-export type WatchDirResponse = Message<"filesystem.WatchDirResponse"> & {
+export type WatchDirResponse = Message<'filesystem.WatchDirResponse'> & {
/**
* @generated from oneof filesystem.WatchDirResponse.event
*/
- event: {
- /**
- * @generated from field: filesystem.WatchDirResponse.StartEvent start = 1;
- */
- value: WatchDirResponse_StartEvent;
- case: "start";
- } | {
- /**
- * @generated from field: filesystem.FilesystemEvent filesystem = 2;
- */
- value: FilesystemEvent;
- case: "filesystem";
- } | {
- /**
- * @generated from field: filesystem.WatchDirResponse.KeepAlive keepalive = 3;
- */
- value: WatchDirResponse_KeepAlive;
- case: "keepalive";
- } | { case: undefined; value?: undefined };
-};
+ event:
+ | {
+ /**
+ * @generated from field: filesystem.WatchDirResponse.StartEvent start = 1;
+ */
+ value: WatchDirResponse_StartEvent
+ case: 'start'
+ }
+ | {
+ /**
+ * @generated from field: filesystem.FilesystemEvent filesystem = 2;
+ */
+ value: FilesystemEvent
+ case: 'filesystem'
+ }
+ | {
+ /**
+ * @generated from field: filesystem.WatchDirResponse.KeepAlive keepalive = 3;
+ */
+ value: WatchDirResponse_KeepAlive
+ case: 'keepalive'
+ }
+ | { case: undefined; value?: undefined }
+}
/**
* Describes the message filesystem.WatchDirResponse.
* Use `create(WatchDirResponseSchema)` to create a new message.
*/
-export const WatchDirResponseSchema: GenMessage<WatchDirResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 13);
+export const WatchDirResponseSchema: GenMessage<WatchDirResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 13)
/**
* @generated from message filesystem.WatchDirResponse.StartEvent
*/
-export type WatchDirResponse_StartEvent = Message<"filesystem.WatchDirResponse.StartEvent"> & {
-};
+export type WatchDirResponse_StartEvent =
+ Message<'filesystem.WatchDirResponse.StartEvent'> & {}
/**
* Describes the message filesystem.WatchDirResponse.StartEvent.
* Use `create(WatchDirResponse_StartEventSchema)` to create a new message.
*/
-export const WatchDirResponse_StartEventSchema: GenMessage<WatchDirResponse_StartEvent> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 13, 0);
+export const WatchDirResponse_StartEventSchema: GenMessage<WatchDirResponse_StartEvent> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 13, 0)
/**
* @generated from message filesystem.WatchDirResponse.KeepAlive
*/
-export type WatchDirResponse_KeepAlive = Message<"filesystem.WatchDirResponse.KeepAlive"> & {
-};
+export type WatchDirResponse_KeepAlive =
+ Message<'filesystem.WatchDirResponse.KeepAlive'> & {}
/**
* Describes the message filesystem.WatchDirResponse.KeepAlive.
* Use `create(WatchDirResponse_KeepAliveSchema)` to create a new message.
*/
-export const WatchDirResponse_KeepAliveSchema: GenMessage<WatchDirResponse_KeepAlive> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 13, 1);
+export const WatchDirResponse_KeepAliveSchema: GenMessage<WatchDirResponse_KeepAlive> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 13, 1)
/**
* @generated from message filesystem.CreateWatcherRequest
*/
-export type CreateWatcherRequest = Message<"filesystem.CreateWatcherRequest"> & {
- /**
- * @generated from field: string path = 1;
- */
- path: string;
+export type CreateWatcherRequest =
+ Message<'filesystem.CreateWatcherRequest'> & {
+ /**
+ * @generated from field: string path = 1;
+ */
+ path: string
- /**
- * @generated from field: bool recursive = 2;
- */
- recursive: boolean;
-};
+ /**
+ * @generated from field: bool recursive = 2;
+ */
+ recursive: boolean
+ }
/**
* Describes the message filesystem.CreateWatcherRequest.
* Use `create(CreateWatcherRequestSchema)` to create a new message.
*/
-export const CreateWatcherRequestSchema: GenMessage<CreateWatcherRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 14);
+export const CreateWatcherRequestSchema: GenMessage<CreateWatcherRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 14)
/**
* @generated from message filesystem.CreateWatcherResponse
*/
-export type CreateWatcherResponse = Message<"filesystem.CreateWatcherResponse"> & {
- /**
- * @generated from field: string watcher_id = 1;
- */
- watcherId: string;
-};
+export type CreateWatcherResponse =
+ Message<'filesystem.CreateWatcherResponse'> & {
+ /**
+ * @generated from field: string watcher_id = 1;
+ */
+ watcherId: string
+ }
/**
* Describes the message filesystem.CreateWatcherResponse.
* Use `create(CreateWatcherResponseSchema)` to create a new message.
*/
-export const CreateWatcherResponseSchema: GenMessage<CreateWatcherResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 15);
+export const CreateWatcherResponseSchema: GenMessage<CreateWatcherResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 15)
/**
* @generated from message filesystem.GetWatcherEventsRequest
*/
-export type GetWatcherEventsRequest = Message<"filesystem.GetWatcherEventsRequest"> & {
- /**
- * @generated from field: string watcher_id = 1;
- */
- watcherId: string;
-};
+export type GetWatcherEventsRequest =
+ Message<'filesystem.GetWatcherEventsRequest'> & {
+ /**
+ * @generated from field: string watcher_id = 1;
+ */
+ watcherId: string
+ }
/**
* Describes the message filesystem.GetWatcherEventsRequest.
* Use `create(GetWatcherEventsRequestSchema)` to create a new message.
*/
-export const GetWatcherEventsRequestSchema: GenMessage<GetWatcherEventsRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 16);
+export const GetWatcherEventsRequestSchema: GenMessage<GetWatcherEventsRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 16)
/**
* @generated from message filesystem.GetWatcherEventsResponse
*/
-export type GetWatcherEventsResponse = Message<"filesystem.GetWatcherEventsResponse"> & {
- /**
- * @generated from field: repeated filesystem.FilesystemEvent events = 1;
- */
- events: FilesystemEvent[];
-};
+export type GetWatcherEventsResponse =
+ Message<'filesystem.GetWatcherEventsResponse'> & {
+ /**
+ * @generated from field: repeated filesystem.FilesystemEvent events = 1;
+ */
+ events: FilesystemEvent[]
+ }
/**
* Describes the message filesystem.GetWatcherEventsResponse.
* Use `create(GetWatcherEventsResponseSchema)` to create a new message.
*/
-export const GetWatcherEventsResponseSchema: GenMessage<GetWatcherEventsResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 17);
+export const GetWatcherEventsResponseSchema: GenMessage<GetWatcherEventsResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 17)
/**
* @generated from message filesystem.RemoveWatcherRequest
*/
-export type RemoveWatcherRequest = Message<"filesystem.RemoveWatcherRequest"> & {
- /**
- * @generated from field: string watcher_id = 1;
- */
- watcherId: string;
-};
+export type RemoveWatcherRequest =
+ Message<'filesystem.RemoveWatcherRequest'> & {
+ /**
+ * @generated from field: string watcher_id = 1;
+ */
+ watcherId: string
+ }
/**
* Describes the message filesystem.RemoveWatcherRequest.
* Use `create(RemoveWatcherRequestSchema)` to create a new message.
*/
-export const RemoveWatcherRequestSchema: GenMessage<RemoveWatcherRequest> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 18);
+export const RemoveWatcherRequestSchema: GenMessage<RemoveWatcherRequest> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 18)
/**
* @generated from message filesystem.RemoveWatcherResponse
*/
-export type RemoveWatcherResponse = Message<"filesystem.RemoveWatcherResponse"> & {
-};
+export type RemoveWatcherResponse =
+ Message<'filesystem.RemoveWatcherResponse'> & {}
/**
* Describes the message filesystem.RemoveWatcherResponse.
* Use `create(RemoveWatcherResponseSchema)` to create a new message.
*/
-export const RemoveWatcherResponseSchema: GenMessage<RemoveWatcherResponse> = /*@__PURE__*/
- messageDesc(file_filesystem_filesystem, 19);
+export const RemoveWatcherResponseSchema: GenMessage<RemoveWatcherResponse> =
+ /*@__PURE__*/
+ messageDesc(file_filesystem_filesystem, 19)
/**
* @generated from enum filesystem.FileType
@@ -485,8 +529,9 @@ export enum FileType {
/**
* Describes the enum filesystem.FileType.
*/
-export const FileTypeSchema: GenEnum<FileType> = /*@__PURE__*/
- enumDesc(file_filesystem_filesystem, 0);
+export const FileTypeSchema: GenEnum<FileType> =
+ /*@__PURE__*/
+ enumDesc(file_filesystem_filesystem, 0)
/**
* @generated from enum filesystem.EventType
@@ -526,8 +571,9 @@ export enum EventType {
/**
* Describes the enum filesystem.EventType.
*/
-export const EventTypeSchema: GenEnum<EventType> = /*@__PURE__*/
- enumDesc(file_filesystem_filesystem, 1);
+export const EventTypeSchema: GenEnum<EventType> =
+ /*@__PURE__*/
+ enumDesc(file_filesystem_filesystem, 1)
/**
* @generated from service filesystem.Filesystem
@@ -537,76 +583,74 @@ export const Filesystem: GenService<{
* @generated from rpc filesystem.Filesystem.Stat
*/
stat: {
- methodKind: "unary";
- input: typeof StatRequestSchema;
- output: typeof StatResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof StatRequestSchema
+ output: typeof StatResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.MakeDir
*/
makeDir: {
- methodKind: "unary";
- input: typeof MakeDirRequestSchema;
- output: typeof MakeDirResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof MakeDirRequestSchema
+ output: typeof MakeDirResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.Move
*/
move: {
- methodKind: "unary";
- input: typeof MoveRequestSchema;
- output: typeof MoveResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof MoveRequestSchema
+ output: typeof MoveResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.ListDir
*/
listDir: {
- methodKind: "unary";
- input: typeof ListDirRequestSchema;
- output: typeof ListDirResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof ListDirRequestSchema
+ output: typeof ListDirResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.Remove
*/
remove: {
- methodKind: "unary";
- input: typeof RemoveRequestSchema;
- output: typeof RemoveResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof RemoveRequestSchema
+ output: typeof RemoveResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.WatchDir
*/
watchDir: {
- methodKind: "server_streaming";
- input: typeof WatchDirRequestSchema;
- output: typeof WatchDirResponseSchema;
- },
+ methodKind: 'server_streaming'
+ input: typeof WatchDirRequestSchema
+ output: typeof WatchDirResponseSchema
+ }
/**
* Non-streaming versions of WatchDir
*
* @generated from rpc filesystem.Filesystem.CreateWatcher
*/
createWatcher: {
- methodKind: "unary";
- input: typeof CreateWatcherRequestSchema;
- output: typeof CreateWatcherResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof CreateWatcherRequestSchema
+ output: typeof CreateWatcherResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.GetWatcherEvents
*/
getWatcherEvents: {
- methodKind: "unary";
- input: typeof GetWatcherEventsRequestSchema;
- output: typeof GetWatcherEventsResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof GetWatcherEventsRequestSchema
+ output: typeof GetWatcherEventsResponseSchema
+ }
/**
* @generated from rpc filesystem.Filesystem.RemoveWatcher
*/
removeWatcher: {
- methodKind: "unary";
- input: typeof RemoveWatcherRequestSchema;
- output: typeof RemoveWatcherResponseSchema;
- },
-}> = /*@__PURE__*/
- serviceDesc(file_filesystem_filesystem, 0);
-
+ methodKind: 'unary'
+ input: typeof RemoveWatcherRequestSchema
+ output: typeof RemoveWatcherResponseSchema
+ }
+}> = /*@__PURE__*/ serviceDesc(file_filesystem_filesystem, 0)
diff --git a/packages/js-sdk/src/envd/process/process_connect.ts b/packages/js-sdk/src/envd/process/process_connect.ts
index bff817f86..42997984f 100644
--- a/packages/js-sdk/src/envd/process/process_connect.ts
+++ b/packages/js-sdk/src/envd/process/process_connect.ts
@@ -3,20 +3,35 @@
/* eslint-disable */
// @ts-nocheck
-import { ConnectRequest, ConnectResponse, ListRequest, ListResponse, SendInputRequest, SendInputResponse, SendSignalRequest, SendSignalResponse, StartRequest, StartResponse, StreamInputRequest, StreamInputResponse, UpdateRequest, UpdateResponse } from "./process_pb.js";
-import { MethodKind } from "@bufbuild/protobuf";
+import {
+ ConnectRequest,
+ ConnectResponse,
+ ListRequest,
+ ListResponse,
+ SendInputRequest,
+ SendInputResponse,
+ SendSignalRequest,
+ SendSignalResponse,
+ StartRequest,
+ StartResponse,
+ StreamInputRequest,
+ StreamInputResponse,
+ UpdateRequest,
+ UpdateResponse,
+} from './process_pb.js'
+import { MethodKind } from '@bufbuild/protobuf'
/**
* @generated from service process.Process
*/
export const Process = {
- typeName: "process.Process",
+ typeName: 'process.Process',
methods: {
/**
* @generated from rpc process.Process.List
*/
list: {
- name: "List",
+ name: 'List',
I: ListRequest,
O: ListResponse,
kind: MethodKind.Unary,
@@ -25,7 +40,7 @@ export const Process = {
* @generated from rpc process.Process.Connect
*/
connect: {
- name: "Connect",
+ name: 'Connect',
I: ConnectRequest,
O: ConnectResponse,
kind: MethodKind.ServerStreaming,
@@ -34,7 +49,7 @@ export const Process = {
* @generated from rpc process.Process.Start
*/
start: {
- name: "Start",
+ name: 'Start',
I: StartRequest,
O: StartResponse,
kind: MethodKind.ServerStreaming,
@@ -43,7 +58,7 @@ export const Process = {
* @generated from rpc process.Process.Update
*/
update: {
- name: "Update",
+ name: 'Update',
I: UpdateRequest,
O: UpdateResponse,
kind: MethodKind.Unary,
@@ -54,7 +69,7 @@ export const Process = {
* @generated from rpc process.Process.StreamInput
*/
streamInput: {
- name: "StreamInput",
+ name: 'StreamInput',
I: StreamInputRequest,
O: StreamInputResponse,
kind: MethodKind.ClientStreaming,
@@ -63,7 +78,7 @@ export const Process = {
* @generated from rpc process.Process.SendInput
*/
sendInput: {
- name: "SendInput",
+ name: 'SendInput',
I: SendInputRequest,
O: SendInputResponse,
kind: MethodKind.Unary,
@@ -72,11 +87,10 @@ export const Process = {
* @generated from rpc process.Process.SendSignal
*/
sendSignal: {
- name: "SendSignal",
+ name: 'SendSignal',
I: SendSignalRequest,
O: SendSignalResponse,
kind: MethodKind.Unary,
},
- }
-} as const;
-
+ },
+} as const
diff --git a/packages/js-sdk/src/envd/process/process_pb.ts b/packages/js-sdk/src/envd/process/process_pb.ts
index e39d141fd..9f39bd9c1 100644
--- a/packages/js-sdk/src/envd/process/process_pb.ts
+++ b/packages/js-sdk/src/envd/process/process_pb.ts
@@ -2,617 +2,676 @@
// @generated from file process/process.proto (package process, syntax proto3)
/* eslint-disable */
-import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
-import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
-import type { Message } from "@bufbuild/protobuf";
+import type {
+ GenEnum,
+ GenFile,
+ GenMessage,
+ GenService,
+} from '@bufbuild/protobuf/codegenv2'
+import {
+ enumDesc,
+ fileDesc,
+ messageDesc,
+ serviceDesc,
+} from '@bufbuild/protobuf/codegenv2'
+import type { Message } from '@bufbuild/protobuf'
/**
* Describes the file process/process.proto.
*/
-export const file_process_process: GenFile = /*@__PURE__*/
- fileDesc("ChVwcm9jZXNzL3Byb2Nlc3MucHJvdG8SB3Byb2Nlc3MiSgoDUFRZEh8KBHNpemUYASABKAsyES5wcm9jZXNzLlBUWS5TaXplGiIKBFNpemUSDAoEY29scxgBIAEoDRIMCgRyb3dzGAIgASgNIqEBCg1Qcm9jZXNzQ29uZmlnEgsKA2NtZBgBIAEoCRIMCgRhcmdzGAIgAygJEi4KBGVudnMYAyADKAsyIC5wcm9jZXNzLlByb2Nlc3NDb25maWcuRW52c0VudHJ5EhAKA2N3ZBgEIAEoCUgAiAEBGisKCUVudnNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBQgYKBF9jd2QiDQoLTGlzdFJlcXVlc3QiXAoLUHJvY2Vzc0luZm8SJgoGY29uZmlnGAEgASgLMhYucHJvY2Vzcy5Qcm9jZXNzQ29uZmlnEgsKA3BpZBgCIAEoDRIQCgN0YWcYAyABKAlIAIgBAUIGCgRfdGFnIjcKDExpc3RSZXNwb25zZRInCglwcm9jZXNzZXMYASADKAsyFC5wcm9jZXNzLlByb2Nlc3NJbmZvInkKDFN0YXJ0UmVxdWVzdBInCgdwcm9jZXNzGAEgASgLMhYucHJvY2Vzcy5Qcm9jZXNzQ29uZmlnEh4KA3B0eRgCIAEoCzIMLnByb2Nlc3MuUFRZSACIAQESEAoDdGFnGAMgASgJSAGIAQFCBgoEX3B0eUIGCgRfdGFnImIKDVVwZGF0ZVJlcXVlc3QSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yEh4KA3B0eRgCIAEoCzIMLnByb2Nlc3MuUFRZSACIAQFCBgoEX3B0eSIQCg5VcGRhdGVSZXNwb25zZSKvAwoMUHJvY2Vzc0V2ZW50EjEKBXN0YXJ0GAEgASgLMiAucHJvY2Vzcy5Qcm9jZXNzRXZlbnQuU3RhcnRFdmVudEgAEi8KBGRhdGEYAiABKAsyHy5wcm9jZXNzLlByb2Nlc3NFdmVudC5EYXRhRXZlbnRIABItCgNlbmQYAyABKAsyHi5wcm9jZXNzLlByb2Nlc3NFdmVudC5FbmRFdmVudEgAEjQKCWtlZXBhbGl2ZRgEIAEoCzIfLnByb2Nlc3MuUHJvY2Vzc0V2ZW50LktlZXBBbGl2ZUgAGhkKClN0YXJ0RXZlbnQSCwoDcGlkGAEgASgNGkgKCURhdGFFdmVudBIQCgZzdGRvdXQYASABKAxIABIQCgZzdGRlcnIYAiABKAxIABINCgNwdHkYAyABKAxIAEIICgZvdXRwdXQaWwoIRW5kRXZlbnQSEQoJZXhpdF9jb2RlGAEgASgREg4KBmV4aXRlZBgCIAEoCBIOCgZzdGF0dXMYAyABKAkSEgoFZXJyb3IYBCABKAlIAIgBAUIICgZfZXJyb3IaCwoJS2VlcEFsaXZlQgcKBWV2ZW50IjUKDVN0YXJ0UmVzcG9uc2USJAoFZXZlbnQYASABKAsyFS5wcm9jZXNzLlByb2Nlc3NFdmVudCI3Cg9Db25uZWN0UmVzcG9uc2USJAoFZXZlbnQYASABKAsyFS5wcm9jZXNzLlByb2Nlc3NFdmVudCJjChBTZW5kSW5wdXRSZXF1ZXN0EikKB3Byb2Nlc3MYASABKAsyGC5wcm9jZXNzLlByb2Nlc3NTZWxlY3RvchIkCgVpbnB1dBgCIAEoCzIVLnByb2Nlc3MuUHJvY2Vzc0lucHV0IhMKEVNlbmRJbnB1dFJlc3BvbnNlIjcKDFByb2Nlc3NJbnB1dBIPCgVzdGRpbhgBIAEoDEgAEg0KA3B0eRgCIAEoDEgAQgcKBWlucHV0IsICChJTdHJlYW1JbnB1dFJlcXVlc3QSNwoFc3RhcnQYASABKAsyJi5wcm9jZXNzLlN0cmVhbUlucHV0UmVxdWVzdC5TdGFydEV2ZW50SAASNQoEZGF0YRgCIAEoCzIlLnByb2Nlc3MuU3RyZWFtSW5wdXRSZXF1ZXN0LkRhdGFFdmVudEgAEjoKCWtlZXBhbGl2ZRgDIAEoCzIlLnByb2Nlc3MuU3RyZWFtSW5wdXRSZXF1ZXN0LktlZXBBbGl2ZUgAGjcKClN0YXJ0RXZlbnQSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yGjEKCURhdGFFdmVudBIkCgVpbnB1dBgCIAEoCzIVLnByb2Nlc3MuUHJvY2Vzc0lucHV0GgsKCUtlZXBBbGl2ZUIHCgVldmVudCIVChNTdHJlYW1JbnB1dFJlc3BvbnNlIl8KEVNlbmRTaWduYWxSZXF1ZXN0EikKB3Byb2Nlc3MYASABKAsyGC5wcm9jZXNzLlByb2Nlc3NTZWxlY3RvchIfCgZzaWduYWwYAiABKA4yDy5wcm9jZXNzLlNpZ25hbCIUChJTZW5kU2lnbmFsUmVzcG9uc2UiOwoOQ29ubmVjdFJlcXVlc3QSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yIjsKD1Byb2Nlc3NTZWxlY3RvchINCgNwaWQYASABKA1IABINCgN0YWcYAiABKAlIAEIKCghzZWxlY3RvcipICgZTaWduYWwSFgoSU0lHTkFMX1VOU1BFQ0lGSUVEEAASEgoOU0lHTkFMX1NJR1RFUk0QDxISCg5TSUdOQUxfU0lHS0lMTBAJMsoDCgdQcm9jZXNzEjMKBExpc3QSFC5wcm9jZXNzLkxpc3RSZXF1ZXN0GhUucHJvY2Vzcy5MaXN0UmVzcG9uc2USPgoHQ29ubmVjdBIXLnByb2Nlc3MuQ29ubmVjdFJlcXVlc3QaGC5wcm9jZXNzLkNvbm5lY3RSZXNwb25zZTABEjgKBVN0YXJ0EhUucHJvY2Vzcy5TdGFydFJlcXVlc3QaFi5wcm9jZXNzLlN0YXJ0UmVzcG9uc2UwARI5CgZVcGRhdGUSFi5wcm9jZXNzLlVwZGF0ZVJlcXVlc3QaFy5wcm9jZXNzLlVwZGF0ZVJlc3BvbnNlEkoKC1N0cmVhbUlucHV0EhsucHJvY2Vzcy5TdHJlYW1JbnB1dFJlcXVlc3QaHC5wcm9jZXNzLlN0cmVhbUlucHV0UmVzcG9uc2UoARJCCglTZW5kSW5wdXQSGS5wcm9jZXNzLlNlbmRJbnB1dFJlcXVlc3QaGi5wcm9jZXNzLlNlbmRJbnB1dFJlc3BvbnNlEkUKClNlbmRTaWduYWwSGi5wcm9jZXNzLlNlbmRTaWduYWxSZXF1ZXN0GhsucHJvY2Vzcy5TZW5kU2lnbmFsUmVzcG9uc2VCVwoLY29tLnByb2Nlc3NCDFByb2Nlc3NQcm90b1ABogIDUFhYqgIHUHJvY2Vzc8oCB1Byb2Nlc3PiAhNQcm9jZXNzXEdQQk1ldGFkYXRh6gIHUHJvY2Vzc2IGcHJvdG8z");
+export const file_process_process: GenFile =
+ /*@__PURE__*/
+ fileDesc(
+ 'ChVwcm9jZXNzL3Byb2Nlc3MucHJvdG8SB3Byb2Nlc3MiSgoDUFRZEh8KBHNpemUYASABKAsyES5wcm9jZXNzLlBUWS5TaXplGiIKBFNpemUSDAoEY29scxgBIAEoDRIMCgRyb3dzGAIgASgNIqEBCg1Qcm9jZXNzQ29uZmlnEgsKA2NtZBgBIAEoCRIMCgRhcmdzGAIgAygJEi4KBGVudnMYAyADKAsyIC5wcm9jZXNzLlByb2Nlc3NDb25maWcuRW52c0VudHJ5EhAKA2N3ZBgEIAEoCUgAiAEBGisKCUVudnNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBQgYKBF9jd2QiDQoLTGlzdFJlcXVlc3QiXAoLUHJvY2Vzc0luZm8SJgoGY29uZmlnGAEgASgLMhYucHJvY2Vzcy5Qcm9jZXNzQ29uZmlnEgsKA3BpZBgCIAEoDRIQCgN0YWcYAyABKAlIAIgBAUIGCgRfdGFnIjcKDExpc3RSZXNwb25zZRInCglwcm9jZXNzZXMYASADKAsyFC5wcm9jZXNzLlByb2Nlc3NJbmZvInkKDFN0YXJ0UmVxdWVzdBInCgdwcm9jZXNzGAEgASgLMhYucHJvY2Vzcy5Qcm9jZXNzQ29uZmlnEh4KA3B0eRgCIAEoCzIMLnByb2Nlc3MuUFRZSACIAQESEAoDdGFnGAMgASgJSAGIAQFCBgoEX3B0eUIGCgRfdGFnImIKDVVwZGF0ZVJlcXVlc3QSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yEh4KA3B0eRgCIAEoCzIMLnByb2Nlc3MuUFRZSACIAQFCBgoEX3B0eSIQCg5VcGRhdGVSZXNwb25zZSKvAwoMUHJvY2Vzc0V2ZW50EjEKBXN0YXJ0GAEgASgLMiAucHJvY2Vzcy5Qcm9jZXNzRXZlbnQuU3RhcnRFdmVudEgAEi8KBGRhdGEYAiABKAsyHy5wcm9jZXNzLlByb2Nlc3NFdmVudC5EYXRhRXZlbnRIABItCgNlbmQYAyABKAsyHi5wcm9jZXNzLlByb2Nlc3NFdmVudC5FbmRFdmVudEgAEjQKCWtlZXBhbGl2ZRgEIAEoCzIfLnByb2Nlc3MuUHJvY2Vzc0V2ZW50LktlZXBBbGl2ZUgAGhkKClN0YXJ0RXZlbnQSCwoDcGlkGAEgASgNGkgKCURhdGFFdmVudBIQCgZzdGRvdXQYASABKAxIABIQCgZzdGRlcnIYAiABKAxIABINCgNwdHkYAyABKAxIAEIICgZvdXRwdXQaWwoIRW5kRXZlbnQSEQoJZXhpdF9jb2RlGAEgASgREg4KBmV4aXRlZBgCIAEoCBIOCgZzdGF0dXMYAyABKAkSEgoFZXJyb3IYBCABKAlIAIgBAUIICgZfZXJyb3IaCwoJS2VlcEFsaXZlQgcKBWV2ZW50IjUKDVN0YXJ0UmVzcG9uc2USJAoFZXZlbnQYASABKAsyFS5wcm9jZXNzLlByb2Nlc3NFdmVudCI3Cg9Db25uZWN0UmVzcG9uc2USJAoFZXZlbnQYASABKAsyFS5wcm9jZXNzLlByb2Nlc3NFdmVudCJjChBTZW5kSW5wdXRSZXF1ZXN0EikKB3Byb2Nlc3MYASABKAsyGC5wcm9jZXNzLlByb2Nlc3NTZWxlY3RvchIkCgVpbnB1dBgCIAEoCzIVLnByb2Nlc3MuUHJvY2Vzc0lucHV0IhMKEVNlbmRJbnB1dFJlc3BvbnNlIjcKDFByb2Nlc3NJbnB1dBIPCgVzdGRpbhgBIAEoDEgAEg0KA3B0eRgCIAEoDEgAQgcKBWlucHV0IsICChJTdHJlYW1JbnB1dFJlcXVlc3QSNwoFc3RhcnQYASABKAsyJi5wcm9jZXNzLlN0cmVhbUlucHV0UmVxdWVzdC5TdGFydEV2ZW50SAASNQoEZGF0YRgCIAEoCzIlLnByb2Nlc3MuU3RyZWFtSW5wdXRSZXF1ZXN0LkRhdGFFdmVudEgAEjoKCWtlZXBhbGl2ZRgDIAEoCzIlLnByb2Nlc3MuU3RyZWFtSW5wdXRSZXF1ZXN0LktlZXBBbGl2ZUgAGjcKClN0YXJ0RXZlbnQSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yGjEKCURhdGFFdmVudBIkCgVpbnB1dBgCIAEoCzIVLnByb2Nlc3MuUHJvY2Vzc0lucHV0GgsKCUtlZXBBbGl2ZUIHCgVldmVudCIVChNTdHJlYW1JbnB1dFJlc3BvbnNlIl8KEVNlbmRTaWduYWxSZXF1ZXN0EikKB3Byb2Nlc3MYASABKAsyGC5wcm9jZXNzLlByb2Nlc3NTZWxlY3RvchIfCgZzaWduYWwYAiABKA4yDy5wcm9jZXNzLlNpZ25hbCIUChJTZW5kU2lnbmFsUmVzcG9uc2UiOwoOQ29ubmVjdFJlcXVlc3QSKQoHcHJvY2VzcxgBIAEoCzIYLnByb2Nlc3MuUHJvY2Vzc1NlbGVjdG9yIjsKD1Byb2Nlc3NTZWxlY3RvchINCgNwaWQYASABKA1IABINCgN0YWcYAiABKAlIAEIKCghzZWxlY3RvcipICgZTaWduYWwSFgoSU0lHTkFMX1VOU1BFQ0lGSUVEEAASEgoOU0lHTkFMX1NJR1RFUk0QDxISCg5TSUdOQUxfU0lHS0lMTBAJMsoDCgdQcm9jZXNzEjMKBExpc3QSFC5wcm9jZXNzLkxpc3RSZXF1ZXN0GhUucHJvY2Vzcy5MaXN0UmVzcG9uc2USPgoHQ29ubmVjdBIXLnByb2Nlc3MuQ29ubmVjdFJlcXVlc3QaGC5wcm9jZXNzLkNvbm5lY3RSZXNwb25zZTABEjgKBVN0YXJ0EhUucHJvY2Vzcy5TdGFydFJlcXVlc3QaFi5wcm9jZXNzLlN0YXJ0UmVzcG9uc2UwARI5CgZVcGRhdGUSFi5wcm9jZXNzLlVwZGF0ZVJlcXVlc3QaFy5wcm9jZXNzLlVwZGF0ZVJlc3BvbnNlEkoKC1N0cmVhbUlucHV0EhsucHJvY2Vzcy5TdHJlYW1JbnB1dFJlcXVlc3QaHC5wcm9jZXNzLlN0cmVhbUlucHV0UmVzcG9uc2UoARJCCglTZW5kSW5wdXQSGS5wcm9jZXNzLlNlbmRJbnB1dFJlcXVlc3QaGi5wcm9jZXNzLlNlbmRJbnB1dFJlc3BvbnNlEkUKClNlbmRTaWduYWwSGi5wcm9jZXNzLlNlbmRTaWduYWxSZXF1ZXN0GhsucHJvY2Vzcy5TZW5kU2lnbmFsUmVzcG9uc2VCVwoLY29tLnByb2Nlc3NCDFByb2Nlc3NQcm90b1ABogIDUFhYqgIHUHJvY2Vzc8oCB1Byb2Nlc3PiAhNQcm9jZXNzXEdQQk1ldGFkYXRh6gIHUHJvY2Vzc2IGcHJvdG8z'
+ )
/**
* @generated from message process.PTY
*/
-export type PTY = Message<"process.PTY"> & {
+export type PTY = Message<'process.PTY'> & {
/**
* @generated from field: process.PTY.Size size = 1;
*/
- size?: PTY_Size;
-};
+ size?: PTY_Size
+}
/**
* Describes the message process.PTY.
* Use `create(PTYSchema)` to create a new message.
*/
-export const PTYSchema: GenMessage<PTY> = /*@__PURE__*/
- messageDesc(file_process_process, 0);
+export const PTYSchema: GenMessage<PTY> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 0)
/**
* @generated from message process.PTY.Size
*/
-export type PTY_Size = Message<"process.PTY.Size"> & {
+export type PTY_Size = Message<'process.PTY.Size'> & {
/**
* @generated from field: uint32 cols = 1;
*/
- cols: number;
+ cols: number
/**
* @generated from field: uint32 rows = 2;
*/
- rows: number;
-};
+ rows: number
+}
/**
* Describes the message process.PTY.Size.
* Use `create(PTY_SizeSchema)` to create a new message.
*/
-export const PTY_SizeSchema: GenMessage<PTY_Size> = /*@__PURE__*/
- messageDesc(file_process_process, 0, 0);
+export const PTY_SizeSchema: GenMessage<PTY_Size> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 0, 0)
/**
* @generated from message process.ProcessConfig
*/
-export type ProcessConfig = Message<"process.ProcessConfig"> & {
+export type ProcessConfig = Message<'process.ProcessConfig'> & {
/**
* @generated from field: string cmd = 1;
*/
- cmd: string;
+ cmd: string
/**
* @generated from field: repeated string args = 2;
*/
- args: string[];
+ args: string[]
/**
* @generated from field: map<string, string> envs = 3;
*/
- envs: { [key: string]: string };
+ envs: { [key: string]: string }
/**
* @generated from field: optional string cwd = 4;
*/
- cwd?: string;
-};
+ cwd?: string
+}
/**
* Describes the message process.ProcessConfig.
* Use `create(ProcessConfigSchema)` to create a new message.
*/
-export const ProcessConfigSchema: GenMessage<ProcessConfig> = /*@__PURE__*/
- messageDesc(file_process_process, 1);
+export const ProcessConfigSchema: GenMessage<ProcessConfig> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 1)
/**
* @generated from message process.ListRequest
*/
-export type ListRequest = Message<"process.ListRequest"> & {
-};
+export type ListRequest = Message<'process.ListRequest'> & {}
/**
* Describes the message process.ListRequest.
* Use `create(ListRequestSchema)` to create a new message.
*/
-export const ListRequestSchema: GenMessage<ListRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 2);
+export const ListRequestSchema: GenMessage<ListRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 2)
/**
* @generated from message process.ProcessInfo
*/
-export type ProcessInfo = Message<"process.ProcessInfo"> & {
+export type ProcessInfo = Message<'process.ProcessInfo'> & {
/**
* @generated from field: process.ProcessConfig config = 1;
*/
- config?: ProcessConfig;
+ config?: ProcessConfig
/**
* @generated from field: uint32 pid = 2;
*/
- pid: number;
+ pid: number
/**
* @generated from field: optional string tag = 3;
*/
- tag?: string;
-};
+ tag?: string
+}
/**
* Describes the message process.ProcessInfo.
* Use `create(ProcessInfoSchema)` to create a new message.
*/
-export const ProcessInfoSchema: GenMessage<ProcessInfo> = /*@__PURE__*/
- messageDesc(file_process_process, 3);
+export const ProcessInfoSchema: GenMessage<ProcessInfo> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 3)
/**
* @generated from message process.ListResponse
*/
-export type ListResponse = Message<"process.ListResponse"> & {
+export type ListResponse = Message<'process.ListResponse'> & {
/**
* @generated from field: repeated process.ProcessInfo processes = 1;
*/
- processes: ProcessInfo[];
-};
+ processes: ProcessInfo[]
+}
/**
* Describes the message process.ListResponse.
* Use `create(ListResponseSchema)` to create a new message.
*/
-export const ListResponseSchema: GenMessage<ListResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 4);
+export const ListResponseSchema: GenMessage<ListResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 4)
/**
* @generated from message process.StartRequest
*/
-export type StartRequest = Message<"process.StartRequest"> & {
+export type StartRequest = Message<'process.StartRequest'> & {
/**
* @generated from field: process.ProcessConfig process = 1;
*/
- process?: ProcessConfig;
+ process?: ProcessConfig
/**
* @generated from field: optional process.PTY pty = 2;
*/
- pty?: PTY;
+ pty?: PTY
/**
* @generated from field: optional string tag = 3;
*/
- tag?: string;
-};
+ tag?: string
+}
/**
* Describes the message process.StartRequest.
* Use `create(StartRequestSchema)` to create a new message.
*/
-export const StartRequestSchema: GenMessage<StartRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 5);
+export const StartRequestSchema: GenMessage<StartRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 5)
/**
* @generated from message process.UpdateRequest
*/
-export type UpdateRequest = Message<"process.UpdateRequest"> & {
+export type UpdateRequest = Message<'process.UpdateRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
- process?: ProcessSelector;
+ process?: ProcessSelector
/**
* @generated from field: optional process.PTY pty = 2;
*/
- pty?: PTY;
-};
+ pty?: PTY
+}
/**
* Describes the message process.UpdateRequest.
* Use `create(UpdateRequestSchema)` to create a new message.
*/
-export const UpdateRequestSchema: GenMessage<UpdateRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 6);
+export const UpdateRequestSchema: GenMessage<UpdateRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 6)
/**
* @generated from message process.UpdateResponse
*/
-export type UpdateResponse = Message<"process.UpdateResponse"> & {
-};
+export type UpdateResponse = Message<'process.UpdateResponse'> & {}
/**
* Describes the message process.UpdateResponse.
* Use `create(UpdateResponseSchema)` to create a new message.
*/
-export const UpdateResponseSchema: GenMessage<UpdateResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 7);
+export const UpdateResponseSchema: GenMessage<UpdateResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 7)
/**
* @generated from message process.ProcessEvent
*/
-export type ProcessEvent = Message<"process.ProcessEvent"> & {
+export type ProcessEvent = Message<'process.ProcessEvent'> & {
/**
* @generated from oneof process.ProcessEvent.event
*/
- event: {
- /**
- * @generated from field: process.ProcessEvent.StartEvent start = 1;
- */
- value: ProcessEvent_StartEvent;
- case: "start";
- } | {
- /**
- * @generated from field: process.ProcessEvent.DataEvent data = 2;
- */
- value: ProcessEvent_DataEvent;
- case: "data";
- } | {
- /**
- * @generated from field: process.ProcessEvent.EndEvent end = 3;
- */
- value: ProcessEvent_EndEvent;
- case: "end";
- } | {
- /**
- * @generated from field: process.ProcessEvent.KeepAlive keepalive = 4;
- */
- value: ProcessEvent_KeepAlive;
- case: "keepalive";
- } | { case: undefined; value?: undefined };
-};
+ event:
+ | {
+ /**
+ * @generated from field: process.ProcessEvent.StartEvent start = 1;
+ */
+ value: ProcessEvent_StartEvent
+ case: 'start'
+ }
+ | {
+ /**
+ * @generated from field: process.ProcessEvent.DataEvent data = 2;
+ */
+ value: ProcessEvent_DataEvent
+ case: 'data'
+ }
+ | {
+ /**
+ * @generated from field: process.ProcessEvent.EndEvent end = 3;
+ */
+ value: ProcessEvent_EndEvent
+ case: 'end'
+ }
+ | {
+ /**
+ * @generated from field: process.ProcessEvent.KeepAlive keepalive = 4;
+ */
+ value: ProcessEvent_KeepAlive
+ case: 'keepalive'
+ }
+ | { case: undefined; value?: undefined }
+}
/**
* Describes the message process.ProcessEvent.
* Use `create(ProcessEventSchema)` to create a new message.
*/
-export const ProcessEventSchema: GenMessage<ProcessEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 8);
+export const ProcessEventSchema: GenMessage<ProcessEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 8)
/**
* @generated from message process.ProcessEvent.StartEvent
*/
-export type ProcessEvent_StartEvent = Message<"process.ProcessEvent.StartEvent"> & {
- /**
- * @generated from field: uint32 pid = 1;
- */
- pid: number;
-};
+export type ProcessEvent_StartEvent =
+ Message<'process.ProcessEvent.StartEvent'> & {
+ /**
+ * @generated from field: uint32 pid = 1;
+ */
+ pid: number
+ }
/**
* Describes the message process.ProcessEvent.StartEvent.
* Use `create(ProcessEvent_StartEventSchema)` to create a new message.
*/
-export const ProcessEvent_StartEventSchema: GenMessage<ProcessEvent_StartEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 8, 0);
+export const ProcessEvent_StartEventSchema: GenMessage<ProcessEvent_StartEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 8, 0)
/**
* @generated from message process.ProcessEvent.DataEvent
*/
-export type ProcessEvent_DataEvent = Message<"process.ProcessEvent.DataEvent"> & {
- /**
- * @generated from oneof process.ProcessEvent.DataEvent.output
- */
- output: {
+export type ProcessEvent_DataEvent =
+ Message<'process.ProcessEvent.DataEvent'> & {
/**
- * @generated from field: bytes stdout = 1;
+ * @generated from oneof process.ProcessEvent.DataEvent.output
*/
- value: Uint8Array;
- case: "stdout";
- } | {
- /**
- * @generated from field: bytes stderr = 2;
- */
- value: Uint8Array;
- case: "stderr";
- } | {
- /**
- * @generated from field: bytes pty = 3;
- */
- value: Uint8Array;
- case: "pty";
- } | { case: undefined; value?: undefined };
-};
+ output:
+ | {
+ /**
+ * @generated from field: bytes stdout = 1;
+ */
+ value: Uint8Array
+ case: 'stdout'
+ }
+ | {
+ /**
+ * @generated from field: bytes stderr = 2;
+ */
+ value: Uint8Array
+ case: 'stderr'
+ }
+ | {
+ /**
+ * @generated from field: bytes pty = 3;
+ */
+ value: Uint8Array
+ case: 'pty'
+ }
+ | { case: undefined; value?: undefined }
+ }
/**
* Describes the message process.ProcessEvent.DataEvent.
* Use `create(ProcessEvent_DataEventSchema)` to create a new message.
*/
-export const ProcessEvent_DataEventSchema: GenMessage<ProcessEvent_DataEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 8, 1);
+export const ProcessEvent_DataEventSchema: GenMessage<ProcessEvent_DataEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 8, 1)
/**
* @generated from message process.ProcessEvent.EndEvent
*/
-export type ProcessEvent_EndEvent = Message<"process.ProcessEvent.EndEvent"> & {
+export type ProcessEvent_EndEvent = Message<'process.ProcessEvent.EndEvent'> & {
/**
* @generated from field: sint32 exit_code = 1;
*/
- exitCode: number;
+ exitCode: number
/**
* @generated from field: bool exited = 2;
*/
- exited: boolean;
+ exited: boolean
/**
* @generated from field: string status = 3;
*/
- status: string;
+ status: string
/**
* @generated from field: optional string error = 4;
*/
- error?: string;
-};
+ error?: string
+}
/**
* Describes the message process.ProcessEvent.EndEvent.
* Use `create(ProcessEvent_EndEventSchema)` to create a new message.
*/
-export const ProcessEvent_EndEventSchema: GenMessage<ProcessEvent_EndEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 8, 2);
+export const ProcessEvent_EndEventSchema: GenMessage<ProcessEvent_EndEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 8, 2)
/**
* @generated from message process.ProcessEvent.KeepAlive
*/
-export type ProcessEvent_KeepAlive = Message<"process.ProcessEvent.KeepAlive"> & {
-};
+export type ProcessEvent_KeepAlive =
+ Message<'process.ProcessEvent.KeepAlive'> & {}
/**
* Describes the message process.ProcessEvent.KeepAlive.
* Use `create(ProcessEvent_KeepAliveSchema)` to create a new message.
*/
-export const ProcessEvent_KeepAliveSchema: GenMessage<ProcessEvent_KeepAlive> = /*@__PURE__*/
- messageDesc(file_process_process, 8, 3);
+export const ProcessEvent_KeepAliveSchema: GenMessage<ProcessEvent_KeepAlive> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 8, 3)
/**
* @generated from message process.StartResponse
*/
-export type StartResponse = Message<"process.StartResponse"> & {
+export type StartResponse = Message<'process.StartResponse'> & {
/**
* @generated from field: process.ProcessEvent event = 1;
*/
- event?: ProcessEvent;
-};
+ event?: ProcessEvent
+}
/**
* Describes the message process.StartResponse.
* Use `create(StartResponseSchema)` to create a new message.
*/
-export const StartResponseSchema: GenMessage<StartResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 9);
+export const StartResponseSchema: GenMessage<StartResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 9)
/**
* @generated from message process.ConnectResponse
*/
-export type ConnectResponse = Message<"process.ConnectResponse"> & {
+export type ConnectResponse = Message<'process.ConnectResponse'> & {
/**
* @generated from field: process.ProcessEvent event = 1;
*/
- event?: ProcessEvent;
-};
+ event?: ProcessEvent
+}
/**
* Describes the message process.ConnectResponse.
* Use `create(ConnectResponseSchema)` to create a new message.
*/
-export const ConnectResponseSchema: GenMessage<ConnectResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 10);
+export const ConnectResponseSchema: GenMessage<ConnectResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 10)
/**
* @generated from message process.SendInputRequest
*/
-export type SendInputRequest = Message<"process.SendInputRequest"> & {
+export type SendInputRequest = Message<'process.SendInputRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
- process?: ProcessSelector;
+ process?: ProcessSelector
/**
* @generated from field: process.ProcessInput input = 2;
*/
- input?: ProcessInput;
-};
+ input?: ProcessInput
+}
/**
* Describes the message process.SendInputRequest.
* Use `create(SendInputRequestSchema)` to create a new message.
*/
-export const SendInputRequestSchema: GenMessage<SendInputRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 11);
+export const SendInputRequestSchema: GenMessage<SendInputRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 11)
/**
* @generated from message process.SendInputResponse
*/
-export type SendInputResponse = Message<"process.SendInputResponse"> & {
-};
+export type SendInputResponse = Message<'process.SendInputResponse'> & {}
/**
* Describes the message process.SendInputResponse.
* Use `create(SendInputResponseSchema)` to create a new message.
*/
-export const SendInputResponseSchema: GenMessage<SendInputResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 12);
+export const SendInputResponseSchema: GenMessage<SendInputResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 12)
/**
* @generated from message process.ProcessInput
*/
-export type ProcessInput = Message<"process.ProcessInput"> & {
+export type ProcessInput = Message<'process.ProcessInput'> & {
/**
* @generated from oneof process.ProcessInput.input
*/
- input: {
- /**
- * @generated from field: bytes stdin = 1;
- */
- value: Uint8Array;
- case: "stdin";
- } | {
- /**
- * @generated from field: bytes pty = 2;
- */
- value: Uint8Array;
- case: "pty";
- } | { case: undefined; value?: undefined };
-};
+ input:
+ | {
+ /**
+ * @generated from field: bytes stdin = 1;
+ */
+ value: Uint8Array
+ case: 'stdin'
+ }
+ | {
+ /**
+ * @generated from field: bytes pty = 2;
+ */
+ value: Uint8Array
+ case: 'pty'
+ }
+ | { case: undefined; value?: undefined }
+}
/**
* Describes the message process.ProcessInput.
* Use `create(ProcessInputSchema)` to create a new message.
*/
-export const ProcessInputSchema: GenMessage<ProcessInput> = /*@__PURE__*/
- messageDesc(file_process_process, 13);
+export const ProcessInputSchema: GenMessage<ProcessInput> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 13)
/**
* @generated from message process.StreamInputRequest
*/
-export type StreamInputRequest = Message<"process.StreamInputRequest"> & {
+export type StreamInputRequest = Message<'process.StreamInputRequest'> & {
/**
* @generated from oneof process.StreamInputRequest.event
*/
- event: {
- /**
- * @generated from field: process.StreamInputRequest.StartEvent start = 1;
- */
- value: StreamInputRequest_StartEvent;
- case: "start";
- } | {
- /**
- * @generated from field: process.StreamInputRequest.DataEvent data = 2;
- */
- value: StreamInputRequest_DataEvent;
- case: "data";
- } | {
- /**
- * @generated from field: process.StreamInputRequest.KeepAlive keepalive = 3;
- */
- value: StreamInputRequest_KeepAlive;
- case: "keepalive";
- } | { case: undefined; value?: undefined };
-};
+ event:
+ | {
+ /**
+ * @generated from field: process.StreamInputRequest.StartEvent start = 1;
+ */
+ value: StreamInputRequest_StartEvent
+ case: 'start'
+ }
+ | {
+ /**
+ * @generated from field: process.StreamInputRequest.DataEvent data = 2;
+ */
+ value: StreamInputRequest_DataEvent
+ case: 'data'
+ }
+ | {
+ /**
+ * @generated from field: process.StreamInputRequest.KeepAlive keepalive = 3;
+ */
+ value: StreamInputRequest_KeepAlive
+ case: 'keepalive'
+ }
+ | { case: undefined; value?: undefined }
+}
/**
* Describes the message process.StreamInputRequest.
* Use `create(StreamInputRequestSchema)` to create a new message.
*/
-export const StreamInputRequestSchema: GenMessage<StreamInputRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 14);
+export const StreamInputRequestSchema: GenMessage<StreamInputRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 14)
/**
* @generated from message process.StreamInputRequest.StartEvent
*/
-export type StreamInputRequest_StartEvent = Message<"process.StreamInputRequest.StartEvent"> & {
- /**
- * @generated from field: process.ProcessSelector process = 1;
- */
- process?: ProcessSelector;
-};
+export type StreamInputRequest_StartEvent =
+ Message<'process.StreamInputRequest.StartEvent'> & {
+ /**
+ * @generated from field: process.ProcessSelector process = 1;
+ */
+ process?: ProcessSelector
+ }
/**
* Describes the message process.StreamInputRequest.StartEvent.
* Use `create(StreamInputRequest_StartEventSchema)` to create a new message.
*/
-export const StreamInputRequest_StartEventSchema: GenMessage<StreamInputRequest_StartEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 14, 0);
+export const StreamInputRequest_StartEventSchema: GenMessage<StreamInputRequest_StartEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 14, 0)
/**
* @generated from message process.StreamInputRequest.DataEvent
*/
-export type StreamInputRequest_DataEvent = Message<"process.StreamInputRequest.DataEvent"> & {
- /**
- * @generated from field: process.ProcessInput input = 2;
- */
- input?: ProcessInput;
-};
+export type StreamInputRequest_DataEvent =
+ Message<'process.StreamInputRequest.DataEvent'> & {
+ /**
+ * @generated from field: process.ProcessInput input = 2;
+ */
+ input?: ProcessInput
+ }
/**
* Describes the message process.StreamInputRequest.DataEvent.
* Use `create(StreamInputRequest_DataEventSchema)` to create a new message.
*/
-export const StreamInputRequest_DataEventSchema: GenMessage<StreamInputRequest_DataEvent> = /*@__PURE__*/
- messageDesc(file_process_process, 14, 1);
+export const StreamInputRequest_DataEventSchema: GenMessage<StreamInputRequest_DataEvent> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 14, 1)
/**
* @generated from message process.StreamInputRequest.KeepAlive
*/
-export type StreamInputRequest_KeepAlive = Message<"process.StreamInputRequest.KeepAlive"> & {
-};
+export type StreamInputRequest_KeepAlive =
+ Message<'process.StreamInputRequest.KeepAlive'> & {}
/**
* Describes the message process.StreamInputRequest.KeepAlive.
* Use `create(StreamInputRequest_KeepAliveSchema)` to create a new message.
*/
-export const StreamInputRequest_KeepAliveSchema: GenMessage<StreamInputRequest_KeepAlive> = /*@__PURE__*/
- messageDesc(file_process_process, 14, 2);
+export const StreamInputRequest_KeepAliveSchema: GenMessage<StreamInputRequest_KeepAlive> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 14, 2)
/**
* @generated from message process.StreamInputResponse
*/
-export type StreamInputResponse = Message<"process.StreamInputResponse"> & {
-};
+export type StreamInputResponse = Message<'process.StreamInputResponse'> & {}
/**
* Describes the message process.StreamInputResponse.
* Use `create(StreamInputResponseSchema)` to create a new message.
*/
-export const StreamInputResponseSchema: GenMessage<StreamInputResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 15);
+export const StreamInputResponseSchema: GenMessage<StreamInputResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 15)
/**
* @generated from message process.SendSignalRequest
*/
-export type SendSignalRequest = Message<"process.SendSignalRequest"> & {
+export type SendSignalRequest = Message<'process.SendSignalRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
- process?: ProcessSelector;
+ process?: ProcessSelector
/**
* @generated from field: process.Signal signal = 2;
*/
- signal: Signal;
-};
+ signal: Signal
+}
/**
* Describes the message process.SendSignalRequest.
* Use `create(SendSignalRequestSchema)` to create a new message.
*/
-export const SendSignalRequestSchema: GenMessage<SendSignalRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 16);
+export const SendSignalRequestSchema: GenMessage<SendSignalRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 16)
/**
* @generated from message process.SendSignalResponse
*/
-export type SendSignalResponse = Message<"process.SendSignalResponse"> & {
-};
+export type SendSignalResponse = Message<'process.SendSignalResponse'> & {}
/**
* Describes the message process.SendSignalResponse.
* Use `create(SendSignalResponseSchema)` to create a new message.
*/
-export const SendSignalResponseSchema: GenMessage<SendSignalResponse> = /*@__PURE__*/
- messageDesc(file_process_process, 17);
+export const SendSignalResponseSchema: GenMessage<SendSignalResponse> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 17)
/**
* @generated from message process.ConnectRequest
*/
-export type ConnectRequest = Message<"process.ConnectRequest"> & {
+export type ConnectRequest = Message<'process.ConnectRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
- process?: ProcessSelector;
-};
+ process?: ProcessSelector
+}
/**
* Describes the message process.ConnectRequest.
* Use `create(ConnectRequestSchema)` to create a new message.
*/
-export const ConnectRequestSchema: GenMessage<ConnectRequest> = /*@__PURE__*/
- messageDesc(file_process_process, 18);
+export const ConnectRequestSchema: GenMessage<ConnectRequest> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 18)
/**
* @generated from message process.ProcessSelector
*/
-export type ProcessSelector = Message<"process.ProcessSelector"> & {
+export type ProcessSelector = Message<'process.ProcessSelector'> & {
/**
* @generated from oneof process.ProcessSelector.selector
*/
- selector: {
- /**
- * @generated from field: uint32 pid = 1;
- */
- value: number;
- case: "pid";
- } | {
- /**
- * @generated from field: string tag = 2;
- */
- value: string;
- case: "tag";
- } | { case: undefined; value?: undefined };
-};
+ selector:
+ | {
+ /**
+ * @generated from field: uint32 pid = 1;
+ */
+ value: number
+ case: 'pid'
+ }
+ | {
+ /**
+ * @generated from field: string tag = 2;
+ */
+ value: string
+ case: 'tag'
+ }
+ | { case: undefined; value?: undefined }
+}
/**
* Describes the message process.ProcessSelector.
* Use `create(ProcessSelectorSchema)` to create a new message.
*/
-export const ProcessSelectorSchema: GenMessage<ProcessSelector> = /*@__PURE__*/
- messageDesc(file_process_process, 19);
+export const ProcessSelectorSchema: GenMessage<ProcessSelector> =
+ /*@__PURE__*/
+ messageDesc(file_process_process, 19)
/**
* @generated from enum process.Signal
@@ -637,8 +696,9 @@ export enum Signal {
/**
* Describes the enum process.Signal.
*/
-export const SignalSchema: GenEnum<Signal> = /*@__PURE__*/
- enumDesc(file_process_process, 0);
+export const SignalSchema: GenEnum<Signal> =
+ /*@__PURE__*/
+ enumDesc(file_process_process, 0)
/**
* @generated from service process.Process
@@ -648,60 +708,58 @@ export const Process: GenService<{
* @generated from rpc process.Process.List
*/
list: {
- methodKind: "unary";
- input: typeof ListRequestSchema;
- output: typeof ListResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof ListRequestSchema
+ output: typeof ListResponseSchema
+ }
/**
* @generated from rpc process.Process.Connect
*/
connect: {
- methodKind: "server_streaming";
- input: typeof ConnectRequestSchema;
- output: typeof ConnectResponseSchema;
- },
+ methodKind: 'server_streaming'
+ input: typeof ConnectRequestSchema
+ output: typeof ConnectResponseSchema
+ }
/**
* @generated from rpc process.Process.Start
*/
start: {
- methodKind: "server_streaming";
- input: typeof StartRequestSchema;
- output: typeof StartResponseSchema;
- },
+ methodKind: 'server_streaming'
+ input: typeof StartRequestSchema
+ output: typeof StartResponseSchema
+ }
/**
* @generated from rpc process.Process.Update
*/
update: {
- methodKind: "unary";
- input: typeof UpdateRequestSchema;
- output: typeof UpdateResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof UpdateRequestSchema
+ output: typeof UpdateResponseSchema
+ }
/**
* Client input stream ensures ordering of messages
*
* @generated from rpc process.Process.StreamInput
*/
streamInput: {
- methodKind: "client_streaming";
- input: typeof StreamInputRequestSchema;
- output: typeof StreamInputResponseSchema;
- },
+ methodKind: 'client_streaming'
+ input: typeof StreamInputRequestSchema
+ output: typeof StreamInputResponseSchema
+ }
/**
* @generated from rpc process.Process.SendInput
*/
sendInput: {
- methodKind: "unary";
- input: typeof SendInputRequestSchema;
- output: typeof SendInputResponseSchema;
- },
+ methodKind: 'unary'
+ input: typeof SendInputRequestSchema
+ output: typeof SendInputResponseSchema
+ }
/**
* @generated from rpc process.Process.SendSignal
*/
sendSignal: {
- methodKind: "unary";
- input: typeof SendSignalRequestSchema;
- output: typeof SendSignalResponseSchema;
- },
-}> = /*@__PURE__*/
- serviceDesc(file_process_process, 0);
-
+ methodKind: 'unary'
+ input: typeof SendSignalRequestSchema
+ output: typeof SendSignalResponseSchema
+ }
+}> = /*@__PURE__*/ serviceDesc(file_process_process, 0)
diff --git a/packages/js-sdk/src/envd/rpc.ts b/packages/js-sdk/src/envd/rpc.ts
index b654f0df5..e338680eb 100644
--- a/packages/js-sdk/src/envd/rpc.ts
+++ b/packages/js-sdk/src/envd/rpc.ts
@@ -2,8 +2,14 @@ import { Code, ConnectError } from '@connectrpc/connect'
import { runtime } from '../api/metadata'
import { defaultUsername } from '../connectionConfig'
-import { SandboxError, TimeoutError, formatSandboxTimeoutError, InvalidArgumentError, NotFoundError, AuthenticationError } from '../errors'
-
+import {
+ SandboxError,
+ TimeoutError,
+ formatSandboxTimeoutError,
+ InvalidArgumentError,
+ NotFoundError,
+ AuthenticationError,
+} from '../errors'
export function handleRpcError(err: unknown): Error {
if (err instanceof ConnectError) {
@@ -45,10 +51,12 @@ function encode64(value: string): string {
}
}
-export function authenticationHeader(username?: string): Record<string, string> {
+export function authenticationHeader(
+ username?: string
+): Record<string, string> {
const value = `${username || defaultUsername}:`
const encoded = encode64(value)
- return { 'Authorization': `Basic ${encoded}` }
+ return { Authorization: `Basic ${encoded}` }
}
diff --git a/packages/js-sdk/src/envd/schema.gen.ts b/packages/js-sdk/src/envd/schema.gen.ts
index 820212114..f38b4841e 100644
--- a/packages/js-sdk/src/envd/schema.gen.ts
+++ b/packages/js-sdk/src/envd/schema.gen.ts
@@ -4,343 +4,343 @@
*/
export interface paths {
- "/envs": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** Get the environment variables */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Environment variables */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["EnvVars"];
- };
- };
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/files": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** Download a file */
- get: {
- parameters: {
- query: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
- path?: components["parameters"]["FilePath"];
- /** @description Signature used for file access permission verification. */
- signature?: components["parameters"]["Signature"];
- /** @description Signature expiration used for defining the expiration time of the signature. */
- signature_expiration?: components["parameters"]["SignatureExpiration"];
- /** @description User used for setting the owner, or resolving relative paths. */
- username: components["parameters"]["User"];
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- 200: components["responses"]["DownloadSuccess"];
- 400: components["responses"]["InvalidPath"];
- 401: components["responses"]["InvalidUser"];
- 404: components["responses"]["FileNotFound"];
- 500: components["responses"]["InternalServerError"];
- };
- };
- put?: never;
- /** Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten. */
- post: {
- parameters: {
- query: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
- path?: components["parameters"]["FilePath"];
- /** @description Signature used for file access permission verification. */
- signature?: components["parameters"]["Signature"];
- /** @description Signature expiration used for defining the expiration time of the signature. */
- signature_expiration?: components["parameters"]["SignatureExpiration"];
- /** @description User used for setting the owner, or resolving relative paths. */
- username: components["parameters"]["User"];
- };
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: components["requestBodies"]["File"];
- responses: {
- 200: components["responses"]["UploadSuccess"];
- 400: components["responses"]["InvalidPath"];
- 401: components["responses"]["InvalidUser"];
- 500: components["responses"]["InternalServerError"];
- 507: components["responses"]["NotEnoughDiskSpace"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/health": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** Check the health of the service */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The service is healthy */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/init": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /** Set initial vars, ensure the time and metadata is synced with the host */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: {
- content: {
- "application/json": {
- /** @description Access token for secure access to envd service */
- accessToken?: string;
- envVars?: components["schemas"]["EnvVars"];
- };
- };
- };
- responses: {
- /** @description Env vars set, the time and metadata is synced with the host */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
- "/metrics": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- /** Get the stats of the service */
- get: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The resource usage metrics of the service */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Metrics"];
- };
- };
- };
- };
- put?: never;
- post?: never;
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
+ '/envs': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Get the environment variables */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description Environment variables */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['EnvVars']
+ }
+ }
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/files': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Download a file */
+ get: {
+ parameters: {
+ query: {
+ /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ path?: components['parameters']['FilePath']
+ /** @description Signature used for file access permission verification. */
+ signature?: components['parameters']['Signature']
+ /** @description Signature expiration used for defining the expiration time of the signature. */
+ signature_expiration?: components['parameters']['SignatureExpiration']
+ /** @description User used for setting the owner, or resolving relative paths. */
+ username: components['parameters']['User']
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ 200: components['responses']['DownloadSuccess']
+ 400: components['responses']['InvalidPath']
+ 401: components['responses']['InvalidUser']
+ 404: components['responses']['FileNotFound']
+ 500: components['responses']['InternalServerError']
+ }
+ }
+ put?: never
+ /** Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten. */
+ post: {
+ parameters: {
+ query: {
+ /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ path?: components['parameters']['FilePath']
+ /** @description Signature used for file access permission verification. */
+ signature?: components['parameters']['Signature']
+ /** @description Signature expiration used for defining the expiration time of the signature. */
+ signature_expiration?: components['parameters']['SignatureExpiration']
+ /** @description User used for setting the owner, or resolving relative paths. */
+ username: components['parameters']['User']
+ }
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody: components['requestBodies']['File']
+ responses: {
+ 200: components['responses']['UploadSuccess']
+ 400: components['responses']['InvalidPath']
+ 401: components['responses']['InvalidUser']
+ 500: components['responses']['InternalServerError']
+ 507: components['responses']['NotEnoughDiskSpace']
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/health': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Check the health of the service */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The service is healthy */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/init': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /** Set initial vars, ensure the time and metadata is synced with the host */
+ post: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: {
+ content: {
+ 'application/json': {
+ /** @description Access token for secure access to envd service */
+ accessToken?: string
+ envVars?: components['schemas']['EnvVars']
+ }
+ }
+ }
+ responses: {
+ /** @description Env vars set, the time and metadata is synced with the host */
+ 204: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
+ '/metrics': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ /** Get the stats of the service */
+ get: {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ requestBody?: never
+ responses: {
+ /** @description The resource usage metrics of the service */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Metrics']
+ }
+ }
+ }
+ }
+ put?: never
+ post?: never
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
}
-export type webhooks = Record<string, never>;
+export type webhooks = Record<string, never>
export interface components {
- schemas: {
- EntryInfo: {
- /** @description Name of the file */
- name: string;
- /** @description Path to the file */
- path: string;
- /**
- * @description Type of the file
- * @enum {string}
- */
- type: "file";
- };
- /** @description Environment variables to set */
- EnvVars: {
- [key: string]: string;
- };
- Error: {
- /** @description Error code */
- code: number;
- /** @description Error message */
- message: string;
- };
- /** @description Resource usage metrics */
- Metrics: {
- /**
- * Format: float
- * @description CPU usage percentage
- */
- cpu_used_pct?: number;
- /** @description Total virtual memory usage in bytes */
- mem_bytes?: number;
- };
- };
- responses: {
- /** @description Entire file downloaded successfully. */
- DownloadSuccess: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/octet-stream": string;
- };
- };
- /** @description File not found */
- FileNotFound: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Internal server error */
- InternalServerError: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Invalid path */
- InvalidPath: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Invalid user */
- InvalidUser: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description Not enough disk space */
- NotEnoughDiskSpace: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
- /** @description The file was uploaded successfully. */
- UploadSuccess: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["EntryInfo"][];
- };
- };
- };
- parameters: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
- FilePath: string;
- /** @description Signature used for file access permission verification. */
- Signature: string;
- /** @description Signature expiration used for defining the expiration time of the signature. */
- SignatureExpiration: number;
- /** @description User used for setting the owner, or resolving relative paths. */
- User: string;
- };
- requestBodies: {
- File: {
- content: {
- "multipart/form-data": {
- /** Format: binary */
- file?: string;
- };
- };
- };
- };
- headers: never;
- pathItems: never;
+ schemas: {
+ EntryInfo: {
+ /** @description Name of the file */
+ name: string
+ /** @description Path to the file */
+ path: string
+ /**
+ * @description Type of the file
+ * @enum {string}
+ */
+ type: 'file'
+ }
+ /** @description Environment variables to set */
+ EnvVars: {
+ [key: string]: string
+ }
+ Error: {
+ /** @description Error code */
+ code: number
+ /** @description Error message */
+ message: string
+ }
+ /** @description Resource usage metrics */
+ Metrics: {
+ /**
+ * Format: float
+ * @description CPU usage percentage
+ */
+ cpu_used_pct?: number
+ /** @description Total virtual memory usage in bytes */
+ mem_bytes?: number
+ }
+ }
+ responses: {
+ /** @description Entire file downloaded successfully. */
+ DownloadSuccess: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/octet-stream': string
+ }
+ }
+ /** @description File not found */
+ FileNotFound: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Internal server error */
+ InternalServerError: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Invalid path */
+ InvalidPath: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Invalid user */
+ InvalidUser: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description Not enough disk space */
+ NotEnoughDiskSpace: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['Error']
+ }
+ }
+ /** @description The file was uploaded successfully. */
+ UploadSuccess: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['EntryInfo'][]
+ }
+ }
+ }
+ parameters: {
+ /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ FilePath: string
+ /** @description Signature used for file access permission verification. */
+ Signature: string
+ /** @description Signature expiration used for defining the expiration time of the signature. */
+ SignatureExpiration: number
+ /** @description User used for setting the owner, or resolving relative paths. */
+ User: string
+ }
+ requestBodies: {
+ File: {
+ content: {
+ 'multipart/form-data': {
+ /** Format: binary */
+ file?: string
+ }
+ }
+ }
+ }
+ headers: never
+ pathItems: never
}
-export type $defs = Record<string, never>;
-export type operations = Record<string, never>;
+export type $defs = Record<string, never>
+export type operations = Record<string, never>
diff --git a/packages/js-sdk/src/envd/versions.ts b/packages/js-sdk/src/envd/versions.ts
index 86da44065..e78ff4506 100644
--- a/packages/js-sdk/src/envd/versions.ts
+++ b/packages/js-sdk/src/envd/versions.ts
@@ -1 +1 @@
-export const ENVD_VERSION_RECURSIVE_WATCH = '0.1.4'
\ No newline at end of file
+export const ENVD_VERSION_RECURSIVE_WATCH = '0.1.4'
diff --git a/packages/js-sdk/src/sandbox/commands/commandHandle.ts b/packages/js-sdk/src/sandbox/commands/commandHandle.ts
index 93eb957d8..67852a900 100644
--- a/packages/js-sdk/src/sandbox/commands/commandHandle.ts
+++ b/packages/js-sdk/src/sandbox/commands/commandHandle.ts
@@ -81,8 +81,8 @@ export class CommandExitError extends SandboxError implements CommandResult {
*/
export class CommandHandle
implements
- Omit<CommandResult, 'exitCode' | 'error'>,
- Partial<Pick<CommandResult, 'exitCode' | 'error'>>
+ Omit<CommandResult, 'exitCode' | 'error'>,
+ Partial<Pick<CommandResult, 'exitCode' | 'error'>>
{
private _stdout = ''
private _stderr = ''
@@ -112,7 +112,7 @@ export class CommandHandle
/**
* Command execution exit code.
* `0` if the command finished successfully.
- *
+ *
* It is `undefined` if the command is still running.
*/
get exitCode() {
@@ -143,7 +143,7 @@ export class CommandHandle
/**
* Wait for the command to finish and return the result.
* If the command exits with a non-zero exit code, it throws a `CommandExitError`.
- *
+ *
* @returns `CommandResult` result of command execution.
*/
async wait() {
@@ -166,7 +166,7 @@ export class CommandHandle
/**
* Disconnect from the command.
- *
+ *
* The command is not killed, but SDK stops receiving events from the command.
* You can reconnect to the command using {@link Commands.connect}.
*/
@@ -177,7 +177,7 @@ export class CommandHandle
/**
* Kill the command.
* It uses `SIGKILL` signal to kill the command.
- *
+ *
* @returns `true` if the command was killed successfully, `false` if the command was not found.
*/
async kill() {
diff --git a/packages/js-sdk/src/sandbox/commands/pty.ts b/packages/js-sdk/src/sandbox/commands/pty.ts
index ee9dd61ea..4e93231bd 100644
--- a/packages/js-sdk/src/sandbox/commands/pty.ts
+++ b/packages/js-sdk/src/sandbox/commands/pty.ts
@@ -6,7 +6,10 @@ import {
Transport,
} from '@connectrpc/connect'
-import { Signal, Process as ProcessService } from '../../envd/process/process_pb'
+import {
+ Signal,
+ Process as ProcessService,
+} from '../../envd/process/process_pb'
import {
ConnectionConfig,
ConnectionOpts,
@@ -34,25 +37,25 @@ export interface PtyCreateOpts
onData: (data: Uint8Array) => void | Promise<void>
/**
* Timeout for the PTY in **milliseconds**.
- *
+ *
* @default 60_000 // 60 seconds
*/
timeoutMs?: number
/**
* User to use for the PTY.
- *
+ *
* @default `user`
*/
user?: Username
/**
* Environment variables for the PTY.
- *
+ *
* @default {}
*/
envs?: Record<string, string>
/**
* Working directory for the PTY.
- *
+ *
* @default // home directory of the user used to start the PTY
*/
cwd?: string
@@ -75,7 +78,7 @@ export class Pty {
* Create a new PTY (pseudo-terminal).
*
* @param opts options for creating the PTY.
- *
+ *
* @returns handle to interact with the PTY.
*/
async create(opts: PtyCreateOpts) {
@@ -214,7 +217,7 @@ export class Pty {
*
* @param pid process ID of the PTY.
* @param opts connection options.
- *
+ *
* @returns `true` if the PTY was killed, `false` if the PTY was not found.
*/
async kill(
diff --git a/packages/js-sdk/tests/cmdHelper.ts b/packages/js-sdk/tests/cmdHelper.ts
index 511a429fd..03e214b4d 100644
--- a/packages/js-sdk/tests/cmdHelper.ts
+++ b/packages/js-sdk/tests/cmdHelper.ts
@@ -6,7 +6,11 @@ export function catchCmdExitErrorInBackground(cmd: CommandHandle) {
cmd.wait().catch((res: CommandExitError) => {
if (!disabled) {
- assert.equal(res.exitCode, 0, `command failed with exit code ${res.exitCode}: ${res.stderr}`)
+ assert.equal(
+ res.exitCode,
+ 0,
+ `command failed with exit code ${res.exitCode}: ${res.stderr}`
+ )
}
})
diff --git a/packages/js-sdk/tests/runtimes/browser/run.test.tsx b/packages/js-sdk/tests/runtimes/browser/run.test.tsx
index eb56e2d03..ff3460e52 100644
--- a/packages/js-sdk/tests/runtimes/browser/run.test.tsx
+++ b/packages/js-sdk/tests/runtimes/browser/run.test.tsx
@@ -14,7 +14,7 @@ function E2BTest() {
const getText = async () => {
const sandbox = await Sandbox.create(template, {
apiKey: inject('E2B_API_KEY'),
- domain: inject('E2B_DOMAIN')
+ domain: inject('E2B_DOMAIN'),
})
try {
@@ -31,14 +31,12 @@ function E2BTest() {
return <div>{text}</div>
}
-test(
- 'browser test',
- async () => {
- const { getByText } = render(<E2BTest />)
- await waitFor(
- () => expect.element(getByText('Hello World')).toBeInTheDocument(),
- {
- timeout: 30_000,
- }
- )
- }, 40_000)
+test('browser test', async () => {
+ const { getByText } = render(<E2BTest />)
+ await waitFor(
+ () => expect.element(getByText('Hello World')).toBeInTheDocument(),
+ {
+ timeout: 30_000,
+ }
+ )
+}, 40_000)
diff --git a/packages/js-sdk/tests/runtimes/deno/run.test.ts b/packages/js-sdk/tests/runtimes/deno/run.test.ts
index 55f038b8c..9f9d35c34 100644
--- a/packages/js-sdk/tests/runtimes/deno/run.test.ts
+++ b/packages/js-sdk/tests/runtimes/deno/run.test.ts
@@ -1,4 +1,7 @@
-import { assert, assertEquals } from 'https://deno.land/[email protected]/assert/mod.ts'
+import {
+ assert,
+ assertEquals,
+} from 'https://deno.land/[email protected]/assert/mod.ts'
import { load } from 'https://deno.land/[email protected]/dotenv/mod.ts'
await load({ envPath: '.env', export: true })
@@ -6,7 +9,6 @@ await load({ envPath: '.env', export: true })
import { Sandbox } from '../../../dist/index.mjs'
import { template } from '../../template'
-
Deno.test('Deno test', async () => {
const sbx = await Sandbox.create(template, { timeoutMs: 5_000 })
try {
diff --git a/packages/js-sdk/tests/sandbox/commands/kill.test.ts b/packages/js-sdk/tests/sandbox/commands/kill.test.ts
index 2cb6947ce..4eddcc446 100644
--- a/packages/js-sdk/tests/sandbox/commands/kill.test.ts
+++ b/packages/js-sdk/tests/sandbox/commands/kill.test.ts
@@ -9,7 +9,9 @@ sandboxTest('kill process', async ({ sandbox }) => {
await sandbox.commands.kill(pid)
- await expect(sandbox.commands.run(`kill -0 ${pid}`)).rejects.toThrowError(ProcessExitError)
+ await expect(sandbox.commands.run(`kill -0 ${pid}`)).rejects.toThrowError(
+ ProcessExitError
+ )
})
sandboxTest('kill non-existing process', async ({ sandbox }) => {
diff --git a/packages/js-sdk/tests/sandbox/commands/list.test.ts b/packages/js-sdk/tests/sandbox/commands/list.test.ts
index 02ba61a54..24c4ced11 100644
--- a/packages/js-sdk/tests/sandbox/commands/list.test.ts
+++ b/packages/js-sdk/tests/sandbox/commands/list.test.ts
@@ -11,7 +11,7 @@ sandboxTest('list processes', async ({ sandbox }) => {
assert.isArray(processes)
assert.isAtLeast(processes.length, 2)
- processes.forEach(process => {
+ processes.forEach((process) => {
assert.containsAllKeys(process, ['pid'])
})
})
diff --git a/packages/js-sdk/tests/sandbox/commands/run.test.ts b/packages/js-sdk/tests/sandbox/commands/run.test.ts
index 5c9096681..e532d88bb 100644
--- a/packages/js-sdk/tests/sandbox/commands/run.test.ts
+++ b/packages/js-sdk/tests/sandbox/commands/run.test.ts
@@ -30,11 +30,15 @@ sandboxTest('run with multiline string', async ({ sandbox }) => {
})
sandboxTest('run with timeout', async ({ sandbox }) => {
- const cmd = await sandbox.commands.run('echo "Hello, World!"', { timeoutMs: 4000 })
+ const cmd = await sandbox.commands.run('echo "Hello, World!"', {
+ timeoutMs: 4000,
+ })
assert.equal(cmd.exitCode, 0)
})
sandboxTest('run with too short timeout', async ({ sandbox }) => {
- await expect(sandbox.commands.run('sleep 10', { timeoutMs: 1000 })).rejects.toThrow()
+ await expect(
+ sandbox.commands.run('sleep 10', { timeoutMs: 1000 })
+ ).rejects.toThrow()
})
diff --git a/packages/js-sdk/tests/sandbox/files/signing.test.ts b/packages/js-sdk/tests/sandbox/files/signing.test.ts
index 25593cdc4..58a6c8216 100644
--- a/packages/js-sdk/tests/sandbox/files/signing.test.ts
+++ b/packages/js-sdk/tests/sandbox/files/signing.test.ts
@@ -13,7 +13,7 @@ test.skipIf(isDebug)('test access file with expired signing', async () => {
await sbx.files.write('hello.txt', 'hello world')
const fileUrlWithSigning = await sbx.downloadUrl('hello.txt', {
- useSignatureExpiration: -10_000
+ useSignatureExpiration: -10_000,
})
const res = await fetch(fileUrlWithSigning)
@@ -37,7 +37,7 @@ test.skipIf(isDebug)('test access file with valid signing', async () => {
await sbx.files.write('hello.txt', 'hello world')
const fileUrlWithSigning = await sbx.downloadUrl('hello.txt', {
- useSignatureExpiration: 10_000
+ useSignatureExpiration: 10_000,
})
const res = await fetch(fileUrlWithSigning)
diff --git a/packages/js-sdk/tests/sandbox/files/watch.test.ts b/packages/js-sdk/tests/sandbox/files/watch.test.ts
index e585405cb..f0271f706 100644
--- a/packages/js-sdk/tests/sandbox/files/watch.test.ts
+++ b/packages/js-sdk/tests/sandbox/files/watch.test.ts
@@ -52,61 +52,87 @@ sandboxTest('watch recursive directory changes', async ({ sandbox }) => {
})
const expectedFileName = `${nestedDirname}/${filename}`
- const handle = await sandbox.files.watchDir(dirname, async (event) => {
- if (event.type === FilesystemEventType.WRITE && event.name === expectedFileName) {
- trigger()
+ const handle = await sandbox.files.watchDir(
+ dirname,
+ async (event) => {
+ if (
+ event.type === FilesystemEventType.WRITE &&
+ event.name === expectedFileName
+ ) {
+ trigger()
+ }
+ },
+ {
+ recursive: true,
}
- }, {
- recursive: true
- })
+ )
- await sandbox.files.write(`${dirname}/${nestedDirname}/${filename}`, newContent)
+ await sandbox.files.write(
+ `${dirname}/${nestedDirname}/${filename}`,
+ newContent
+ )
await eventPromise
await handle.stop()
})
-sandboxTest('watch recursive directory after nested folder addition', async ({ sandbox }) => {
- const dirname = 'test_recursive_watch_dir_add'
- const nestedDirname = 'test_nested_watch_dir'
- const filename = 'test_watch.txt'
- const content = 'This file will be watched.'
-
- await sandbox.files.makeDir(dirname)
- if (isDebug) {
- onTestFinished(() => sandbox.files.remove(dirname))
- }
-
- let triggerFile: () => void
- let triggerFolder: () => void
-
- const eventFilePromise = new Promise<void>((resolve) => {
- triggerFile = resolve
- })
- const eventFolderPromise = new Promise<void>((resolve) => {
- triggerFolder = resolve
- })
-
- const expectedFileName = `${nestedDirname}/${filename}`
- const handle = await sandbox.files.watchDir(dirname, async (event) => {
- if (event.type === FilesystemEventType.WRITE && event.name === expectedFileName) {
- triggerFile()
- } else if (event.type === FilesystemEventType.CREATE && event.name === nestedDirname) {
- triggerFolder()
+sandboxTest(
+ 'watch recursive directory after nested folder addition',
+ async ({ sandbox }) => {
+ const dirname = 'test_recursive_watch_dir_add'
+ const nestedDirname = 'test_nested_watch_dir'
+ const filename = 'test_watch.txt'
+ const content = 'This file will be watched.'
+
+ await sandbox.files.makeDir(dirname)
+ if (isDebug) {
+ onTestFinished(() => sandbox.files.remove(dirname))
}
- }, {
- recursive: true
- })
- await sandbox.files.makeDir(`${dirname}/${nestedDirname}`)
- await eventFolderPromise
-
- await sandbox.files.write(`${dirname}/${nestedDirname}/${filename}`, content)
- await eventFilePromise
-
- await handle.stop()
-})
+ let triggerFile: () => void
+ let triggerFolder: () => void
+
+ const eventFilePromise = new Promise<void>((resolve) => {
+ triggerFile = resolve
+ })
+ const eventFolderPromise = new Promise<void>((resolve) => {
+ triggerFolder = resolve
+ })
+
+ const expectedFileName = `${nestedDirname}/${filename}`
+ const handle = await sandbox.files.watchDir(
+ dirname,
+ async (event) => {
+ if (
+ event.type === FilesystemEventType.WRITE &&
+ event.name === expectedFileName
+ ) {
+ triggerFile()
+ } else if (
+ event.type === FilesystemEventType.CREATE &&
+ event.name === nestedDirname
+ ) {
+ triggerFolder()
+ }
+ },
+ {
+ recursive: true,
+ }
+ )
+
+ await sandbox.files.makeDir(`${dirname}/${nestedDirname}`)
+ await eventFolderPromise
+
+ await sandbox.files.write(
+ `${dirname}/${nestedDirname}/${filename}`,
+ content
+ )
+ await eventFilePromise
+
+ await handle.stop()
+ }
+)
sandboxTest('watch non-existing directory', async ({ sandbox }) => {
const dirname = 'non_existing_watch_dir'
diff --git a/packages/js-sdk/tests/sandbox/files/write.test.ts b/packages/js-sdk/tests/sandbox/files/write.test.ts
index 3ffe1be64..226e887ee 100644
--- a/packages/js-sdk/tests/sandbox/files/write.test.ts
+++ b/packages/js-sdk/tests/sandbox/files/write.test.ts
@@ -41,7 +41,9 @@ sandboxTest('write multiple files', async ({ sandbox }) => {
// Attempt to write with undefined path and file array
await sandbox.files
// @ts-ignore
- .write(undefined, [{ path: 'one_test_file.txt', data: 'This is a test file.' }])
+ .write(undefined, [
+ { path: 'one_test_file.txt', data: 'This is a test file.' },
+ ])
.then((e) => {
assert.isUndefined(e)
})
@@ -53,7 +55,9 @@ sandboxTest('write multiple files', async ({ sandbox }) => {
// Attempt to write with path and file array
await sandbox.files
// @ts-ignore
- .write('/path/to/file', [{ path: 'one_test_file.txt', data: 'This is a test file.' }])
+ .write('/path/to/file', [
+ { path: 'one_test_file.txt', data: 'This is a test file.' },
+ ])
.then((e) => {
assert.isUndefined(e)
})
@@ -66,7 +70,9 @@ sandboxTest('write multiple files', async ({ sandbox }) => {
})
// Attempt to write with one file in array
- const info = await sandbox.files.write([{ path: 'one_test_file.txt', data: 'This is a test file.' }])
+ const info = await sandbox.files.write([
+ { path: 'one_test_file.txt', data: 'This is a test file.' },
+ ])
assert.isTrue(Array.isArray(info))
assert.equal(info[0].name, 'one_test_file.txt')
assert.equal(info[0].type, 'file')
diff --git a/packages/js-sdk/tests/sandbox/timeout.test.ts b/packages/js-sdk/tests/sandbox/timeout.test.ts
index d38b0b450..e2cc81b25 100644
--- a/packages/js-sdk/tests/sandbox/timeout.test.ts
+++ b/packages/js-sdk/tests/sandbox/timeout.test.ts
@@ -10,19 +10,22 @@ sandboxTest.skipIf(isDebug)('shorten timeout', async ({ sandbox }) => {
expect(await sandbox.isRunning({ requestTimeoutMs: 1000 })).toBeFalsy()
})
-sandboxTest.skipIf(isDebug)('shorten then lenghten timeout', async ({ sandbox }) => {
- await sandbox.setTimeout(5000)
+sandboxTest.skipIf(isDebug)(
+ 'shorten then lenghten timeout',
+ async ({ sandbox }) => {
+ await sandbox.setTimeout(5000)
- await wait(1000)
+ await wait(1000)
- await sandbox.setTimeout(10000)
+ await sandbox.setTimeout(10000)
- await wait(6000)
+ await wait(6000)
- expect(await sandbox.isRunning()).toBeTruthy()
-})
+ expect(await sandbox.isRunning()).toBeTruthy()
+ }
+)
sandboxTest.skipIf(isDebug)('get sandbox timeout', async ({ sandbox }) => {
const { endAt } = await sandbox.getInfo()
expect(endAt).toBeInstanceOf(Date)
-})
\ No newline at end of file
+})
diff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefile
index d78275111..18895ce49 100644
--- a/packages/python-sdk/Makefile
+++ b/packages/python-sdk/Makefile
@@ -6,7 +6,7 @@ generate-api:
rm -rf e2b/api/client
mv e2b/api/api/e2b_api_client e2b/api/client
rm -rf e2b/api/api
- black .
+ ruff format .
generate-envd:
if [ ! -f "/go/bin/protoc-gen-connect-python" ]; then \
@@ -16,7 +16,7 @@ generate-envd:
cd $(ROOT_DIR)/spec/envd && pwd && buf generate --template buf-python.gen.yaml
./scripts/fix-python-pb.sh
- black .
+ ruff format .
generate: generate-api generate-envd
@@ -25,3 +25,6 @@ init:
lint:
ruff check .
+
+format:
+ ruff format .
\ No newline at end of file
diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py
index 15cd0a938..54bb90c49 100644
--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py
@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -16,68 +15,62 @@ _sym_db = _symbol_database.Default()
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1b\x66ilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0b\x64\x65stination\x18\x02 \x01(\tR\x0b\x64\x65stination";\n\x0cMoveResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path">\n\x0fMakeDirResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path";\n\x0cStatResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry"\xd3\x02\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.filesystem.FileTypeR\x04type\x12\x12\n\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n\x04size\x18\x04 \x01(\x03R\x04size\x12\x12\n\x04mode\x18\x05 \x01(\rR\x04mode\x12 \n\x0bpermissions\x18\x06 \x01(\tR\x0bpermissions\x12\x14\n\x05owner\x18\x07 \x01(\tR\x05owner\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12?\n\rmodified_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0cmodifiedTime\x12*\n\x0esymlink_target\x18\n \x01(\tH\x00R\rsymlinkTarget\x88\x01\x01\x42\x11\n\x0f_symlink_target":\n\x0eListDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\rR\x05\x64\x65pth"B\n\x0fListDirResponse\x12/\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.filesystem.EntryInfoR\x07\x65ntries"C\n\x0fWatchDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive"P\n\x0f\x46ilesystemEvent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x15.filesystem.EventTypeR\x04type"\xfe\x01\n\x10WatchDirResponse\x12?\n\x05start\x18\x01 \x01(\x0b\x32\'.filesystem.WatchDirResponse.StartEventH\x00R\x05start\x12=\n\nfilesystem\x18\x02 \x01(\x0b\x32\x1b.filesystem.FilesystemEventH\x00R\nfilesystem\x12\x46\n\tkeepalive\x18\x03 \x01(\x0b\x32&.filesystem.WatchDirResponse.KeepAliveH\x00R\tkeepalive\x1a\x0c\n\nStartEvent\x1a\x0b\n\tKeepAliveB\x07\n\x05\x65vent"H\n\x14\x43reateWatcherRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive"6\n\x15\x43reateWatcherResponse\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"8\n\x17GetWatcherEventsRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"O\n\x18GetWatcherEventsResponse\x12\x33\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x1b.filesystem.FilesystemEventR\x06\x65vents"5\n\x14RemoveWatcherRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"\x17\n\x15RemoveWatcherResponse*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\x9f\x05\n\nFilesystem\x12\x39\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12\x42\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x12\x39\n\x04Move\x12\x17.filesystem.MoveRequest\x1a\x18.filesystem.MoveResponse\x12\x42\n\x07ListDir\x12\x1a.filesystem.ListDirRequest\x1a\x1b.filesystem.ListDirResponse\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponse\x12G\n\x08WatchDir\x12\x1b.filesystem.WatchDirRequest\x1a\x1c.filesystem.WatchDirResponse0\x01\x12T\n\rCreateWatcher\x12 .filesystem.CreateWatcherRequest\x1a!.filesystem.CreateWatcherResponse\x12]\n\x10GetWatcherEvents\x12#.filesystem.GetWatcherEventsRequest\x1a$.filesystem.GetWatcherEventsResponse\x12T\n\rRemoveWatcher\x12 .filesystem.RemoveWatcherRequest\x1a!.filesystem.RemoveWatcherResponseBi\n\x0e\x63om.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x46XX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16\x46ilesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3'
-)
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66ilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto\"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0b\x64\x65stination\x18\x02 \x01(\tR\x0b\x64\x65stination\";\n\x0cMoveResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry\"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\">\n\x0fMakeDirResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry\"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\"\x10\n\x0eRemoveResponse\"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\";\n\x0cStatResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry\"\xd3\x02\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.filesystem.FileTypeR\x04type\x12\x12\n\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n\x04size\x18\x04 \x01(\x03R\x04size\x12\x12\n\x04mode\x18\x05 \x01(\rR\x04mode\x12 \n\x0bpermissions\x18\x06 \x01(\tR\x0bpermissions\x12\x14\n\x05owner\x18\x07 \x01(\tR\x05owner\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12?\n\rmodified_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0cmodifiedTime\x12*\n\x0esymlink_target\x18\n \x01(\tH\x00R\rsymlinkTarget\x88\x01\x01\x42\x11\n\x0f_symlink_target\":\n\x0eListDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\rR\x05\x64\x65pth\"B\n\x0fListDirResponse\x12/\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.filesystem.EntryInfoR\x07\x65ntries\"C\n\x0fWatchDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\"P\n\x0f\x46ilesystemEvent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x15.filesystem.EventTypeR\x04type\"\xfe\x01\n\x10WatchDirResponse\x12?\n\x05start\x18\x01 \x01(\x0b\x32\'.filesystem.WatchDirResponse.StartEventH\x00R\x05start\x12=\n\nfilesystem\x18\x02 \x01(\x0b\x32\x1b.filesystem.FilesystemEventH\x00R\nfilesystem\x12\x46\n\tkeepalive\x18\x03 \x01(\x0b\x32&.filesystem.WatchDirResponse.KeepAliveH\x00R\tkeepalive\x1a\x0c\n\nStartEvent\x1a\x0b\n\tKeepAliveB\x07\n\x05\x65vent\"H\n\x14\x43reateWatcherRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\"6\n\x15\x43reateWatcherResponse\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId\"8\n\x17GetWatcherEventsRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId\"O\n\x18GetWatcherEventsResponse\x12\x33\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x1b.filesystem.FilesystemEventR\x06\x65vents\"5\n\x14RemoveWatcherRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId\"\x17\n\x15RemoveWatcherResponse*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\x9f\x05\n\nFilesystem\x12\x39\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12\x42\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x12\x39\n\x04Move\x12\x17.filesystem.MoveRequest\x1a\x18.filesystem.MoveResponse\x12\x42\n\x07ListDir\x12\x1a.filesystem.ListDirRequest\x1a\x1b.filesystem.ListDirResponse\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponse\x12G\n\x08WatchDir\x12\x1b.filesystem.WatchDirRequest\x1a\x1c.filesystem.WatchDirResponse0\x01\x12T\n\rCreateWatcher\x12 .filesystem.CreateWatcherRequest\x1a!.filesystem.CreateWatcherResponse\x12]\n\x10GetWatcherEvents\x12#.filesystem.GetWatcherEventsRequest\x1a$.filesystem.GetWatcherEventsResponse\x12T\n\rRemoveWatcher\x12 .filesystem.RemoveWatcherRequest\x1a!.filesystem.RemoveWatcherResponseBi\n\x0e\x63om.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x46XX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16\x46ilesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(
- DESCRIPTOR, "filesystem.filesystem_pb2", _globals
-)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'filesystem.filesystem_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
- _globals["DESCRIPTOR"]._loaded_options = None
- _globals[
- "DESCRIPTOR"
- ]._serialized_options = b"\n\016com.filesystemB\017FilesystemProtoP\001\242\002\003FXX\252\002\nFilesystem\312\002\nFilesystem\342\002\026Filesystem\\GPBMetadata\352\002\nFilesystem"
- _globals["_FILETYPE"]._serialized_start = 1690
- _globals["_FILETYPE"]._serialized_end = 1772
- _globals["_EVENTTYPE"]._serialized_start = 1775
- _globals["_EVENTTYPE"]._serialized_end = 1927
- _globals["_MOVEREQUEST"]._serialized_start = 76
- _globals["_MOVEREQUEST"]._serialized_end = 147
- _globals["_MOVERESPONSE"]._serialized_start = 149
- _globals["_MOVERESPONSE"]._serialized_end = 208
- _globals["_MAKEDIRREQUEST"]._serialized_start = 210
- _globals["_MAKEDIRREQUEST"]._serialized_end = 246
- _globals["_MAKEDIRRESPONSE"]._serialized_start = 248
- _globals["_MAKEDIRRESPONSE"]._serialized_end = 310
- _globals["_REMOVEREQUEST"]._serialized_start = 312
- _globals["_REMOVEREQUEST"]._serialized_end = 347
- _globals["_REMOVERESPONSE"]._serialized_start = 349
- _globals["_REMOVERESPONSE"]._serialized_end = 365
- _globals["_STATREQUEST"]._serialized_start = 367
- _globals["_STATREQUEST"]._serialized_end = 400
- _globals["_STATRESPONSE"]._serialized_start = 402
- _globals["_STATRESPONSE"]._serialized_end = 461
- _globals["_ENTRYINFO"]._serialized_start = 464
- _globals["_ENTRYINFO"]._serialized_end = 803
- _globals["_LISTDIRREQUEST"]._serialized_start = 805
- _globals["_LISTDIRREQUEST"]._serialized_end = 863
- _globals["_LISTDIRRESPONSE"]._serialized_start = 865
- _globals["_LISTDIRRESPONSE"]._serialized_end = 931
- _globals["_WATCHDIRREQUEST"]._serialized_start = 933
- _globals["_WATCHDIRREQUEST"]._serialized_end = 1000
- _globals["_FILESYSTEMEVENT"]._serialized_start = 1002
- _globals["_FILESYSTEMEVENT"]._serialized_end = 1082
- _globals["_WATCHDIRRESPONSE"]._serialized_start = 1085
- _globals["_WATCHDIRRESPONSE"]._serialized_end = 1339
- _globals["_WATCHDIRRESPONSE_STARTEVENT"]._serialized_start = 1305
- _globals["_WATCHDIRRESPONSE_STARTEVENT"]._serialized_end = 1317
- _globals["_WATCHDIRRESPONSE_KEEPALIVE"]._serialized_start = 1319
- _globals["_WATCHDIRRESPONSE_KEEPALIVE"]._serialized_end = 1330
- _globals["_CREATEWATCHERREQUEST"]._serialized_start = 1341
- _globals["_CREATEWATCHERREQUEST"]._serialized_end = 1413
- _globals["_CREATEWATCHERRESPONSE"]._serialized_start = 1415
- _globals["_CREATEWATCHERRESPONSE"]._serialized_end = 1469
- _globals["_GETWATCHEREVENTSREQUEST"]._serialized_start = 1471
- _globals["_GETWATCHEREVENTSREQUEST"]._serialized_end = 1527
- _globals["_GETWATCHEREVENTSRESPONSE"]._serialized_start = 1529
- _globals["_GETWATCHEREVENTSRESPONSE"]._serialized_end = 1608
- _globals["_REMOVEWATCHERREQUEST"]._serialized_start = 1610
- _globals["_REMOVEWATCHERREQUEST"]._serialized_end = 1663
- _globals["_REMOVEWATCHERRESPONSE"]._serialized_start = 1665
- _globals["_REMOVEWATCHERRESPONSE"]._serialized_end = 1688
- _globals["_FILESYSTEM"]._serialized_start = 1930
- _globals["_FILESYSTEM"]._serialized_end = 2601
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\016com.filesystemB\017FilesystemProtoP\001\242\002\003FXX\252\002\nFilesystem\312\002\nFilesystem\342\002\026Filesystem\\GPBMetadata\352\002\nFilesystem'
+ _globals['_FILETYPE']._serialized_start=1690
+ _globals['_FILETYPE']._serialized_end=1772
+ _globals['_EVENTTYPE']._serialized_start=1775
+ _globals['_EVENTTYPE']._serialized_end=1927
+ _globals['_MOVEREQUEST']._serialized_start=76
+ _globals['_MOVEREQUEST']._serialized_end=147
+ _globals['_MOVERESPONSE']._serialized_start=149
+ _globals['_MOVERESPONSE']._serialized_end=208
+ _globals['_MAKEDIRREQUEST']._serialized_start=210
+ _globals['_MAKEDIRREQUEST']._serialized_end=246
+ _globals['_MAKEDIRRESPONSE']._serialized_start=248
+ _globals['_MAKEDIRRESPONSE']._serialized_end=310
+ _globals['_REMOVEREQUEST']._serialized_start=312
+ _globals['_REMOVEREQUEST']._serialized_end=347
+ _globals['_REMOVERESPONSE']._serialized_start=349
+ _globals['_REMOVERESPONSE']._serialized_end=365
+ _globals['_STATREQUEST']._serialized_start=367
+ _globals['_STATREQUEST']._serialized_end=400
+ _globals['_STATRESPONSE']._serialized_start=402
+ _globals['_STATRESPONSE']._serialized_end=461
+ _globals['_ENTRYINFO']._serialized_start=464
+ _globals['_ENTRYINFO']._serialized_end=803
+ _globals['_LISTDIRREQUEST']._serialized_start=805
+ _globals['_LISTDIRREQUEST']._serialized_end=863
+ _globals['_LISTDIRRESPONSE']._serialized_start=865
+ _globals['_LISTDIRRESPONSE']._serialized_end=931
+ _globals['_WATCHDIRREQUEST']._serialized_start=933
+ _globals['_WATCHDIRREQUEST']._serialized_end=1000
+ _globals['_FILESYSTEMEVENT']._serialized_start=1002
+ _globals['_FILESYSTEMEVENT']._serialized_end=1082
+ _globals['_WATCHDIRRESPONSE']._serialized_start=1085
+ _globals['_WATCHDIRRESPONSE']._serialized_end=1339
+ _globals['_WATCHDIRRESPONSE_STARTEVENT']._serialized_start=1305
+ _globals['_WATCHDIRRESPONSE_STARTEVENT']._serialized_end=1317
+ _globals['_WATCHDIRRESPONSE_KEEPALIVE']._serialized_start=1319
+ _globals['_WATCHDIRRESPONSE_KEEPALIVE']._serialized_end=1330
+ _globals['_CREATEWATCHERREQUEST']._serialized_start=1341
+ _globals['_CREATEWATCHERREQUEST']._serialized_end=1413
+ _globals['_CREATEWATCHERRESPONSE']._serialized_start=1415
+ _globals['_CREATEWATCHERRESPONSE']._serialized_end=1469
+ _globals['_GETWATCHEREVENTSREQUEST']._serialized_start=1471
+ _globals['_GETWATCHEREVENTSREQUEST']._serialized_end=1527
+ _globals['_GETWATCHEREVENTSRESPONSE']._serialized_start=1529
+ _globals['_GETWATCHEREVENTSRESPONSE']._serialized_end=1608
+ _globals['_REMOVEWATCHERREQUEST']._serialized_start=1610
+ _globals['_REMOVEWATCHERREQUEST']._serialized_end=1663
+ _globals['_REMOVEWATCHERRESPONSE']._serialized_start=1665
+ _globals['_REMOVEWATCHERRESPONSE']._serialized_end=1688
+ _globals['_FILESYSTEM']._serialized_start=1930
+ _globals['_FILESYSTEM']._serialized_end=2601
# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
index e1843c3f9..477097952 100644
--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
@@ -173,7 +173,6 @@ class FilesystemEvent(_message.Message):
class WatchDirResponse(_message.Message):
__slots__ = ("start", "filesystem", "keepalive")
-
class StartEvent(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...
@@ -181,6 +180,7 @@ class WatchDirResponse(_message.Message):
class KeepAlive(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...
+
START_FIELD_NUMBER: _ClassVar[int]
FILESYSTEM_FIELD_NUMBER: _ClassVar[int]
KEEPALIVE_FIELD_NUMBER: _ClassVar[int]
diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.py b/packages/python-sdk/e2b/envd/process/process_pb2.py
index 22f2cdd34..55b6b58ba 100644
--- a/packages/python-sdk/e2b/envd/process/process_pb2.py
+++ b/packages/python-sdk/e2b/envd/process/process_pb2.py
@@ -3,11 +3,11 @@
# source: process/process.proto
# Protobuf Python Version: 5.26.1
"""Generated protocol buffer code."""
+
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.pyi b/packages/python-sdk/e2b/envd/process/process_pb2.pyi
index 46751e0af..c8242120c 100644
--- a/packages/python-sdk/e2b/envd/process/process_pb2.pyi
+++ b/packages/python-sdk/e2b/envd/process/process_pb2.pyi
@@ -24,7 +24,6 @@ SIGNAL_SIGKILL: Signal
class PTY(_message.Message):
__slots__ = ("size",)
-
class Size(_message.Message):
__slots__ = ("cols", "rows")
COLS_FIELD_NUMBER: _ClassVar[int]
@@ -34,13 +33,13 @@ class PTY(_message.Message):
def __init__(
self, cols: _Optional[int] = ..., rows: _Optional[int] = ...
) -> None: ...
+
SIZE_FIELD_NUMBER: _ClassVar[int]
size: PTY.Size
def __init__(self, size: _Optional[_Union[PTY.Size, _Mapping]] = ...) -> None: ...
class ProcessConfig(_message.Message):
__slots__ = ("cmd", "args", "envs", "cwd")
-
class EnvsEntry(_message.Message):
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
@@ -50,6 +49,7 @@ class ProcessConfig(_message.Message):
def __init__(
self, key: _Optional[str] = ..., value: _Optional[str] = ...
) -> None: ...
+
CMD_FIELD_NUMBER: _ClassVar[int]
ARGS_FIELD_NUMBER: _ClassVar[int]
ENVS_FIELD_NUMBER: _ClassVar[int]
@@ -126,7 +126,6 @@ class UpdateResponse(_message.Message):
class ProcessEvent(_message.Message):
__slots__ = ("start", "data", "end", "keepalive")
-
class StartEvent(_message.Message):
__slots__ = ("pid",)
PID_FIELD_NUMBER: _ClassVar[int]
@@ -169,6 +168,7 @@ class ProcessEvent(_message.Message):
class KeepAlive(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...
+
START_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
END_FIELD_NUMBER: _ClassVar[int]
@@ -229,7 +229,6 @@ class ProcessInput(_message.Message):
class StreamInputRequest(_message.Message):
__slots__ = ("start", "data", "keepalive")
-
class StartEvent(_message.Message):
__slots__ = ("process",)
PROCESS_FIELD_NUMBER: _ClassVar[int]
@@ -249,6 +248,7 @@ class StreamInputRequest(_message.Message):
class KeepAlive(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...
+
START_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
KEEPALIVE_FIELD_NUMBER: _ClassVar[int]
diff --git a/packages/python-sdk/package.json b/packages/python-sdk/package.json
index 11e42cd23..685f36963 100644
--- a/packages/python-sdk/package.json
+++ b/packages/python-sdk/package.json
@@ -8,6 +8,8 @@
"postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")",
"postPublish": "poetry build && poetry config pypi-token.pypi ${PYPI_TOKEN} && poetry publish --skip-existing",
"pretest": "poetry install",
- "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh"
+ "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh",
+ "lint": "poetry run make lint",
+ "format": "poetry run make format"
}
}
diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock
index 819dd353a..ce95aa380 100644
--- a/packages/python-sdk/poetry.lock
+++ b/packages/python-sdk/poetry.lock
@@ -239,7 +239,7 @@ description = "Cross-platform colored terminal text."
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
groups = ["dev"]
-markers = "platform_system == \"Windows\" or sys_platform == \"win32\""
+markers = "sys_platform == \"win32\" or platform_system == \"Windows\""
files = [
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
@@ -1252,4 +1252,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = "^3.9"
-content-hash = "ea7aba4a9e6cc671fc18a440eaa42519edc08501e80caa283df64b765c1d67bc"
+content-hash = "634f4c6d2241e87ff2c82aeda992ceb4497795b7aac4aadf3741a735a175dfd7"
diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml
index 05cb022ad..a97b72d45 100644
--- a/packages/python-sdk/pyproject.toml
+++ b/packages/python-sdk/pyproject.toml
@@ -21,7 +21,6 @@ packaging = ">=24.1"
typing-extensions = ">=4.1.0"
[tool.poetry.group.dev.dependencies]
-black = "^23.7.0"
pytest = "^7.4.0"
pytest-xdist = "^3.3.1"
python-dotenv = "^1.0.0"
diff --git a/packages/python-sdk/tests/async/sandbox_async/files/test_files_list.py b/packages/python-sdk/tests/async/sandbox_async/files/test_files_list.py
index 23034f75a..bc876b106 100644
--- a/packages/python-sdk/tests/async/sandbox_async/files/test_files_list.py
+++ b/packages/python-sdk/tests/async/sandbox_async/files/test_files_list.py
@@ -148,9 +148,9 @@ async def test_list_directory_error_cases(async_sandbox: AsyncSandbox):
await async_sandbox.files.list(parent_dir_name, depth=-1)
assert False, "Expected error but none was thrown"
except Exception as err:
- assert expected_error_message in str(
- err
- ), f'expected error message to include "{expected_error_message}"'
+ assert expected_error_message in str(err), (
+ f'expected error message to include "{expected_error_message}"'
+ )
await async_sandbox.files.remove(parent_dir_name)
diff --git a/packages/python-sdk/tests/conftest.py b/packages/python-sdk/tests/conftest.py
index 6f51a5c6b..e81c1d9b1 100644
--- a/packages/python-sdk/tests/conftest.py
+++ b/packages/python-sdk/tests/conftest.py
@@ -82,9 +82,9 @@ class Helpers:
await cmd.wait()
except CommandExitException as e:
if not disabled:
- assert (
- False
- ), f"command failed with exit code {e.exit_code}: {e.stderr}"
+ assert False, (
+ f"command failed with exit code {e.exit_code}: {e.stderr}"
+ )
asyncio.create_task(wait_for_exit())
diff --git a/packages/python-sdk/tests/sync/sandbox_sync/files/test_files_list.py b/packages/python-sdk/tests/sync/sandbox_sync/files/test_files_list.py
index 59782a67a..f4fbfebbb 100644
--- a/packages/python-sdk/tests/sync/sandbox_sync/files/test_files_list.py
+++ b/packages/python-sdk/tests/sync/sandbox_sync/files/test_files_list.py
@@ -148,9 +148,9 @@ def test_list_directory_error_cases(sandbox: Sandbox):
sandbox.files.list(parent_dir_name, depth=-1)
assert False, "Expected error but none was thrown"
except Exception as err:
- assert expected_error_message in str(
- err
- ), f'expected error message to include "{expected_error_message}"'
+ assert expected_error_message in str(err), (
+ f'expected error message to include "{expected_error_message}"'
+ )
sandbox.files.remove(parent_dir_name)