depbjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

Protobufjs Decompiler

A Simple Decompiler for Protobufjs.

Install

npm install -g depbjs

Usage

depbjs -i target.js -o target.proto

Example

pbjs -t commonjs tests/test.proto -o tests/test.js
depbjs -i tests/test.js -o tests/output.proto

test.proto

// test.proto
package testPackage;
syntax = "proto3";
message SubMsg{
    int32 testSubmsg=1;
};
message TestMessage {
  string test_field = 1;
  int32 i32 = 3;
  int64 i64 = 2;
  string str = 4;
  float f32 = 5;
  SubMsg msg=7;
  uint32 u32x = 6;
}

enum TestEnum{
  Key=1;
  E2=20;
  XX=3;
}

output.proto

// 
// This file is decompiled by depbjs v0.0.1.
// source: ./tests/test.js
// 

package testPackage;

message SubMsg {
    int32 testSubmsg = 1;
};

message TestMessage {
    string testField = 1;
    int32 i32 = 3;
    int64 i64 = 2;
    string str = 4;
    float f32 = 5;
    SubMsg msg = 7;
    uint32 u32x = 6;
};

enum TestEnum {
    Key = 1;
    E2 = 20;
    XX = 3;
};

License

MIT License.

Package Sidebar

Install

npm i depbjs

Weekly Downloads

2

Version

1.0.9

License

MIT

Unpacked Size

85.3 kB

Total Files

20

Last publish

Collaborators

  • system233