@stackpress/inquire-mysql2 0.5.10 → 0.5.12

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.
@@ -1,6 +1,6 @@
1
1
  import type { ResultSetHeader } from 'mysql2/promise';
2
2
  import type { Dialect, Connection, QueryObject, Transaction } from '@stackpress/inquire/types';
3
- import type { Connector, Resource, Results } from './types';
3
+ import type { Connector, Resource, Results } from './types.js';
4
4
  export default class Mysql2Connection implements Connection<Resource> {
5
5
  readonly dialect: Dialect;
6
6
  protected _lastId?: number | string;
package/cjs/helpers.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import Engine from '@stackpress/inquire/Engine';
2
- import type { Connector } from './types';
3
- export declare function connect(resource: Connector): Engine<import("mysql2/promise").Connection>;
2
+ import type { Connector } from './types.js';
3
+ export declare function connect(resource: Connector): Engine<import("mysql2/promise.js").Connection>;
package/cjs/helpers.js CHANGED
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.connect = connect;
7
7
  const Engine_1 = __importDefault(require("@stackpress/inquire/Engine"));
8
- const Connection_1 = __importDefault(require("./Connection"));
8
+ const Connection_js_1 = __importDefault(require("./Connection.js"));
9
9
  function connect(resource) {
10
- const connection = new Connection_1.default(resource);
10
+ const connection = new Connection_js_1.default(resource);
11
11
  return new Engine_1.default(connection);
12
12
  }
package/cjs/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import Mysql2Connection from './Connection';
2
- import { connect } from './helpers';
3
- export type { Results, Resource, Connector } from './types';
1
+ import Mysql2Connection from './Connection.js';
2
+ import { connect } from './helpers.js';
3
+ export type { Results, Resource, Connector } from './types.js';
4
4
  export { Mysql2Connection, connect };
5
5
  export default connect;
package/cjs/index.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.connect = exports.Mysql2Connection = void 0;
7
- const Connection_1 = __importDefault(require("./Connection"));
8
- exports.Mysql2Connection = Connection_1.default;
9
- const helpers_1 = require("./helpers");
10
- Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return helpers_1.connect; } });
11
- exports.default = helpers_1.connect;
7
+ const Connection_js_1 = __importDefault(require("./Connection.js"));
8
+ exports.Mysql2Connection = Connection_js_1.default;
9
+ const helpers_js_1 = require("./helpers.js");
10
+ Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return helpers_js_1.connect; } });
11
+ exports.default = helpers_js_1.connect;
@@ -1,6 +1,6 @@
1
1
  import type { ResultSetHeader } from 'mysql2/promise';
2
2
  import type { Dialect, Connection, QueryObject, Transaction } from '@stackpress/inquire/types';
3
- import type { Connector, Resource, Results } from './types';
3
+ import type { Connector, Resource, Results } from './types.js';
4
4
  export default class Mysql2Connection implements Connection<Resource> {
5
5
  readonly dialect: Dialect;
6
6
  protected _lastId?: number | string;
package/esm/helpers.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import Engine from '@stackpress/inquire/Engine';
2
- import type { Connector } from './types';
3
- export declare function connect(resource: Connector): Engine<import("mysql2/promise").Connection>;
2
+ import type { Connector } from './types.js';
3
+ export declare function connect(resource: Connector): Engine<import("mysql2/promise.js").Connection>;
package/esm/helpers.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Engine from '@stackpress/inquire/Engine';
2
- import Connection from './Connection';
2
+ import Connection from './Connection.js';
3
3
  export function connect(resource) {
4
4
  const connection = new Connection(resource);
5
5
  return new Engine(connection);
package/esm/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import Mysql2Connection from './Connection';
2
- import { connect } from './helpers';
3
- export type { Results, Resource, Connector } from './types';
1
+ import Mysql2Connection from './Connection.js';
2
+ import { connect } from './helpers.js';
3
+ export type { Results, Resource, Connector } from './types.js';
4
4
  export { Mysql2Connection, connect };
5
5
  export default connect;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import Mysql2Connection from './Connection';
2
- import { connect } from './helpers';
1
+ import Mysql2Connection from './Connection.js';
2
+ import { connect } from './helpers.js';
3
3
  export { Mysql2Connection, connect };
4
4
  export default connect;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@stackpress/inquire-mysql2",
4
- "version": "0.5.10",
4
+ "version": "0.5.12",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Generic typed mysql2",
7
7
  "author": "Chris <chris@incept.asia>",
@@ -59,10 +59,10 @@
59
59
  "build:tsc": "yarn build:tsc:cjs && yarn build:tsc:esm",
60
60
  "build:tsc:cjs": "tsc -p ./tsconfig.cjs.json",
61
61
  "build:tsc:esm": "tsc -p ./tsconfig.esm.json",
62
- "test": "DATABASE_URL=test ts-mocha -p ./tsconfig.cjs.json tests/*.test.ts"
62
+ "test": "DATABASE_URL=test ts-mocha -r tsx tests/*.test.ts"
63
63
  },
64
64
  "dependencies": {
65
- "@stackpress/inquire": "0.5.10"
65
+ "@stackpress/inquire": "0.5.12"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "mysql2": "^3.11.5"
@@ -76,6 +76,7 @@
76
76
  "ts-mocha": "10.0.0",
77
77
  "mysql2": "3.11.5",
78
78
  "ts-node": "10.9.2",
79
+ "tsx": "4.19.3",
79
80
  "typescript": "5.7.2"
80
81
  }
81
82
  }