sails-sqlite 0.2.4 → 0.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.
@@ -41,12 +41,19 @@ module.exports = {
41
41
  }
42
42
 
43
43
  // Create database connection with optimized options
44
+ // Determine verbose logging function:
45
+ // - verbose: true -> use console.log
46
+ // - verbose: function -> use custom function
47
+ // - verbose: false/undefined -> disabled
48
+ let verboseFn = null
49
+ if (meta?.verbose === true) {
50
+ verboseFn = console.log
51
+ } else if (typeof meta?.verbose === 'function') {
52
+ verboseFn = meta.verbose
53
+ }
54
+
44
55
  const dbOptions = {
45
- // Enable verbose mode in development
46
- verbose:
47
- meta?.verbose || process.env.NODE_ENV === 'development'
48
- ? console.log
49
- : null,
56
+ verbose: verboseFn,
50
57
  // Set timeout for database operations
51
58
  timeout: meta?.timeout || 5000,
52
59
  // Enable read-only mode if specified
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sails-sqlite",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "SQLite adapter for Sails/Waterline",
5
5
  "main": "lib",
6
6
  "directories": {