@proteinjs/db-settings 1.1.18 → 1.1.20

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.20](https://github.com/brentbahry/db/compare/@proteinjs/db-settings@1.1.19...@proteinjs/db-settings@1.1.20) (2024-08-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * refactored to implement new @proteinjs/logger/Logger api ([66578f2](https://github.com/brentbahry/db/commit/66578f267d9293c0d5703c63e53d8edf68325f52))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.1.18](https://github.com/brentbahry/db/compare/@proteinjs/db-settings@1.1.17...@proteinjs/db-settings@1.1.18) (2024-08-11)
7
18
 
8
19
 
@@ -1,9 +1,9 @@
1
1
  /** Load Dependency Source Graphs */
2
2
  import '@proteinjs/db';
3
+ import '@proteinjs/logger';
3
4
  import '@proteinjs/reflection';
4
5
  import '@proteinjs/service';
5
6
  import '@proteinjs/user';
6
- import '@proteinjs/util';
7
7
  import 'moment';
8
8
  export * from '../index';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,QAAQ,CAAC;AAyBhB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,QAAQ,CAAC;AAyBhB,cAAc,UAAU,CAAC"}
@@ -16,10 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  require("@proteinjs/db");
19
+ require("@proteinjs/logger");
19
20
  require("@proteinjs/reflection");
20
21
  require("@proteinjs/service");
21
22
  require("@proteinjs/user");
22
- require("@proteinjs/util");
23
23
  require("moment");
24
24
  /** Generate Source Graph */
25
25
  var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-settings/Settings\",\"value\":{\"packageName\":\"@proteinjs/db-settings\",\"name\":\"Settings\",\"filePath\":\"/home/runner/work/db/db/packages/settings/src/Settings.ts\",\"qualifiedName\":\"@proteinjs/db-settings/Settings\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"get\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultValue\",\"type\":{\"packageName\":\"\",\"name\":\"T\",\"filePath\":null,\"qualifiedName\":\"/T\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"set\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db-settings\",\"name\":\"SettingsService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-settings/SettingsService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db-settings/SettingsService\",\"value\":{\"packageName\":\"@proteinjs/db-settings\",\"name\":\"SettingsService\",\"filePath\":\"/home/runner/work/db/db/packages/settings/src/services/SettingsService.ts\",\"qualifiedName\":\"@proteinjs/db-settings/SettingsService\",\"properties\":[],\"methods\":[{\"name\":\"get\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultValue\",\"type\":{\"packageName\":\"\",\"name\":\"T\",\"filePath\":null,\"qualifiedName\":\"/T\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"set\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"},{\"v\":\"@proteinjs/db-settings/Setting\",\"value\":{\"packageName\":\"@proteinjs/db-settings\",\"name\":\"Setting\",\"filePath\":\"/home/runner/work/db/db/packages/settings/src/tables/SettingTable.ts\",\"qualifiedName\":\"@proteinjs/db-settings/Setting\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/user/ScopedRecord\"},{\"v\":\"@proteinjs/db-settings/SettingTable\",\"value\":{\"packageName\":\"@proteinjs/db-settings\",\"name\":\"SettingTable\",\"filePath\":\"/home/runner/work/db/db/packages/settings/src/tables/SettingTable.ts\",\"qualifiedName\":\"@proteinjs/db-settings/SettingTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<Setting>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<Setting>['auth']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/db-settings/Setting\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"}],\"edges\":[{\"v\":\"@proteinjs/db-settings/Settings\",\"w\":\"@proteinjs/db-settings/SettingsService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-settings/SettingsService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db-settings/Setting\",\"w\":\"@proteinjs/user/ScopedRecord\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db-settings/SettingTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,8BAA4B;AAC5B,2BAAyB;AACzB,2BAAyB;AACzB,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,wqNAAwqN,CAAC;AAG7rN,4BAA4B;AAE5B,4CAA2C;AAC3C,2DAA0D;AAE1D,IAAM,WAAW,GAAG;IACnB,iCAAiC,EAAE,mBAAQ;IAC3C,qCAAqC,EAAE,2BAAY;CACnD,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,6BAA2B;AAC3B,iCAA+B;AAC/B,8BAA4B;AAC5B,2BAAyB;AACzB,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,wqNAAwqN,CAAC;AAG7rN,4BAA4B;AAE5B,4CAA2C;AAC3C,2DAA0D;AAE1D,IAAM,WAAW,GAAG;IACnB,iCAAiC,EAAE,mBAAQ;IAC3C,qCAAqC,EAAE,2BAAY;CACnD,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/Settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAsB,MAAM,4BAA4B,CAAC;AAIjF,eAAO,MAAM,WAAW,gBAA4F,CAAC;AAErH,qBAAa,QAAS,YAAW,eAAe;IAC9C,OAAO,CAAC,MAAM,CAAqC;IAC5C,eAAe;;;;MAIpB;IAEI,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;IAUrC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAQnC"}
