@e-mc/module 0.7.0 → 0.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/lib-v4.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { IModuleLibV4 } from '../types/lib/compat-v4';
2
-
3
- declare const LibV4: IModuleLibV4;
4
-
1
+ import type { IModuleLibV4 } from '../types/lib/compat-v4';
2
+
3
+ declare const LibV4: IModuleLibV4;
4
+
5
5
  export = LibV4;
package/lib-v4.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateUUID = exports.renameExt = exports.isString = exports.isPlainObject = exports.isObject = exports.formatSize = exports.escapePattern = exports.toTimeMs = exports.coerceObject = exports.cloneObject = exports.asFunction = exports.allSettled = exports.getFunctions = exports.readFileSafe = exports.isPathUNC = exports.isFileUNC = exports.isFileHTTP = exports.existsSafe = exports.generateUUID = exports.cleanupStream = exports.byteLength = exports.hasSameStat = exports.getSize = exports.hasSize = void 0;
4
4
  const path = require("path");
5
5
  const fs = require("fs");
6
- const types_1 = require("../types");
6
+ const types_1 = require("@e-mc/types");
7
7
  Object.defineProperty(exports, "asFunction", { enumerable: true, get: function () { return types_1.asFunction; } });
8
8
  Object.defineProperty(exports, "cloneObject", { enumerable: true, get: function () { return types_1.cloneObject; } });
9
9
  Object.defineProperty(exports, "coerceObject", { enumerable: true, get: function () { return types_1.coerceObject; } });
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "isPlainObject", { enumerable: true, get: functio
15
15
  Object.defineProperty(exports, "isString", { enumerable: true, get: function () { return types_1.isString; } });
16
16
  Object.defineProperty(exports, "renameExt", { enumerable: true, get: function () { return types_1.renameExt; } });
17
17
  Object.defineProperty(exports, "validateUUID", { enumerable: true, get: function () { return types_1.validateUUID; } });
18
- const index_1 = require("./index");
18
+ const index_1 = require("@e-mc/module");
19
19
  function hasSize(value, keepEmpty) {
20
20
  try {
21
21
  const statSrc = fs.statSync(value);
@@ -72,7 +72,7 @@ function cleanupStream(stream, uri) {
72
72
  }
73
73
  catch (err) {
74
74
  if (!index_1.default.isErrorCode(err, 'ENOENT')) {
75
- index_1.default.writeFail(["Unable to delete file" /* ERR_MESSAGE.DELETE_FILE */, path.basename(uri)], err, 32 /* LOG_TYPE.FILE */);
75
+ index_1.default.writeFail(["Unable to delete file", path.basename(uri)], err, 32);
76
76
  }
77
77
  }
78
78
  }
@@ -129,13 +129,13 @@ function getFunctions(values, absolute, sync = true, outFailed) {
129
129
  result.push(method);
130
130
  }
131
131
  else if (outFailed) {
132
- outFailed.push(index_1.default.asString(value) || "Unknown" /* ERR_MESSAGE.UNKNOWN */);
132
+ outFailed.push(index_1.default.asString(value) || "Unknown");
133
133
  }
134
134
  }
135
135
  return result;
136
136
  }
137
137
  exports.getFunctions = getFunctions;
138
- function allSettled(tasks, rejected, options) {
138
+ async function allSettled(tasks, rejected, options) {
139
139
  if (rejected) {
140
140
  return Promise.allSettled(tasks).then(result => {
141
141
  const items = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/module",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Module base class for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/anpham6/e-mc.git",
12
+ "url": "git+https://github.com/anpham6/e-mc.git",
13
13
  "directory": "src/module"
14
14
  },
15
15
  "keywords": [
@@ -17,10 +17,10 @@
17
17
  "squared-functions"
18
18
  ],
19
19
  "author": "An Pham <anpham6@gmail.com>",
20
- "license": "BSD 3-Clause",
20
+ "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/types": "0.7.0",
23
+ "@e-mc/types": "0.7.2",
24
24
  "abort-controller": "^3.0.0",
25
25
  "chalk": "4.1.2",
26
26
  "event-target-shim": "^5.0.1",