unbake-proto 1.0.3 → 1.1.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/README.md +15 -9
- package/dist/index.mjs +5637 -0
- package/package.json +23 -13
- package/dist/index.js +0 -10
package/README.md
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
# unbake-proto
|
|
2
2
|
|
|
3
|
-
Decompile
|
|
4
|
-
|
|
3
|
+
Decompile protoc-compiled protobuf descriptor into human-readable `.proto` which is semantically equivalent to the original.
|
|
4
|
+
|
|
5
|
+
## support
|
|
6
|
+
|
|
7
|
+
- file descriptor (binary)
|
|
8
|
+
- python (`*_pb2.py`)
|
|
5
9
|
|
|
6
10
|
## usage
|
|
7
11
|
|
|
8
12
|
```shell
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
npx unbake-proto <input> # output to stdout
|
|
14
|
+
npx unbake-proto <input> [out_folder] # output to file(s)
|
|
11
15
|
```
|
|
12
16
|
|
|
17
|
+
### options
|
|
18
|
+
|
|
19
|
+
| Option | Description |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `--python` | Use a Python file as input |
|
|
22
|
+
|
|
13
23
|
## try
|
|
14
24
|
|
|
15
25
|
prepare your `.proto` file and then run the following commands
|
|
16
26
|
|
|
17
27
|
```shell
|
|
18
28
|
protoc --descriptor_set_out=baked.pb --include_imports original.proto
|
|
19
|
-
|
|
29
|
+
npx unbake-proto baked.pb > unbaked.proto
|
|
20
30
|
```
|
|
21
31
|
|
|
22
32
|
there should be no difference between `original.proto` and `unbaked.proto` !
|
|
23
|
-
|
|
24
|
-
## requirements
|
|
25
|
-
|
|
26
|
-
- Bun for the runtime; others can be used instead
|