@arrirpc/codegen-dart 0.70.1 → 0.71.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs CHANGED
@@ -320,7 +320,8 @@ function dartClassFromSchema(schema, context) {
320
320
  modelPrefix: context.modelPrefix,
321
321
  generatedTypes: context.generatedTypes,
322
322
  instancePath: `/${className}/${key}`,
323
- schemaPath: `${context.schemaPath}/properties/${key}`
323
+ schemaPath: `${context.schemaPath}/properties/${key}`,
324
+ clientVersion: context.clientVersion
324
325
  });
325
326
  const propName = validDartIdentifier(key);
326
327
  propNames.push(propName);
@@ -368,7 +369,8 @@ function dartClassFromSchema(schema, context) {
368
369
  generatedTypes: context.generatedTypes,
369
370
  instancePath: `/${className}/${key}`,
370
371
  schemaPath: `${context.schemaPath}/optionalProperties/${key}`,
371
- isOptional: true
372
+ isOptional: true,
373
+ clientVersion: context.clientVersion
372
374
  });
373
375
  const propName = validDartIdentifier(key);
374
376
  propNames.push(propName);
@@ -500,7 +502,8 @@ function dartSealedClassFromSchema(schema, context) {
500
502
  schemaPath: `${context.schemaPath}/mapping/${key}`,
501
503
  discriminatorKey,
502
504
  discriminatorValue,
503
- discriminatorParentId: className
505
+ discriminatorParentId: className,
506
+ clientVersion: context.clientVersion
504
507
  });
505
508
  subTypeParts.push({
506
509
  name: subTypeResult.typeName,
@@ -1013,7 +1016,8 @@ function dartMapFromSchema(schema, context) {
1013
1016
  modelPrefix: context.modelPrefix,
1014
1017
  generatedTypes: context.generatedTypes,
1015
1018
  instancePath: `${context.instancePath}/[entry]`,
1016
- schemaPath: `${context.schemaPath}/values`
1019
+ schemaPath: `${context.schemaPath}/values`,
1020
+ clientVersion: context.clientVersion
1017
1021
  });
1018
1022
  const typeName = isNullable ? `Map<String, ${innerType.typeName}>?` : `Map<String, ${innerType.typeName}>`;
1019
1023
  const defaultValue = isNullable ? "null" : "{}";
package/dist/index.mjs CHANGED
@@ -313,7 +313,8 @@ function dartClassFromSchema(schema, context) {
313
313
  modelPrefix: context.modelPrefix,
314
314
  generatedTypes: context.generatedTypes,
315
315
  instancePath: `/${className}/${key}`,
316
- schemaPath: `${context.schemaPath}/properties/${key}`
316
+ schemaPath: `${context.schemaPath}/properties/${key}`,
317
+ clientVersion: context.clientVersion
317
318
  });
318
319
  const propName = validDartIdentifier(key);
319
320
  propNames.push(propName);
@@ -361,7 +362,8 @@ function dartClassFromSchema(schema, context) {
361
362
  generatedTypes: context.generatedTypes,
362
363
  instancePath: `/${className}/${key}`,
363
364
  schemaPath: `${context.schemaPath}/optionalProperties/${key}`,
364
- isOptional: true
365
+ isOptional: true,
366
+ clientVersion: context.clientVersion
365
367
  });
366
368
  const propName = validDartIdentifier(key);
367
369
  propNames.push(propName);
@@ -493,7 +495,8 @@ function dartSealedClassFromSchema(schema, context) {
493
495
  schemaPath: `${context.schemaPath}/mapping/${key}`,
494
496
  discriminatorKey,
495
497
  discriminatorValue,
496
- discriminatorParentId: className
498
+ discriminatorParentId: className,
499
+ clientVersion: context.clientVersion
497
500
  });
498
501
  subTypeParts.push({
499
502
  name: subTypeResult.typeName,
@@ -1006,7 +1009,8 @@ function dartMapFromSchema(schema, context) {
1006
1009
  modelPrefix: context.modelPrefix,
1007
1010
  generatedTypes: context.generatedTypes,
1008
1011
  instancePath: `${context.instancePath}/[entry]`,
1009
- schemaPath: `${context.schemaPath}/values`
1012
+ schemaPath: `${context.schemaPath}/values`,
1013
+ clientVersion: context.clientVersion
1010
1014
  });
1011
1015
  const typeName = isNullable ? `Map<String, ${innerType.typeName}>?` : `Map<String, ${innerType.typeName}>`;
1012
1016
  const defaultValue = isNullable ? "null" : "{}";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-dart",
3
- "version": "0.70.1",
3
+ "version": "0.71.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "pathe": "^1.1.2",
26
- "@arrirpc/codegen-utils": "0.70.1"
25
+ "pathe": "^2.0.1",
26
+ "@arrirpc/codegen-utils": "0.71.0"
27
27
  }
28
28
  }