ondc-code-generator 0.2.7 → 0.2.9

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.
@@ -47,6 +47,7 @@ export class ConfigCompiler {
47
47
  }
48
48
  };
49
49
  this.generateCode = async (valConfig, codeName = "L1-Validations") => {
50
+ valConfig = JSON.parse(JSON.stringify(valConfig));
50
51
  if (this.generatorConfig?.duplicateVariablesInChildren) {
51
52
  console.log("Duplicating variables");
52
53
  valConfig = duplicateVariablesInChildren(valConfig);
@@ -162,7 +162,7 @@ export class TypescriptGenerator extends CodeGenerator {
162
162
  .map((api) => `import ${api} from "./api-tests/${api}";`)
163
163
  .join("\n");
164
164
  const masterFunction = `
165
- export function perform${functionName}(action: string, payload: any,allErrors = false, externalData = {}) {
165
+ export function perform${functionName}(action: string, payload: any,allErrors = false, externalData : any = {}) {
166
166
  const normalizedPayload = normalizeKeys(payload);
167
167
  externalData._SELF = normalizedPayload;
168
168
  switch (action) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ondc-code-generator",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "generate code from build.yaml ",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",