ondc-code-generator 0.1.8 → 0.1.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.
package/dist/index.js CHANGED
@@ -1,23 +1,20 @@
1
1
  import { ConfigCompiler } from "./generator/config-compiler.js";
2
2
  export { ConfigCompiler };
3
- // import { readFileSync } from "fs";
4
- // import path from "path";
5
- // import { fileURLToPath } from "url";
6
- // const __filename = fileURLToPath(import.meta.url);
7
- // const __dirname = path.dirname(__filename);
8
- // import { SupportedLanguages } from "./types/compiler-types.js";
9
- // const main = async () => {
10
- // const compiler = new ConfigCompiler(SupportedLanguages.Typescript);
11
- // const buildPath = path.resolve(__dirname, "../samples/build.yaml");
12
- // const valConfigPath = path.resolve(
13
- // __dirname,
14
- // "../samples/validation-config.json"
15
- // );
16
- // const buildYaml = readFileSync(buildPath, "utf-8");
17
- // const valConfig = JSON.parse(readFileSync(valConfigPath, "utf-8"));
18
- // await compiler.initialize(buildYaml);
19
- // await compiler.generateCode(valConfig);
20
- // };
21
- // (async () => {
22
- // await main();
23
- // })();
3
+ import { readFileSync } from "fs";
4
+ import path from "path";
5
+ import { fileURLToPath } from "url";
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+ import { SupportedLanguages } from "./types/compiler-types.js";
9
+ const main = async () => {
10
+ const compiler = new ConfigCompiler(SupportedLanguages.Typescript);
11
+ const buildPath = path.resolve(__dirname, "../samples/build.yaml");
12
+ const valConfigPath = path.resolve(__dirname, "../samples/validation-config.json");
13
+ const buildYaml = readFileSync(buildPath, "utf-8");
14
+ const valConfig = JSON.parse(readFileSync(valConfigPath, "utf-8"));
15
+ await compiler.initialize(buildYaml);
16
+ await compiler.generateCode(valConfig);
17
+ };
18
+ (async () => {
19
+ await main();
20
+ })();
@@ -37,6 +37,6 @@ function duplicateVariables(test, parentVariables) {
37
37
  else {
38
38
  // console.log("adding variables", parentVariables, test);
39
39
  Object.assign(test, parentVariables);
40
- console.log(test);
40
+ // console.log(test);
41
41
  }
42
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ondc-code-generator",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "generate code from build.yaml ",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",