@relq/orm 0.1.5 → 0.1.7

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.
@@ -54,7 +54,7 @@ let mysql2Module = null;
54
54
  async function loadMysql2() {
55
55
  if (!mysql2Module) {
56
56
  try {
57
- const mod = await Promise.resolve().then(() => __importStar(require("../../utils/addon/mysql/mysql2.cjs")));
57
+ const mod = await Promise.resolve().then(() => __importStar(require('mysql2')));
58
58
  mysql2Module = (mod.default || mod);
59
59
  return mysql2Module;
60
60
  }
@@ -55,7 +55,7 @@ let PgClient = null;
55
55
  async function loadPg() {
56
56
  if (!PgPool || !PgClient) {
57
57
  try {
58
- const pg = await Promise.resolve().then(() => __importStar(require("../../../addon/pg.cjs")));
58
+ const pg = await Promise.resolve().then(() => __importStar(require('pg')));
59
59
  PgPool = pg.Pool;
60
60
  PgClient = pg.Client;
61
61
  return { Pool: pg.Pool, Client: pg.Client };
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.executeCursorEach = executeCursorEach;
7
7
  exports.executePagination = executePagination;
8
- const pg_cursor_1 = __importDefault(require("../../addon/cursor.cjs"));
8
+ const pg_cursor_1 = __importDefault(require("pg-cursor"));
9
9
  const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
10
10
  const pagination_types_1 = require("../../types/pagination-types.cjs");
11
11
  const methods_1 = require("../../core/helpers/methods.cjs");
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ListenerConnection = void 0;
7
7
  const node_events_1 = require("node:events");
8
- const pg_1 = require("../../addon/pg.cjs");
8
+ const pg_1 = require("pg");
9
9
  const pg_format_1 = __importDefault(require("../../shared/pg-format.cjs"));
10
10
  class ListenerConnection extends node_events_1.EventEmitter {
11
11
  client = null;
@@ -14,7 +14,7 @@ let mysql2Module = null;
14
14
  export async function loadMysql2() {
15
15
  if (!mysql2Module) {
16
16
  try {
17
- const mod = await import("../../utils/addon/mysql/mysql2.js");
17
+ const mod = await import('mysql2');
18
18
  mysql2Module = (mod.default || mod);
19
19
  return mysql2Module;
20
20
  }
@@ -18,7 +18,7 @@ let PgClient = null;
18
18
  export async function loadPg() {
19
19
  if (!PgPool || !PgClient) {
20
20
  try {
21
- const pg = await import("../../../addon/pg.js");
21
+ const pg = await import('pg');
22
22
  PgPool = pg.Pool;
23
23
  PgClient = pg.Client;
24
24
  return { Pool: pg.Pool, Client: pg.Client };
@@ -1,4 +1,4 @@
1
- import Cursor from "../../addon/cursor.js";
1
+ import Cursor from "pg-cursor";
2
2
  import { RelqConfigError, RelqQueryError } from "../../shared/errors/relq-errors.js";
3
3
  import { randomLimit } from "../../types/pagination-types.js";
4
4
  import { INTERNAL } from "../../core/helpers/methods.js";
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from 'node:events';
2
- import { Client } from "../../addon/pg.js";
2
+ import { Client } from 'pg';
3
3
  import format from "../../shared/pg-format.js";
4
4
  export class ListenerConnection extends EventEmitter {
5
5
  client = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relq/orm",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "The runtime engine for Relq — type-safe PostgreSQL ORM for TypeScript",
5
5
  "author": "Olajide Mathew O. <olajide.mathew@yuniq.solutions>",
6
6
  "license": "MIT",
@@ -41,7 +41,9 @@
41
41
  "node": ">=18.0.0"
42
42
  },
43
43
  "dependencies": {
44
- "@aws-sdk/dsql-signer": "^3.1019.0"
44
+ "pg": "^8.20.0",
45
+ "pg-cursor": "^2.19.0",
46
+ "mysql2": "^3.20.0"
45
47
  },
46
48
  "sideEffects": false,
47
49
  "peerDependencies": {
@@ -1,68 +0,0 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __returnValue = (v) => v;
50
- function __exportSetter(name, newValue) {
51
- this[name] = __returnValue.bind(null, newValue);
52
- }
53
- var __export = (target, all) => {
54
- for (var name in all)
55
- __defProp(target, name, {
56
- get: all[name],
57
- enumerable: true,
58
- configurable: true,
59
- set: __exportSetter.bind(all, name)
60
- });
61
- };
62
-
63
- // src/orm/pg/utils/addon/pg/cursor.ts
64
- var exports_cursor = {};
65
- __export(exports_cursor, {
66
- default: () => import_pg_cursor.default
67
- });
68
- module.exports = __toCommonJS(exports_cursor);