@streamr/trackerless-network 103.1.2 → 103.2.0-experiment.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.
Files changed (172) hide show
  1. package/dist/exports.cjs +4489 -0
  2. package/dist/exports.cjs.map +1 -0
  3. package/dist/exports.d.ts +1391 -0
  4. package/dist/exports.js +4477 -0
  5. package/dist/exports.js.map +1 -0
  6. package/package.json +25 -18
  7. package/dist/generated/google/protobuf/any.d.ts +0 -180
  8. package/dist/generated/google/protobuf/any.js +0 -155
  9. package/dist/generated/google/protobuf/any.js.map +0 -1
  10. package/dist/generated/google/protobuf/empty.d.ts +0 -31
  11. package/dist/generated/google/protobuf/empty.js +0 -45
  12. package/dist/generated/google/protobuf/empty.js.map +0 -1
  13. package/dist/generated/google/protobuf/timestamp.d.ts +0 -156
  14. package/dist/generated/google/protobuf/timestamp.js +0 -136
  15. package/dist/generated/google/protobuf/timestamp.js.map +0 -1
  16. package/dist/generated/packages/dht/protos/DhtRpc.client.d.ts +0 -371
  17. package/dist/generated/packages/dht/protos/DhtRpc.client.js +0 -292
  18. package/dist/generated/packages/dht/protos/DhtRpc.client.js.map +0 -1
  19. package/dist/generated/packages/dht/protos/DhtRpc.d.ts +0 -1031
  20. package/dist/generated/packages/dht/protos/DhtRpc.js +0 -702
  21. package/dist/generated/packages/dht/protos/DhtRpc.js.map +0 -1
  22. package/dist/generated/packages/dht/protos/DhtRpc.server.d.ts +0 -168
  23. package/dist/generated/packages/dht/protos/DhtRpc.server.js +0 -3
  24. package/dist/generated/packages/dht/protos/DhtRpc.server.js.map +0 -1
  25. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.d.ts +0 -87
  26. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js +0 -66
  27. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js.map +0 -1
  28. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.client.d.ts +0 -237
  29. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.client.js +0 -190
  30. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.client.js.map +0 -1
  31. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.d.ts +0 -687
  32. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.js +0 -479
  33. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.js.map +0 -1
  34. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.server.d.ts +0 -102
  35. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.server.js +0 -3
  36. package/dist/generated/packages/trackerless-network/protos/NetworkRpc.server.js.map +0 -1
  37. package/dist/package.json +0 -56
  38. package/dist/src/ContentDeliveryManager.d.ts +0 -82
  39. package/dist/src/ContentDeliveryManager.js +0 -325
  40. package/dist/src/ContentDeliveryManager.js.map +0 -1
  41. package/dist/src/NetworkNode.d.ts +0 -44
  42. package/dist/src/NetworkNode.js +0 -98
  43. package/dist/src/NetworkNode.js.map +0 -1
  44. package/dist/src/NetworkStack.d.ts +0 -36
  45. package/dist/src/NetworkStack.js +0 -165
  46. package/dist/src/NetworkStack.js.map +0 -1
  47. package/dist/src/NodeInfoClient.d.ts +0 -9
  48. package/dist/src/NodeInfoClient.js +0 -21
  49. package/dist/src/NodeInfoClient.js.map +0 -1
  50. package/dist/src/NodeInfoRpcLocal.d.ts +0 -12
  51. package/dist/src/NodeInfoRpcLocal.js +0 -22
  52. package/dist/src/NodeInfoRpcLocal.js.map +0 -1
  53. package/dist/src/NodeInfoRpcRemote.d.ts +0 -6
  54. package/dist/src/NodeInfoRpcRemote.js +0 -11
  55. package/dist/src/NodeInfoRpcRemote.js.map +0 -1
  56. package/dist/src/StreamPartNetworkSplitAvoidance.d.ts +0 -18
  57. package/dist/src/StreamPartNetworkSplitAvoidance.js +0 -74
  58. package/dist/src/StreamPartNetworkSplitAvoidance.js.map +0 -1
  59. package/dist/src/StreamPartReconnect.d.ts +0 -11
  60. package/dist/src/StreamPartReconnect.js +0 -37
  61. package/dist/src/StreamPartReconnect.js.map +0 -1
  62. package/dist/src/content-delivery-layer/ContentDeliveryLayerNode.d.ts +0 -78
  63. package/dist/src/content-delivery-layer/ContentDeliveryLayerNode.js +0 -240
  64. package/dist/src/content-delivery-layer/ContentDeliveryLayerNode.js.map +0 -1
  65. package/dist/src/content-delivery-layer/ContentDeliveryRpcLocal.d.ts +0 -23
  66. package/dist/src/content-delivery-layer/ContentDeliveryRpcLocal.js +0 -40
  67. package/dist/src/content-delivery-layer/ContentDeliveryRpcLocal.js.map +0 -1
  68. package/dist/src/content-delivery-layer/ContentDeliveryRpcRemote.d.ts +0 -11
  69. package/dist/src/content-delivery-layer/ContentDeliveryRpcRemote.js +0 -38
  70. package/dist/src/content-delivery-layer/ContentDeliveryRpcRemote.js.map +0 -1
  71. package/dist/src/content-delivery-layer/DuplicateMessageDetector.d.ts +0 -55
  72. package/dist/src/content-delivery-layer/DuplicateMessageDetector.js +0 -159
  73. package/dist/src/content-delivery-layer/DuplicateMessageDetector.js.map +0 -1
  74. package/dist/src/content-delivery-layer/NodeList.d.ts +0 -26
  75. package/dist/src/content-delivery-layer/NodeList.js +0 -93
  76. package/dist/src/content-delivery-layer/NodeList.js.map +0 -1
  77. package/dist/src/content-delivery-layer/createContentDeliveryLayerNode.d.ts +0 -14
  78. package/dist/src/content-delivery-layer/createContentDeliveryLayerNode.js +0 -129
  79. package/dist/src/content-delivery-layer/createContentDeliveryLayerNode.js.map +0 -1
  80. package/dist/src/content-delivery-layer/formStreamPartDeliveryServiceId.d.ts +0 -3
  81. package/dist/src/content-delivery-layer/formStreamPartDeliveryServiceId.js +0 -9
  82. package/dist/src/content-delivery-layer/formStreamPartDeliveryServiceId.js.map +0 -1
  83. package/dist/src/content-delivery-layer/inspection/InspectSession.d.ts +0 -19
  84. package/dist/src/content-delivery-layer/inspection/InspectSession.js +0 -43
  85. package/dist/src/content-delivery-layer/inspection/InspectSession.js.map +0 -1
  86. package/dist/src/content-delivery-layer/inspection/Inspector.d.ts +0 -30
  87. package/dist/src/content-delivery-layer/inspection/Inspector.js +0 -75
  88. package/dist/src/content-delivery-layer/inspection/Inspector.js.map +0 -1
  89. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcLocal.d.ts +0 -29
  90. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcLocal.js +0 -106
  91. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcLocal.js.map +0 -1
  92. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcRemote.d.ts +0 -14
  93. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcRemote.js +0 -55
  94. package/dist/src/content-delivery-layer/neighbor-discovery/HandshakeRpcRemote.js.map +0 -1
  95. package/dist/src/content-delivery-layer/neighbor-discovery/Handshaker.d.ts +0 -32
  96. package/dist/src/content-delivery-layer/neighbor-discovery/Handshaker.js +0 -149
  97. package/dist/src/content-delivery-layer/neighbor-discovery/Handshaker.js.map +0 -1
  98. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborFinder.d.ts +0 -22
  99. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborFinder.js +0 -64
  100. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborFinder.js.map +0 -1
  101. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateManager.d.ts +0 -27
  102. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateManager.js +0 -47
  103. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateManager.js.map +0 -1
  104. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcLocal.d.ts +0 -25
  105. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcLocal.js +0 -52
  106. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcLocal.js.map +0 -1
  107. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcRemote.d.ts +0 -11
  108. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcRemote.js +0 -31
  109. package/dist/src/content-delivery-layer/neighbor-discovery/NeighborUpdateRpcRemote.js.map +0 -1
  110. package/dist/src/content-delivery-layer/plumtree/PausedNeighbors.d.ts +0 -12
  111. package/dist/src/content-delivery-layer/plumtree/PausedNeighbors.js +0 -50
  112. package/dist/src/content-delivery-layer/plumtree/PausedNeighbors.js.map +0 -1
  113. package/dist/src/content-delivery-layer/plumtree/PlumtreeManager.d.ts +0 -37
  114. package/dist/src/content-delivery-layer/plumtree/PlumtreeManager.js +0 -141
  115. package/dist/src/content-delivery-layer/plumtree/PlumtreeManager.js.map +0 -1
  116. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcLocal.d.ts +0 -20
  117. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcLocal.js +0 -37
  118. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcLocal.js.map +0 -1
  119. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcRemote.d.ts +0 -8
  120. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcRemote.js +0 -26
  121. package/dist/src/content-delivery-layer/plumtree/PlumtreeRpcRemote.js.map +0 -1
  122. package/dist/src/content-delivery-layer/propagation/FifoMapWithTTL.d.ts +0 -29
  123. package/dist/src/content-delivery-layer/propagation/FifoMapWithTTL.js +0 -93
  124. package/dist/src/content-delivery-layer/propagation/FifoMapWithTTL.js.map +0 -1
  125. package/dist/src/content-delivery-layer/propagation/Propagation.d.ts +0 -35
  126. package/dist/src/content-delivery-layer/propagation/Propagation.js +0 -68
  127. package/dist/src/content-delivery-layer/propagation/Propagation.js.map +0 -1
  128. package/dist/src/content-delivery-layer/propagation/PropagationTaskStore.d.ts +0 -22
  129. package/dist/src/content-delivery-layer/propagation/PropagationTaskStore.js +0 -33
  130. package/dist/src/content-delivery-layer/propagation/PropagationTaskStore.js.map +0 -1
  131. package/dist/src/content-delivery-layer/proxy/ProxyClient.d.ts +0 -46
  132. package/dist/src/content-delivery-layer/proxy/ProxyClient.js +0 -214
  133. package/dist/src/content-delivery-layer/proxy/ProxyClient.js.map +0 -1
  134. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcLocal.d.ts +0 -34
  135. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcLocal.js +0 -72
  136. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcLocal.js.map +0 -1
  137. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcRemote.d.ts +0 -7
  138. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcRemote.js +0 -27
  139. package/dist/src/content-delivery-layer/proxy/ProxyConnectionRpcRemote.js.map +0 -1
  140. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcLocal.d.ts +0 -26
  141. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcLocal.js +0 -45
  142. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcLocal.js.map +0 -1
  143. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcRemote.d.ts +0 -6
  144. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcRemote.js +0 -31
  145. package/dist/src/content-delivery-layer/temporary-connection/TemporaryConnectionRpcRemote.js.map +0 -1
  146. package/dist/src/control-layer/ControlLayerNode.d.ts +0 -16
  147. package/dist/src/control-layer/ControlLayerNode.js +0 -3
  148. package/dist/src/control-layer/ControlLayerNode.js.map +0 -1
  149. package/dist/src/control-layer/ExternalNetworkRpc.d.ts +0 -16
  150. package/dist/src/control-layer/ExternalNetworkRpc.js +0 -23
  151. package/dist/src/control-layer/ExternalNetworkRpc.js.map +0 -1
  152. package/dist/src/control-layer/PeerDescriptorStoreManager.d.ts +0 -28
  153. package/dist/src/control-layer/PeerDescriptorStoreManager.js +0 -78
  154. package/dist/src/control-layer/PeerDescriptorStoreManager.js.map +0 -1
  155. package/dist/src/discovery-layer/DiscoveryLayerNode.d.ts +0 -28
  156. package/dist/src/discovery-layer/DiscoveryLayerNode.js +0 -3
  157. package/dist/src/discovery-layer/DiscoveryLayerNode.js.map +0 -1
  158. package/dist/src/exports.d.ts +0 -6
  159. package/dist/src/exports.js +0 -24
  160. package/dist/src/exports.js.map +0 -1
  161. package/dist/src/types.d.ts +0 -6
  162. package/dist/src/types.js +0 -3
  163. package/dist/src/types.js.map +0 -1
  164. package/dist/src/utils.d.ts +0 -3
  165. package/dist/src/utils.js +0 -17
  166. package/dist/src/utils.js.map +0 -1
  167. package/dist/test/benchmark/first-message.d.ts +0 -1
  168. package/dist/test/benchmark/first-message.js +0 -139
  169. package/dist/test/benchmark/first-message.js.map +0 -1
  170. package/dist/test/utils/utils.d.ts +0 -15
  171. package/dist/test/utils/utils.js +0 -106
  172. package/dist/test/utils/utils.js.map +0 -1
