@arrirpc/codegen-dart 0.74.0 → 0.74.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +2 -9
- package/dist/index.mjs +2 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
@@ -581,7 +581,7 @@ function dartEnumFromSchema(schema, context) {
|
|
581
581
|
const enumName = getDartClassName(schema, context);
|
582
582
|
const typeName = isNullable ? `${context.modelPrefix}${enumName}?` : `${context.modelPrefix}${enumName}`;
|
583
583
|
const enumValues = schema.enum.map((val) => ({
|
584
|
-
name: codegenUtils.camelCase(val, { normalize: true }),
|
584
|
+
name: validDartIdentifier(codegenUtils.camelCase(val, { normalize: true })),
|
585
585
|
serialValue: val
|
586
586
|
}));
|
587
587
|
if (!enumValues.length) {
|
@@ -1131,8 +1131,6 @@ function createDartClient(def, options) {
|
|
1131
1131
|
clientName: options.clientName ?? "Client",
|
1132
1132
|
modelPrefix: options.typePrefix ?? "",
|
1133
1133
|
generatedTypes: [],
|
1134
|
-
instancePath: "",
|
1135
|
-
schemaPath: "",
|
1136
1134
|
clientVersion: def.info?.version ?? ""
|
1137
1135
|
};
|
1138
1136
|
const services = codegenUtils.unflattenProcedures(def.procedures);
|
@@ -1161,13 +1159,8 @@ function createDartClient(def, options) {
|
|
1161
1159
|
}
|
1162
1160
|
if (codegenUtils.isRpcDefinition(subSchema)) {
|
1163
1161
|
const rpc = dartRpcFromSchema(subSchema, {
|
1164
|
-
clientName: context.clientName,
|
1165
1162
|
modelPrefix: context.modelPrefix,
|
1166
|
-
|
1167
|
-
instancePath: key,
|
1168
|
-
schemaPath: `procedures.${key}`,
|
1169
|
-
clientVersion: context.clientVersion
|
1170
|
-
});
|
1163
|
+
instancePath: key});
|
1171
1164
|
if (rpc) {
|
1172
1165
|
rpcParts.push(rpc);
|
1173
1166
|
}
|
package/dist/index.mjs
CHANGED
@@ -574,7 +574,7 @@ function dartEnumFromSchema(schema, context) {
|
|
574
574
|
const enumName = getDartClassName(schema, context);
|
575
575
|
const typeName = isNullable ? `${context.modelPrefix}${enumName}?` : `${context.modelPrefix}${enumName}`;
|
576
576
|
const enumValues = schema.enum.map((val) => ({
|
577
|
-
name: camelCase(val, { normalize: true }),
|
577
|
+
name: validDartIdentifier(camelCase(val, { normalize: true })),
|
578
578
|
serialValue: val
|
579
579
|
}));
|
580
580
|
if (!enumValues.length) {
|
@@ -1124,8 +1124,6 @@ function createDartClient(def, options) {
|
|
1124
1124
|
clientName: options.clientName ?? "Client",
|
1125
1125
|
modelPrefix: options.typePrefix ?? "",
|
1126
1126
|
generatedTypes: [],
|
1127
|
-
instancePath: "",
|
1128
|
-
schemaPath: "",
|
1129
1127
|
clientVersion: def.info?.version ?? ""
|
1130
1128
|
};
|
1131
1129
|
const services = unflattenProcedures(def.procedures);
|
@@ -1154,13 +1152,8 @@ function createDartClient(def, options) {
|
|
1154
1152
|
}
|
1155
1153
|
if (isRpcDefinition(subSchema)) {
|
1156
1154
|
const rpc = dartRpcFromSchema(subSchema, {
|
1157
|
-
clientName: context.clientName,
|
1158
1155
|
modelPrefix: context.modelPrefix,
|
1159
|
-
|
1160
|
-
instancePath: key,
|
1161
|
-
schemaPath: `procedures.${key}`,
|
1162
|
-
clientVersion: context.clientVersion
|
1163
|
-
});
|
1156
|
+
instancePath: key});
|
1164
1157
|
if (rpc) {
|
1165
1158
|
rpcParts.push(rpc);
|
1166
1159
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arrirpc/codegen-dart",
|
3
|
-
"version": "0.74.
|
3
|
+
"version": "0.74.1",
|
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.2",
|
26
|
-
"@arrirpc/codegen-utils": "0.74.
|
26
|
+
"@arrirpc/codegen-utils": "0.74.1"
|
27
27
|
}
|
28
28
|
}
|