baja-lite 1.5.10 → 1.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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/sql.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.5.10",
3
+ "version": "1.5.12",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/baja-lite",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "@msgpack/msgpack": "3.1.2",
39
39
  "@types/request-promise": "4.1.51",
40
40
  "axios": "1.10.0",
41
- "baja-lite-field": "1.4.10",
41
+ "baja-lite-field": "1.4.11",
42
42
  "decimal.js": "10.5.0",
43
43
  "html-parse-stringify": "3.0.1",
44
44
  "iterare": "1.2.1",
@@ -57,11 +57,11 @@
57
57
  "@types/better-sqlite3": "7.6.13",
58
58
  "@types/lodash.get": "4.4.9",
59
59
  "@types/mustache": "4.2.6",
60
- "@types/node": "24.0.7",
60
+ "@types/node": "24.0.8",
61
61
  "@types/shelljs": "0.8.16",
62
62
  "@types/sqlstring": "2.3.2",
63
- "@typescript-eslint/eslint-plugin": "8.35.0",
64
- "@typescript-eslint/parser": "8.35.0",
63
+ "@typescript-eslint/eslint-plugin": "8.35.1",
64
+ "@typescript-eslint/parser": "8.35.1",
65
65
  "better-sqlite3": "12.2.0",
66
66
  "ioredis": "5.6.1",
67
67
  "mongodb": "6.17.0",
package/sql.js CHANGED
@@ -2655,11 +2655,11 @@ export class SqlService {
2655
2655
  }
2656
2656
  }
2657
2657
  template(option) {
2658
- Throw.if(!!this[_ids] && this[_ids].length > 1 && !option.where, 'muit id must set where!');
2659
- Throw.if((!this[_ids] || this[_ids].length === 0) && !option.where, 'if not set id on class, must set where!');
2660
- Throw.if(!option.id && !option.where, 'not found id or where!');
2661
- Throw.if(!!option.id && !!this[_ids] && this[_ids].length > 1, 'muit id must set where!');
2662
- Throw.if(!!option.id && !!option.where, 'id and where only one can set!');
2658
+ Throw.if(!!this[_ids] && this[_ids].length > 1 && !option.where, `muit id must set where!(${option.tableName})`);
2659
+ Throw.if((!this[_ids] || this[_ids].length === 0) && !option.where, `if not set id on class, must set where!(${option.tableName})`);
2660
+ Throw.if(!option.id && !option.where, `not found id or where!(${option.tableName})`);
2661
+ Throw.if(!!option.id && !!this[_ids] && this[_ids].length > 1, `muit id must set where!(${option.tableName})`);
2662
+ Throw.if(!!option.id && !!option.where, `id and where only one can set!(${option.tableName})`);
2663
2663
  option.mode ?? (option.mode = SelectMode.Common);
2664
2664
  option.templateResult ?? (option.templateResult = TemplateResult.AssertOne);
2665
2665
  option.error ?? (option.error = 'error data!');