sim 2.3.0-preview.325.1 → 2.3.0-preview.326.1
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/index.js +5 -1
- package/dist/runtime.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37779,7 +37779,11 @@ function readArgumentDescriptor(descriptor) {
|
|
|
37779
37779
|
throw new SimApiError("JSON input exceeds 10 MiB", 0);
|
|
37780
37780
|
chunks.push(Buffer.from(buffer.subarray(0, read)));
|
|
37781
37781
|
}
|
|
37782
|
-
return Buffer.concat(chunks)
|
|
37782
|
+
return decodeArgumentBytes(Buffer.concat(chunks));
|
|
37783
|
+
}
|
|
37784
|
+
function decodeArgumentBytes(bytes) {
|
|
37785
|
+
const utf16le = bytes[0] === 255 && bytes[1] === 254;
|
|
37786
|
+
return new TextDecoder(utf16le ? "utf-16le" : "utf-8").decode(bytes);
|
|
37783
37787
|
}
|
|
37784
37788
|
function literalAtHint(error, path) {
|
|
37785
37789
|
return error?.code === "ENOENT" ? `. To pass the literal value @${path}, write @@${path}` : "";
|
package/dist/runtime.js
CHANGED
|
@@ -37828,7 +37828,11 @@ function readArgumentDescriptor(descriptor) {
|
|
|
37828
37828
|
throw new SimApiError("JSON input exceeds 10 MiB", 0);
|
|
37829
37829
|
chunks.push(Buffer.from(buffer.subarray(0, read)));
|
|
37830
37830
|
}
|
|
37831
|
-
return Buffer.concat(chunks)
|
|
37831
|
+
return decodeArgumentBytes(Buffer.concat(chunks));
|
|
37832
|
+
}
|
|
37833
|
+
function decodeArgumentBytes(bytes) {
|
|
37834
|
+
const utf16le = bytes[0] === 255 && bytes[1] === 254;
|
|
37835
|
+
return new TextDecoder(utf16le ? "utf-16le" : "utf-8").decode(bytes);
|
|
37832
37836
|
}
|
|
37833
37837
|
function literalAtHint(error, path) {
|
|
37834
37838
|
return error?.code === "ENOENT" ? `. To pass the literal value @${path}, write @@${path}` : "";
|