(
url: string,
label: string,
dataExpr: string = "{}"
)
| 27 | let activeDebugUrl: string | null = null; |
| 28 | |
| 29 | function generateFetchSnippet( |
| 30 | url: string, |
| 31 | label: string, |
| 32 | dataExpr: string = "{}" |
| 33 | ): string { |
| 34 | return `fetch("${url}", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "${label}", data: ${dataExpr} }) }).catch(() => {});`; |
| 35 | } |
| 36 | |
| 37 | function getDebugInstructions(debugUrl: string): string { |
| 38 | return ` |
no outgoing calls
no test coverage detected