@arrirpc/codegen-ts 0.63.1 → 0.63.3

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 CHANGED
@@ -68,9 +68,12 @@ function getTsTypeName(schema, context) {
68
68
  );
69
69
  return validVarName(name2);
70
70
  }
71
- const name = codegenUtils.pascalCase(context.instancePath.split("/").join("_"), {
72
- normalize: true
73
- });
71
+ const name = codegenUtils.pascalCase(
72
+ context.instancePath.split("/").join("_").split("[").join("_").split("]").join("_"),
73
+ {
74
+ normalize: true
75
+ }
76
+ );
74
77
  return validVarName(name);
75
78
  }
76
79
 
@@ -824,7 +827,7 @@ function tsRecordFromSchema(schema, context) {
824
827
  if (${countVal} !== 0) {
825
828
  ${target} += ',';
826
829
  }
827
- ${target} += \`"\${_key}":\`;
830
+ ${target} += \`\${serializeString(_key)}:\`;
828
831
  ${innerType.toJsonTemplate("_value", target, "_key")}
829
832
  ${countVal}++;
830
833
  }
@@ -839,7 +842,7 @@ function tsRecordFromSchema(schema, context) {
839
842
  if (${countVal} !== 0) {
840
843
  ${target} += ',';
841
844
  }
842
- ${target} += \`"\${_key}":\`;
845
+ ${target} += \`\${serializeString(_key)}:\`;
843
846
  ${innerType.toJsonTemplate("_value", target, "_key")};
844
847
  ${countVal}++;
845
848
  }
package/dist/index.mjs CHANGED
@@ -62,9 +62,12 @@ function getTsTypeName(schema, context) {
62
62
  );
63
63
  return validVarName(name2);
64
64
  }
65
- const name = pascalCase(context.instancePath.split("/").join("_"), {
66
- normalize: true
67
- });
65
+ const name = pascalCase(
66
+ context.instancePath.split("/").join("_").split("[").join("_").split("]").join("_"),
67
+ {
68
+ normalize: true
69
+ }
70
+ );
68
71
  return validVarName(name);
69
72
  }
70
73
 
@@ -818,7 +821,7 @@ function tsRecordFromSchema(schema, context) {
818
821
  if (${countVal} !== 0) {
819
822
  ${target} += ',';
820
823
  }
821
- ${target} += \`"\${_key}":\`;
824
+ ${target} += \`\${serializeString(_key)}:\`;
822
825
  ${innerType.toJsonTemplate("_value", target, "_key")}
823
826
  ${countVal}++;
824
827
  }
@@ -833,7 +836,7 @@ function tsRecordFromSchema(schema, context) {
833
836
  if (${countVal} !== 0) {
834
837
  ${target} += ',';
835
838
  }
836
- ${target} += \`"\${_key}":\`;
839
+ ${target} += \`\${serializeString(_key)}:\`;
837
840
  ${innerType.toJsonTemplate("_value", target, "_key")};
838
841
  ${countVal}++;
839
842
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-ts",
3
- "version": "0.63.1",
3
+ "version": "0.63.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "prettier": "^3.3.3",
26
- "@arrirpc/codegen-utils": "0.63.1"
26
+ "@arrirpc/codegen-utils": "0.63.3"
27
27
  },
28
28
  "devDependencies": {}
29
29
  }