@backifydev/cli 0.4.3 → 0.4.4
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.js +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1994,7 +1994,7 @@ var init_package = __esm({
|
|
|
1994
1994
|
"package.json"() {
|
|
1995
1995
|
package_default = {
|
|
1996
1996
|
name: "@backifydev/cli",
|
|
1997
|
-
version: "0.4.
|
|
1997
|
+
version: "0.4.4",
|
|
1998
1998
|
description: "Command-line setup and diagnostics for Backify applications",
|
|
1999
1999
|
type: "module",
|
|
2000
2000
|
bin: {
|
|
@@ -24740,7 +24740,14 @@ function usedCapabilities(root, files) {
|
|
|
24740
24740
|
function migrationDigests(root, config2) {
|
|
24741
24741
|
const directory = join14(root, config2.database?.migrations ?? "db/migrations");
|
|
24742
24742
|
if (!existsSync11(directory)) return [];
|
|
24743
|
-
return readdirSync4(directory).filter((f) => f.endsWith(".sql")).sort().map((file) => ({ file, sha256: createHash4("sha256").update(readFileSync16(join14(directory, file))).digest("hex") }));
|
|
24743
|
+
return readdirSync4(directory).filter((f) => f.endsWith(".sql")).sort().map((file) => ({ file, sha256: createHash4("sha256").update(withLfLineEndings(readFileSync16(join14(directory, file)))).digest("hex") }));
|
|
24744
|
+
}
|
|
24745
|
+
function withLfLineEndings(content) {
|
|
24746
|
+
if (!content.includes("\r\n")) return content;
|
|
24747
|
+
const out = Buffer.allocUnsafe(content.length);
|
|
24748
|
+
let length = 0;
|
|
24749
|
+
for (let i = 0; i < content.length; i++) if (content[i] !== 13 || content[i + 1] !== 10) out[length++] = content[i];
|
|
24750
|
+
return out.subarray(0, length);
|
|
24744
24751
|
}
|
|
24745
24752
|
function declarationDiagnostics(root, files) {
|
|
24746
24753
|
const sources = files.filter((file) => /\.[cm]?[jt]sx?$/.test(file)).map((file) => ({ path: file, content: readFileSync16(join14(root, file), "utf8") }));
|