@storecraft/database-sqlite 1.0.20 → 1.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.
Files changed (3) hide show
  1. package/README.md +5 -6
  2. package/index.js +3 -4
  3. package/package.json +1 -2
package/README.md CHANGED
@@ -38,17 +38,16 @@ const app = new App(
38
38
  )
39
39
  )
40
40
  .withStorage(new NodeLocalStorage())
41
+ .init();
41
42
 
42
- await app.init();
43
- await migrateToLatest(app.db, false);
44
-
45
- const server = http.createServer(app.handler).listen(
43
+ await migrateToLatest(app.__show_me_everything.db, false);
44
+
45
+ http.createServer(app.handler).listen(
46
46
  8000,
47
47
  () => {
48
- console.log(`Server is running on http://localhost:8000`);
48
+ app.print_banner('http://localhost:8000');
49
49
  }
50
50
  );
51
-
52
51
  ```
53
52
 
54
53
  Storecraft will search the following `env` variables
package/index.js CHANGED
@@ -9,13 +9,12 @@ import BetterSQLite from 'better-sqlite3';
9
9
 
10
10
 
11
11
  /**
12
- * @description `better-sqlite` driver for `storecraft`
13
- *
12
+ * @description `better-sqlite3` driver for `storecraft`
14
13
  */
15
14
  export class SQLite extends SQL {
16
15
 
17
16
  /** @satisfies {ENV<Config>} */
18
- static EnvConfig = /** @type{const} */ (
17
+ static EnvConfig = /** @type {const} */ (
19
18
  {
20
19
  filepath: 'SQLITE_FILEPATH',
21
20
  }
@@ -46,7 +45,7 @@ export class SQLite extends SQL {
46
45
 
47
46
  /** @type {SQL["init"]} */
48
47
  init = (app) => {
49
- this.dialect_config.filepath ??= app.platform.env[SQLite.EnvConfig.filepath];
48
+ this.dialect_config.filepath ??= app.env[SQLite.EnvConfig.filepath];
50
49
  super.init(app);
51
50
  }
52
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storecraft/database-sqlite",
3
- "version": "1.0.20",
3
+ "version": "1.2.5",
4
4
  "description": "Official SQLite Database driver for storecraft",
5
5
  "license": "MIT",
6
6
  "author": "Tomer Shalev (https://github.com/store-craft)",
@@ -31,7 +31,6 @@
31
31
  "scripts": {
32
32
  "database-sqlite:test": "node ./tests/runner.test.js",
33
33
  "test": "npm run database-sqlite:test",
34
- "prepublishOnly": "npm version patch --force",
35
34
  "sc-publish": "npm publish"
36
35
  },
37
36
  "dependencies": {