atmx-cli 0.49.0 → 0.51.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.
@@ -5,6 +5,7 @@ const utils_1 = require("./utils");
5
5
  function generateModels(multiIr) {
6
6
  const sections = [
7
7
  `// GENERATED CODE – DO NOT EDIT.\n/* eslint-disable @typescript-eslint/no-explicit-any */\n`,
8
+ `/* eslint-disable @typescript-eslint/no-namespace */\n`, // ✨ FIX: Disable namespace lint error
8
9
  ];
9
10
  for (const [ns, ir] of Object.entries(multiIr)) {
10
11
  const camelNs = (0, utils_1.camelCase)(ns);
@@ -55,7 +55,6 @@ function normalizeIr(obj) {
55
55
  }
56
56
  return obj;
57
57
  }
58
- // ✨ FIX: Properly maps all Axiom primitives to TypeScript
59
58
  function mapTypeToTs(typeRef, ns) {
60
59
  if (!typeRef || !typeRef.kind)
61
60
  return "any";
@@ -73,10 +72,10 @@ function mapTypeToTs(typeRef, ns) {
73
72
  return "Date";
74
73
  case "bytes":
75
74
  return "Uint8Array";
76
- case "json":
77
- return "any";
78
75
  case "void":
79
76
  return "void";
77
+ case "json":
78
+ return "any";
80
79
  case "named":
81
80
  const name = pascalCase(typeRef.value);
82
81
  return ns ? `${ns}.${name}` : name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atmx-cli",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ import { pascalCase, camelCase, mapTypeToTs } from "./utils";
5
5
  export function generateModels(multiIr: MultiIR): string {
6
6
  const sections: string[] = [
7
7
  `// GENERATED CODE – DO NOT EDIT.\n/* eslint-disable @typescript-eslint/no-explicit-any */\n`,
8
+ `/* eslint-disable @typescript-eslint/no-namespace */\n`, // ✨ FIX: Disable namespace lint error
8
9
  ];
9
10
 
10
11
  for (const [ns, ir] of Object.entries(multiIr)) {
@@ -58,7 +58,6 @@ export function normalizeIr(obj: any): any {
58
58
  return obj;
59
59
  }
60
60
 
61
- // ✨ FIX: Properly maps all Axiom primitives to TypeScript
62
61
  export function mapTypeToTs(typeRef: any, ns?: string): string {
63
62
  if (!typeRef || !typeRef.kind) return "any";
64
63
 
@@ -76,10 +75,10 @@ export function mapTypeToTs(typeRef: any, ns?: string): string {
76
75
  return "Date";
77
76
  case "bytes":
78
77
  return "Uint8Array";
79
- case "json":
80
- return "any";
81
78
  case "void":
82
79
  return "void";
80
+ case "json":
81
+ return "any";
83
82
  case "named":
84
83
  const name = pascalCase(typeRef.value);
85
84
  return ns ? `${ns}.${name}` : name;