@art-ws/db-context 2.0.9 → 2.0.10

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,4 +1,4 @@
1
- import type { DbQuery } from "./db-client";
1
+ import type { DbQuery } from "./db-client.js";
2
2
  export declare abstract class DbQueryBase<T> implements DbQuery<T> {
3
3
  then<TResult1 = T[], TResult2 = never>(onfulfilled?: (value: T[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
4
4
  abstract getName(): string;
@@ -1,2 +1,2 @@
1
- export * from "./db-client";
2
- export * from "./db-query-base";
1
+ export * from "./db-client.js";
2
+ export * from "./db-query-base.js";
@@ -1,3 +1,3 @@
1
1
  // created from 'create-ts-index'
2
- export * from "./db-client";
3
- export * from "./db-query-base";
2
+ export * from "./db-client.js";
3
+ export * from "./db-query-base.js";
@@ -1,6 +1,6 @@
1
1
  import type { IDisposable } from "@art-ws/common";
2
- import type { DbClientFactory, DbQuery, DbQueryArgs, DbQueryFactory } from "../db-client";
3
- import type { DbContext } from "./types";
2
+ import type { DbClientFactory, DbQuery, DbQueryArgs, DbQueryFactory } from "../db-client/index.js";
3
+ import type { DbContext } from "./types.js";
4
4
  export declare class DbContextBase<S> implements DbContext.Context, IDisposable<void> {
5
5
  private dbQueryFactory;
6
6
  private dbClient?;
@@ -1,4 +1,4 @@
1
- import type { DbContext } from "./types";
1
+ import type { DbContext } from "./types.js";
2
2
  export type GenericOfDbModel<T> = T extends DbModel<infer X> ? X : never;
3
3
  export declare class DbModel<T> implements DbContext.Model, DbContext.ModelApi<T> {
4
4
  dbContext: DbContext.Context;
@@ -1,3 +1,3 @@
1
- export * from "./db-context";
2
- export * from "./db-model";
3
- export * from "./types";
1
+ export * from "./db-context.js";
2
+ export * from "./db-model.js";
3
+ export * from "./types.js";
@@ -1,4 +1,4 @@
1
1
  // created from 'create-ts-index'
2
- export * from "./db-context";
3
- export * from "./db-model";
4
- export * from "./types";
2
+ export * from "./db-context.js";
3
+ export * from "./db-model.js";
4
+ export * from "./types.js";
@@ -1,4 +1,4 @@
1
- import type { DbClientFactory, DbQuery, DbQueryArgs } from "../db-client/db-client";
1
+ import type { DbClientFactory, DbQuery, DbQueryArgs } from "../db-client/db-client.js";
2
2
  export declare namespace DbContext {
3
3
  interface Column {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- export * from "./db-client";
2
- export * from "./db-context";
3
- export * from "./pg";
4
- export * from "./pg-db-client";
1
+ export * from "./db-client/index.js";
2
+ export * from "./db-context/index.js";
3
+ export * from "./pg/index.js";
4
+ export * from "./pg-db-client/index.js";
package/dist/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // created from 'create-ts-index'
2
- export * from "./db-client";
3
- export * from "./db-context";
4
- export * from "./pg";
5
- export * from "./pg-db-client";
2
+ export * from "./db-client/index.js";
3
+ export * from "./db-context/index.js";
4
+ export * from "./pg/index.js";
5
+ export * from "./pg-db-client/index.js";
@@ -1 +1 @@
1
- export * from "./pg-pool-base";
1
+ export * from "./pg-pool-base.js";
@@ -1,2 +1,2 @@
1
1
  // created from 'create-ts-index'
2
- export * from "./pg-pool-base";
2
+ export * from "./pg-pool-base.js";
@@ -1,2 +1,2 @@
1
- export * from "./pg-db-client";
2
- export * from "./pg-db-query";
1
+ export * from "./pg-db-client.js";
2
+ export * from "./pg-db-query.js";
@@ -1,3 +1,3 @@
1
1
  // created from 'create-ts-index'
2
- export * from "./pg-db-client";
3
- export * from "./pg-db-query";
2
+ export * from "./pg-db-client.js";
3
+ export * from "./pg-db-query.js";
@@ -1,5 +1,5 @@
1
1
  import type { PoolClient, QueryArrayConfig, QueryConfig, QueryResult } from "pg";
2
- import type { DbClient } from "../db-client";
2
+ import type { DbClient } from "../db-client/index.js";
3
3
  export declare class PgDbClient implements DbClient<PoolClient> {
4
4
  private pgClientFactory;
5
5
  logger: import("@art-ws/slf").Logger;
@@ -1,6 +1,6 @@
1
1
  import { racePromise } from "@art-ws/common";
2
2
  import { getLogger } from "@art-ws/slf";
3
- import { initPgTypesParsers } from "./pg-type-parser";
3
+ import { initPgTypesParsers } from "./pg-type-parser.js";
4
4
  // https://node-postgres.com/api/client
5
5
  // https://github.com/brianc/node-pg-types
6
6
  initPgTypesParsers();
@@ -1,6 +1,6 @@
1
1
  import type { PoolClient } from "pg";
2
- import type { DbQueryConstructorArgs } from "../db-client";
3
- import { DbQueryBase } from "../db-client/db-query-base";
2
+ import type { DbQueryConstructorArgs } from "../db-client/index.js";
3
+ import { DbQueryBase } from "../db-client/db-query-base.js";
4
4
  export declare class PgDbQuery<T> extends DbQueryBase<T> {
5
5
  private args;
6
6
  static FACTORY: (args: DbQueryConstructorArgs<PoolClient, unknown[]>) => PgDbQuery<unknown>;
@@ -1,5 +1,5 @@
1
- import { DbQueryBase } from "../db-client/db-query-base";
2
- import { PgDbClient } from "./pg-db-client";
1
+ import { DbQueryBase } from "../db-client/db-query-base.js";
2
+ import { PgDbClient } from "./pg-db-client.js";
3
3
  export class PgDbQuery extends DbQueryBase {
4
4
  args;
5
5
  static FACTORY = (args) => new PgDbQuery(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@art-ws/db-context",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "db-context",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -12,16 +12,16 @@
12
12
  "dependencies": {
13
13
  "pg": "^8.16.3",
14
14
  "tslib": "^2.8.1",
15
- "@art-ws/common": "2.0.9",
16
- "@art-ws/slf": "2.0.3"
15
+ "@art-ws/common": "2.0.10",
16
+ "@art-ws/slf": "2.0.4"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^24.3.0",
20
20
  "@types/pg": "^8.15.5",
21
21
  "eslint": "^9.34.0",
22
22
  "typescript": "^5.9.2",
23
- "@art-ws/config-eslint": "2.0.3",
24
- "@art-ws/config-ts": "2.0.6"
23
+ "@art-ws/config-ts": "2.0.6",
24
+ "@art-ws/config-eslint": "2.0.3"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc",