@arrirpc/codegen-dart 0.69.1 → 0.70.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs CHANGED
@@ -168,8 +168,7 @@ function getDartClassName(schema, context) {
168
168
  );
169
169
  }
170
170
  function getCodeComments(metadata, leading) {
171
- if (!metadata?.description && !metadata?.isDeprecated)
172
- return "";
171
+ if (!metadata?.description && !metadata?.isDeprecated) return "";
173
172
  if (!metadata.description && metadata.isDeprecated) {
174
173
  return `${leading ?? ""}@deprecated
175
174
  `;
@@ -215,7 +214,8 @@ function dartListFromSchema(schema, context) {
215
214
  modelPrefix: context.modelPrefix,
216
215
  generatedTypes: context.generatedTypes,
217
216
  instancePath: `${context.instancePath}/[Element]`,
218
- schemaPath: `${context.schemaPath}/elements`
217
+ schemaPath: `${context.schemaPath}/elements`,
218
+ clientVersion: context.clientVersion
219
219
  });
220
220
  const typeName = isNullable ? `List<${innerType.typeName}>?` : `List<${innerType.typeName}>`;
221
221
  const defaultValue = isNullable ? "null" : "[]";
@@ -868,13 +868,13 @@ function dartHttpRpcFromSchema(schema, context) {
868
868
  onClose: onClose,
869
869
  onError: onError != null && _onError != null
870
870
  ? (err, es) {
871
- _onError?.call(onError);
871
+ _onError.call(onError);
872
872
  return onError(err, es);
873
873
  }
874
874
  : onError != null
875
875
  ? onError
876
876
  : _onError != null
877
- ? (err, _) => _onError?.call(err)
877
+ ? (err, _) => _onError.call(err)
878
878
  : null,
879
879
  );
880
880
  }`;
package/dist/index.mjs CHANGED
@@ -161,8 +161,7 @@ function getDartClassName(schema, context) {
161
161
  );
162
162
  }
163
163
  function getCodeComments(metadata, leading) {
164
- if (!metadata?.description && !metadata?.isDeprecated)
165
- return "";
164
+ if (!metadata?.description && !metadata?.isDeprecated) return "";
166
165
  if (!metadata.description && metadata.isDeprecated) {
167
166
  return `${leading ?? ""}@deprecated
168
167
  `;
@@ -208,7 +207,8 @@ function dartListFromSchema(schema, context) {
208
207
  modelPrefix: context.modelPrefix,
209
208
  generatedTypes: context.generatedTypes,
210
209
  instancePath: `${context.instancePath}/[Element]`,
211
- schemaPath: `${context.schemaPath}/elements`
210
+ schemaPath: `${context.schemaPath}/elements`,
211
+ clientVersion: context.clientVersion
212
212
  });
213
213
  const typeName = isNullable ? `List<${innerType.typeName}>?` : `List<${innerType.typeName}>`;
214
214
  const defaultValue = isNullable ? "null" : "[]";
@@ -861,13 +861,13 @@ function dartHttpRpcFromSchema(schema, context) {
861
861
  onClose: onClose,
862
862
  onError: onError != null && _onError != null
863
863
  ? (err, es) {
864
- _onError?.call(onError);
864
+ _onError.call(onError);
865
865
  return onError(err, es);
866
866
  }
867
867
  : onError != null
868
868
  ? onError
869
869
  : _onError != null
870
- ? (err, _) => _onError?.call(err)
870
+ ? (err, _) => _onError.call(err)
871
871
  : null,
872
872
  );
873
873
  }`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-dart",
3
- "version": "0.69.1",
3
+ "version": "0.70.1",
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.69.1"
26
+ "@arrirpc/codegen-utils": "0.70.1"
27
27
  }
28
28
  }