@reteps/dockerfmt 0.2.5 → 0.2.7
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.js +1 -1
- package/dist/format.wasm +0 -0
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/package.json +29 -23
package/dist/format.js
CHANGED
|
@@ -10,7 +10,7 @@ export const formatDockerfileContents = async (fileContents, options, getWasm) =
|
|
|
10
10
|
* Do not await this promise, because it only resolves once the go main()
|
|
11
11
|
* function has exited. But we need the main function to stay alive to be
|
|
12
12
|
* able to call the `parse` and `print` function.
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
go.run(wasm.instance);
|
|
15
15
|
const { memory, malloc, free, formatBytes } = wasm.instance.exports;
|
|
16
16
|
const fileBufferBytes = encoder.encode(fileContents);
|
package/dist/format.wasm
CHANGED
|
Binary file
|
package/dist/node.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormatOptions } from
|
|
1
|
+
import { FormatOptions } from './format.js';
|
|
2
2
|
export declare const formatDockerfileContents: (fileContents: string, options: FormatOptions) => Promise<string>;
|
|
3
3
|
export declare const formatDockerfile: (fileName: string, options: FormatOptions) => Promise<string>;
|
|
4
4
|
export { FormatOptions };
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { formatDockerfileContents as formatDockerfileContents_ } from
|
|
4
|
+
import { formatDockerfileContents as formatDockerfileContents_, } from './format.js';
|
|
5
5
|
const getWasm = () => {
|
|
6
6
|
return fs.readFile(path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'format.wasm'));
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reteps/dockerfmt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
5
|
+
"description": "",
|
|
6
|
+
"repository": "git+https://github.com/reteps/dockerfmt/tree/main/js",
|
|
7
|
+
"author": "Peter Stenger <pete@stenger.io>",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": "^v12.20.0 || ^14.13.0 || >=16.0.0"
|
|
11
11
|
},
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"browser": "dist/format.js",
|
|
16
|
-
"main": "dist/node.js",
|
|
17
|
-
"types": "dist/node.d.ts",
|
|
18
12
|
"exports": {
|
|
19
13
|
".": {
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
"browser": {
|
|
15
|
+
"types": "./dist/format.d.ts",
|
|
16
|
+
"default": "./dist/format.js"
|
|
17
|
+
},
|
|
18
|
+
"default": {
|
|
19
|
+
"types": "./dist/node.d.ts",
|
|
20
|
+
"default": "./dist/node.js"
|
|
21
|
+
}
|
|
23
22
|
},
|
|
24
23
|
"./format.wasm": "./dist/format.wasm",
|
|
24
|
+
"./package.json": "./package.json",
|
|
25
25
|
"./wasm_exec": "./dist/wasm_exec.js",
|
|
26
26
|
"./wasm_exec.js": "./dist/wasm_exec.js"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"//": "Requires tinygo 0.38.0 or later",
|
|
33
|
+
"build": "npm run build-go && npm run build-js",
|
|
34
|
+
"build-go": "tinygo build -o format.wasm -target wasm --no-debug -scheduler=none",
|
|
35
|
+
"build-js": "tsc && cp format.wasm wasm_exec.js dist",
|
|
36
|
+
"format": "prettier --write \"**/*.{js,ts,json}\""
|
|
34
37
|
},
|
|
35
|
-
"
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.14.0",
|
|
40
|
+
"prettier": "^3.5.3",
|
|
41
|
+
"prettier-plugin-pkg": "^0.19.0",
|
|
36
42
|
"typescript": "^5.8.3"
|
|
37
43
|
}
|
|
38
44
|
}
|