@amanat-qa/utils-backend 5.1.3 → 5.2.0

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.
@@ -45,6 +45,9 @@ var generateJSONLoader = function generateJSONLoader(filePath, directory, extens
45
45
  var files = _getFiles(directory, extension);
46
46
  var classInit = generateClassInit(files, directory);
47
47
  var classExport = '}\n\nmodule.exports = JSONLoader;';
48
+ fs.mkdirSync(path.dirname(filePath), {
49
+ recursive: true
50
+ });
48
51
  fs.writeFileSync(filePath, classInit + classExport);
49
52
  };
50
53
  var setConfigData = function setConfigData(directory, extension) {
@@ -70,14 +70,10 @@ var TimeUtils = /*#__PURE__*/function () {
70
70
  return moment(date, DateFormats.MDY).format(DateFormats.DMY);
71
71
  }
72
72
  }, {
73
- key: "dateFormats",
74
- value: function dateFormats() {
75
- return DateFormats;
76
- }
77
- }, {
78
- key: "testMethod",
79
- value: function testMethod() {
80
- return DateFormats;
73
+ key: "today",
74
+ value: function today() {
75
+ var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DateFormats.DMY;
76
+ return moment().format(format);
81
77
  }
82
78
  }]);
83
79
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amanat-qa/utils-backend",
3
- "version": "5.1.3",
3
+ "version": "5.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },