@travetto/model-sqlite 5.0.0-rc.0 → 5.0.0-rc.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-sqlite",
3
- "version": "5.0.0-rc.0",
3
+ "version": "5.0.0-rc.2",
4
4
  "description": "SQLite backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -26,11 +26,11 @@
26
26
  "directory": "module/model-sqlite"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^5.0.0-rc.0",
30
- "@travetto/context": "^5.0.0-rc.0",
31
- "@travetto/model": "^5.0.0-rc.0",
32
- "@travetto/model-query": "^5.0.0-rc.0",
33
- "@travetto/model-sql": "^5.0.0-rc.0",
29
+ "@travetto/config": "^5.0.0-rc.2",
30
+ "@travetto/context": "^5.0.0-rc.2",
31
+ "@travetto/model": "^5.0.0-rc.2",
32
+ "@travetto/model-query": "^5.0.0-rc.2",
33
+ "@travetto/model-sql": "^5.0.0-rc.2",
34
34
  "@types/better-sqlite3": "^7.6.11",
35
35
  "better-sqlite3": "^11.1.2"
36
36
  },
package/src/connection.ts CHANGED
@@ -4,8 +4,7 @@ import path from 'node:path';
4
4
  import sqlDb, { type Database, Options } from 'better-sqlite3';
5
5
  import { Pool, createPool } from 'generic-pool';
6
6
 
7
- import { RuntimeContext } from '@travetto/manifest';
8
- import { ShutdownManager, Util } from '@travetto/base';
7
+ import { ShutdownManager, Util, Runtime } from '@travetto/runtime';
9
8
  import { AsyncContext, WithAsyncContext } from '@travetto/context';
10
9
  import { ExistsError } from '@travetto/model';
11
10
  import { SQLModelConfig, Connection } from '@travetto/model-sql';
@@ -45,7 +44,7 @@ export class SqliteConnection extends Connection<Database> {
45
44
  }
46
45
 
47
46
  async #create(): Promise<Database> {
48
- const file = path.resolve(this.#config.options.file ?? RuntimeContext.toolPath('@', 'sqlite_db'));
47
+ const file = path.resolve(this.#config.options.file ?? Runtime.toolPath('@', 'sqlite_db'));
49
48
  await fs.mkdir(path.dirname(file), { recursive: true });
50
49
  const db = new sqlDb(file, this.#config.options);
51
50
  await db.pragma('foreign_keys = ON');