@mjhls/mjh-framework 1.0.811 → 1.0.812

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/dist/esm/Auth.js CHANGED
@@ -11,6 +11,7 @@ import Local from 'passport-local';
11
11
  import mysql from 'mysql';
12
12
  import { u as util } from './util-3ab476bf.js';
13
13
  import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
14
+ import { m as md5 } from './md5-4e42248e.js';
14
15
  import './es6.string.iterator-bc33758b.js';
15
16
  import './_to-object-b50e61c3.js';
16
17
  import './web.dom.iterable-4109ff68.js';
@@ -2800,324 +2801,6 @@ function connect() {
2800
2801
 
2801
2802
  var db = connect;
2802
2803
 
2803
- var crypt = createCommonjsModule(function (module) {
2804
- (function() {
2805
- var base64map
2806
- = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
2807
-
2808
- crypt = {
2809
- // Bit-wise rotation left
2810
- rotl: function(n, b) {
2811
- return (n << b) | (n >>> (32 - b));
2812
- },
2813
-
2814
- // Bit-wise rotation right
2815
- rotr: function(n, b) {
2816
- return (n << (32 - b)) | (n >>> b);
2817
- },
2818
-
2819
- // Swap big-endian to little-endian and vice versa
2820
- endian: function(n) {
2821
- // If number given, swap endian
2822
- if (n.constructor == Number) {
2823
- return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
2824
- }
2825
-
2826
- // Else, assume array and swap all items
2827
- for (var i = 0; i < n.length; i++)
2828
- n[i] = crypt.endian(n[i]);
2829
- return n;
2830
- },
2831
-
2832
- // Generate an array of any length of random bytes
2833
- randomBytes: function(n) {
2834
- for (var bytes = []; n > 0; n--)
2835
- bytes.push(Math.floor(Math.random() * 256));
2836
- return bytes;
2837
- },
2838
-
2839
- // Convert a byte array to big-endian 32-bit words
2840
- bytesToWords: function(bytes) {
2841
- for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
2842
- words[b >>> 5] |= bytes[i] << (24 - b % 32);
2843
- return words;
2844
- },
2845
-
2846
- // Convert big-endian 32-bit words to a byte array
2847
- wordsToBytes: function(words) {
2848
- for (var bytes = [], b = 0; b < words.length * 32; b += 8)
2849
- bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
2850
- return bytes;
2851
- },
2852
-
2853
- // Convert a byte array to a hex string
2854
- bytesToHex: function(bytes) {
2855
- for (var hex = [], i = 0; i < bytes.length; i++) {
2856
- hex.push((bytes[i] >>> 4).toString(16));
2857
- hex.push((bytes[i] & 0xF).toString(16));
2858
- }
2859
- return hex.join('');
2860
- },
2861
-
2862
- // Convert a hex string to a byte array
2863
- hexToBytes: function(hex) {
2864
- for (var bytes = [], c = 0; c < hex.length; c += 2)
2865
- bytes.push(parseInt(hex.substr(c, 2), 16));
2866
- return bytes;
2867
- },
2868
-
2869
- // Convert a byte array to a base-64 string
2870
- bytesToBase64: function(bytes) {
2871
- for (var base64 = [], i = 0; i < bytes.length; i += 3) {
2872
- var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
2873
- for (var j = 0; j < 4; j++)
2874
- if (i * 8 + j * 6 <= bytes.length * 8)
2875
- base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
2876
- else
2877
- base64.push('=');
2878
- }
2879
- return base64.join('');
2880
- },
2881
-
2882
- // Convert a base-64 string to a byte array
2883
- base64ToBytes: function(base64) {
2884
- // Remove non-base-64 characters
2885
- base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
2886
-
2887
- for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
2888
- imod4 = ++i % 4) {
2889
- if (imod4 == 0) continue;
2890
- bytes.push(((base64map.indexOf(base64.charAt(i - 1))
2891
- & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
2892
- | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
2893
- }
2894
- return bytes;
2895
- }
2896
- };
2897
-
2898
- module.exports = crypt;
2899
- })();
2900
- });
2901
-
2902
- var charenc = {
2903
- // UTF-8 encoding
2904
- utf8: {
2905
- // Convert a string to a byte array
2906
- stringToBytes: function(str) {
2907
- return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
2908
- },
2909
-
2910
- // Convert a byte array to a string
2911
- bytesToString: function(bytes) {
2912
- return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
2913
- }
2914
- },
2915
-
2916
- // Binary encoding
2917
- bin: {
2918
- // Convert a string to a byte array
2919
- stringToBytes: function(str) {
2920
- for (var bytes = [], i = 0; i < str.length; i++)
2921
- bytes.push(str.charCodeAt(i) & 0xFF);
2922
- return bytes;
2923
- },
2924
-
2925
- // Convert a byte array to a string
2926
- bytesToString: function(bytes) {
2927
- for (var str = [], i = 0; i < bytes.length; i++)
2928
- str.push(String.fromCharCode(bytes[i]));
2929
- return str.join('');
2930
- }
2931
- }
2932
- };
2933
-
2934
- var charenc_1 = charenc;
2935
-
2936
- /*!
2937
- * Determine if an object is a Buffer
2938
- *
2939
- * @author Feross Aboukhadijeh <https://feross.org>
2940
- * @license MIT
2941
- */
2942
-
2943
- // The _isBuffer check is for Safari 5-7 support, because it's missing
2944
- // Object.prototype.constructor. Remove this eventually
2945
- var isBuffer_1 = function (obj) {
2946
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
2947
- };
2948
-
2949
- function isBuffer (obj) {
2950
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
2951
- }
2952
-
2953
- // For Node v0.10 support. Remove this eventually.
2954
- function isSlowBuffer (obj) {
2955
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
2956
- }
2957
-
2958
- var md5 = createCommonjsModule(function (module) {
2959
- (function(){
2960
- var crypt$1 = crypt,
2961
- utf8 = charenc_1.utf8,
2962
- isBuffer = isBuffer_1,
2963
- bin = charenc_1.bin,
2964
-
2965
- // The core
2966
- md5 = function (message, options) {
2967
- // Convert to byte array
2968
- if (message.constructor == String)
2969
- if (options && options.encoding === 'binary')
2970
- message = bin.stringToBytes(message);
2971
- else
2972
- message = utf8.stringToBytes(message);
2973
- else if (isBuffer(message))
2974
- message = Array.prototype.slice.call(message, 0);
2975
- else if (!Array.isArray(message) && message.constructor !== Uint8Array)
2976
- message = message.toString();
2977
- // else, assume byte array already
2978
-
2979
- var m = crypt$1.bytesToWords(message),
2980
- l = message.length * 8,
2981
- a = 1732584193,
2982
- b = -271733879,
2983
- c = -1732584194,
2984
- d = 271733878;
2985
-
2986
- // Swap endian
2987
- for (var i = 0; i < m.length; i++) {
2988
- m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
2989
- ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
2990
- }
2991
-
2992
- // Padding
2993
- m[l >>> 5] |= 0x80 << (l % 32);
2994
- m[(((l + 64) >>> 9) << 4) + 14] = l;
2995
-
2996
- // Method shortcuts
2997
- var FF = md5._ff,
2998
- GG = md5._gg,
2999
- HH = md5._hh,
3000
- II = md5._ii;
3001
-
3002
- for (var i = 0; i < m.length; i += 16) {
3003
-
3004
- var aa = a,
3005
- bb = b,
3006
- cc = c,
3007
- dd = d;
3008
-
3009
- a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
3010
- d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
3011
- c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
3012
- b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
3013
- a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
3014
- d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
3015
- c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
3016
- b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
3017
- a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
3018
- d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
3019
- c = FF(c, d, a, b, m[i+10], 17, -42063);
3020
- b = FF(b, c, d, a, m[i+11], 22, -1990404162);
3021
- a = FF(a, b, c, d, m[i+12], 7, 1804603682);
3022
- d = FF(d, a, b, c, m[i+13], 12, -40341101);
3023
- c = FF(c, d, a, b, m[i+14], 17, -1502002290);
3024
- b = FF(b, c, d, a, m[i+15], 22, 1236535329);
3025
-
3026
- a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
3027
- d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
3028
- c = GG(c, d, a, b, m[i+11], 14, 643717713);
3029
- b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
3030
- a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
3031
- d = GG(d, a, b, c, m[i+10], 9, 38016083);
3032
- c = GG(c, d, a, b, m[i+15], 14, -660478335);
3033
- b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
3034
- a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
3035
- d = GG(d, a, b, c, m[i+14], 9, -1019803690);
3036
- c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
3037
- b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
3038
- a = GG(a, b, c, d, m[i+13], 5, -1444681467);
3039
- d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
3040
- c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
3041
- b = GG(b, c, d, a, m[i+12], 20, -1926607734);
3042
-
3043
- a = HH(a, b, c, d, m[i+ 5], 4, -378558);
3044
- d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
3045
- c = HH(c, d, a, b, m[i+11], 16, 1839030562);
3046
- b = HH(b, c, d, a, m[i+14], 23, -35309556);
3047
- a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
3048
- d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
3049
- c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
3050
- b = HH(b, c, d, a, m[i+10], 23, -1094730640);
3051
- a = HH(a, b, c, d, m[i+13], 4, 681279174);
3052
- d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
3053
- c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
3054
- b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
3055
- a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
3056
- d = HH(d, a, b, c, m[i+12], 11, -421815835);
3057
- c = HH(c, d, a, b, m[i+15], 16, 530742520);
3058
- b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
3059
-
3060
- a = II(a, b, c, d, m[i+ 0], 6, -198630844);
3061
- d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
3062
- c = II(c, d, a, b, m[i+14], 15, -1416354905);
3063
- b = II(b, c, d, a, m[i+ 5], 21, -57434055);
3064
- a = II(a, b, c, d, m[i+12], 6, 1700485571);
3065
- d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
3066
- c = II(c, d, a, b, m[i+10], 15, -1051523);
3067
- b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
3068
- a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
3069
- d = II(d, a, b, c, m[i+15], 10, -30611744);
3070
- c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
3071
- b = II(b, c, d, a, m[i+13], 21, 1309151649);
3072
- a = II(a, b, c, d, m[i+ 4], 6, -145523070);
3073
- d = II(d, a, b, c, m[i+11], 10, -1120210379);
3074
- c = II(c, d, a, b, m[i+ 2], 15, 718787259);
3075
- b = II(b, c, d, a, m[i+ 9], 21, -343485551);
3076
-
3077
- a = (a + aa) >>> 0;
3078
- b = (b + bb) >>> 0;
3079
- c = (c + cc) >>> 0;
3080
- d = (d + dd) >>> 0;
3081
- }
3082
-
3083
- return crypt$1.endian([a, b, c, d]);
3084
- };
3085
-
3086
- // Auxiliary functions
3087
- md5._ff = function (a, b, c, d, x, s, t) {
3088
- var n = a + (b & c | ~b & d) + (x >>> 0) + t;
3089
- return ((n << s) | (n >>> (32 - s))) + b;
3090
- };
3091
- md5._gg = function (a, b, c, d, x, s, t) {
3092
- var n = a + (b & d | c & ~d) + (x >>> 0) + t;
3093
- return ((n << s) | (n >>> (32 - s))) + b;
3094
- };
3095
- md5._hh = function (a, b, c, d, x, s, t) {
3096
- var n = a + (b ^ c ^ d) + (x >>> 0) + t;
3097
- return ((n << s) | (n >>> (32 - s))) + b;
3098
- };
3099
- md5._ii = function (a, b, c, d, x, s, t) {
3100
- var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
3101
- return ((n << s) | (n >>> (32 - s))) + b;
3102
- };
3103
-
3104
- // Package private blocksize
3105
- md5._blocksize = 16;
3106
- md5._digestsize = 16;
3107
-
3108
- module.exports = function (message, options) {
3109
- if (message === undefined || message === null)
3110
- throw new Error('Illegal argument ' + message);
3111
-
3112
- var digestbytes = crypt$1.wordsToBytes(md5(message, options));
3113
- return options && options.asBytes ? digestbytes :
3114
- options && options.asString ? bin.bytesToString(digestbytes) :
3115
- crypt$1.bytesToHex(digestbytes);
3116
- };
3117
-
3118
- })();
3119
- });
3120
-
3121
2804
  var _this$1 = undefined;
3122
2805
 
3123
2806
  var config$1 = {