@futdevpro/fsm-dynamo 1.9.9 → 1.9.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.
- package/.github/workflows/main.yml +196 -0
- package/HOWTO.md +15 -15
- package/README.md +17 -17
- package/build/_collections/constants/country-divisions.const.d.ts +1 -1
- package/build/_collections/constants/country-divisions.const.d.ts.map +1 -1
- package/build/_collections/constants/country-divisions.const.js +2 -2
- package/build/_collections/constants/country-divisions.const.js.map +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts.map +1 -1
- package/build/_collections/constants/courtry-isos.const.js +2 -2
- package/build/_collections/constants/courtry-isos.const.js.map +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts.map +1 -1
- package/build/_collections/constants/module-settings/usage-module-settings.const.js +1 -1
- package/build/_collections/constants/pipe-transforms.const.js +12 -12
- package/build/_collections/constants/pipe-transforms.const.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts +2 -2
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js +11 -11
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js.map +1 -1
- package/build/_collections/utils/regions.util.d.ts.map +1 -1
- package/build/_collections/utils/regions.util.js +3 -0
- package/build/_collections/utils/regions.util.js.map +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts.map +1 -1
- package/build/_enums/range-pipe-setting.enum.js +12 -12
- package/build/_enums/range-pipe-setting.enum.js.map +1 -1
- package/build/_models/control-models/error.control-model.js +1 -1
- package/build/_models/control-models/error.control-model.js.map +1 -1
- package/build/_models/control-models/error.control-model.spec.js +25 -6
- package/build/_models/control-models/error.control-model.spec.js.map +1 -1
- package/build/_models/interfaces/index.d.ts +3 -0
- package/build/_models/interfaces/index.d.ts.map +1 -1
- package/build/_models/interfaces/index.js +3 -0
- package/build/_models/interfaces/index.js.map +1 -1
- package/build/_models/interfaces/pipe-transforms.interface.d.ts +2 -2
- package/build/_models/interfaces/pipe-transforms.interface.d.ts.map +1 -1
- package/futdevpro-fsm-dynamo-01.09.12.tgz +0 -0
- package/nodemon.json +11 -11
- package/package.json +151 -151
- package/src/_collections/assets/location/country-codes-ISO-3166.json +3239 -3239
- package/src/_collections/assets/location/country-divisions-ISO-3166-all-list.json +19035 -19035
- package/src/_collections/assets/location/country-divisions-ISO-3166.json +4993 -4993
- package/src/_collections/assets/location/country-phone-codes.json +1203 -1203
- package/src/_collections/constants/country-divisions.const.ts +9 -9
- package/src/_collections/constants/courtry-isos.const.ts +8 -8
- package/src/_collections/constants/error-defaults.const.ts +11 -11
- package/src/_collections/constants/index.ts +15 -15
- package/src/_collections/constants/module-settings/custom-data-module-settings.const.ts +15 -15
- package/src/_collections/constants/module-settings/index.ts +8 -8
- package/src/_collections/constants/module-settings/test-module-settings.const.ts +19 -19
- package/src/_collections/constants/module-settings/usage-module-settings.const.ts +19 -19
- package/src/_collections/constants/pipe-transforms.const.ts +35 -35
- package/src/_collections/constants/times.const.ts +8 -8
- package/src/_collections/index.ts +6 -6
- package/src/_collections/utils/array.util.spec.ts +39 -39
- package/src/_collections/utils/array.util.ts +137 -137
- package/src/_collections/utils/index.ts +18 -18
- package/src/_collections/utils/location.util.ts +55 -55
- package/src/_collections/utils/log.util.ts +239 -239
- package/src/_collections/utils/math/box-bounds.util.ts +85 -85
- package/src/_collections/utils/math/index.ts +5 -5
- package/src/_collections/utils/math/math.util.ts +53 -53
- package/src/_collections/utils/math/random.util.ts +80 -80
- package/src/_collections/utils/math/trigonometry.util.ts +73 -73
- package/src/_collections/utils/math/vector2.util.ts +197 -197
- package/src/_collections/utils/pipe-transforms/country-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/custom-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/division-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/index.ts +15 -15
- package/src/_collections/utils/pipe-transforms/list-pipe.util.ts +10 -14
- package/src/_collections/utils/pipe-transforms/multi-pipe-pipe.util.ts +160 -160
- package/src/_collections/utils/pipe-transforms/obj-key-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/range-pipe.util.ts +94 -94
- package/src/_collections/utils/pipe-transforms/region-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/replace-pipe.util.ts +11 -11
- package/src/_collections/utils/pipe-transforms/slider-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/smart-replace-pipe.util.ts +71 -71
- package/src/_collections/utils/regex/index.ts +4 -4
- package/src/_collections/utils/regex/password-regex.util.ts +52 -52
- package/src/_collections/utils/regex/regex.util.ts +6 -6
- package/src/_collections/utils/regex/username-regex.util.ts +33 -33
- package/src/_collections/utils/regions.util.ts +100 -97
- package/src/_collections/utils/round-list.util.ts +44 -44
- package/src/_collections/utils/shared.static-service.ts +177 -177
- package/src/_collections/utils/time.util.spec.ts +50 -50
- package/src/_collections/utils/time.util.ts +219 -219
- package/src/_collections/utils/type-cloning-facility.util.ts +121 -121
- package/src/_collections/utils/utilities.util.ts +130 -130
- package/src/_enums/basic-property-type.enum.ts +9 -9
- package/src/_enums/data-model-type.enum.ts +13 -13
- package/src/_enums/day-of-week.enum.ts +28 -28
- package/src/_enums/error-level.enum.ts +17 -17
- package/src/_enums/index.ts +16 -16
- package/src/_enums/location/index.ts +3 -3
- package/src/_enums/location/region.enum.ts +9 -9
- package/src/_enums/location/sub-region.enum.ts +26 -26
- package/src/_enums/location/subdivision-region-type.enum.ts +44 -44
- package/src/_enums/log-style.enum.ts +30 -30
- package/src/_enums/month.enum.ts +16 -16
- package/src/_enums/pipe.enum.ts +45 -45
- package/src/_enums/range-pipe-setting.enum.ts +11 -11
- package/src/_enums/time/day-of-week.enum.ts +28 -28
- package/src/_enums/time/index.ts +3 -3
- package/src/_enums/time/month.enum.ts +16 -16
- package/src/_enums/time/relative-date.enum.ts +13 -13
- package/src/_models/control-models/daily-usage-data.control-model.ts +21 -21
- package/src/_models/control-models/data-model-params.control-model.ts +39 -39
- package/src/_models/control-models/data-property-params.control-model.ts +106 -106
- package/src/_models/control-models/error.control-model.spec.ts +753 -716
- package/src/_models/control-models/error.control-model.ts +722 -722
- package/src/_models/control-models/index.ts +10 -10
- package/src/_models/control-models/poll.control-model.ts +113 -113
- package/src/_models/control-models/range-value.control-model.ts +142 -142
- package/src/_models/control-models/usage-action.control-model.ts +15 -15
- package/src/_models/control-models/usage-data.control-model.ts +20 -20
- package/src/_models/data-models/custom-data.data-model.ts +28 -28
- package/src/_models/data-models/index.ts +5 -5
- package/src/_models/data-models/metadata.data-model.ts +83 -83
- package/src/_models/data-models/usage-session.data-model.ts +53 -53
- package/src/_models/index.ts +12 -12
- package/src/_models/interfaces/error-defaults.interface.ts +11 -11
- package/src/_models/interfaces/index.ts +11 -8
- package/src/_models/interfaces/location/country-division.interface.ts +7 -7
- package/src/_models/interfaces/location/country-iso.interface.ts +21 -21
- package/src/_models/interfaces/location/country-phone-code.interface.ts +7 -7
- package/src/_models/interfaces/location/division-collection.interface.ts +10 -10
- package/src/_models/interfaces/location/division-region-data.interface.ts +8 -8
- package/src/_models/interfaces/location/geo-ip-location.interface.ts +26 -26
- package/src/_models/interfaces/location/index.ts +10 -10
- package/src/_models/interfaces/location/location-coordinates.interface.ts +5 -5
- package/src/_models/interfaces/multi-pipe-settings.type.ts +7 -7
- package/src/_models/interfaces/paged.interface.ts +11 -11
- package/src/_models/interfaces/pipe-transforms.interface.ts +29 -29
- package/src/_models/interfaces/random-weight.interface.ts +7 -7
- package/src/_models/interfaces/route-settings.interface.ts +11 -11
- package/src/_modules/collections.index.ts +2 -2
- package/src/_modules/constants.index.ts +2 -2
- package/src/_modules/custom-data-module.index.ts +6 -6
- package/src/_modules/data-modules.index.ts +9 -9
- package/src/_modules/enums.index.ts +2 -2
- package/src/_modules/error-module.index.ts +8 -8
- package/src/_modules/location.index.ts +15 -15
- package/src/_modules/models.index.ts +2 -2
- package/src/_modules/shared-service.index.ts +9 -9
- package/src/_modules/test-module.index.ts +5 -5
- package/src/_modules/usage-module.index.ts +10 -10
- package/tsconfig.json +29 -29
- package/tslint.json +153 -153
- package/build/_enums/region.enum.d.ts +0 -8
- package/build/_enums/region.enum.d.ts.map +0 -1
- package/build/_enums/region.enum.js +0 -12
- package/build/_enums/region.enum.js.map +0 -1
- package/build/_enums/relative-date.enum.d.ts +0 -9
- package/build/_enums/relative-date.enum.d.ts.map +0 -1
- package/build/_enums/relative-date.enum.js +0 -13
- package/build/_enums/relative-date.enum.js.map +0 -1
- package/build/_enums/sub-region.enum.d.ts +0 -20
- package/build/_enums/sub-region.enum.d.ts.map +0 -1
- package/build/_enums/sub-region.enum.js +0 -24
- package/build/_enums/sub-region.enum.js.map +0 -1
- package/build/_enums/subdivision-region-type.enum.d.ts +0 -41
- package/build/_enums/subdivision-region-type.enum.d.ts.map +0 -1
- package/build/_enums/subdivision-region-type.enum.js +0 -46
- package/build/_enums/subdivision-region-type.enum.js.map +0 -1
- package/src/_enums/region.enum.ts +0 -9
- package/src/_enums/relative-date.enum.ts +0 -13
- package/src/_enums/sub-region.enum.ts +0 -26
- package/src/_enums/subdivision-region-type.enum.ts +0 -44
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { DynamoFM_CountryDivision } from '../../_models';
|
|
6
|
-
import { DynamoFM_Regions } from '../utils';
|
|
7
|
-
|
|
8
|
-
export const DynamoFM_countryDivisions: DynamoFM_CountryDivision[] =
|
|
9
|
-
DynamoFM_Regions?.divisions ?? [];
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import { DynamoFM_CountryDivision } from '../../_models/interfaces/location/country-division.interface';
|
|
6
|
+
import { DynamoFM_Regions } from '../utils/regions.util';
|
|
7
|
+
|
|
8
|
+
export const DynamoFM_countryDivisions: DynamoFM_CountryDivision[] =
|
|
9
|
+
DynamoFM_Regions?.divisions ?? [];
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { DynamoFM_CountryISO } from '../../_models';
|
|
5
|
-
import { DynamoFM_Regions } from '../utils';
|
|
6
|
-
|
|
7
|
-
export const DynamoFM_countryISOs: DynamoFM_CountryISO[] = DynamoFM_Regions?.countryISOs ?? [];
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { DynamoFM_CountryISO } from '../../_models/interfaces/location/country-iso.interface';
|
|
5
|
+
import { DynamoFM_Regions } from '../utils/regions.util';
|
|
6
|
+
|
|
7
|
+
export const DynamoFM_countryISOs: DynamoFM_CountryISO[] = DynamoFM_Regions?.countryISOs ?? [];
|
|
8
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DynamoFM_Error_Defaults } from '../../_models';
|
|
2
|
-
|
|
3
|
-
export const DynamoFM_error_defaults: DynamoFM_Error_Defaults = {
|
|
4
|
-
errorCode: 'NO-ERROR-CODE',
|
|
5
|
-
message: 'NO-ERROR-MESSAGE',
|
|
6
|
-
userMessage: 'MISSING-ERROR-USER-MESSAGE',
|
|
7
|
-
issuer: 'MISSING-ISSUER',
|
|
8
|
-
issuerService: 'MISSING-ISSUER-SERVICE',
|
|
9
|
-
issuerSystem: 'MISSING-ISSUER-SYSTEM',
|
|
10
|
-
};
|
|
11
|
-
|
|
1
|
+
import { DynamoFM_Error_Defaults } from '../../_models/interfaces/error-defaults.interface';
|
|
2
|
+
|
|
3
|
+
export const DynamoFM_error_defaults: DynamoFM_Error_Defaults = {
|
|
4
|
+
errorCode: 'NO-ERROR-CODE',
|
|
5
|
+
message: 'NO-ERROR-MESSAGE',
|
|
6
|
+
userMessage: 'MISSING-ERROR-USER-MESSAGE',
|
|
7
|
+
issuer: 'MISSING-ISSUER',
|
|
8
|
+
issuerService: 'MISSING-ISSUER-SERVICE',
|
|
9
|
+
issuerSystem: 'MISSING-ISSUER-SYSTEM',
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './module-settings';
|
|
6
|
-
|
|
7
|
-
// CONSTANTS
|
|
8
|
-
export * from './country-divisions.const';
|
|
9
|
-
export * from './courtry-isos.const';
|
|
10
|
-
export * from './error-defaults.const';
|
|
11
|
-
export * from './pipe-transforms.const';
|
|
12
|
-
export * from './times.const';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export * from './module-settings';
|
|
6
|
+
|
|
7
|
+
// CONSTANTS
|
|
8
|
+
export * from './country-divisions.const';
|
|
9
|
+
export * from './courtry-isos.const';
|
|
10
|
+
export * from './error-defaults.const';
|
|
11
|
+
export * from './pipe-transforms.const';
|
|
12
|
+
export * from './times.const';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
-
|
|
4
|
-
export enum DynamoFM_CustomRoute {
|
|
5
|
-
getCustomData = 'getCustomData',
|
|
6
|
-
modifyCustomData = 'modifyCustomData',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const DynamoFM_customDataModule_settings: DynamoFM_Route_Settings<DynamoFM_CustomRoute> = {
|
|
10
|
-
mainRoute: '/custom',
|
|
11
|
-
endPoints: {
|
|
12
|
-
[DynamoFM_CustomRoute.getCustomData]: '/get/:customId',
|
|
13
|
-
[DynamoFM_CustomRoute.modifyCustomData]: '/post',
|
|
14
|
-
}
|
|
15
|
-
};
|
|
1
|
+
|
|
2
|
+
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
+
|
|
4
|
+
export enum DynamoFM_CustomRoute {
|
|
5
|
+
getCustomData = 'getCustomData',
|
|
6
|
+
modifyCustomData = 'modifyCustomData',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const DynamoFM_customDataModule_settings: DynamoFM_Route_Settings<DynamoFM_CustomRoute> = {
|
|
10
|
+
mainRoute: '/custom',
|
|
11
|
+
endPoints: {
|
|
12
|
+
[DynamoFM_CustomRoute.getCustomData]: '/get/:customId',
|
|
13
|
+
[DynamoFM_CustomRoute.modifyCustomData]: '/post',
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// MODULE SETTINGS
|
|
4
|
-
export * from './test-module-settings.const';
|
|
5
|
-
export * from './usage-module-settings.const';
|
|
6
|
-
export * from './custom-data-module-settings.const';
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
// MODULE SETTINGS
|
|
4
|
+
export * from './test-module-settings.const';
|
|
5
|
+
export * from './usage-module-settings.const';
|
|
6
|
+
export * from './custom-data-module-settings.const';
|
|
7
|
+
|
|
8
|
+
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
-
|
|
4
|
-
export enum DynamoFM_TestRoute {
|
|
5
|
-
testGet = 'testGet',
|
|
6
|
-
testPost = 'testPost',
|
|
7
|
-
testDelete = 'testDelete',
|
|
8
|
-
getServerStatus = 'getServerStatus',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DynamoFM_testModule_settings: DynamoFM_Route_Settings<DynamoFM_TestRoute> = {
|
|
12
|
-
mainRoute: '/test',
|
|
13
|
-
endPoints: {
|
|
14
|
-
[DynamoFM_TestRoute.testGet]: '/test-get',
|
|
15
|
-
[DynamoFM_TestRoute.testPost]: '/test-post',
|
|
16
|
-
[DynamoFM_TestRoute.testDelete]: '/test-delete',
|
|
17
|
-
[DynamoFM_TestRoute.getServerStatus]: '/server-status',
|
|
18
|
-
}
|
|
19
|
-
};
|
|
1
|
+
|
|
2
|
+
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
+
|
|
4
|
+
export enum DynamoFM_TestRoute {
|
|
5
|
+
testGet = 'testGet',
|
|
6
|
+
testPost = 'testPost',
|
|
7
|
+
testDelete = 'testDelete',
|
|
8
|
+
getServerStatus = 'getServerStatus',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const DynamoFM_testModule_settings: DynamoFM_Route_Settings<DynamoFM_TestRoute> = {
|
|
12
|
+
mainRoute: '/test',
|
|
13
|
+
endPoints: {
|
|
14
|
+
[DynamoFM_TestRoute.testGet]: '/test-get',
|
|
15
|
+
[DynamoFM_TestRoute.testPost]: '/test-post',
|
|
16
|
+
[DynamoFM_TestRoute.testDelete]: '/test-delete',
|
|
17
|
+
[DynamoFM_TestRoute.getServerStatus]: '/server-status',
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
-
|
|
4
|
-
export enum DynamoFM_UsageRoute {
|
|
5
|
-
newSession = 'newSession',
|
|
6
|
-
closeSession = 'closeSession',
|
|
7
|
-
updateUsage = 'updateUsage',
|
|
8
|
-
getUsageData = 'getUsageData',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DynamoFM_usageModule_settings: DynamoFM_Route_Settings<DynamoFM_UsageRoute> = {
|
|
12
|
-
mainRoute: '/usage',
|
|
13
|
-
endPoints: {
|
|
14
|
-
[DynamoFM_UsageRoute.newSession]: '/new-session',
|
|
15
|
-
[DynamoFM_UsageRoute.closeSession]: '/close-session/:sessionId',
|
|
16
|
-
[DynamoFM_UsageRoute.updateUsage]: '/update/:sessionId',
|
|
17
|
-
[DynamoFM_UsageRoute.getUsageData]: '/get/:range',
|
|
18
|
-
}
|
|
19
|
-
};
|
|
1
|
+
|
|
2
|
+
import { DynamoFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
+
|
|
4
|
+
export enum DynamoFM_UsageRoute {
|
|
5
|
+
newSession = 'newSession',
|
|
6
|
+
closeSession = 'closeSession',
|
|
7
|
+
updateUsage = 'updateUsage',
|
|
8
|
+
getUsageData = 'getUsageData',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const DynamoFM_usageModule_settings: DynamoFM_Route_Settings<DynamoFM_UsageRoute> = {
|
|
12
|
+
mainRoute: '/usage',
|
|
13
|
+
endPoints: {
|
|
14
|
+
[DynamoFM_UsageRoute.newSession]: '/new-session',
|
|
15
|
+
[DynamoFM_UsageRoute.closeSession]: '/close-session/:sessionId',
|
|
16
|
+
[DynamoFM_UsageRoute.updateUsage]: '/update/:sessionId',
|
|
17
|
+
[DynamoFM_UsageRoute.getUsageData]: '/get/:range',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { DynamoFM_country_pipeTransform } from '../utils/pipe-transforms/country-pipe.util';
|
|
6
|
-
import { DynamoFM_custom_pipeTransform } from '../utils/pipe-transforms/custom-pipe.util';
|
|
7
|
-
import { DynamoFM_division_pipeTransform } from '../utils/pipe-transforms/division-pipe.util';
|
|
8
|
-
import { DynamoFM_list_pipeTransform } from '../utils/pipe-transforms/list-pipe.util';
|
|
9
|
-
import { DynamoFM_multiPipe_pipeTransform } from '../utils/pipe-transforms/multi-pipe-pipe.util';
|
|
10
|
-
import { DynamoFM_objKey_pipeTransform } from '../utils/pipe-transforms/obj-key-pipe.util';
|
|
11
|
-
import { DynamoFM_range_pipeTransform } from '../utils/pipe-transforms/range-pipe.util';
|
|
12
|
-
import { DynamoFM_region_pipeTransform } from '../utils/pipe-transforms/region-pipe.util';
|
|
13
|
-
import { DynamoFM_replace_pipeTransform } from '../utils/pipe-transforms/replace-pipe.util';
|
|
14
|
-
import { DynamoFM_slider_pipeTransform } from '../utils/pipe-transforms/slider-pipe.util';
|
|
15
|
-
import { DynamoFM_smartReplace_pipeTransform } from '../utils/pipe-transforms/smart-replace-pipe.util';
|
|
16
|
-
import { DynamoFM_PipeTransforms } from '../../_models/interfaces/pipe-transforms.interface';
|
|
17
|
-
import { DynamoFM_Pipe } from '../../_enums';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export const DynamoFM_pipeTransforms: DynamoFM_PipeTransforms = {
|
|
22
|
-
[DynamoFM_Pipe.country]: DynamoFM_country_pipeTransform,
|
|
23
|
-
[DynamoFM_Pipe.custom]: DynamoFM_custom_pipeTransform,
|
|
24
|
-
[DynamoFM_Pipe.division]: DynamoFM_division_pipeTransform,
|
|
25
|
-
[DynamoFM_Pipe.list]: DynamoFM_list_pipeTransform,
|
|
26
|
-
[DynamoFM_Pipe.multiPipe]: DynamoFM_multiPipe_pipeTransform,
|
|
27
|
-
[DynamoFM_Pipe.objKey]: DynamoFM_objKey_pipeTransform,
|
|
28
|
-
[DynamoFM_Pipe.range]: DynamoFM_range_pipeTransform,
|
|
29
|
-
[DynamoFM_Pipe.region]: DynamoFM_region_pipeTransform,
|
|
30
|
-
[DynamoFM_Pipe.replace]: DynamoFM_replace_pipeTransform,
|
|
31
|
-
[DynamoFM_Pipe.slider]: DynamoFM_slider_pipeTransform,
|
|
32
|
-
[DynamoFM_Pipe.smartReplace]: DynamoFM_smartReplace_pipeTransform,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import { DynamoFM_country_pipeTransform } from '../utils/pipe-transforms/country-pipe.util';
|
|
6
|
+
import { DynamoFM_custom_pipeTransform } from '../utils/pipe-transforms/custom-pipe.util';
|
|
7
|
+
import { DynamoFM_division_pipeTransform } from '../utils/pipe-transforms/division-pipe.util';
|
|
8
|
+
import { DynamoFM_list_pipeTransform } from '../utils/pipe-transforms/list-pipe.util';
|
|
9
|
+
import { DynamoFM_multiPipe_pipeTransform } from '../utils/pipe-transforms/multi-pipe-pipe.util';
|
|
10
|
+
import { DynamoFM_objKey_pipeTransform } from '../utils/pipe-transforms/obj-key-pipe.util';
|
|
11
|
+
import { DynamoFM_range_pipeTransform } from '../utils/pipe-transforms/range-pipe.util';
|
|
12
|
+
import { DynamoFM_region_pipeTransform } from '../utils/pipe-transforms/region-pipe.util';
|
|
13
|
+
import { DynamoFM_replace_pipeTransform } from '../utils/pipe-transforms/replace-pipe.util';
|
|
14
|
+
import { DynamoFM_slider_pipeTransform } from '../utils/pipe-transforms/slider-pipe.util';
|
|
15
|
+
import { DynamoFM_smartReplace_pipeTransform } from '../utils/pipe-transforms/smart-replace-pipe.util';
|
|
16
|
+
import { DynamoFM_PipeTransforms } from '../../_models/interfaces/pipe-transforms.interface';
|
|
17
|
+
import { DynamoFM_Pipe } from '../../_enums/pipe.enum';
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export const DynamoFM_pipeTransforms: DynamoFM_PipeTransforms = {
|
|
22
|
+
[DynamoFM_Pipe.country]: DynamoFM_country_pipeTransform,
|
|
23
|
+
[DynamoFM_Pipe.custom]: DynamoFM_custom_pipeTransform,
|
|
24
|
+
[DynamoFM_Pipe.division]: DynamoFM_division_pipeTransform,
|
|
25
|
+
[DynamoFM_Pipe.list]: DynamoFM_list_pipeTransform,
|
|
26
|
+
[DynamoFM_Pipe.multiPipe]: DynamoFM_multiPipe_pipeTransform,
|
|
27
|
+
[DynamoFM_Pipe.objKey]: DynamoFM_objKey_pipeTransform,
|
|
28
|
+
[DynamoFM_Pipe.range]: DynamoFM_range_pipeTransform,
|
|
29
|
+
[DynamoFM_Pipe.region]: DynamoFM_region_pipeTransform,
|
|
30
|
+
[DynamoFM_Pipe.replace]: DynamoFM_replace_pipeTransform,
|
|
31
|
+
[DynamoFM_Pipe.slider]: DynamoFM_slider_pipeTransform,
|
|
32
|
+
[DynamoFM_Pipe.smartReplace]: DynamoFM_smartReplace_pipeTransform,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export const second = 1000;
|
|
3
|
-
export const minute = second * 60;
|
|
4
|
-
export const hour = minute * 60;
|
|
5
|
-
export const day = hour * 24;
|
|
6
|
-
export const week = day * 7;
|
|
7
|
-
export const month = day * 30.4368499;
|
|
8
|
-
export const year = day * 365.242199;
|
|
1
|
+
|
|
2
|
+
export const second = 1000;
|
|
3
|
+
export const minute = second * 60;
|
|
4
|
+
export const hour = minute * 60;
|
|
5
|
+
export const day = hour * 24;
|
|
6
|
+
export const week = day * 7;
|
|
7
|
+
export const month = day * 30.4368499;
|
|
8
|
+
export const year = day * 365.242199;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './constants';
|
|
6
|
-
export * from './utils';
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export * from './constants';
|
|
6
|
+
export * from './utils';
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { DynamoFM_Array } from './array.util';
|
|
4
|
-
import { DynamoFM_delay } from './utilities.util';
|
|
5
|
-
|
|
6
|
-
describe('DynamoFM_Array', (): void => {
|
|
7
|
-
|
|
8
|
-
describe('asyncForEach', (): void => {
|
|
9
|
-
it('should call the function for each element in the list', async (): Promise<void> => {
|
|
10
|
-
const list = [1, 2, 3];
|
|
11
|
-
const result = [];
|
|
12
|
-
const func = async (e, i): Promise<void> => {
|
|
13
|
-
await DynamoFM_delay(30);
|
|
14
|
-
result.push(e);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
await DynamoFM_Array.asyncForEach(list, func);
|
|
18
|
-
|
|
19
|
-
expect(result).toEqual(list);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
describe('asyncMapArray', (): void => {
|
|
24
|
-
it('should call the function for each element in the list', async (): Promise<void> => {
|
|
25
|
-
const list = [1, 2, 3];
|
|
26
|
-
|
|
27
|
-
const func = async (e, i): Promise<number> => {
|
|
28
|
-
await DynamoFM_delay(30);
|
|
29
|
-
|
|
30
|
-
return e * 2;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const result = await DynamoFM_Array.asyncMap(list, func);
|
|
34
|
-
|
|
35
|
-
expect(result).toEqual([2, 4, 6]);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
});
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import { DynamoFM_Array } from './array.util';
|
|
4
|
+
import { DynamoFM_delay } from './utilities.util';
|
|
5
|
+
|
|
6
|
+
describe('DynamoFM_Array', (): void => {
|
|
7
|
+
|
|
8
|
+
describe('asyncForEach', (): void => {
|
|
9
|
+
it('should call the function for each element in the list', async (): Promise<void> => {
|
|
10
|
+
const list = [1, 2, 3];
|
|
11
|
+
const result = [];
|
|
12
|
+
const func = async (e, i): Promise<void> => {
|
|
13
|
+
await DynamoFM_delay(30);
|
|
14
|
+
result.push(e);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
await DynamoFM_Array.asyncForEach(list, func);
|
|
18
|
+
|
|
19
|
+
expect(result).toEqual(list);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
describe('asyncMapArray', (): void => {
|
|
24
|
+
it('should call the function for each element in the list', async (): Promise<void> => {
|
|
25
|
+
const list = [1, 2, 3];
|
|
26
|
+
|
|
27
|
+
const func = async (e, i): Promise<number> => {
|
|
28
|
+
await DynamoFM_delay(30);
|
|
29
|
+
|
|
30
|
+
return e * 2;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const result = await DynamoFM_Array.asyncMap(list, func);
|
|
34
|
+
|
|
35
|
+
expect(result).toEqual([2, 4, 6]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
});
|