@easy-cms/db-sqlite 1.39.1 → 1.41.0

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -101,8 +101,12 @@ function sqlite(options) {
101
101
  },
102
102
  close: async () => client.close()
103
103
  };
104
- return connectDatabase(sqliteDialect, connection, args, options);
104
+ const { backupSQL: _local, ...remote } = sqliteDialect;
105
+ const dialect = options.url.startsWith("file:") ? sqliteDialect : remote;
106
+ return connectDatabase(dialect, connection, args, options);
105
107
  },
108
+ // Remote databases are backed up into a local SQLite file, table by table.
109
+ ...options.url.startsWith("file:") ? {} : { backupAdapter: sqlite },
106
110
  bundle: {
107
111
  get traceInclude() {
108
112
  traceInclude ??= nativeBinaries();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/db-sqlite",
3
- "version": "1.39.1",
3
+ "version": "1.41.0",
4
4
  "description": "SQLite / libSQL database adapter for Easy CMS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,14 +22,14 @@
22
22
  "@libsql/client": "^0.18.0",
23
23
  "drizzle-kit": "0.31.11",
24
24
  "drizzle-orm": "0.45.4",
25
- "@easy-cms/drizzle": "^1.39.1"
25
+ "@easy-cms/drizzle": "^1.41.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@easy-cms/core": "^1.39.1"
28
+ "@easy-cms/core": "^1.41.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "sharp": "^0.35.5",
32
- "@easy-cms/core": "^1.39.1"
32
+ "@easy-cms/core": "^1.41.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"