@streamr/trackerless-network 103.3.1 → 103.3.2
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/exports.cjs +1 -1
- package/dist/exports.d.ts +47 -103
- package/dist/exports.js +1 -1
- package/package.json +5 -5
package/dist/exports.cjs
CHANGED
package/dist/exports.d.ts
CHANGED
|
@@ -75,129 +75,73 @@ declare class Any$Type extends MessageType<Any> {
|
|
|
75
75
|
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
76
76
|
* URL that describes the type of the serialized message.
|
|
77
77
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
78
|
+
* In its binary encoding, an `Any` is an ordinary message; but in other wire
|
|
79
|
+
* forms like JSON, it has a special encoding. The format of the type URL is
|
|
80
|
+
* described on the `type_url` field.
|
|
80
81
|
*
|
|
81
|
-
*
|
|
82
|
+
* Protobuf APIs provide utilities to interact with `Any` values:
|
|
82
83
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* Example 2: Pack and unpack a message in Java.
|
|
92
|
-
*
|
|
93
|
-
* Foo foo = ...;
|
|
94
|
-
* Any any = Any.pack(foo);
|
|
95
|
-
* ...
|
|
96
|
-
* if (any.is(Foo.class)) {
|
|
97
|
-
* foo = any.unpack(Foo.class);
|
|
98
|
-
* }
|
|
99
|
-
* // or ...
|
|
100
|
-
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
|
101
|
-
* foo = any.unpack(Foo.getDefaultInstance());
|
|
102
|
-
* }
|
|
103
|
-
*
|
|
104
|
-
* Example 3: Pack and unpack a message in Python.
|
|
105
|
-
*
|
|
106
|
-
* foo = Foo(...)
|
|
107
|
-
* any = Any()
|
|
108
|
-
* any.Pack(foo)
|
|
109
|
-
* ...
|
|
110
|
-
* if any.Is(Foo.DESCRIPTOR):
|
|
111
|
-
* any.Unpack(foo)
|
|
112
|
-
* ...
|
|
113
|
-
*
|
|
114
|
-
* Example 4: Pack and unpack a message in Go
|
|
84
|
+
* - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
|
|
85
|
+
* around it.
|
|
86
|
+
* - An 'unpack' operation reads the content of an `Any` message, either into an
|
|
87
|
+
* existing message or a new one. Unpack operations must check the type of the
|
|
88
|
+
* value they unpack against the declared `type_url`.
|
|
89
|
+
* - An 'is' operation decides whether an `Any` contains a message of the given
|
|
90
|
+
* type, i.e. whether it can 'unpack' that type.
|
|
115
91
|
*
|
|
116
|
-
*
|
|
117
|
-
* any, err := anypb.New(foo)
|
|
118
|
-
* if err != nil {
|
|
119
|
-
* ...
|
|
120
|
-
* }
|
|
121
|
-
* ...
|
|
122
|
-
* foo := &pb.Foo{}
|
|
123
|
-
* if err := any.UnmarshalTo(foo); err != nil {
|
|
124
|
-
* ...
|
|
125
|
-
* }
|
|
92
|
+
* The JSON format representation of an `Any` follows one of these cases:
|
|
126
93
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* JSON
|
|
134
|
-
* ====
|
|
135
|
-
* The JSON representation of an `Any` value uses the regular
|
|
136
|
-
* representation of the deserialized, embedded message, with an
|
|
137
|
-
* additional field `@type` which contains the type URL. Example:
|
|
138
|
-
*
|
|
139
|
-
* package google.profile;
|
|
140
|
-
* message Person {
|
|
141
|
-
* string first_name = 1;
|
|
142
|
-
* string last_name = 2;
|
|
143
|
-
* }
|
|
144
|
-
*
|
|
145
|
-
* {
|
|
146
|
-
* "@type": "type.googleapis.com/google.profile.Person",
|
|
147
|
-
* "firstName": <string>,
|
|
148
|
-
* "lastName": <string>
|
|
149
|
-
* }
|
|
150
|
-
*
|
|
151
|
-
* If the embedded message type is well-known and has a custom JSON
|
|
152
|
-
* representation, that representation will be embedded adding a field
|
|
153
|
-
* `value` which holds the custom JSON in addition to the `@type`
|
|
154
|
-
* field. Example (for message [google.protobuf.Duration][]):
|
|
155
|
-
*
|
|
156
|
-
* {
|
|
157
|
-
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
158
|
-
* "value": "1.212s"
|
|
159
|
-
* }
|
|
94
|
+
* - For types without special-cased JSON encodings, the JSON format
|
|
95
|
+
* representation of the `Any` is the same as that of the message, with an
|
|
96
|
+
* additional `@type` field which contains the type URL.
|
|
97
|
+
* - For types with special-cased JSON encodings (typically called 'well-known'
|
|
98
|
+
* types, listed in https://protobuf.dev/programming-guides/json/#any), the
|
|
99
|
+
* JSON format representation has a key `@type` which contains the type URL
|
|
100
|
+
* and a key `value` which contains the JSON-serialized value.
|
|
160
101
|
*
|
|
102
|
+
* The text format representation of an `Any` is like a message with one field
|
|
103
|
+
* whose name is the type URL in brackets. For example, an `Any` containing a
|
|
104
|
+
* `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
|
|
161
105
|
*
|
|
162
106
|
* @generated from protobuf message google.protobuf.Any
|
|
163
107
|
*/
|
|
164
108
|
interface Any {
|
|
165
109
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* one "/" character. The last segment of the URL's path must represent
|
|
169
|
-
* the fully qualified name of the type (as in
|
|
170
|
-
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
171
|
-
* (e.g., leading "." is not accepted).
|
|
110
|
+
* Identifies the type of the serialized Protobuf message with a URI reference
|
|
111
|
+
* consisting of a prefix ending in a slash and the fully-qualified type name.
|
|
172
112
|
*
|
|
173
|
-
*
|
|
174
|
-
* expect it to use in the context of Any. However, for URLs which use the
|
|
175
|
-
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
176
|
-
* server that maps type URLs to message definitions as follows:
|
|
113
|
+
* Example: type.googleapis.com/google.protobuf.StringValue
|
|
177
114
|
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* URL, or have them precompiled into a binary to avoid any
|
|
183
|
-
* lookup. Therefore, binary compatibility needs to be preserved
|
|
184
|
-
* on changes to types. (Use versioned type names to manage
|
|
185
|
-
* breaking changes.)
|
|
115
|
+
* This string must contain at least one `/` character, and the content after
|
|
116
|
+
* the last `/` must be the fully-qualified name of the type in canonical
|
|
117
|
+
* form, without a leading dot. Do not write a scheme on these URI references
|
|
118
|
+
* so that clients do not attempt to contact them.
|
|
186
119
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* type.googleapis.com
|
|
190
|
-
* implementations
|
|
120
|
+
* The prefix is arbitrary and Protobuf implementations are expected to
|
|
121
|
+
* simply strip off everything up to and including the last `/` to identify
|
|
122
|
+
* the type. `type.googleapis.com/` is a common default prefix that some
|
|
123
|
+
* legacy implementations require. This prefix does not indicate the origin of
|
|
124
|
+
* the type, and URIs containing it are not expected to respond to any
|
|
125
|
+
* requests.
|
|
191
126
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
127
|
+
* All type URL strings must be legal URI references with the additional
|
|
128
|
+
* restriction (for the text format) that the content of the reference
|
|
129
|
+
* must consist only of alphanumeric characters, percent-encoded escapes, and
|
|
130
|
+
* characters in the following set (not including the outer backticks):
|
|
131
|
+
* `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
|
|
132
|
+
* should not unescape them to prevent confusion with existing parsers. For
|
|
133
|
+
* example, `type.googleapis.com%2FFoo` should be rejected.
|
|
194
134
|
*
|
|
135
|
+
* In the original design of `Any`, the possibility of launching a type
|
|
136
|
+
* resolution service at these type URLs was considered but Protobuf never
|
|
137
|
+
* implemented one and considers contacting these URLs to be problematic and
|
|
138
|
+
* a potential security issue. Do not attempt to contact type URLs.
|
|
195
139
|
*
|
|
196
140
|
* @generated from protobuf field: string type_url = 1
|
|
197
141
|
*/
|
|
198
142
|
typeUrl: string;
|
|
199
143
|
/**
|
|
200
|
-
*
|
|
144
|
+
* Holds a Protobuf serialization of the type described by type_url.
|
|
201
145
|
*
|
|
202
146
|
* @generated from protobuf field: bytes value = 2
|
|
203
147
|
*/
|
package/dist/exports.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/trackerless-network",
|
|
3
|
-
"version": "103.3.
|
|
3
|
+
"version": "103.3.2",
|
|
4
4
|
"description": "Minimal and extendable implementation of the Streamr Network node.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@protobuf-ts/runtime": "^2.8.2",
|
|
39
39
|
"@protobuf-ts/runtime-rpc": "^2.8.2",
|
|
40
|
-
"@streamr/dht": "103.3.
|
|
41
|
-
"@streamr/proto-rpc": "103.3.
|
|
42
|
-
"@streamr/utils": "103.3.
|
|
40
|
+
"@streamr/dht": "103.3.2",
|
|
41
|
+
"@streamr/proto-rpc": "103.3.2",
|
|
42
|
+
"@streamr/utils": "103.3.2",
|
|
43
43
|
"eventemitter3": "^5.0.0",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"ts-essentials": "^10.1.1",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@rollup/plugin-json": "^6.1.0",
|
|
51
51
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
52
52
|
"@streamr/browser-test-runner": "^0.0.1",
|
|
53
|
-
"@streamr/test-utils": "103.3.
|
|
53
|
+
"@streamr/test-utils": "103.3.2",
|
|
54
54
|
"@types/lodash": "^4.17.21",
|
|
55
55
|
"@types/yallist": "^5.0.0",
|
|
56
56
|
"expect": "^30.0.5",
|