chore: align app workspace with BoxLite#464
Merged
Merged
Conversation
Comment on lines
+251
to
+257
| const runnerResponse = await fetch(targetUrl, { | ||
| method: req.method, | ||
| headers: { | ||
| Authorization: `Bearer ${runner.apiKey}`, | ||
| Accept: req.header('accept') || 'text/event-stream', | ||
| }, | ||
| }) |
| } | ||
|
|
||
| export function generateApiKeyHash(value: string): string { | ||
| return crypto.createHash('sha256').update(value).digest('hex') |
| * Empty URLs are assumed to be Docker Hub. | ||
| */ | ||
| function normalizeRegistryUrl(url: string): string { | ||
| if (!url || url.trim() === '' || url.toLowerCase().includes('docker.io')) { |
| return DOCKER_HUB_URL | ||
| } | ||
| // Strip trailing slashes for consistent matching | ||
| return url.trim().replace(/\/+$/, '') |
|
|
||
| // Add default Docker Hub registry only if user doesn't have their own Docker Hub credentials | ||
| // The auth configs map is keyed by URL, so adding the default last would override user credentials | ||
| const userHasDockerHubCreds = sourceRegistries.some((registry) => registry.url.includes('docker.io')) |
Comment on lines
+279
to
+286
| await axios.delete( | ||
| `${this.configService.getOrThrow('oidc.issuer')}/api/v2/users/${authContext.userId}/identities/${provider}/${providerUserId}`, | ||
| { | ||
| headers: { | ||
| Authorization: `Bearer ${token}`, | ||
| }, | ||
| }, | ||
| ) |
| return [ | ||
| `\n\n${ind}// Run code securely inside the Sandbox`, | ||
| `${ind}const codeRunResponse = await sandbox.process.codeRun(\``, | ||
| `${(p.state['codeRunParams'].languageCode ?? '').replace(/`/g, '\\`').replace(/\$\{/g, '\\${')}`, // Escape backticks and ${ to prevent breaking the template literal |
| } | ||
|
|
||
| function escapePromiseSpecialCharacters(contents) { | ||
| return contents.replace(/`Promise`\s*\\<((?:`?[^`<>]+`?|<[^<>]+>)*?)>/g, (_match, typeContent) => { |
| type = indexSignatureType | ||
| } | ||
|
|
||
| type = type.replace(/([*_`\[\]()<>|])/g, '\\$1') |
| runCommands(...commands: (string | string[])[]): Image { | ||
| for (const command of commands) { | ||
| if (Array.isArray(command)) { | ||
| this._dockerfile += `RUN ${command.map((c) => `"${c.replace(/"/g, '\\\\\\"').replace(/'/g, "\\'")}"`).join(' ')}\n` |
|
|
||
| // Calculate how many bytes we can safely process | ||
| // We need to keep bytes that could potentially be the start of a prefix marker | ||
| let safeLen = buf.length |
| <TooltipTrigger asChild> | ||
| {labelCount > 0 ? ( | ||
| <div className="truncate w-fit bg-blue-100 rounded-sm text-blue-800 dark:bg-blue-950 dark:text-blue-200 px-1"> | ||
| {labelCount > 0 ? (labelCount === 1 ? '1 label' : `${labelCount} labels`) : '/'} |
| Updating... | ||
| </Button> | ||
| ) : ( | ||
| <Button type="submit" form="update-region-form" variant="default" disabled={loading || !hasChanges}> |
| className={cn({ | ||
| 'text-foreground': checked, | ||
| 'text-muted-foreground': !checked, | ||
| 'hover:underline': !checked && link, |
| }) | ||
| }} | ||
| aria-label="Select all" | ||
| disabled={!deletePermitted || loading} |
| checked={row.getIsSelected()} | ||
| onCheckedChange={(value) => row.toggleSelected(!!value)} | ||
| aria-label="Select row" | ||
| disabled={!deletePermitted || loadingSnapshots[row.original.id] || loading} |
| if (!isOpen) setRegionToUpdate(null) | ||
| }} | ||
| onUpdateRegion={handleUpdateRegion} | ||
| loading={regionToUpdate ? regionIsLoading[regionToUpdate.id] || false : false} |
| return cleanedContent | ||
| } | ||
|
|
||
| return modified ? lines.join('\n') : contents |
| const countText = count === 1 ? 'this volume' : `these ${count} selected volumes` | ||
|
|
||
| return ( | ||
| <AlertDialog open={action !== null} onOpenChange={(open) => !open && onCancel()}> |
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
b8510b2 to
fb11c5c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/.Verification
git diff --check origin/main...HEADgo list -mod=readonly ./...in app Go modules: api-client-go, cli, common-go, daemon, computer-use, otel exporter, proxy, runner, snapshot-manager, ssh-gatewayjq emptyfor root/app package manifests