Skip to content

Commit 55716f2

Browse files
committed
strict regex
1 parent 91c2f8f commit 55716f2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/base/src/commands/sourcemaps/debugId.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import fs from 'fs'
22

33
import type {Sourcemap} from './interfaces'
44

5-
const DD_DEBUG_ID_REGEX = /["']ddDebugId["']\s*:\s*["']([^"']+)["']/
5+
const DD_DEBUG_ID_REGEX =
6+
/["']ddDebugId["']\s*:\s*["']([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})["']/
67

78
export const extractDebugId = (filePath: string): string | undefined => {
89
try {

0 commit comments

Comments
 (0)