@h3ravel/hashing 0.1.10 → 0.1.12
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/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -4
- package/package.json +9 -10
package/dist/index.cjs
CHANGED
|
@@ -301,7 +301,7 @@ var ArgonHasher = class extends AbstractHasher {
|
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
//#endregion
|
|
304
|
-
//#region ../../node_modules/.pnpm/bcryptjs@3.0.
|
|
304
|
+
//#region ../../node_modules/.pnpm/bcryptjs@3.0.3/node_modules/bcryptjs/index.js
|
|
305
305
|
/**
|
|
306
306
|
* The random implementation to use as a fallback.
|
|
307
307
|
* @type {?function(number):!Array.<number>}
|
|
@@ -530,12 +530,12 @@ function truncates(password) {
|
|
|
530
530
|
return utf8Length(password) > 72;
|
|
531
531
|
}
|
|
532
532
|
/**
|
|
533
|
-
* Continues with the callback
|
|
533
|
+
* Continues with the callback after yielding to the event loop.
|
|
534
534
|
* @function
|
|
535
535
|
* @param {function(...[*])} callback Callback to execute
|
|
536
536
|
* @inner
|
|
537
537
|
*/
|
|
538
|
-
var nextTick = typeof
|
|
538
|
+
var nextTick = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout;
|
|
539
539
|
/** Calculates the byte length of a string encoded as UTF8. */
|
|
540
540
|
function utf8Length(string) {
|
|
541
541
|
var len = 0, c = 0;
|
|
@@ -2333,7 +2333,7 @@ var Manager = class {
|
|
|
2333
2333
|
* @returns
|
|
2334
2334
|
*/
|
|
2335
2335
|
async init(basePath = process.cwd()) {
|
|
2336
|
-
const jsPath = node_path.default.resolve(basePath, "hashing.config.
|
|
2336
|
+
const jsPath = node_path.default.resolve(basePath, "hashing.config.mjs");
|
|
2337
2337
|
const tsPath = node_path.default.resolve(basePath, "hashing.config.ts");
|
|
2338
2338
|
if ((0, node_fs.existsSync)(jsPath)) {
|
|
2339
2339
|
this.config = (await import(jsPath)).default ?? {};
|
package/dist/index.d.cts
CHANGED
|
@@ -239,7 +239,7 @@ declare abstract class Manager {
|
|
|
239
239
|
* @return string
|
|
240
240
|
*/
|
|
241
241
|
getDefaultDriver(): HashAlgorithm;
|
|
242
|
-
protected createDriver(driver: HashAlgorithm):
|
|
242
|
+
protected createDriver(driver: HashAlgorithm): BcryptHasher | ArgonHasher | Argon2idHasher;
|
|
243
243
|
/**
|
|
244
244
|
* Determine if a given string is already hashed.
|
|
245
245
|
*
|
|
@@ -334,7 +334,7 @@ declare class HashManager extends Manager {
|
|
|
334
334
|
*
|
|
335
335
|
* @throws InvalidArgumentException
|
|
336
336
|
*/
|
|
337
|
-
driver(driver?: HashAlgorithm):
|
|
337
|
+
driver(driver?: HashAlgorithm): BcryptHasher | ArgonHasher | Argon2idHasher;
|
|
338
338
|
}
|
|
339
339
|
declare const defineConfig: (config: Configuration) => Configuration;
|
|
340
340
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -239,7 +239,7 @@ declare abstract class Manager {
|
|
|
239
239
|
* @return string
|
|
240
240
|
*/
|
|
241
241
|
getDefaultDriver(): HashAlgorithm;
|
|
242
|
-
protected createDriver(driver: HashAlgorithm):
|
|
242
|
+
protected createDriver(driver: HashAlgorithm): BcryptHasher | ArgonHasher | Argon2idHasher;
|
|
243
243
|
/**
|
|
244
244
|
* Determine if a given string is already hashed.
|
|
245
245
|
*
|
|
@@ -334,7 +334,7 @@ declare class HashManager extends Manager {
|
|
|
334
334
|
*
|
|
335
335
|
* @throws InvalidArgumentException
|
|
336
336
|
*/
|
|
337
|
-
driver(driver?: HashAlgorithm):
|
|
337
|
+
driver(driver?: HashAlgorithm): BcryptHasher | ArgonHasher | Argon2idHasher;
|
|
338
338
|
}
|
|
339
339
|
declare const defineConfig: (config: Configuration) => Configuration;
|
|
340
340
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -275,7 +275,7 @@ var ArgonHasher = class extends AbstractHasher {
|
|
|
275
275
|
};
|
|
276
276
|
|
|
277
277
|
//#endregion
|
|
278
|
-
//#region ../../node_modules/.pnpm/bcryptjs@3.0.
|
|
278
|
+
//#region ../../node_modules/.pnpm/bcryptjs@3.0.3/node_modules/bcryptjs/index.js
|
|
279
279
|
/**
|
|
280
280
|
* The random implementation to use as a fallback.
|
|
281
281
|
* @type {?function(number):!Array.<number>}
|
|
@@ -504,12 +504,12 @@ function truncates(password) {
|
|
|
504
504
|
return utf8Length(password) > 72;
|
|
505
505
|
}
|
|
506
506
|
/**
|
|
507
|
-
* Continues with the callback
|
|
507
|
+
* Continues with the callback after yielding to the event loop.
|
|
508
508
|
* @function
|
|
509
509
|
* @param {function(...[*])} callback Callback to execute
|
|
510
510
|
* @inner
|
|
511
511
|
*/
|
|
512
|
-
var nextTick = typeof
|
|
512
|
+
var nextTick = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout;
|
|
513
513
|
/** Calculates the byte length of a string encoded as UTF8. */
|
|
514
514
|
function utf8Length(string) {
|
|
515
515
|
var len = 0, c = 0;
|
|
@@ -2307,7 +2307,7 @@ var Manager = class {
|
|
|
2307
2307
|
* @returns
|
|
2308
2308
|
*/
|
|
2309
2309
|
async init(basePath = process.cwd()) {
|
|
2310
|
-
const jsPath = path.resolve(basePath, "hashing.config.
|
|
2310
|
+
const jsPath = path.resolve(basePath, "hashing.config.mjs");
|
|
2311
2311
|
const tsPath = path.resolve(basePath, "hashing.config.ts");
|
|
2312
2312
|
if (existsSync(jsPath)) {
|
|
2313
2313
|
this.config = (await import(jsPath)).default ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/hashing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Secure framework-agnostic Bcrypt and Argon2 hashing for storing user passwords in H3ravel and node Apps.",
|
|
5
5
|
"h3ravel": {
|
|
6
6
|
"providers": [
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"main": "./dist/index.
|
|
12
|
-
"types": "./dist/index.d.
|
|
13
|
-
"module": "./dist/index.
|
|
11
|
+
"main": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/index.d.
|
|
17
|
-
"import": "./dist/index.
|
|
16
|
+
"types": "./dist/index.d.mts",
|
|
17
|
+
"import": "./dist/index.mjs",
|
|
18
18
|
"require": "./dist/index.cjs"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"typescript": "^5.4.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@h3ravel/core": "^1.21.
|
|
52
|
-
"@h3ravel/support": "^0.15.
|
|
51
|
+
"@h3ravel/core": "^1.21.3",
|
|
52
|
+
"@h3ravel/support": "^0.15.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@h3ravel/core": {
|
|
@@ -60,10 +60,9 @@
|
|
|
60
60
|
"argon2": "^0.44.0"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
|
-
"barrel": "barrelsby --directory src --delete --singleQuotes",
|
|
64
63
|
"build": "tsdown --config-loader unconfig",
|
|
65
64
|
"dev": "tsx watch src/index.ts",
|
|
66
|
-
"start": "node dist/index.
|
|
65
|
+
"start": "node dist/index.mjs",
|
|
67
66
|
"lint": "eslint . --ext .ts",
|
|
68
67
|
"test": "jest --passWithNoTests",
|
|
69
68
|
"version-patch": "pnpm version patch"
|