@arrirpc/codegen-dart 0.80.1 → 0.80.3
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/index.cjs +21 -3
- package/dist/index.mjs +21 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
@@ -858,7 +858,8 @@ function dartHttpRpcFromSchema(schema, context) {
|
|
858
858
|
retryDelay: retryDelay,
|
859
859
|
maxRetryCount: maxRetryCount,
|
860
860
|
lastEventId: lastEventId,
|
861
|
-
heartbeatTimeoutMultiplier: heartbeatTimeoutMultiplier,
|
861
|
+
heartbeatTimeoutMultiplier: heartbeatTimeoutMultiplier ?? this._heartbeatTimeoutMultiplier,
|
862
|
+
timeout: _timeout,
|
862
863
|
${paramsType ? "params: params.toJson()," : ""}
|
863
864
|
parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : `{}`},
|
864
865
|
onMessage: onMessage,
|
@@ -887,6 +888,7 @@ function dartHttpRpcFromSchema(schema, context) {
|
|
887
888
|
${paramsType ? "params: params.toJson()," : ""}
|
888
889
|
parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : "{}"},
|
889
890
|
onError: _onError,
|
891
|
+
timeout: _timeout,
|
890
892
|
);
|
891
893
|
}`;
|
892
894
|
}
|
@@ -952,15 +954,21 @@ function dartServiceFromSchema(schema, context) {
|
|
952
954
|
final String _clientVersion = "${context.clientVersion}";
|
953
955
|
final FutureOr<Map<String, String>> Function()? _headers;
|
954
956
|
final Function(Object)? _onError;
|
957
|
+
final int? _heartbeatTimeoutMultiplier;
|
958
|
+
final Duration? _timeout;
|
955
959
|
${serviceName}({
|
956
960
|
http.Client? httpClient,
|
957
961
|
required String baseUrl,
|
958
962
|
FutureOr<Map<String, String>> Function()? headers,
|
959
963
|
Function(Object)? onError,
|
964
|
+
int? heartbeatTimeoutMultiplier,
|
965
|
+
Duration? timeout,
|
960
966
|
}) : _httpClient = httpClient,
|
961
967
|
_baseUrl = baseUrl,
|
962
968
|
_headers = headers,
|
963
|
-
_onError = onError
|
969
|
+
_onError = onError,
|
970
|
+
_heartbeatTimeoutMultiplier = heartbeatTimeoutMultiplier,
|
971
|
+
_timeout = timeout;
|
964
972
|
|
965
973
|
${rpcParts.join("\n\n")}
|
966
974
|
|
@@ -970,6 +978,8 @@ function dartServiceFromSchema(schema, context) {
|
|
970
978
|
headers: _headers,
|
971
979
|
httpClient: _httpClient,
|
972
980
|
onError: _onError,
|
981
|
+
heartbeatTimeoutMultiplier: _heartbeatTimeoutMultiplier,
|
982
|
+
timeout: _timeout,
|
973
983
|
);`
|
974
984
|
).join("\n\n")}
|
975
985
|
}
|
@@ -1178,15 +1188,21 @@ class ${clientName} {
|
|
1178
1188
|
final String _clientVersion = "${context.clientVersion ?? ""}";
|
1179
1189
|
final FutureOr<Map<String, String>> Function()? _headers;
|
1180
1190
|
final Function(Object)? _onError;
|
1191
|
+
final int? _heartbeatTimeoutMultiplier;
|
1192
|
+
final Duration? _timeout;
|
1181
1193
|
${clientName}({
|
1182
1194
|
http.Client? httpClient,
|
1183
1195
|
required String baseUrl,
|
1184
1196
|
FutureOr<Map<String, String>> Function()? headers,
|
1185
1197
|
Function(Object)? onError,
|
1198
|
+
int? heartbeatTimeoutMultiplier,
|
1199
|
+
Duration? timeout,
|
1186
1200
|
}) : _httpClient = httpClient,
|
1187
1201
|
_baseUrl = baseUrl,
|
1188
1202
|
_headers = headers,
|
1189
|
-
_onError = onError
|
1203
|
+
_onError = onError,
|
1204
|
+
_heartbeatTimeoutMultiplier = heartbeatTimeoutMultiplier,
|
1205
|
+
_timeout = timeout;
|
1190
1206
|
|
1191
1207
|
${rpcParts.join("\n\n")}
|
1192
1208
|
|
@@ -1196,6 +1212,8 @@ ${subServices.map(
|
|
1196
1212
|
headers: _headers,
|
1197
1213
|
httpClient: _httpClient,
|
1198
1214
|
onError: _onError,
|
1215
|
+
heartbeatTimeoutMultiplier: _heartbeatTimeoutMultiplier,
|
1216
|
+
timeout: _timeout,
|
1199
1217
|
);`
|
1200
1218
|
).join("\n\n")}
|
1201
1219
|
}
|
package/dist/index.mjs
CHANGED
@@ -851,7 +851,8 @@ function dartHttpRpcFromSchema(schema, context) {
|
|
851
851
|
retryDelay: retryDelay,
|
852
852
|
maxRetryCount: maxRetryCount,
|
853
853
|
lastEventId: lastEventId,
|
854
|
-
heartbeatTimeoutMultiplier: heartbeatTimeoutMultiplier,
|
854
|
+
heartbeatTimeoutMultiplier: heartbeatTimeoutMultiplier ?? this._heartbeatTimeoutMultiplier,
|
855
|
+
timeout: _timeout,
|
855
856
|
${paramsType ? "params: params.toJson()," : ""}
|
856
857
|
parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : `{}`},
|
857
858
|
onMessage: onMessage,
|
@@ -880,6 +881,7 @@ function dartHttpRpcFromSchema(schema, context) {
|
|
880
881
|
${paramsType ? "params: params.toJson()," : ""}
|
881
882
|
parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : "{}"},
|
882
883
|
onError: _onError,
|
884
|
+
timeout: _timeout,
|
883
885
|
);
|
884
886
|
}`;
|
885
887
|
}
|
@@ -945,15 +947,21 @@ function dartServiceFromSchema(schema, context) {
|
|
945
947
|
final String _clientVersion = "${context.clientVersion}";
|
946
948
|
final FutureOr<Map<String, String>> Function()? _headers;
|
947
949
|
final Function(Object)? _onError;
|
950
|
+
final int? _heartbeatTimeoutMultiplier;
|
951
|
+
final Duration? _timeout;
|
948
952
|
${serviceName}({
|
949
953
|
http.Client? httpClient,
|
950
954
|
required String baseUrl,
|
951
955
|
FutureOr<Map<String, String>> Function()? headers,
|
952
956
|
Function(Object)? onError,
|
957
|
+
int? heartbeatTimeoutMultiplier,
|
958
|
+
Duration? timeout,
|
953
959
|
}) : _httpClient = httpClient,
|
954
960
|
_baseUrl = baseUrl,
|
955
961
|
_headers = headers,
|
956
|
-
_onError = onError
|
962
|
+
_onError = onError,
|
963
|
+
_heartbeatTimeoutMultiplier = heartbeatTimeoutMultiplier,
|
964
|
+
_timeout = timeout;
|
957
965
|
|
958
966
|
${rpcParts.join("\n\n")}
|
959
967
|
|
@@ -963,6 +971,8 @@ function dartServiceFromSchema(schema, context) {
|
|
963
971
|
headers: _headers,
|
964
972
|
httpClient: _httpClient,
|
965
973
|
onError: _onError,
|
974
|
+
heartbeatTimeoutMultiplier: _heartbeatTimeoutMultiplier,
|
975
|
+
timeout: _timeout,
|
966
976
|
);`
|
967
977
|
).join("\n\n")}
|
968
978
|
}
|
@@ -1171,15 +1181,21 @@ class ${clientName} {
|
|
1171
1181
|
final String _clientVersion = "${context.clientVersion ?? ""}";
|
1172
1182
|
final FutureOr<Map<String, String>> Function()? _headers;
|
1173
1183
|
final Function(Object)? _onError;
|
1184
|
+
final int? _heartbeatTimeoutMultiplier;
|
1185
|
+
final Duration? _timeout;
|
1174
1186
|
${clientName}({
|
1175
1187
|
http.Client? httpClient,
|
1176
1188
|
required String baseUrl,
|
1177
1189
|
FutureOr<Map<String, String>> Function()? headers,
|
1178
1190
|
Function(Object)? onError,
|
1191
|
+
int? heartbeatTimeoutMultiplier,
|
1192
|
+
Duration? timeout,
|
1179
1193
|
}) : _httpClient = httpClient,
|
1180
1194
|
_baseUrl = baseUrl,
|
1181
1195
|
_headers = headers,
|
1182
|
-
_onError = onError
|
1196
|
+
_onError = onError,
|
1197
|
+
_heartbeatTimeoutMultiplier = heartbeatTimeoutMultiplier,
|
1198
|
+
_timeout = timeout;
|
1183
1199
|
|
1184
1200
|
${rpcParts.join("\n\n")}
|
1185
1201
|
|
@@ -1189,6 +1205,8 @@ ${subServices.map(
|
|
1189
1205
|
headers: _headers,
|
1190
1206
|
httpClient: _httpClient,
|
1191
1207
|
onError: _onError,
|
1208
|
+
heartbeatTimeoutMultiplier: _heartbeatTimeoutMultiplier,
|
1209
|
+
timeout: _timeout,
|
1192
1210
|
);`
|
1193
1211
|
).join("\n\n")}
|
1194
1212
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arrirpc/codegen-dart",
|
3
|
-
"version": "0.80.
|
3
|
+
"version": "0.80.3",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": {
|
@@ -23,6 +23,6 @@
|
|
23
23
|
],
|
24
24
|
"dependencies": {
|
25
25
|
"pathe": "^2.0.3",
|
26
|
-
"@arrirpc/codegen-utils": "0.80.
|
26
|
+
"@arrirpc/codegen-utils": "0.80.3"
|
27
27
|
}
|
28
28
|
}
|