* Retrieves the content of a server-side asset using its path. * * @param path - The path to the server asset within the manifest. * @returns The server asset associated with the provided path, as a `ServerAsset` object. * @throws Error - Throws an error if the asset does not exist.
(path: string)
| 27 | * @throws Error - Throws an error if the asset does not exist. |
| 28 | */ |
| 29 | getServerAsset(path: string): ServerAsset { |
| 30 | const asset = this.manifest.assets[path]; |
| 31 | if (!asset) { |
| 32 | throw new Error(`Server asset '${path}' does not exist.`); |
| 33 | } |
| 34 | |
| 35 | return asset; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Checks if a specific server-side asset exists. |
no outgoing calls
no test coverage detected