@faasjs/knex 0.0.2-beta.393 → 0.0.2-beta.396

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/README.md CHANGED
@@ -15,7 +15,7 @@ FaasJS's sql plugin, base on [Knex](https://knexjs.org/).
15
15
 
16
16
  - [Knex](classes/Knex.md)
17
17
 
18
- ### Type aliases
18
+ ### Type Aliases
19
19
 
20
20
  - [KnexConfig](#knexconfig)
21
21
 
@@ -26,7 +26,7 @@ FaasJS's sql plugin, base on [Knex](https://knexjs.org/).
26
26
  - [transaction](#transaction)
27
27
  - [useKnex](#useknex)
28
28
 
29
- ## Type aliases
29
+ ## Type Aliases
30
30
 
31
31
  ### KnexConfig
32
32
 
@@ -78,7 +78,7 @@ ___
78
78
  | Name | Type | Default value |
79
79
  | :------ | :------ | :------ |
80
80
  | `sql` | `string` | `undefined` |
81
- | `bindings` | `RawBinding`[] \| `ValueDict` | `[]` |
81
+ | `bindings` | `ValueDict` \| `RawBinding`[] | `[]` |
82
82
 
83
83
  #### Returns
84
84
 
package/dist/index.d.ts CHANGED
@@ -31,8 +31,8 @@ declare class Knex implements Plugin {
31
31
  quit(): Promise<void>;
32
32
  }
33
33
  declare function useKnex(config?: KnexConfig): Knex & UseifyPlugin;
34
- declare function query<TName extends Knex$1.TableNames>(table: TName): Knex$1.QueryBuilder<Knex$1.TableType<TName>, {
35
- _base: Knex$1.ResolveTableType<Knex$1.TableType<TName>, "base">;
34
+ declare function query<TName extends Knex$1.TableNames>(table: TName | string): Knex$1.QueryBuilder<any, {
35
+ _base: any;
36
36
  _hasSelection: false;
37
37
  _keys: never;
38
38
  _aliases: {};
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -132,17 +133,17 @@ var Knex = class {
132
133
  }
133
134
  async raw(sql, bindings = []) {
134
135
  if (!this.adapter)
135
- throw Error("[Knex] Client not inited.");
136
+ throw Error("[Knex] Client not initialized.");
136
137
  return this.adapter.raw(sql, bindings);
137
138
  }
138
139
  async transaction(scope, config) {
139
140
  if (!this.adapter)
140
- throw Error("[Knex] Client not inited.");
141
+ throw Error("[Knex] Client not initialized.");
141
142
  return this.adapter.transaction(scope, config);
142
143
  }
143
144
  schema() {
144
145
  if (!this.adapter)
145
- throw Error("[Knex] Client not inited.");
146
+ throw Error("[Knex] Client not initialized.");
146
147
  return this.adapter.schema;
147
148
  }
148
149
  async quit() {
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
3
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
4
  }) : x)(function(x) {
@@ -112,17 +113,17 @@ var Knex = class {
112
113
  }
113
114
  async raw(sql, bindings = []) {
114
115
  if (!this.adapter)
115
- throw Error("[Knex] Client not inited.");
116
+ throw Error("[Knex] Client not initialized.");
116
117
  return this.adapter.raw(sql, bindings);
117
118
  }
118
119
  async transaction(scope, config) {
119
120
  if (!this.adapter)
120
- throw Error("[Knex] Client not inited.");
121
+ throw Error("[Knex] Client not initialized.");
121
122
  return this.adapter.transaction(scope, config);
122
123
  }
123
124
  schema() {
124
125
  if (!this.adapter)
125
- throw Error("[Knex] Client not inited.");
126
+ throw Error("[Knex] Client not initialized.");
126
127
  return this.adapter.schema;
127
128
  }
128
129
  async quit() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/knex",
3
- "version": "0.0.2-beta.393",
3
+ "version": "0.0.2-beta.396",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,9 +22,9 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@faasjs/deep_merge": "^0.0.2-beta.393",
26
- "@faasjs/func": "^0.0.2-beta.393",
27
- "@faasjs/logger": "^0.0.2-beta.393",
25
+ "@faasjs/deep_merge": "^0.0.2-beta.396",
26
+ "@faasjs/func": "^0.0.2-beta.396",
27
+ "@faasjs/logger": "^0.0.2-beta.396",
28
28
  "knex": "*"
29
29
  },
30
30
  "devDependencies": {