@reteps/dockerfmt 0.2.7 → 0.3.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/format.d.ts +1 -0
- package/dist/format.js +1 -1
- package/dist/format.wasm +0 -0
- package/package.json +1 -1
package/dist/format.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import './wasm_exec.js';
|
|
|
2
2
|
export interface FormatOptions {
|
|
3
3
|
indent: number;
|
|
4
4
|
trailingNewline: boolean;
|
|
5
|
+
spaceRedirects: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const formatDockerfileContents: (fileContents: string, options: FormatOptions, getWasm: () => Promise<Buffer>) => Promise<string>;
|
|
7
8
|
export declare const formatDockerfile: () => never;
|
package/dist/format.js
CHANGED
|
@@ -17,7 +17,7 @@ export const formatDockerfileContents = async (fileContents, options, getWasm) =
|
|
|
17
17
|
const filePointer = malloc(fileBufferBytes.byteLength);
|
|
18
18
|
new Uint8Array(memory.buffer).set(fileBufferBytes, filePointer);
|
|
19
19
|
// Call formatBytes function from WebAssembly
|
|
20
|
-
const resultPointer = formatBytes(filePointer, fileBufferBytes.byteLength, options.indent, options.trailingNewline);
|
|
20
|
+
const resultPointer = formatBytes(filePointer, fileBufferBytes.byteLength, options.indent, options.trailingNewline, options.spaceRedirects);
|
|
21
21
|
// Decode the result
|
|
22
22
|
const resultBytes = new Uint8Array(memory.buffer).subarray(resultPointer);
|
|
23
23
|
const end = resultBytes.indexOf(0);
|
package/dist/format.wasm
CHANGED
|
Binary file
|