@bitblit/ratchet-aws 4.0.97-alpha → 4.0.99-alpha

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.
@@ -4,6 +4,14 @@ exports.PrototypeDao = void 0;
4
4
  const ratchet_common_1 = require("@bitblit/ratchet-common");
5
5
  const luxon_1 = require("luxon");
6
6
  class PrototypeDao {
7
+ constructor(provider, cfg = PrototypeDao.defaultDaoConfig()) {
8
+ this.provider = provider;
9
+ this.cfg = cfg;
10
+ ratchet_common_1.RequireRatchet.notNullOrUndefined(provider, 'provider');
11
+ ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg, 'cfg');
12
+ ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg.guidCreateFunction, 'cfg.guidCreateFunction');
13
+ ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg.guidFieldName, 'cfg.guidFieldName');
14
+ }
7
15
  static defaultDaoConfig() {
8
16
  return {
9
17
  guidCreateFunction: ratchet_common_1.StringRatchet.createType4Guid,
@@ -14,14 +22,6 @@ class PrototypeDao {
14
22
  updatedUtcTimestampFieldName: null,
15
23
  };
16
24
  }
17
- constructor(provider, cfg = PrototypeDao.defaultDaoConfig()) {
18
- this.provider = provider;
19
- this.cfg = cfg;
20
- ratchet_common_1.RequireRatchet.notNullOrUndefined(provider, 'provider');
21
- ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg, 'cfg');
22
- ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg.guidCreateFunction, 'cfg.guidCreateFunction');
23
- ratchet_common_1.RequireRatchet.notNullOrUndefined(cfg.guidFieldName, 'cfg.guidFieldName');
24
- }
25
25
  async fetchAll() {
26
26
  const db = await this.provider.loadDatabase();
27
27
  return db.items || [];
@@ -6,13 +6,6 @@ const ratchet_common_2 = require("@bitblit/ratchet-common");
6
6
  const ratchet_common_3 = require("@bitblit/ratchet-common");
7
7
  const ratchet_common_4 = require("@bitblit/ratchet-common");
8
8
  class EnvironmentService {
9
- static defaultEnvironmentServiceConfig() {
10
- const rval = {
11
- maxRetries: 3,
12
- backoffMultiplierMS: 500,
13
- };
14
- return rval;
15
- }
16
9
  constructor(provider, cfg = EnvironmentService.defaultEnvironmentServiceConfig()) {
17
10
  this.provider = provider;
18
11
  this.cfg = cfg;
@@ -20,6 +13,13 @@ class EnvironmentService {
20
13
  ratchet_common_3.RequireRatchet.notNullOrUndefined(provider);
21
14
  ratchet_common_3.RequireRatchet.notNullOrUndefined(cfg);
22
15
  }
16
+ static defaultEnvironmentServiceConfig() {
17
+ const rval = {
18
+ maxRetries: 3,
19
+ backoffMultiplierMS: 500,
20
+ };
21
+ return rval;
22
+ }
23
23
  async getConfig(name) {
24
24
  ratchet_common_1.Logger.silly('EnvService:Request to read config %s', name);
25
25
  if (!this.readPromiseCache.has(name)) {
@@ -1,6 +1,14 @@
1
1
  import { MapRatchet, RequireRatchet, StringRatchet } from '@bitblit/ratchet-common';
2
2
  import { DateTime } from 'luxon';
3
3
  export class PrototypeDao {
4
+ constructor(provider, cfg = PrototypeDao.defaultDaoConfig()) {
5
+ this.provider = provider;
6
+ this.cfg = cfg;
7
+ RequireRatchet.notNullOrUndefined(provider, 'provider');
8
+ RequireRatchet.notNullOrUndefined(cfg, 'cfg');
9
+ RequireRatchet.notNullOrUndefined(cfg.guidCreateFunction, 'cfg.guidCreateFunction');
10
+ RequireRatchet.notNullOrUndefined(cfg.guidFieldName, 'cfg.guidFieldName');
11
+ }
4
12
  static defaultDaoConfig() {
5
13
  return {
6
14
  guidCreateFunction: StringRatchet.createType4Guid,
@@ -11,14 +19,6 @@ export class PrototypeDao {
11
19
  updatedUtcTimestampFieldName: null,
12
20
  };
13
21
  }
14
- constructor(provider, cfg = PrototypeDao.defaultDaoConfig()) {
15
- this.provider = provider;
16
- this.cfg = cfg;
17
- RequireRatchet.notNullOrUndefined(provider, 'provider');
18
- RequireRatchet.notNullOrUndefined(cfg, 'cfg');
19
- RequireRatchet.notNullOrUndefined(cfg.guidCreateFunction, 'cfg.guidCreateFunction');
20
- RequireRatchet.notNullOrUndefined(cfg.guidFieldName, 'cfg.guidFieldName');
21
- }
22
22
  async fetchAll() {
23
23
  const db = await this.provider.loadDatabase();
24
24
  return db.items || [];
@@ -3,13 +3,6 @@ import { PromiseRatchet } from '@bitblit/ratchet-common';
3
3
  import { RequireRatchet } from '@bitblit/ratchet-common';
4
4
  import { ErrorRatchet } from '@bitblit/ratchet-common';
5
5
  export class EnvironmentService {
6
- static defaultEnvironmentServiceConfig() {
7
- const rval = {
8
- maxRetries: 3,
9
- backoffMultiplierMS: 500,
10
- };
11
- return rval;
12
- }
13
6
  constructor(provider, cfg = EnvironmentService.defaultEnvironmentServiceConfig()) {
14
7
  this.provider = provider;
15
8
  this.cfg = cfg;
@@ -17,6 +10,13 @@ export class EnvironmentService {
17
10
  RequireRatchet.notNullOrUndefined(provider);
18
11
  RequireRatchet.notNullOrUndefined(cfg);
19
12
  }
13
+ static defaultEnvironmentServiceConfig() {
14
+ const rval = {
15
+ maxRetries: 3,
16
+ backoffMultiplierMS: 500,
17
+ };
18
+ return rval;
19
+ }
20
20
  async getConfig(name) {
21
21
  Logger.silly('EnvService:Request to read config %s', name);
22
22
  if (!this.readPromiseCache.has(name)) {