( pack: Pack, tableNames: string[], executionContext?: FlowExecutionContext, )
| 126 | }; |
| 127 | |
| 128 | const cacheTableFilesForPack = ( |
| 129 | pack: Pack, |
| 130 | tableNames: string[], |
| 131 | executionContext?: FlowExecutionContext, |
| 132 | ): void => { |
| 133 | if (!executionContext) { |
| 134 | return; |
| 135 | } |
| 136 | |
| 137 | for (const tableName of tableNames) { |
| 138 | const cacheKey = `${pack.path}|${tableName}`; |
| 139 | if (executionContext.tableFilesByPackAndTable.has(cacheKey)) { |
| 140 | continue; |
| 141 | } |
| 142 | |
| 143 | executionContext.tableFilesByPackAndTable.set( |
| 144 | cacheKey, |
| 145 | pack.packedFiles.filter((packedFile) => packedFile.name === tableName || packedFile.name.startsWith(`${tableName}\\`)), |
| 146 | ); |
| 147 | } |
| 148 | }; |
| 149 | |
| 150 | const getTableFilesForPackAndTables = async ( |
| 151 | packPath: string, |
no outgoing calls
no test coverage detected