lakutata 0.1.19 → 0.1.21
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/CLI.js +83 -83
- package/Crypto.js +28 -28
- package/Hash.js +4 -4
- package/Helper.js +2 -2
- package/Lakutata.d.ts +3 -2
- package/Lakutata.js +6 -6
- package/{chunk-5IIMLGLE.js → chunk-GMO2BC4Y.js} +15 -15
- package/{chunk-VZLDHNU6.js → chunk-H3MWIPDV.js} +200 -200
- package/{chunk-ES3Q6J7A.js → chunk-SFELBJVQ.js} +3 -3
- package/{chunk-TC35FNWQ.js → chunk-XVKDOIJP.js} +6 -6
- package/{chunk-Z5ADVGBN.js → chunk-YTBUFDW2.js} +5 -5
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var _chunkIZCE6VLCjs = require('./chunk-IZCE6VLC.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkXVKDOIJPjs = require('./chunk-XVKDOIJP.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunk7LXDFQCYjs = require('./chunk-7LXDFQCY.js');
|
|
@@ -97,7 +97,7 @@ var Exception = (_class = class extends Error {
|
|
|
97
97
|
const template = a;
|
|
98
98
|
const data = b;
|
|
99
99
|
try {
|
|
100
|
-
this.message =
|
|
100
|
+
this.message = _chunkXVKDOIJPjs.Templating.call(void 0, template, data, { ignoreMissing: true });
|
|
101
101
|
} catch (e) {
|
|
102
102
|
this.message = "Unknown (broken exception template or data)";
|
|
103
103
|
}
|
|
@@ -105,7 +105,7 @@ var Exception = (_class = class extends Error {
|
|
|
105
105
|
if (typeof a === "string") {
|
|
106
106
|
this.message = a;
|
|
107
107
|
} else {
|
|
108
|
-
this.message =
|
|
108
|
+
this.message = _chunkXVKDOIJPjs.As.call(void 0, a).message;
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
111
|
const message = camelCase(this.name, { delimiter: " " }).toLowerCase();
|
|
@@ -823,14 +823,14 @@ async function Exists(path) {
|
|
|
823
823
|
_chunk7LXDFQCYjs.__name.call(void 0, Exists, "Exists");
|
|
824
824
|
function GraceExit(exitCode, ...functions) {
|
|
825
825
|
setImmediate(async () => {
|
|
826
|
-
|
|
827
|
-
|
|
826
|
+
for (const func of functions) {
|
|
827
|
+
try {
|
|
828
828
|
await func();
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
process.exit(exitCode);
|
|
829
|
+
} catch (e) {
|
|
830
|
+
DevNull(e);
|
|
831
|
+
}
|
|
833
832
|
}
|
|
833
|
+
process.exit(exitCode);
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
836
|
_chunk7LXDFQCYjs.__name.call(void 0, GraceExit, "GraceExit");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSFELBJVQjs = require('./chunk-SFELBJVQ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkXVKDOIJPjs = require('./chunk-XVKDOIJP.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -5429,7 +5429,7 @@ var require_crypto_js = _chunk7LXDFQCYjs.__commonJS.call(void 0, {
|
|
|
5429
5429
|
var import_crypto_js = _chunk7LXDFQCYjs.__toESM.call(void 0, require_crypto_js());
|
|
5430
5430
|
|
|
5431
5431
|
// src/exceptions/NotSupportHashException.ts
|
|
5432
|
-
var NotSupportHashException = (_class = class extends
|
|
5432
|
+
var NotSupportHashException = (_class = class extends _chunkSFELBJVQjs.Exception {constructor(...args) { super(...args); _class.prototype.__init.call(this); }
|
|
5433
5433
|
static {
|
|
5434
5434
|
_chunk7LXDFQCYjs.__name.call(void 0, this, "NotSupportHashException");
|
|
5435
5435
|
}
|
|
@@ -5930,7 +5930,7 @@ function asyncHash(algorithm, message) {
|
|
|
5930
5930
|
return new Promise((resolve, reject) => {
|
|
5931
5931
|
try {
|
|
5932
5932
|
const hash = isBuiltinHashAlgorithm(algorithm) ? _crypto.createHash.call(void 0, algorithm) : createHashFallback(algorithm);
|
|
5933
|
-
|
|
5933
|
+
_chunkXVKDOIJPjs.ConvertToStream.call(void 0, message, { highWaterMark: HIGH_WATER_MARK }).on("data", (chunk) => hash.update(chunk)).once("error", reject).once("end", () => resolve(hash.digest().toString("hex")));
|
|
5934
5934
|
} catch (e) {
|
|
5935
5935
|
return reject(new NotSupportHashException(e));
|
|
5936
5936
|
}
|
|
@@ -5950,7 +5950,7 @@ function asyncHmacHash(algorithm, message, key) {
|
|
|
5950
5950
|
return new Promise((resolve, reject) => {
|
|
5951
5951
|
try {
|
|
5952
5952
|
const hmac = isBuiltinHashAlgorithm(algorithm) ? _crypto.createHmac.call(void 0, algorithm, key) : createHmacFallback(algorithm, key);
|
|
5953
|
-
|
|
5953
|
+
_chunkXVKDOIJPjs.ConvertToStream.call(void 0, message, { highWaterMark: HIGH_WATER_MARK }).on("data", (chunk) => hmac.update(chunk)).once("error", reject).once("end", () => resolve(hmac.digest().toString("hex")));
|
|
5954
5954
|
} catch (e) {
|
|
5955
5955
|
return reject(new NotSupportHashException(e));
|
|
5956
5956
|
}
|