atmx-cli 0.68.0 → 0.70.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.
|
@@ -25,17 +25,17 @@ function generateSdk(multiIr, isReact = false) {
|
|
|
25
25
|
lines.push(` clearAuthToken(methodName: string) {`);
|
|
26
26
|
lines.push(` clearAuthToken("${ns}", methodName);`);
|
|
27
27
|
lines.push(` },`);
|
|
28
|
-
// ✨ FIX: Use the top-level axiomQueryManager instead of require()
|
|
29
28
|
lines.push(` connect(methodName: string, args?: Record<string, any>) {`);
|
|
30
|
-
|
|
29
|
+
// ✨ FIX: Use the specific module name instead of 'this'
|
|
30
|
+
lines.push(` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`);
|
|
31
31
|
lines.push(` axiomQueryManager.connect(def);`);
|
|
32
32
|
lines.push(` },`);
|
|
33
33
|
lines.push(` disconnect(methodName: string, args?: Record<string, any>) {`);
|
|
34
|
-
lines.push(` const def = (
|
|
34
|
+
lines.push(` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`);
|
|
35
35
|
lines.push(` axiomQueryManager.disconnect(def);`);
|
|
36
36
|
lines.push(` },`);
|
|
37
37
|
lines.push(` send(methodName: string, payload: any, args?: Record<string, any>) {`);
|
|
38
|
-
lines.push(` const def = (
|
|
38
|
+
lines.push(` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`);
|
|
39
39
|
lines.push(` axiomQueryManager.send(def, payload);`);
|
|
40
40
|
lines.push(` }`);
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -33,12 +33,12 @@ export function generateSdk(
|
|
|
33
33
|
lines.push(` clearAuthToken(methodName: string) {`);
|
|
34
34
|
lines.push(` clearAuthToken("${ns}", methodName);`);
|
|
35
35
|
lines.push(` },`);
|
|
36
|
-
// ✨ FIX: Use the top-level axiomQueryManager instead of require()
|
|
37
36
|
lines.push(
|
|
38
37
|
` connect(methodName: string, args?: Record<string, any>) {`,
|
|
39
38
|
);
|
|
39
|
+
// ✨ FIX: Use the specific module name instead of 'this'
|
|
40
40
|
lines.push(
|
|
41
|
-
` const def = (
|
|
41
|
+
` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`,
|
|
42
42
|
);
|
|
43
43
|
lines.push(` axiomQueryManager.connect(def);`);
|
|
44
44
|
lines.push(` },`);
|
|
@@ -46,7 +46,7 @@ export function generateSdk(
|
|
|
46
46
|
` disconnect(methodName: string, args?: Record<string, any>) {`,
|
|
47
47
|
);
|
|
48
48
|
lines.push(
|
|
49
|
-
` const def = (
|
|
49
|
+
` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`,
|
|
50
50
|
);
|
|
51
51
|
lines.push(` axiomQueryManager.disconnect(def);`);
|
|
52
52
|
lines.push(` },`);
|
|
@@ -54,7 +54,7 @@ export function generateSdk(
|
|
|
54
54
|
` send(methodName: string, payload: any, args?: Record<string, any>) {`,
|
|
55
55
|
);
|
|
56
56
|
lines.push(
|
|
57
|
-
` const def = (
|
|
57
|
+
` const def = (${camelNs}Module as any)[\`get\${methodName.charAt(0).toUpperCase() + methodName.slice(1)}Def\`](args);`,
|
|
58
58
|
);
|
|
59
59
|
lines.push(` axiomQueryManager.send(def, payload);`);
|
|
60
60
|
lines.push(` }`);
|