package/package.json CHANGED
@@ -1,32 +1,33 @@
1
1
  {
2
2
  "name": "@streamr/trackerless-network",
3
- "version": "103.1.2",
3
+ "version": "103.2.0-experiment.0",
4
4
  "description": "Minimal and extendable implementation of the Streamr Network node.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/streamr-dev/network-monorepo.git",
8
8
  "directory": "packages/trackerless-network"
9
9
  },
10
- "main": "dist/src/exports.js",
11
- "types": "dist/src/exports.d.ts",
10
+ "main": "./dist/exports.cjs",
11
+ "module": "./dist/exports.js",
12
+ "types": "./dist/exports.d.ts",
12
13
  "files": [
13
- "dist",
14
+ "dist/exports.*",
14
15
  "!*.tsbuildinfo",
15
- "README.md",
16
- "LICENSE"
16
+ "README.md"
17
17
  ],
18
18
  "license": "STREAMR NETWORK OPEN SOURCE LICENSE",
19
19
  "author": "Streamr Network AG <contact@streamr.network>",
20
20
  "scripts": {
21
- "build": "tsc -b tsconfig.node.json",
22
- "build-browser": "webpack --mode=development --progress",
23
- "prebuild": "./proto.sh",
24
- "check": "tsc -p ./tsconfig.jest.json",
25
- "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true",
21
+ "prebuild": "npm run reset-self && ./proto.sh",
22
+ "build": "tsc -b",
23
+ "postbuild": "NODE_OPTIONS='--import tsx' rollup -c rollup.config.mts",
24
+ "check": "tsc -b tsconfig.jest.json",
25
+ "reset-self": "rimraf --glob 'dist/**/*.tsbuildinfo'",
26
+ "clean": "jest --clearCache --config '{}' || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true",
26
27
  "coverage": "jest --coverage",
27
28
  "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'",
28
29
  "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end",
29
- "test-browser": "karma start karma.config.js",
30
+ "test-browser": "karma start karma.config.ts",
30
31
  "test-unit": "jest test/unit",
31
32
  "test-integration": "jest --bail test/integration",
32
33
  "test-end-to-end": "jest --bail test/end-to-end",
@@ -36,9 +37,9 @@
36
37
  "dependencies": {
37
38
  "@protobuf-ts/runtime": "^2.8.2",
38
39
  "@protobuf-ts/runtime-rpc": "^2.8.2",
39
- "@streamr/dht": "103.1.2",
40
- "@streamr/proto-rpc": "103.1.2",
41
- "@streamr/utils": "103.1.2",
40
+ "@streamr/dht": "103.2.0-experiment.0",
41
+ "@streamr/proto-rpc": "103.2.0-experiment.0",
42
+ "@streamr/utils": "103.2.0-experiment.0",
42
43
  "eventemitter3": "^5.0.0",
43
44
  "lodash": "^4.17.21",
44
45
  "ts-essentials": "^10.1.1",
@@ -46,11 +47,17 @@
46
47
  "yallist": "^5.0.0"
47
48
  },
48
49
  "devDependencies": {
50
+ "@rollup/plugin-json": "^6.1.0",
51
+ "@rollup/plugin-node-resolve": "^16.0.3",
49
52
  "@streamr/browser-test-runner": "^0.0.1",
50
- "@streamr/test-utils": "103.1.2",
51
- "@types/lodash": "^4.17.20",
53
+ "@streamr/test-utils": "103.2.0-experiment.0",
54
+ "@types/lodash": "^4.17.21",
52
55
  "@types/yallist": "^5.0.0",
53
56
  "expect": "^30.0.5",
54
- "ts-node": "^10.9.2"
57
+ "rimraf": "^6.1.2",
58
+ "rollup": "^4.55.1",
59
+ "rollup-plugin-dts": "^6.3.0",
60
+ "ts-node": "^10.9.2",
61
+ "tsx": "^4.21.0"
55
62
  }
56
63
  }
