ondc-code-generator 0.0.9 → 0.1.1

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.
@@ -68,7 +68,7 @@ export class ConfigCompiler {
68
68
  const template = readFileSync("/Users/rudranshsinghal/ondc/automation-utility/official-code/code-generator/src/generator/generators/typescript/templates/schema-template.mustache", "utf-8");
69
69
  console.log(actions);
70
70
  const l0 = Mustache.render(template, { actions });
71
- writeAndFormatCode(`./generated/L0-schemas`, `index.ts`, l0, "typescript");
71
+ await writeAndFormatCode(`./generated/L0-schemas`, `index.ts`, l0, "typescript");
72
72
  };
73
73
  this.language = language;
74
74
  this.SchemaExtactionService = new SchemaExtactionService();
@@ -156,6 +156,7 @@ export class TypescriptGenerator extends CodeGenerator {
156
156
  return result;
157
157
  }
158
158
  generateIndexFile(apis, functionName = "L1Validations") {
159
+ functionName = functionName.replace(/[^a-zA-Z0-9_]/g, "");
159
160
  const importsCode = apis
160
161
  .map((api) => `import ${api} from "./api-tests/${api}";`)
161
162
  .join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ondc-code-generator",
3
- "version": "0.0.9",
3
+ "version": "0.1.1",
4
4
  "description": "generate code from build.yaml ",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",