@arrirpc/codegen-dart 0.71.1 → 0.72.0
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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -579,7 +579,7 @@ ${subContentParts.join("\n\n")}`;
|
|
|
579
579
|
function dartEnumFromSchema(schema, context) {
|
|
580
580
|
const isNullable = outputIsNullable(schema, context);
|
|
581
581
|
const enumName = getDartClassName(schema, context);
|
|
582
|
-
const typeName = isNullable ? `${enumName}?` : enumName
|
|
582
|
+
const typeName = isNullable ? `${context.modelPrefix}${enumName}?` : `${context.modelPrefix}${enumName}`;
|
|
583
583
|
const enumValues = schema.enum.map((val) => ({
|
|
584
584
|
name: codegenUtils.camelCase(val, { normalize: true }),
|
|
585
585
|
serialValue: val
|
|
@@ -639,7 +639,7 @@ ${enumValues.map((val) => ` ${val.name}("${val.serialValue}")`).join(",\n")};
|
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
@override
|
|
642
|
-
int compareTo(${enumName} other) => name.compareTo(other.name);
|
|
642
|
+
int compareTo(${context.modelPrefix}${enumName} other) => name.compareTo(other.name);
|
|
643
643
|
}`;
|
|
644
644
|
context.generatedTypes.push(enumName);
|
|
645
645
|
return output;
|
package/dist/index.mjs
CHANGED
|
@@ -572,7 +572,7 @@ ${subContentParts.join("\n\n")}`;
|
|
|
572
572
|
function dartEnumFromSchema(schema, context) {
|
|
573
573
|
const isNullable = outputIsNullable(schema, context);
|
|
574
574
|
const enumName = getDartClassName(schema, context);
|
|
575
|
-
const typeName = isNullable ? `${enumName}?` : enumName
|
|
575
|
+
const typeName = isNullable ? `${context.modelPrefix}${enumName}?` : `${context.modelPrefix}${enumName}`;
|
|
576
576
|
const enumValues = schema.enum.map((val) => ({
|
|
577
577
|
name: camelCase(val, { normalize: true }),
|
|
578
578
|
serialValue: val
|
|
@@ -632,7 +632,7 @@ ${enumValues.map((val) => ` ${val.name}("${val.serialValue}")`).join(",\n")};
|
|
|
632
632
|
}
|
|
633
633
|
|
|
634
634
|
@override
|
|
635
|
-
int compareTo(${enumName} other) => name.compareTo(other.name);
|
|
635
|
+
int compareTo(${context.modelPrefix}${enumName} other) => name.compareTo(other.name);
|
|
636
636
|
}`;
|
|
637
637
|
context.generatedTypes.push(enumName);
|
|
638
638
|
return output;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arrirpc/codegen-dart",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
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.1",
|
|
26
|
-
"@arrirpc/codegen-utils": "0.
|
|
26
|
+
"@arrirpc/codegen-utils": "0.72.0"
|
|
27
27
|
}
|
|
28
28
|
}
|