(statements: readonly string[])
| 20 | const SCHEMA_FINGERPRINT_ID = "runtime-schema"; |
| 21 | |
| 22 | const schemaFingerprint = async (statements: readonly string[]): Promise<string> => { |
| 23 | const bytes = new TextEncoder().encode(statements.join("\0")); |
| 24 | const digest = await crypto.subtle.digest("SHA-256", bytes); |
| 25 | return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join(""); |
| 26 | }; |
| 27 | |
| 28 | const isMissingFingerprintTable = (error: unknown): boolean => { |
| 29 | for (let current = error, depth = 0; current != null && depth < 8; depth += 1) { |
no test coverage detected