Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-estate-iac-importers FR-008
Reading files for the importers: a path that is a file is read and must be one an importer reads; a path that is a folder is walked, and a JSON or YAML file in it that no importer reads is skipped without a word (a folder holds much besides infrastructure), except that folders of tools (node_modules, .git, .terraform) are not entered. The files are read as text and nothing is run. Two assets of one identity in two files are one problem and the first is kept.
import { importPaths } from "./files.ts" ;
// await importPaths(["infra/plan.json", "deploy/"]) // { assets, links, problems, files } Source: commons/estate-iac/src/physical/files.ts
1 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
physical.ImportedPathstype no test imports it type ImportedPaths = { readonly assets : readonly Imported []; readonly links : readonly ImportedLink []; readonly problems : readonly string []; readonly files : readonly { readonly source : string ; readonly tool : Tool ; readonly assets : number }[] };What reading several paths gave.
physical.importPathsfunction no test imports it function importPaths (paths : readonly string [], prefer ?: "opentofu" | "terraform" ): Promise <ImportedPaths >The assets and links of the files and folders at the paths. prefer says which of OpenTofu and Terraform wrote a show -json.
ImportedPathstype no test imports it type ImportedPaths = { readonly assets : readonly Imported []; readonly links : readonly ImportedLink []; readonly problems : readonly string []; readonly files : readonly { readonly source : string ; readonly tool : Tool ; readonly assets : number }[] };What reading several paths gave.
function importPaths (paths : readonly string [], prefer ?: "opentofu" | "terraform" ): Promise <ImportedPaths >The assets and links of the files and folders at the paths. prefer says which of OpenTofu and Terraform wrote a show -json.
Imported by 7 tests of the run (7 passed, 0 failed): the library's results