sass-embedded 0.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ """sass-embedded is Dart Sass bindings for Python."""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+ from .simple import compile_directory, compile_file, compile_string
6
+
7
+ __all__ = ["compile_directory", "compile_file", "compile_string"]
@@ -0,0 +1,7 @@
1
+ """Constants to use internal of project."""
2
+
3
+ DART_SASS_VERSION = "1.87.0"
4
+ """Version of bundled Dart Sass."""
5
+
6
+ EMBEDDED_PROTOCOL_VERSION = "3.1.0"
7
+ """Version of The Embedded Sass Protocol."""
@@ -0,0 +1 @@
1
+ _ext
@@ -0,0 +1,122 @@
1
+ """Controller of Dart Sass.
2
+
3
+ This module works to
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import logging
9
+ import platform
10
+ from dataclasses import dataclass
11
+ from pathlib import Path
12
+ from typing import TYPE_CHECKING, Literal
13
+
14
+ from .._const import DART_SASS_VERSION
15
+
16
+ if TYPE_CHECKING:
17
+ pass
18
+
19
+ OSName = Literal["android", "linux", "macos", "windows"]
20
+ ArchName = Literal["arm", "arm64", "ia32", "riscv64", "x64"]
21
+
22
+ logger = logging.getLogger(__name__)
23
+ here = Path(__file__).parent
24
+
25
+
26
+ def resolve_os() -> OSName:
27
+ """Retrieve os name as dart-sass specified."""
28
+ os_name = platform.system()
29
+ if os_name == "Darwin":
30
+ return "macos"
31
+ if os_name in ("Linux", "Windows", "Android"):
32
+ return os_name.lower() # type: ignore[return-value]
33
+ raise Exception(f"There is not dart-sass binary for {os_name}")
34
+
35
+
36
+ def resolve_arch() -> ArchName:
37
+ """Retrieve cpu architecture string as dart-sass specified."""
38
+ # NOTE: This logic is not all covered.
39
+ arch_name = platform.machine()
40
+ if arch_name in ("x86_64", "AMD64"):
41
+ arch_name = "x64"
42
+ if arch_name.startswith("arm") and arch_name != "arm64":
43
+ arch_name = "arm"
44
+ return arch_name # type: ignore[return-value]
45
+
46
+
47
+ @dataclass
48
+ class Release:
49
+ """Release data of Dart Sass.
50
+
51
+ This class manages information about release pack Dart Sass.
52
+ """
53
+
54
+ os: OSName
55
+ """Identify of OS."""
56
+ arch: ArchName
57
+ """Identify of CPU architecture."""
58
+ version: str = DART_SASS_VERSION
59
+ """Versionstring of Dart Sass."""
60
+
61
+ @property
62
+ def fullname(self) -> str:
63
+ """Full name of release's directory."""
64
+ return f"{self.version}-{self.os}-{self.arch}"
65
+
66
+ @property
67
+ def archive_url(self) -> str:
68
+ """URL for archive of GitHub Releases."""
69
+ ext = "zip" if self.os == "windows" else "tar.gz"
70
+ return f"https://github.com/sass/dart-sass/releases/download/{self.version}/dart-sass-{self.version}-{self.os}-{self.arch}.{ext}"
71
+
72
+ @property
73
+ def archive_format(self) -> str:
74
+ """String of ``shutil.unpack_archive``."""
75
+ return "zip" if self.os == "windows" else "gztar"
76
+
77
+ @classmethod
78
+ def init(cls) -> Release:
79
+ """Create object with current environment and registered version."""
80
+ os_name = resolve_os()
81
+ arch_name = resolve_arch()
82
+ return cls(os=os_name, arch=arch_name)
83
+
84
+ def resolve_dir(self, base_dir: Path):
85
+ """Retrieve full path of release's directory."""
86
+ return base_dir / self.fullname
87
+
88
+ def get_executable(self, base_dir: Path | None = None) -> Executable:
89
+ """Retrieve executable components object."""
90
+ base_dir = base_dir or resolve_bin_base_dir()
91
+ return Executable(base_dir=base_dir, release=self)
92
+
93
+
94
+ @dataclass
95
+ class Executable:
96
+ """Data for local files data of Dart Sass.
97
+
98
+ This class manages filepath and more about unpacked Dart Sass.
99
+ """
100
+
101
+ base_dir: Path
102
+ """Installed directory."""
103
+ release: Release
104
+ """Release information of installed components."""
105
+
106
+ @property
107
+ def dart_vm_path(self) -> Path:
108
+ """Full path of Dart runtime."""
109
+ dir_ = self.release.resolve_dir(self.base_dir)
110
+ ext_ = ".exe" if self.release.os == "windows" else ""
111
+ return (dir_ / "dart-sass" / "src" / f"dart{ext_}").resolve()
112
+
113
+ @property
114
+ def sass_snapshot_path(self) -> Path:
115
+ """Full path of compiled module."""
116
+ dir_ = self.release.resolve_dir(self.base_dir)
117
+ return (dir_ / "dart-sass" / "src" / "sass.snapshot").resolve()
118
+
119
+
120
+ def resolve_bin_base_dir() -> Path:
121
+ """Retrieve base directory to install Dart Sass binaries."""
122
+ return here / "_ext"
@@ -0,0 +1,23 @@
1
+ import argparse
2
+ import logging
3
+
4
+ from . import installer
5
+
6
+ logger = logging.getLogger(__name__)
7
+ parser = argparse.ArgumentParser()
8
+ parser.add_argument("--clean", action="store_true", default=False)
9
+ parser.add_argument("--os", default=None, type=str)
10
+ parser.add_argument("--arch", default=None, type=str)
11
+
12
+ logging.basicConfig(level=logging.DEBUG)
13
+
14
+ logger.debug("START: Install dart-sass by CLI")
15
+
16
+ args = parser.parse_args()
17
+ if args.clean:
18
+ installer.clean()
19
+ if args.os and args.arch:
20
+ installer.install(os_name=args.os, arch_name=args.arch)
21
+ else:
22
+ installer.install()
23
+ logger.debug("END: Install dart-sass by CLI")
@@ -0,0 +1,51 @@
1
+ """Installation proc.
2
+
3
+ It works to fetch release archive from GitHub
4
+ and install into library directory.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import logging
10
+ import shutil
11
+ import tempfile
12
+ from pathlib import Path
13
+ from typing import TYPE_CHECKING
14
+ from urllib.request import urlopen
15
+
16
+ from . import Release, resolve_bin_base_dir
17
+
18
+ if TYPE_CHECKING:
19
+ from typing import Optional
20
+
21
+ logger = logging.getLogger(__name__)
22
+
23
+
24
+ def clean():
25
+ """Clean up all executables."""
26
+ logger.info("Clean up executables.")
27
+ shutil.rmtree(resolve_bin_base_dir(), ignore_errors=True)
28
+
29
+
30
+ def install(os_name: Optional[str] = None, arch_name: Optional[str] = None):
31
+ """Install Dart Sass executable.
32
+
33
+ :param os_name: Target OS of archives.
34
+ :param arch_name: Target CPU architecture of archives.
35
+ """
36
+ if os_name and arch_name:
37
+ release = Release(os=os_name, arch=arch_name) # type: ignore[arg-type]
38
+ else:
39
+ release = Release.init()
40
+ release_dir = release.resolve_dir(resolve_bin_base_dir())
41
+ logging.debug(f"Find '{release_dir}'")
42
+ if release_dir.exists() and (release_dir / "src").exists():
43
+ logging.info("Dart Sass binary is already installed.")
44
+ return
45
+ logging.info("Fetching Dart Sass binary.")
46
+ shutil.rmtree(release_dir, ignore_errors=True)
47
+ # TODO: Add error handling if it needs.
48
+ resp = urlopen(release.archive_url)
49
+ archive_path = Path(tempfile.mktemp())
50
+ archive_path.write_bytes(resp.read())
51
+ shutil.unpack_archive(archive_path, release_dir, release.archive_format)
@@ -0,0 +1,11 @@
1
+ """Interface of The Embedded Sass Protocol.
2
+
3
+ This package manages components to handle `The Embedded Sass Protocol`_.
4
+
5
+ .. important::
6
+
7
+ This is first demo feature.
8
+ It will work correctly, but user must handle raw protobuf objects.
9
+
10
+ .. _The Embedded Sass Protocol: https://github.com/sass/sass/blob/main/spec/embedded-protocol.md
11
+ """
@@ -0,0 +1,119 @@
1
+ """Process manager of Dart Sass Compiler."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import subprocess
6
+ from dataclasses import dataclass
7
+ from typing import TYPE_CHECKING
8
+
9
+ from blackboxprotobuf.lib.types import varint
10
+
11
+ from ..dart_sass import Release
12
+ from .embedded_sass_pb2 import OutboundMessage
13
+
14
+ if TYPE_CHECKING:
15
+ from typing import Optional
16
+
17
+ from ..dart_sass import Executable
18
+ from .embedded_sass_pb2 import InboundMessage
19
+
20
+
21
+ @dataclass
22
+ class Packet:
23
+ """Packet component to send process.
24
+
25
+ This has attributes and procedure to send ``InboundMessage`` for host process.
26
+
27
+ :ref: https://github.com/sass/sass/blob/main/spec/embedded-protocol.md#packet-structure
28
+ """
29
+
30
+ compilation_id: int
31
+ message: InboundMessage
32
+
33
+ def to_bytes(self) -> bytes:
34
+ """Convert to bytes stream for Dart Sass."""
35
+ msg = self.message.SerializeToString()
36
+ id_bytes = varint.encode_varint(self.compilation_id)
37
+ length = len(id_bytes + msg)
38
+ len_bytes = varint.encode_varint(length)
39
+ return bytes(len_bytes + id_bytes) + msg
40
+
41
+
42
+ class Host:
43
+ """Host process of compiler."""
44
+
45
+ executable: Executable
46
+ _proc: Optional[subprocess.Popen]
47
+ _id: int
48
+
49
+ def __init__(self):
50
+ self.executable = Release.init().get_executable()
51
+ self._proc = None
52
+ self._id = 1
53
+
54
+ def __del__(self):
55
+ self.close()
56
+
57
+ def connect(self):
58
+ """Open and connect Sass process."""
59
+ if self._proc:
60
+ return
61
+ command = [
62
+ self.executable.dart_vm_path,
63
+ self.executable.sass_snapshot_path,
64
+ "--embedded",
65
+ ]
66
+ self._proc = subprocess.Popen(
67
+ command,
68
+ stdin=subprocess.PIPE,
69
+ stdout=subprocess.PIPE,
70
+ stderr=subprocess.PIPE,
71
+ text=False,
72
+ bufsize=0,
73
+ )
74
+
75
+ def close(self):
76
+ """Stop host process."""
77
+ if self._proc:
78
+ self._proc.communicate()
79
+
80
+ def make_packet(self, message: InboundMessage) -> Packet:
81
+ """Convert from protobuf message to packet structure.
82
+
83
+ :param message: Sending message.
84
+ :returns: Packet component.
85
+ """
86
+ cid = 0 if message.WhichOneof("message") == "version_request" else self._id
87
+ if cid:
88
+ self._id += 1
89
+ return Packet(compilation_id=cid, message=message)
90
+
91
+ def send_message(self, message: InboundMessage) -> OutboundMessage:
92
+ """Send protobuf message for host process.
93
+
94
+ :param message: Sending message.
95
+ :returns: Parsed protbuf message.
96
+ """
97
+ if not self._proc:
98
+ raise Exception("Dart Sass process is not started.")
99
+ # Sending packet.
100
+ packet = self.make_packet(message)
101
+ self._proc.stdin.write(packet.to_bytes()) # type: ignore[union-attr]
102
+ # Recieve packet.
103
+ out = b""
104
+ idx = 0
105
+ length = 0
106
+ while not self._proc.stdout.closed: # type: ignore[union-attr]
107
+ out += self._proc.stdout.read(8) # type: ignore[union-attr]
108
+ if not out:
109
+ continue
110
+ length, idx = varint.decode_varint(out, 0)
111
+ if length == len(out[idx:]):
112
+ break
113
+ # Parse packet.
114
+ cid, cidx = varint.decode_varint(out, idx)
115
+ if cid != packet.compilation_id:
116
+ raise Exception("CompilationID of request and response are not matched.")
117
+ msg = OutboundMessage()
118
+ msg.ParseFromString(out[cidx:])
119
+ return msg
@@ -0,0 +1,129 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: embedded_sass.proto
5
+ # Protobuf Python Version: 6.30.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 30,
16
+ 2,
17
+ '',
18
+ 'embedded_sass.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x65mbedded_sass.proto\x12\x16sass.embedded_protocol\"\xe8\x10\n\x0eInboundMessage\x12P\n\x0f\x63ompile_request\x18\x02 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.CompileRequestH\x00\x12\\\n\x15\x63\x61nonicalize_response\x18\x03 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.CanonicalizeResponseH\x00\x12P\n\x0fimport_response\x18\x04 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.ImportResponseH\x00\x12Y\n\x14\x66ile_import_response\x18\x05 \x01(\x0b\x32\x39.sass.embedded_protocol.InboundMessage.FileImportResponseH\x00\x12]\n\x16\x66unction_call_response\x18\x06 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.FunctionCallResponseH\x00\x12P\n\x0fversion_request\x18\x07 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.VersionRequestH\x00\x1a\x1c\n\x0eVersionRequest\x12\n\n\x02id\x18\x01 \x01(\r\x1a\x98\x07\n\x0e\x43ompileRequest\x12S\n\x06string\x18\x02 \x01(\x0b\x32\x41.sass.embedded_protocol.InboundMessage.CompileRequest.StringInputH\x00\x12\x0e\n\x04path\x18\x03 \x01(\tH\x00\x12\x32\n\x05style\x18\x04 \x01(\x0e\x32#.sass.embedded_protocol.OutputStyle\x12\x12\n\nsource_map\x18\x05 \x01(\x08\x12Q\n\timporters\x18\x06 \x03(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x12\x18\n\x10global_functions\x18\x07 \x03(\t\x12\x13\n\x0b\x61lert_color\x18\x08 \x01(\x08\x12\x13\n\x0b\x61lert_ascii\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x08\x12\x12\n\nquiet_deps\x18\x0b \x01(\x08\x12\"\n\x1asource_map_include_sources\x18\x0c \x01(\x08\x12\x0f\n\x07\x63harset\x18\r \x01(\x08\x12\x0e\n\x06silent\x18\x0e \x01(\x08\x12\x19\n\x11\x66\x61tal_deprecation\x18\x0f \x03(\t\x12\x1b\n\x13silence_deprecation\x18\x10 \x03(\t\x12\x1a\n\x12\x66uture_deprecation\x18\x11 \x03(\t\x1a\xac\x01\n\x0bStringInput\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12.\n\x06syntax\x18\x03 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12P\n\x08importer\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x1a\xc5\x01\n\x08Importer\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x15\n\x0bimporter_id\x18\x02 \x01(\rH\x00\x12\x1a\n\x10\x66ile_importer_id\x18\x03 \x01(\rH\x00\x12L\n\x15node_package_importer\x18\x05 \x01(\x0b\x32+.sass.embedded_protocol.NodePackageImporterH\x00\x12\x1c\n\x14non_canonical_scheme\x18\x04 \x03(\tB\n\n\x08importerB\x07\n\x05inputJ\x04\x08\x01\x10\x02\x1ak\n\x14\x43\x61nonicalizeResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x93\x02\n\x0eImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12V\n\x07success\x18\x02 \x01(\x0b\x32\x43.sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccessH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x1a\x81\x01\n\rImportSuccess\x12\x10\n\x08\x63ontents\x18\x01 \x01(\t\x12.\n\x06syntax\x18\x02 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12\x1b\n\x0esource_map_url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_source_map_urlB\x08\n\x06result\x1an\n\x12\x46ileImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\x08\x66ile_url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x90\x01\n\x14\x46unctionCallResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x30\n\x07success\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.ValueH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1f\n\x17\x61\x63\x63\x65ssed_argument_lists\x18\x04 \x03(\rB\x08\n\x06resultB\t\n\x07message\"\xcb\x0f\n\x0fOutboundMessage\x12\x36\n\x05\x65rror\x18\x01 \x01(\x0b\x32%.sass.embedded_protocol.ProtocolErrorH\x00\x12S\n\x10\x63ompile_response\x18\x02 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.CompileResponseH\x00\x12\x45\n\tlog_event\x18\x03 \x01(\x0b\x32\x30.sass.embedded_protocol.OutboundMessage.LogEventH\x00\x12[\n\x14\x63\x61nonicalize_request\x18\x04 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.CanonicalizeRequestH\x00\x12O\n\x0eimport_request\x18\x05 \x01(\x0b\x32\x35.sass.embedded_protocol.OutboundMessage.ImportRequestH\x00\x12X\n\x13\x66ile_import_request\x18\x06 \x01(\x0b\x32\x39.sass.embedded_protocol.OutboundMessage.FileImportRequestH\x00\x12\\\n\x15\x66unction_call_request\x18\x07 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.FunctionCallRequestH\x00\x12S\n\x10version_response\x18\x08 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.VersionResponseH\x00\x1a\x8e\x01\n\x0fVersionResponse\x12\n\n\x02id\x18\x05 \x01(\r\x12\x18\n\x10protocol_version\x18\x01 \x01(\t\x12\x18\n\x10\x63ompiler_version\x18\x02 \x01(\t\x12\x1e\n\x16implementation_version\x18\x03 \x01(\t\x12\x1b\n\x13implementation_name\x18\x04 \x01(\t\x1a\xa2\x03\n\x0f\x43ompileResponse\x12Y\n\x07success\x18\x02 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccessH\x00\x12Y\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailureH\x00\x12\x13\n\x0bloaded_urls\x18\x04 \x03(\t\x1a\x37\n\x0e\x43ompileSuccess\x12\x0b\n\x03\x63ss\x18\x01 \x01(\t\x12\x12\n\nsource_map\x18\x02 \x01(\tJ\x04\x08\x03\x10\x04\x1a{\n\x0e\x43ompileFailure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x30\n\x04span\x18\x02 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpan\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12\x11\n\tformatted\x18\x04 \x01(\tB\x08\n\x06resultJ\x04\x08\x01\x10\x02\x1a\xf1\x01\n\x08LogEvent\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.sass.embedded_protocol.LogEventType\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x35\n\x04span\x18\x04 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpanH\x00\x88\x01\x01\x12\x13\n\x0bstack_trace\x18\x05 \x01(\t\x12\x11\n\tformatted\x18\x06 \x01(\t\x12\x1d\n\x10\x64\x65precation_type\x18\x07 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_spanB\x13\n\x11_deprecation_typeJ\x04\x08\x01\x10\x02\x1a\x8e\x01\n\x13\x43\x61nonicalizeRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x43\n\rImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\tJ\x04\x08\x02\x10\x03\x1a\x8c\x01\n\x11\x46ileImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x8e\x01\n\x13\x46unctionCallRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x66unction_id\x18\x04 \x01(\rH\x00\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.sass.embedded_protocol.ValueB\x0c\n\nidentifierJ\x04\x08\x02\x10\x03\x42\t\n\x07message\"e\n\rProtocolError\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).sass.embedded_protocol.ProtocolErrorType\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x87\x02\n\nSourceSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x05start\x18\x02 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocation\x12\x43\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocationH\x00\x88\x01\x01\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x05 \x01(\t\x1a>\n\x0eSourceLocation\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\rB\x06\n\x04_end\"\xf8\x11\n\x05Value\x12\x36\n\x06string\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.StringH\x00\x12\x36\n\x06number\x18\x02 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x32\n\x04list\x18\x05 \x01(\x0b\x32\".sass.embedded_protocol.Value.ListH\x00\x12\x30\n\x03map\x18\x06 \x01(\x0b\x32!.sass.embedded_protocol.Value.MapH\x00\x12;\n\tsingleton\x18\x07 \x01(\x0e\x32&.sass.embedded_protocol.SingletonValueH\x00\x12K\n\x11\x63ompiler_function\x18\x08 \x01(\x0b\x32..sass.embedded_protocol.Value.CompilerFunctionH\x00\x12\x43\n\rhost_function\x18\t \x01(\x0b\x32*.sass.embedded_protocol.Value.HostFunctionH\x00\x12\x43\n\rargument_list\x18\n \x01(\x0b\x32*.sass.embedded_protocol.Value.ArgumentListH\x00\x12@\n\x0b\x63\x61lculation\x18\x0c \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x12\x45\n\x0e\x63ompiler_mixin\x18\r \x01(\x0b\x32+.sass.embedded_protocol.Value.CompilerMixinH\x00\x12\x34\n\x05\x63olor\x18\x0e \x01(\x0b\x32#.sass.embedded_protocol.Value.ColorH\x00\x1a&\n\x06String\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0e\n\x06quoted\x18\x02 \x01(\x08\x1a\x41\n\x06Number\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x12\n\nnumerators\x18\x02 \x03(\t\x12\x14\n\x0c\x64\x65nominators\x18\x03 \x03(\t\x1a\xa0\x01\n\x05\x43olor\x12\r\n\x05space\x18\x01 \x01(\t\x12\x15\n\x08\x63hannel1\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x63hannel2\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x15\n\x08\x63hannel3\x18\x04 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05\x61lpha\x18\x05 \x01(\x01H\x03\x88\x01\x01\x42\x0b\n\t_channel1B\x0b\n\t_channel2B\x0b\n\t_channel3B\x08\n\x06_alpha\x1a\x87\x01\n\x04List\x12\x38\n\tseparator\x18\x01 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12\x14\n\x0chas_brackets\x18\x02 \x01(\x08\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\xa2\x01\n\x03Map\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\'.sass.embedded_protocol.Value.Map.Entry\x1a\x61\n\x05\x45ntry\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\x1e\n\x10\x43ompilerFunction\x12\n\n\x02id\x18\x01 \x01(\r\x1a-\n\x0cHostFunction\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\tsignature\x18\x02 \x01(\t\x1a\x1b\n\rCompilerMixin\x12\n\n\x02id\x18\x01 \x01(\r\x1a\xa1\x02\n\x0c\x41rgumentList\x12\n\n\x02id\x18\x01 \x01(\r\x12\x38\n\tseparator\x18\x02 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x12J\n\x08keywords\x18\x04 \x03(\x0b\x32\x38.sass.embedded_protocol.Value.ArgumentList.KeywordsEntry\x1aN\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value:\x02\x38\x01\x1a\xef\x04\n\x0b\x43\x61lculation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\targuments\x18\x02 \x03(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x1a\x95\x02\n\x10\x43\x61lculationValue\x12\x36\n\x06number\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x17\n\rinterpolation\x18\x03 \x01(\tH\x00\x12S\n\toperation\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.Value.Calculation.CalculationOperationH\x00\x12@\n\x0b\x63\x61lculation\x18\x05 \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x42\x07\n\x05value\x1a\xea\x01\n\x14\x43\x61lculationOperation\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.sass.embedded_protocol.CalculationOperator\x12H\n\x04left\x18\x02 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x12I\n\x05right\x18\x03 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValueB\x07\n\x05value\"4\n\x13NodePackageImporter\x12\x1d\n\x15\x65ntry_point_directory\x18\x01 \x01(\t*+\n\x0bOutputStyle\x12\x0c\n\x08\x45XPANDED\x10\x00\x12\x0e\n\nCOMPRESSED\x10\x01*)\n\x06Syntax\x12\x08\n\x04SCSS\x10\x00\x12\x0c\n\x08INDENTED\x10\x01\x12\x07\n\x03\x43SS\x10\x02*?\n\x0cLogEventType\x12\x0b\n\x07WARNING\x10\x00\x12\x17\n\x13\x44\x45PRECATION_WARNING\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02*8\n\x11ProtocolErrorType\x12\t\n\x05PARSE\x10\x00\x12\n\n\x06PARAMS\x10\x01\x12\x0c\n\x08INTERNAL\x10\x02*?\n\rListSeparator\x12\t\n\x05\x43OMMA\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\t\n\x05SLASH\x10\x02\x12\r\n\tUNDECIDED\x10\x03*/\n\x0eSingletonValue\x12\x08\n\x04TRUE\x10\x00\x12\t\n\x05\x46\x41LSE\x10\x01\x12\x08\n\x04NULL\x10\x02*A\n\x13\x43\x61lculationOperator\x12\x08\n\x04PLUS\x10\x00\x12\t\n\x05MINUS\x10\x01\x12\t\n\x05TIMES\x10\x02\x12\n\n\x06\x44IVIDE\x10\x03\x42#\n\x1f\x63om.sass_lang.embedded_protocolP\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'embedded_sass_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\037com.sass_lang.embedded_protocolP\001'
35
+ _globals['_VALUE_ARGUMENTLIST_KEYWORDSENTRY']._loaded_options = None
36
+ _globals['_VALUE_ARGUMENTLIST_KEYWORDSENTRY']._serialized_options = b'8\001'
37
+ _globals['_OUTPUTSTYLE']._serialized_start=6922
38
+ _globals['_OUTPUTSTYLE']._serialized_end=6965
39
+ _globals['_SYNTAX']._serialized_start=6967
40
+ _globals['_SYNTAX']._serialized_end=7008
41
+ _globals['_LOGEVENTTYPE']._serialized_start=7010
42
+ _globals['_LOGEVENTTYPE']._serialized_end=7073
43
+ _globals['_PROTOCOLERRORTYPE']._serialized_start=7075
44
+ _globals['_PROTOCOLERRORTYPE']._serialized_end=7131
45
+ _globals['_LISTSEPARATOR']._serialized_start=7133
46
+ _globals['_LISTSEPARATOR']._serialized_end=7196
47
+ _globals['_SINGLETONVALUE']._serialized_start=7198
48
+ _globals['_SINGLETONVALUE']._serialized_end=7245
49
+ _globals['_CALCULATIONOPERATOR']._serialized_start=7247
50
+ _globals['_CALCULATIONOPERATOR']._serialized_end=7312
51
+ _globals['_INBOUNDMESSAGE']._serialized_start=48
52
+ _globals['_INBOUNDMESSAGE']._serialized_end=2200
53
+ _globals['_INBOUNDMESSAGE_VERSIONREQUEST']._serialized_start=592
54
+ _globals['_INBOUNDMESSAGE_VERSIONREQUEST']._serialized_end=620
55
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST']._serialized_start=623
56
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST']._serialized_end=1543
57
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST_STRINGINPUT']._serialized_start=1156
58
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST_STRINGINPUT']._serialized_end=1328
59
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST_IMPORTER']._serialized_start=1331
60
+ _globals['_INBOUNDMESSAGE_COMPILEREQUEST_IMPORTER']._serialized_end=1528
61
+ _globals['_INBOUNDMESSAGE_CANONICALIZERESPONSE']._serialized_start=1545
62
+ _globals['_INBOUNDMESSAGE_CANONICALIZERESPONSE']._serialized_end=1652
63
+ _globals['_INBOUNDMESSAGE_IMPORTRESPONSE']._serialized_start=1655
64
+ _globals['_INBOUNDMESSAGE_IMPORTRESPONSE']._serialized_end=1930
65
+ _globals['_INBOUNDMESSAGE_IMPORTRESPONSE_IMPORTSUCCESS']._serialized_start=1791
66
+ _globals['_INBOUNDMESSAGE_IMPORTRESPONSE_IMPORTSUCCESS']._serialized_end=1920
67
+ _globals['_INBOUNDMESSAGE_FILEIMPORTRESPONSE']._serialized_start=1932
68
+ _globals['_INBOUNDMESSAGE_FILEIMPORTRESPONSE']._serialized_end=2042
69
+ _globals['_INBOUNDMESSAGE_FUNCTIONCALLRESPONSE']._serialized_start=2045
70
+ _globals['_INBOUNDMESSAGE_FUNCTIONCALLRESPONSE']._serialized_end=2189
71
+ _globals['_OUTBOUNDMESSAGE']._serialized_start=2203
72
+ _globals['_OUTBOUNDMESSAGE']._serialized_end=4198
73
+ _globals['_OUTBOUNDMESSAGE_VERSIONRESPONSE']._serialized_start=2878
74
+ _globals['_OUTBOUNDMESSAGE_VERSIONRESPONSE']._serialized_end=3020
75
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE']._serialized_start=3023
76
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE']._serialized_end=3441
77
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE_COMPILESUCCESS']._serialized_start=3245
78
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE_COMPILESUCCESS']._serialized_end=3300
79
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE_COMPILEFAILURE']._serialized_start=3302
80
+ _globals['_OUTBOUNDMESSAGE_COMPILERESPONSE_COMPILEFAILURE']._serialized_end=3425
81
+ _globals['_OUTBOUNDMESSAGE_LOGEVENT']._serialized_start=3444
82
+ _globals['_OUTBOUNDMESSAGE_LOGEVENT']._serialized_end=3685
83
+ _globals['_OUTBOUNDMESSAGE_CANONICALIZEREQUEST']._serialized_start=3688
84
+ _globals['_OUTBOUNDMESSAGE_CANONICALIZEREQUEST']._serialized_end=3830
85
+ _globals['_OUTBOUNDMESSAGE_IMPORTREQUEST']._serialized_start=3832
86
+ _globals['_OUTBOUNDMESSAGE_IMPORTREQUEST']._serialized_end=3899
87
+ _globals['_OUTBOUNDMESSAGE_FILEIMPORTREQUEST']._serialized_start=3902
88
+ _globals['_OUTBOUNDMESSAGE_FILEIMPORTREQUEST']._serialized_end=4042
89
+ _globals['_OUTBOUNDMESSAGE_FUNCTIONCALLREQUEST']._serialized_start=4045
90
+ _globals['_OUTBOUNDMESSAGE_FUNCTIONCALLREQUEST']._serialized_end=4187
91
+ _globals['_PROTOCOLERROR']._serialized_start=4200
92
+ _globals['_PROTOCOLERROR']._serialized_end=4301
93
+ _globals['_SOURCESPAN']._serialized_start=4304
94
+ _globals['_SOURCESPAN']._serialized_end=4567
95
+ _globals['_SOURCESPAN_SOURCELOCATION']._serialized_start=4497
96
+ _globals['_SOURCESPAN_SOURCELOCATION']._serialized_end=4559
97
+ _globals['_VALUE']._serialized_start=4570
98
+ _globals['_VALUE']._serialized_end=6866
99
+ _globals['_VALUE_STRING']._serialized_start=5260
100
+ _globals['_VALUE_STRING']._serialized_end=5298
101
+ _globals['_VALUE_NUMBER']._serialized_start=5300
102
+ _globals['_VALUE_NUMBER']._serialized_end=5365
103
+ _globals['_VALUE_COLOR']._serialized_start=5368
104
+ _globals['_VALUE_COLOR']._serialized_end=5528
105
+ _globals['_VALUE_LIST']._serialized_start=5531
106
+ _globals['_VALUE_LIST']._serialized_end=5666
107
+ _globals['_VALUE_MAP']._serialized_start=5669
108
+ _globals['_VALUE_MAP']._serialized_end=5831
109
+ _globals['_VALUE_MAP_ENTRY']._serialized_start=5734
110
+ _globals['_VALUE_MAP_ENTRY']._serialized_end=5831
111
+ _globals['_VALUE_COMPILERFUNCTION']._serialized_start=5833
112
+ _globals['_VALUE_COMPILERFUNCTION']._serialized_end=5863
113
+ _globals['_VALUE_HOSTFUNCTION']._serialized_start=5865
114
+ _globals['_VALUE_HOSTFUNCTION']._serialized_end=5910
115
+ _globals['_VALUE_COMPILERMIXIN']._serialized_start=5912
116
+ _globals['_VALUE_COMPILERMIXIN']._serialized_end=5939
117
+ _globals['_VALUE_ARGUMENTLIST']._serialized_start=5942
118
+ _globals['_VALUE_ARGUMENTLIST']._serialized_end=6231
119
+ _globals['_VALUE_ARGUMENTLIST_KEYWORDSENTRY']._serialized_start=6153
120
+ _globals['_VALUE_ARGUMENTLIST_KEYWORDSENTRY']._serialized_end=6231
121
+ _globals['_VALUE_CALCULATION']._serialized_start=6234
122
+ _globals['_VALUE_CALCULATION']._serialized_end=6857
123
+ _globals['_VALUE_CALCULATION_CALCULATIONVALUE']._serialized_start=6343
124
+ _globals['_VALUE_CALCULATION_CALCULATIONVALUE']._serialized_end=6620
125
+ _globals['_VALUE_CALCULATION_CALCULATIONOPERATION']._serialized_start=6623
126
+ _globals['_VALUE_CALCULATION_CALCULATIONOPERATION']._serialized_end=6857
127
+ _globals['_NODEPACKAGEIMPORTER']._serialized_start=6868
128
+ _globals['_NODEPACKAGEIMPORTER']._serialized_end=6920
129
+ # @@protoc_insertion_point(module_scope)