ondc-code-generator 0.5.3 → 0.5.41

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.
@@ -98,15 +98,17 @@ export class ConfigCompiler {
98
98
  writeAndFormatCode(targetPath, `${schema}.json`, JSON.stringify(json, null, 2), "json");
99
99
  }
100
100
  }
101
- const actions = Object.keys(this.jsonSchemas).map((schema) => {
102
- return {
103
- action: schema,
104
- };
105
- });
106
- const template = readFileSync(path.resolve(__dirname, "../generator/generators/typescript/templates/schema-template.mustache"), "utf-8");
107
- console.log(actions);
108
- const l0 = Mustache.render(template, { actions });
109
- await writeAndFormatCode(`./generated/L0-schemas`, `index.ts`, l0, "typescript");
101
+ if (type === "typescript") {
102
+ const actions = Object.keys(this.jsonSchemas).map((schema) => {
103
+ return {
104
+ action: schema,
105
+ };
106
+ });
107
+ const template = readFileSync(path.resolve(__dirname, "../generator/generators/typescript/templates/schema-template.mustache"), "utf-8");
108
+ console.log(actions);
109
+ const l0 = Mustache.render(template, { actions });
110
+ await writeAndFormatCode(targetPath, `index.ts`, l0, "typescript");
111
+ }
110
112
  };
111
113
  this.generateValidPaths = async () => {
112
114
  if (!this.possibleJsonPaths)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ondc-code-generator",
3
- "version": "0.5.3",
3
+ "version": "0.5.41",
4
4
  "description": "generate code from build.yaml ",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",