Information about the host environment.
| 10003 | |
| 10004 | @typecheck |
| 10005 | class Host(Type): |
| 10006 | """Information about the host environment.""" |
| 10007 | |
| 10008 | def container_image(self, name: str) -> Container: |
| 10009 | """Accesses a container image on the host. |
| 10010 | |
| 10011 | Parameters |
| 10012 | ---------- |
| 10013 | name: |
| 10014 | Name of the image to access. |
| 10015 | """ |
| 10016 | _args = [ |
| 10017 | Arg("name", name), |
| 10018 | ] |
| 10019 | _ctx = self._select("containerImage", _args) |
| 10020 | return Container(_ctx) |
| 10021 | |
| 10022 | def directory( |
| 10023 | self, |
| 10024 | path: str, |
| 10025 | *, |
| 10026 | exclude: list[str] | None = None, |
| 10027 | include: list[str] | None = None, |
| 10028 | no_cache: bool | None = False, |
| 10029 | gitignore: bool | None = False, |
| 10030 | ) -> Directory: |
| 10031 | """Accesses a directory on the host. |
| 10032 | |
| 10033 | Parameters |
| 10034 | ---------- |
| 10035 | path: |
| 10036 | Location of the directory to access (e.g., "."). |
| 10037 | exclude: |
| 10038 | Exclude artifacts that match the given pattern (e.g., |
| 10039 | ["node_modules/", ".git*"]). |
| 10040 | include: |
| 10041 | Include only artifacts that match the given pattern (e.g., |
| 10042 | ["app/", "package.*"]). |
| 10043 | no_cache: |
| 10044 | If true, the directory will always be reloaded from the host. |
| 10045 | gitignore: |
| 10046 | Apply .gitignore filter rules inside the directory |
| 10047 | """ |
| 10048 | _args = [ |
| 10049 | Arg("path", path), |
| 10050 | Arg("exclude", [] if exclude is None else exclude, []), |
| 10051 | Arg("include", [] if include is None else include, []), |
| 10052 | Arg("noCache", no_cache, False), |
| 10053 | Arg("gitignore", gitignore, False), |
| 10054 | ] |
| 10055 | _ctx = self._select("directory", _args) |
| 10056 | return Directory(_ctx) |
| 10057 | |
| 10058 | def file( |
| 10059 | self, |
| 10060 | path: str, |
| 10061 | *, |
| 10062 | no_cache: bool | None = False, |
no outgoing calls
no test coverage detected