@revolugo/common 6.10.3 → 6.10.4-beta.1
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/package.json +2 -2
- package/src/types/geo-coordinates.ts +4 -0
- package/src/types/index.ts +1 -0
- package/src/utils/poller.ts +11 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolugo/common",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.4-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Revolugo common",
|
|
6
6
|
"author": "Revolugo",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"change-case": "5.4.4",
|
|
27
27
|
"dayjs": "1.11.18",
|
|
28
|
-
"ky": "1.
|
|
28
|
+
"ky": "1.11.0",
|
|
29
29
|
"lodash-es": "4.17.21",
|
|
30
30
|
"slugify": "1.6.6",
|
|
31
31
|
"uuid": "13.0.0"
|
package/src/types/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type * from './country.ts'
|
|
|
6
6
|
export type * from './currency.ts'
|
|
7
7
|
export type * from './date.ts'
|
|
8
8
|
export type * from './event.ts'
|
|
9
|
+
export type * from './geo-coordinates.ts'
|
|
9
10
|
export type * from './hotel-contract.ts'
|
|
10
11
|
export type * from './hotel-room-stock.ts'
|
|
11
12
|
export type * from './money-object.ts'
|
package/src/utils/poller.ts
CHANGED
|
@@ -160,18 +160,17 @@ export class Poller<V extends IPollerResponse> {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
private buildPollerOptions(options: TOptions<V>): TOptions<V> {
|
|
163
|
-
const compactedOptions = Object.entries(options).reduce<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
)
|
|
163
|
+
const compactedOptions = Object.entries(options).reduce<
|
|
164
|
+
Record<string, unknown>
|
|
165
|
+
>((acc, [key, value]) => {
|
|
166
|
+
if (value !== undefined) {
|
|
167
|
+
const tKey = key as keyof TOptions<V>
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
|
+
acc[tKey] = value as any
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return acc
|
|
173
|
+
}, {}) as TOptions<V>
|
|
175
174
|
|
|
176
175
|
return {
|
|
177
176
|
...this.defaultOptions,
|