1
+ {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/Settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAsB,MAAM,4BAA4B,CAAC;AAIjF,eAAO,MAAM,WAAW,gBAA4F,CAAC;AAErH,qBAAa,QAAS,YAAW,eAAe;IAC9C,OAAO,CAAC,MAAM,CAA+C;IACtD,eAAe;;;;MAIpB;IAEI,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;IAUrC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAQnC"}
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Settings = exports.getSettings = void 0;
40
- var util_1 = require("@proteinjs/util");
40
+ var logger_1 = require("@proteinjs/logger");
41
41
  var SettingsService_1 = require("./services/SettingsService");
42
42
  var tables_1 = require("./tables/tables");
43
43
  var user_1 = require("@proteinjs/user");
@@ -45,7 +45,7 @@ var getSettings = function () { return (typeof self === 'undefined' ? new Settin
45
45
  exports.getSettings = getSettings;
46
46
  var Settings = /** @class */ (function () {
47
47
  function Settings() {
48
- this.logger = new util_1.Logger(this.constructor.name);
48
+ this.logger = new logger_1.Logger({ name: this.constructor.name });
49
49
  this.serviceMetadata = {
50
50
  auth: {
51
51
  allUsers: true,
@@ -81,7 +81,7 @@ var Settings = /** @class */ (function () {
81
81
  case 1:
82
82
  rowsUpdated = _a.sent();
83
83
  if (!(rowsUpdated == 0)) return [3 /*break*/, 3];
84
- this.logger.info("Creating new setting: ".concat(name));
84
+ this.logger.info({ message: "Creating new setting", obj: { name: name, value: value } });
85
85
  return [4 /*yield*/, db.insert(tables_1.tables.Setting, { name: name, value: value })];
86
86
  case 2:
87
87
  _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/Settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAyC;AACzC,8DAAiF;AACjF,0CAAy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AW,GAAG,SAAoD;6BACpE,CAAA,WAAW,IAAI,CAAC,CAAA,EAAhB,wBAAgB;wBAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,GAAG,EAAE,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CAAC,CAAC;wBAC5E,qBAAM,EAAE,CAAC,MAAM,CAAC,eAAM,CAAC,OAAO,EAAE,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,CAAC,EAAA;;wBAAhD,SAAgD,CAAC;;;;;;KAEpD;IACH,eAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,4BAAQ"}
@@ -1,10 +1,10 @@
1
1
  /** Load Dependency Source Graphs */
2
2
 
3
3
  import '@proteinjs/db';
4
+ import '@proteinjs/logger';
4
5
  import '@proteinjs/reflection';
5
6
  import '@proteinjs/service';
6
7
  import '@proteinjs/user';
7
- import '@proteinjs/util';
8
8
  import 'moment';
9
9
 
10
10
  /** Generate Source Graph */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteinjs/db-settings",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "Db settings",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,11 +21,11 @@
21
21
  "watch": "reflection-watch"
22
22
  },
23
23
  "dependencies": {
24
- "@proteinjs/db": "^1.5.6",
24
+ "@proteinjs/db": "^1.5.7",
25
+ "@proteinjs/logger": "1.0.4",
25
26
  "@proteinjs/reflection": "1.1.8",
26
27
  "@proteinjs/service": "1.0.27",
27
- "@proteinjs/user": "1.1.2",
28
- "@proteinjs/util": "1.4.0",
28
+ "@proteinjs/user": "1.1.3",
29
29
  "moment": "2.29.4"
30
30
  },
31
31
  "devDependencies": {
@@ -43,5 +43,5 @@
43
43
  },
44
44
  "main": "./dist/generated/index.js",
45
45
  "types": "./dist/generated/index.d.ts",
46
- "gitHead": "951ea0c83422fb75a4778f85031cfa1cb59852e9"
46
+ "gitHead": "16c2c7eac3d6c1f01a5bca9b24c1e949e295757e"
47
47
  }
package/src/Settings.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Logger } from '@proteinjs/util';
1
+ import { Logger } from '@proteinjs/logger';
2
2
  import { SettingsService, getSettingsService } from './services/SettingsService';
3
3
  import { tables } from './tables/tables';
4
4
  import { getScopedDb } from '@proteinjs/user';
@@ -6,7 +6,7 @@ import { getScopedDb } from '@proteinjs/user';
6
6
  export const getSettings = () => (typeof self === 'undefined' ? new Settings() : (getSettingsService() as Settings));
7
7
 
8
8
  export class Settings implements SettingsService {
9
- private logger = new Logger(this.constructor.name);
9
+ private logger = new Logger({ name: this.constructor.name });
10
10
  public serviceMetadata = {
11
11
  auth: {
12
12
  allUsers: true,
@@ -27,7 +27,7 @@ export class Settings implements SettingsService {
27
27
  const db = getScopedDb();
28
28
  const rowsUpdated = await db.update(tables.Setting, { value }, { name });
29
29
  if (rowsUpdated == 0) {
30
- this.logger.info(`Creating new setting: ${name}`);
30
+ this.logger.info({ message: `Creating new setting`, obj: { name, value } });
31
31
  await db.insert(tables.Setting, { name, value });
32
32
  }
33
33
  }