sass-embedded 1.69.7 → 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/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/dist/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.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.SassCalculation = exports.CalculationInterpolation = exports.CalculationOperation = exports.sassNull = exports.Value = exports.SassString = exports.SassNumber = exports.SassMixin = exports.SassMap = exports.SassFunction = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.SassArgumentList = exports.SassList = void 0;
|
|
6
|
+
exports.NULL = exports.FALSE = exports.TRUE = exports.Logger = exports.info = exports.renderSync = exports.render = exports.Compiler = exports.initCompiler = exports.AsyncCompiler = exports.initAsyncCompiler = exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = exports.Exception = exports.types = exports.SassCalculation = exports.CalculationInterpolation = exports.CalculationOperation = exports.sassNull = exports.Value = exports.SassString = exports.SassNumber = exports.SassMixin = exports.SassMap = exports.SassFunction = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.SassArgumentList = exports.SassList = void 0;
|
|
7
7
|
const pkg = require("../package.json");
|
|
8
8
|
const boolean_1 = require("./src/value/boolean");
|
|
9
9
|
const null_1 = require("./src/value/null");
|
|
@@ -42,13 +42,18 @@ Object.defineProperty(exports, "compile", { enumerable: true, get: function () {
|
|
|
42
42
|
Object.defineProperty(exports, "compileString", { enumerable: true, get: function () { return compile_1.compileString; } });
|
|
43
43
|
Object.defineProperty(exports, "compileAsync", { enumerable: true, get: function () { return compile_1.compileAsync; } });
|
|
44
44
|
Object.defineProperty(exports, "compileStringAsync", { enumerable: true, get: function () { return compile_1.compileStringAsync; } });
|
|
45
|
+
var async_1 = require("./src/compiler/async");
|
|
46
|
+
Object.defineProperty(exports, "initAsyncCompiler", { enumerable: true, get: function () { return async_1.initAsyncCompiler; } });
|
|
47
|
+
Object.defineProperty(exports, "AsyncCompiler", { enumerable: true, get: function () { return async_1.AsyncCompiler; } });
|
|
48
|
+
var sync_1 = require("./src/compiler/sync");
|
|
49
|
+
Object.defineProperty(exports, "initCompiler", { enumerable: true, get: function () { return sync_1.initCompiler; } });
|
|
50
|
+
Object.defineProperty(exports, "Compiler", { enumerable: true, get: function () { return sync_1.Compiler; } });
|
|
45
51
|
var legacy_1 = require("./src/legacy");
|
|
46
52
|
Object.defineProperty(exports, "render", { enumerable: true, get: function () { return legacy_1.render; } });
|
|
47
53
|
Object.defineProperty(exports, "renderSync", { enumerable: true, get: function () { return legacy_1.renderSync; } });
|
|
48
54
|
exports.info = `sass-embedded\t${pkg.version}`;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
55
|
+
var logger_1 = require("./src/logger");
|
|
56
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
|
|
52
57
|
// Legacy JS API
|
|
53
58
|
exports.TRUE = boolean_1.sassTrue;
|
|
54
59
|
exports.FALSE = boolean_1.sassFalse;
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,uCAAuC;AACvC,iDAAwD;AACxD,2CAA0C;AAE1C,yCAAyD;AAAlC,gGAAA,QAAQ,OAAA;AAC/B,2DAA2D;AAAnD,iHAAA,gBAAgB,OAAA;AACxB,+CAAwD;AAAhD,oGAAA,SAAS,OAAA;AAAE,mGAAA,QAAQ,OAAA;AAC3B,2CAA4C;AAApC,kGAAA,SAAS,OAAA;AACjB,iDAAkD;AAA1C,wGAAA,YAAY,OAAA;AACpB,uCAAwC;AAAhC,8FAAA,OAAO,OAAA;AACf,2CAA4C;AAApC,kGAAA,SAAS,OAAA;AACjB,6CAA8C;AAAtC,oGAAA,UAAU,OAAA;AAClB,6CAA8C;AAAtC,oGAAA,UAAU,OAAA;AAClB,qCAAkC;AAA1B,8FAAA,KAAK,OAAA;AACb,yCAA0C;AAAlC,gGAAA,QAAQ,OAAA;AAChB,yDAKkC;AAJhC,oHAAA,oBAAoB,OAAA;AAEpB,wHAAA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AACZ,6GAAA,kBAAkB,OAAA;AAEpB,8CAAsE;AAA9D,0GAAA,iBAAiB,OAAA;AAAE,sGAAA,aAAa,OAAA;AACxC,4CAA2D;AAAnD,oGAAA,YAAY,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC9B,uCAAgD;AAAxC,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAEb,QAAA,IAAI,GAAG,kBAAkB,GAAG,CAAC,OAAO,EAAE,CAAC;AAEpD,uCAAoC;AAA5B,gGAAA,MAAM,OAAA;AAEd,gBAAgB;AAEH,QAAA,IAAI,GAAG,kBAAQ,CAAC;AAChB,QAAA,KAAK,GAAG,mBAAS,CAAC;AAClB,QAAA,IAAI,GAAG,eAAQ,CAAC"}
|
package/dist/lib/index.mjs
CHANGED
|
@@ -4,6 +4,10 @@ export const compile = sass.compile;
|
|
|
4
4
|
export const compileAsync = sass.compileAsync;
|
|
5
5
|
export const compileString = sass.compileString;
|
|
6
6
|
export const compileStringAsync = sass.compileStringAsync;
|
|
7
|
+
export const AsyncCompiler = sass.AsyncCompiler;
|
|
8
|
+
export const Compiler = sass.Compiler;
|
|
9
|
+
export const initAsyncCompiler = sass.initAsyncCompiler;
|
|
10
|
+
export const initCompiler = sass.initCompiler;
|
|
7
11
|
export const Logger = sass.Logger;
|
|
8
12
|
export const CalculationInterpolation = sass.CalculationInterpolation;
|
|
9
13
|
export const CalculationOperation = sass.CalculationOperation;
|
|
@@ -61,6 +65,22 @@ export default {
|
|
|
61
65
|
defaultExportDeprecation();
|
|
62
66
|
return sass.compileStringAsync;
|
|
63
67
|
},
|
|
68
|
+
get initAsyncCompiler() {
|
|
69
|
+
defaultExportDeprecation();
|
|
70
|
+
return sass.initAsyncCompiler;
|
|
71
|
+
},
|
|
72
|
+
get initCompiler() {
|
|
73
|
+
defaultExportDeprecation();
|
|
74
|
+
return sass.initCompiler;
|
|
75
|
+
},
|
|
76
|
+
get AsyncCompiler() {
|
|
77
|
+
defaultExportDeprecation();
|
|
78
|
+
return sass.AsyncCompiler;
|
|
79
|
+
},
|
|
80
|
+
get Compiler() {
|
|
81
|
+
defaultExportDeprecation();
|
|
82
|
+
return sass.Compiler;
|
|
83
|
+
},
|
|
64
84
|
get Logger() {
|
|
65
85
|
defaultExportDeprecation();
|
|
66
86
|
return sass.Logger;
|
package/dist/lib/src/compile.js
CHANGED
|
@@ -4,248 +4,46 @@
|
|
|
4
4
|
// https://opensource.org/licenses/MIT.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const proto = require("./vendor/embedded_sass_pb");
|
|
10
|
-
const utils = require("./utils");
|
|
11
|
-
const async_compiler_1 = require("./async-compiler");
|
|
12
|
-
const dispatcher_1 = require("./dispatcher");
|
|
13
|
-
const exception_1 = require("./exception");
|
|
14
|
-
const function_registry_1 = require("./function-registry");
|
|
15
|
-
const importer_registry_1 = require("./importer-registry");
|
|
16
|
-
const message_transformer_1 = require("./message-transformer");
|
|
17
|
-
const packet_transformer_1 = require("./packet-transformer");
|
|
18
|
-
const sync_compiler_1 = require("./sync-compiler");
|
|
19
|
-
const deprotofy_span_1 = require("./deprotofy-span");
|
|
20
|
-
const utils_1 = require("./legacy/utils");
|
|
7
|
+
const async_1 = require("./compiler/async");
|
|
8
|
+
const sync_1 = require("./compiler/sync");
|
|
21
9
|
function compile(path, options) {
|
|
22
|
-
const
|
|
23
|
-
return compileRequestSync(newCompilePathRequest(path, importers, options), importers, options);
|
|
24
|
-
}
|
|
25
|
-
exports.compile = compile;
|
|
26
|
-
function compileString(source, options) {
|
|
27
|
-
const importers = new importer_registry_1.ImporterRegistry(options);
|
|
28
|
-
return compileRequestSync(newCompileStringRequest(source, importers, options), importers, options);
|
|
29
|
-
}
|
|
30
|
-
exports.compileString = compileString;
|
|
31
|
-
function compileAsync(path, options) {
|
|
32
|
-
const importers = new importer_registry_1.ImporterRegistry(options);
|
|
33
|
-
return compileRequestAsync(newCompilePathRequest(path, importers, options), importers, options);
|
|
34
|
-
}
|
|
35
|
-
exports.compileAsync = compileAsync;
|
|
36
|
-
function compileStringAsync(source, options) {
|
|
37
|
-
const importers = new importer_registry_1.ImporterRegistry(options);
|
|
38
|
-
return compileRequestAsync(newCompileStringRequest(source, importers, options), importers, options);
|
|
39
|
-
}
|
|
40
|
-
exports.compileStringAsync = compileStringAsync;
|
|
41
|
-
// Creates a request for compiling a file.
|
|
42
|
-
function newCompilePathRequest(path, importers, options) {
|
|
43
|
-
const request = newCompileRequest(importers, options);
|
|
44
|
-
request.input = { case: 'path', value: path };
|
|
45
|
-
return request;
|
|
46
|
-
}
|
|
47
|
-
// Creates a request for compiling a string.
|
|
48
|
-
function newCompileStringRequest(source, importers, options) {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
const input = new proto.InboundMessage_CompileRequest_StringInput({
|
|
51
|
-
source,
|
|
52
|
-
syntax: utils.protofySyntax((_a = options === null || options === void 0 ? void 0 : options.syntax) !== null && _a !== void 0 ? _a : 'scss'),
|
|
53
|
-
});
|
|
54
|
-
const url = (_b = options === null || options === void 0 ? void 0 : options.url) === null || _b === void 0 ? void 0 : _b.toString();
|
|
55
|
-
if (url && url !== utils_1.legacyImporterProtocol) {
|
|
56
|
-
input.url = url;
|
|
57
|
-
}
|
|
58
|
-
if (options && 'importer' in options && options.importer) {
|
|
59
|
-
input.importer = importers.register(options.importer);
|
|
60
|
-
}
|
|
61
|
-
else if (url === utils_1.legacyImporterProtocol) {
|
|
62
|
-
input.importer = new proto.InboundMessage_CompileRequest_Importer({
|
|
63
|
-
importer: { case: 'path', value: p.resolve('.') },
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
// When importer is not set on the host, the compiler will set a
|
|
68
|
-
// FileSystemImporter if `url` is set to a file: url or a NoOpImporter.
|
|
69
|
-
}
|
|
70
|
-
const request = newCompileRequest(importers, options);
|
|
71
|
-
request.input = { case: 'string', value: input };
|
|
72
|
-
return request;
|
|
73
|
-
}
|
|
74
|
-
// Creates a compilation request for the given `options` without adding any
|
|
75
|
-
// input-specific options.
|
|
76
|
-
function newCompileRequest(importers, options) {
|
|
77
|
-
var _a, _b, _c, _d;
|
|
78
|
-
const request = new proto.InboundMessage_CompileRequest({
|
|
79
|
-
importers: importers.importers,
|
|
80
|
-
globalFunctions: Object.keys((_a = options === null || options === void 0 ? void 0 : options.functions) !== null && _a !== void 0 ? _a : {}),
|
|
81
|
-
sourceMap: !!(options === null || options === void 0 ? void 0 : options.sourceMap),
|
|
82
|
-
sourceMapIncludeSources: !!(options === null || options === void 0 ? void 0 : options.sourceMapIncludeSources),
|
|
83
|
-
alertColor: (_b = options === null || options === void 0 ? void 0 : options.alertColor) !== null && _b !== void 0 ? _b : !!supportsColor.stdout,
|
|
84
|
-
alertAscii: !!(options === null || options === void 0 ? void 0 : options.alertAscii),
|
|
85
|
-
quietDeps: !!(options === null || options === void 0 ? void 0 : options.quietDeps),
|
|
86
|
-
verbose: !!(options === null || options === void 0 ? void 0 : options.verbose),
|
|
87
|
-
charset: !!((_c = options === null || options === void 0 ? void 0 : options.charset) !== null && _c !== void 0 ? _c : true),
|
|
88
|
-
});
|
|
89
|
-
switch ((_d = options === null || options === void 0 ? void 0 : options.style) !== null && _d !== void 0 ? _d : 'expanded') {
|
|
90
|
-
case 'expanded':
|
|
91
|
-
request.style = proto.OutputStyle.EXPANDED;
|
|
92
|
-
break;
|
|
93
|
-
case 'compressed':
|
|
94
|
-
request.style = proto.OutputStyle.COMPRESSED;
|
|
95
|
-
break;
|
|
96
|
-
default:
|
|
97
|
-
throw new Error(`Unknown options.style: "${options === null || options === void 0 ? void 0 : options.style}"`);
|
|
98
|
-
}
|
|
99
|
-
return request;
|
|
100
|
-
}
|
|
101
|
-
// Spins up a compiler, then sends it a compile request. Returns a promise that
|
|
102
|
-
// resolves with the CompileResult. Throws if there were any protocol or
|
|
103
|
-
// compilation errors. Shuts down the compiler after compilation.
|
|
104
|
-
async function compileRequestAsync(request, importers, options) {
|
|
105
|
-
const functions = new function_registry_1.FunctionRegistry(options === null || options === void 0 ? void 0 : options.functions);
|
|
106
|
-
const embeddedCompiler = new async_compiler_1.AsyncEmbeddedCompiler();
|
|
107
|
-
embeddedCompiler.stderr$.subscribe(data => process.stderr.write(data));
|
|
10
|
+
const compiler = (0, sync_1.initCompiler)();
|
|
108
11
|
try {
|
|
109
|
-
|
|
110
|
-
embeddedCompiler.writeStdin(buffer);
|
|
111
|
-
}, {
|
|
112
|
-
handleImportRequest: request => importers.import(request),
|
|
113
|
-
handleFileImportRequest: request => importers.fileImport(request),
|
|
114
|
-
handleCanonicalizeRequest: request => importers.canonicalize(request),
|
|
115
|
-
handleFunctionCallRequest: request => functions.call(request),
|
|
116
|
-
});
|
|
117
|
-
dispatcher.logEvents$.subscribe(event => handleLogEvent(options, event));
|
|
118
|
-
return handleCompileResponse(await new Promise((resolve, reject) => dispatcher.sendCompileRequest(request, (err, response) => {
|
|
119
|
-
if (err) {
|
|
120
|
-
reject(err);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
resolve(response);
|
|
124
|
-
}
|
|
125
|
-
})));
|
|
12
|
+
return compiler.compile(path, options);
|
|
126
13
|
}
|
|
127
14
|
finally {
|
|
128
|
-
|
|
129
|
-
await embeddedCompiler.exit$;
|
|
15
|
+
compiler.dispose();
|
|
130
16
|
}
|
|
131
17
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
function compileRequestSync(request, importers, options) {
|
|
136
|
-
const functions = new function_registry_1.FunctionRegistry(options === null || options === void 0 ? void 0 : options.functions);
|
|
137
|
-
const embeddedCompiler = new sync_compiler_1.SyncEmbeddedCompiler();
|
|
138
|
-
embeddedCompiler.stderr$.subscribe(data => process.stderr.write(data));
|
|
18
|
+
exports.compile = compile;
|
|
19
|
+
function compileString(source, options) {
|
|
20
|
+
const compiler = (0, sync_1.initCompiler)();
|
|
139
21
|
try {
|
|
140
|
-
|
|
141
|
-
embeddedCompiler.writeStdin(buffer);
|
|
142
|
-
}, {
|
|
143
|
-
handleImportRequest: request => importers.import(request),
|
|
144
|
-
handleFileImportRequest: request => importers.fileImport(request),
|
|
145
|
-
handleCanonicalizeRequest: request => importers.canonicalize(request),
|
|
146
|
-
handleFunctionCallRequest: request => functions.call(request),
|
|
147
|
-
});
|
|
148
|
-
dispatcher.logEvents$.subscribe(event => handleLogEvent(options, event));
|
|
149
|
-
let error;
|
|
150
|
-
let response;
|
|
151
|
-
dispatcher.sendCompileRequest(request, (error_, response_) => {
|
|
152
|
-
if (error_) {
|
|
153
|
-
error = error_;
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
response = response_;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
for (;;) {
|
|
160
|
-
if (!embeddedCompiler.yield()) {
|
|
161
|
-
throw utils.compilerError('Embedded compiler exited unexpectedly.');
|
|
162
|
-
}
|
|
163
|
-
if (error)
|
|
164
|
-
throw error;
|
|
165
|
-
if (response)
|
|
166
|
-
return handleCompileResponse(response);
|
|
167
|
-
}
|
|
22
|
+
return compiler.compileString(source, options);
|
|
168
23
|
}
|
|
169
24
|
finally {
|
|
170
|
-
|
|
171
|
-
embeddedCompiler.yieldUntilExit();
|
|
25
|
+
compiler.dispose();
|
|
172
26
|
}
|
|
173
27
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const messageTransformer = new message_transformer_1.MessageTransformer(packetTransformer.outboundProtobufs$, packet => packetTransformer.writeInboundProtobuf(packet));
|
|
180
|
-
return new dispatcher_1.Dispatcher(
|
|
181
|
-
// Since we only use one compilation per process, we can get away with
|
|
182
|
-
// hardcoding a compilation ID. Once we support multiple concurrent
|
|
183
|
-
// compilations with the same process, we'll need to ensure each one uses a
|
|
184
|
-
// unique ID.
|
|
185
|
-
1, messageTransformer.outboundMessages$, message => messageTransformer.writeInboundMessage(message), handlers);
|
|
186
|
-
}
|
|
187
|
-
/** Handles a log event according to `options`. */
|
|
188
|
-
function handleLogEvent(options, event) {
|
|
189
|
-
var _a, _b;
|
|
190
|
-
let span = event.span ? (0, deprotofy_span_1.deprotofySourceSpan)(event.span) : null;
|
|
191
|
-
if (span && (options === null || options === void 0 ? void 0 : options.legacy))
|
|
192
|
-
span = (0, utils_1.removeLegacyImporterFromSpan)(span);
|
|
193
|
-
let message = event.message;
|
|
194
|
-
if (options === null || options === void 0 ? void 0 : options.legacy)
|
|
195
|
-
message = (0, utils_1.removeLegacyImporter)(message);
|
|
196
|
-
let formatted = event.formatted;
|
|
197
|
-
if (options === null || options === void 0 ? void 0 : options.legacy)
|
|
198
|
-
formatted = (0, utils_1.removeLegacyImporter)(formatted);
|
|
199
|
-
if (event.type === proto.LogEventType.DEBUG) {
|
|
200
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.logger) === null || _a === void 0 ? void 0 : _a.debug) {
|
|
201
|
-
options.logger.debug(message, {
|
|
202
|
-
span: span,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
console.error(formatted);
|
|
207
|
-
}
|
|
28
|
+
exports.compileString = compileString;
|
|
29
|
+
async function compileAsync(path, options) {
|
|
30
|
+
const compiler = await (0, async_1.initAsyncCompiler)();
|
|
31
|
+
try {
|
|
32
|
+
return await compiler.compileAsync(path, options);
|
|
208
33
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
const params = {
|
|
212
|
-
deprecation: event.type === proto.LogEventType.DEPRECATION_WARNING,
|
|
213
|
-
};
|
|
214
|
-
if (span)
|
|
215
|
-
params.span = span;
|
|
216
|
-
const stack = event.stackTrace;
|
|
217
|
-
if (stack) {
|
|
218
|
-
params.stack = (options === null || options === void 0 ? void 0 : options.legacy) ? (0, utils_1.removeLegacyImporter)(stack) : stack;
|
|
219
|
-
}
|
|
220
|
-
options.logger.warn(message, params);
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
console.error(formatted);
|
|
224
|
-
}
|
|
34
|
+
finally {
|
|
35
|
+
await compiler.dispose();
|
|
225
36
|
}
|
|
226
37
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
function handleCompileResponse(response) {
|
|
233
|
-
if (response.result.case === 'success') {
|
|
234
|
-
const success = response.result.value;
|
|
235
|
-
const result = {
|
|
236
|
-
css: success.css,
|
|
237
|
-
loadedUrls: response.loadedUrls.map(url => new URL(url)),
|
|
238
|
-
};
|
|
239
|
-
const sourceMap = success.sourceMap;
|
|
240
|
-
if (sourceMap)
|
|
241
|
-
result.sourceMap = JSON.parse(sourceMap);
|
|
242
|
-
return result;
|
|
243
|
-
}
|
|
244
|
-
else if (response.result.case === 'failure') {
|
|
245
|
-
throw new exception_1.Exception(response.result.value);
|
|
38
|
+
exports.compileAsync = compileAsync;
|
|
39
|
+
async function compileStringAsync(source, options) {
|
|
40
|
+
const compiler = await (0, async_1.initAsyncCompiler)();
|
|
41
|
+
try {
|
|
42
|
+
return await compiler.compileStringAsync(source, options);
|
|
246
43
|
}
|
|
247
|
-
|
|
248
|
-
|
|
44
|
+
finally {
|
|
45
|
+
await compiler.dispose();
|
|
249
46
|
}
|
|
250
47
|
}
|
|
48
|
+
exports.compileStringAsync = compileStringAsync;
|
|
251
49
|
//# 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;;;AAEvC,
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../lib/src/compile.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,4CAAmD;AAEnD,0CAA6C;AAG7C,SAAgB,OAAO,CACrB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|
|
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.initAsyncCompiler = exports.AsyncCompiler = 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 path = require("path");
|
|
11
|
+
const utils_1 = require("./utils");
|
|
12
|
+
const compiler_path_1 = require("../compiler-path");
|
|
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 utils = require("../utils");
|
|
18
|
+
/**
|
|
19
|
+
* Flag allowing the constructor passed by `initAsyncCompiler` so we can
|
|
20
|
+
* differentiate and throw an error if the `AsyncCompiler` is constructed via
|
|
21
|
+
* `new AsyncCompiler`.
|
|
22
|
+
*/
|
|
23
|
+
const initFlag = Symbol();
|
|
24
|
+
/** An asynchronous wrapper for the embedded Sass compiler */
|
|
25
|
+
class AsyncCompiler {
|
|
26
|
+
/** Writes `buffer` to the child process's stdin. */
|
|
27
|
+
writeStdin(buffer) {
|
|
28
|
+
this.process.stdin.write(buffer);
|
|
29
|
+
}
|
|
30
|
+
/** Guards against using a disposed compiler. */
|
|
31
|
+
throwIfDisposed() {
|
|
32
|
+
if (this.disposed) {
|
|
33
|
+
throw utils.compilerError('Async compiler has already been disposed.');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sends a compile request to the child process and returns a Promise that
|
|
38
|
+
* resolves with the CompileResult. Rejects the promise if there were any
|
|
39
|
+
* protocol or compilation errors.
|
|
40
|
+
*/
|
|
41
|
+
async compileRequestAsync(request, importers, options) {
|
|
42
|
+
const functions = new function_registry_1.FunctionRegistry(options === null || options === void 0 ? void 0 : options.functions);
|
|
43
|
+
const dispatcher = (0, utils_1.createDispatcher)(this.compilationId++, this.messageTransformer, {
|
|
44
|
+
handleImportRequest: request => importers.import(request),
|
|
45
|
+
handleFileImportRequest: request => importers.fileImport(request),
|
|
46
|
+
handleCanonicalizeRequest: request => importers.canonicalize(request),
|
|
47
|
+
handleFunctionCallRequest: request => functions.call(request),
|
|
48
|
+
});
|
|
49
|
+
dispatcher.logEvents$.subscribe(event => (0, utils_1.handleLogEvent)(options, event));
|
|
50
|
+
const compilation = new Promise((resolve, reject) => dispatcher.sendCompileRequest(request, (err, response) => {
|
|
51
|
+
this.compilations.delete(compilation);
|
|
52
|
+
// Reset the compilation ID when the compiler goes idle (no active
|
|
53
|
+
// compilations) to avoid overflowing it.
|
|
54
|
+
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1429266794
|
|
55
|
+
if (this.compilations.size === 0)
|
|
56
|
+
this.compilationId = 1;
|
|
57
|
+
if (err) {
|
|
58
|
+
reject(err);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
resolve(response);
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
this.compilations.add(compilation);
|
|
65
|
+
return (0, utils_1.handleCompileResponse)(await compilation);
|
|
66
|
+
}
|
|
67
|
+
/** Initialize resources shared across compilations. */
|
|
68
|
+
constructor(flag) {
|
|
69
|
+
/** The underlying process that's being wrapped. */
|
|
70
|
+
this.process = (0, child_process_1.spawn)(compiler_path_1.compilerCommand[0], [...compiler_path_1.compilerCommand.slice(1), '--embedded'], {
|
|
71
|
+
// Use the command's cwd so the compiler survives the removal of the
|
|
72
|
+
// current working directory.
|
|
73
|
+
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1438712923
|
|
74
|
+
cwd: path.dirname(compiler_path_1.compilerCommand[0]),
|
|
75
|
+
windowsHide: true,
|
|
76
|
+
});
|
|
77
|
+
/** The next compilation ID. */
|
|
78
|
+
this.compilationId = 1;
|
|
79
|
+
/** A list of active compilations. */
|
|
80
|
+
this.compilations = new Set();
|
|
81
|
+
/** Whether the underlying compiler has already exited. */
|
|
82
|
+
this.disposed = false;
|
|
83
|
+
/** The child process's exit event. */
|
|
84
|
+
this.exit$ = new Promise(resolve => {
|
|
85
|
+
this.process.on('exit', code => resolve(code));
|
|
86
|
+
});
|
|
87
|
+
/** The buffers emitted by the child process's stdout. */
|
|
88
|
+
this.stdout$ = new rxjs_1.Observable(observer => {
|
|
89
|
+
this.process.stdout.on('data', buffer => observer.next(buffer));
|
|
90
|
+
}).pipe((0, operators_1.takeUntil)(this.exit$));
|
|
91
|
+
/** The buffers emitted by the child process's stderr. */
|
|
92
|
+
this.stderr$ = new rxjs_1.Observable(observer => {
|
|
93
|
+
this.process.stderr.on('data', buffer => observer.next(buffer));
|
|
94
|
+
}).pipe((0, operators_1.takeUntil)(this.exit$));
|
|
95
|
+
if (flag !== initFlag) {
|
|
96
|
+
throw utils.compilerError('AsyncCompiler can not be directly constructed. ' +
|
|
97
|
+
'Please use `sass.initAsyncCompiler()` instead.');
|
|
98
|
+
}
|
|
99
|
+
this.stderr$.subscribe(data => process.stderr.write(data));
|
|
100
|
+
const packetTransformer = new packet_transformer_1.PacketTransformer(this.stdout$, buffer => {
|
|
101
|
+
this.writeStdin(buffer);
|
|
102
|
+
});
|
|
103
|
+
this.messageTransformer = new message_transformer_1.MessageTransformer(packetTransformer.outboundProtobufs$, packet => packetTransformer.writeInboundProtobuf(packet));
|
|
104
|
+
}
|
|
105
|
+
compileAsync(path, options) {
|
|
106
|
+
this.throwIfDisposed();
|
|
107
|
+
const importers = new importer_registry_1.ImporterRegistry(options);
|
|
108
|
+
return this.compileRequestAsync((0, utils_1.newCompilePathRequest)(path, importers, options), importers, options);
|
|
109
|
+
}
|
|
110
|
+
compileStringAsync(source, options) {
|
|
111
|
+
this.throwIfDisposed();
|
|
112
|
+
const importers = new importer_registry_1.ImporterRegistry(options);
|
|
113
|
+
return this.compileRequestAsync((0, utils_1.newCompileStringRequest)(source, importers, options), importers, options);
|
|
114
|
+
}
|
|
115
|
+
async dispose() {
|
|
116
|
+
this.disposed = true;
|
|
117
|
+
await Promise.all(this.compilations);
|
|
118
|
+
this.process.stdin.end();
|
|
119
|
+
await this.exit$;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.AsyncCompiler = AsyncCompiler;
|
|
123
|
+
async function initAsyncCompiler() {
|
|
124
|
+
return new AsyncCompiler(initFlag);
|
|
125
|
+
}
|
|
126
|
+
exports.initAsyncCompiler = initAsyncCompiler;
|
|
127
|
+
//# sourceMappingURL=async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../lib/src/compiler/async.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,iDAAoC;AACpC,+BAAgC;AAChC,8CAAyC;AAEzC,6BAA6B;AAC7B,mCAQiB;AACjB,oDAAiD;AACjD,4DAAsD;AACtD,4DAAsD;AACtD,gEAA0D;AAC1D,8DAAwD;AACxD,kCAAkC;AAIlC;;;;GAIG;AACH,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC;AAE1B,6DAA6D;AAC7D,MAAa,aAAa;IA2CxB,oDAAoD;IAC5C,UAAU,CAAC,MAAc;QAC/B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,gDAAgD;IACxC,eAAe;QACrB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,KAAK,CAAC,aAAa,CAAC,2CAA2C,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,mBAAmB,CAC/B,OAA4C,EAC5C,SAAoC,EACpC,OAAyD;QAEzD,MAAM,SAAS,GAAG,IAAI,oCAAgB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,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