protobufjs 7.3.2 → 7.4.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/LICENSE +39 -39
- package/README.md +727 -727
- package/dist/light/protobuf.js +6259 -6259
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +2 -2
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +1930 -1930
- package/dist/minimal/protobuf.js.map +1 -1
- package/dist/minimal/protobuf.min.js +2 -2
- package/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/protobuf.js +7972 -7968
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/ext/debug/README.md +4 -4
- package/ext/debug/index.js +71 -71
- package/ext/descriptor/README.md +72 -72
- package/ext/descriptor/index.d.ts +191 -191
- package/ext/descriptor/index.js +1052 -1052
- package/ext/descriptor/test.js +54 -54
- package/google/LICENSE +27 -27
- package/google/README.md +1 -1
- package/google/api/annotations.json +82 -82
- package/google/api/annotations.proto +10 -10
- package/google/api/http.json +85 -85
- package/google/api/http.proto +30 -30
- package/google/protobuf/api.json +117 -117
- package/google/protobuf/api.proto +33 -33
- package/google/protobuf/descriptor.json +738 -738
- package/google/protobuf/descriptor.proto +286 -286
- package/google/protobuf/source_context.json +19 -19
- package/google/protobuf/source_context.proto +7 -7
- package/google/protobuf/type.json +201 -201
- package/google/protobuf/type.proto +89 -89
- package/index.d.ts +2741 -2741
- package/index.js +4 -4
- package/light.d.ts +2 -2
- package/light.js +3 -3
- package/minimal.d.ts +2 -2
- package/minimal.js +4 -4
- package/package.json +112 -111
- package/scripts/postinstall.js +32 -32
- package/src/common.js +399 -399
- package/src/converter.js +301 -301
- package/src/decoder.js +129 -129
- package/src/encoder.js +100 -100
- package/src/enum.js +198 -198
- package/src/field.js +377 -377
- package/src/index-light.js +104 -104
- package/src/index-minimal.js +36 -36
- package/src/index.js +12 -12
- package/src/mapfield.js +126 -126
- package/src/message.js +138 -138
- package/src/method.js +160 -160
- package/src/namespace.js +433 -433
- package/src/object.js +243 -243
- package/src/oneof.js +203 -203
- package/src/parse.js +893 -889
- package/src/reader.js +416 -416
- package/src/reader_buffer.js +51 -51
- package/src/root.js +368 -368
- package/src/roots.js +18 -18
- package/src/rpc/service.js +142 -142
- package/src/rpc.js +36 -36
- package/src/service.js +167 -167
- package/src/tokenize.js +416 -416
- package/src/type.js +589 -589
- package/src/types.js +196 -196
- package/src/typescript.jsdoc +15 -15
- package/src/util/longbits.js +200 -200
- package/src/util/minimal.js +438 -438
- package/src/util.js +212 -212
- package/src/verifier.js +176 -176
- package/src/wrappers.js +102 -102
- package/src/writer.js +465 -465
- package/src/writer_buffer.js +85 -85
- package/tsconfig.json +7 -7
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// full library entry point.
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
module.exports = require("./src/index");
|
|
1
|
+
// full library entry point.
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
module.exports = require("./src/index");
|
package/light.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export as namespace protobuf;
|
|
2
|
-
export * from "./index";
|
|
1
|
+
export as namespace protobuf;
|
|
2
|
+
export * from "./index";
|
package/light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// light library entry point.
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
1
|
+
// light library entry point.
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
4
|
module.exports = require("./src/index-light");
|
package/minimal.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export as namespace protobuf;
|
|
2
|
-
export * from "./index";
|
|
1
|
+
export as namespace protobuf;
|
|
2
|
+
export * from "./index";
|
package/minimal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// minimal library entry point.
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
module.exports = require("./src/index-minimal");
|
|
1
|
+
// minimal library entry point.
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
module.exports = require("./src/index-minimal");
|
package/package.json
CHANGED
|
@@ -1,111 +1,112 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "protobufjs",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"versionScheme": "~",
|
|
5
|
-
"description": "Protocol Buffers for JavaScript (& TypeScript).",
|
|
6
|
-
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
|
|
7
|
-
"license": "BSD-3-Clause",
|
|
8
|
-
"repository": "protobufjs/protobuf.js",
|
|
9
|
-
"bugs": "https://github.com/protobufjs/protobuf.js/issues",
|
|
10
|
-
"homepage": "https://protobufjs.github.io/protobuf.js/",
|
|
11
|
-
"engines": {
|
|
12
|
-
"node": ">=12.0.0"
|
|
13
|
-
},
|
|
14
|
-
"eslintConfig": {
|
|
15
|
-
"env": {
|
|
16
|
-
"es6": true
|
|
17
|
-
},
|
|
18
|
-
"parserOptions": {
|
|
19
|
-
"ecmaVersion": 6
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"keywords": [
|
|
23
|
-
"protobuf",
|
|
24
|
-
"protocol-buffers",
|
|
25
|
-
"serialization",
|
|
26
|
-
"typescript"
|
|
27
|
-
],
|
|
28
|
-
"main": "index.js",
|
|
29
|
-
"types": "index.d.ts",
|
|
30
|
-
"scripts": {
|
|
31
|
-
"bench": "node bench",
|
|
32
|
-
"build": "npm run build:bundle && npm run build:types",
|
|
33
|
-
"build:bundle": "gulp --gulpfile scripts/gulpfile.js",
|
|
34
|
-
"build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
|
|
35
|
-
"changelog": "node scripts/changelog -w",
|
|
36
|
-
"coverage": "nyc tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
|
|
37
|
-
"docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
|
|
38
|
-
"lint": "npm run lint:sources && npm run lint:types",
|
|
39
|
-
"lint:sources": "eslint \"**/*.js\" -c config/eslint.json",
|
|
40
|
-
"lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json",
|
|
41
|
-
"pages": "node scripts/pages",
|
|
42
|
-
"prepublish": "cd cli && npm install && cd .. && npm run build",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"test
|
|
47
|
-
"test:
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"@protobufjs/
|
|
53
|
-
"@protobufjs/
|
|
54
|
-
"@protobufjs/
|
|
55
|
-
"@protobufjs/
|
|
56
|
-
"@protobufjs/
|
|
57
|
-
"@protobufjs/
|
|
58
|
-
"@protobufjs/
|
|
59
|
-
"@protobufjs/
|
|
60
|
-
"@protobufjs/
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"browserify
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"git-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"gulp
|
|
80
|
-
"gulp-
|
|
81
|
-
"gulp-
|
|
82
|
-
"gulp-
|
|
83
|
-
"
|
|
84
|
-
"jsdoc": "
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"vinyl-
|
|
94
|
-
"vinyl-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"index.
|
|
99
|
-
"
|
|
100
|
-
"light.
|
|
101
|
-
"
|
|
102
|
-
"minimal.
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "protobufjs",
|
|
3
|
+
"version": "7.4.0",
|
|
4
|
+
"versionScheme": "~",
|
|
5
|
+
"description": "Protocol Buffers for JavaScript (& TypeScript).",
|
|
6
|
+
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
|
|
7
|
+
"license": "BSD-3-Clause",
|
|
8
|
+
"repository": "protobufjs/protobuf.js",
|
|
9
|
+
"bugs": "https://github.com/protobufjs/protobuf.js/issues",
|
|
10
|
+
"homepage": "https://protobufjs.github.io/protobuf.js/",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=12.0.0"
|
|
13
|
+
},
|
|
14
|
+
"eslintConfig": {
|
|
15
|
+
"env": {
|
|
16
|
+
"es6": true
|
|
17
|
+
},
|
|
18
|
+
"parserOptions": {
|
|
19
|
+
"ecmaVersion": 6
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"protobuf",
|
|
24
|
+
"protocol-buffers",
|
|
25
|
+
"serialization",
|
|
26
|
+
"typescript"
|
|
27
|
+
],
|
|
28
|
+
"main": "index.js",
|
|
29
|
+
"types": "index.d.ts",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"bench": "node bench",
|
|
32
|
+
"build": "npm run build:bundle && npm run build:types",
|
|
33
|
+
"build:bundle": "gulp --gulpfile scripts/gulpfile.js",
|
|
34
|
+
"build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
|
|
35
|
+
"changelog": "node scripts/changelog -w",
|
|
36
|
+
"coverage": "nyc tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
|
|
37
|
+
"docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
|
|
38
|
+
"lint": "npm run lint:sources && npm run lint:types",
|
|
39
|
+
"lint:sources": "eslint \"**/*.js\" -c config/eslint.json",
|
|
40
|
+
"lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json",
|
|
41
|
+
"pages": "node scripts/pages",
|
|
42
|
+
"prepublish": "cd cli && npm install && cd .. && npm run build",
|
|
43
|
+
"prepublishOnly": "cd cli && npm install && cd .. && npm run build",
|
|
44
|
+
"postinstall": "node scripts/postinstall",
|
|
45
|
+
"prof": "node bench/prof",
|
|
46
|
+
"test": "npm run test:sources && npm run test:types",
|
|
47
|
+
"test:sources": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
|
|
48
|
+
"test:types": "tsc tests/comp_typescript.ts --lib es2015 --esModuleInterop --strictNullChecks --experimentalDecorators --emitDecoratorMetadata && tsc tests/data/test.js.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks && tsc tests/data/*.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks",
|
|
49
|
+
"make": "npm run lint:sources && npm run build && npm run lint:types && node ./scripts/gentests.js && npm test"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@protobufjs/aspromise": "^1.1.2",
|
|
53
|
+
"@protobufjs/base64": "^1.1.2",
|
|
54
|
+
"@protobufjs/codegen": "^2.0.4",
|
|
55
|
+
"@protobufjs/eventemitter": "^1.1.0",
|
|
56
|
+
"@protobufjs/fetch": "^1.1.0",
|
|
57
|
+
"@protobufjs/float": "^1.0.2",
|
|
58
|
+
"@protobufjs/inquire": "^1.1.0",
|
|
59
|
+
"@protobufjs/path": "^1.1.2",
|
|
60
|
+
"@protobufjs/pool": "^1.1.0",
|
|
61
|
+
"@protobufjs/utf8": "^1.1.0",
|
|
62
|
+
"@types/node": ">=13.7.0",
|
|
63
|
+
"long": "^5.0.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"benchmark": "^2.1.4",
|
|
67
|
+
"browserify": "^17.0.0",
|
|
68
|
+
"browserify-wrap": "^1.0.2",
|
|
69
|
+
"bundle-collapser": "^1.3.0",
|
|
70
|
+
"chalk": "^4.0.0",
|
|
71
|
+
"escodegen": "^1.13.0",
|
|
72
|
+
"eslint": "^8.15.0",
|
|
73
|
+
"espree": "^9.0.0",
|
|
74
|
+
"estraverse": "^5.1.0",
|
|
75
|
+
"gh-pages": "^4.0.0",
|
|
76
|
+
"git-raw-commits": "^2.0.3",
|
|
77
|
+
"git-semver-tags": "^4.0.0",
|
|
78
|
+
"google-protobuf": "^3.11.3",
|
|
79
|
+
"gulp": "^4.0.2",
|
|
80
|
+
"gulp-header": "^2.0.9",
|
|
81
|
+
"gulp-if": "^3.0.0",
|
|
82
|
+
"gulp-sourcemaps": "^3.0.0",
|
|
83
|
+
"gulp-uglify": "^3.0.2",
|
|
84
|
+
"jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc",
|
|
85
|
+
"jsdoc": "^4.0.0",
|
|
86
|
+
"minimist": "^1.2.0",
|
|
87
|
+
"nyc": "^15.0.0",
|
|
88
|
+
"reflect-metadata": "^0.1.13",
|
|
89
|
+
"tape": "^5.0.0",
|
|
90
|
+
"tslint": "^6.0.0",
|
|
91
|
+
"typescript": "^3.7.5",
|
|
92
|
+
"uglify-js": "^3.7.7",
|
|
93
|
+
"vinyl-buffer": "^1.0.1",
|
|
94
|
+
"vinyl-fs": "^3.0.3",
|
|
95
|
+
"vinyl-source-stream": "^2.0.0"
|
|
96
|
+
},
|
|
97
|
+
"files": [
|
|
98
|
+
"index.js",
|
|
99
|
+
"index.d.ts",
|
|
100
|
+
"light.d.ts",
|
|
101
|
+
"light.js",
|
|
102
|
+
"minimal.d.ts",
|
|
103
|
+
"minimal.js",
|
|
104
|
+
"package-lock.json",
|
|
105
|
+
"tsconfig.json",
|
|
106
|
+
"scripts/postinstall.js",
|
|
107
|
+
"dist/**",
|
|
108
|
+
"ext/**",
|
|
109
|
+
"google/**",
|
|
110
|
+
"src/**"
|
|
111
|
+
]
|
|
112
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var path = require("path"),
|
|
4
|
-
fs = require("fs"),
|
|
5
|
-
pkg = require(path.join(__dirname, "..", "package.json"));
|
|
6
|
-
|
|
7
|
-
// check version scheme used by dependents
|
|
8
|
-
if (!pkg.versionScheme)
|
|
9
|
-
return;
|
|
10
|
-
|
|
11
|
-
var warn = process.stderr.isTTY
|
|
12
|
-
? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
|
|
13
|
-
: "WARN " + path.basename(process.argv[1], ".js");
|
|
14
|
-
|
|
15
|
-
var basePkg;
|
|
16
|
-
try {
|
|
17
|
-
basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json")));
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
"dependencies",
|
|
24
|
-
"devDependencies",
|
|
25
|
-
"optionalDependencies",
|
|
26
|
-
"peerDependencies"
|
|
27
|
-
]
|
|
28
|
-
.forEach(function(check) {
|
|
29
|
-
var version = basePkg && basePkg[check] && basePkg[check][pkg.name];
|
|
30
|
-
if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme)
|
|
31
|
-
process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n");
|
|
32
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var path = require("path"),
|
|
4
|
+
fs = require("fs"),
|
|
5
|
+
pkg = require(path.join(__dirname, "..", "package.json"));
|
|
6
|
+
|
|
7
|
+
// check version scheme used by dependents
|
|
8
|
+
if (!pkg.versionScheme)
|
|
9
|
+
return;
|
|
10
|
+
|
|
11
|
+
var warn = process.stderr.isTTY
|
|
12
|
+
? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
|
|
13
|
+
: "WARN " + path.basename(process.argv[1], ".js");
|
|
14
|
+
|
|
15
|
+
var basePkg;
|
|
16
|
+
try {
|
|
17
|
+
basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json")));
|
|
18
|
+
} catch (e) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[
|
|
23
|
+
"dependencies",
|
|
24
|
+
"devDependencies",
|
|
25
|
+
"optionalDependencies",
|
|
26
|
+
"peerDependencies"
|
|
27
|
+
]
|
|
28
|
+
.forEach(function(check) {
|
|
29
|
+
var version = basePkg && basePkg[check] && basePkg[check][pkg.name];
|
|
30
|
+
if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme)
|
|
31
|
+
process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n");
|
|
32
|
+
});
|