Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export function getSuitableProfiles(zipData: Uint8Array): [Date, ZipItem[]][] {
const profileTimestamps = groupBy(
profileFiles,
// group by file timestamp; all files in a bundle are named with names like TIMESTAMP_FILENAME
// where TIMESTAMP is a string encoding a timestamp
(file) => file.filename.match(/^(.*?)_/)?.[1] ?? ''
// where TIMESTAMP is an ISO 8601 timestamp
// Examples: "2026-01-19T12:55:54.152834443+00:00_logs.txt", "some/path/2026-01-19T12:55:54.152834443+00:00_logs.txt"
(file) => file.filename.match(/(?:^|\/)(\d{4}-\d{2}-\d{2}T[^/_]+)_/)?.[1] ?? ''
).filter(
(group) => group[0] && group[1].some((file) => circuitProfileRegex.test(file.filename))
// Pipeline config and dataflow graph are not required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
loadedPipelineName = sourceName
getProfileFiles = () => suitableProfiles
selectedProfile = suitableProfiles.at(-1)![0] // Select most recent
if (!selectedProfile || isNaN(selectedProfile.getTime())) { // Hopefully a redundant check for an obscure case where we did not pick a valid bundle
errorMessage = `Unexpected error: unable to pick the latest profile in a support bundle. Inspect the bundle archive for integrity.`
selectedProfile = null
return false
}
return true
} catch (error) {
if (error instanceof Error) {
Expand Down