@e-mc/db 0.10.6 → 0.11.1
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/LICENSE +1 -1
- package/README.md +10 -10
- package/index.js +2 -2
- package/package.json +4 -4
- package/pool.js +1 -1
- package/util.d.ts +1 -1
package/LICENSE
CHANGED
|
@@ -8,4 +8,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
|
8
8
|
|
|
9
9
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
10
|
|
|
11
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @e-mc/db
|
|
2
2
|
|
|
3
|
-
* NodeJS 16
|
|
4
|
-
*
|
|
3
|
+
* NodeJS 16 LTS
|
|
4
|
+
* ES2021
|
|
5
5
|
|
|
6
6
|
## General Usage
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.11.1/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { DbDataSource } from "./squared";
|
|
@@ -20,7 +20,7 @@ import type { BatchQueryResult, DB_TYPE, ErrorQueryCallback, ExecuteBatchQueryOp
|
|
|
20
20
|
import type { AuthValue } from "./http";
|
|
21
21
|
import type { DbCoerceSettings, DbModule, DbSourceOptions, PoolConfig } from "./settings";
|
|
22
22
|
|
|
23
|
-
import type { SecureContextOptions } from "tls";
|
|
23
|
+
import type { SecureContextOptions } from "node:tls";
|
|
24
24
|
|
|
25
25
|
interface IDb extends IClientDb<IHost, DbModule, DbDataSource, DbSourceOptions, DbCoerceSettings> {
|
|
26
26
|
setCredential(item: DbDataSource): Promise<void>;
|
|
@@ -204,14 +204,14 @@ const [rows1, rows2] = await instance.executeBatchQuery([
|
|
|
204
204
|
|
|
205
205
|
## References
|
|
206
206
|
|
|
207
|
-
- https://www.unpkg.com/@e-mc/types@0.
|
|
208
|
-
- https://www.unpkg.com/@e-mc/types@0.
|
|
209
|
-
- https://www.unpkg.com/@e-mc/types@0.
|
|
210
|
-
- https://www.unpkg.com/@e-mc/types@0.
|
|
211
|
-
- https://www.unpkg.com/@e-mc/types@0.
|
|
207
|
+
- https://www.unpkg.com/@e-mc/types@0.11.1/lib/squared.d.ts
|
|
208
|
+
- https://www.unpkg.com/@e-mc/types@0.11.1/lib/core.d.ts
|
|
209
|
+
- https://www.unpkg.com/@e-mc/types@0.11.1/lib/db.d.ts
|
|
210
|
+
- https://www.unpkg.com/@e-mc/types@0.11.1/lib/http.d.ts
|
|
211
|
+
- https://www.unpkg.com/@e-mc/types@0.11.1/lib/settings.d.ts
|
|
212
212
|
|
|
213
213
|
* https://www.npmjs.com/package/@types/node
|
|
214
214
|
|
|
215
215
|
## LICENSE
|
|
216
216
|
|
|
217
|
-
BSD 3-Clause
|
|
217
|
+
BSD 3-Clause
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const path = require("path");
|
|
2
|
+
const path = require("node:path");
|
|
3
3
|
const types_1 = require("@e-mc/types");
|
|
4
4
|
const core_1 = require("@e-mc/core");
|
|
5
5
|
const request_1 = require("@e-mc/request");
|
|
@@ -70,7 +70,7 @@ class Db extends core_1.ClientDb {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
getCredential(item) {
|
|
73
|
-
let credential = item.credential, stored;
|
|
73
|
+
let credential = item.credential, stored = false;
|
|
74
74
|
if (typeof credential === 'string') {
|
|
75
75
|
credential = this.module[item.source]?.[credential];
|
|
76
76
|
stored = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/db",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "DB modules for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"license": "BSD-3-Clause",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/core": "0.
|
|
24
|
-
"@e-mc/request": "0.
|
|
25
|
-
"@e-mc/types": "0.
|
|
23
|
+
"@e-mc/core": "0.11.1",
|
|
24
|
+
"@e-mc/request": "0.11.1",
|
|
25
|
+
"@e-mc/types": "0.11.1"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/pool.js
CHANGED
package/util.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare namespace util {
|
|
|
10
10
|
function getBasicAuth(auth: AuthValue): string;
|
|
11
11
|
function getBasicAuth(username: unknown, password?: unknown): string;
|
|
12
12
|
function hasBasicAuth(value: string): boolean;
|
|
13
|
-
function parseConnectionString(value: string, scheme?: string):
|
|
13
|
+
function parseConnectionString(value: string, scheme?: string): DbConnection | null;
|
|
14
14
|
function parseServerAuth(value: ServerAuth, all: boolean): ServerAuth;
|
|
15
15
|
function parseServerAuth(value: ServerAuth, port?: number, all?: boolean): ServerAuth;
|
|
16
16
|
function checkEmpty(value: unknown): boolean;
|