@woodger/t-invest-node-sdk 0.5.3 → 0.5.5
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/CHANGELOG.md +37 -0
- package/dist/application/services/unary-limiter.d.ts +10 -1
- package/dist/application/services/unary-limiter.js +62 -11
- package/dist/bootstrap/args/command-options.d.ts +7 -1
- package/dist/bootstrap/args/command-options.js +10 -3
- package/dist/bootstrap/cli/help-catalog.d.ts +7 -7
- package/dist/bootstrap/cli/help-catalog.js +20 -26
- package/dist/bootstrap/cli/registry.d.ts +1 -1
- package/dist/bootstrap/commands/broker-report/cli.js +1 -1
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +1 -1
- package/dist/bootstrap/commands/order-book/cli.d.ts +3 -3
- package/dist/bootstrap/commands/order-book/cli.js +1 -1
- package/dist/bootstrap/commands/stream-run/config.d.ts +29 -6
- package/dist/bootstrap/commands/stream-run/config.js +17 -54
- package/dist/bootstrap/commands/stream-run/reporter.js +2 -0
- package/dist/bootstrap/commands/stream-run/request.mapper.js +70 -40
- package/dist/bootstrap/commands/stream-run/stream-session.js +7 -2
- package/dist/bootstrap/t-invest-node-sdk.js +13 -11
- package/dist/generated/common.js +2 -2
- package/dist/generated/google/api/field_behavior.js +2 -2
- package/dist/generated/google/protobuf/descriptor.js +2 -2
- package/dist/generated/google/protobuf/timestamp.js +2 -2
- package/dist/generated/instruments.js +2 -2
- package/dist/generated/marketdata.js +2 -2
- package/dist/generated/operations.js +2 -2
- package/dist/generated/orders.js +2 -2
- package/dist/generated/sandbox.js +2 -2
- package/dist/generated/signals.js +2 -2
- package/dist/generated/stoporders.js +2 -2
- package/dist/generated/users.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/infrastructure/transport/grpc/sdk-call-error.js +5 -6
- package/dist/infrastructure/transport/grpc/sdk-client.d.ts +2 -2
- package/docs/architecture.md +5 -3
- package/docs/clean-architecture/adapters.md +7 -124
- package/docs/clean-architecture/api-commands.md +6 -160
- package/docs/clean-architecture/application.md +102 -2
- package/docs/clean-architecture/cli-output-boundaries.md +72 -29
- package/docs/clean-architecture/dto.md +9 -100
- package/docs/clean-architecture/index.md +6 -44
- package/docs/cli-reference.md +132 -0
- package/docs/cli-stream-configuration.md +5 -3
- package/docs/cli-stream-reference.md +5 -2
- package/docs/guides/custom-unary-limiter.md +25 -7
- package/docs/guides/errors-and-lifecycle.md +21 -0
- package/docs/index.md +8 -5
- package/docs/limits-policy.md +1 -1
- package/docs/roadmap.md +4 -31
- package/package.json +9 -8
- package/readme.md +7 -92
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Здесь допустимы:
|
|
6
6
|
* - валидация stream config до создания SDK;
|
|
7
|
-
* -
|
|
7
|
+
* - нормализация полей проверенной конфигурации;
|
|
8
8
|
* - runtime defaults для долгоживущих stream-команд;
|
|
9
9
|
*
|
|
10
10
|
* Здесь не должно быть SDK calls или stdout/stderr output logic.
|
|
@@ -157,72 +157,30 @@ function parseMarketDataStreamRequest(value) {
|
|
|
157
157
|
.map((item) => parseCandleSubscription(item, 'requests[].instruments[]'));
|
|
158
158
|
validateCandlesWaitingClose(instruments);
|
|
159
159
|
return {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
instruments: instruments.map((item) => marketdata_1.CandleInstrument.create({
|
|
163
|
-
interval: item.interval,
|
|
164
|
-
instrumentId: item.instrumentId
|
|
165
|
-
})),
|
|
166
|
-
waitingClose: resolveCandlesWaitingClose(instruments)
|
|
167
|
-
}
|
|
160
|
+
type: requestType,
|
|
161
|
+
instruments
|
|
168
162
|
};
|
|
169
163
|
}
|
|
170
164
|
case 'subscribeOrderBook':
|
|
171
165
|
rejectUnknownFields(request, new Set(['type', 'instruments']), 'requests[]');
|
|
172
166
|
return {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
.map((item) => parseOrderBookSubscription(item, 'requests[].instruments[]'))
|
|
177
|
-
.map((item) => marketdata_1.OrderBookInstrument.create({
|
|
178
|
-
depth: item.depth,
|
|
179
|
-
instrumentId: item.instrumentId,
|
|
180
|
-
orderBookType: marketdata_1.OrderBookType.ORDERBOOK_TYPE_UNSPECIFIED
|
|
181
|
-
}))
|
|
182
|
-
}
|
|
167
|
+
type: requestType,
|
|
168
|
+
instruments: parseArray(request['instruments'], 'requests[].instruments')
|
|
169
|
+
.map((item) => parseOrderBookSubscription(item, 'requests[].instruments[]'))
|
|
183
170
|
};
|
|
184
171
|
case 'subscribeTrades':
|
|
185
|
-
rejectUnknownFields(request, new Set(['type', 'instruments']), 'requests[]');
|
|
186
|
-
return {
|
|
187
|
-
subscribeTradesRequest: {
|
|
188
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
189
|
-
instruments: parseArray(request['instruments'], 'requests[].instruments')
|
|
190
|
-
.map((item) => parseInstrumentSubscription(item, 'requests[].instruments[]'))
|
|
191
|
-
.map((item) => marketdata_1.TradeInstrument.create({
|
|
192
|
-
instrumentId: item.instrumentId
|
|
193
|
-
})),
|
|
194
|
-
tradeSource: marketdata_1.TradeSourceType.TRADE_SOURCE_UNSPECIFIED,
|
|
195
|
-
withOpenInterest: false
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
172
|
case 'subscribeInfo':
|
|
199
|
-
rejectUnknownFields(request, new Set(['type', 'instruments']), 'requests[]');
|
|
200
|
-
return {
|
|
201
|
-
subscribeInfoRequest: {
|
|
202
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
203
|
-
instruments: parseArray(request['instruments'], 'requests[].instruments')
|
|
204
|
-
.map((item) => parseInstrumentSubscription(item, 'requests[].instruments[]'))
|
|
205
|
-
.map((item) => marketdata_1.InfoInstrument.create({
|
|
206
|
-
instrumentId: item.instrumentId
|
|
207
|
-
}))
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
173
|
case 'subscribeLastPrice':
|
|
211
174
|
rejectUnknownFields(request, new Set(['type', 'instruments']), 'requests[]');
|
|
212
175
|
return {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
.map((item) => parseInstrumentSubscription(item, 'requests[].instruments[]'))
|
|
217
|
-
.map((item) => marketdata_1.LastPriceInstrument.create({
|
|
218
|
-
instrumentId: item.instrumentId
|
|
219
|
-
}))
|
|
220
|
-
}
|
|
176
|
+
type: requestType,
|
|
177
|
+
instruments: parseArray(request['instruments'], 'requests[].instruments')
|
|
178
|
+
.map((item) => parseInstrumentSubscription(item, 'requests[].instruments[]'))
|
|
221
179
|
};
|
|
222
180
|
case 'getMySubscriptions':
|
|
223
181
|
rejectUnknownFields(request, new Set(['type']), 'requests[]');
|
|
224
182
|
return {
|
|
225
|
-
|
|
183
|
+
type: requestType
|
|
226
184
|
};
|
|
227
185
|
}
|
|
228
186
|
}
|
|
@@ -271,9 +229,14 @@ function parseCandleSubscription(value, path) {
|
|
|
271
229
|
function parseOrderBookSubscription(value, path) {
|
|
272
230
|
const orderBook = requireObject(value, path);
|
|
273
231
|
rejectUnknownFields(orderBook, new Set(['instrumentId', 'depth']), path);
|
|
232
|
+
const instrumentId = parseInstrumentId(orderBook['instrumentId'], `${path}.instrumentId`);
|
|
233
|
+
const depth = parsePositiveInteger(orderBook['depth'], `${path}.depth`);
|
|
234
|
+
if (depth > 2_147_483_647) {
|
|
235
|
+
throw new icore_1.CliUsageError(`Expected '${path}.depth' to be less than or equal to 2147483647`);
|
|
236
|
+
}
|
|
274
237
|
return {
|
|
275
|
-
instrumentId
|
|
276
|
-
depth
|
|
238
|
+
instrumentId,
|
|
239
|
+
depth
|
|
277
240
|
};
|
|
278
241
|
}
|
|
279
242
|
function parseInstrumentSubscription(value, path) {
|
|
@@ -25,6 +25,7 @@ const streamEventFields = [
|
|
|
25
25
|
'orderbook',
|
|
26
26
|
'tradingStatus',
|
|
27
27
|
'lastPrice',
|
|
28
|
+
'subscription',
|
|
28
29
|
'subscriptions',
|
|
29
30
|
'portfolio',
|
|
30
31
|
'position',
|
|
@@ -37,6 +38,7 @@ const subscriptionEventTypes = new Set([
|
|
|
37
38
|
'subscribeTradesResponse',
|
|
38
39
|
'subscribeInfoResponse',
|
|
39
40
|
'subscribeLastPriceResponse',
|
|
41
|
+
'subscription',
|
|
40
42
|
'subscriptions'
|
|
41
43
|
]);
|
|
42
44
|
function formatStreamRunResponse(response, options) {
|
|
@@ -17,7 +17,22 @@ function createMarketDataStreamRequests(config) {
|
|
|
17
17
|
if (config.stream !== 'marketdata.marketDataStream') {
|
|
18
18
|
throw new icore_1.CliUsageError(`Expected marketdata bidirectional stream config, got '${config.stream}'`);
|
|
19
19
|
}
|
|
20
|
-
return config.requests
|
|
20
|
+
return config.requests.map((request) => {
|
|
21
|
+
switch (request.type) {
|
|
22
|
+
case 'subscribeCandles':
|
|
23
|
+
return { subscribeCandlesRequest: createSubscribeCandlesRequest(request.instruments) };
|
|
24
|
+
case 'subscribeOrderBook':
|
|
25
|
+
return { subscribeOrderBookRequest: createSubscribeOrderBookRequest(request.instruments) };
|
|
26
|
+
case 'subscribeTrades':
|
|
27
|
+
return { subscribeTradesRequest: createSubscribeTradesRequest(request.instruments) };
|
|
28
|
+
case 'subscribeInfo':
|
|
29
|
+
return { subscribeInfoRequest: createSubscribeInfoRequest(request.instruments) };
|
|
30
|
+
case 'subscribeLastPrice':
|
|
31
|
+
return { subscribeLastPriceRequest: createSubscribeLastPriceRequest(request.instruments) };
|
|
32
|
+
case 'getMySubscriptions':
|
|
33
|
+
return { getMySubscriptions: {} };
|
|
34
|
+
}
|
|
35
|
+
});
|
|
21
36
|
}
|
|
22
37
|
function createMarketDataServerSideStreamRequest(config) {
|
|
23
38
|
if (config.stream !== 'marketdata.marketDataServerSideStream') {
|
|
@@ -34,50 +49,19 @@ function createMarketDataServerSideStreamRequest(config) {
|
|
|
34
49
|
const lastPrices = subscriptions.lastPrices ?? [];
|
|
35
50
|
return {
|
|
36
51
|
subscribeCandlesRequest: candles.length > 0
|
|
37
|
-
?
|
|
38
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
39
|
-
instruments: candles.map((item) => marketdata_1.CandleInstrument.create({
|
|
40
|
-
interval: item.interval,
|
|
41
|
-
instrumentId: item.instrumentId
|
|
42
|
-
})),
|
|
43
|
-
waitingClose: (0, config_1.resolveCandlesWaitingClose)(candles)
|
|
44
|
-
}
|
|
52
|
+
? createSubscribeCandlesRequest(candles)
|
|
45
53
|
: undefined,
|
|
46
54
|
subscribeOrderBookRequest: orderBooks.length > 0
|
|
47
|
-
?
|
|
48
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
49
|
-
instruments: orderBooks.map((item) => marketdata_1.OrderBookInstrument.create({
|
|
50
|
-
depth: item.depth,
|
|
51
|
-
instrumentId: item.instrumentId,
|
|
52
|
-
orderBookType: marketdata_1.OrderBookType.ORDERBOOK_TYPE_UNSPECIFIED
|
|
53
|
-
}))
|
|
54
|
-
}
|
|
55
|
+
? createSubscribeOrderBookRequest(orderBooks)
|
|
55
56
|
: undefined,
|
|
56
57
|
subscribeTradesRequest: trades.length > 0
|
|
57
|
-
?
|
|
58
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
59
|
-
instruments: trades.map((item) => marketdata_1.TradeInstrument.create({
|
|
60
|
-
instrumentId: item.instrumentId
|
|
61
|
-
})),
|
|
62
|
-
tradeSource: marketdata_1.TradeSourceType.TRADE_SOURCE_UNSPECIFIED,
|
|
63
|
-
withOpenInterest: false
|
|
64
|
-
}
|
|
58
|
+
? createSubscribeTradesRequest(trades)
|
|
65
59
|
: undefined,
|
|
66
60
|
subscribeInfoRequest: info.length > 0
|
|
67
|
-
?
|
|
68
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
69
|
-
instruments: info.map((item) => marketdata_1.InfoInstrument.create({
|
|
70
|
-
instrumentId: item.instrumentId
|
|
71
|
-
}))
|
|
72
|
-
}
|
|
61
|
+
? createSubscribeInfoRequest(info)
|
|
73
62
|
: undefined,
|
|
74
63
|
subscribeLastPriceRequest: lastPrices.length > 0
|
|
75
|
-
?
|
|
76
|
-
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
77
|
-
instruments: lastPrices.map((item) => marketdata_1.LastPriceInstrument.create({
|
|
78
|
-
instrumentId: item.instrumentId
|
|
79
|
-
}))
|
|
80
|
-
}
|
|
64
|
+
? createSubscribeLastPriceRequest(lastPrices)
|
|
81
65
|
: undefined,
|
|
82
66
|
pingSettings: undefined
|
|
83
67
|
};
|
|
@@ -87,7 +71,7 @@ function createPortfolioStreamRequest(config) {
|
|
|
87
71
|
throw new icore_1.CliUsageError(`Expected portfolio stream config, got '${config.stream}'`);
|
|
88
72
|
}
|
|
89
73
|
return {
|
|
90
|
-
accounts: config.accounts
|
|
74
|
+
accounts: config.accounts,
|
|
91
75
|
pingSettings: undefined
|
|
92
76
|
};
|
|
93
77
|
}
|
|
@@ -96,7 +80,7 @@ function createPositionsStreamRequest(config) {
|
|
|
96
80
|
throw new icore_1.CliUsageError(`Expected positions stream config, got '${config.stream}'`);
|
|
97
81
|
}
|
|
98
82
|
return {
|
|
99
|
-
accounts: config.accounts
|
|
83
|
+
accounts: config.accounts,
|
|
100
84
|
withInitialPositions: false,
|
|
101
85
|
pingSettings: undefined
|
|
102
86
|
};
|
|
@@ -106,6 +90,52 @@ function createTradesStreamRequest(config) {
|
|
|
106
90
|
throw new icore_1.CliUsageError(`Expected trades stream config, got '${config.stream}'`);
|
|
107
91
|
}
|
|
108
92
|
return {
|
|
109
|
-
accounts: config.accounts
|
|
93
|
+
accounts: config.accounts
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function createSubscribeCandlesRequest(instruments) {
|
|
97
|
+
return {
|
|
98
|
+
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
99
|
+
instruments: instruments.map((item) => marketdata_1.CandleInstrument.create({
|
|
100
|
+
interval: item.interval,
|
|
101
|
+
instrumentId: item.instrumentId
|
|
102
|
+
})),
|
|
103
|
+
waitingClose: (0, config_1.resolveCandlesWaitingClose)(instruments)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function createSubscribeOrderBookRequest(instruments) {
|
|
107
|
+
return {
|
|
108
|
+
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
109
|
+
instruments: instruments.map((item) => marketdata_1.OrderBookInstrument.create({
|
|
110
|
+
depth: item.depth,
|
|
111
|
+
instrumentId: item.instrumentId,
|
|
112
|
+
orderBookType: marketdata_1.OrderBookType.ORDERBOOK_TYPE_UNSPECIFIED
|
|
113
|
+
}))
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function createSubscribeTradesRequest(instruments) {
|
|
117
|
+
return {
|
|
118
|
+
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
119
|
+
instruments: instruments.map((item) => marketdata_1.TradeInstrument.create({
|
|
120
|
+
instrumentId: item.instrumentId
|
|
121
|
+
})),
|
|
122
|
+
tradeSource: marketdata_1.TradeSourceType.TRADE_SOURCE_UNSPECIFIED,
|
|
123
|
+
withOpenInterest: false
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function createSubscribeInfoRequest(instruments) {
|
|
127
|
+
return {
|
|
128
|
+
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
129
|
+
instruments: instruments.map((item) => marketdata_1.InfoInstrument.create({
|
|
130
|
+
instrumentId: item.instrumentId
|
|
131
|
+
}))
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function createSubscribeLastPriceRequest(instruments) {
|
|
135
|
+
return {
|
|
136
|
+
subscriptionAction: marketdata_1.SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
|
|
137
|
+
instruments: instruments.map((item) => marketdata_1.LastPriceInstrument.create({
|
|
138
|
+
instrumentId: item.instrumentId
|
|
139
|
+
}))
|
|
110
140
|
};
|
|
111
141
|
}
|
|
@@ -97,11 +97,16 @@ async function* formatStreamRunResponses(stream, responses, runtime, now, elapse
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
finally {
|
|
100
|
-
cancelStream();
|
|
101
100
|
if (pendingRead !== undefined) {
|
|
101
|
+
cancelStream();
|
|
102
102
|
await settleCancelledRead(pendingRead);
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
try {
|
|
105
|
+
await iterator.return?.();
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
cancelStream();
|
|
109
|
+
}
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
function resolveNextTimeoutMs(startedAt, lastResponseAt, runtime, elapsedNow) {
|
|
@@ -87,18 +87,20 @@ class TInvestNodeSDK {
|
|
|
87
87
|
}
|
|
88
88
|
getOrCreateServiceClient(serviceDefinition) {
|
|
89
89
|
this.assertOpen();
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
maxReceiveMessageLength: this.maxReceiveMessageLength,
|
|
95
|
-
signal: this.lifecycleController.signal,
|
|
96
|
-
assertOpen: () => {
|
|
97
|
-
this.assertOpen();
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
this.clientsByServiceDefinition.set(serviceDefinition, client);
|
|
90
|
+
const cachedClient = this.clientsByServiceDefinition.get(serviceDefinition);
|
|
91
|
+
if (cachedClient !== undefined) {
|
|
92
|
+
// Кэш заполняется только клиентами, созданными для этого definition.
|
|
93
|
+
return cachedClient;
|
|
101
94
|
}
|
|
95
|
+
const client = (0, grpc_1.createSdkClient)(serviceDefinition, this.channel, this.metadata, this.options.unaryLimiter, this.unaryLimitResolver, {
|
|
96
|
+
useSsl: this.options.useSsl,
|
|
97
|
+
maxReceiveMessageLength: this.maxReceiveMessageLength,
|
|
98
|
+
signal: this.lifecycleController.signal,
|
|
99
|
+
assertOpen: () => {
|
|
100
|
+
this.assertOpen();
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
this.clientsByServiceDefinition.set(serviceDefinition, client);
|
|
102
104
|
return client;
|
|
103
105
|
}
|
|
104
106
|
assertOpen() {
|
package/dist/generated/common.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: common.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.ErrorDetail = exports.BrandData = exports.ResponseMetadata = exports.PageResponse = exports.Page = exports.Ping = exports.PingDelaySettings = exports.PingRequest = exports.Quotation = exports.MoneyValue = exports.RealExchange = exports.ResultSubscriptionStatus = exports.PriceType = exports.SecurityTradingStatus = exports.InstrumentStatus = exports.InstrumentType = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: google/api/field_behavior.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.FieldBehavior = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: google/protobuf/descriptor.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.FeatureSetDefaults = exports.FeatureSet_VisibilityFeature = exports.FeatureSet = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions_FeatureSupport = exports.FieldOptions_EditionDefault = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions_Declaration = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.GeneratedCodeInfo_Annotation_Semantic = exports.FeatureSet_VisibilityFeature_DefaultSymbolVisibility = exports.FeatureSet_EnforceNamingStyle = exports.FeatureSet_JsonFormat = exports.FeatureSet_MessageEncoding = exports.FeatureSet_Utf8Validation = exports.FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_EnumType = exports.FeatureSet_FieldPresence = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_OptionTargetType = exports.FieldOptions_OptionRetention = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = exports.ExtensionRangeOptions_VerificationState = exports.SymbolVisibility = exports.Edition = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: google/protobuf/timestamp.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.Timestamp = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: instruments.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.StructuredNotesResponse = exports.StructuredNoteResponse = exports.SharesResponse = exports.ShareResponse = exports.Option = exports.OptionsResponse = exports.OptionResponse = exports.FuturesResponse = exports.FutureResponse = exports.EtfsResponse = exports.EtfResponse = exports.CurrenciesResponse = exports.CurrencyResponse = exports.Coupon = exports.GetBondEventsResponse_BondEvent = exports.GetBondEventsResponse = exports.GetBondEventsRequest = exports.GetBondCouponsResponse = exports.GetBondCouponsRequest = exports.BondsResponse = exports.BondResponse = exports.NewsRequest = exports.FilterOptionsRequest = exports.InstrumentsRequest = exports.InstrumentRequest = exports.TradingDay = exports.TradingSchedule = exports.TradingSchedulesResponse = exports.TradingSchedulesRequest = exports.GetInsiderDealsResponse_TradeDirection = exports.GetAssetReportsResponse_AssetReportPeriodType = exports.StructuredNote_YieldType = exports.StructuredNote_ObservationPrinciple = exports.StructuredNote_LogicPortfolio = exports.GetBondEventsRequest_EventType = exports.InstrumentExchangeType = exports.BondType = exports.RiskLevel = exports.Recommendation = exports.EditFavoritesActionType = exports.StructuredProductType = exports.AssetType = exports.ShareType = exports.InstrumentIdType = exports.OptionSettlementType = exports.OptionStyle = exports.OptionPaymentType = exports.OptionDirection = exports.CouponType = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: marketdata.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.OpenInterest = exports.LastPrice = exports.GetLastPricesResponse = exports.GetLastPricesRequest = exports.HistoricCandle = exports.GetCandlesResponse = exports.GetCandlesRequest = exports.TradingStatus = exports.Trade = exports.Order = exports.OrderBook = exports.Candle = exports.LastPriceSubscription = exports.SubscribeLastPriceResponse = exports.LastPriceInstrument = exports.SubscribeLastPriceRequest = exports.InfoSubscription = exports.SubscribeInfoResponse = exports.InfoInstrument = exports.SubscribeInfoRequest = exports.TradeSubscription = exports.SubscribeTradesResponse = exports.TradeInstrument = exports.SubscribeTradesRequest = exports.OrderBookSubscription = exports.SubscribeOrderBookResponse = exports.OrderBookInstrument = exports.SubscribeOrderBookRequest = exports.CandleSubscription = exports.SubscribeCandlesResponse = exports.CandleInstrument = exports.SubscribeCandlesRequest = exports.MarketDataResponse = exports.MarketDataServerSideStreamRequest = exports.MarketDataRequest = exports.GetTechAnalysisRequest_IndicatorType = exports.GetTechAnalysisRequest_TypeOfPrice = exports.GetTechAnalysisRequest_IndicatorInterval = exports.GetCandlesRequest_CandleSource = exports.LastPriceType = exports.OrderBookType = exports.MarketValueType = exports.CandleSource = exports.CandleInterval = exports.TradeDirection = exports.TradeSourceType = exports.SubscriptionStatus = exports.SubscriptionInterval = exports.SubscriptionAction = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: operations.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.PositionData = exports.PositionsSubscriptionStatus = exports.PositionsSubscriptionResult = exports.PositionsStreamResponse = exports.PositionsStreamRequest = exports.OperationItemTrade = exports.OperationItemTrades = exports.OperationItem = exports.GetOperationsByCursorResponse = exports.GetOperationsByCursorRequest = exports.AccountSubscriptionStatus = exports.PortfolioSubscriptionResult = exports.PortfolioStreamResponse = exports.PortfolioStreamRequest = exports.DividendsForeignIssuerReport = exports.GetDividendsForeignIssuerReportResponse = exports.GenerateDividendsForeignIssuerReportResponse = exports.GetDividendsForeignIssuerReportRequest = exports.GenerateDividendsForeignIssuerReportRequest = exports.GetDividendsForeignIssuerResponse = exports.GetDividendsForeignIssuerRequest = exports.BrokerReport = exports.GetBrokerReportResponse = exports.GetBrokerReportRequest = exports.GenerateBrokerReportResponse = exports.GenerateBrokerReportRequest = exports.BrokerReportResponse = exports.BrokerReportRequest = exports.PositionsOptions = exports.PositionsFutures = exports.PositionsSecurities = exports.VirtualPortfolioPosition = exports.PortfolioPosition = exports.WithdrawLimitsResponse = exports.WithdrawLimitsRequest = exports.PositionsResponse = exports.PositionsRequest = exports.PortfolioResponse = exports.PortfolioRequest = exports.OperationTrade = exports.Operation = exports.OperationsResponse = exports.OperationsRequest = exports.PortfolioRequest_CurrencyRequest = exports.OperationsAccountSubscriptionStatus = exports.PositionsAccountSubscriptionStatus = exports.PortfolioSubscriptionStatus = exports.OperationType = exports.OperationState = exports.protobufPackage = void 0;
|
package/dist/generated/orders.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: orders.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.OrdersServiceDefinition = exports.OrdersStreamServiceDefinition = exports.OrderStateStreamResponse_StopOrderState = exports.OrderStateStreamResponse_OrderState = exports.OrderStateStreamResponse = exports.SubscriptionResponse = exports.OrderStateStreamRequest = exports.GetOrderPriceResponse_ExtraFuture = exports.GetOrderPriceResponse_ExtraBond = exports.GetOrderPriceResponse = exports.GetOrderPriceRequest = exports.GetMaxLotsResponse_SellLimitsView = exports.GetMaxLotsResponse_BuyLimitsView = exports.GetMaxLotsResponse = exports.GetMaxLotsRequest = exports.ReplaceOrderRequest = exports.OrderStage = exports.OrderState = exports.GetOrdersResponse = exports.GetOrdersRequest_GetOrdersRequestFilters = exports.GetOrdersRequest = exports.GetOrderStateRequest = exports.CancelOrderResponse = exports.CancelOrderRequest = exports.PostOrderAsyncResponse = exports.PostOrderAsyncRequest = exports.PostOrderResponse = exports.PostOrderRequest = exports.OrderTrade = exports.OrderTrades = exports.TradesStreamResponse = exports.TradesStreamRequest = exports.OrderStateStreamResponse_StatusCauseInfo = exports.OrderStateStreamResponse_MarkerType = exports.OrderIdType = exports.TimeInForceType = exports.OrderExecutionReportStatus = exports.OrderType = exports.OrderDirection = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: sandbox.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.SandboxServiceDefinition = exports.SandboxPayInResponse = exports.SandboxPayInRequest = exports.CloseSandboxAccountResponse = exports.CloseSandboxAccountRequest = exports.OpenSandboxAccountResponse = exports.OpenSandboxAccountRequest = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: signals.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.SignalServiceDefinition = exports.Signal = exports.GetSignalsResponse = exports.GetSignalsRequest = exports.Strategy = exports.GetStrategiesResponse = exports.GetStrategiesRequest = exports.SignalState = exports.SignalDirection = exports.StrategyType = exports.protobufPackage = void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: stoporders.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.StopOrdersServiceDefinition = exports.StopOrder_TrailingData = exports.StopOrder = exports.CancelStopOrderResponse = exports.CancelStopOrderRequest = exports.GetStopOrdersResponse = exports.GetStopOrdersRequest = exports.PostStopOrderResponse = exports.PostStopOrderRequest_TrailingData = exports.PostStopOrderRequest = exports.TrailingStopStatus = exports.TrailingValueType = exports.TakeProfitType = exports.ExchangeOrderType = exports.StopOrderStatusOption = exports.StopOrderType = exports.StopOrderExpirationType = exports.StopOrderDirection = exports.protobufPackage = void 0;
|
package/dist/generated/users.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.12.
|
|
5
|
-
// protoc v7.36.
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v7.36.2
|
|
6
6
|
// source: users.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.UsersServiceDefinition = exports.InstrumentParameter = exports.AccountValuesWithParameters = exports.GetAccountValuesResponse = exports.GetAccountValuesRequest = exports.PayInResponse = exports.PayInRequest = exports.CurrencyTransferResponse = exports.CurrencyTransferRequest = exports.BankAccount = exports.GetBankAccountsResponse = exports.GetBankAccountsRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.StreamLimit = exports.UnaryLimit = exports.GetUserTariffResponse = exports.GetUserTariffRequest = exports.GetMarginAttributesResponse = exports.GetMarginAttributesRequest = exports.Account = exports.GetAccountsResponse = exports.GetAccountsRequest = exports.AccountValue = exports.AccessLevel = exports.AccountStatus = exports.AccountType = exports.protobufPackage = void 0;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { TInvestNodeSDK } from './bootstrap/t-invest-node-sdk';
|
|
2
2
|
export type { TInvestOptions, TInvestTlsOptions } from './application/dto/t-invest-options';
|
|
3
3
|
export { createInMemoryUnaryLimiter } from './application/services/unary-limiter';
|
|
4
|
-
export type { TInvestUnaryLimit, TInvestUnaryLimitContext, TInvestUnaryLimiter, TInvestUnaryLimits, TInvestUnaryQuota } from './application/services/unary-limiter';
|
|
4
|
+
export type { TInvestInMemoryUnaryLimiterOptions, TInvestUnaryLimit, TInvestUnaryLimitContext, TInvestUnaryLimiter, TInvestUnaryLimits, TInvestUnaryQuota } from './application/services/unary-limiter';
|
|
5
5
|
export { isSdkError, SdkError, SdkErrorCode } from './application/errors/sdk-error';
|
|
6
6
|
export type { SdkErrorOptions, SdkErrorSource } from './application/errors/sdk-error';
|
|
7
7
|
export type { InstrumentsService, MarketDataService, MarketDataStreamService, OperationsService, OperationsStreamService, OrdersService, OrdersStreamService, SandboxService, SignalService, StopOrdersService, TInvestCallOptions, TInvestMetadata, TInvestMetadataValue, UsersService } from './application/dto/t-invest-services';
|
|
@@ -163,13 +163,12 @@ function isTlsCertificateError(error, useSsl) {
|
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
const normalizedDetails = error.details.toLowerCase();
|
|
166
|
-
|
|
167
|
-
return true;
|
|
168
|
-
}
|
|
166
|
+
const hasCertificateErrorCode = tlsCertificateErrorCodes.some((code) => error.details.includes(code));
|
|
169
167
|
const hasCertificateErrorMessage = tlsCertificateErrorMessages.some((message) => normalizedDetails.includes(message));
|
|
170
|
-
return
|
|
171
|
-
&& (
|
|
172
|
-
|
|
168
|
+
return (normalizedDetails.includes(grpcConnectionErrorMarker)
|
|
169
|
+
&& (hasCertificateErrorCode || hasCertificateErrorMessage))
|
|
170
|
+
|| tlsCertificateErrorCodes.includes(error.details.trim())
|
|
171
|
+
|| standaloneTlsCertificateErrorMessages.has(normalizedDetails.trim());
|
|
173
172
|
}
|
|
174
173
|
function errorName(error) {
|
|
175
174
|
if (typeof error !== 'object' || error === null) {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Здесь не должно быть SDK lifecycle ownership или API request mapping.
|
|
10
10
|
*/
|
|
11
|
-
import type { Channel } from 'nice-grpc';
|
|
11
|
+
import type { Channel, CompatServiceDefinition } from 'nice-grpc';
|
|
12
12
|
import type { TInvestUnaryLimiter } from '../../../application/services/unary-limiter';
|
|
13
13
|
import { Metadata } from 'nice-grpc';
|
|
14
14
|
import type { SdkCallRuntime } from './sdk-middleware';
|
|
15
15
|
import type { UnaryLimitResolver } from './unary-limit-resolver';
|
|
16
|
-
export declare function createSdkClient<
|
|
16
|
+
export declare function createSdkClient<Service extends CompatServiceDefinition>(serviceDefinition: Service, channel: Channel, metadata: Metadata, unaryLimiter: TInvestUnaryLimiter | undefined, unaryLimitResolver: UnaryLimitResolver, runtime: SdkCallRuntime): import("nice-grpc").RawClient<import("nice-grpc").NormalizedServiceDefinition<Service>, {}>;
|
package/docs/architecture.md
CHANGED
|
@@ -48,6 +48,8 @@ src/generated
|
|
|
48
48
|
|
|
49
49
|
Здесь допустимы imports из `nice-grpc`, generated service definitions и application services. Application не должен импортировать concrete infrastructure modules.
|
|
50
50
|
|
|
51
|
+
Фабрика `createSdkClient()` выводит тип клиента из переданного service definition. SDK facade сохраняет package-owned public service interfaces; единственное приведение типа для heterogeneous cache локализовано при чтении клиента по его definition.
|
|
52
|
+
|
|
51
53
|
## `bootstrap`
|
|
52
54
|
|
|
53
55
|
Runtime entrypoints разделены на публичные package entrypoints и внутреннюю bootstrap-механику.
|
|
@@ -62,7 +64,7 @@ Runtime entrypoints разделены на публичные package entrypoin
|
|
|
62
64
|
- `bootstrap/cli` - CLI contract, registry, rendering help, декларативный `help-catalog.ts`, version, terminal error policy и runner layer;
|
|
63
65
|
- `bootstrap/commands` - handlers CLI-команд и общий `sdk-command-lifecycle.ts` для коротких SDK-вызовов;
|
|
64
66
|
- `bootstrap/commands/*/request.mapper.ts` - request mapping, который разделяют production и Sandbox варианты одной операции;
|
|
65
|
-
- `bootstrap/commands/stream-run` -
|
|
67
|
+
- `bootstrap/commands/stream-run` - config parser возвращает проверенную конфигурацию с вариантами по `stream`; request mapper создаёт initial bidirectional и server-side generated requests через общие subscription builders. Stream session lifecycle и reporter выделены отдельно;
|
|
66
68
|
- `bootstrap/commands/*/reporter.ts` - command-specific mapping и presentation formatting. Unary reporter-ы обычно строят `application/reports`, а специализированный stream reporter может владеть локальным event contract.
|
|
67
69
|
|
|
68
70
|
Внешняя зависимость `icore` предоставляет общую механику options и commands, примитивы JSON/CSV-row/table и default terminal output facade. Это не отдельный слой проекта: integration wiring остаётся в `bootstrap`, а project-specific adapters и policies — в своих файлах-владельцах.
|
|
@@ -176,7 +178,7 @@ Per-instance `useSsl` имеет приоритет над package default, а `
|
|
|
176
178
|
- `src/bootstrap/sdk-config.ts` владеет public `defaultConfig`, merge overrides, quota group reconciliation и вызовом проверки итогового runtime snapshot;
|
|
177
179
|
- `src/infrastructure/transport/grpc/sdk-channel.ts` владеет mapping готовой package transport policy в channel options, но не default value;
|
|
178
180
|
- `src/infrastructure/transport/grpc/tls-root-certificates.ts` владеет только разрешением package asset и ленивым чтением bundled trust material;
|
|
179
|
-
- `src/application/services/unary-limiter.ts` владеет публичным limiter port и необязательной process-local
|
|
181
|
+
- `src/application/services/unary-limiter.ts` владеет публичным limiter port и необязательной process-local реализацией со статической `quotaShare`, не интерпретируя source config или gRPC paths;
|
|
180
182
|
- `src/infrastructure/transport/grpc/unary-method-path.ts` владеет только transport-specific построением gRPC method path;
|
|
181
183
|
- `src/infrastructure/transport/grpc/unary-limit-resolver.ts` владеет сопоставлением path с method/service rule и выбором runtime bucket, но не compilation package policy или состоянием limiter-а;
|
|
182
184
|
- `src/infrastructure/transport/grpc/sdk-call-error.ts` владеет классификацией gRPC, TLS, codec, receive-limit и cancellation errors, но не выполнением middleware или retry policy;
|
|
@@ -204,4 +206,4 @@ T-Invest proto-файлы копируются в `contracts/*.proto` с исх
|
|
|
204
206
|
4. при изменении вспомогательных contracts получить их из точного выпуска и обновить соответствующую запись `supportingSources`;
|
|
205
207
|
5. выполнить `local.generationCommand`, затем `npm run build`, `npm run lint` и `npm test`.
|
|
206
208
|
|
|
207
|
-
Proto generation читает только vendored snapshot и не обращается к сети. Compiler `protoc` и plugin `ts-proto` закреплены в dev-зависимостях, а команда запускает их из локального `node_modules`; системный `protoc` не нужен. Текущий generated snapshot создан с `protoc 36.
|
|
209
|
+
Proto generation читает только vendored snapshot и не обращается к сети. Compiler `protoc` и plugin `ts-proto` закреплены в dev-зависимостях, а команда запускает их из локального `node_modules`; системный `protoc` не нужен. Текущий generated snapshot создан с `protoc 36.2`.
|