@@ -31,21 +31,22 @@ exports.main = function main(args, callback) {
31
31
lint : "l"
32
32
} ,
33
33
string : [ "target" , "out" , "path" , "wrap" , "root" , "lint" ] ,
34
- boolean : [ "keep-case" , "create" , "encode" , "decode" , "verify" , "convert" , "delimited" , "beautify" , "comments" , "es6" , "sparse" , "strict-long" ] ,
34
+ boolean : [ "keep-case" , "create" , "encode" , "decode" , "verify" , "convert" , "delimited" , "beautify" , "comments" , "es6" , "sparse" , "strict-long" , "strict-message" ] ,
35
35
default : {
36
- target : "json" ,
37
- create : true ,
38
- encode : true ,
39
- decode : true ,
40
- verify : true ,
41
- convert : true ,
42
- delimited : true ,
43
- beautify : true ,
44
- comments : true ,
45
- es6 : null ,
46
- lint : lintDefault ,
47
- "keep-case" : false ,
48
- "strict-long" : false
36
+ target : "json" ,
37
+ create : true ,
38
+ encode : true ,
39
+ decode : true ,
40
+ verify : true ,
41
+ convert : true ,
42
+ delimited : true ,
43
+ beautify : true ,
44
+ comments : true ,
45
+ es6 : null ,
46
+ lint : lintDefault ,
47
+ "keep-case" : false ,
48
+ "strict-long" : false ,
49
+ "strict-message" : false
49
50
}
50
51
} ) ;
51
52
@@ -68,48 +69,49 @@ exports.main = function main(args, callback) {
68
69
"" ,
69
70
chalk . bold . white ( "Translates between file formats and generates static code." ) ,
70
71
"" ,
71
- " -t, --target Specifies the target format. Also accepts a path to require a custom target." ,
72
+ " -t, --target Specifies the target format. Also accepts a path to require a custom target." ,
72
73
"" ,
73
74
descs . join ( "\n" ) ,
74
75
"" ,
75
- " -p, --path Adds a directory to the include path." ,
76
+ " -p, --path Adds a directory to the include path." ,
76
77
"" ,
77
- " -o, --out Saves to a file instead of writing to stdout." ,
78
+ " -o, --out Saves to a file instead of writing to stdout." ,
78
79
"" ,
79
- " --sparse Exports only those types referenced from a main file (experimental)." ,
80
+ " --sparse Exports only those types referenced from a main file (experimental)." ,
80
81
"" ,
81
- chalk . bold . gray ( " Module targets only:" ) ,
82
+ chalk . bold . gray ( " Module targets only:" ) ,
82
83
"" ,
83
- " -w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper." ,
84
+ " -w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper." ,
84
85
"" ,
85
- " default Default wrapper supporting both CommonJS and AMD" ,
86
- " commonjs CommonJS wrapper" ,
87
- " amd AMD wrapper" ,
88
- " es6 ES6 wrapper (implies --es6)" ,
86
+ " default Default wrapper supporting both CommonJS and AMD" ,
87
+ " commonjs CommonJS wrapper" ,
88
+ " amd AMD wrapper" ,
89
+ " es6 ES6 wrapper (implies --es6)" ,
89
90
"" ,
90
- " -r, --root Specifies an alternative protobuf.roots name." ,
91
+ " -r, --root Specifies an alternative protobuf.roots name." ,
91
92
"" ,
92
- " -l, --lint Linter configuration. Defaults to protobuf.js-compatible rules:" ,
93
+ " -l, --lint Linter configuration. Defaults to protobuf.js-compatible rules:" ,
93
94
"" ,
94
- " " + lintDefault ,
95
+ " " + lintDefault ,
95
96
"" ,
96
- " --es6 Enables ES6 syntax (const/let instead of var)" ,
97
+ " --es6 Enables ES6 syntax (const/let instead of var)" ,
97
98
"" ,
98
- chalk . bold . gray ( " Proto sources only:" ) ,
99
+ chalk . bold . gray ( " Proto sources only:" ) ,
99
100
"" ,
100
- " --keep-case Keeps field casing instead of converting to camel case." ,
101
+ " --keep-case Keeps field casing instead of converting to camel case." ,
101
102
"" ,
102
- chalk . bold . gray ( " Static targets only:" ) ,
103
+ chalk . bold . gray ( " Static targets only:" ) ,
103
104
"" ,
104
- " --no-create Does not generate create functions used for reflection compatibility." ,
105
- " --no-encode Does not generate encode functions." ,
106
- " --no-decode Does not generate decode functions." ,
107
- " --no-verify Does not generate verify functions." ,
108
- " --no-convert Does not generate convert functions like from/toObject" ,
109
- " --no-delimited Does not generate delimited encode/decode functions." ,
110
- " --no-beautify Does not beautify generated code." ,
111
- " --no-comments Does not output any JSDoc comments." ,
112
- " --strict-long Forces s-/u-/int64 and s-/fixed64 types to 'Long' only (no numbers)." ,
105
+ " --no-create Does not generate create functions used for reflection compatibility." ,
106
+ " --no-encode Does not generate encode functions." ,
107
+ " --no-decode Does not generate decode functions." ,
108
+ " --no-verify Does not generate verify functions." ,
109
+ " --no-convert Does not generate convert functions like from/toObject" ,
110
+ " --no-delimited Does not generate delimited encode/decode functions." ,
111
+ " --no-beautify Does not beautify generated code." ,
112
+ " --no-comments Does not output any JSDoc comments." ,
113
+ " --strict-long Forces s-/u-/int64 and s-/fixed64 types to 'Long' only (no numbers)." ,
114
+ " --strict-message Forces message types to actual instances (no plain objects)." ,
113
115
"" ,
114
116
"usage: " + chalk . bold . green ( "pbjs" ) + " [options] file1.proto file2.json ..." + chalk . gray ( " (or) " ) + "other | " + chalk . bold . green ( "pbjs" ) + " [options] -" ,
115
117
""
0 commit comments