@powfix/core-js 0.15.0-beta-2 → 0.15.0-beta-4
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/dist/{server/interfaces → browser/cjs/constants}/index.browser.js +6 -4
- package/dist/{server/constants → browser/cjs}/index.browser.js +7 -6
- package/dist/{server/managers → browser/cjs/interfaces}/index.browser.js +4 -2
- package/dist/{server/types → browser/cjs/managers}/index.browser.js +2 -2
- package/dist/browser/cjs/scripts/index.browser.js +17 -0
- package/dist/{server → browser/cjs}/services/index.browser.js +1 -1
- package/dist/browser/cjs/services/time/index.js +18 -0
- package/dist/{server/scripts → browser/cjs/types}/index.browser.js +2 -1
- package/dist/{server → browser/cjs}/utils/ArrayUtils.js +2 -2
- package/dist/{server → browser/cjs}/utils/DateUtils.js +17 -17
- package/dist/{server → browser/cjs}/utils/JuminNumberUtils.js +2 -2
- package/dist/{server → browser/cjs}/utils/ObjectIdUtils.js +3 -3
- package/dist/{server → browser/cjs}/utils/Sequencer.js +2 -2
- package/dist/{server → browser/cjs}/utils/global/fallbackIfNull.js +2 -2
- package/dist/{server → browser/cjs}/utils/global/fallbackIfUndefined.js +2 -2
- package/dist/{server → browser/cjs/utils/global}/index.js +11 -8
- package/dist/{server → browser/cjs}/utils/global/processFirstNonNullish.js +2 -2
- package/dist/browser/cjs/utils/index.browser.js +33 -0
- package/dist/{server → browser/cjs}/utils/try-catch/index.js +1 -1
- package/dist/browser/esm/constants/index.browser.mjs +6 -0
- package/dist/browser/esm/index.browser.mjs +7 -0
- package/dist/browser/esm/interfaces/index.browser.mjs +4 -0
- package/dist/browser/esm/managers/index.browser.mjs +2 -0
- package/dist/browser/esm/scripts/index.browser.mjs +1 -0
- package/dist/browser/esm/services/index.browser.mjs +1 -0
- package/dist/browser/esm/services/time/index.mjs +2 -0
- package/dist/browser/esm/types/index.browser.mjs +2 -0
- package/dist/{client/utils/ArrayUtils.js → browser/esm/utils/ArrayUtils.mjs} +1 -1
- package/dist/{client/utils/DateUtils.js → browser/esm/utils/DateUtils.mjs} +1 -1
- package/dist/{client/utils/JuminNumberUtils.js → browser/esm/utils/JuminNumberUtils.mjs} +1 -1
- package/dist/{client/utils/ObjectIdUtils.js → browser/esm/utils/ObjectIdUtils.mjs} +1 -1
- package/dist/{client/utils/Sequencer.js → browser/esm/utils/Sequencer.mjs} +1 -1
- package/dist/{client/utils/global/fallbackIfNull.js → browser/esm/utils/global/fallbackIfNull.mjs} +1 -1
- package/dist/{client/utils/global/fallbackIfUndefined.js → browser/esm/utils/global/fallbackIfUndefined.mjs} +1 -1
- package/dist/browser/esm/utils/global/index.mjs +11 -0
- package/dist/{client/utils/global/processFirstNonNullish.js → browser/esm/utils/global/processFirstNonNullish.mjs} +1 -1
- package/dist/browser/esm/utils/index.browser.mjs +17 -0
- package/dist/browser/esm/utils/try-catch/index.mjs +1 -0
- package/dist/browser/types/constants/index.browser.d.ts +6 -0
- package/dist/browser/types/index.browser.d.ts +7 -0
- package/dist/{server → browser/types}/interfaces/Point3.d.ts +1 -1
- package/dist/browser/types/interfaces/index.browser.d.ts +4 -0
- package/dist/{client → browser/types}/managers/SessionManager.d.ts +2 -2
- package/dist/{client → browser/types}/managers/SessionManager.type.d.ts +1 -1
- package/dist/browser/types/managers/index.browser.d.ts +2 -0
- package/dist/browser/types/scripts/index.browser.d.ts +1 -0
- package/dist/browser/types/services/index.browser.d.ts +1 -0
- package/dist/{client → browser/types}/services/time/TimeService.d.ts +1 -1
- package/dist/browser/types/services/time/index.d.ts +2 -0
- package/dist/browser/types/types/index.browser.d.ts +2 -0
- package/dist/{client → browser/types}/utils/CoordinateUtils.d.ts +1 -1
- package/dist/{server → browser/types}/utils/DateUtils.d.ts +1 -1
- package/dist/{server → browser/types}/utils/Point3Utils.d.ts +1 -1
- package/dist/browser/types/utils/global/index.d.ts +11 -0
- package/dist/browser/types/utils/index.browser.d.ts +17 -0
- package/dist/browser/types/utils/try-catch/index.d.ts +1 -0
- package/dist/node/cjs/constants/COORDINATE.js +10 -0
- package/dist/node/cjs/constants/CRUD.js +22 -0
- package/dist/node/cjs/constants/DATE.js +26 -0
- package/dist/node/cjs/constants/DISTANCE.js +18 -0
- package/dist/node/cjs/constants/DURATION.js +21 -0
- package/dist/node/cjs/constants/NOT_NULL.js +4 -0
- package/dist/node/cjs/constants/index.browser.js +22 -0
- package/dist/node/cjs/constants/index.js +18 -0
- package/dist/{server/interfaces → node/cjs/constants/nodejs}/index.js +2 -2
- package/dist/node/cjs/index.browser.js +23 -0
- package/dist/node/cjs/index.js +24 -0
- package/dist/node/cjs/interfaces/index.browser.js +20 -0
- package/dist/node/cjs/interfaces/index.js +18 -0
- package/dist/{server/interfaces/nodejs → node/cjs/interfaces/nodejs/db}/index.js +1 -1
- package/dist/node/cjs/interfaces/nodejs/db/sequelize/UpsertOptions.js +2 -0
- package/dist/{server/constants/nodejs → node/cjs/interfaces/nodejs/db/sequelize}/index.js +6 -2
- package/dist/{server/scripts → node/cjs/interfaces/nodejs}/index.js +1 -1
- package/dist/node/cjs/managers/SessionManager.js +134 -0
- package/dist/node/cjs/managers/SessionManager.type.js +2 -0
- package/dist/{server → node/cjs}/managers/TransactionManager.js +13 -13
- package/dist/node/cjs/managers/TransactionManager.types.js +2 -0
- package/dist/node/cjs/managers/index.browser.js +18 -0
- package/dist/{server/constants → node/cjs/managers}/index.js +2 -2
- package/dist/node/cjs/scripts/base64Polyfill.js +14 -0
- package/dist/node/cjs/scripts/index.browser.js +17 -0
- package/dist/node/cjs/scripts/index.js +17 -0
- package/dist/node/cjs/services/index.browser.js +17 -0
- package/dist/{server/interfaces/nodejs/db → node/cjs/services}/index.js +2 -1
- package/dist/{server → node/cjs}/services/redis/RedisPublisher.js +2 -2
- package/dist/{server → node/cjs}/services/redis/RedisSubscriber.js +5 -5
- package/dist/{server → node/cjs}/services/redis/index.js +3 -3
- package/dist/node/cjs/services/time/TimeService.js +180 -0
- package/dist/node/cjs/services/time/TimeService.type.js +2 -0
- package/dist/node/cjs/services/time/index.js +18 -0
- package/dist/node/cjs/types/IntRage.js +2 -0
- package/dist/node/cjs/types/PartialExcept.js +2 -0
- package/dist/node/cjs/types/UpsertResult.js +2 -0
- package/dist/node/cjs/types/index.browser.js +18 -0
- package/dist/node/cjs/types/index.js +18 -0
- package/dist/node/cjs/utils/ArrayUtils.js +30 -0
- package/dist/node/cjs/utils/AxiosUtils.js +53 -0
- package/dist/node/cjs/utils/BooleanUtils.js +8 -0
- package/dist/node/cjs/utils/Calc.js +27 -0
- package/dist/node/cjs/utils/CoordinateUtils.js +42 -0
- package/dist/node/cjs/utils/DateUtils.js +310 -0
- package/dist/node/cjs/utils/JuminNumberUtils.js +50 -0
- package/dist/node/cjs/utils/NumberUtils.js +25 -0
- package/dist/node/cjs/utils/ObjectIdUtils.js +24 -0
- package/dist/node/cjs/utils/Point3Utils.js +12 -0
- package/dist/node/cjs/utils/RandomUtils.js +64 -0
- package/dist/node/cjs/utils/Sequencer.js +148 -0
- package/dist/node/cjs/utils/StringUtils.js +37 -0
- package/dist/node/cjs/utils/UuidUtils.js +79 -0
- package/dist/node/cjs/utils/Validator.js +118 -0
- package/dist/node/cjs/utils/global/between.js +7 -0
- package/dist/node/cjs/utils/global/castArray.js +6 -0
- package/dist/node/cjs/utils/global/circularDistance.js +14 -0
- package/dist/node/cjs/utils/global/fallbackIfEqual.js +9 -0
- package/dist/node/cjs/utils/global/fallbackIfNull.js +7 -0
- package/dist/node/cjs/utils/global/fallbackIfUndefined.js +7 -0
- package/dist/node/cjs/utils/global/firstNonNullish.js +13 -0
- package/dist/node/cjs/utils/global/flat.js +117 -0
- package/dist/node/cjs/utils/global/index.js +27 -0
- package/dist/node/cjs/utils/global/processFirstNonNullish.js +11 -0
- package/dist/node/cjs/utils/global/pureEnum.js +14 -0
- package/dist/node/cjs/utils/global/sleep.js +5 -0
- package/dist/node/cjs/utils/index.browser.js +33 -0
- package/dist/node/cjs/utils/index.js +18 -0
- package/dist/{server → node/cjs}/utils/nodejs/index.js +3 -3
- package/dist/{server → node/cjs}/utils/nodejs/sequelize-utils/SequelizeUtils.js +8 -8
- package/dist/{server → node/cjs}/utils/nodejs/sequelize-utils/index.js +2 -2
- package/dist/node/cjs/utils/nodejs/sequelize-utils/types.js +2 -0
- package/dist/node/cjs/utils/try-catch/TryCatch.js +78 -0
- package/dist/node/cjs/utils/try-catch/index.js +17 -0
- package/dist/node/esm/constants/COORDINATE.mjs +6 -0
- package/dist/node/esm/constants/CRUD.mjs +19 -0
- package/dist/node/esm/constants/DATE.mjs +22 -0
- package/dist/node/esm/constants/DISTANCE.mjs +14 -0
- package/dist/node/esm/constants/DURATION.mjs +17 -0
- package/dist/node/esm/constants/NOT_NULL.mjs +1 -0
- package/dist/node/esm/constants/index.browser.mjs +6 -0
- package/dist/node/esm/constants/index.mjs +2 -0
- package/dist/node/esm/constants/nodejs/TransactionManagerLogLevel.mjs +8 -0
- package/dist/node/esm/constants/nodejs/TransactionManagerTimeoutAction.mjs +5 -0
- package/dist/node/esm/constants/nodejs/index.mjs +2 -0
- package/dist/node/esm/index.browser.mjs +7 -0
- package/dist/node/esm/index.mjs +8 -0
- package/dist/node/esm/interfaces/Coordinate.mjs +1 -0
- package/dist/node/esm/interfaces/Point2.mjs +1 -0
- package/dist/node/esm/interfaces/Point3.mjs +1 -0
- package/dist/node/esm/interfaces/StorageProvider.mjs +1 -0
- package/dist/node/esm/interfaces/index.browser.mjs +4 -0
- package/dist/node/esm/interfaces/index.mjs +2 -0
- package/dist/node/esm/interfaces/nodejs/db/index.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/Hook.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/HookFn.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/HookType.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/ReloadOption.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/TransactionOption.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/UpsertOptions.mjs +1 -0
- package/dist/node/esm/interfaces/nodejs/db/sequelize/index.mjs +6 -0
- package/dist/node/esm/interfaces/nodejs/index.mjs +1 -0
- package/dist/node/esm/managers/SessionManager.mjs +127 -0
- package/dist/node/esm/managers/SessionManager.type.mjs +1 -0
- package/dist/node/esm/managers/TransactionManager.mjs +144 -0
- package/dist/node/esm/managers/TransactionManager.types.mjs +1 -0
- package/dist/node/esm/managers/index.browser.mjs +2 -0
- package/dist/node/esm/managers/index.mjs +2 -0
- package/dist/node/esm/scripts/base64Polyfill.mjs +10 -0
- package/dist/node/esm/scripts/index.browser.mjs +1 -0
- package/dist/node/esm/scripts/index.mjs +1 -0
- package/dist/node/esm/services/index.browser.mjs +1 -0
- package/dist/node/esm/services/index.mjs +2 -0
- package/dist/node/esm/services/redis/RedisClient.mjs +71 -0
- package/dist/node/esm/services/redis/RedisPublisher.mjs +60 -0
- package/dist/node/esm/services/redis/RedisSubscriber.mjs +69 -0
- package/dist/node/esm/services/redis/index.mjs +4 -0
- package/dist/node/esm/services/time/TimeService.mjs +173 -0
- package/dist/node/esm/services/time/TimeService.type.mjs +1 -0
- package/dist/node/esm/services/time/index.mjs +2 -0
- package/dist/node/esm/types/IntRage.mjs +1 -0
- package/dist/node/esm/types/PartialExcept.mjs +1 -0
- package/dist/node/esm/types/UpsertResult.mjs +1 -0
- package/dist/node/esm/types/index.browser.mjs +2 -0
- package/dist/node/esm/types/index.mjs +2 -0
- package/dist/node/esm/utils/ArrayUtils.mjs +26 -0
- package/dist/node/esm/utils/AxiosUtils.mjs +49 -0
- package/dist/node/esm/utils/BooleanUtils.mjs +5 -0
- package/dist/node/esm/utils/Calc.mjs +23 -0
- package/dist/node/esm/utils/CoordinateUtils.mjs +38 -0
- package/dist/node/esm/utils/DateUtils.mjs +303 -0
- package/dist/node/esm/utils/JuminNumberUtils.mjs +46 -0
- package/dist/node/esm/utils/NumberUtils.mjs +21 -0
- package/dist/node/esm/utils/ObjectIdUtils.mjs +20 -0
- package/dist/node/esm/utils/Point3Utils.mjs +8 -0
- package/dist/node/esm/utils/RandomUtils.mjs +60 -0
- package/dist/node/esm/utils/Sequencer.mjs +141 -0
- package/dist/node/esm/utils/StringUtils.mjs +33 -0
- package/dist/node/esm/utils/UuidUtils.mjs +42 -0
- package/dist/node/esm/utils/Validator.mjs +114 -0
- package/dist/node/esm/utils/global/between.mjs +3 -0
- package/dist/node/esm/utils/global/castArray.mjs +3 -0
- package/dist/node/esm/utils/global/circularDistance.mjs +11 -0
- package/dist/node/esm/utils/global/fallbackIfEqual.mjs +6 -0
- package/dist/node/esm/utils/global/fallbackIfNull.mjs +4 -0
- package/dist/node/esm/utils/global/fallbackIfUndefined.mjs +4 -0
- package/dist/node/esm/utils/global/firstNonNullish.mjs +10 -0
- package/dist/node/esm/utils/global/flat.mjs +113 -0
- package/dist/node/esm/utils/global/index.mjs +11 -0
- package/dist/node/esm/utils/global/processFirstNonNullish.mjs +8 -0
- package/dist/node/esm/utils/global/pureEnum.mjs +9 -0
- package/dist/node/esm/utils/global/sleep.mjs +1 -0
- package/dist/node/esm/utils/index.browser.mjs +17 -0
- package/dist/node/esm/utils/index.mjs +2 -0
- package/dist/node/esm/utils/nodejs/HookUtils.mjs +26 -0
- package/dist/node/esm/utils/nodejs/index.mjs +2 -0
- package/dist/node/esm/utils/nodejs/sequelize-utils/SequelizeUtils.mjs +71 -0
- package/dist/node/esm/utils/nodejs/sequelize-utils/index.mjs +1 -0
- package/dist/node/esm/utils/nodejs/sequelize-utils/types.mjs +1 -0
- package/dist/node/esm/utils/try-catch/TryCatch.mjs +74 -0
- package/dist/node/esm/utils/try-catch/index.mjs +1 -0
- package/dist/node/types/constants/index.browser.d.ts +6 -0
- package/dist/node/types/constants/index.d.ts +2 -0
- package/dist/node/types/constants/nodejs/index.d.ts +2 -0
- package/dist/node/types/index.browser.d.ts +7 -0
- package/dist/node/types/index.d.ts +8 -0
- package/dist/{client → node/types}/interfaces/Point3.d.ts +1 -1
- package/dist/node/types/interfaces/index.browser.d.ts +4 -0
- package/dist/node/types/interfaces/index.d.ts +2 -0
- package/dist/node/types/interfaces/nodejs/db/index.d.ts +1 -0
- package/dist/{server → node/types}/interfaces/nodejs/db/sequelize/Hook.d.ts +2 -2
- package/dist/{server → node/types}/interfaces/nodejs/db/sequelize/HookFn.d.ts +1 -1
- package/dist/node/types/interfaces/nodejs/db/sequelize/UpsertOptions.d.ts +4 -0
- package/dist/node/types/interfaces/nodejs/db/sequelize/index.d.ts +6 -0
- package/dist/node/types/interfaces/nodejs/index.d.ts +1 -0
- package/dist/{server → node/types}/managers/SessionManager.d.ts +2 -2
- package/dist/{server → node/types}/managers/SessionManager.type.d.ts +1 -1
- package/dist/{server → node/types}/managers/TransactionManager.d.ts +2 -2
- package/dist/{server → node/types}/managers/TransactionManager.types.d.ts +1 -1
- package/dist/node/types/managers/index.browser.d.ts +2 -0
- package/dist/node/types/managers/index.d.ts +2 -0
- package/dist/node/types/scripts/index.browser.d.ts +1 -0
- package/dist/node/types/scripts/index.d.ts +1 -0
- package/dist/node/types/services/index.browser.d.ts +1 -0
- package/dist/node/types/services/index.d.ts +2 -0
- package/dist/{server → node/types}/services/redis/RedisPublisher.d.ts +1 -1
- package/dist/{server → node/types}/services/redis/RedisSubscriber.d.ts +2 -2
- package/dist/node/types/services/redis/index.d.ts +3 -0
- package/dist/{server → node/types}/services/time/TimeService.d.ts +1 -1
- package/dist/node/types/services/time/index.d.ts +2 -0
- package/dist/node/types/types/index.browser.d.ts +2 -0
- package/dist/node/types/types/index.d.ts +2 -0
- package/dist/{server → node/types}/utils/CoordinateUtils.d.ts +1 -1
- package/dist/{client → node/types}/utils/DateUtils.d.ts +1 -1
- package/dist/{client → node/types}/utils/Point3Utils.d.ts +1 -1
- package/dist/node/types/utils/global/index.d.ts +11 -0
- package/dist/node/types/utils/index.browser.d.ts +17 -0
- package/dist/node/types/utils/index.d.ts +2 -0
- package/dist/{server → node/types}/utils/nodejs/HookUtils.d.ts +1 -1
- package/dist/node/types/utils/nodejs/index.d.ts +2 -0
- package/dist/{server → node/types}/utils/nodejs/sequelize-utils/SequelizeUtils.d.ts +1 -1
- package/dist/node/types/utils/nodejs/sequelize-utils/index.d.ts +1 -0
- package/dist/node/types/utils/try-catch/index.d.ts +1 -0
- package/package.json +17 -10
- package/dist/client/constants/index.browser.d.ts +0 -6
- package/dist/client/constants/index.browser.js +0 -6
- package/dist/client/index.browser.d.ts +0 -7
- package/dist/client/index.browser.js +0 -7
- package/dist/client/interfaces/index.browser.d.ts +0 -4
- package/dist/client/interfaces/index.browser.js +0 -4
- package/dist/client/managers/index.browser.d.ts +0 -2
- package/dist/client/managers/index.browser.js +0 -2
- package/dist/client/scripts/index.browser.d.ts +0 -1
- package/dist/client/scripts/index.browser.js +0 -1
- package/dist/client/services/index.browser.d.ts +0 -1
- package/dist/client/services/index.browser.js +0 -1
- package/dist/client/services/time/index.d.ts +0 -2
- package/dist/client/services/time/index.js +0 -2
- package/dist/client/types/index.browser.d.ts +0 -2
- package/dist/client/types/index.browser.js +0 -2
- package/dist/client/utils/global/index.d.ts +0 -11
- package/dist/client/utils/global/index.js +0 -11
- package/dist/client/utils/index.browser.d.ts +0 -17
- package/dist/client/utils/index.browser.js +0 -17
- package/dist/client/utils/try-catch/index.d.ts +0 -1
- package/dist/client/utils/try-catch/index.js +0 -1
- package/dist/server/constants/index.browser.d.ts +0 -6
- package/dist/server/constants/index.d.ts +0 -2
- package/dist/server/constants/nodejs/index.d.ts +0 -2
- package/dist/server/index.browser.d.ts +0 -7
- package/dist/server/index.browser.js +0 -23
- package/dist/server/index.d.ts +0 -8
- package/dist/server/interfaces/index.browser.d.ts +0 -4
- package/dist/server/interfaces/index.d.ts +0 -2
- package/dist/server/interfaces/nodejs/db/index.d.ts +0 -1
- package/dist/server/interfaces/nodejs/db/sequelize/UpsertOptions.d.ts +0 -4
- package/dist/server/interfaces/nodejs/db/sequelize/index.d.ts +0 -6
- package/dist/server/interfaces/nodejs/db/sequelize/index.js +0 -22
- package/dist/server/interfaces/nodejs/index.d.ts +0 -1
- package/dist/server/managers/index.browser.d.ts +0 -2
- package/dist/server/managers/index.d.ts +0 -2
- package/dist/server/managers/index.js +0 -18
- package/dist/server/scripts/index.browser.d.ts +0 -1
- package/dist/server/scripts/index.d.ts +0 -1
- package/dist/server/services/index.browser.d.ts +0 -1
- package/dist/server/services/index.d.ts +0 -2
- package/dist/server/services/index.js +0 -18
- package/dist/server/services/redis/index.d.ts +0 -3
- package/dist/server/services/time/index.d.ts +0 -2
- package/dist/server/services/time/index.js +0 -18
- package/dist/server/types/index.browser.d.ts +0 -2
- package/dist/server/types/index.d.ts +0 -2
- package/dist/server/types/index.js +0 -18
- package/dist/server/utils/global/index.d.ts +0 -11
- package/dist/server/utils/global/index.js +0 -27
- package/dist/server/utils/index.browser.d.ts +0 -17
- package/dist/server/utils/index.browser.js +0 -33
- package/dist/server/utils/index.d.ts +0 -2
- package/dist/server/utils/index.js +0 -18
- package/dist/server/utils/nodejs/index.d.ts +0 -2
- package/dist/server/utils/nodejs/sequelize-utils/index.d.ts +0 -1
- package/dist/server/utils/try-catch/index.d.ts +0 -1
- /package/dist/{server → browser/cjs}/constants/COORDINATE.js +0 -0
- /package/dist/{server → browser/cjs}/constants/CRUD.js +0 -0
- /package/dist/{server → browser/cjs}/constants/DATE.js +0 -0
- /package/dist/{server → browser/cjs}/constants/DISTANCE.js +0 -0
- /package/dist/{server → browser/cjs}/constants/DURATION.js +0 -0
- /package/dist/{server → browser/cjs}/constants/NOT_NULL.js +0 -0
- /package/dist/{server → browser/cjs}/interfaces/Coordinate.js +0 -0
- /package/dist/{server → browser/cjs}/interfaces/Point2.js +0 -0
- /package/dist/{server → browser/cjs}/interfaces/Point3.js +0 -0
- /package/dist/{server → browser/cjs}/interfaces/StorageProvider.js +0 -0
- /package/dist/{server → browser/cjs}/managers/SessionManager.js +0 -0
- /package/dist/{server → browser/cjs}/managers/SessionManager.type.js +0 -0
- /package/dist/{server → browser/cjs}/scripts/base64Polyfill.js +0 -0
- /package/dist/{server → browser/cjs}/services/time/TimeService.js +0 -0
- /package/dist/{server → browser/cjs}/services/time/TimeService.type.js +0 -0
- /package/dist/{server → browser/cjs}/types/IntRage.js +0 -0
- /package/dist/{server → browser/cjs}/types/PartialExcept.js +0 -0
- /package/dist/{server → browser/cjs}/utils/AxiosUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/BooleanUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/Calc.js +0 -0
- /package/dist/{server → browser/cjs}/utils/CoordinateUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/NumberUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/Point3Utils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/RandomUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/StringUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/UuidUtils.js +0 -0
- /package/dist/{server → browser/cjs}/utils/Validator.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/between.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/castArray.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/circularDistance.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/fallbackIfEqual.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/firstNonNullish.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/flat.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/pureEnum.js +0 -0
- /package/dist/{server → browser/cjs}/utils/global/sleep.js +0 -0
- /package/dist/{server → browser/cjs}/utils/try-catch/TryCatch.js +0 -0
- /package/dist/{client/constants/COORDINATE.js → browser/esm/constants/COORDINATE.mjs} +0 -0
- /package/dist/{client/constants/CRUD.js → browser/esm/constants/CRUD.mjs} +0 -0
- /package/dist/{client/constants/DATE.js → browser/esm/constants/DATE.mjs} +0 -0
- /package/dist/{client/constants/DISTANCE.js → browser/esm/constants/DISTANCE.mjs} +0 -0
- /package/dist/{client/constants/DURATION.js → browser/esm/constants/DURATION.mjs} +0 -0
- /package/dist/{client/constants/NOT_NULL.js → browser/esm/constants/NOT_NULL.mjs} +0 -0
- /package/dist/{client/interfaces/Coordinate.js → browser/esm/interfaces/Coordinate.mjs} +0 -0
- /package/dist/{client/interfaces/Point2.js → browser/esm/interfaces/Point2.mjs} +0 -0
- /package/dist/{client/interfaces/Point3.js → browser/esm/interfaces/Point3.mjs} +0 -0
- /package/dist/{client/interfaces/StorageProvider.js → browser/esm/interfaces/StorageProvider.mjs} +0 -0
- /package/dist/{client/managers/SessionManager.js → browser/esm/managers/SessionManager.mjs} +0 -0
- /package/dist/{client/managers/SessionManager.type.js → browser/esm/managers/SessionManager.type.mjs} +0 -0
- /package/dist/{client/scripts/base64Polyfill.js → browser/esm/scripts/base64Polyfill.mjs} +0 -0
- /package/dist/{client/services/time/TimeService.js → browser/esm/services/time/TimeService.mjs} +0 -0
- /package/dist/{client/services/time/TimeService.type.js → browser/esm/services/time/TimeService.type.mjs} +0 -0
- /package/dist/{client/types/IntRage.js → browser/esm/types/IntRage.mjs} +0 -0
- /package/dist/{client/types/PartialExcept.js → browser/esm/types/PartialExcept.mjs} +0 -0
- /package/dist/{client/utils/AxiosUtils.js → browser/esm/utils/AxiosUtils.mjs} +0 -0
- /package/dist/{client/utils/BooleanUtils.js → browser/esm/utils/BooleanUtils.mjs} +0 -0
- /package/dist/{client/utils/Calc.js → browser/esm/utils/Calc.mjs} +0 -0
- /package/dist/{client/utils/CoordinateUtils.js → browser/esm/utils/CoordinateUtils.mjs} +0 -0
- /package/dist/{client/utils/NumberUtils.js → browser/esm/utils/NumberUtils.mjs} +0 -0
- /package/dist/{client/utils/Point3Utils.js → browser/esm/utils/Point3Utils.mjs} +0 -0
- /package/dist/{client/utils/RandomUtils.js → browser/esm/utils/RandomUtils.mjs} +0 -0
- /package/dist/{client/utils/StringUtils.js → browser/esm/utils/StringUtils.mjs} +0 -0
- /package/dist/{client/utils/UuidUtils.js → browser/esm/utils/UuidUtils.mjs} +0 -0
- /package/dist/{client/utils/Validator.js → browser/esm/utils/Validator.mjs} +0 -0
- /package/dist/{client/utils/global/between.js → browser/esm/utils/global/between.mjs} +0 -0
- /package/dist/{client/utils/global/castArray.js → browser/esm/utils/global/castArray.mjs} +0 -0
- /package/dist/{client/utils/global/circularDistance.js → browser/esm/utils/global/circularDistance.mjs} +0 -0
- /package/dist/{client/utils/global/fallbackIfEqual.js → browser/esm/utils/global/fallbackIfEqual.mjs} +0 -0
- /package/dist/{client/utils/global/firstNonNullish.js → browser/esm/utils/global/firstNonNullish.mjs} +0 -0
- /package/dist/{client/utils/global/flat.js → browser/esm/utils/global/flat.mjs} +0 -0
- /package/dist/{client/utils/global/pureEnum.js → browser/esm/utils/global/pureEnum.mjs} +0 -0
- /package/dist/{client/utils/global/sleep.js → browser/esm/utils/global/sleep.mjs} +0 -0
- /package/dist/{client/utils/try-catch/TryCatch.js → browser/esm/utils/try-catch/TryCatch.mjs} +0 -0
- /package/dist/{client → browser/types}/constants/COORDINATE.d.ts +0 -0
- /package/dist/{client → browser/types}/constants/CRUD.d.ts +0 -0
- /package/dist/{client → browser/types}/constants/DATE.d.ts +0 -0
- /package/dist/{client → browser/types}/constants/DISTANCE.d.ts +0 -0
- /package/dist/{client → browser/types}/constants/DURATION.d.ts +0 -0
- /package/dist/{client → browser/types}/constants/NOT_NULL.d.ts +0 -0
- /package/dist/{client → browser/types}/interfaces/Coordinate.d.ts +0 -0
- /package/dist/{client → browser/types}/interfaces/Point2.d.ts +0 -0
- /package/dist/{client → browser/types}/interfaces/StorageProvider.d.ts +0 -0
- /package/dist/{client → browser/types}/scripts/base64Polyfill.d.ts +0 -0
- /package/dist/{client → browser/types}/services/time/TimeService.type.d.ts +0 -0
- /package/dist/{client → browser/types}/types/IntRage.d.ts +0 -0
- /package/dist/{client → browser/types}/types/PartialExcept.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/ArrayUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/AxiosUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/BooleanUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/Calc.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/JuminNumberUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/NumberUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/ObjectIdUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/RandomUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/Sequencer.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/StringUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/UuidUtils.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/Validator.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/between.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/castArray.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/circularDistance.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/fallbackIfEqual.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/fallbackIfNull.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/fallbackIfUndefined.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/firstNonNullish.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/flat.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/processFirstNonNullish.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/pureEnum.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/global/sleep.d.ts +0 -0
- /package/dist/{client → browser/types}/utils/try-catch/TryCatch.d.ts +0 -0
- /package/dist/{server → node/cjs}/constants/nodejs/TransactionManagerLogLevel.js +0 -0
- /package/dist/{server → node/cjs}/constants/nodejs/TransactionManagerTimeoutAction.js +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/Hook.js → node/cjs/interfaces/Coordinate.js} +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/HookFn.js → node/cjs/interfaces/Point2.js} +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/HookType.js → node/cjs/interfaces/Point3.js} +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/ReloadOption.js → node/cjs/interfaces/StorageProvider.js} +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/TransactionOption.js → node/cjs/interfaces/nodejs/db/sequelize/Hook.js} +0 -0
- /package/dist/{server/interfaces/nodejs/db/sequelize/UpsertOptions.js → node/cjs/interfaces/nodejs/db/sequelize/HookFn.js} +0 -0
- /package/dist/{server/managers/TransactionManager.types.js → node/cjs/interfaces/nodejs/db/sequelize/HookType.js} +0 -0
- /package/dist/{server/types/UpsertResult.js → node/cjs/interfaces/nodejs/db/sequelize/ReloadOption.js} +0 -0
- /package/dist/{server/utils/nodejs/sequelize-utils/types.js → node/cjs/interfaces/nodejs/db/sequelize/TransactionOption.js} +0 -0
- /package/dist/{server → node/cjs}/services/redis/RedisClient.js +0 -0
- /package/dist/{server → node/cjs}/utils/nodejs/HookUtils.js +0 -0
- /package/dist/{server → node/types}/constants/COORDINATE.d.ts +0 -0
- /package/dist/{server → node/types}/constants/CRUD.d.ts +0 -0
- /package/dist/{server → node/types}/constants/DATE.d.ts +0 -0
- /package/dist/{server → node/types}/constants/DISTANCE.d.ts +0 -0
- /package/dist/{server → node/types}/constants/DURATION.d.ts +0 -0
- /package/dist/{server → node/types}/constants/NOT_NULL.d.ts +0 -0
- /package/dist/{server → node/types}/constants/nodejs/TransactionManagerLogLevel.d.ts +0 -0
- /package/dist/{server → node/types}/constants/nodejs/TransactionManagerTimeoutAction.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/Coordinate.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/Point2.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/StorageProvider.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/nodejs/db/sequelize/HookType.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/nodejs/db/sequelize/ReloadOption.d.ts +0 -0
- /package/dist/{server → node/types}/interfaces/nodejs/db/sequelize/TransactionOption.d.ts +0 -0
- /package/dist/{server → node/types}/scripts/base64Polyfill.d.ts +0 -0
- /package/dist/{server → node/types}/services/redis/RedisClient.d.ts +0 -0
- /package/dist/{server → node/types}/services/time/TimeService.type.d.ts +0 -0
- /package/dist/{server → node/types}/types/IntRage.d.ts +0 -0
- /package/dist/{server → node/types}/types/PartialExcept.d.ts +0 -0
- /package/dist/{server → node/types}/types/UpsertResult.d.ts +0 -0
- /package/dist/{server → node/types}/utils/ArrayUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/AxiosUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/BooleanUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/Calc.d.ts +0 -0
- /package/dist/{server → node/types}/utils/JuminNumberUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/NumberUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/ObjectIdUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/RandomUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/Sequencer.d.ts +0 -0
- /package/dist/{server → node/types}/utils/StringUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/UuidUtils.d.ts +0 -0
- /package/dist/{server → node/types}/utils/Validator.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/between.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/castArray.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/circularDistance.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/fallbackIfEqual.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/fallbackIfNull.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/fallbackIfUndefined.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/firstNonNullish.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/flat.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/processFirstNonNullish.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/pureEnum.d.ts +0 -0
- /package/dist/{server → node/types}/utils/global/sleep.d.ts +0 -0
- /package/dist/{server → node/types}/utils/nodejs/sequelize-utils/types.d.ts +0 -0
- /package/dist/{server → node/types}/utils/try-catch/TryCatch.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TryCatch"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var CRUD;
|
|
2
|
+
(function (CRUD) {
|
|
3
|
+
CRUD[CRUD["CREATE"] = 1] = "CREATE";
|
|
4
|
+
CRUD[CRUD["READ"] = 2] = "READ";
|
|
5
|
+
CRUD[CRUD["UPDATE"] = 3] = "UPDATE";
|
|
6
|
+
CRUD[CRUD["DELETE"] = 4] = "DELETE";
|
|
7
|
+
})(CRUD || (CRUD = {}));
|
|
8
|
+
(function (CRUD) {
|
|
9
|
+
function toString(crud) {
|
|
10
|
+
switch (crud) {
|
|
11
|
+
case CRUD.CREATE: return 'Create';
|
|
12
|
+
case CRUD.READ: return 'Read';
|
|
13
|
+
case CRUD.UPDATE: return 'Update';
|
|
14
|
+
case CRUD.DELETE: return 'Delete';
|
|
15
|
+
default: throw new Error('Unknown crud: ' + crud);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
CRUD.toString = toString;
|
|
19
|
+
})(CRUD || (CRUD = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class DATE {
|
|
2
|
+
}
|
|
3
|
+
(function (DATE) {
|
|
4
|
+
let FORMAT;
|
|
5
|
+
(function (FORMAT) {
|
|
6
|
+
FORMAT[FORMAT["UNIX"] = 1] = "UNIX";
|
|
7
|
+
FORMAT[FORMAT["SECONDS"] = 2] = "SECONDS";
|
|
8
|
+
FORMAT[FORMAT["MILLISECONDS"] = 3] = "MILLISECONDS";
|
|
9
|
+
FORMAT[FORMAT["ISO_8601"] = 4] = "ISO_8601";
|
|
10
|
+
})(FORMAT = DATE.FORMAT || (DATE.FORMAT = {}));
|
|
11
|
+
(function (FORMAT) {
|
|
12
|
+
function toString(format) {
|
|
13
|
+
switch (format) {
|
|
14
|
+
case FORMAT.UNIX: return 'UNIX';
|
|
15
|
+
case FORMAT.SECONDS: return 'SECONDS';
|
|
16
|
+
case FORMAT.MILLISECONDS: return 'MILLISECONDS';
|
|
17
|
+
case FORMAT.ISO_8601: return 'ISO_8601';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
FORMAT.toString = toString;
|
|
21
|
+
})(FORMAT = DATE.FORMAT || (DATE.FORMAT = {}));
|
|
22
|
+
})(DATE || (DATE = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class DISTANCE {
|
|
2
|
+
}
|
|
3
|
+
(function (DISTANCE) {
|
|
4
|
+
let UNIT;
|
|
5
|
+
(function (UNIT) {
|
|
6
|
+
UNIT["FEET"] = "FEET";
|
|
7
|
+
UNIT["KILOMETERS"] = "KILOMETERS";
|
|
8
|
+
UNIT["MILLIMETERS"] = "MILLIMETERS";
|
|
9
|
+
UNIT["CENTIMETERS"] = "CENTIMETERS";
|
|
10
|
+
UNIT["METERS"] = "METERS";
|
|
11
|
+
UNIT["MILES"] = "MILES";
|
|
12
|
+
UNIT["YARDS"] = "YARDS";
|
|
13
|
+
})(UNIT = DISTANCE.UNIT || (DISTANCE.UNIT = {}));
|
|
14
|
+
})(DISTANCE || (DISTANCE = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class DURATION {
|
|
2
|
+
}
|
|
3
|
+
(function (DURATION) {
|
|
4
|
+
let UNIT;
|
|
5
|
+
(function (UNIT) {
|
|
6
|
+
UNIT["NANOSECONDS"] = "NANOSECONDS";
|
|
7
|
+
UNIT["MICROSECONDS"] = "MICROSECONDS";
|
|
8
|
+
UNIT["MILLISECONDS"] = "MILLISECONDS";
|
|
9
|
+
UNIT["SECONDS"] = "SECONDS";
|
|
10
|
+
UNIT["MINUTES"] = "MINUTES";
|
|
11
|
+
UNIT["HOURS"] = "HOURS";
|
|
12
|
+
UNIT["DAYS"] = "DAYS";
|
|
13
|
+
UNIT["YEARS"] = "YEARS";
|
|
14
|
+
UNIT["DECADES"] = "DECADES";
|
|
15
|
+
UNIT["CENTURIES"] = "CENTURIES";
|
|
16
|
+
})(UNIT = DURATION.UNIT || (DURATION.UNIT = {}));
|
|
17
|
+
})(DURATION || (DURATION = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const NOT_NULL = Symbol('!null');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var TransactionManagerLogLevel;
|
|
2
|
+
(function (TransactionManagerLogLevel) {
|
|
3
|
+
TransactionManagerLogLevel[TransactionManagerLogLevel["VERBOSE"] = 1] = "VERBOSE";
|
|
4
|
+
TransactionManagerLogLevel[TransactionManagerLogLevel["INFO"] = 2] = "INFO";
|
|
5
|
+
TransactionManagerLogLevel[TransactionManagerLogLevel["WARNING"] = 3] = "WARNING";
|
|
6
|
+
TransactionManagerLogLevel[TransactionManagerLogLevel["ERROR"] = 4] = "ERROR";
|
|
7
|
+
TransactionManagerLogLevel[TransactionManagerLogLevel["CRITICAL"] = 5] = "CRITICAL";
|
|
8
|
+
})(TransactionManagerLogLevel || (TransactionManagerLogLevel = {}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export var TransactionManagerTimeoutAction;
|
|
2
|
+
(function (TransactionManagerTimeoutAction) {
|
|
3
|
+
TransactionManagerTimeoutAction[TransactionManagerTimeoutAction["COMMIT"] = 1] = "COMMIT";
|
|
4
|
+
TransactionManagerTimeoutAction[TransactionManagerTimeoutAction["ROLLBACK"] = 2] = "ROLLBACK";
|
|
5
|
+
})(TransactionManagerTimeoutAction || (TransactionManagerTimeoutAction = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './constants/index.browser.mjs';
|
|
2
|
+
export * from './interfaces/index.browser.mjs';
|
|
3
|
+
export * from './managers/index.browser.mjs';
|
|
4
|
+
export * from './scripts/index.browser.mjs';
|
|
5
|
+
export * from './services/index.browser.mjs';
|
|
6
|
+
export * from './types/index.browser.mjs';
|
|
7
|
+
export * from './utils/index.browser.mjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './index.browser.mjs';
|
|
2
|
+
export * from './constants/index.mjs';
|
|
3
|
+
export * from './interfaces/index.mjs';
|
|
4
|
+
export * from './managers/index.mjs';
|
|
5
|
+
export * from './scripts/index.mjs';
|
|
6
|
+
export * from './services/index.mjs';
|
|
7
|
+
export * from './types/index.mjs';
|
|
8
|
+
export * from './utils/index.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sequelize/index.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './db/index.mjs';
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { jwtDecode } from "jwt-decode";
|
|
11
|
+
import moment from "moment";
|
|
12
|
+
import EventEmitter from 'eventemitter3';
|
|
13
|
+
export class SessionManager extends EventEmitter {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
super();
|
|
16
|
+
// Init service parameters
|
|
17
|
+
this.api = options.api;
|
|
18
|
+
this.storageProvider = options.storageProvider;
|
|
19
|
+
// Logging
|
|
20
|
+
console.log('SessionManager initialized', Date.now(), options.api);
|
|
21
|
+
}
|
|
22
|
+
get key() {
|
|
23
|
+
try {
|
|
24
|
+
if (this.storageProvider.key) {
|
|
25
|
+
return this.storageProvider.key();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.error(e);
|
|
30
|
+
}
|
|
31
|
+
return SessionManager.DEFAULT_AUTHORIZATION_STORAGE_KEY;
|
|
32
|
+
}
|
|
33
|
+
hasAuthorization() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return !!(yield this.getAuthorization());
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
getAuthorization() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return this.storageProvider.get(this.key);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
setAuthorization(authorization) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
if (authorization === null) {
|
|
46
|
+
yield this.removeAuthorization();
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
let nextAuthorization = yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
if (authorization === undefined) {
|
|
51
|
+
return yield this.getAuthorization();
|
|
52
|
+
}
|
|
53
|
+
return authorization;
|
|
54
|
+
}))();
|
|
55
|
+
if (!nextAuthorization) {
|
|
56
|
+
console.log('nextAuthorization is null or undefined');
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
// Replace Bearer prefix
|
|
61
|
+
nextAuthorization = nextAuthorization.replace(/^Bearer\s+/, '');
|
|
62
|
+
const decoded = jwtDecode(nextAuthorization);
|
|
63
|
+
if (!decoded) {
|
|
64
|
+
console.warn('JWT decode failed');
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
console.log('Session:JWT decoded');
|
|
68
|
+
(() => {
|
|
69
|
+
console.log(' - User', decoded.uuid);
|
|
70
|
+
console.log(' - IAT', ...(() => {
|
|
71
|
+
if (!decoded.iat) {
|
|
72
|
+
return [decoded.iat];
|
|
73
|
+
}
|
|
74
|
+
const iat = moment.unix(decoded.iat);
|
|
75
|
+
if (!iat.isValid()) {
|
|
76
|
+
return [decoded.iat];
|
|
77
|
+
}
|
|
78
|
+
return [decoded.iat, iat.format(), iat.diff(Date.now(), 'days'), 'days left'];
|
|
79
|
+
})());
|
|
80
|
+
console.log(' - NBF', ...(() => {
|
|
81
|
+
if (!decoded.nbf) {
|
|
82
|
+
return [decoded.nbf];
|
|
83
|
+
}
|
|
84
|
+
const nbf = moment.unix(decoded.nbf);
|
|
85
|
+
if (!nbf.isValid()) {
|
|
86
|
+
return [decoded.nbf];
|
|
87
|
+
}
|
|
88
|
+
return [decoded.nbf, nbf.format(), nbf.diff(Date.now(), 'days'), 'days left'];
|
|
89
|
+
})());
|
|
90
|
+
console.log(' - EXP', ...(() => {
|
|
91
|
+
if (!decoded.exp) {
|
|
92
|
+
return [decoded.exp];
|
|
93
|
+
}
|
|
94
|
+
const exp = moment.unix(decoded.exp);
|
|
95
|
+
if (!exp.isValid()) {
|
|
96
|
+
return [decoded.exp];
|
|
97
|
+
}
|
|
98
|
+
return [decoded.exp, exp.format(), exp.diff(Date.now(), 'days'), 'days left'];
|
|
99
|
+
})());
|
|
100
|
+
})();
|
|
101
|
+
// AsyncStorage 에 토큰 저장
|
|
102
|
+
yield this.storageProvider.set(this.key, nextAuthorization);
|
|
103
|
+
// API Instance header 설정
|
|
104
|
+
this.api.defaults.headers.common.Authorization = `Bearer ${nextAuthorization}`;
|
|
105
|
+
// Emit
|
|
106
|
+
this.emit('AUTHORIZATION_CHANGED', nextAuthorization);
|
|
107
|
+
// Return
|
|
108
|
+
return nextAuthorization;
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
console.error(e);
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
removeAuthorization() {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
// API Instance header 에서 토큰 제거
|
|
119
|
+
delete this.api.defaults.headers.common.Authorization;
|
|
120
|
+
// 스토리지에서 authorization 제거
|
|
121
|
+
yield this.storageProvider.remove(this.key);
|
|
122
|
+
// Emit
|
|
123
|
+
this.emit('AUTHORIZATION_CHANGED', null);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
SessionManager.DEFAULT_AUTHORIZATION_STORAGE_KEY = 'AUTHORIZATION';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import EventEmitter from 'eventemitter3';
|
|
11
|
+
import { TransactionManagerLogLevel, TransactionManagerTimeoutAction } from "../constants/index.mjs";
|
|
12
|
+
const LOG_TAG = '[TransactionManager]';
|
|
13
|
+
export class TransactionManager {
|
|
14
|
+
constructor() {
|
|
15
|
+
// Members
|
|
16
|
+
this.logLevel = TransactionManagerLogLevel.VERBOSE;
|
|
17
|
+
this.transactionTimeoutMap = new Map();
|
|
18
|
+
// Emitter
|
|
19
|
+
this.emitter = new EventEmitter();
|
|
20
|
+
if (this.logLevel <= TransactionManagerLogLevel.VERBOSE) {
|
|
21
|
+
console.log(LOG_TAG, 'TransactionManager instance initialized');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
static getInstance() {
|
|
25
|
+
return this.instance || (this.instance = new TransactionManager());
|
|
26
|
+
}
|
|
27
|
+
getTransactionLogArg(transaction) {
|
|
28
|
+
const id = transaction === null || transaction === void 0 ? void 0 : transaction.id;
|
|
29
|
+
return id ? `transaction(${id})` : '';
|
|
30
|
+
}
|
|
31
|
+
setLogLevel(logLevel) {
|
|
32
|
+
this.logLevel = logLevel;
|
|
33
|
+
if (this.logLevel <= TransactionManagerLogLevel.VERBOSE) {
|
|
34
|
+
console.log(LOG_TAG, 'log level changed to', logLevel);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
addListener(event, fn) {
|
|
38
|
+
this.emitter.addListener(event, fn);
|
|
39
|
+
}
|
|
40
|
+
removeListener(event, fn) {
|
|
41
|
+
this.emitter.removeListener(event, fn);
|
|
42
|
+
}
|
|
43
|
+
add(transaction, option) {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
if (this.transactionTimeoutMap.has(transaction)) {
|
|
46
|
+
if (this.logLevel <= TransactionManagerLogLevel.ERROR) {
|
|
47
|
+
console.error(LOG_TAG, 'transaction already exists');
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const action = (_a = option === null || option === void 0 ? void 0 : option.timeoutAction) !== null && _a !== void 0 ? _a : TransactionManager.DEFAULT_ACTION;
|
|
52
|
+
const timeout = (_b = option === null || option === void 0 ? void 0 : option.timeout) !== null && _b !== void 0 ? _b : TransactionManager.DEFAULT_TIMEOUT;
|
|
53
|
+
const handler = setTimeout(this.timeout.bind(this), timeout, transaction, action);
|
|
54
|
+
this.transactionTimeoutMap.set(transaction, {
|
|
55
|
+
handler,
|
|
56
|
+
action,
|
|
57
|
+
});
|
|
58
|
+
// Callback
|
|
59
|
+
transaction.afterCommit(this.afterCommit.bind(this));
|
|
60
|
+
}
|
|
61
|
+
remove(transaction) {
|
|
62
|
+
const transactionTimeout = this.transactionTimeoutMap.get(transaction);
|
|
63
|
+
if (transactionTimeout != null) {
|
|
64
|
+
clearTimeout(transactionTimeout.handler);
|
|
65
|
+
this.transactionTimeoutMap.delete(transaction);
|
|
66
|
+
if (this.logLevel <= TransactionManagerLogLevel.VERBOSE) {
|
|
67
|
+
console.log(LOG_TAG, this.getTransactionLogArg(transaction), 'removed');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
flush(action) {
|
|
72
|
+
return Promise.allSettled(Array.from(this.transactionTimeoutMap.entries()).map((_a) => __awaiter(this, [_a], void 0, function* ([transaction, transactionTimeout]) {
|
|
73
|
+
const handled = yield this.execute(transaction, action !== null && action !== void 0 ? action : transactionTimeout.action, 'flush');
|
|
74
|
+
this.remove(transaction);
|
|
75
|
+
return {
|
|
76
|
+
handled,
|
|
77
|
+
transaction,
|
|
78
|
+
};
|
|
79
|
+
})));
|
|
80
|
+
}
|
|
81
|
+
execute(transaction, action, reason) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
let handled = false;
|
|
84
|
+
const finished = transaction === null || transaction === void 0 ? void 0 : transaction.finished;
|
|
85
|
+
if (finished != null) {
|
|
86
|
+
if (this.logLevel <= TransactionManagerLogLevel.VERBOSE) {
|
|
87
|
+
console.log(LOG_TAG, this.getTransactionLogArg(transaction), `is already handled(${finished}) after`, reason);
|
|
88
|
+
}
|
|
89
|
+
this.remove(transaction);
|
|
90
|
+
return handled;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
let finished;
|
|
94
|
+
switch (action) {
|
|
95
|
+
case TransactionManagerTimeoutAction.ROLLBACK: {
|
|
96
|
+
yield transaction.rollback();
|
|
97
|
+
finished = 'rollback';
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case TransactionManagerTimeoutAction.COMMIT: {
|
|
101
|
+
yield transaction.commit();
|
|
102
|
+
finished = 'commit';
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
default: {
|
|
106
|
+
if (this.logLevel <= TransactionManagerLogLevel.ERROR) {
|
|
107
|
+
console.error(LOG_TAG, `unknown action`, action);
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
handled = finished != null;
|
|
113
|
+
if (finished != null) {
|
|
114
|
+
if (this.logLevel <= TransactionManagerLogLevel.ERROR) {
|
|
115
|
+
console.error(LOG_TAG, this.getTransactionLogArg(transaction), `handled(${finished}) after`, reason);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
if (this.logLevel <= TransactionManagerLogLevel.ERROR) {
|
|
120
|
+
console.error(LOG_TAG, this.getTransactionLogArg(transaction), `not handled 🚫`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
console.error(e);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
this.remove(transaction);
|
|
129
|
+
}
|
|
130
|
+
return handled;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
timeout(transaction, action) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const handled = yield this.execute(transaction, action, 'timeout');
|
|
136
|
+
this.emitter.emit('onUnhandledTransaction', transaction, handled);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
afterCommit(transaction) {
|
|
140
|
+
this.remove(transaction);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
TransactionManager.DEFAULT_TIMEOUT = 60 * 1000;
|
|
144
|
+
TransactionManager.DEFAULT_ACTION = TransactionManagerTimeoutAction.ROLLBACK;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './base64Polyfill.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.browser.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './time/index.mjs';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { createClient } from 'redis';
|
|
11
|
+
const LOG_PREFIX = 'RedisClient';
|
|
12
|
+
export class RedisClient {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
this.options = {};
|
|
15
|
+
this.status = RedisClient.Status.STOPPED;
|
|
16
|
+
console.log(Date.now(), LOG_PREFIX, 'initialized');
|
|
17
|
+
if (options) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
}
|
|
20
|
+
if (options === null || options === void 0 ? void 0 : options.redisOptions) {
|
|
21
|
+
this.client = createClient(options.redisOptions);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.client = createClient({});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
getStatus() {
|
|
28
|
+
return this.status;
|
|
29
|
+
}
|
|
30
|
+
start() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
console.log(LOG_PREFIX, 'trying to start');
|
|
33
|
+
// register event callback
|
|
34
|
+
this.client.on('connect', this.handleOnConnect);
|
|
35
|
+
this.client.on('error', this.handleOnError);
|
|
36
|
+
console.log('before connect');
|
|
37
|
+
yield this.client.connect();
|
|
38
|
+
console.log('after connect');
|
|
39
|
+
this.status = RedisClient.Status.RUNNING;
|
|
40
|
+
console.log(LOG_PREFIX, 'now started');
|
|
41
|
+
return this.status;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
stop() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
console.log(LOG_PREFIX, 'trying to stop');
|
|
47
|
+
// unregister event callback
|
|
48
|
+
this.client.off('connect', this.handleOnConnect);
|
|
49
|
+
this.client.off('error', this.handleOnError);
|
|
50
|
+
if (this.client.isOpen) {
|
|
51
|
+
yield this.client.disconnect();
|
|
52
|
+
}
|
|
53
|
+
this.status = RedisClient.Status.STOPPED;
|
|
54
|
+
console.log(LOG_PREFIX, 'now stopped');
|
|
55
|
+
return this.status;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
handleOnConnect() {
|
|
59
|
+
console.log(LOG_PREFIX, 'connected');
|
|
60
|
+
}
|
|
61
|
+
handleOnError(error) {
|
|
62
|
+
console.error(LOG_PREFIX, error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
(function (RedisClient) {
|
|
66
|
+
let Status;
|
|
67
|
+
(function (Status) {
|
|
68
|
+
Status[Status["RUNNING"] = 0] = "RUNNING";
|
|
69
|
+
Status[Status["STOPPED"] = 1] = "STOPPED";
|
|
70
|
+
})(Status = RedisClient.Status || (RedisClient.Status = {}));
|
|
71
|
+
})(RedisClient || (RedisClient = {}));
|