Class EmbeddedSass.OutboundMessage.FileImportRequest

All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable, EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
Enclosing class:
EmbeddedSass.OutboundMessage

public static final class EmbeddedSass.OutboundMessage.FileImportRequest extends GeneratedMessageV3 implements EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
 A request for a custom filesystem importer to load the contents of a
 stylesheet.
 A filesystem importer is represented in the compiler as an [importer]. When
 the importer is invoked with a string `string`:
 [importer]: https://github.com/sass/sass/tree/main/spec/modules.md#importer
 * If `string` is an absolute URL whose scheme is `file`:
   * Let `url` be string.
 * Otherwise:
   * Let `fromImport` be `true` if the importer is being run for an
     `@import` and `false` otherwise.
   * Let `response` be the result of sending a `FileImportRequest` with
     `string` as its `url` and `fromImport` as `from_import`.
   * If `response.result` is null, return null.
   * Otherwise, if `response.result.error` is set, throw an error.
   * Otherwise, let `url` be `response.result.file_url`.
 * Let `resolved` be the result of [resolving `url`].
 * If `resolved` is null, return null.
 * Let `text` be the contents of the file at `resolved`.
 * Let `syntax` be:
   * "scss" if `url` ends in `.scss`.
   * "indented" if `url` ends in `.sass`.
   * "css" if `url` ends in `.css`.
   > The algorithm for resolving a `file:` URL guarantees that `url` will have
   > one of these extensions.
 * Return `text`, `syntax`, and `resolved`.
 [resolving `url`]: https://github.com/sass/sass/tree/main/spec/modules.md#resolving-a-file-url
 
Protobuf type sass.embedded_protocol.OutboundMessage.FileImportRequest
See Also: