dymo-api 1.0.2 → 1.0.3

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/config.cjs ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ lib: {
3
+ name: "Dymo API",
4
+ dir: "dymo-api"
5
+ }
6
+ }
package/lib/dymo-api.cjs CHANGED
@@ -1,6 +1,5 @@
1
- const fs = require("fs");
2
1
  const axios = require("axios");
3
- const config = JSON.parse(fs.readFileSync('../config.json', 'utf8'));
2
+ const config = require("../config.cjs");
4
3
  const customError = (code, message) => Object.assign(new Error(), { code, message: `[${config.lib.name}] ${message}` });
5
4
 
6
5
  /* INTERNALS */
@@ -1,6 +1,5 @@
1
- const fs = require("fs");
2
1
  const axios = require("axios");
3
- const config = JSON.parse(fs.readFileSync('../config.json', 'utf8'));
2
+ const config = require("../config.cjs");
4
3
  const customError = (code, message) => Object.assign(new Error(), { code, message: `[${config.lib.name}] ${message}` });
5
4
 
6
5
  exports.isValidData = async (token, data) => {
@@ -1,6 +1,5 @@
1
- const fs = require("fs");
2
1
  const axios = require("axios");
3
- const config = JSON.parse(fs.readFileSync('../config.json', 'utf8'));
2
+ const config = require("../config.cjs");
4
3
  const customError = (code, message) => Object.assign(new Error(), { code, message: `[${config.lib.name}] ${message}` });
5
4
 
6
5
  exports.getPrayerTimes = async (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dymo-api",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Flow system for Dymo API.",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/config.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "lib": {
3
- "name": "Dymo API",
4
- "dir": "dymo-api"
5
- }
6
- }