@samet-it/be-db-common 1.3.6 → 1.3.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.
@@ -1,2 +1,2 @@
1
- export * from './index.types.js';
2
- export * from './db.repo.js';
1
+ export * from "./index.types.js";
2
+ export * from "./db.repo.js";
@@ -1,2 +1,2 @@
1
- export * from './index.types.js';
2
- export * from './db.repo.js';
1
+ export * from "./index.types.js";
2
+ export * from "./db.repo.js";
@@ -219,7 +219,7 @@ export interface DbRepoLike<CONN extends DbConnectionLike, OPT extends DbExecOpt
219
219
  * @return {Promise} - generic type
220
220
  * @async
221
221
  * */
222
- exec<T>(fn: Promise<T>, opt?: string | Omit<OPT, 'printSql'>): Promise<T>;
222
+ exec<T>(fn: Promise<T>, opt?: string | Omit<OPT, "printSql">): Promise<T>;
223
223
  /**
224
224
  * Execute a sql and return rows
225
225
  *
@@ -246,22 +246,22 @@ export interface DbRepoLike<CONN extends DbConnectionLike, OPT extends DbExecOpt
246
246
  * */
247
247
  toUrn(urnRec: URN): string;
248
248
  /**
249
-
250
- * Extract core urn key from document without prefix
251
- * - It returns code part of urn `<prefix>:<code>`;
252
- *
253
- * @param {Partial<Entity>} doc - document
254
- * @return {string} - key
255
- * */
249
+
250
+ * Extract core urn key from document without prefix
251
+ * - It returns code part of urn `<prefix>:<code>`;
252
+ *
253
+ * @param {Partial<Entity>} doc - document
254
+ * @return {string} - key
255
+ * */
256
256
  toUrnKey(doc: Partial<ENT>): string;
257
257
  /**
258
-
259
- * Extract core urn key from urn without prefix
260
- * - It returns code part of urn `<prefix>:<code>`;
261
- *
262
- * @param {string} urn - urn
263
- * @return {string} - key
264
- * */
258
+
259
+ * Extract core urn key from urn without prefix
260
+ * - It returns code part of urn `<prefix>:<code>`;
261
+ *
262
+ * @param {string} urn - urn
263
+ * @return {string} - key
264
+ * */
265
265
  toUrnKey(urn: string): string;
266
266
  /**
267
267
  * Generates urn tuple
@@ -1026,7 +1026,7 @@ export interface DbCheckKeysResult<ID extends KeyValue> {
1026
1026
  * - if primary(urn) => `[value (string), 'urn'];
1027
1027
  * - if secondary(id) => `[value (string|number), 'id'];
1028
1028
  * */
1029
- export type DbCheckKeysTuple<ID extends KeyValue> = [string, 'urn'] | [ID, 'id'];
1029
+ export type DbCheckKeysTuple<ID extends KeyValue> = [string, "urn"] | [ID, "id"];
1030
1030
  /**
1031
1031
  * DB `$toUrnTuple` lambda
1032
1032
  *
@@ -1090,7 +1090,7 @@ export type DbRepoExtensionLambda<ENT extends Entity<ID>, ID extends KeyValue> =
1090
1090
  /**
1091
1091
  * Urn delimiter literals (options)
1092
1092
  * */
1093
- export type UrnDelimiter = ',' | '|' | ';' | '/';
1093
+ export type UrnDelimiter = "," | "|" | ";" | "/";
1094
1094
  /**
1095
1095
  * DB meta
1096
1096
  * */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samet-it/be-db-common",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Backend DB Common",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,52 +20,39 @@
20
20
  "scripts": {
21
21
  "clear": "rimraf dist && rimraf coverage",
22
22
  "clear:nm": "rimraf node_modules && npm run clear",
23
- "lint": "eslint src/**/*.ts --quiet",
24
- "lint:verbose": "eslint src/**/*.ts",
23
+ "lint": "eslint src/**/*.ts",
24
+ "lint:fix": "eslint src/**/*.ts --fix",
25
+ "format": "prettier --check \"{src,test}/**/*.{ts,tsx,js}\"",
26
+ "format:force": "prettier --write \"{src,test}/**/*.{ts,tsx,js}\"",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "test:coverage": "vitest run --coverage",
25
30
  "asset": "node -r ts-node/register commands/assets.js",
26
31
  "build": "npm run clear && tsc && npm run asset",
27
- "test": "jest --config=jest.json --detectOpenHandles",
28
- "coverage": "rimraf coverage && jest --config=jest.json --coverage --coverageDirectory=coverage",
29
- "sample": "node -r ts-node/register src/sample.ts",
30
- "publish:public": "npm run build && npm publish -access=public"
32
+ "publish:public": "npm run lint && npm run format:force && npm run test && npm run build && npm publish --access=public"
31
33
  },
32
34
  "files": [
33
35
  "dist/*"
34
36
  ],
35
37
  "license": "ISC",
36
38
  "devDependencies": {
37
- "@babel/preset-env": "^7.28.0",
38
- "@babel/preset-typescript": "^7.27.1",
39
- "@eslint/js": "^9.33.0",
40
- "@types/express": "^5.0.6",
41
- "@types/jest": "^30.0.0",
39
+ "@eslint/js": "^9.0.0",
42
40
  "@types/node": "^24.2.1",
43
- "@typescript-eslint/eslint-plugin": "^8.39.1",
44
- "@typescript-eslint/parser": "^8.39.1",
45
- "eslint": "^9.33.0",
41
+ "@vitest/coverage-istanbul": "^4.0.18",
42
+ "eslint": "^9.0.0",
46
43
  "eslint-config-prettier": "^10.1.8",
47
- "eslint-config-standard": "^17.1.0",
48
- "eslint-plugin-import": "^2.32.0",
49
- "eslint-plugin-jsdoc": "^54.0.0",
50
- "eslint-plugin-node": "^11.1.0",
51
- "husky": "^9.1.7",
52
- "jest": "^29.7.0",
53
- "prettier": "^3.6.2",
44
+ "eslint-plugin-n": "^17.24.0",
45
+ "prettier": "^3.8.1",
54
46
  "rimraf": "^6.0.1",
55
- "test": "^3.3.0",
56
- "ts-jest": "^29.4.1",
57
47
  "ts-node": "^10.9.2",
58
- "typescript": "^5.9.2",
59
- "typescript-eslint": "^8.39.1"
60
- },
61
- "overrides": {
62
- "eslint-config-standard": {
63
- "eslint": "^9.33.0"
64
- }
48
+ "typescript": "^5.9.3",
49
+ "typescript-eslint": "^8.0.0",
50
+ "vitest": "^4.0.18",
51
+ "@types/express": "^5.0.6"
65
52
  },
66
53
  "dependencies": {
67
- "@leyyo/query": "^1.3.4",
68
- "@samet-it/be-base-common": "^1.3.4",
69
- "@samet-it/be-cache-common": "^1.3.5"
54
+ "@leyyo/query": "^1.3.6",
55
+ "@samet-it/be-base-common": "^1.3.8",
56
+ "@samet-it/be-cache-common": "^1.3.8"
70
57
  }
71
58
  }