pinstripe 0.16.1 → 0.16.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.
@@ -4,14 +4,16 @@ import { Client } from "../../../database/client.js";
4
4
 
5
5
  export default {
6
6
  create(){
7
- if(!this.context.root.databaseClient){
8
- this.context.root.databaseClient = Client.new();
9
- }
10
- return this.defer(async () => Database.new(this.context.root.databaseClient, {
11
- tenant: {
12
- name: this.initialParams._headers['x-tenant'],
13
- host: this.initialParams._url.hostname
7
+ return this.defer(async () => {
8
+ if(!this.context.root.databaseClient){
9
+ this.context.root.databaseClient = Client.new(await this.config.database);
14
10
  }
15
- }));
11
+ return Database.new(this.context.root.databaseClient, {
12
+ tenant: {
13
+ name: this.initialParams._headers['x-tenant'],
14
+ host: this.initialParams._url.hostname
15
+ }
16
+ })
17
+ });
16
18
  }
17
19
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "pinstripe",
4
4
  "description": "A slick web framework for Node.js.",
5
- "version": "0.16.1",
5
+ "version": "0.16.2",
6
6
  "author": "Jody Salt",
7
7
  "license": "MIT",
8
8
  "exports": {
@@ -48,5 +48,5 @@
48
48
  "tmp": "^0.2.1",
49
49
  "unionfs": "^4.4.0"
50
50
  },
51
- "gitHead": "f7dd0e3a3dd8391176c3f46aa383b1d921bdd713"
51
+ "gitHead": "bf3b7e1cb4f5c534a3d8b2136b0123b71c0d0286"
52
52
  }