@oino-ts/db 0.1.0 → 0.1.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 +4 -4
- package/src/OINODbApi.test.ts +5 -3
- package/src/OINODbDataField.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "OINO TS library package for publishing an SQL database tables as a REST API.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"module": "./dist/esm/index.js",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@oino-ts/common": "0.1.
|
|
22
|
+
"@oino-ts/common": "0.1.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^20.14.10",
|
|
26
|
-
"@types/bun": "
|
|
27
|
-
"@oino-ts/types": "0.1.
|
|
26
|
+
"@types/bun": "^1.1.14",
|
|
27
|
+
"@oino-ts/types": "0.1.2",
|
|
28
28
|
"typedoc": "^0.25.13"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
package/src/OINODbApi.test.ts
CHANGED
|
@@ -15,7 +15,9 @@ import { OINODbMsSql } from "@oino-ts/db-mssql"
|
|
|
15
15
|
|
|
16
16
|
const OINODB_POSTGRESQL_TOKEN = process.env.OINODB_POSTGRESQL_TOKEN || console.error("OINODB_POSTGRESQL_TOKEN not set") || ""
|
|
17
17
|
const OINODB_MARIADB_TOKEN = process.env.OINODB_MARIADB_TOKEN || console.error("OINODB_MARIADB_TOKEN not set") || ""
|
|
18
|
-
const
|
|
18
|
+
const OINOCLOUD_MSSQL_TEST_SRV = process.env.OINOCLOUD_MSSQL_TEST_SRV || console.error("OINOCLOUD_MSSQL_TEST_SRV not set") || ""
|
|
19
|
+
const OINOCLOUD_MSSQL_TEST_USER = process.env.OINOCLOUD_MSSQL_TEST_USER || console.error("OINOCLOUD_MSSQL_TEST_USER not set") || ""
|
|
20
|
+
const OINOCLOUD_MSSQL_TEST_PWD = process.env.OINOCLOUD_DB_NORTHWIND_PWD || console.error("OINOCLOUD_DB_ACCOUNT_PWD not set") || ""
|
|
19
21
|
|
|
20
22
|
type OINOTestParams = {
|
|
21
23
|
name: string
|
|
@@ -26,10 +28,10 @@ type OINOTestParams = {
|
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
const dbs:OINODbParams[] = [
|
|
29
|
-
{ type: "OINODbBunSqlite", url:"file
|
|
31
|
+
{ type: "OINODbBunSqlite", url:"file://./localDb/northwind.sqlite", database: "Northwind" },
|
|
30
32
|
{ type: "OINODbPostgresql", url: "localhost", database: "Northwind", port:5432, user: "node", password: OINODB_POSTGRESQL_TOKEN },
|
|
31
33
|
{ type: "OINODbMariadb", url: "127.0.0.1", database: "Northwind", port:6543, user: "node", password: OINODB_MARIADB_TOKEN },
|
|
32
|
-
{ type: "OINODbMsSql", url:
|
|
34
|
+
{ type: "OINODbMsSql", url: OINOCLOUD_MSSQL_TEST_SRV, database: "Northwind", port:1433, user: OINOCLOUD_MSSQL_TEST_USER, password: OINOCLOUD_MSSQL_TEST_PWD }
|
|
33
35
|
]
|
|
34
36
|
|
|
35
37
|
const api_tests:OINOTestParams[] = [
|
package/src/OINODbDataField.ts
CHANGED
|
@@ -298,7 +298,7 @@ export class OINOBlobDataField extends OINODbDataField {
|
|
|
298
298
|
return cellVal
|
|
299
299
|
|
|
300
300
|
} else if (cellVal instanceof Uint8Array) {
|
|
301
|
-
return Buffer.from(cellVal).toString('base64')
|
|
301
|
+
return Buffer.from(cellVal as Uint8Array).toString('base64')
|
|
302
302
|
|
|
303
303
|
} else {
|
|
304
304
|
return cellVal.toString()
|