-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'edge' into chore_update-cypress
- Loading branch information
Showing
403 changed files
with
20,574 additions
and
18,946 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
api-client/src/runs/commands/getCommandsAsPreSerializedList.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GET, request } from '../../request' | ||
|
||
import type { ResponsePromise } from '../../request' | ||
import type { HostConfig } from '../../types' | ||
import type { | ||
CommandsAsPreSerializedListData, | ||
GetCommandsParams, | ||
} from './types' | ||
|
||
export function getCommandsAsPreSerializedList( | ||
config: HostConfig, | ||
runId: string, | ||
params: GetCommandsParams | ||
): ResponsePromise<CommandsAsPreSerializedListData> { | ||
return request<CommandsAsPreSerializedListData>( | ||
GET, | ||
`/runs/${runId}/commandsAsPreSerializedList`, | ||
null, | ||
config, | ||
params | ||
) | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { describe, expect, it } from 'vitest' | ||
import { sanitizeFileName } from '../utils' | ||
|
||
describe('sanitizeFileName', () => { | ||
it('returns original alphanumeric file name', () => { | ||
expect(sanitizeFileName('an0ther_otie_logo.png')).toEqual( | ||
'an0ther_otie_logo.png' | ||
) | ||
}) | ||
|
||
it('sanitizes a file name', () => { | ||
expect( | ||
sanitizeFileName( | ||
`otie's birthday/party - (& the bouncy castle cost ~$100,000).jpeg` | ||
) | ||
).toEqual( | ||
'otie_s_birthday_party_-____the_bouncy_castle_cost___100_000_.jpeg' | ||
) | ||
}) | ||
}) |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function sanitizeFileName(fileName: string): string { | ||
return fileName.replace(/[^a-zA-Z0-9-.]/gi, '_') | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.