@keshavsoft/tallyextract 1.7.1 → 1.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keshavsoft/tallyextract",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -3,17 +3,21 @@ import path from "path";
3
3
 
4
4
  import { fileURLToPath } from "url";
5
5
 
6
+ import templateJson from "../../Import/Templates/template.json" with {type: "json"};
7
+
6
8
  const startFunc = () => {
7
9
  try {
8
10
 
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
+ // const __filename = fileURLToPath(import.meta.url);
12
+ // const __dirname = path.dirname(__filename);
13
+
14
+ // const filePath = path.join(__dirname, "../../Import/Templates/template.json");
11
15
 
12
- const filePath = path.join(__dirname, "../../Import/Templates/template.json");
16
+ // let template = fs.readFileSync(filePath, "utf8");
13
17
 
14
- let template = fs.readFileSync(filePath, "utf8");
18
+ // let data = JSON.parse(template);
15
19
 
16
- let data = JSON.parse(template);
20
+ const data = structuredClone(templateJson);
17
21
 
18
22
  return data;
19
23
  } catch (err) {