diff options
author | 2022-03-07 00:33:49 -0800 | |
---|---|---|
committer | 2022-03-07 00:33:49 -0800 | |
commit | d43a6455359062b2c67f914d2f56d7d1ce3044a7 (patch) | |
tree | 456b6a9359f10cc2aae5f53fe18a8dd223969929 /src/api/schema.js | |
parent | 50d5b872f9a008be02b3c36a7fa34cabef5718f6 (diff) | |
download | bun-d43a6455359062b2c67f914d2f56d7d1ce3044a7.tar.gz bun-d43a6455359062b2c67f914d2f56d7d1ce3044a7.tar.zst bun-d43a6455359062b2c67f914d2f56d7d1ce3044a7.zip |
source maps optimizations
Diffstat (limited to 'src/api/schema.js')
-rw-r--r-- | src/api/schema.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/api/schema.js b/src/api/schema.js index b89ed4a08..4dfa2e245 100644 --- a/src/api/schema.js +++ b/src/api/schema.js @@ -1718,6 +1718,10 @@ function decodeTransformOptions(bb) { result["logLevel"] = MessageLevel[bb.readVarUint()]; break; + case 27: + result["source_map"] = SourceMapMode[bb.readByte()]; + break; + default: throw new Error("Attempted to parse invalid message"); } @@ -1925,8 +1929,31 @@ function encodeTransformOptions(message, bb) { ); bb.writeVarUint(encoded); } + + var value = message["source_map"]; + if (value != null) { + bb.writeByte(27); + var encoded = SourceMapMode[value]; + if (encoded === void 0) + throw new Error( + "Invalid value " + JSON.stringify(value) + ' for enum "SourceMapMode"' + ); + bb.writeByte(encoded); + } bb.writeByte(0); } +const SourceMapMode = { + 1: 1, + 2: 2, + inline_into_file: 1, + external: 2, +}; +const SourceMapModeKeys = { + 1: "inline_into_file", + 2: "external", + inline_into_file: "inline_into_file", + external: "external", +}; function decodeFileHandle(bb) { var result = {}; @@ -3272,6 +3299,8 @@ export { decodeRouteConfig }; export { encodeRouteConfig }; export { decodeTransformOptions }; export { encodeTransformOptions }; +export { SourceMapMode }; +export { SourceMapModeKeys }; export { decodeFileHandle }; export { encodeFileHandle }; export { decodeTransform }; |