@sqb/postgres 4.9.1 → 4.10.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/cjs/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  require("@sqb/postgres-dialect");
4
5
  const connect_1 = require("@sqb/connect");
5
6
  const pg_adapter_js_1 = require("./pg-adapter.js");
6
7
  (0, connect_1.registerAdapter)(new pg_adapter_js_1.PgAdapter());
8
+ tslib_1.__exportStar(require("./pg-adapter.js"), exports);
package/cjs/pg-adapter.js CHANGED
@@ -6,13 +6,15 @@ const postgresql_client_1 = require("postgresql-client");
6
6
  const connect_1 = require("@sqb/connect");
7
7
  const pg_connection_js_1 = require("./pg-connection.js");
8
8
  class PgAdapter {
9
- driver = 'postgresql-client';
10
- dialect = 'postgres';
11
- features = {
12
- cursor: true,
13
- schema: true,
14
- fetchAsString: [connect_1.DataType.DATE, connect_1.DataType.TIMESTAMP, connect_1.DataType.TIMESTAMPTZ]
15
- };
9
+ constructor() {
10
+ this.driver = 'postgresql-client';
11
+ this.dialect = 'postgres';
12
+ this.features = {
13
+ cursor: true,
14
+ schema: true,
15
+ fetchAsString: [connect_1.DataType.DATE, connect_1.DataType.TIMESTAMP, connect_1.DataType.TIMESTAMPTZ]
16
+ };
17
+ }
16
18
  async connect(config) {
17
19
  const cfg = { ...config.driverOptions };
18
20
  if (config.user)
@@ -23,7 +23,6 @@ const SqbDataTypToOIDMap = {
23
23
  [connect_1.DataType.GUID]: postgresql_client_1.DataTypeOIDs.uuid,
24
24
  };
25
25
  class PgConnection {
26
- intlcon;
27
26
  constructor(conn) {
28
27
  this.intlcon = conn;
29
28
  }
package/esm/index.js CHANGED
@@ -2,3 +2,4 @@ import '@sqb/postgres-dialect';
2
2
  import { registerAdapter } from '@sqb/connect';
3
3
  import { PgAdapter } from './pg-adapter.js';
4
4
  registerAdapter(new PgAdapter());
5
+ export * from './pg-adapter.js';
package/esm/pg-adapter.js CHANGED
@@ -3,13 +3,15 @@ import { Connection } from 'postgresql-client';
3
3
  import { DataType } from '@sqb/connect';
4
4
  import { PgConnection } from './pg-connection.js';
5
5
  export class PgAdapter {
6
- driver = 'postgresql-client';
7
- dialect = 'postgres';
8
- features = {
9
- cursor: true,
10
- schema: true,
11
- fetchAsString: [DataType.DATE, DataType.TIMESTAMP, DataType.TIMESTAMPTZ]
12
- };
6
+ constructor() {
7
+ this.driver = 'postgresql-client';
8
+ this.dialect = 'postgres';
9
+ this.features = {
10
+ cursor: true,
11
+ schema: true,
12
+ fetchAsString: [DataType.DATE, DataType.TIMESTAMP, DataType.TIMESTAMPTZ]
13
+ };
14
+ }
13
15
  async connect(config) {
14
16
  const cfg = { ...config.driverOptions };
15
17
  if (config.user)
@@ -20,7 +20,6 @@ const SqbDataTypToOIDMap = {
20
20
  [DataType.GUID]: DataTypeOIDs.uuid,
21
21
  };
22
22
  export class PgConnection {
23
- intlcon;
24
23
  constructor(conn) {
25
24
  this.intlcon = conn;
26
25
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqb/postgres",
3
3
  "description": "SQB serialization extension for PostgreSQL database",
4
- "version": "4.9.1",
4
+ "version": "4.10.1",
5
5
  "author": "Panates",
6
6
  "contributors": [
7
7
  "Eray Hanoglu <e.hanoglu@panates.com>",
@@ -13,6 +13,10 @@
13
13
  "url": "https://github.com/sqbjs/sqb.git",
14
14
  "directory": "packages/postgres"
15
15
  },
16
+ "type": "module",
17
+ "module": "./esm/index.js",
18
+ "main": "./cjs/index.js",
19
+ "types": "./types/index.d.ts",
16
20
  "scripts": {
17
21
  "compile": "tsc",
18
22
  "prebuild": "npm run lint && npm run clean",
@@ -29,27 +33,17 @@
29
33
  "clean:cover": "rimraf ../../coverage/postgres"
30
34
  },
31
35
  "dependencies": {
32
- "putil-promisify": "^1.10.0"
36
+ "putil-promisify": "^1.10.1"
33
37
  },
34
38
  "devDependencies": {
35
- "postgresql-client": "^2.5.9"
39
+ "postgresql-client": "^2.10.1"
36
40
  },
37
41
  "peerDependencies": {
38
- "@sqb/builder": "^4.9.1",
39
- "@sqb/connect": "^4.9.1",
40
- "@sqb/postgres-dialect": "^4.9.1",
42
+ "@sqb/builder": "^4.10.1",
43
+ "@sqb/connect": "^4.10.1",
44
+ "@sqb/postgres-dialect": "^4.10.1",
41
45
  "postgresql-client": "^2.x.x"
42
46
  },
43
- "type": "module",
44
- "types": "esm/index.d.ts",
45
- "exports": {
46
- ".": {
47
- "require": "./cjs/index.js",
48
- "default": "./esm/index.js"
49
- },
50
- "./cjs": "./cjs/index.js",
51
- "./esm": "./esm/index.js"
52
- },
53
47
  "engines": {
54
48
  "node": ">=16.0",
55
49
  "npm": ">=7.0.0"
@@ -58,6 +52,7 @@
58
52
  "bin/",
59
53
  "cjs/",
60
54
  "esm/",
55
+ "types/",
61
56
  "LICENSE",
62
57
  "README.md"
63
58
  ],
@@ -0,0 +1,2 @@
1
+ import '@sqb/postgres-dialect';
2
+ export * from './pg-adapter.js';
package/esm/index.d.ts DELETED
@@ -1 +0,0 @@
1
- import '@sqb/postgres-dialect';
File without changes
File without changes
File without changes