bun-query-builder 0.1.60 → 0.1.61
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 +7 -4
- package/dist/src/index.js +6 -3
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -11704,6 +11704,7 @@ var init_config = __esm(() => {
|
|
|
11704
11704
|
init_dist();
|
|
11705
11705
|
defaultConfig4 = {
|
|
11706
11706
|
verbose: true,
|
|
11707
|
+
snapshotDir: ".qb",
|
|
11707
11708
|
dialect: "postgres",
|
|
11708
11709
|
database: {
|
|
11709
11710
|
database: "test_db",
|
|
@@ -18598,9 +18599,11 @@ function info(message) {
|
|
|
18598
18599
|
if (config5.verbose)
|
|
18599
18600
|
console.log(message);
|
|
18600
18601
|
}
|
|
18602
|
+
function getSnapshotDir(workspaceRoot) {
|
|
18603
|
+
return join9(workspaceRoot, config5.snapshotDir || ".qb");
|
|
18604
|
+
}
|
|
18601
18605
|
function getSnapshotPath(workspaceRoot, dialect) {
|
|
18602
|
-
|
|
18603
|
-
return join9(snapshotDir, `model-snapshot.${dialect}.json`);
|
|
18606
|
+
return join9(getSnapshotDir(workspaceRoot), `model-snapshot.${dialect}.json`);
|
|
18604
18607
|
}
|
|
18605
18608
|
function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
18606
18609
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
@@ -18625,7 +18628,7 @@ function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
|
18625
18628
|
}
|
|
18626
18629
|
function savePlanSnapshot(workspaceRoot, dialect, plan) {
|
|
18627
18630
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
18628
|
-
const snapshotDir =
|
|
18631
|
+
const snapshotDir = getSnapshotDir(workspaceRoot);
|
|
18629
18632
|
const hash = hashMigrationPlan(plan);
|
|
18630
18633
|
if (existsSync16(snapshotPath)) {
|
|
18631
18634
|
try {
|
|
@@ -31147,7 +31150,7 @@ function getPrefix() {
|
|
|
31147
31150
|
}
|
|
31148
31151
|
var prefix = getPrefix();
|
|
31149
31152
|
// package.json
|
|
31150
|
-
var version2 = "0.1.
|
|
31153
|
+
var version2 = "0.1.61";
|
|
31151
31154
|
|
|
31152
31155
|
// bin/cli.ts
|
|
31153
31156
|
init_actions();
|
package/dist/src/index.js
CHANGED
|
@@ -11703,6 +11703,7 @@ var init_config = __esm(() => {
|
|
|
11703
11703
|
init_dist();
|
|
11704
11704
|
defaultConfig4 = {
|
|
11705
11705
|
verbose: true,
|
|
11706
|
+
snapshotDir: ".qb",
|
|
11706
11707
|
dialect: "postgres",
|
|
11707
11708
|
database: {
|
|
11708
11709
|
database: "test_db",
|
|
@@ -18597,9 +18598,11 @@ function info(message) {
|
|
|
18597
18598
|
if (config5.verbose)
|
|
18598
18599
|
console.log(message);
|
|
18599
18600
|
}
|
|
18601
|
+
function getSnapshotDir(workspaceRoot) {
|
|
18602
|
+
return join9(workspaceRoot, config5.snapshotDir || ".qb");
|
|
18603
|
+
}
|
|
18600
18604
|
function getSnapshotPath(workspaceRoot, dialect) {
|
|
18601
|
-
|
|
18602
|
-
return join9(snapshotDir, `model-snapshot.${dialect}.json`);
|
|
18605
|
+
return join9(getSnapshotDir(workspaceRoot), `model-snapshot.${dialect}.json`);
|
|
18603
18606
|
}
|
|
18604
18607
|
function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
18605
18608
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
@@ -18624,7 +18627,7 @@ function loadPlanSnapshot(workspaceRoot, dialect) {
|
|
|
18624
18627
|
}
|
|
18625
18628
|
function savePlanSnapshot(workspaceRoot, dialect, plan) {
|
|
18626
18629
|
const snapshotPath = getSnapshotPath(workspaceRoot, dialect);
|
|
18627
|
-
const snapshotDir =
|
|
18630
|
+
const snapshotDir = getSnapshotDir(workspaceRoot);
|
|
18628
18631
|
const hash = hashMigrationPlan(plan);
|
|
18629
18632
|
if (existsSync16(snapshotPath)) {
|
|
18630
18633
|
try {
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED