sass-embedded 1.0.0-beta.5 → 1.49.7

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.
Files changed (153) hide show
  1. package/CHANGELOG.md +2379 -22
  2. package/README.md +95 -9
  3. package/dist/.gitignore +1 -1
  4. package/dist/lib/index.js +34 -12
  5. package/dist/lib/index.js.map +1 -1
  6. package/dist/lib/src/{embedded-compiler/compiler.js → async-compiler.js} +9 -17
  7. package/dist/lib/src/async-compiler.js.map +1 -0
  8. package/dist/lib/src/compile.js +186 -96
  9. package/dist/lib/src/compile.js.map +1 -1
  10. package/dist/lib/src/compiler-path.js +18 -0
  11. package/dist/lib/src/compiler-path.js.map +1 -0
  12. package/dist/lib/src/{embedded-protocol/utils.js → deprotofy-span.js} +16 -18
  13. package/dist/lib/src/deprotofy-span.js.map +1 -0
  14. package/dist/lib/src/{embedded-protocol/dispatcher.js → dispatcher.js} +45 -40
  15. package/dist/lib/src/dispatcher.js.map +1 -0
  16. package/dist/lib/src/exception.js +20 -0
  17. package/dist/lib/src/exception.js.map +1 -0
  18. package/dist/lib/src/function-registry.js +92 -0
  19. package/dist/lib/src/function-registry.js.map +1 -0
  20. package/dist/lib/src/importer-registry.js +127 -0
  21. package/dist/lib/src/importer-registry.js.map +1 -0
  22. package/dist/lib/src/legacy/importer.js +186 -0
  23. package/dist/lib/src/legacy/importer.js.map +1 -0
  24. package/dist/lib/src/legacy/index.js +262 -0
  25. package/dist/lib/src/legacy/index.js.map +1 -0
  26. package/dist/lib/src/legacy/resolve-path.js +101 -0
  27. package/dist/lib/src/legacy/resolve-path.js.map +1 -0
  28. package/dist/lib/src/legacy/value/base.js +17 -0
  29. package/dist/lib/src/legacy/value/base.js.map +1 -0
  30. package/dist/lib/src/legacy/value/color.js +64 -0
  31. package/dist/lib/src/legacy/value/color.js.map +1 -0
  32. package/dist/lib/src/legacy/value/index.js +23 -0
  33. package/dist/lib/src/legacy/value/index.js.map +1 -0
  34. package/dist/lib/src/legacy/value/list.js +50 -0
  35. package/dist/lib/src/legacy/value/list.js.map +1 -0
  36. package/dist/lib/src/legacy/value/map.js +74 -0
  37. package/dist/lib/src/legacy/value/map.js.map +1 -0
  38. package/dist/lib/src/legacy/value/number.js +60 -0
  39. package/dist/lib/src/legacy/value/number.js.map +1 -0
  40. package/dist/lib/src/legacy/value/string.js +27 -0
  41. package/dist/lib/src/legacy/value/string.js.map +1 -0
  42. package/dist/lib/src/legacy/value/wrap.js +83 -0
  43. package/dist/lib/src/legacy/value/wrap.js.map +1 -0
  44. package/dist/lib/src/{embedded-protocol/message-transformer.js → message-transformer.js} +2 -2
  45. package/dist/lib/src/message-transformer.js.map +1 -0
  46. package/dist/lib/src/{embedded-compiler/packet-transformer.js → packet-transformer.js} +0 -0
  47. package/dist/lib/src/packet-transformer.js.map +1 -0
  48. package/dist/lib/src/protofier.js +272 -0
  49. package/dist/lib/src/protofier.js.map +1 -0
  50. package/dist/lib/src/{embedded-protocol/request-tracker.js → request-tracker.js} +0 -0
  51. package/dist/lib/src/request-tracker.js.map +1 -0
  52. package/dist/lib/src/sync-compiler.js +52 -0
  53. package/dist/lib/src/sync-compiler.js.map +1 -0
  54. package/dist/lib/src/{exception/span.js → sync-process/event.js} +2 -2
  55. package/dist/lib/src/sync-process/event.js.map +1 -0
  56. package/dist/lib/src/sync-process/index.js +122 -0
  57. package/dist/lib/src/sync-process/index.js.map +1 -0
  58. package/dist/lib/src/sync-process/sync-message-port.js +128 -0
  59. package/dist/lib/src/sync-process/sync-message-port.js.map +1 -0
  60. package/dist/lib/src/sync-process/worker.js +51 -0
  61. package/dist/lib/src/sync-process/worker.js.map +1 -0
  62. package/dist/lib/src/utils.js +79 -1
  63. package/dist/lib/src/utils.js.map +1 -1
  64. package/dist/lib/src/value/argument-list.js +31 -0
  65. package/dist/lib/src/value/argument-list.js.map +1 -0
  66. package/dist/lib/src/value/boolean.js +20 -4
  67. package/dist/lib/src/value/boolean.js.map +1 -1
  68. package/dist/lib/src/value/color.js +89 -98
  69. package/dist/lib/src/value/color.js.map +1 -1
  70. package/dist/lib/src/value/function.js +34 -0
  71. package/dist/lib/src/value/function.js.map +1 -0
  72. package/dist/lib/src/value/{value.js → index.js} +5 -1
  73. package/dist/lib/src/value/index.js.map +1 -0
  74. package/dist/lib/src/value/list.js +15 -18
  75. package/dist/lib/src/value/list.js.map +1 -1
  76. package/dist/lib/src/value/map.js +17 -10
  77. package/dist/lib/src/value/map.js.map +1 -1
  78. package/dist/lib/src/value/null.js +15 -3
  79. package/dist/lib/src/value/null.js.map +1 -1
  80. package/dist/lib/src/value/number.js +20 -26
  81. package/dist/lib/src/value/number.js.map +1 -1
  82. package/dist/lib/src/value/string.js +14 -9
  83. package/dist/lib/src/value/string.js.map +1 -1
  84. package/dist/lib/src/value/utils.js +7 -1
  85. package/dist/lib/src/value/utils.js.map +1 -1
  86. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js +1438 -121
  87. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js.map +1 -1
  88. package/dist/package.json +6 -4
  89. package/dist/tool/utils.js +47 -16
  90. package/dist/tool/utils.js.map +1 -1
  91. package/dist/types/compile.d.ts +152 -0
  92. package/dist/types/exception.d.ts +41 -0
  93. package/dist/types/importer.d.ts +294 -0
  94. package/dist/types/index.d.ts +80 -0
  95. package/dist/types/legacy/exception.d.ts +54 -0
  96. package/dist/types/legacy/function.d.ts +756 -0
  97. package/dist/types/legacy/importer.d.ts +168 -0
  98. package/dist/types/legacy/options.d.ts +642 -0
  99. package/dist/types/legacy/plugin_this.d.ts +73 -0
  100. package/dist/types/legacy/render.d.ts +139 -0
  101. package/dist/types/logger/index.d.ts +94 -0
  102. package/dist/types/logger/source_location.d.ts +21 -0
  103. package/dist/types/logger/source_span.d.ts +34 -0
  104. package/dist/types/options.d.ts +418 -0
  105. package/dist/types/util/promise_or.d.ts +17 -0
  106. package/dist/types/value/argument_list.d.ts +47 -0
  107. package/dist/types/value/boolean.d.ts +29 -0
  108. package/dist/types/value/color.d.ts +107 -0
  109. package/dist/types/value/function.d.ts +22 -0
  110. package/dist/types/value/index.d.ts +173 -0
  111. package/dist/types/value/list.d.ts +54 -0
  112. package/dist/types/value/map.d.ts +41 -0
  113. package/dist/types/value/number.d.ts +305 -0
  114. package/dist/types/value/string.d.ts +84 -0
  115. package/package.json +6 -4
  116. package/dist/lib/index.d.ts +0 -10
  117. package/dist/lib/src/compile.d.ts +0 -22
  118. package/dist/lib/src/embedded-compiler/compiler.d.ts +0 -19
  119. package/dist/lib/src/embedded-compiler/compiler.js.map +0 -1
  120. package/dist/lib/src/embedded-compiler/packet-transformer.d.ts +0 -34
  121. package/dist/lib/src/embedded-compiler/packet-transformer.js.map +0 -1
  122. package/dist/lib/src/embedded-protocol/dispatcher.d.ts +0 -60
  123. package/dist/lib/src/embedded-protocol/dispatcher.js.map +0 -1
  124. package/dist/lib/src/embedded-protocol/message-transformer.d.ts +0 -47
  125. package/dist/lib/src/embedded-protocol/message-transformer.js.map +0 -1
  126. package/dist/lib/src/embedded-protocol/request-tracker.d.ts +0 -20
  127. package/dist/lib/src/embedded-protocol/request-tracker.js.map +0 -1
  128. package/dist/lib/src/embedded-protocol/utils.d.ts +0 -7
  129. package/dist/lib/src/embedded-protocol/utils.js.map +0 -1
  130. package/dist/lib/src/exception/exception.d.ts +0 -19
  131. package/dist/lib/src/exception/exception.js +0 -37
  132. package/dist/lib/src/exception/exception.js.map +0 -1
  133. package/dist/lib/src/exception/location.d.ts +0 -11
  134. package/dist/lib/src/exception/location.js +0 -6
  135. package/dist/lib/src/exception/location.js.map +0 -1
  136. package/dist/lib/src/exception/span.d.ts +0 -29
  137. package/dist/lib/src/exception/span.js.map +0 -1
  138. package/dist/lib/src/node-sass/render.d.ts +0 -61
  139. package/dist/lib/src/node-sass/render.js +0 -127
  140. package/dist/lib/src/node-sass/render.js.map +0 -1
  141. package/dist/lib/src/utils.d.ts +0 -16
  142. package/dist/lib/src/value/boolean.d.ts +0 -25
  143. package/dist/lib/src/value/color.d.ts +0 -89
  144. package/dist/lib/src/value/list.d.ts +0 -41
  145. package/dist/lib/src/value/map.d.ts +0 -26
  146. package/dist/lib/src/value/null.d.ts +0 -12
  147. package/dist/lib/src/value/number.d.ts +0 -189
  148. package/dist/lib/src/value/string.d.ts +0 -56
  149. package/dist/lib/src/value/utils.d.ts +0 -44
  150. package/dist/lib/src/value/value.d.ts +0 -108
  151. package/dist/lib/src/value/value.js.map +0 -1
  152. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.d.ts +0 -1
  153. package/dist/tool/utils.d.ts +0 -32
package/README.md CHANGED
@@ -1,13 +1,99 @@
1
1
  ## Embedded Sass Host
2
2
 
3
- This is a Node.js library that implements the host side of the [Embedded Sass
4
- protocol][]. It exposes a JS API for Sass that's backed by a native [Dart
5
- Sass][] executable. It's much faster than running [Dart Sass compiled to
6
- JavaScript][] while still providing a full JS API, with the ability to define
7
- custom functions and importers.
8
-
9
- [embedded sass protocol]: https://github.com/sass/sass-embedded-protocol/blob/main/README.md#readme
10
- [dart sass]: https://sass-lang.com/dart-sass
11
- [dart sass compiled to javascript]: https://www.npmjs.com/package/sass
3
+ This package is an alternative to the [`sass`] package. It supports the same JS
4
+ API as `sass` and is maintained by the same team, but where the `sass` package
5
+ is pure JavaScript, `sass-embedded` is instead a JavaScript wrapper around a
6
+ native Dart executable. This means `sass-embedded` will generally be much faster
7
+ especially for large Sass compilations, but it can only be installed on the
8
+ platforms that Dart supports: Windows, Mac OS, and Linux.
9
+
10
+ [`sass`]: https://www.npmjs.com/package/sass
11
+
12
+ Despite being different packages, both `sass` and `sass-embedded` are considered
13
+ "Dart Sass" since they have the same underlying implementation. Since the first
14
+ stable release of the `sass-embedded` package, both packages are released at the
15
+ same time and share the same version number.
16
+
17
+ ## Usage
18
+
19
+ This package provides the same JavaScript API as the `sass` package, and can be
20
+ used as a drop-in replacement:
21
+
22
+ ```js
23
+ const sass = require('sass-embedded');
24
+
25
+ const result = sass.compile(scssFilename);
26
+
27
+ // OR
28
+
29
+ const result = await sass.compileAsync(scssFilename);
30
+ ```
31
+
32
+ Unlike the `sass` package, the asynchronous API in `sass-embedded` will
33
+ generally be faster than the synchronous API since the Sass compilation logic is
34
+ happening in a different process.
35
+
36
+ See [the Sass website] for full API documentation.
37
+
38
+ [the Sass website]: https://sass-lang.com/documentation/js-api
39
+
40
+ ### Legacy API
41
+
42
+ The `sass-embedded` package also supports the older JavaScript API that's fully
43
+ compatible with [Node Sass] (with a few exceptions listed below), with support
44
+ for both the [`render()`] and [`renderSync()`] functions. This API is considered
45
+ deprecated and will be removed in Dart Sass 2.0.0, so it should be avoided in
46
+ new projects.
47
+
48
+ [Node Sass]: https://github.com/sass/node-sass
49
+ [`render()`]: https://sass-lang.com/documentation/js-api/modules#render
50
+ [`renderSync()`]: https://sass-lang.com/documentation/js-api/modules#renderSync
51
+
52
+ Sass's support for the legacy JavaScript API has the following limitations:
53
+
54
+ * Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are
55
+ supported.
56
+
57
+ * The `sass-embedded` package doesn't support the [`precision`] option. Dart
58
+ Sass defaults to a sufficiently high precision for all existing browsers, and
59
+ making this customizable would make the code substantially less efficient.
60
+
61
+ * The `sass-embedded` package doesn't support the [`sourceComments`] option.
62
+ Source maps are the recommended way of locating the origin of generated
63
+ selectors.
64
+
65
+ * The `sass-embedded` package doesn't support the [`indentWidth`],
66
+ [`indentType`], or [`linefeed`] options. It implements the legacy API as a
67
+ wrapper around the new API, and the new API has dropped support for these
68
+ options.
69
+
70
+ [`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle
71
+ [`precision`]: https://github.com/sass/node-sass#precision
72
+ [`indentWidth`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#indentWidth
73
+ [`indentType`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#indentType
74
+ [`linefeed`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#linefeed
75
+
76
+ ## How Does It Work?
77
+
78
+ The `sass-embedded` runs the Dart Sass [embedded compiler] as a separate
79
+ executable and uses the [Embedded Sass Protocol] to communicate with it over its
80
+ stdin and stdout streams. This protocol is designed to make it possible not only
81
+ to start a Sass compilation, but to control aspects of it that are exposed by an
82
+ API. This includes defining custom importers, functions, and loggers, all of
83
+ which are invoked by messages from the embedded compiler back to the host.
84
+
85
+ [embedded compiler]: https://github.com/sass/dart-sass-embedded
86
+ [Embedded Sass Protocol]: https://github.com/sass/embedded-protocol#readme
87
+
88
+ Although this sort of two-way communication with an embedded process is
89
+ inherently asynchronous in Node.js, this package supports the synchronous
90
+ `compile()` API using a custom [synchronous message-passing library] that's
91
+ implemented with the [`Atomics.wait()`] primitive. We hope to release this
92
+ library as a stand-alone package at some point in the future.
93
+
94
+ [synchronous message-passing library]: https://github.com/sass/embedded-host-node/blob/main/lib/src/sync-process/sync-message-port.ts
95
+ [`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait
96
+
97
+ ---
12
98
 
13
99
  Disclaimer: this is not an official Google product.
package/dist/.gitignore CHANGED
@@ -5,7 +5,7 @@ lib/src/vendor
5
5
  node_modules
6
6
  npm-debug.log*
7
7
  package-lock.json
8
- spec/sandbox
8
+ test/sandbox
9
9
 
10
10
  # Editors
11
11
  .idea
package/dist/lib/index.js CHANGED
@@ -3,26 +3,48 @@
3
3
  // MIT-style license that can be found in the LICENSE file or at
4
4
  // https://opensource.org/licenses/MIT.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.info = exports.render = exports.SassString = exports.SassNumber = exports.sassNull = exports.SassMap = exports.SassList = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.Value = void 0;
6
+ exports.NULL = exports.FALSE = exports.TRUE = exports.Logger = exports.info = exports.renderSync = exports.render = exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = exports.Exception = exports.types = exports.sassNull = exports.Value = exports.SassString = exports.SassNumber = exports.SassMap = exports.SassFunction = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.SassArgumentList = exports.SassList = void 0;
7
7
  const pkg = require("../package.json");
8
- var value_1 = require("./src/value/value");
9
- Object.defineProperty(exports, "Value", { enumerable: true, get: function () { return value_1.Value; } });
10
- var boolean_1 = require("./src/value/boolean");
11
- Object.defineProperty(exports, "sassFalse", { enumerable: true, get: function () { return boolean_1.sassFalse; } });
12
- Object.defineProperty(exports, "sassTrue", { enumerable: true, get: function () { return boolean_1.sassTrue; } });
13
- var color_1 = require("./src/value/color");
14
- Object.defineProperty(exports, "SassColor", { enumerable: true, get: function () { return color_1.SassColor; } });
8
+ const boolean_1 = require("./src/value/boolean");
9
+ const null_1 = require("./src/value/null");
15
10
  var list_1 = require("./src/value/list");
16
11
  Object.defineProperty(exports, "SassList", { enumerable: true, get: function () { return list_1.SassList; } });
12
+ var argument_list_1 = require("./src/value/argument-list");
13
+ Object.defineProperty(exports, "SassArgumentList", { enumerable: true, get: function () { return argument_list_1.SassArgumentList; } });
14
+ var boolean_2 = require("./src/value/boolean");
15
+ Object.defineProperty(exports, "sassFalse", { enumerable: true, get: function () { return boolean_2.sassFalse; } });
16
+ Object.defineProperty(exports, "sassTrue", { enumerable: true, get: function () { return boolean_2.sassTrue; } });
17
+ var color_1 = require("./src/value/color");
18
+ Object.defineProperty(exports, "SassColor", { enumerable: true, get: function () { return color_1.SassColor; } });
19
+ var function_1 = require("./src/value/function");
20
+ Object.defineProperty(exports, "SassFunction", { enumerable: true, get: function () { return function_1.SassFunction; } });
17
21
  var map_1 = require("./src/value/map");
18
22
  Object.defineProperty(exports, "SassMap", { enumerable: true, get: function () { return map_1.SassMap; } });
19
- var null_1 = require("./src/value/null");
20
- Object.defineProperty(exports, "sassNull", { enumerable: true, get: function () { return null_1.sassNull; } });
21
23
  var number_1 = require("./src/value/number");
22
24
  Object.defineProperty(exports, "SassNumber", { enumerable: true, get: function () { return number_1.SassNumber; } });
23
25
  var string_1 = require("./src/value/string");
24
26
  Object.defineProperty(exports, "SassString", { enumerable: true, get: function () { return string_1.SassString; } });
25
- var render_1 = require("./src/node-sass/render");
26
- Object.defineProperty(exports, "render", { enumerable: true, get: function () { return render_1.render; } });
27
+ var value_1 = require("./src/value");
28
+ Object.defineProperty(exports, "Value", { enumerable: true, get: function () { return value_1.Value; } });
29
+ var null_2 = require("./src/value/null");
30
+ Object.defineProperty(exports, "sassNull", { enumerable: true, get: function () { return null_2.sassNull; } });
31
+ exports.types = require("./src/legacy/value");
32
+ var exception_1 = require("./src/exception");
33
+ Object.defineProperty(exports, "Exception", { enumerable: true, get: function () { return exception_1.Exception; } });
34
+ var compile_1 = require("./src/compile");
35
+ Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return compile_1.compile; } });
36
+ Object.defineProperty(exports, "compileString", { enumerable: true, get: function () { return compile_1.compileString; } });
37
+ Object.defineProperty(exports, "compileAsync", { enumerable: true, get: function () { return compile_1.compileAsync; } });
38
+ Object.defineProperty(exports, "compileStringAsync", { enumerable: true, get: function () { return compile_1.compileStringAsync; } });
39
+ var legacy_1 = require("./src/legacy");
40
+ Object.defineProperty(exports, "render", { enumerable: true, get: function () { return legacy_1.render; } });
41
+ Object.defineProperty(exports, "renderSync", { enumerable: true, get: function () { return legacy_1.renderSync; } });
27
42
  exports.info = `sass-embedded\t${pkg.version}`;
43
+ exports.Logger = {
44
+ silent: { warn() { }, debug() { } },
45
+ };
46
+ // Legacy JS API
47
+ exports.TRUE = boolean_1.sassTrue;
48
+ exports.FALSE = boolean_1.sassFalse;
49
+ exports.NULL = null_1.sassNull;
28
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,uCAAuC;AAEvC,2CAAwC;AAAhC,8FAAA,KAAK,OAAA;AACb,+CAAqE;AAAhD,oGAAA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Eb,QAAA,IAAI,GAAG,kBAAkB,GAAG,CAAC,OAAO,EAAE,CAAC;AAEvC,QAAA,MAAM,GAAG;IACpB,MAAM,EAAE,EAAC,IAAI,KAAI,CAAC,EAAE,KAAK,KAAI,CAAC,EAAC;CAChC,CAAC;AAEF,gBAAgB;AAEH,QAAA,IAAI,GAAG,kBAAQ,CAAC;AAChB,QAAA,KAAK,GAAG,mBAAS,CAAC;AAClB,QAAA,IAAI,GAAG,eAAQ,CAAC"}
@@ -3,27 +3,19 @@
3
3
  // MIT-style license that can be found in the LICENSE file or at
4
4
  // https://opensource.org/licenses/MIT.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EmbeddedCompiler = void 0;
7
- const fs = require("fs");
6
+ exports.AsyncEmbeddedCompiler = void 0;
8
7
  const child_process_1 = require("child_process");
9
- const path_1 = require("path");
10
8
  const rxjs_1 = require("rxjs");
11
9
  const operators_1 = require("rxjs/operators");
10
+ const compiler_path_1 = require("./compiler-path");
12
11
  /**
13
- * Invokes the Embedded Sass Compiler as a Node child process, exposing its
14
- * stdio as Observables.
12
+ * An asynchronous wrapper for the embedded Sass compiler that exposes its stdio
13
+ * streams as Observables.
15
14
  */
16
- class EmbeddedCompiler {
15
+ class AsyncEmbeddedCompiler {
17
16
  constructor() {
18
- this.process = (() => {
19
- for (const path of ['../vendor', '../../../../lib/src/vendor']) {
20
- const executable = (0, path_1.resolve)(__dirname, path, `dart-sass-embedded/dart-sass-embedded${process.platform === 'win32' ? '.bat' : ''}`);
21
- if (fs.existsSync(executable)) {
22
- return (0, child_process_1.spawn)(executable, { windowsHide: true });
23
- }
24
- }
25
- throw new Error("Embedded Dart Sass couldn't find the embedded compiler executable.");
26
- })();
17
+ /** The underlying process that's being wrapped. */
18
+ this.process = (0, child_process_1.spawn)(compiler_path_1.compilerPath, { windowsHide: true });
27
19
  /** The child process's exit event. */
28
20
  this.exit$ = new Promise(resolve => {
29
21
  this.process.on('exit', code => resolve(code));
@@ -46,5 +38,5 @@ class EmbeddedCompiler {
46
38
  this.process.stdin.end();
47
39
  }
48
40
  }
49
- exports.EmbeddedCompiler = EmbeddedCompiler;
50
- //# sourceMappingURL=compiler.js.map
41
+ exports.AsyncEmbeddedCompiler = AsyncEmbeddedCompiler;
42
+ //# sourceMappingURL=async-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-compiler.js","sourceRoot":"","sources":["../../../lib/src/async-compiler.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,iDAAoC;AACpC,+BAAgC;AAChC,8CAAyC;AAEzC,mDAA6C;AAE7C;;;GAGG;AACH,MAAa,qBAAqB;IAAlC;QACE,mDAAmD;QAClC,YAAO,GAAG,IAAA,qBAAK,EAAC,4BAAY,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC,CAAC;QAEpE,sCAAsC;QAC7B,UAAK,GAAG,IAAI,OAAO,CAAgB,OAAO,CAAC,EAAE;YACpD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,yDAAyD;QAChD,YAAO,GAAG,IAAI,iBAAU,CAAS,QAAQ,CAAC,EAAE;YACnD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/B,yDAAyD;QAChD,YAAO,GAAG,IAAI,iBAAU,CAAS,QAAQ,CAAC,EAAE;YACnD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAWjC,CAAC;IATC,oDAAoD;IACpD,UAAU,CAAC,MAAc;QACvB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,uEAAuE;IACvE,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF;AA5BD,sDA4BC"}
@@ -3,127 +3,217 @@
3
3
  // MIT-style license that can be found in the LICENSE file or at
4
4
  // https://opensource.org/licenses/MIT.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.compileString = exports.compile = void 0;
7
- const url_1 = require("url");
8
- const compiler_1 = require("./embedded-compiler/compiler");
9
- const packet_transformer_1 = require("./embedded-compiler/packet-transformer");
10
- const message_transformer_1 = require("./embedded-protocol/message-transformer");
11
- const dispatcher_1 = require("./embedded-protocol/dispatcher");
12
- const utils_1 = require("./embedded-protocol/utils");
6
+ exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = void 0;
7
+ const supportsColor = require("supports-color");
13
8
  const proto = require("./vendor/embedded-protocol/embedded_sass_pb");
14
- /**
15
- * Compiles a path and returns the resulting css. Throws a SassException if the
16
- * compilation failed.
17
- */
18
- async function compile(options) {
19
- // TODO(awjin): Create logger, importer, function registries.
20
- const request = newCompileRequest({
21
- path: options.path,
22
- sourceMap: !!options.sourceMap,
23
- });
24
- const response = await compileRequest(request);
25
- if (options.sourceMap) {
26
- options.sourceMap(response.sourceMap);
27
- }
28
- return response.css;
9
+ const utils = require("./utils");
10
+ const async_compiler_1 = require("./async-compiler");
11
+ const dispatcher_1 = require("./dispatcher");
12
+ const exception_1 = require("./exception");
13
+ const function_registry_1 = require("./function-registry");
14
+ const importer_registry_1 = require("./importer-registry");
15
+ const message_transformer_1 = require("./message-transformer");
16
+ const packet_transformer_1 = require("./packet-transformer");
17
+ const sync_compiler_1 = require("./sync-compiler");
18
+ const deprotofy_span_1 = require("./deprotofy-span");
19
+ function compile(path, options) {
20
+ const importers = new importer_registry_1.ImporterRegistry(options);
21
+ return compileRequestSync(newCompilePathRequest(path, importers, options), importers, options);
29
22
  }
30
23
  exports.compile = compile;
31
- /**
32
- * Compiles a string and returns the resulting css. Throws a SassException if
33
- * the compilation failed.
34
- */
35
- async function compileString(options) {
36
- // TODO(awjin): Create logger, importer, function registries.
37
- var _a;
38
- const request = newCompileStringRequest({
39
- source: options.source,
40
- sourceMap: !!options.sourceMap,
41
- url: options.url instanceof url_1.URL ? options.url.toString() : options.url,
42
- syntax: (_a = options.syntax) !== null && _a !== void 0 ? _a : 'scss',
43
- });
44
- const response = await compileRequest(request);
45
- if (options.sourceMap) {
46
- options.sourceMap(response.sourceMap);
47
- }
48
- return response.css;
24
+ function compileString(source, options) {
25
+ const importers = new importer_registry_1.ImporterRegistry(options);
26
+ return compileRequestSync(newCompileStringRequest(source, importers, options), importers, options);
49
27
  }
50
28
  exports.compileString = compileString;
29
+ function compileAsync(path, options) {
30
+ const importers = new importer_registry_1.ImporterRegistry(options);
31
+ return compileRequestAsync(newCompilePathRequest(path, importers, options), importers, options);
32
+ }
33
+ exports.compileAsync = compileAsync;
34
+ function compileStringAsync(source, options) {
35
+ const importers = new importer_registry_1.ImporterRegistry(options);
36
+ return compileRequestAsync(newCompileStringRequest(source, importers, options), importers, options);
37
+ }
38
+ exports.compileStringAsync = compileStringAsync;
51
39
  // Creates a request for compiling a file.
52
- function newCompileRequest(options) {
53
- // TODO(awjin): Populate request with importer/function IDs.
54
- const request = new proto.InboundMessage.CompileRequest();
55
- request.setPath(options.path);
56
- request.setSourceMap(options.sourceMap);
40
+ function newCompilePathRequest(path, importers, options) {
41
+ const request = newCompileRequest(importers, options);
42
+ request.setPath(path);
57
43
  return request;
58
44
  }
59
45
  // Creates a request for compiling a string.
60
- function newCompileStringRequest(options) {
61
- // TODO(awjin): Populate request with importer/function IDs.
46
+ function newCompileStringRequest(source, importers, options) {
47
+ var _a;
62
48
  const input = new proto.InboundMessage.CompileRequest.StringInput();
63
- input.setSource(options.source);
64
- if (options.syntax === 'scss') {
65
- input.setSyntax(proto.Syntax['SCSS']);
66
- }
67
- else if (options.syntax === 'indented') {
68
- input.setSyntax(proto.Syntax['INDENTED']);
69
- }
70
- else if (options.syntax === 'css') {
71
- input.setSyntax(proto.Syntax['CSS']);
72
- }
73
- if (options.url)
49
+ input.setSource(source);
50
+ input.setSyntax(utils.protofySyntax((_a = options === null || options === void 0 ? void 0 : options.syntax) !== null && _a !== void 0 ? _a : 'scss'));
51
+ if (options === null || options === void 0 ? void 0 : options.url)
74
52
  input.setUrl(options.url.toString());
75
- const request = new proto.InboundMessage.CompileRequest();
53
+ if (options && 'importer' in options && options.importer) {
54
+ input.setImporter(importers.register(options.importer));
55
+ }
56
+ const request = newCompileRequest(importers, options);
76
57
  request.setString(input);
77
- request.setSourceMap(options.sourceMap);
58
+ return request;
59
+ }
60
+ // Creates a compilation request for the given `options` without adding any
61
+ // input-specific options.
62
+ function newCompileRequest(importers, options) {
63
+ var _a, _b, _c;
64
+ const request = new proto.InboundMessage.CompileRequest();
65
+ request.setImportersList(importers.importers);
66
+ request.setGlobalFunctionsList(Object.keys((_a = options === null || options === void 0 ? void 0 : options.functions) !== null && _a !== void 0 ? _a : {}));
67
+ request.setSourceMap(!!(options === null || options === void 0 ? void 0 : options.sourceMap));
68
+ request.setSourceMapIncludeSources(!!(options === null || options === void 0 ? void 0 : options.sourceMapIncludeSources));
69
+ request.setAlertColor((_b = options === null || options === void 0 ? void 0 : options.alertColor) !== null && _b !== void 0 ? _b : !!supportsColor.stdout);
70
+ request.setAlertAscii(!!(options === null || options === void 0 ? void 0 : options.alertAscii));
71
+ request.setQuietDeps(!!(options === null || options === void 0 ? void 0 : options.quietDeps));
72
+ request.setVerbose(!!(options === null || options === void 0 ? void 0 : options.verbose));
73
+ switch ((_c = options === null || options === void 0 ? void 0 : options.style) !== null && _c !== void 0 ? _c : 'expanded') {
74
+ case 'expanded':
75
+ request.setStyle(proto.OutputStyle.EXPANDED);
76
+ break;
77
+ case 'compressed':
78
+ request.setStyle(proto.OutputStyle.COMPRESSED);
79
+ break;
80
+ default:
81
+ throw new Error(`Unknown options.style: "${options === null || options === void 0 ? void 0 : options.style}"`);
82
+ }
78
83
  return request;
79
84
  }
80
85
  // Spins up a compiler, then sends it a compile request. Returns a promise that
81
86
  // resolves with the CompileResult. Throws if there were any protocol or
82
87
  // compilation errors. Shuts down the compiler after compilation.
83
- async function compileRequest(request) {
84
- const embeddedCompiler = new compiler_1.EmbeddedCompiler();
88
+ async function compileRequestAsync(request, importers, options) {
89
+ const functions = new function_registry_1.FunctionRegistry(options === null || options === void 0 ? void 0 : options.functions);
90
+ const embeddedCompiler = new async_compiler_1.AsyncEmbeddedCompiler();
85
91
  try {
86
- const packetTransformer = new packet_transformer_1.PacketTransformer(embeddedCompiler.stdout$, buffer => embeddedCompiler.writeStdin(buffer));
87
- const messageTransformer = new message_transformer_1.MessageTransformer(packetTransformer.outboundProtobufs$, packet => packetTransformer.writeInboundProtobuf(packet));
88
- // TODO(awjin): Pass import and function registries' handler functions to
89
- // dispatcher.
90
- const dispatcher = new dispatcher_1.Dispatcher(messageTransformer.outboundMessages$, message => messageTransformer.writeInboundMessage(message), {
91
- handleImportRequest: () => {
92
- throw Error('Custom importers not yet implemented.');
93
- },
94
- handleFileImportRequest: () => {
95
- throw Error('Custom file importers not yet implemented.');
96
- },
97
- handleCanonicalizeRequest: () => {
98
- throw Error('Canonicalize not yet implemented.');
99
- },
100
- handleFunctionCallRequest: () => {
101
- throw Error('Custom functions not yet implemented.');
102
- },
92
+ const dispatcher = createDispatcher(embeddedCompiler.stdout$, buffer => {
93
+ embeddedCompiler.writeStdin(buffer);
94
+ }, {
95
+ handleImportRequest: request => importers.import(request),
96
+ handleFileImportRequest: request => importers.fileImport(request),
97
+ handleCanonicalizeRequest: request => importers.canonicalize(request),
98
+ handleFunctionCallRequest: request => functions.call(request),
103
99
  });
104
- // TODO(awjin): Subscribe logger to dispatcher's log events.
105
- const response = await dispatcher.sendCompileRequest(request);
106
- if (response.getSuccess()) {
107
- const success = response.getSuccess();
108
- const sourceMap = success.getSourceMap();
109
- if (request.getSourceMap() && sourceMap === undefined) {
110
- throw Error('Compiler did not provide sourceMap.');
100
+ dispatcher.logEvents$.subscribe(event => handleLogEvent(options, event));
101
+ return handleCompileResponse(await new Promise((resolve, reject) => dispatcher.sendCompileRequest(request, (err, response) => {
102
+ if (err) {
103
+ reject(err);
111
104
  }
112
- return {
113
- css: success.getCss(),
114
- sourceMap: sourceMap ? JSON.parse(sourceMap) : undefined,
115
- };
105
+ else {
106
+ resolve(response);
107
+ }
108
+ })));
109
+ }
110
+ finally {
111
+ embeddedCompiler.close();
112
+ await embeddedCompiler.exit$;
113
+ }
114
+ }
115
+ // Spins up a compiler, then sends it a compile request. Returns a promise that
116
+ // resolves with the CompileResult. Throws if there were any protocol or
117
+ // compilation errors. Shuts down the compiler after compilation.
118
+ function compileRequestSync(request, importers, options) {
119
+ const functions = new function_registry_1.FunctionRegistry(options === null || options === void 0 ? void 0 : options.functions);
120
+ const embeddedCompiler = new sync_compiler_1.SyncEmbeddedCompiler();
121
+ try {
122
+ const dispatcher = createDispatcher(embeddedCompiler.stdout$, buffer => {
123
+ embeddedCompiler.writeStdin(buffer);
124
+ }, {
125
+ handleImportRequest: request => importers.import(request),
126
+ handleFileImportRequest: request => importers.fileImport(request),
127
+ handleCanonicalizeRequest: request => importers.canonicalize(request),
128
+ handleFunctionCallRequest: request => functions.call(request),
129
+ });
130
+ dispatcher.logEvents$.subscribe(event => handleLogEvent(options, event));
131
+ let error;
132
+ let response;
133
+ dispatcher.sendCompileRequest(request, (error_, response_) => {
134
+ if (error_) {
135
+ error = error_;
136
+ }
137
+ else {
138
+ response = response_;
139
+ }
140
+ });
141
+ for (;;) {
142
+ if (!embeddedCompiler.yield()) {
143
+ throw utils.compilerError('Embedded compiler exited unexpectedly.');
144
+ }
145
+ if (error)
146
+ throw error;
147
+ if (response)
148
+ return handleCompileResponse(response);
116
149
  }
117
- else if (response.getFailure()) {
118
- throw (0, utils_1.deprotifyException)(response.getFailure());
150
+ }
151
+ finally {
152
+ embeddedCompiler.close();
153
+ embeddedCompiler.yieldUntilExit();
154
+ }
155
+ }
156
+ /**
157
+ * Creates a dispatcher that dispatches messages from the given `stdout` stream.
158
+ */
159
+ function createDispatcher(stdout, writeStdin, handlers) {
160
+ const packetTransformer = new packet_transformer_1.PacketTransformer(stdout, writeStdin);
161
+ const messageTransformer = new message_transformer_1.MessageTransformer(packetTransformer.outboundProtobufs$, packet => packetTransformer.writeInboundProtobuf(packet));
162
+ return new dispatcher_1.Dispatcher(messageTransformer.outboundMessages$, message => messageTransformer.writeInboundMessage(message), handlers);
163
+ }
164
+ /** Handles a log event according to `options`. */
165
+ function handleLogEvent(options, event) {
166
+ var _a, _b;
167
+ if (event.getType() === proto.LogEventType.DEBUG) {
168
+ if ((_a = options === null || options === void 0 ? void 0 : options.logger) === null || _a === void 0 ? void 0 : _a.debug) {
169
+ options.logger.debug(event.getMessage(), {
170
+ span: (0, deprotofy_span_1.deprotofySourceSpan)(event.getSpan()),
171
+ });
119
172
  }
120
173
  else {
121
- throw Error('Compiler sent empty CompileResponse.');
174
+ console.error(event.getFormatted());
122
175
  }
123
176
  }
124
- finally {
125
- embeddedCompiler.close();
126
- await embeddedCompiler.exit$;
177
+ else {
178
+ if ((_b = options === null || options === void 0 ? void 0 : options.logger) === null || _b === void 0 ? void 0 : _b.warn) {
179
+ const params = {
180
+ deprecation: event.getType() === proto.LogEventType.DEPRECATION_WARNING,
181
+ };
182
+ const spanProto = event.getSpan();
183
+ if (spanProto)
184
+ params.span = (0, deprotofy_span_1.deprotofySourceSpan)(spanProto);
185
+ const stack = event.getStackTrace();
186
+ if (stack)
187
+ params.stack = stack;
188
+ options.logger.warn(event.getMessage(), params);
189
+ }
190
+ else {
191
+ console.error(event.getFormatted());
192
+ }
193
+ }
194
+ }
195
+ /**
196
+ * Converts a `CompileResponse` into a `CompileResult`.
197
+ *
198
+ * Throws a `SassException` if the compilation failed.
199
+ */
200
+ function handleCompileResponse(response) {
201
+ if (response.getSuccess()) {
202
+ const success = response.getSuccess();
203
+ const result = {
204
+ css: success.getCss(),
205
+ loadedUrls: success.getLoadedUrlsList().map(url => new URL(url)),
206
+ };
207
+ const sourceMap = success.getSourceMap();
208
+ if (sourceMap)
209
+ result.sourceMap = JSON.parse(sourceMap);
210
+ return result;
211
+ }
212
+ else if (response.getFailure()) {
213
+ throw new exception_1.Exception(response.getFailure());
214
+ }
215
+ else {
216
+ throw utils.compilerError('Compiler sent empty CompileResponse.');
127
217
  }
128
218
  }
129
219
  //# sourceMappingURL=compile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../lib/src/compile.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAGvC,6BAAwB;AAExB,2DAA8D;AAC9D,+EAAyE;AACzE,iFAA2E;AAC3E,+DAA0D;AAC1D,qDAA6D;AAC7D,qEAAqE;AAIrE;;;GAGG;AACI,KAAK,UAAU,OAAO,CAAC,OAG7B;IACC,6DAA6D;IAE7D,MAAM,OAAO,GAAG,iBAAiB,CAAC;QAChC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS;KAC/B,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAU,CAAC,CAAC;KACxC;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC;AACtB,CAAC;AAhBD,0BAgBC;AAED;;;G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O,MAAM,CAAC;KACf;SAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,EAAE;QAChC,MAAM,IAAI,qBAAS,CAAC,QAAQ,CAAC,UAAU,EAAG,CAAC,CAAC;KAC7C;SAAM;QACL,MAAM,KAAK,CAAC,aAAa,CAAC,sCAAsC,CAAC,CAAC;KACnE;AACH,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2021 Google LLC. Use of this source code is governed by an
3
+ // MIT-style license that can be found in the LICENSE file or at
4
+ // https://opensource.org/licenses/MIT.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.compilerPath = void 0;
7
+ const fs = require("fs");
8
+ const p = require("path");
9
+ /** The path to the embedded compiler executable. */
10
+ exports.compilerPath = (() => {
11
+ for (const path of ['vendor', '../../../lib/src/vendor']) {
12
+ const executable = p.resolve(__dirname, path, `dart-sass-embedded/dart-sass-embedded${process.platform === 'win32' ? '.bat' : ''}`);
13
+ if (fs.existsSync(executable))
14
+ return executable;
15
+ }
16
+ throw new Error("Embedded Dart Sass couldn't find the embedded compiler executable.");
17
+ })();
18
+ //# sourceMappingURL=compiler-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler-path.js","sourceRoot":"","sources":["../../../lib/src/compiler-path.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,yBAAyB;AACzB,0BAA0B;AAE1B,oDAAoD;AACvC,QAAA,YAAY,GAAG,CAAC,GAAG,EAAE;IAChC,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,yBAAyB,CAAC,EAAE;QACxD,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,CAC1B,SAAS,EACT,IAAI,EACJ,wCACE,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAC1C,EAAE,CACH,CAAC;QAEF,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;KAClD;IAED,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}