@h3ravel/database 11.2.4 → 11.2.5
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 +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { readdirSync, statSync } from "fs";
|
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import os from "node:os";
|
|
7
7
|
import tty from "node:tty";
|
|
8
|
+
import crypto from "crypto";
|
|
8
9
|
import { Migrate, MigrationCreator } from "@h3ravel/arquebus/migrations";
|
|
9
10
|
import { ConsoleCommand, ServiceProvider } from "@h3ravel/core";
|
|
10
11
|
import path$1 from "node:path";
|
|
@@ -12489,6 +12490,15 @@ var Resolver = class {
|
|
|
12489
12490
|
else if (pm === "bun") cmd = "create";
|
|
12490
12491
|
return `${pm} ${cmd} ${pkg}`;
|
|
12491
12492
|
}
|
|
12493
|
+
/**
|
|
12494
|
+
* Create a hash for a function or an object
|
|
12495
|
+
*
|
|
12496
|
+
* @param provider
|
|
12497
|
+
* @returns
|
|
12498
|
+
*/
|
|
12499
|
+
static hashObjectOrFunction(provider) {
|
|
12500
|
+
return crypto.createHash("sha1").update(provider.toString()).digest("hex");
|
|
12501
|
+
}
|
|
12492
12502
|
};
|
|
12493
12503
|
|
|
12494
12504
|
//#endregion
|