sass-embedded 1.69.6 → 1.70.0
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.
- package/dist/lib/index.js +9 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +20 -0
- package/dist/lib/src/compile.js +25 -227
- package/dist/lib/src/compile.js.map +1 -1
- package/dist/lib/src/compiler/async.js +127 -0
- package/dist/lib/src/compiler/async.js.map +1 -0
- package/dist/lib/src/compiler/sync.js +146 -0
- package/dist/lib/src/compiler/sync.js.map +1 -0
- package/dist/lib/src/compiler/utils.js +153 -0
- package/dist/lib/src/compiler/utils.js.map +1 -0
- package/dist/lib/src/compiler-path.js +1 -1
- package/dist/lib/src/dispatcher.js +23 -5
- package/dist/lib/src/dispatcher.js.map +1 -1
- package/dist/lib/src/function-registry.js +4 -7
- package/dist/lib/src/function-registry.js.map +1 -1
- package/dist/lib/src/legacy/utils.js +10 -10
- package/dist/lib/src/legacy/utils.js.map +1 -1
- package/dist/lib/src/logger.js +10 -0
- package/dist/lib/src/logger.js.map +1 -0
- package/dist/lib/src/vendor/embedded_sass_pb.js +7 -0
- package/dist/lib/src/vendor/embedded_sass_pb.js.map +1 -1
- package/dist/package.json +19 -19
- package/dist/tool/utils.js +2 -2
- package/dist/tool/utils.js.map +1 -1
- package/dist/types/compile.d.ts +184 -6
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.m.d.ts +4 -0
- package/package.json +19 -19
- package/dist/lib/src/async-compiler.js +0 -42
- package/dist/lib/src/async-compiler.js.map +0 -1
- package/dist/lib/src/sync-compiler.js +0 -55
- package/dist/lib/src/sync-compiler.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-embedded",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"protocol-version": "2.
|
|
5
|
-
"compiler-version": "1.
|
|
3
|
+
"version": "1.70.0",
|
|
4
|
+
"protocol-version": "2.4.0",
|
|
5
|
+
"compiler-version": "1.70.0",
|
|
6
6
|
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
|
|
7
7
|
"repository": "sass/embedded-host-node",
|
|
8
8
|
"author": "Google Inc.",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"test": "jest"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"sass-embedded-android-arm": "1.
|
|
39
|
-
"sass-embedded-android-arm64": "1.
|
|
40
|
-
"sass-embedded-android-ia32": "1.
|
|
41
|
-
"sass-embedded-android-x64": "1.
|
|
42
|
-
"sass-embedded-darwin-arm64": "1.
|
|
43
|
-
"sass-embedded-darwin-x64": "1.
|
|
44
|
-
"sass-embedded-linux-arm": "1.
|
|
45
|
-
"sass-embedded-linux-arm64": "1.
|
|
46
|
-
"sass-embedded-linux-ia32": "1.
|
|
47
|
-
"sass-embedded-linux-x64": "1.
|
|
48
|
-
"sass-embedded-linux-musl-arm": "1.
|
|
49
|
-
"sass-embedded-linux-musl-arm64": "1.
|
|
50
|
-
"sass-embedded-linux-musl-ia32": "1.
|
|
51
|
-
"sass-embedded-linux-musl-x64": "1.
|
|
52
|
-
"sass-embedded-win32-ia32": "1.
|
|
53
|
-
"sass-embedded-win32-x64": "1.
|
|
38
|
+
"sass-embedded-android-arm": "1.70.0",
|
|
39
|
+
"sass-embedded-android-arm64": "1.70.0",
|
|
40
|
+
"sass-embedded-android-ia32": "1.70.0",
|
|
41
|
+
"sass-embedded-android-x64": "1.70.0",
|
|
42
|
+
"sass-embedded-darwin-arm64": "1.70.0",
|
|
43
|
+
"sass-embedded-darwin-x64": "1.70.0",
|
|
44
|
+
"sass-embedded-linux-arm": "1.70.0",
|
|
45
|
+
"sass-embedded-linux-arm64": "1.70.0",
|
|
46
|
+
"sass-embedded-linux-ia32": "1.70.0",
|
|
47
|
+
"sass-embedded-linux-x64": "1.70.0",
|
|
48
|
+
"sass-embedded-linux-musl-arm": "1.70.0",
|
|
49
|
+
"sass-embedded-linux-musl-arm64": "1.70.0",
|
|
50
|
+
"sass-embedded-linux-musl-ia32": "1.70.0",
|
|
51
|
+
"sass-embedded-linux-musl-x64": "1.70.0",
|
|
52
|
+
"sass-embedded-win32-ia32": "1.70.0",
|
|
53
|
+
"sass-embedded-win32-x64": "1.70.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@bufbuild/protobuf": "^1.0.0",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Google Inc. 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.AsyncEmbeddedCompiler = void 0;
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const rxjs_1 = require("rxjs");
|
|
9
|
-
const operators_1 = require("rxjs/operators");
|
|
10
|
-
const compiler_path_1 = require("./compiler-path");
|
|
11
|
-
/**
|
|
12
|
-
* An asynchronous wrapper for the embedded Sass compiler that exposes its stdio
|
|
13
|
-
* streams as Observables.
|
|
14
|
-
*/
|
|
15
|
-
class AsyncEmbeddedCompiler {
|
|
16
|
-
constructor() {
|
|
17
|
-
/** The underlying process that's being wrapped. */
|
|
18
|
-
this.process = (0, child_process_1.spawn)(compiler_path_1.compilerCommand[0], [...compiler_path_1.compilerCommand.slice(1), '--embedded'], { windowsHide: true });
|
|
19
|
-
/** The child process's exit event. */
|
|
20
|
-
this.exit$ = new Promise(resolve => {
|
|
21
|
-
this.process.on('exit', code => resolve(code));
|
|
22
|
-
});
|
|
23
|
-
/** The buffers emitted by the child process's stdout. */
|
|
24
|
-
this.stdout$ = new rxjs_1.Observable(observer => {
|
|
25
|
-
this.process.stdout.on('data', buffer => observer.next(buffer));
|
|
26
|
-
}).pipe((0, operators_1.takeUntil)(this.exit$));
|
|
27
|
-
/** The buffers emitted by the child process's stderr. */
|
|
28
|
-
this.stderr$ = new rxjs_1.Observable(observer => {
|
|
29
|
-
this.process.stderr.on('data', buffer => observer.next(buffer));
|
|
30
|
-
}).pipe((0, operators_1.takeUntil)(this.exit$));
|
|
31
|
-
}
|
|
32
|
-
/** Writes `buffer` to the child process's stdin. */
|
|
33
|
-
writeStdin(buffer) {
|
|
34
|
-
this.process.stdin.write(buffer);
|
|
35
|
-
}
|
|
36
|
-
/** Kills the child process, cleaning up all associated Observables. */
|
|
37
|
-
close() {
|
|
38
|
-
this.process.stdin.end();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.AsyncEmbeddedCompiler = AsyncEmbeddedCompiler;
|
|
42
|
-
//# sourceMappingURL=async-compiler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,mDAAgD;AAEhD;;;GAGG;AACH,MAAa,qBAAqB;IAAlC;QACE,mDAAmD;QAClC,YAAO,GAAG,IAAA,qBAAK,EAC9B,+BAAe,CAAC,CAAC,CAAC,EAClB,CAAC,GAAG,+BAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAC3C,EAAC,WAAW,EAAE,IAAI,EAAC,CACpB,CAAC;QAEF,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;AAhCD,sDAgCC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
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.SyncEmbeddedCompiler = void 0;
|
|
7
|
-
const rxjs_1 = require("rxjs");
|
|
8
|
-
const sync_process_1 = require("./sync-process");
|
|
9
|
-
const compiler_path_1 = require("./compiler-path");
|
|
10
|
-
/**
|
|
11
|
-
* A synchronous wrapper for the embedded Sass compiler that exposes its stdio
|
|
12
|
-
* streams as Observables.
|
|
13
|
-
*/
|
|
14
|
-
class SyncEmbeddedCompiler {
|
|
15
|
-
constructor() {
|
|
16
|
-
/** The underlying process that's being wrapped. */
|
|
17
|
-
this.process = new sync_process_1.SyncProcess(compiler_path_1.compilerCommand[0], [...compiler_path_1.compilerCommand.slice(1), '--embedded'], { windowsHide: true });
|
|
18
|
-
/** The buffers emitted by the child process's stdout. */
|
|
19
|
-
this.stdout$ = new rxjs_1.Subject();
|
|
20
|
-
/** The buffers emitted by the child process's stderr. */
|
|
21
|
-
this.stderr$ = new rxjs_1.Subject();
|
|
22
|
-
/** Whether the underlying compiler has already exited. */
|
|
23
|
-
this.exited = false;
|
|
24
|
-
}
|
|
25
|
-
/** Writes `buffer` to the child process's stdin. */
|
|
26
|
-
writeStdin(buffer) {
|
|
27
|
-
this.process.stdin.write(buffer);
|
|
28
|
-
}
|
|
29
|
-
yield() {
|
|
30
|
-
const event = this.process.yield();
|
|
31
|
-
switch (event.type) {
|
|
32
|
-
case 'stdout':
|
|
33
|
-
this.stdout$.next(event.data);
|
|
34
|
-
return true;
|
|
35
|
-
case 'stderr':
|
|
36
|
-
this.stderr$.next(event.data);
|
|
37
|
-
return true;
|
|
38
|
-
case 'exit':
|
|
39
|
-
this.exited = true;
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/** Blocks until the underlying process exits. */
|
|
44
|
-
yieldUntilExit() {
|
|
45
|
-
while (!this.exited) {
|
|
46
|
-
this.yield();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/** Kills the child process, cleaning up all associated Observables. */
|
|
50
|
-
close() {
|
|
51
|
-
this.process.stdin.end();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.SyncEmbeddedCompiler = SyncEmbeddedCompiler;
|
|
55
|
-
//# sourceMappingURL=sync-compiler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync-compiler.js","sourceRoot":"","sources":["../../../lib/src/sync-compiler.ts"],"names":[],"mappings":";A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