public static final class OutboundMessage.FileImportRequest extends com.google.protobuf.GeneratedMessageV3 implements 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 `containingUrl` be the canonical URL of the [current source file] if it has one, or undefined otherwise. * Let `response` be the result of sending a `FileImportRequest` with `string` as its `url`, `fromImport` as `from_import`, and `containingUrl` as `containing_url`. * 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`. [current source file]: ../spec.md#current-source-file [resolving `url`]: https://github.com/sass/sass/tree/main/spec/modules.md#resolving-a-file-urlProtobuf type
sass.embedded_protocol.OutboundMessage.FileImportRequest
Modifier and Type | Class and Description |
---|---|
static class |
OutboundMessage.FileImportRequest.Builder
A request for a custom filesystem importer to load the contents of a
stylesheet.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
CONTAINING_URL_FIELD_NUMBER |
static int |
FROM_IMPORT_FIELD_NUMBER |
static int |
ID_FIELD_NUMBER |
static int |
IMPORTER_ID_FIELD_NUMBER |
static int |
URL_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getContainingUrl()
The canonical URL of the [current source file] that contained the load
being resolved.
|
com.google.protobuf.ByteString |
getContainingUrlBytes()
The canonical URL of the [current source file] that contained the load
being resolved.
|
static OutboundMessage.FileImportRequest |
getDefaultInstance() |
OutboundMessage.FileImportRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getFromImport()
Whether this request comes from an `@import` rule.
|
int |
getId()
uint32 id = 1; |
int |
getImporterId()
The unique ID of the importer being invoked.
|
com.google.protobuf.Parser<OutboundMessage.FileImportRequest> |
getParserForType() |
int |
getSerializedSize() |
String |
getUrl()
The (non-canonicalized) URL of the import.
|
com.google.protobuf.ByteString |
getUrlBytes()
The (non-canonicalized) URL of the import.
|
boolean |
hasContainingUrl()
The canonical URL of the [current source file] that contained the load
being resolved.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static OutboundMessage.FileImportRequest.Builder |
newBuilder() |
static OutboundMessage.FileImportRequest.Builder |
newBuilder(OutboundMessage.FileImportRequest prototype) |
OutboundMessage.FileImportRequest.Builder |
newBuilderForType() |
protected OutboundMessage.FileImportRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static OutboundMessage.FileImportRequest |
parseDelimitedFrom(InputStream input) |
static OutboundMessage.FileImportRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OutboundMessage.FileImportRequest |
parseFrom(byte[] data) |
static OutboundMessage.FileImportRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OutboundMessage.FileImportRequest |
parseFrom(ByteBuffer data) |
static OutboundMessage.FileImportRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OutboundMessage.FileImportRequest |
parseFrom(com.google.protobuf.ByteString data) |
static OutboundMessage.FileImportRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OutboundMessage.FileImportRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static OutboundMessage.FileImportRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OutboundMessage.FileImportRequest |
parseFrom(InputStream input) |
static OutboundMessage.FileImportRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<OutboundMessage.FileImportRequest> |
parser() |
OutboundMessage.FileImportRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int ID_FIELD_NUMBER
public static final int IMPORTER_ID_FIELD_NUMBER
public static final int URL_FIELD_NUMBER
public static final int FROM_IMPORT_FIELD_NUMBER
public static final int CONTAINING_URL_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3
public int getId()
uint32 id = 1;
getId
in interface OutboundMessage.FileImportRequestOrBuilder
public int getImporterId()
The unique ID of the importer being invoked. This must match an `Importer.file_importer_id` passed to this compilation in `CompileRequest.importers` or `CompileRequest.input.string.importer`.
uint32 importer_id = 3;
getImporterId
in interface OutboundMessage.FileImportRequestOrBuilder
public String getUrl()
The (non-canonicalized) URL of the import.
string url = 4;
getUrl
in interface OutboundMessage.FileImportRequestOrBuilder
public com.google.protobuf.ByteString getUrlBytes()
The (non-canonicalized) URL of the import.
string url = 4;
getUrlBytes
in interface OutboundMessage.FileImportRequestOrBuilder
public boolean getFromImport()
Whether this request comes from an `@import` rule. When evaluating `@import` rules, filesystem importers should load an [import-only file] if one exists for the URL being canonicalized. Otherwise, canonicalization should be identical for `@import` and `@use` rules. [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
bool from_import = 5;
getFromImport
in interface OutboundMessage.FileImportRequestOrBuilder
public boolean hasContainingUrl()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;
hasContainingUrl
in interface OutboundMessage.FileImportRequestOrBuilder
public String getContainingUrl()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;
getContainingUrl
in interface OutboundMessage.FileImportRequestOrBuilder
public com.google.protobuf.ByteString getContainingUrlBytes()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;
getContainingUrlBytes
in interface OutboundMessage.FileImportRequestOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static OutboundMessage.FileImportRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static OutboundMessage.FileImportRequest parseFrom(InputStream input) throws IOException
IOException
public static OutboundMessage.FileImportRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static OutboundMessage.FileImportRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static OutboundMessage.FileImportRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static OutboundMessage.FileImportRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static OutboundMessage.FileImportRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public OutboundMessage.FileImportRequest.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static OutboundMessage.FileImportRequest.Builder newBuilder()
public static OutboundMessage.FileImportRequest.Builder newBuilder(OutboundMessage.FileImportRequest prototype)
public OutboundMessage.FileImportRequest.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected OutboundMessage.FileImportRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessageV3
public static OutboundMessage.FileImportRequest getDefaultInstance()
public static com.google.protobuf.Parser<OutboundMessage.FileImportRequest> parser()
public com.google.protobuf.Parser<OutboundMessage.FileImportRequest> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public OutboundMessage.FileImportRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder