@syncbridge/sqb 0.4.19 → 0.4.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.
@@ -43,6 +43,15 @@ let SqbClientComponent = class SqbClientComponent extends ComponentBase {
43
43
  this.client.on('acquire', () => {
44
44
  this._resetLiveness();
45
45
  });
46
+ this.on('values-updated', async () => {
47
+ const isStopped = this.stopped;
48
+ await this._stop();
49
+ if (!isStopped) {
50
+ await this._start(new AbortController().signal).catch(err => {
51
+ this.setStatus(ServiceStatus.unhealthy, err.message);
52
+ });
53
+ }
54
+ });
46
55
  }
47
56
  async _start(abortSignal) {
48
57
  await super._start(abortSignal);
@@ -11,6 +11,7 @@ __decorate([
11
11
  label: 'Acquire max retries',
12
12
  description: 'Maximum number that Pool will try to create a resource before returning the error',
13
13
  default: 0,
14
+ hotPlug: true,
14
15
  }),
15
16
  __metadata("design:type", Number)
16
17
  ], SqbClientPoolVariables.prototype, "acquireMaxRetries", void 0);
@@ -19,6 +20,7 @@ __decorate([
19
20
  label: 'Acquire retry wait',
20
21
  description: 'Time in millis that Pool will wait after each tries',
21
22
  default: 2000,
23
+ hotPlug: true,
22
24
  }),
23
25
  __metadata("design:type", Number)
24
26
  ], SqbClientPoolVariables.prototype, "acquireRetryWait", void 0);
@@ -27,6 +29,7 @@ __decorate([
27
29
  label: 'Acquire timeout millis',
28
30
  description: 'Time in millis an acquire call will wait for a resource before timing out',
29
31
  default: 0,
32
+ hotPlug: true,
30
33
  }),
31
34
  __metadata("design:type", Number)
32
35
  ], SqbClientPoolVariables.prototype, "acquireTimeoutMillis", void 0);
@@ -35,6 +38,7 @@ __decorate([
35
38
  label: 'Fifo',
36
39
  description: 'If true resources will be allocated first-in-first-out order. resources will be allocated last-in-first-out order',
37
40
  default: true,
41
+ hotPlug: true,
38
42
  }),
39
43
  __metadata("design:type", Boolean)
40
44
  ], SqbClientPoolVariables.prototype, "fifo", void 0);
@@ -43,6 +47,7 @@ __decorate([
43
47
  label: 'Idle timeout',
44
48
  description: 'The minimum amount of time in millis that an resource may sit idle in the Pool',
45
49
  default: 30000,
50
+ hotPlug: true,
46
51
  }),
47
52
  __metadata("design:type", Number)
48
53
  ], SqbClientPoolVariables.prototype, "idleTimeoutMillis", void 0);
@@ -51,6 +56,7 @@ __decorate([
51
56
  label: 'House keep interval',
52
57
  description: 'Time period in millis that Pool will make a cleanup',
53
58
  default: 1000,
59
+ hotPlug: true,
54
60
  }),
55
61
  __metadata("design:type", Number)
56
62
  ], SqbClientPoolVariables.prototype, "houseKeepInterval", void 0);
@@ -59,6 +65,7 @@ __decorate([
59
65
  label: 'Min',
60
66
  description: 'Minimum number of resources that Pool will keep',
61
67
  default: 0,
68
+ hotPlug: true,
62
69
  }),
63
70
  __metadata("design:type", Number)
64
71
  ], SqbClientPoolVariables.prototype, "min", void 0);
@@ -67,6 +74,7 @@ __decorate([
67
74
  label: 'Min idle',
68
75
  description: 'Minimum number of resources that Pool will keep in idle state',
69
76
  default: 0,
77
+ hotPlug: true,
70
78
  }),
71
79
  __metadata("design:type", Number)
72
80
  ], SqbClientPoolVariables.prototype, "minIdle", void 0);
@@ -75,6 +83,7 @@ __decorate([
75
83
  label: 'Max',
76
84
  description: 'Maximum number of resources that Pool will create',
77
85
  default: 30,
86
+ hotPlug: true,
78
87
  }),
79
88
  __metadata("design:type", Number)
80
89
  ], SqbClientPoolVariables.prototype, "max", void 0);
@@ -83,6 +92,7 @@ __decorate([
83
92
  label: 'Max queue',
84
93
  description: 'Maximum number of request that Pool will accept',
85
94
  default: 1000,
95
+ hotPlug: true,
86
96
  }),
87
97
  __metadata("design:type", Number)
88
98
  ], SqbClientPoolVariables.prototype, "maxQueue", void 0);
@@ -97,6 +107,7 @@ __decorate([
97
107
  label: 'Dialect',
98
108
  description: 'Database dialect',
99
109
  enumValues: Array.from(AdapterRegistry.items()).map(x => x.dialect),
110
+ hotPlug: true,
100
111
  }),
101
112
  __metadata("design:type", String)
102
113
  ], SqbClientVariables.prototype, "dialect", void 0);
@@ -113,6 +124,7 @@ __decorate([
113
124
  description: 'Database listener port number',
114
125
  minValue: 1,
115
126
  maxValue: 65535,
127
+ hotPlug: true,
116
128
  }),
117
129
  __metadata("design:type", Number)
118
130
  ], SqbClientVariables.prototype, "port", void 0);
@@ -120,6 +132,7 @@ __decorate([
120
132
  DefineVariable({
121
133
  label: 'Username',
122
134
  description: 'Database username',
135
+ hotPlug: true,
123
136
  }),
124
137
  __metadata("design:type", String)
125
138
  ], SqbClientVariables.prototype, "username", void 0);
@@ -128,6 +141,7 @@ __decorate([
128
141
  label: 'Password',
129
142
  description: 'Database password',
130
143
  type: VariableType.Secret,
144
+ hotPlug: true,
131
145
  }),
132
146
  __metadata("design:type", String)
133
147
  ], SqbClientVariables.prototype, "password", void 0);
@@ -135,6 +149,7 @@ __decorate([
135
149
  DefineVariable({
136
150
  label: 'Database name',
137
151
  description: 'Database name to be connected to',
152
+ hotPlug: true,
138
153
  }),
139
154
  __metadata("design:type", String)
140
155
  ], SqbClientVariables.prototype, "database", void 0);
@@ -142,6 +157,7 @@ __decorate([
142
157
  DefineVariable({
143
158
  label: 'Database schema',
144
159
  description: 'Database schema to be connected to',
160
+ hotPlug: true,
145
161
  }),
146
162
  __metadata("design:type", String)
147
163
  ], SqbClientVariables.prototype, "schema", void 0);
@@ -150,6 +166,7 @@ __decorate([
150
166
  label: 'Application Name',
151
167
  description: 'Name of the application to be set to database sessions. This is used for debugging purposes',
152
168
  default: 'syncbridge',
169
+ hotPlug: true,
153
170
  }),
154
171
  __metadata("design:type", String)
155
172
  ], SqbClientVariables.prototype, "applicationName", void 0);
@@ -157,6 +174,7 @@ __decorate([
157
174
  DefineVariable({
158
175
  label: 'Pooling',
159
176
  description: 'Pooling options',
177
+ hotPlug: true,
160
178
  }),
161
179
  __metadata("design:type", SqbClientPoolVariables)
162
180
  ], SqbClientVariables.prototype, "pool", void 0);
package/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = '0.4.19';
1
+ export const version = '0.4.20';
2
2
  export const noOp = () => undefined;
3
3
  export const panatesAuthor = {
4
4
  name: 'Panates Technology AS',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncbridge/sqb",
3
- "version": "0.4.19",
3
+ "version": "0.4.20",
4
4
  "description": "SyncBridge SQB database connection components",
5
5
  "author": "Panates Inc",
6
6
  "license": "UNLICENSED",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@syncbridge/common": "^0.6.0",
17
- "@syncbridge/builtins": "^0.4.19",
17
+ "@syncbridge/builtins": "^0.4.20",
18
18
  "@sqb/builder": ">=4.19.6 <5",
19
19
  "@sqb/connect": ">=4.19.6 <5"
20
20
  },