bun-query-builder 0.1.55 → 0.1.56
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/bin/cli.js +12 -2
- package/dist/src/index.js +11 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -18584,13 +18584,23 @@ function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
|
18584
18584
|
function savePlanSnapshot(workspaceRoot, dialect, plan) {
|
|
18585
18585
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
18586
18586
|
const snapshotDir = join9(workspaceRoot, ".qb");
|
|
18587
|
+
const hash = hashMigrationPlan(plan);
|
|
18588
|
+
if (existsSync16(snapshotPath)) {
|
|
18589
|
+
try {
|
|
18590
|
+
const current = JSON.parse(readFileSync3(snapshotPath, "utf8"));
|
|
18591
|
+
if (current?.hash === hash && current?.dialect === dialect && current?.plan) {
|
|
18592
|
+
info("-- Model snapshot unchanged");
|
|
18593
|
+
return;
|
|
18594
|
+
}
|
|
18595
|
+
} catch {}
|
|
18596
|
+
}
|
|
18587
18597
|
if (!existsSync16(snapshotDir)) {
|
|
18588
18598
|
mkdirSync8(snapshotDir, { recursive: true });
|
|
18589
18599
|
info(`-- Created snapshot directory: ${snapshotDir}`);
|
|
18590
18600
|
}
|
|
18591
18601
|
const snapshot = {
|
|
18592
18602
|
plan,
|
|
18593
|
-
hash
|
|
18603
|
+
hash,
|
|
18594
18604
|
dialect,
|
|
18595
18605
|
updatedAt: new Date().toISOString()
|
|
18596
18606
|
};
|
|
@@ -31012,7 +31022,7 @@ function getPrefix() {
|
|
|
31012
31022
|
}
|
|
31013
31023
|
var prefix = getPrefix();
|
|
31014
31024
|
// package.json
|
|
31015
|
-
var version2 = "0.1.
|
|
31025
|
+
var version2 = "0.1.56";
|
|
31016
31026
|
|
|
31017
31027
|
// bin/cli.ts
|
|
31018
31028
|
init_actions();
|
package/dist/src/index.js
CHANGED
|
@@ -18583,13 +18583,23 @@ function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
|
18583
18583
|
function savePlanSnapshot(workspaceRoot, dialect, plan) {
|
|
18584
18584
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
18585
18585
|
const snapshotDir = join9(workspaceRoot, ".qb");
|
|
18586
|
+
const hash = hashMigrationPlan(plan);
|
|
18587
|
+
if (existsSync16(snapshotPath)) {
|
|
18588
|
+
try {
|
|
18589
|
+
const current = JSON.parse(readFileSync3(snapshotPath, "utf8"));
|
|
18590
|
+
if (current?.hash === hash && current?.dialect === dialect && current?.plan) {
|
|
18591
|
+
info("-- Model snapshot unchanged");
|
|
18592
|
+
return;
|
|
18593
|
+
}
|
|
18594
|
+
} catch {}
|
|
18595
|
+
}
|
|
18586
18596
|
if (!existsSync16(snapshotDir)) {
|
|
18587
18597
|
mkdirSync8(snapshotDir, { recursive: true });
|
|
18588
18598
|
info(`-- Created snapshot directory: ${snapshotDir}`);
|
|
18589
18599
|
}
|
|
18590
18600
|
const snapshot = {
|
|
18591
18601
|
plan,
|
|
18592
|
-
hash
|
|
18602
|
+
hash,
|
|
18593
18603
|
dialect,
|
|
18594
18604
|
updatedAt: new Date().toISOString()
|
|
18595
18605
|
};
|
package/package.json
CHANGED