@@ -1,180 +0,0 @@
1
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
- import type { IBinaryReader } from "@protobuf-ts/runtime";
4
- import type { PartialMessage } from "@protobuf-ts/runtime";
5
- import type { JsonValue } from "@protobuf-ts/runtime";
6
- import type { JsonReadOptions } from "@protobuf-ts/runtime";
7
- import type { JsonWriteOptions } from "@protobuf-ts/runtime";
8
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
- import type { IMessageType } from "@protobuf-ts/runtime";
10
- import { MessageType } from "@protobuf-ts/runtime";
11
- /**
12
- * `Any` contains an arbitrary serialized protocol buffer message along with a
13
- * URL that describes the type of the serialized message.
14
- *
15
- * Protobuf library provides support to pack/unpack Any values in the form
16
- * of utility functions or additional generated methods of the Any type.
17
- *
18
- * Example 1: Pack and unpack a message in C++.
19
- *
20
- * Foo foo = ...;
21
- * Any any;
22
- * any.PackFrom(foo);
23
- * ...
24
- * if (any.UnpackTo(&foo)) {
25
- * ...
26
- * }
27
- *
28
- * Example 2: Pack and unpack a message in Java.
29
- *
30
- * Foo foo = ...;
31
- * Any any = Any.pack(foo);
32
- * ...
33
- * if (any.is(Foo.class)) {
34
- * foo = any.unpack(Foo.class);
35
- * }
36
- * // or ...
37
- * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
38
- * foo = any.unpack(Foo.getDefaultInstance());
39
- * }
40
- *
41
- * Example 3: Pack and unpack a message in Python.
42
- *
43
- * foo = Foo(...)
44
- * any = Any()
45
- * any.Pack(foo)
46
- * ...
47
- * if any.Is(Foo.DESCRIPTOR):
48
- * any.Unpack(foo)
49
- * ...
50
- *
51
- * Example 4: Pack and unpack a message in Go
52
- *
53
- * foo := &pb.Foo{...}
54
- * any, err := anypb.New(foo)
55
- * if err != nil {
56
- * ...
57
- * }
58
- * ...
59
- * foo := &pb.Foo{}
60
- * if err := any.UnmarshalTo(foo); err != nil {
61
- * ...
62
- * }
63
- *
64
- * The pack methods provided by protobuf library will by default use
65
- * 'type.googleapis.com/full.type.name' as the type URL and the unpack
66
- * methods only use the fully qualified type name after the last '/'
67
- * in the type URL, for example "foo.bar.com/x/y.z" will yield type
68
- * name "y.z".
69
- *
70
- * JSON
71
- * ====
72
- * The JSON representation of an `Any` value uses the regular
73
- * representation of the deserialized, embedded message, with an
74
- * additional field `@type` which contains the type URL. Example:
75
- *
76
- * package google.profile;
77
- * message Person {
78
- * string first_name = 1;
79
- * string last_name = 2;
80
- * }
81
- *
82
- * {
83
- * "@type": "type.googleapis.com/google.profile.Person",
84
- * "firstName": <string>,
85
- * "lastName": <string>
86
- * }
87
- *
88
- * If the embedded message type is well-known and has a custom JSON
89
- * representation, that representation will be embedded adding a field
90
- * `value` which holds the custom JSON in addition to the `@type`
91
- * field. Example (for message [google.protobuf.Duration][]):
92
- *
93
- * {
94
- * "@type": "type.googleapis.com/google.protobuf.Duration",
95
- * "value": "1.212s"
96
- * }
97
- *
98
- *
99
- * @generated from protobuf message google.protobuf.Any
100
- */
101
- export interface Any {
102
- /**
103
- * A URL/resource name that uniquely identifies the type of the serialized
104
- * protocol buffer message. This string must contain at least
105
- * one "/" character. The last segment of the URL's path must represent
106
- * the fully qualified name of the type (as in
107
- * `path/google.protobuf.Duration`). The name should be in a canonical form
108
- * (e.g., leading "." is not accepted).
109
- *
110
- * In practice, teams usually precompile into the binary all types that they
111
- * expect it to use in the context of Any. However, for URLs which use the
112
- * scheme `http`, `https`, or no scheme, one can optionally set up a type
113
- * server that maps type URLs to message definitions as follows:
114
- *
115
- * * If no scheme is provided, `https` is assumed.
116
- * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
117
- * value in binary format, or produce an error.
118
- * * Applications are allowed to cache lookup results based on the
119
- * URL, or have them precompiled into a binary to avoid any
120
- * lookup. Therefore, binary compatibility needs to be preserved
121
- * on changes to types. (Use versioned type names to manage
122
- * breaking changes.)
123
- *
124
- * Note: this functionality is not currently available in the official
125
- * protobuf release, and it is not used for type URLs beginning with
126
- * type.googleapis.com. As of May 2023, there are no widely used type server
127
- * implementations and no plans to implement one.
128
- *
129
- * Schemes other than `http`, `https` (or the empty scheme) might be
130
- * used with implementation specific semantics.
131
- *
132
- *
133
- * @generated from protobuf field: string type_url = 1
134
- */
135
- typeUrl: string;
136
- /**
137
- * Must be a valid serialized protocol buffer of the above specified type.
138
- *
139
- * @generated from protobuf field: bytes value = 2
140
- */
141
- value: Uint8Array;
142
- }
143
- declare class Any$Type extends MessageType<Any> {
144
- constructor();
145
- /**
146
- * Pack the message into a new `Any`.
147
- *
148
- * Uses 'type.googleapis.com/full.type.name' as the type URL.
149
- */
150
- pack<T extends object>(message: T, type: IMessageType<T>): Any;
151
- /**
152
- * Unpack the message from the `Any`.
153
- */
154
- unpack<T extends object>(any: Any, type: IMessageType<T>, options?: Partial<BinaryReadOptions>): T;
155
- /**
156
- * Does the given `Any` contain a packed message of the given type?
157
- */
158
- contains(any: Any, type: IMessageType<any> | string): boolean;
159
- /**
160
- * Convert the message to canonical JSON value.
161
- *
162
- * You have to provide the `typeRegistry` option so that the
163
- * packed message can be converted to JSON.
164
- *
165
- * The `typeRegistry` option is also required to read
166
- * `google.protobuf.Any` from JSON format.
167
- */
168
- internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue;
169
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any;
170
- typeNameToUrl(name: string): string;
171
- typeUrlToName(url: string): string;
172
- create(value?: PartialMessage<Any>): Any;
173
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Any): Any;
174
- internalBinaryWrite(message: Any, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
175
- }
176
- /**
177
- * @generated MessageType for protobuf message google.protobuf.Any
178
- */
179
- export declare const Any: Any$Type;
180
- export {};
@@ -1,155 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Any = void 0;
4
- const runtime_1 = require("@protobuf-ts/runtime");
5
- const runtime_2 = require("@protobuf-ts/runtime");
6
- const runtime_3 = require("@protobuf-ts/runtime");
7
- const runtime_4 = require("@protobuf-ts/runtime");
8
- const runtime_5 = require("@protobuf-ts/runtime");
9
- const runtime_6 = require("@protobuf-ts/runtime");
10
- const runtime_7 = require("@protobuf-ts/runtime");
11
- // @generated message type with reflection information, may provide speed optimized methods
12
- class Any$Type extends runtime_7.MessageType {
13
- constructor() {
14
- super("google.protobuf.Any", [
15
- { no: 1, name: "type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
16
- { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
17
- ]);
18
- }
19
- /**
20
- * Pack the message into a new `Any`.
21
- *
22
- * Uses 'type.googleapis.com/full.type.name' as the type URL.
23
- */
24
- pack(message, type) {
25
- return {
26
- typeUrl: this.typeNameToUrl(type.typeName), value: type.toBinary(message),
27
- };
28
- }
29
- /**
30
- * Unpack the message from the `Any`.
31
- */
32
- unpack(any, type, options) {
33
- if (!this.contains(any, type))
34
- throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + ".");
35
- return type.fromBinary(any.value, options);
36
- }
37
- /**
38
- * Does the given `Any` contain a packed message of the given type?
39
- */
40
- contains(any, type) {
41
- if (!any.typeUrl.length)
42
- return false;
43
- let wants = typeof type == "string" ? type : type.typeName;
44
- let has = this.typeUrlToName(any.typeUrl);
45
- return wants === has;
46
- }
47
- /**
48
- * Convert the message to canonical JSON value.
49
- *
50
- * You have to provide the `typeRegistry` option so that the
51
- * packed message can be converted to JSON.
52
- *
53
- * The `typeRegistry` option is also required to read
54
- * `google.protobuf.Any` from JSON format.
55
- */
56
- internalJsonWrite(any, options) {
57
- if (any.typeUrl === "")
58
- return {};
59
- let typeName = this.typeUrlToName(any.typeUrl);
60
- let opt = (0, runtime_6.jsonWriteOptions)(options);
61
- let type = opt.typeRegistry?.find(t => t.typeName === typeName);
62
- if (!type)
63
- throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry.");
64
- let value = type.fromBinary(any.value, { readUnknownField: false });
65
- let json = type.internalJsonWrite(value, opt);
66
- if (typeName.startsWith("google.protobuf.") || !(0, runtime_4.isJsonObject)(json))
67
- json = { value: json };
68
- json["@type"] = any.typeUrl;
69
- return json;
70
- }
71
- internalJsonRead(json, options, target) {
72
- if (!(0, runtime_4.isJsonObject)(json))
73
- throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + (0, runtime_5.typeofJsonValue)(json) + ".");
74
- if (typeof json["@type"] != "string" || json["@type"] == "")
75
- return this.create();
76
- let typeName = this.typeUrlToName(json["@type"]);
77
- let type = options?.typeRegistry?.find(t => t.typeName == typeName);
78
- if (!type)
79
- throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry.");
80
- let value;
81
- if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value"))
82
- value = type.fromJson(json["value"], options);
83
- else {
84
- let copy = Object.assign({}, json);
85
- delete copy["@type"];
86
- value = type.fromJson(copy, options);
87
- }
88
- if (target === undefined)
89
- target = this.create();
90
- target.typeUrl = json["@type"];
91
- target.value = type.toBinary(value);
92
- return target;
93
- }
94
- typeNameToUrl(name) {
95
- if (!name.length)
96
- throw new Error("invalid type name: " + name);
97
- return "type.googleapis.com/" + name;
98
- }
99
- typeUrlToName(url) {
100
- if (!url.length)
101
- throw new Error("invalid type url: " + url);
102
- let slash = url.lastIndexOf("/");
103
- let name = slash > 0 ? url.substring(slash + 1) : url;
104
- if (!name.length)
105
- throw new Error("invalid type url: " + url);
106
- return name;
107
- }
108
- create(value) {
109
- const message = globalThis.Object.create((this.messagePrototype));
110
- message.typeUrl = "";
111
- message.value = new Uint8Array(0);
112
- if (value !== undefined)
113
- (0, runtime_3.reflectionMergePartial)(this, message, value);
114
- return message;
115
- }
116
- internalBinaryRead(reader, length, options, target) {
117
- let message = target ?? this.create(), end = reader.pos + length;
118
- while (reader.pos < end) {
119
- let [fieldNo, wireType] = reader.tag();
120
- switch (fieldNo) {
121
- case /* string type_url */ 1:
122
- message.typeUrl = reader.string();
123
- break;
124
- case /* bytes value */ 2:
125
- message.value = reader.bytes();
126
- break;
127
- default:
128
- let u = options.readUnknownField;
129
- if (u === "throw")
130
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
131
- let d = reader.skip(wireType);
132
- if (u !== false)
133
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
134
- }
135
- }
136
- return message;
137
- }
138
- internalBinaryWrite(message, writer, options) {
139
- /* string type_url = 1; */
140
- if (message.typeUrl !== "")
141
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.typeUrl);
142
- /* bytes value = 2; */
143
- if (message.value.length)
144
- writer.tag(2, runtime_1.WireType.LengthDelimited).bytes(message.value);
145
- let u = options.writeUnknownFields;
146
- if (u !== false)
147
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
148
- return writer;
149
- }
150
- }
151
- /**
152
- * @generated MessageType for protobuf message google.protobuf.Any
153
- */
154
- exports.Any = new Any$Type();
155
- //# sourceMappingURL=any.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any.js","sourceRoot":"","sources":["../../../../generated/google/protobuf/any.ts"],"names":[],"mappings":";;;AAoCA,kDAAgD;AAEhD,kDAA2D;AAE3D,kDAA8D;AAC9D,kDAAoD;AACpD,kDAAuD;AAEvD,kDAAwD;AAKxD,kDAAmD;AAqInD,2FAA2F;AAC3F,MAAM,QAAS,SAAQ,qBAAgB;IACnC;QACI,KAAK,CAAC,qBAAqB,EAAE;YACzB,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAA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CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AACD;;GAEG;AACU,QAAA,GAAG,GAAG,IAAI,QAAQ,EAAE,CAAC"}
@@ -1,31 +0,0 @@
1
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
- import type { IBinaryReader } from "@protobuf-ts/runtime";
5
- import type { PartialMessage } from "@protobuf-ts/runtime";
6
- import { MessageType } from "@protobuf-ts/runtime";
7
- /**
8
- * A generic empty message that you can re-use to avoid defining duplicated
9
- * empty messages in your APIs. A typical example is to use it as the request
10
- * or the response type of an API method. For instance:
11
- *
12
- * service Foo {
13
- * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
14
- * }
15
- *
16
- *
17
- * @generated from protobuf message google.protobuf.Empty
18
- */
19
- export interface Empty {
20
- }
21
- declare class Empty$Type extends MessageType<Empty> {
22
- constructor();
23
- create(value?: PartialMessage<Empty>): Empty;
24
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty;
25
- internalBinaryWrite(message: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
26
- }
27
- /**
28
- * @generated MessageType for protobuf message google.protobuf.Empty
29
- */
30
- export declare const Empty: Empty$Type;
31
- export {};
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Empty = void 0;
4
- const runtime_1 = require("@protobuf-ts/runtime");
5
- const runtime_2 = require("@protobuf-ts/runtime");
6
- const runtime_3 = require("@protobuf-ts/runtime");
7
- // @generated message type with reflection information, may provide speed optimized methods
8
- class Empty$Type extends runtime_3.MessageType {
9
- constructor() {
10
- super("google.protobuf.Empty", []);
11
- }
12
- create(value) {
13
- const message = globalThis.Object.create((this.messagePrototype));
14
- if (value !== undefined)
15
- (0, runtime_2.reflectionMergePartial)(this, message, value);
16
- return message;
17
- }
18
- internalBinaryRead(reader, length, options, target) {
19
- let message = target ?? this.create(), end = reader.pos + length;
20
- while (reader.pos < end) {
21
- let [fieldNo, wireType] = reader.tag();
22
- switch (fieldNo) {
23
- default:
24
- let u = options.readUnknownField;
25
- if (u === "throw")
26
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
27
- let d = reader.skip(wireType);
28
- if (u !== false)
29
- (u === true ? runtime_1.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
30
- }
31
- }
32
- return message;
33
- }
34
- internalBinaryWrite(message, writer, options) {
35
- let u = options.writeUnknownFields;
36
- if (u !== false)
37
- (u == true ? runtime_1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
38
- return writer;
39
- }
40
- }
41
- /**
42
- * @generated MessageType for protobuf message google.protobuf.Empty
43
- */
44
- exports.Empty = new Empty$Type();
45
- //# sourceMappingURL=empty.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../generated/google/protobuf/empty.ts"],"names":[],"mappings":";;;AAsCA,kDAA2D;AAE3D,kDAA8D;AAC9D,kDAAmD;AAenD,2FAA2F;AAC3F,MAAM,UAAW,SAAQ,qBAAkB;IACvC;QACI,KAAK,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,MAAM,CAAC,KAA6B;QAChC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,gBAAiB,CAAC,CAAC,CAAC;QACnE,IAAI,KAAK,KAAK,SAAS;YACnB,IAAA,gCAAsB,EAAQ,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,kBAAkB,CAAC,MAAqB,EAAE,MAAc,EAAE,OAA0B,EA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-1,156 +0,0 @@
1
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
- import type { IBinaryReader } from "@protobuf-ts/runtime";
5
- import type { PartialMessage } from "@protobuf-ts/runtime";
6
- import type { JsonValue } from "@protobuf-ts/runtime";
7
- import type { JsonReadOptions } from "@protobuf-ts/runtime";
8
- import type { JsonWriteOptions } from "@protobuf-ts/runtime";
9
- import { MessageType } from "@protobuf-ts/runtime";
10
- /**
11
- * A Timestamp represents a point in time independent of any time zone or local
12
- * calendar, encoded as a count of seconds and fractions of seconds at
13
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
14
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
15
- * Gregorian calendar backwards to year one.
16
- *
17
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
18
- * second table is needed for interpretation, using a [24-hour linear
19
- * smear](https://developers.google.com/time/smear).
20
- *
21
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
22
- * restricting to that range, we ensure that we can convert to and from [RFC
23
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
24
- *
25
- * # Examples
26
- *
27
- * Example 1: Compute Timestamp from POSIX `time()`.
28
- *
29
- * Timestamp timestamp;
30
- * timestamp.set_seconds(time(NULL));
31
- * timestamp.set_nanos(0);
32
- *
33
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
34
- *
35
- * struct timeval tv;
36
- * gettimeofday(&tv, NULL);
37
- *
38
- * Timestamp timestamp;
39
- * timestamp.set_seconds(tv.tv_sec);
40
- * timestamp.set_nanos(tv.tv_usec * 1000);
41
- *
42
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
43
- *
44
- * FILETIME ft;
45
- * GetSystemTimeAsFileTime(&ft);
46
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
47
- *
48
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
49
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
50
- * Timestamp timestamp;
51
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
52
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
53
- *
54
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
55
- *
56
- * long millis = System.currentTimeMillis();
57
- *
58
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
59
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
60
- *
61
- * Example 5: Compute Timestamp from Java `Instant.now()`.
62
- *
63
- * Instant now = Instant.now();
64
- *
65
- * Timestamp timestamp =
66
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
67
- * .setNanos(now.getNano()).build();
68
- *
69
- * Example 6: Compute Timestamp from current time in Python.
70
- *
71
- * timestamp = Timestamp()
72
- * timestamp.GetCurrentTime()
73
- *
74
- * # JSON Mapping
75
- *
76
- * In JSON format, the Timestamp type is encoded as a string in the
77
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
78
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
79
- * where {year} is always expressed using four digits while {month}, {day},
80
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
81
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
82
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
83
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
84
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
85
- * able to accept both UTC and other timezones (as indicated by an offset).
86
- *
87
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
88
- * 01:30 UTC on January 15, 2017.
89
- *
90
- * In JavaScript, one can convert a Date object to this format using the
91
- * standard
92
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
93
- * method. In Python, a standard `datetime.datetime` object can be converted
94
- * to this format using
95
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
96
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
97
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
98
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
99
- * ) to obtain a formatter capable of generating timestamps in this format.
100
- *
101
- *
102
- * @generated from protobuf message google.protobuf.Timestamp
103
- */
104
- export interface Timestamp {
105
- /**
106
- * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
107
- * be between -315576000000 and 315576000000 inclusive (which corresponds to
108
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
109
- *
110
- * @generated from protobuf field: int64 seconds = 1
111
- */
112
- seconds: number;
113
- /**
114
- * Non-negative fractions of a second at nanosecond resolution. This field is
115
- * the nanosecond portion of the duration, not an alternative to seconds.
116
- * Negative second values with fractions must still have non-negative nanos
117
- * values that count forward in time. Must be between 0 and 999,999,999
118
- * inclusive.
119
- *
120
- * @generated from protobuf field: int32 nanos = 2
121
- */
122
- nanos: number;
123
- }
124
- declare class Timestamp$Type extends MessageType<Timestamp> {
125
- constructor();
126
- /**
127
- * Creates a new `Timestamp` for the current time.
128
- */
129
- now(): Timestamp;
130
- /**
131
- * Converts a `Timestamp` to a JavaScript Date.
132
- */
133
- toDate(message: Timestamp): Date;
134
- /**
135
- * Converts a JavaScript Date to a `Timestamp`.
136
- */
137
- fromDate(date: Date): Timestamp;
138
- /**
139
- * In JSON format, the `Timestamp` type is encoded as a string
140
- * in the RFC 3339 format.
141
- */
142
- internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue;
143
- /**
144
- * In JSON format, the `Timestamp` type is encoded as a string
145
- * in the RFC 3339 format.
146
- */
147
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp;
148
- create(value?: PartialMessage<Timestamp>): Timestamp;
149
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp;
150
- internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
151
- }
152
- /**
153
- * @generated MessageType for protobuf message google.protobuf.Timestamp
154
- */
155
- export declare const Timestamp: Timestamp$Type;
156
- export {};