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 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
- const snapshotDir = join9(workspaceRoot, ".qb");
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 = join9(workspaceRoot, ".qb");
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.60";
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
- const snapshotDir = join9(workspaceRoot, ".qb");
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 = join9(workspaceRoot, ".qb");
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
@@ -225,6 +225,7 @@ export declare interface BrowserConfig {
225
225
  */
226
226
  export declare interface QueryBuilderConfig {
227
227
  verbose: boolean
228
+ snapshotDir: string
228
229
  dialect: SupportedDialect
229
230
  database: DatabaseConfig
230
231
  browser?: BrowserConfig
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-query-builder",
3
3
  "type": "module",
4
- "version": "0.1.60",
4
+ "version": "0.1.61",
5
5
  "description": "A simple yet performant query builder for TypeScript. Built with Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",