@arrirpc/codegen-dart 0.63.0 → 0.63.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +9 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
@@ -926,7 +926,8 @@ function dartServiceFromSchema(schema, context) {
|
|
926
926
|
modelPrefix: context.modelPrefix,
|
927
927
|
generatedTypes: context.generatedTypes,
|
928
928
|
instancePath: `${context.instancePath}.${key}`,
|
929
|
-
schemaPath: `${context.schemaPath}.${key}
|
929
|
+
schemaPath: `${context.schemaPath}.${key}`,
|
930
|
+
clientVersion: context.clientVersion
|
930
931
|
});
|
931
932
|
if (subSchemaResult) {
|
932
933
|
subServiceParts.push(subSchemaResult);
|
@@ -946,7 +947,8 @@ function dartServiceFromSchema(schema, context) {
|
|
946
947
|
modelPrefix: context.modelPrefix,
|
947
948
|
generatedTypes: context.generatedTypes,
|
948
949
|
instancePath: `${context.instancePath}.${key}`,
|
949
|
-
schemaPath: `${context.schemaPath}.${key}
|
950
|
+
schemaPath: `${context.schemaPath}.${key}`,
|
951
|
+
clientVersion: context.clientVersion
|
950
952
|
});
|
951
953
|
if (subSchemaResult) {
|
952
954
|
rpcParts.push(subSchemaResult);
|
@@ -960,7 +962,7 @@ function dartServiceFromSchema(schema, context) {
|
|
960
962
|
return `class ${serviceName}{
|
961
963
|
final http.Client? _httpClient;
|
962
964
|
final String _baseUrl;
|
963
|
-
final String _clientVersion = "${context.clientVersion
|
965
|
+
final String _clientVersion = "${context.clientVersion}";
|
964
966
|
late final FutureOr<Map<String, String>> Function()? _headers;
|
965
967
|
${serviceName}({
|
966
968
|
http.Client? httpClient,
|
@@ -1112,7 +1114,7 @@ function createDartClient(def, options) {
|
|
1112
1114
|
generatedTypes: [],
|
1113
1115
|
instancePath: "",
|
1114
1116
|
schemaPath: "",
|
1115
|
-
clientVersion: def.info?.version
|
1117
|
+
clientVersion: def.info?.version ?? ""
|
1116
1118
|
};
|
1117
1119
|
const services = codegenUtils.unflattenProcedures(def.procedures);
|
1118
1120
|
const subServices = [];
|
@@ -1144,7 +1146,8 @@ function createDartClient(def, options) {
|
|
1144
1146
|
modelPrefix: context.modelPrefix,
|
1145
1147
|
generatedTypes: context.generatedTypes,
|
1146
1148
|
instancePath: key,
|
1147
|
-
schemaPath: `procedures.${key}
|
1149
|
+
schemaPath: `procedures.${key}`,
|
1150
|
+
clientVersion: context.clientVersion
|
1148
1151
|
});
|
1149
1152
|
if (rpc) {
|
1150
1153
|
rpcParts.push(rpc);
|
@@ -1159,6 +1162,7 @@ function createDartClient(def, options) {
|
|
1159
1162
|
clientName: context.clientName,
|
1160
1163
|
modelPrefix: context.modelPrefix,
|
1161
1164
|
generatedTypes: context.generatedTypes,
|
1165
|
+
clientVersion: context.clientVersion,
|
1162
1166
|
instancePath: `/${key}`,
|
1163
1167
|
schemaPath: `/${key}`
|
1164
1168
|
});
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
@@ -919,7 +919,8 @@ function dartServiceFromSchema(schema, context) {
|
|
919
919
|
modelPrefix: context.modelPrefix,
|
920
920
|
generatedTypes: context.generatedTypes,
|
921
921
|
instancePath: `${context.instancePath}.${key}`,
|
922
|
-
schemaPath: `${context.schemaPath}.${key}
|
922
|
+
schemaPath: `${context.schemaPath}.${key}`,
|
923
|
+
clientVersion: context.clientVersion
|
923
924
|
});
|
924
925
|
if (subSchemaResult) {
|
925
926
|
subServiceParts.push(subSchemaResult);
|
@@ -939,7 +940,8 @@ function dartServiceFromSchema(schema, context) {
|
|
939
940
|
modelPrefix: context.modelPrefix,
|
940
941
|
generatedTypes: context.generatedTypes,
|
941
942
|
instancePath: `${context.instancePath}.${key}`,
|
942
|
-
schemaPath: `${context.schemaPath}.${key}
|
943
|
+
schemaPath: `${context.schemaPath}.${key}`,
|
944
|
+
clientVersion: context.clientVersion
|
943
945
|
});
|
944
946
|
if (subSchemaResult) {
|
945
947
|
rpcParts.push(subSchemaResult);
|
@@ -953,7 +955,7 @@ function dartServiceFromSchema(schema, context) {
|
|
953
955
|
return `class ${serviceName}{
|
954
956
|
final http.Client? _httpClient;
|
955
957
|
final String _baseUrl;
|
956
|
-
final String _clientVersion = "${context.clientVersion
|
958
|
+
final String _clientVersion = "${context.clientVersion}";
|
957
959
|
late final FutureOr<Map<String, String>> Function()? _headers;
|
958
960
|
${serviceName}({
|
959
961
|
http.Client? httpClient,
|
@@ -1105,7 +1107,7 @@ function createDartClient(def, options) {
|
|
1105
1107
|
generatedTypes: [],
|
1106
1108
|
instancePath: "",
|
1107
1109
|
schemaPath: "",
|
1108
|
-
clientVersion: def.info?.version
|
1110
|
+
clientVersion: def.info?.version ?? ""
|
1109
1111
|
};
|
1110
1112
|
const services = unflattenProcedures(def.procedures);
|
1111
1113
|
const subServices = [];
|
@@ -1137,7 +1139,8 @@ function createDartClient(def, options) {
|
|
1137
1139
|
modelPrefix: context.modelPrefix,
|
1138
1140
|
generatedTypes: context.generatedTypes,
|
1139
1141
|
instancePath: key,
|
1140
|
-
schemaPath: `procedures.${key}
|
1142
|
+
schemaPath: `procedures.${key}`,
|
1143
|
+
clientVersion: context.clientVersion
|
1141
1144
|
});
|
1142
1145
|
if (rpc) {
|
1143
1146
|
rpcParts.push(rpc);
|
@@ -1152,6 +1155,7 @@ function createDartClient(def, options) {
|
|
1152
1155
|
clientName: context.clientName,
|
1153
1156
|
modelPrefix: context.modelPrefix,
|
1154
1157
|
generatedTypes: context.generatedTypes,
|
1158
|
+
clientVersion: context.clientVersion,
|
1155
1159
|
instancePath: `/${key}`,
|
1156
1160
|
schemaPath: `/${key}`
|
1157
1161
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arrirpc/codegen-dart",
|
3
|
-
"version": "0.63.
|
3
|
+
"version": "0.63.2",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": {
|
@@ -23,6 +23,6 @@
|
|
23
23
|
],
|
24
24
|
"dependencies": {
|
25
25
|
"pathe": "^1.1.2",
|
26
|
-
"@arrirpc/codegen-utils": "0.63.
|
26
|
+
"@arrirpc/codegen-utils": "0.63.2"
|
27
27
|
}
|
28
28
|
}
|