(entry: string, response: unknown)
| 60 | function getProbeRequest(entry: string): unknown { |
| 61 | if (entry === 'codegen/worker.ts') { |
| 62 | return { |
| 63 | id: 1, |
| 64 | payload: { |
| 65 | pluginCode: 'export default { name: "worker-probe", code: {} }', |
| 66 | style: {}, |
| 67 | options: { useRem: false, rootFontSize: 16, scale: 1 } |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | if (entry === 'mcp/transform-variables/worker.ts') { |
| 73 | return { |
| 74 | id: 1, |
| 75 | payload: { |
| 76 | pluginCode: 'export default { name: "worker-probe", code: {} }', |
| 77 | references: [], |
| 78 | options: { useRem: false, rootFontSize: 16, scale: 1 } |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | throw new Error(`[worker-check] Missing probe request for ${entry}`) |
| 84 | } |
| 85 | |
| 86 | function assertProbeResponse(entry: string, response: unknown): void { |
| 87 | if (!isRecord(response)) { |
| 88 | throw new Error(`[worker-check] ${entry} probe returned a non-object response.`) |
| 89 | } |
no test coverage detected