(parsed: unknown)
| 52 | } |
| 53 | |
| 54 | function getContents(parsed: unknown): SnippetsLabRecord | null { |
| 55 | if (!isRecord(parsed) || !isRecord(parsed.contents)) { |
| 56 | return null |
| 57 | } |
| 58 | |
| 59 | const snippets = getRecordArray(parsed.contents, 'snippets') |
| 60 | const schema = readString(parsed, 'schema') |
| 61 | const app = readString(parsed, 'app') |
| 62 | |
| 63 | if (!snippets.length || (!schema && !app)) { |
| 64 | return null |
| 65 | } |
| 66 | |
| 67 | return parsed.contents |
| 68 | } |
| 69 | |
| 70 | function buildFolderPathMap( |
| 71 | folders: SnippetsLabRecord[], |
no test coverage detected